diff --git a/package.json b/package.json
index a243f7ff..069e2580 100644
--- a/package.json
+++ b/package.json
@@ -9,8 +9,9 @@
"bs": "lerna bootstrap",
"clean": "lerna run clean",
"watch": "lerna run watch --parallel",
- "build": "lerna run build --scope=\"@ms/!(plugins)\"",
- "build:plugins": "lerna run build --scope=\"@ms/plugins\"",
+ "build": "lerna run build --scope=\"@ccms/!(plugins)\"",
+ "build:plugins": "lerna run build --scope=\"@ccms/plugins\"",
+ "publish": "yarn lerna exec \"npm publish --access=public\" --scope=\"@ccms/!(plugins|client|types)\"",
"ug": "yarn upgrade-interactive --latest",
"lp": "lerna publish"
},
diff --git a/packages/api/package.json b/packages/api/package.json
index 49bf34bf..3cd8bd56 100644
--- a/packages/api/package.json
+++ b/packages/api/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/api",
+ "name": "@ccms/api",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -22,8 +19,8 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
- "@ms/container": "^0.5.0",
- "@ms/ployfill": "^0.5.0",
+ "@ccms/container": "^0.5.0",
+ "@ccms/ployfill": "^0.5.0",
"base64-js": "^1.3.1",
"source-map-builder": "^0.0.7"
},
diff --git a/packages/api/src/channel.ts b/packages/api/src/channel.ts
index 0bf6e32d..cfdac144 100644
--- a/packages/api/src/channel.ts
+++ b/packages/api/src/channel.ts
@@ -1,4 +1,4 @@
-import { injectable } from "@ms/container";
+import { injectable } from "@ccms/container";
export namespace channel {
/**
diff --git a/packages/api/src/command.ts b/packages/api/src/command.ts
index ff399afb..d33304f4 100644
--- a/packages/api/src/command.ts
+++ b/packages/api/src/command.ts
@@ -1,5 +1,5 @@
-import i18n from '@ms/i18n'
-import { injectable } from "@ms/container";
+import i18n from '@ccms/i18n'
+import { injectable } from "@ccms/container";
export namespace command {
@injectable()
diff --git a/packages/api/src/console.ts b/packages/api/src/console.ts
index 31c85a7c..3c6723db 100644
--- a/packages/api/src/console.ts
+++ b/packages/api/src/console.ts
@@ -1,4 +1,4 @@
-import i18m from '@ms/i18n'
+import i18m from '@ccms/i18n'
import { SourceMapBuilder } from 'source-map-builder'
import * as base64 from 'base64-js'
diff --git a/packages/api/src/event.ts b/packages/api/src/event.ts
index 0d58f8a5..3750a0b2 100644
--- a/packages/api/src/event.ts
+++ b/packages/api/src/event.ts
@@ -1,8 +1,8 @@
/**
* MiaoScript Event处理类
*/
-import i18n from '@ms/i18n'
-import { injectable, unmanaged } from '@ms/container'
+import i18n from '@ccms/i18n'
+import { injectable, unmanaged } from '@ccms/container'
const Thread = Java.type('java.lang.Thread');
diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts
index 4ca3b648..2876b9be 100644
--- a/packages/api/src/index.ts
+++ b/packages/api/src/index.ts
@@ -1,4 +1,4 @@
-import "@ms/nashorn"
+import "@ccms/nashorn"
export * from './task'
export * from './event'
export * from './console'
diff --git a/packages/bukkit/package.json b/packages/bukkit/package.json
index 99267da5..42eb6739 100644
--- a/packages/bukkit/package.json
+++ b/packages/bukkit/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/bukkit",
+ "name": "@ccms/bukkit",
"version": "0.5.0",
"description": "MiaoScript bukkit package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,8 +24,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/common": "^0.5.0",
- "@ms/container": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/common": "^0.5.0",
+ "@ccms/container": "^0.5.0"
}
}
diff --git a/packages/bukkit/src/channel.ts b/packages/bukkit/src/channel.ts
index 208c6c9a..c6db611f 100644
--- a/packages/bukkit/src/channel.ts
+++ b/packages/bukkit/src/channel.ts
@@ -1,5 +1,5 @@
-import { channel, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container'
+import { channel, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container'
const Bukkit = org.bukkit.Bukkit
const PluginMessageListener = Java.type("org.bukkit.plugin.messaging.PluginMessageListener")
diff --git a/packages/bukkit/src/command.ts b/packages/bukkit/src/command.ts
index 2b363383..6b23cc8b 100644
--- a/packages/bukkit/src/command.ts
+++ b/packages/bukkit/src/command.ts
@@ -1,8 +1,8 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
-import { command, plugin } from '@ms/api'
-import * as reflect from '@ms/common/dist/reflect'
-import { provideSingleton, postConstruct, inject } from '@ms/container'
+import { command, plugin } from '@ccms/api'
+import * as reflect from '@ccms/common/dist/reflect'
+import { provideSingleton, postConstruct, inject } from '@ccms/container'
let Bukkit = org.bukkit.Bukkit;
let TabCompleter = Java.type('org.bukkit.command.TabCompleter');
diff --git a/packages/bukkit/src/console.ts b/packages/bukkit/src/console.ts
index 52cf827f..1196a19e 100644
--- a/packages/bukkit/src/console.ts
+++ b/packages/bukkit/src/console.ts
@@ -1,4 +1,4 @@
-import { MiaoScriptConsole } from '@ms/api'
+import { MiaoScriptConsole } from '@ccms/api'
let Bukkit = org.bukkit.Bukkit;
diff --git a/packages/bukkit/src/event.ts b/packages/bukkit/src/event.ts
index 8f9a8f31..fc7f420c 100644
--- a/packages/bukkit/src/event.ts
+++ b/packages/bukkit/src/event.ts
@@ -1,6 +1,6 @@
-import { event, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container';
-import * as reflect from '@ms/common/dist/reflect'
+import { event, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container';
+import * as reflect from '@ccms/common/dist/reflect'
const Bukkit = Java.type("org.bukkit.Bukkit");
const Event = Java.type("org.bukkit.event.Event");
diff --git a/packages/bukkit/src/index.ts b/packages/bukkit/src/index.ts
index 33c70582..bba8b13d 100644
--- a/packages/bukkit/src/index.ts
+++ b/packages/bukkit/src/index.ts
@@ -1,7 +1,7 @@
-///
+///
-import { server } from '@ms/api'
-import { Container } from '@ms/container'
+import { server } from '@ccms/api'
+import { Container } from '@ccms/container'
import { BukkitConsole } from './console';
import './event';
diff --git a/packages/bukkit/src/server.ts b/packages/bukkit/src/server.ts
index 5d077d44..d7f5b418 100644
--- a/packages/bukkit/src/server.ts
+++ b/packages/bukkit/src/server.ts
@@ -1,7 +1,7 @@
-import { server, constants } from '@ms/api'
-import { provideSingleton } from '@ms/container';
+import { server, constants } from '@ccms/api'
+import { provideSingleton } from '@ccms/container';
-import * as reflect from '@ms/common/dist/reflect'
+import * as reflect from '@ccms/common/dist/reflect'
import chat from './enhance/chat'
let Bukkit = org.bukkit.Bukkit;
diff --git a/packages/bukkit/src/task.ts b/packages/bukkit/src/task.ts
index 7319dd5b..a41361fb 100644
--- a/packages/bukkit/src/task.ts
+++ b/packages/bukkit/src/task.ts
@@ -1,5 +1,5 @@
-import { task, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container';
+import { task, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container';
const Bukkit = Java.type('org.bukkit.Bukkit');
const BukkitRunnable = Java.type('org.bukkit.scheduler.BukkitRunnable');
diff --git a/packages/bungee/package.json b/packages/bungee/package.json
index 4a219dc2..b7117a36 100644
--- a/packages/bungee/package.json
+++ b/packages/bungee/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/bungee",
+ "name": "@ccms/bungee",
"version": "0.5.0",
"description": "MiaoScript bungee package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,8 +24,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/common": "^0.5.0",
- "@ms/container": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/common": "^0.5.0",
+ "@ccms/container": "^0.5.0"
}
}
diff --git a/packages/bungee/src/channel.ts b/packages/bungee/src/channel.ts
index a8ab5347..3cca0400 100644
--- a/packages/bungee/src/channel.ts
+++ b/packages/bungee/src/channel.ts
@@ -1,5 +1,5 @@
-import { channel, event } from '@ms/api'
-import { provideSingleton, inject } from '@ms/container'
+import { channel, event } from '@ccms/api'
+import { provideSingleton, inject } from '@ccms/container'
const Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy()
diff --git a/packages/bungee/src/command.ts b/packages/bungee/src/command.ts
index 48b4a972..fa1b1b30 100644
--- a/packages/bungee/src/command.ts
+++ b/packages/bungee/src/command.ts
@@ -1,5 +1,5 @@
-import { command, plugin } from "@ms/api";
-import { inject, provideSingleton } from "@ms/container";
+import { command, plugin } from "@ccms/api";
+import { inject, provideSingleton } from "@ccms/container";
const Arrays = Java.type('java.util.Arrays')
const Command = Java.extend(Java.type('net.md_5.bungee.api.plugin.Command'), Java.type('net.md_5.bungee.api.plugin.TabExecutor'));
diff --git a/packages/bungee/src/console.ts b/packages/bungee/src/console.ts
index 36fd3cee..eb6d089e 100644
--- a/packages/bungee/src/console.ts
+++ b/packages/bungee/src/console.ts
@@ -1,6 +1,6 @@
-import '@ms/nashorn'
-import { plugin, MiaoScriptConsole } from '@ms/api'
-import { inject, injectable } from "@ms/container";
+import '@ccms/nashorn'
+import { plugin, MiaoScriptConsole } from '@ccms/api'
+import { inject, injectable } from "@ccms/container";
let CommandSender = Java.type("net.md_5.bungee.api.CommandSender")
diff --git a/packages/bungee/src/event.ts b/packages/bungee/src/event.ts
index b0f960bd..854abe07 100644
--- a/packages/bungee/src/event.ts
+++ b/packages/bungee/src/event.ts
@@ -1,6 +1,6 @@
-import { event } from '@ms/api'
-import { provideSingleton, postConstruct } from '@ms/container'
-import * as reflect from '@ms/common/dist/reflect'
+import { event } from '@ccms/api'
+import { provideSingleton, postConstruct } from '@ccms/container'
+import * as reflect from '@ccms/common/dist/reflect'
const Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy();
const Event = Java.type("net.md_5.bungee.api.plugin.Event");
diff --git a/packages/bungee/src/index.ts b/packages/bungee/src/index.ts
index 69f48e63..2993b9ee 100644
--- a/packages/bungee/src/index.ts
+++ b/packages/bungee/src/index.ts
@@ -1,7 +1,7 @@
-///
+///
-import { server } from '@ms/api'
-import { Container } from '@ms/container'
+import { server } from '@ccms/api'
+import { Container } from '@ccms/container'
import { BungeeConsole } from './console';
import './event';
diff --git a/packages/bungee/src/server.ts b/packages/bungee/src/server.ts
index b01c6371..2b1a28cd 100644
--- a/packages/bungee/src/server.ts
+++ b/packages/bungee/src/server.ts
@@ -1,7 +1,7 @@
-import { server, task } from '@ms/api'
-import { provideSingleton, inject, postConstruct } from '@ms/container'
+import { server, task } from '@ccms/api'
+import { provideSingleton, inject, postConstruct } from '@ccms/container'
-import * as reflect from '@ms/common/dist/reflect'
+import * as reflect from '@ccms/common/dist/reflect'
let Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy();
diff --git a/packages/bungee/src/task.ts b/packages/bungee/src/task.ts
index 656ecdd8..1faec840 100644
--- a/packages/bungee/src/task.ts
+++ b/packages/bungee/src/task.ts
@@ -1,5 +1,5 @@
-import { task, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container';
+import { task, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container';
var Runnable = Java.type('java.lang.Runnable')
let TimeUnit = Java.type('java.util.concurrent.TimeUnit')
diff --git a/packages/client/package.json b/packages/client/package.json
index 314a91e7..47b90888 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
{
"private": true,
- "name": "@ms/client",
+ "name": "@ccms/client",
"version": "0.5.0",
"description": "MiaoScript client package",
"keywords": [
@@ -13,9 +13,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"dev": "ts-node-dev --respawn --debounce=1500 src/index.ts",
"clean": "rimraf dist",
diff --git a/packages/common/package.json b/packages/common/package.json
index 67a51267..6df8fed8 100644
--- a/packages/common/package.json
+++ b/packages/common/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/common",
+ "name": "@ccms/common",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,7 +24,7 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/nashorn": "^0.5.0"
+ "@ccms/nashorn": "^0.5.0"
},
"gitHead": "562e2d00175c9d3a99c8b672aa07e6d92706a027"
}
diff --git a/packages/common/src/fs.ts b/packages/common/src/fs.ts
index 899dbb93..b8f1923d 100644
--- a/packages/common/src/fs.ts
+++ b/packages/common/src/fs.ts
@@ -1,4 +1,4 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
/*global Java, base, module, exports, require, __FILE__*/
const Path = Java.type("java.nio.file.Path");
diff --git a/packages/common/src/tgz.ts b/packages/common/src/tgz.ts
index 8c16f339..5e5426a1 100644
--- a/packages/common/src/tgz.ts
+++ b/packages/common/src/tgz.ts
@@ -1,4 +1,4 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
let Files = Java.type("java.nio.file.Files");
let Paths = Java.type("java.nio.file.Paths");
diff --git a/packages/compile/package.json b/packages/compile/package.json
index 9f487525..882c6c0c 100644
--- a/packages/compile/package.json
+++ b/packages/compile/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/compile",
+ "name": "@ccms/compile",
"version": "0.5.0",
"description": "MiaoScript compile package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
diff --git a/packages/container/package.json b/packages/container/package.json
index b2dd88b5..b26d27b0 100644
--- a/packages/container/package.json
+++ b/packages/container/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/container",
+ "name": "@ccms/container",
"version": "0.5.0",
"description": "MiaoScript container package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
diff --git a/packages/container/src/decorators.ts b/packages/container/src/decorators.ts
index 4c39d4c8..33bca190 100644
--- a/packages/container/src/decorators.ts
+++ b/packages/container/src/decorators.ts
@@ -2,7 +2,7 @@ import { interfaces, Container } from "inversify";
let _container: Container;
-const ContainerInstance = Symbol.for("@ms/ioc:Container");
+const ContainerInstance = Symbol.for("@ccms/ioc:Container");
const INJECTION = Symbol.for("INJECTION");
function _proxyGetter(
diff --git a/packages/core/package.json b/packages/core/package.json
index b99f819f..46671f2d 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/core",
+ "name": "@ccms/core",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,8 +24,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/container": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/container": "^0.5.0"
},
"gitHead": "781524f83e52cad26d7c480513e3c525df867121"
-}
+}
\ No newline at end of file
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 8a772221..622a2406 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -1,8 +1,8 @@
let containerStartTime = Date.now();
-console.i18n("ms.core.ioc.initialize");
-import { plugin, server, task, constants } from '@ms/api'
-import { DefaultContainer as container, inject, provideSingleton, ContainerInstance, buildProviderModule } from '@ms/container'
-console.i18n("ms.core.ioc.completed", { time: (Date.now() - containerStartTime) / 1000 })
+console.i18n("ms.core.ioc.initialize", { scope: global.scope });
+import { plugin, server, task, constants } from '@ccms/api'
+import { DefaultContainer as container, inject, provideSingleton, ContainerInstance, buildProviderModule } from '@ccms/container'
+console.i18n("ms.core.ioc.completed", { scope: global.scope, time: (Date.now() - containerStartTime) / 1000 })
@provideSingleton(MiaoScriptCore)
class MiaoScriptCore {
@@ -83,13 +83,13 @@ function initialize() {
container.bind(plugin.PluginInstance).toConstantValue(base.getInstance());
container.bind(plugin.PluginFolder).toConstantValue('plugins');
let type = detectServer();
- console.i18n("ms.core.initialize.detect", { type });
+ console.i18n("ms.core.initialize.detect", { scope: global.scope, type });
container.bind(server.ServerType).toConstantValue(type);
- console.i18n("ms.core.package.initialize", { type });
- require(`@ms/${type}`).default(container);
- require('@ms/plugin')
+ console.i18n("ms.core.package.initialize", { scope: global.scope, type });
+ require(`${global.scope}/${type}`).default(container);
+ require(`${global.scope}/plugin`)
container.load(buildProviderModule());
- console.i18n("ms.core.package.completed", { type, time: (Date.now() - corePackageStartTime) / 1000 });
+ console.i18n("ms.core.package.completed", { scope: global.scope, type, time: (Date.now() - corePackageStartTime) / 1000 });
let disable = container.get(MiaoScriptCore).enable()
console.i18n("ms.core.engine.completed", { time: (Date.now() - global.NashornEngineStartTime) / 1000 });
return disable;
diff --git a/packages/i18n/languages/en.yml b/packages/i18n/languages/en.yml
index ee47e53b..a1b3348d 100644
--- a/packages/i18n/languages/en.yml
+++ b/packages/i18n/languages/en.yml
@@ -1,12 +1,12 @@
ms.ployfill.initialize: "Initialization Java Nashorn ployfill. Please wait..."
ms.ployfill.completed: "Java Nashorn ployfill loading completed... Cost ({time}s)!"
-ms.core.ioc.initialize: "Initialization MiaoScript IOC Container @ms/container. Please wait..."
-ms.core.ioc.completed: "MiaoScript IOC Container @ms/container loading completed({time}s)!"
+ms.core.ioc.initialize: "Initialization MiaoScript IOC Container {scope}/container. Please wait..."
+ms.core.ioc.completed: "MiaoScript IOC Container {scope}/container loading completed({time}s)!"
ms.core.initialize.detect: "Detect Compatible Server set ServerType to {type} ..."
ms.core.initialize.error: "MiaoScript Engine Initialization Error: {error} ..."
-ms.core.package.initialize: "Initialization MiaoScript Package @ms/core @ms/{type} @ms/plugin. Please wait..."
-ms.core.package.completed: "MiaoScript Package @ms/core @ms/{type} @ms/plugin loading completed({time}s)!"
+ms.core.package.initialize: "Initialization MiaoScript Package {scope}/core {scope}/{type} {scope}/plugin. Please wait..."
+ms.core.package.completed: "MiaoScript Package {scope}/core {scope}/{type} {scope}/plugin loading completed({time}s)!"
ms.core.plugin.initialize: "Initialization MiaoScript Plugin System. Please wait..."
ms.core.plugin.completed: "MiaoScript Plugin System loading completed({time}s)!"
ms.core.engine.completed: "MiaoScript ScriptEngine loading completed... Done({time}s)!"
diff --git a/packages/i18n/languages/zh_cn.yml b/packages/i18n/languages/zh_cn.yml
index 962b2863..a03b4fc7 100644
--- a/packages/i18n/languages/zh_cn.yml
+++ b/packages/i18n/languages/zh_cn.yml
@@ -1,12 +1,12 @@
ms.ployfill.initialize: "加载 Java Nashorn 补丁. 请稍候..."
ms.ployfill.completed: "Java Nashorn 补丁 加载完成... 耗时 ({time}s)!"
-ms.core.ioc.initialize: "初始化 MiaoScript IOC 容器 @ms/container. 请稍候..."
-ms.core.ioc.completed: "MiaoScript IOC 容器 @ms/container 加载完成 耗时({time}s)"
+ms.core.ioc.initialize: "初始化 MiaoScript IOC 容器 {scope}/container. 请稍候..."
+ms.core.ioc.completed: "MiaoScript IOC 容器 {scope}/container 加载完成 耗时({time}s)"
ms.core.initialize.detect: "检测到兼容的服务器类型. 设置 ServerType 值 {type} ..."
ms.core.initialize.error: "§4MiaoScript 系统初始化失败 §c{error} ..."
-ms.core.package.initialize: "初始化 MiaoScript 扩展 @ms/core @ms/{type} @ms/plugin. 请稍候..."
-ms.core.package.completed: "MiaoScript 扩展 @ms/core @ms/{type} @ms/plugin 加载完成 耗时({time}s)"
+ms.core.package.initialize: "初始化 MiaoScript 扩展 {scope}/core {scope}/{type} {scope}/plugin. 请稍候..."
+ms.core.package.completed: "MiaoScript 扩展 {scope}/core {scope}/{type} {scope}/plugin 加载完成 耗时({time}s)"
ms.core.plugin.initialize: "MiaoScript 开始引导插件系统. 请稍候..."
ms.core.plugin.completed: "MiaoScript 插件加载完毕 耗时({time}s)!"
ms.core.engine.completed: "MiaoScript 脚本引擎 加载完毕... 耗时({time}s)!"
diff --git a/packages/i18n/package.json b/packages/i18n/package.json
index ea76bc91..4f91a58e 100644
--- a/packages/i18n/package.json
+++ b/packages/i18n/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/i18n",
+ "name": "@ccms/i18n",
"version": "0.5.0",
"description": "MiaoScript i18n package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -28,8 +25,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/nashorn": "^0.5.0",
+ "@ccms/nashorn": "^0.5.0",
"js-yaml": "^3.13.1"
},
"gitHead": "781524f83e52cad26d7c480513e3c525df867121"
-}
+}
\ No newline at end of file
diff --git a/packages/i18n/src/index.ts b/packages/i18n/src/index.ts
index 18b65b3a..1e8a8d6b 100644
--- a/packages/i18n/src/index.ts
+++ b/packages/i18n/src/index.ts
@@ -1,4 +1,4 @@
-///
+///
import * as yaml from 'js-yaml'
const File = Java.type("java.io.File");
@@ -32,9 +32,9 @@ export class Translate {
translate(name: string, param?: TranslateParam) {
let langText: string = this.langMap[name] || this.fallbackMap[name];
- if (!langText) { return '[WARN] @ms/i18n miss lang translate: ' + name }
+ if (!langText) { return '[WARN] @ccms/i18n miss lang translate: ' + name }
for (const key in param) {
- langText = langText.replace("{" + key + "}", param[key])
+ langText = langText.replace(new RegExp("{" + key + "}", 'gm'), param[key])
}
return langText;
}
diff --git a/packages/nashorn/package.json b/packages/nashorn/package.json
index 9ef4f2e5..f8d44f1a 100644
--- a/packages/nashorn/package.json
+++ b/packages/nashorn/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/nashorn",
+ "name": "@ccms/nashorn",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -13,9 +13,6 @@
"license": "ISC",
"main": "dist/index.js",
"types": "dist/index.d.ts",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,4 +24,4 @@
"rimraf": "^3.0.2",
"typescript": "^3.8.3"
}
-}
+}
\ No newline at end of file
diff --git a/packages/nashorn/src/index.ts b/packages/nashorn/src/index.ts
index 94afa162..2af33c96 100644
--- a/packages/nashorn/src/index.ts
+++ b/packages/nashorn/src/index.ts
@@ -41,6 +41,7 @@ declare global {
namespace NodeJS {
interface Global {
+ scope: string;
logger: any;
debug: boolean;
level: string;
diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json
index 9856c895..cc293bd2 100644
--- a/packages/nodejs/package.json
+++ b/packages/nodejs/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/nodejs",
+ "name": "@ccms/nodejs",
"version": "0.5.0",
"description": "MiaoScript nodejs package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,7 +24,7 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/nashorn": "^0.5.0"
+ "@ccms/nashorn": "^0.5.0"
},
"gitHead": "781524f83e52cad26d7c480513e3c525df867121"
-}
+}
\ No newline at end of file
diff --git a/packages/nodejs/src/fs/index.ts b/packages/nodejs/src/fs/index.ts
index 9608a5c0..ae86524e 100644
--- a/packages/nodejs/src/fs/index.ts
+++ b/packages/nodejs/src/fs/index.ts
@@ -1,4 +1,4 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
import { URL } from "url";
const Path = Java.type("java.nio.file.Path");
diff --git a/packages/nukkit/package.json b/packages/nukkit/package.json
index 1fe46790..28e75ce0 100644
--- a/packages/nukkit/package.json
+++ b/packages/nukkit/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/nukkit",
+ "name": "@ccms/nukkit",
"version": "0.5.0",
"description": "MiaoScript nukkit package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,8 +24,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/common": "^0.5.0",
- "@ms/container": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/common": "^0.5.0",
+ "@ccms/container": "^0.5.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/nukkit/src/command.ts b/packages/nukkit/src/command.ts
index b1e90d38..51037421 100644
--- a/packages/nukkit/src/command.ts
+++ b/packages/nukkit/src/command.ts
@@ -1,7 +1,7 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
-import { command, plugin } from '@ms/api'
-import { inject, provideSingleton, postConstruct } from '@ms/container'
+import { command, plugin } from '@ccms/api'
+import { inject, provideSingleton, postConstruct } from '@ccms/container'
let PluginCommand = Java.type('cn.nukkit.command.PluginCommand');
let CommandExecutor = Java.type('cn.nukkit.command.CommandExecutor');
diff --git a/packages/nukkit/src/console.ts b/packages/nukkit/src/console.ts
index 7c229b49..920d5cd0 100644
--- a/packages/nukkit/src/console.ts
+++ b/packages/nukkit/src/console.ts
@@ -1,4 +1,4 @@
-import { MiaoScriptConsole } from '@ms/api'
+import { MiaoScriptConsole } from '@ccms/api'
let Nukkit = base.getInstance().getServer();
let CommandSender = Java.type('cn.nukkit.command.CommandSender')
diff --git a/packages/nukkit/src/event.ts b/packages/nukkit/src/event.ts
index 3132fbba..0f8fc110 100644
--- a/packages/nukkit/src/event.ts
+++ b/packages/nukkit/src/event.ts
@@ -1,5 +1,5 @@
-import { event, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container'
+import { event, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container'
const Nukkit: cn.nukkit.Server = base.getInstance().getServer();
const Event = Java.type("cn.nukkit.event.Event");
diff --git a/packages/nukkit/src/index.ts b/packages/nukkit/src/index.ts
index 46b0e750..b826d37d 100644
--- a/packages/nukkit/src/index.ts
+++ b/packages/nukkit/src/index.ts
@@ -1,7 +1,7 @@
-///
+///
-import { server } from '@ms/api'
-import { Container } from '@ms/container'
+import { server } from '@ccms/api'
+import { Container } from '@ccms/container'
import { NukkitConsole } from './console';
import './event';
diff --git a/packages/nukkit/src/server.ts b/packages/nukkit/src/server.ts
index d88f23da..2ff77664 100644
--- a/packages/nukkit/src/server.ts
+++ b/packages/nukkit/src/server.ts
@@ -1,5 +1,5 @@
-import { server } from '@ms/api'
-import { provideSingleton } from '@ms/container';
+import { server } from '@ccms/api'
+import { provideSingleton } from '@ccms/container';
let Nukkit: cn.nukkit.Server = base.getInstance().getServer();
const File = Java.type("java.io.File");
diff --git a/packages/nukkit/src/task.ts b/packages/nukkit/src/task.ts
index 267448aa..5fe9a436 100644
--- a/packages/nukkit/src/task.ts
+++ b/packages/nukkit/src/task.ts
@@ -1,5 +1,5 @@
-import { task, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container';
+import { task, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container';
const NukkitRunnable = Java.type('cn.nukkit.scheduler.NukkitRunnable');
diff --git a/packages/ployfill/package.json b/packages/ployfill/package.json
index 1016d625..19a07c93 100644
--- a/packages/ployfill/package.json
+++ b/packages/ployfill/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/ployfill",
+ "name": "@ccms/ployfill",
"version": "0.5.0",
"description": "MiaoScript ployfill package",
"author": "MiaoWoo ",
@@ -7,9 +7,6 @@
"license": "ISC",
"main": "dist/index.js",
"types": "dist/index.d.ts",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -17,8 +14,8 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
- "@ms/i18n": "^0.5.0",
- "@ms/nashorn": "^0.5.0",
+ "@ccms/i18n": "^0.5.0",
+ "@ccms/nashorn": "^0.5.0",
"core-js": "^3.6.4"
},
"devDependencies": {
diff --git a/packages/ployfill/src/index.ts b/packages/ployfill/src/index.ts
index 5cad9f24..c1fc27e2 100644
--- a/packages/ployfill/src/index.ts
+++ b/packages/ployfill/src/index.ts
@@ -1,6 +1,6 @@
-///
+///
-import i18n from '@ms/i18n'
+import i18n from '@ccms/i18n'
let ployfillStartTime = new Date().getTime();
i18n.initialize();
console.i18n("ms.ployfill.initialize");
diff --git a/packages/ployfill/src/xml-http-request.ts b/packages/ployfill/src/xml-http-request.ts
index 2222f2c9..22d0a216 100644
--- a/packages/ployfill/src/xml-http-request.ts
+++ b/packages/ployfill/src/xml-http-request.ts
@@ -1,4 +1,4 @@
-import '@ms/nashorn'
+import '@ccms/nashorn'
const URL = Java.type("java.net.URL");
const Files = Java.type("java.nio.file.Files");
diff --git a/packages/plugin/package.json b/packages/plugin/package.json
index 043eafdb..fb1fd667 100644
--- a/packages/plugin/package.json
+++ b/packages/plugin/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/plugin",
+ "name": "@ccms/plugin",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -28,10 +25,10 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/common": "^0.5.0",
- "@ms/container": "^0.5.0",
- "@ms/i18n": "^0.5.0",
+ "@ccms/api": "^0.5.0",
+ "@ccms/common": "^0.5.0",
+ "@ccms/container": "^0.5.0",
+ "@ccms/i18n": "^0.5.0",
"js-yaml": "^3.13.1"
}
}
diff --git a/packages/plugin/src/constants.ts b/packages/plugin/src/constants.ts
index 0ee77e1f..b4eecc58 100644
--- a/packages/plugin/src/constants.ts
+++ b/packages/plugin/src/constants.ts
@@ -1,12 +1,12 @@
export const METADATA_KEY = {
- plugin: "@ms/plugin:plugin",
- cmd: "@ms/plugin:cmd",
- tab: "@ms/plugin:tab",
- listener: "@ms/plugin:listener",
- config: "@ms/plugin:config",
+ plugin: "@ccms/plugin:plugin",
+ cmd: "@ccms/plugin:cmd",
+ tab: "@ccms/plugin:tab",
+ listener: "@ccms/plugin:listener",
+ config: "@ccms/plugin:config",
stage: {
- load: "@ms/plugin:stage:load",
- enable: "@ms/plugin:stage:enable",
- disable: "@ms/plugin:stage:disable"
+ load: "@ccms/plugin:stage:load",
+ enable: "@ccms/plugin:stage:enable",
+ disable: "@ccms/plugin:stage:disable"
}
};
diff --git a/packages/plugin/src/decorators.ts b/packages/plugin/src/decorators.ts
index 5043ccdd..e262a20c 100644
--- a/packages/plugin/src/decorators.ts
+++ b/packages/plugin/src/decorators.ts
@@ -1,4 +1,4 @@
-import { injectable, decorate } from "@ms/container";
+import { injectable, decorate } from "@ccms/container";
import { interfaces } from './interfaces'
import { METADATA_KEY } from './constants'
import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata, getPluginTabCompleterMetadata, getPluginConfigMetadata, getPluginStageMetadata } from './utils'
diff --git a/packages/plugin/src/interfaces.ts b/packages/plugin/src/interfaces.ts
index 81d20c0b..7a226911 100644
--- a/packages/plugin/src/interfaces.ts
+++ b/packages/plugin/src/interfaces.ts
@@ -1,6 +1,6 @@
-import { server, MiaoScriptConsole, event } from "@ms/api";
+import { server, MiaoScriptConsole, event } from "@ccms/api";
import { METADATA_KEY } from './constants'
-import { injectable, inject, postConstruct } from "@ms/container";
+import { injectable, inject, postConstruct } from "@ccms/container";
import { getPluginMetadata } from "./utils";
export namespace interfaces {
diff --git a/packages/plugin/src/manager.ts b/packages/plugin/src/manager.ts
index 73999e44..727a5604 100644
--- a/packages/plugin/src/manager.ts
+++ b/packages/plugin/src/manager.ts
@@ -1,7 +1,7 @@
-import i18n from '@ms/i18n'
-import { plugin, server, command, event } from '@ms/api'
-import { inject, provideSingleton, Container, ContainerInstance } from '@ms/container'
-import * as fs from '@ms/common/dist/fs'
+import i18n from '@ccms/i18n'
+import { plugin, server, command, event } from '@ccms/api'
+import { inject, provideSingleton, Container, ContainerInstance } from '@ccms/container'
+import * as fs from '@ccms/common/dist/fs'
import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata, getPlugin, getPluginTabCompleterMetadata, getPluginConfigMetadata, getPluginStageMetadata } from './utils'
import { interfaces } from './interfaces'
@@ -54,6 +54,7 @@ export class PluginManagerImpl implements plugin.PluginManager {
private runPluginStage(plugin: interfaces.Plugin, stage: string, ext: Function) {
this.logStage(plugin, i18n.translate(`ms.plugin.manager.stage.${stage}`))
+ ext()
this.runCatch(plugin, stage)
this.runCatch(plugin, `${this.serverType}${stage}`)
this.execPluginStage(plugin, stage)
@@ -178,7 +179,7 @@ export class PluginManagerImpl implements plugin.PluginManager {
private createPlugin(file: string) {
//@ts-ignore
- require(file, { cache: false })
+ require(file + '', { cache: false })
}
private buildPlugins() {
diff --git a/packages/plugins/package.json b/packages/plugins/package.json
index e0f190c5..73ba4933 100644
--- a/packages/plugins/package.json
+++ b/packages/plugins/package.json
@@ -1,6 +1,6 @@
{
"private": true,
- "name": "@ms/plugins",
+ "name": "@ccms/plugins",
"version": "0.5.0",
"description": "MiaoScript plugins package",
"keywords": [
@@ -13,9 +13,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -28,8 +25,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/container": "^0.5.0",
- "@ms/plugin": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/container": "^0.5.0",
+ "@ccms/plugin": "^0.5.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/plugins/src/HelloWorld.ts b/packages/plugins/src/HelloWorld.ts
index 39dd23fa..2ecc3387 100644
--- a/packages/plugins/src/HelloWorld.ts
+++ b/packages/plugins/src/HelloWorld.ts
@@ -1,11 +1,11 @@
-///
-///
-///
-///
+///
+///
+///
+///
-import { server } from '@ms/api';
-import { inject } from '@ms/container';
-import { plugin, interfaces, cmd, listener, tab } from '@ms/plugin'
+import { server } from '@ccms/api';
+import { inject } from '@ccms/container';
+import { plugin, interfaces, cmd, listener, tab } from '@ccms/plugin'
@plugin({ name: 'HelloWorld', version: '1.0.0', author: 'MiaoWoo', source: __filename })
export class HelloWorld extends interfaces.Plugin {
diff --git a/packages/plugins/src/MiaoChat.ts b/packages/plugins/src/MiaoChat.ts
index 8cee2058..23204636 100644
--- a/packages/plugins/src/MiaoChat.ts
+++ b/packages/plugins/src/MiaoChat.ts
@@ -1,11 +1,11 @@
-///
-///
-///
+///
+///
+///
-import { server, plugin as pluginApi, channel, constants } from '@ms/api'
-import { inject, optional } from '@ms/container';
-import { plugin, interfaces, cmd, listener, tab, config, enable } from '@ms/plugin'
-import Tellraw from '@ms/common/dist/tellraw'
+import { server, plugin as pluginApi, channel, constants } from '@ccms/api'
+import { inject, optional } from '@ccms/container';
+import { plugin, interfaces, cmd, listener, tab, config, enable } from '@ccms/plugin'
+import Tellraw from '@ccms/common/dist/tellraw'
const ByteArrayInputStream = Java.type("java.io.ByteArrayInputStream");
const ByteArrayOutputStream = Java.type("java.io.ByteArrayOutputStream");
diff --git a/packages/plugins/src/MiaoConsole.ts b/packages/plugins/src/MiaoConsole.ts
index 974e2fd4..16736511 100644
--- a/packages/plugins/src/MiaoConsole.ts
+++ b/packages/plugins/src/MiaoConsole.ts
@@ -1,11 +1,11 @@
-///
-///
-///
+///
+///
+///
-import { plugin as pluginApi, server, task } from '@ms/api'
-import { plugin, interfaces, cmd } from '@ms/plugin'
-import { inject, ContainerInstance, Container } from '@ms/container'
-import io, { Server as SocketIOServer, Socket as SocketIOSocket } from '@ms/websocket'
+import { plugin as pluginApi, server, task } from '@ccms/api'
+import { plugin, interfaces, cmd } from '@ccms/plugin'
+import { inject, ContainerInstance, Container } from '@ccms/container'
+import io, { Server as SocketIOServer, Socket as SocketIOSocket } from '@ccms/websocket'
const suffixMap = {
ts: 'typescript',
@@ -101,7 +101,7 @@ export class MiaoConsole extends interfaces.Plugin {
private runCode(code: string, namespace: any, client: any) {
let tfunc = new Function('namespace', 'client', `
- var reflect = require('@ms/common/dist/reflect');
+ var reflect = require('@ccms/common/dist/reflect');
var tempconcent = '';
function print(text) {
tempconcent += text + "\\n"
diff --git a/packages/plugins/src/MiaoPluginManager.ts b/packages/plugins/src/MiaoPluginManager.ts
index 07d0a6a7..b1fa5faa 100644
--- a/packages/plugins/src/MiaoPluginManager.ts
+++ b/packages/plugins/src/MiaoPluginManager.ts
@@ -1,11 +1,11 @@
-///
+///
-import { task, server } from "@ms/api";
-import { inject } from "@ms/container";
-import { plugin, interfaces, cmd } from "@ms/plugin";
+import { task, server } from "@ccms/api";
+import { inject } from "@ccms/container";
+import { plugin, interfaces, cmd } from "@ccms/plugin";
-import http from '@ms/common/dist/http'
-import * as fs from '@ms/common/dist/fs'
+import http from '@ccms/common/dist/http'
+import * as fs from '@ccms/common/dist/fs'
@plugin({ name: 'MiaoPluginManager', prefix: 'MPM', version: '1.0.0', author: 'MiaoWoo', source: __filename })
export class MiaoPluginManager extends interfaces.Plugin {
diff --git a/packages/plugins/src/MiaoScriptPackageManager.ts b/packages/plugins/src/MiaoScriptPackageManager.ts
index 92c94b3a..0e172643 100644
--- a/packages/plugins/src/MiaoScriptPackageManager.ts
+++ b/packages/plugins/src/MiaoScriptPackageManager.ts
@@ -1,11 +1,11 @@
-import { plugin as pluginApi, task, server } from '@ms/api'
+import { plugin as pluginApi, task, server } from '@ccms/api'
-import { Translate } from '@ms/i18n'
-import { inject } from '@ms/container';
-import { interfaces, plugin, cmd, tab } from '@ms/plugin'
+import { Translate } from '@ccms/i18n'
+import { inject } from '@ccms/container';
+import { interfaces, plugin, cmd, tab } from '@ccms/plugin'
-import * as fs from '@ms/common/dist/fs'
-import http from '@ms/common/dist/http'
+import * as fs from '@ccms/common/dist/fs'
+import http from '@ccms/common/dist/http'
let help = [
'§6========= §6[§aMiaoScriptPackageManager§6] 帮助 §aBy §b喵♂呜 §6=========',
diff --git a/packages/plugins/src/Test.ts b/packages/plugins/src/Test.ts
index cfaf2641..18a0a173 100644
--- a/packages/plugins/src/Test.ts
+++ b/packages/plugins/src/Test.ts
@@ -1,9 +1,9 @@
-import { plugin as pluginApi } from '@ms/api'
-import { plugin, interfaces, cmd, listener, tab } from '@ms/plugin'
-import { inject } from '@ms/container';
+import { plugin as pluginApi } from '@ccms/api'
+import { plugin, interfaces, cmd, listener, tab } from '@ccms/plugin'
+import { inject } from '@ccms/container';
-import * as reflect from '@ms/common/dist/reflect';
-import http from '@ms/common/dist/http';
+import * as reflect from '@ccms/common/dist/reflect';
+import http from '@ccms/common/dist/http';
@plugin({ name: 'Test', version: '1.0.0', author: 'MiaoWoo', source: __filename })
export class Test extends interfaces.Plugin {
diff --git a/packages/sponge/package.json b/packages/sponge/package.json
index 7eebbca5..c228e938 100644
--- a/packages/sponge/package.json
+++ b/packages/sponge/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/sponge",
+ "name": "@ccms/sponge",
"version": "0.5.0",
"description": "MiaoScript api package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,8 +24,8 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/api": "^0.5.0",
- "@ms/common": "^0.5.0",
- "@ms/container": "^0.5.0"
+ "@ccms/api": "^0.5.0",
+ "@ccms/common": "^0.5.0",
+ "@ccms/container": "^0.5.0"
}
}
diff --git a/packages/sponge/src/channel.ts b/packages/sponge/src/channel.ts
index c4f1f3b5..95cdf94b 100644
--- a/packages/sponge/src/channel.ts
+++ b/packages/sponge/src/channel.ts
@@ -1,5 +1,5 @@
-import { channel, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container'
+import { channel, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container'
const Sponge = org.spongepowered.api.Sponge
const RawDataListener = Java.type("org.spongepowered.api.network.RawDataListener")
diff --git a/packages/sponge/src/command.ts b/packages/sponge/src/command.ts
index b3fc4fad..d21e4b58 100644
--- a/packages/sponge/src/command.ts
+++ b/packages/sponge/src/command.ts
@@ -1,5 +1,5 @@
-import { command, plugin } from "@ms/api";
-import { inject, provideSingleton } from "@ms/container";
+import { command, plugin } from "@ccms/api";
+import { inject, provideSingleton } from "@ccms/container";
let Sponge = Java.type('org.spongepowered.api.Sponge');
let Text = Java.type('org.spongepowered.api.text.Text');
diff --git a/packages/sponge/src/console.ts b/packages/sponge/src/console.ts
index ee0e846d..02b4679d 100644
--- a/packages/sponge/src/console.ts
+++ b/packages/sponge/src/console.ts
@@ -1,5 +1,5 @@
-import '@ms/nashorn'
-import { MiaoScriptConsole } from '@ms/api'
+import '@ccms/nashorn'
+import { MiaoScriptConsole } from '@ccms/api'
let Sponge = Java.type('org.spongepowered.api.Sponge');
var Text = Java.type('org.spongepowered.api.text.Text');
diff --git a/packages/sponge/src/event.ts b/packages/sponge/src/event.ts
index bb26a8a7..67c55f03 100644
--- a/packages/sponge/src/event.ts
+++ b/packages/sponge/src/event.ts
@@ -1,5 +1,5 @@
-import { event, plugin } from '@ms/api'
-import { inject, provideSingleton } from '@ms/container';
+import { event, plugin } from '@ccms/api'
+import { inject, provideSingleton } from '@ccms/container';
let Modifier = Java.type("java.lang.reflect.Modifier");
let Order = Java.type("org.spongepowered.api.event.Order");
diff --git a/packages/sponge/src/index.ts b/packages/sponge/src/index.ts
index 0b536975..eb6c4eda 100644
--- a/packages/sponge/src/index.ts
+++ b/packages/sponge/src/index.ts
@@ -1,7 +1,7 @@
-///
+///
-import { server } from '@ms/api'
-import { Container } from '@ms/container'
+import { server } from '@ccms/api'
+import { Container } from '@ccms/container'
import { SpongeConsole } from './console';
import './event';
diff --git a/packages/sponge/src/server.ts b/packages/sponge/src/server.ts
index 04f64c3c..7cf966c3 100644
--- a/packages/sponge/src/server.ts
+++ b/packages/sponge/src/server.ts
@@ -1,7 +1,7 @@
-import { server, constants } from '@ms/api'
-import { provideSingleton } from '@ms/container';
+import { server, constants } from '@ccms/api'
+import { provideSingleton } from '@ccms/container';
-import * as reflect from '@ms/common/dist/reflect'
+import * as reflect from '@ccms/common/dist/reflect'
const Sponge = org.spongepowered.api.Sponge;
const TextSerializers = org.spongepowered.api.text.serializer.TextSerializers;
diff --git a/packages/sponge/src/task.ts b/packages/sponge/src/task.ts
index f0d1f18d..42b6870b 100644
--- a/packages/sponge/src/task.ts
+++ b/packages/sponge/src/task.ts
@@ -1,5 +1,5 @@
-import { task, plugin } from '@ms/api'
-import { inject, provideSingleton, postConstruct } from '@ms/container';
+import { task, plugin } from '@ccms/api'
+import { inject, provideSingleton, postConstruct } from '@ccms/container';
const Sponge = Java.type("org.spongepowered.api.Sponge");
const Task = Java.type("org.spongepowered.api.scheduler.Task");
diff --git a/packages/websocket/package.json b/packages/websocket/package.json
index d5daebf0..f6a90b51 100644
--- a/packages/websocket/package.json
+++ b/packages/websocket/package.json
@@ -1,5 +1,5 @@
{
- "name": "@ms/websocket",
+ "name": "@ccms/websocket",
"version": "0.5.0",
"description": "MiaoScript websocket package",
"keywords": [
@@ -12,9 +12,6 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
- "publishConfig": {
- "registry": "https://repo.yumc.pw/repository/npm-hosted/"
- },
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
@@ -27,6 +24,6 @@
"typescript": "^3.8.3"
},
"dependencies": {
- "@ms/nashorn": "^0.5.0"
+ "@ccms/nashorn": "^0.5.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/websocket/src/index.ts b/packages/websocket/src/index.ts
index 2eb86435..8adb8698 100644
--- a/packages/websocket/src/index.ts
+++ b/packages/websocket/src/index.ts
@@ -1,4 +1,4 @@
-///
+///
import { Server, ServerOptions } from './socket-io'
@@ -41,6 +41,6 @@ type SocketStatic = SocketIOStatic & { Instance?: symbol }
let io: SocketStatic = function (pipeline: any, options: ServerOptions) {
return new Server(pipeline, options)
}
-io.Instance = Symbol("@ms/websocket")
+io.Instance = Symbol("@ccms/websocket")
export default io
export * from './socket-io'