@xiaoguomeiyitian/core 1.3.8 → 2.0.0

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/README.md CHANGED
@@ -20,9 +20,9 @@
20
20
 
21
21
  ## cli
22
22
 
23
- * core dbg 在线调试
24
- * core defs 生成类型定义
25
- * core func 生成调用函数列表
23
+ * core defs 生成类型定义
24
+ * core func 生成调用函数列表
25
+ * core bytenode path 生成jsc文件
26
26
 
27
27
  ## 实体定义示例
28
28
 
package/dist/cli.js CHANGED
@@ -14,3 +14,8 @@ if (cmd == "func") {
14
14
  gen.gen("./src/rpc/serviceProto.ts", "./src/rpc/serviceFunc.ts", ["rpc"]);
15
15
  gen.gen("./src/shared/protocols/serviceProto.ts", "./src/shared/protocols/serviceFunc.ts", ["client", "server"]);
16
16
  }
17
+ //生成字节码
18
+ if (cmd == "bytenode") {
19
+ const gen = new index_1.BytenodeMgr();
20
+ gen.gen(process.argv[3]);
21
+ }
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GenServiceFunc = exports.GenEntityDefs = exports.Entity = exports.Global = void 0;
6
+ exports.BytenodeMgr = exports.GenServiceFunc = exports.GenEntityDefs = exports.Entity = exports.Global = void 0;
7
7
  require("bytenode");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
@@ -15,4 +15,4 @@ if (fs_1.default.existsSync(path_1.default.resolve(process.cwd(), './core'))) {
15
15
  else {
16
16
  lib = require("./lib_" + process.platform + '_' + process.versions.node.split('.')[0] + '.jsc');
17
17
  }
18
- exports.Global = lib.Global, exports.Entity = lib.Entity, exports.GenEntityDefs = lib.GenEntityDefs, exports.GenServiceFunc = lib.GenServiceFunc;
18
+ exports.Global = lib.Global, exports.Entity = lib.Entity, exports.GenEntityDefs = lib.GenEntityDefs, exports.GenServiceFunc = lib.GenServiceFunc, exports.BytenodeMgr = lib.BytenodeMgr;
Binary file
Binary file
Binary file
Binary file
Binary file
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.3.8",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "types/lib.d.ts",
6
6
  "bin": {
@@ -23,12 +23,12 @@
23
23
  "bundleDependencies": [],
24
24
  "devDependencies": {
25
25
  "@types/node": "^22.14.1",
26
- "typescript": "^5.9.2"
26
+ "typescript": "^5.9.3"
27
27
  },
28
28
  "dependencies": {
29
29
  "@xiaoguomeiyitian/utils": "^0.1.3",
30
30
  "bytenode": "^1.5.7",
31
31
  "classic-level": "^3.0.0",
32
- "tsrpc": "^3.4.19"
32
+ "tsrpc": "^3.4.21"
33
33
  }
34
34
  }
package/types/lib.d.ts CHANGED
@@ -102,3 +102,6 @@ export declare class GenEntityDefs {
102
102
  export declare class GenServiceFunc {
103
103
  gen(fReadPath: string, fWritePath: string, types: string[]): void;
104
104
  }
105
+ export declare class BytenodeMgr {
106
+ gen(filePath: string): void;
107
+ }