@xiaoguomeiyitian/core 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -4,9 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- require("bytenode");
8
7
  const path_1 = __importDefault(require("path"));
9
- const { Global, copyDir, delFiles, GenEntityDefs, GenServiceFunc } = require("./lib_" + process.platform + '_' + process.versions.node.split('.')[0] + '.jsc');
8
+ const index_1 = require("./index");
10
9
  // 获取当前工作目录
11
10
  const cwd = process.cwd();
12
11
  const cmd = process.argv[2];
@@ -14,25 +13,25 @@ const cmd = process.argv[2];
14
13
  if (cmd == "copy") {
15
14
  const sourceDir = path_1.default.resolve(cwd, process.argv[3]); // 源目录
16
15
  const destDir = path_1.default.resolve(cwd, process.argv[4]); // 目标目录
17
- copyDir(sourceDir, destDir);
16
+ (0, index_1.copyDir)(sourceDir, destDir);
18
17
  }
19
- //删除文件或者目录
18
+ //删除文件或目录
20
19
  if (cmd == "del") {
21
20
  const targetDir = path_1.default.resolve(cwd, process.argv[3]); // 目标目录
22
- delFiles(targetDir, process.argv.splice(4, process.argv.length));
21
+ (0, index_1.delFiles)(targetDir, process.argv.splice(4, process.argv.length));
23
22
  }
24
23
  //调试
25
24
  if (cmd == "dbg") {
26
25
  process.argv = [process.argv[0], process.argv[1], process.argv[2], "-autoDeBug", "1", "-serverType", process.argv[3], "-rpcPort", process.argv[4]];
27
- global.G = new Global();
26
+ global.G = new index_1.Global();
28
27
  }
29
28
  //生成EntityDefs
30
29
  if (cmd == "defs") {
31
- new GenEntityDefs().gen("./src/shared/protocols/entityDefs.ts");
30
+ new index_1.GenEntityDefs().gen("./src/shared/protocols/entityDefs.ts");
32
31
  }
33
32
  //生成ServiceFunc
34
33
  if (cmd == "func") {
35
- const gen = new GenServiceFunc();
34
+ const gen = new index_1.GenServiceFunc();
36
35
  gen.gen("./src/rpc/serviceProto.ts", "./src/rpc/serviceFunc.ts", ["rpc"]);
37
36
  gen.gen("./src/shared/protocols/serviceProto.ts", "./src/shared/protocols/serviceFunc.ts", ["client", "server"]);
38
37
  }
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaoguomeiyitian/core",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "types/lib.d.ts",
6
6
  "bin": {