@lsby/net-core 0.0.10 → 0.0.11

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.
@@ -0,0 +1,147 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+
26
+ // src/bin/gen-list/bin.ts
27
+ var import_node_path2 = __toESM(require("path"), 1);
28
+ var import_commander = require("commander");
29
+
30
+ // src/bin/gen-list/index.ts
31
+ var import_node_fs = __toESM(require("fs"), 1);
32
+ var import_node_path = __toESM(require("path"), 1);
33
+ var import_typescript = __toESM(require("typescript"), 1);
34
+ var import_ts_fp_data2 = require("@lsby/ts-fp-data");
35
+
36
+ // src/tools/log.ts
37
+ var import_debug = __toESM(require("debug"), 1);
38
+ var import_ts_fp_data = require("@lsby/ts-fp-data");
39
+ var Log = class _Log {
40
+ constructor(fileName) {
41
+ this.fileName = fileName;
42
+ this.debugObj = (0, import_debug.default)(fileName);
43
+ this._info = this.debugObj.extend("info");
44
+ this._debug = this.debugObj.extend("debug");
45
+ this._err = this.debugObj.extend("err");
46
+ }
47
+ debugObj;
48
+ _info;
49
+ _debug;
50
+ _err;
51
+ extend(name) {
52
+ return new _Log(`${this.fileName}:${name}`);
53
+ }
54
+ info(formatter, ...args) {
55
+ return new import_ts_fp_data.Task(async () => {
56
+ this._info(formatter, ...args);
57
+ });
58
+ }
59
+ debug(formatter, ...args) {
60
+ return new import_ts_fp_data.Task(async () => {
61
+ this._debug(formatter, ...args);
62
+ });
63
+ }
64
+ err(formatter, ...args) {
65
+ return new import_ts_fp_data.Task(async () => {
66
+ this._err(formatter, ...args);
67
+ });
68
+ }
69
+ };
70
+
71
+ // src/bin/gen-list/index.ts
72
+ function main(tsconfigPath, interfaceFolderPath, outFilePath) {
73
+ return new import_ts_fp_data2.Task(async () => {
74
+ var log = new Log("@lsby:net-core").extend("gen-list");
75
+ const \u9879\u76EE\u6839\u8DEF\u5F84 = import_node_path.default.dirname(tsconfigPath);
76
+ const tsconfigJson = import_typescript.default.parseConfigFileTextToJson(tsconfigPath, import_node_fs.default.readFileSync(tsconfigPath, "utf8"));
77
+ if (tsconfigJson.error) {
78
+ throw new Error("\u65E0\u6CD5\u89E3\u6790 tsconfig.json");
79
+ }
80
+ const parsedTsconfig = import_typescript.default.parseJsonConfigFileContent(tsconfigJson.config, import_typescript.default.sys, import_node_path.default.resolve(tsconfigPath, ".."));
81
+ await log.debug("\u6210\u529F\u89E3\u6790 tsconfig \u6587\u4EF6...").run();
82
+ const projectHost = import_typescript.default.createCompilerHost(parsedTsconfig.options);
83
+ const project = import_typescript.default.createProgram(parsedTsconfig.fileNames, parsedTsconfig.options, projectHost);
84
+ await log.debug("\u6210\u529F\u8BFB\u53D6\u9879\u76EE...").run();
85
+ const _check = project.getTypeChecker();
86
+ const \u6240\u6709\u6E90\u6587\u4EF6 = project.getSourceFiles();
87
+ const \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
88
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*type.ts`).test(
89
+ import_node_path.default.resolve(sourceFile.fileName)
90
+ );
91
+ });
92
+ const \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
93
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*index.ts`).test(
94
+ import_node_path.default.resolve(sourceFile.fileName)
95
+ );
96
+ });
97
+ await log.debug("\u627E\u5230 %o \u4E2A\u63A5\u53E3", \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC.length).run();
98
+ const \u5F15\u5165\u533A = [];
99
+ const \u4EE3\u7801\u533A = [];
100
+ for (var i = 0; i < \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length; i++) {
101
+ var \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 = \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC[i];
102
+ if (\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 == null)
103
+ throw new Error("\u975E\u9884\u671F\u7684\u6570\u7EC4\u8D8A\u754C");
104
+ const filenameRelativeToApiFolder = import_node_path.default.relative(interfaceFolderPath, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/");
105
+ const importName = filenameRelativeToApiFolder.replaceAll("/", "_").replaceAll(".ts", "").replaceAll("./", "").replaceAll("-", "_");
106
+ const filenameRelativeToProjectRoot = import_node_path.default.relative(\u9879\u76EE\u6839\u8DEF\u5F84, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/").replaceAll(".ts", "");
107
+ const outputFolderRelativeToProjectRoot = import_node_path.default.relative(import_node_path.default.dirname(outFilePath), \u9879\u76EE\u6839\u8DEF\u5F84).replaceAll("\\", "/");
108
+ const importPath = import_node_path.default.join(outputFolderRelativeToProjectRoot, filenameRelativeToProjectRoot).replaceAll("\\", "/");
109
+ await log.info(`\u5904\u7406\uFF08${i + 1} / ${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length}\uFF09\uFF1A${filenameRelativeToApiFolder}`).run();
110
+ for (const node of \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.statements) {
111
+ if (import_typescript.default.isExportAssignment(node) && node.isExportEquals === void 0) {
112
+ const expression = node.expression;
113
+ if (import_typescript.default.isNewExpression(expression) && expression.expression.getText() === "\u63A5\u53E3") {
114
+ break;
115
+ }
116
+ throw new Error(`${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName}\uFF1A\u9ED8\u8BA4\u5BFC\u51FA\u4E0D\u662F \u63A5\u53E3`);
117
+ }
118
+ }
119
+ \u5F15\u5165\u533A.push(`import * as ${importName} from '${importPath}'`);
120
+ \u4EE3\u7801\u533A.push(`${importName}.default`);
121
+ }
122
+ const finalTestFile = [
123
+ // ..
124
+ `import { \u4EFB\u610F\u63A5\u53E3 } from '@lsby/net-core'`,
125
+ "",
126
+ ...\u5F15\u5165\u533A,
127
+ "",
128
+ `export var interfaceList: \u4EFB\u610F\u63A5\u53E3[] = [${\u4EE3\u7801\u533A.join(",")}]`,
129
+ ""
130
+ ].join("\n");
131
+ var outDir = import_node_path.default.dirname(outFilePath);
132
+ if (!(0, import_node_fs.existsSync)(outDir)) {
133
+ (0, import_node_fs.mkdirSync)(outDir, { recursive: true });
134
+ }
135
+ (0, import_node_fs.writeFileSync)(outFilePath, finalTestFile);
136
+ }).run();
137
+ }
138
+
139
+ // src/bin/gen-list/bin.ts
140
+ var program = new import_commander.Command();
141
+ program.name("\u751F\u6210\u6D4B\u8BD5\u6587\u4EF6").argument("<tsconfigPath>", "tsconfig\u6587\u4EF6\u8DEF\u5F84").argument("<interfaceFolderPath>", "\u63A5\u53E3\u6587\u4EF6\u5939\u8DEF\u5F84").argument("<outFilePath>", "\u8F93\u51FA\u6587\u4EF6\u8DEF\u5F84").action(async (tsconfigPath, interfaceFolderPath, outFilePath) => {
142
+ const absoluteTsconfigPath = import_node_path2.default.resolve(tsconfigPath);
143
+ const absoluteApiFolderPath = import_node_path2.default.resolve(interfaceFolderPath);
144
+ const absoluteOutputPath = import_node_path2.default.resolve(outFilePath);
145
+ await main(absoluteTsconfigPath, absoluteApiFolderPath, absoluteOutputPath);
146
+ });
147
+ program.parse(process.argv);
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/bin/gen-list/index.ts
31
+ var gen_list_exports = {};
32
+ __export(gen_list_exports, {
33
+ main: () => main
34
+ });
35
+ module.exports = __toCommonJS(gen_list_exports);
36
+ var import_node_fs = __toESM(require("fs"), 1);
37
+ var import_node_path = __toESM(require("path"), 1);
38
+ var import_typescript = __toESM(require("typescript"), 1);
39
+ var import_ts_fp_data2 = require("@lsby/ts-fp-data");
40
+
41
+ // src/tools/log.ts
42
+ var import_debug = __toESM(require("debug"), 1);
43
+ var import_ts_fp_data = require("@lsby/ts-fp-data");
44
+ var Log = class _Log {
45
+ constructor(fileName) {
46
+ this.fileName = fileName;
47
+ this.debugObj = (0, import_debug.default)(fileName);
48
+ this._info = this.debugObj.extend("info");
49
+ this._debug = this.debugObj.extend("debug");
50
+ this._err = this.debugObj.extend("err");
51
+ }
52
+ debugObj;
53
+ _info;
54
+ _debug;
55
+ _err;
56
+ extend(name) {
57
+ return new _Log(`${this.fileName}:${name}`);
58
+ }
59
+ info(formatter, ...args) {
60
+ return new import_ts_fp_data.Task(async () => {
61
+ this._info(formatter, ...args);
62
+ });
63
+ }
64
+ debug(formatter, ...args) {
65
+ return new import_ts_fp_data.Task(async () => {
66
+ this._debug(formatter, ...args);
67
+ });
68
+ }
69
+ err(formatter, ...args) {
70
+ return new import_ts_fp_data.Task(async () => {
71
+ this._err(formatter, ...args);
72
+ });
73
+ }
74
+ };
75
+
76
+ // src/bin/gen-list/index.ts
77
+ function main(tsconfigPath, interfaceFolderPath, outFilePath) {
78
+ return new import_ts_fp_data2.Task(async () => {
79
+ var log = new Log("@lsby:net-core").extend("gen-list");
80
+ const \u9879\u76EE\u6839\u8DEF\u5F84 = import_node_path.default.dirname(tsconfigPath);
81
+ const tsconfigJson = import_typescript.default.parseConfigFileTextToJson(tsconfigPath, import_node_fs.default.readFileSync(tsconfigPath, "utf8"));
82
+ if (tsconfigJson.error) {
83
+ throw new Error("\u65E0\u6CD5\u89E3\u6790 tsconfig.json");
84
+ }
85
+ const parsedTsconfig = import_typescript.default.parseJsonConfigFileContent(tsconfigJson.config, import_typescript.default.sys, import_node_path.default.resolve(tsconfigPath, ".."));
86
+ await log.debug("\u6210\u529F\u89E3\u6790 tsconfig \u6587\u4EF6...").run();
87
+ const projectHost = import_typescript.default.createCompilerHost(parsedTsconfig.options);
88
+ const project = import_typescript.default.createProgram(parsedTsconfig.fileNames, parsedTsconfig.options, projectHost);
89
+ await log.debug("\u6210\u529F\u8BFB\u53D6\u9879\u76EE...").run();
90
+ const _check = project.getTypeChecker();
91
+ const \u6240\u6709\u6E90\u6587\u4EF6 = project.getSourceFiles();
92
+ const \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
93
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*type.ts`).test(
94
+ import_node_path.default.resolve(sourceFile.fileName)
95
+ );
96
+ });
97
+ const \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
98
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*index.ts`).test(
99
+ import_node_path.default.resolve(sourceFile.fileName)
100
+ );
101
+ });
102
+ await log.debug("\u627E\u5230 %o \u4E2A\u63A5\u53E3", \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC.length).run();
103
+ const \u5F15\u5165\u533A = [];
104
+ const \u4EE3\u7801\u533A = [];
105
+ for (var i = 0; i < \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length; i++) {
106
+ var \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 = \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC[i];
107
+ if (\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 == null)
108
+ throw new Error("\u975E\u9884\u671F\u7684\u6570\u7EC4\u8D8A\u754C");
109
+ const filenameRelativeToApiFolder = import_node_path.default.relative(interfaceFolderPath, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/");
110
+ const importName = filenameRelativeToApiFolder.replaceAll("/", "_").replaceAll(".ts", "").replaceAll("./", "").replaceAll("-", "_");
111
+ const filenameRelativeToProjectRoot = import_node_path.default.relative(\u9879\u76EE\u6839\u8DEF\u5F84, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/").replaceAll(".ts", "");
112
+ const outputFolderRelativeToProjectRoot = import_node_path.default.relative(import_node_path.default.dirname(outFilePath), \u9879\u76EE\u6839\u8DEF\u5F84).replaceAll("\\", "/");
113
+ const importPath = import_node_path.default.join(outputFolderRelativeToProjectRoot, filenameRelativeToProjectRoot).replaceAll("\\", "/");
114
+ await log.info(`\u5904\u7406\uFF08${i + 1} / ${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length}\uFF09\uFF1A${filenameRelativeToApiFolder}`).run();
115
+ for (const node of \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.statements) {
116
+ if (import_typescript.default.isExportAssignment(node) && node.isExportEquals === void 0) {
117
+ const expression = node.expression;
118
+ if (import_typescript.default.isNewExpression(expression) && expression.expression.getText() === "\u63A5\u53E3") {
119
+ break;
120
+ }
121
+ throw new Error(`${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName}\uFF1A\u9ED8\u8BA4\u5BFC\u51FA\u4E0D\u662F \u63A5\u53E3`);
122
+ }
123
+ }
124
+ \u5F15\u5165\u533A.push(`import * as ${importName} from '${importPath}'`);
125
+ \u4EE3\u7801\u533A.push(`${importName}.default`);
126
+ }
127
+ const finalTestFile = [
128
+ // ..
129
+ `import { \u4EFB\u610F\u63A5\u53E3 } from '@lsby/net-core'`,
130
+ "",
131
+ ...\u5F15\u5165\u533A,
132
+ "",
133
+ `export var interfaceList: \u4EFB\u610F\u63A5\u53E3[] = [${\u4EE3\u7801\u533A.join(",")}]`,
134
+ ""
135
+ ].join("\n");
136
+ var outDir = import_node_path.default.dirname(outFilePath);
137
+ if (!(0, import_node_fs.existsSync)(outDir)) {
138
+ (0, import_node_fs.mkdirSync)(outDir, { recursive: true });
139
+ }
140
+ (0, import_node_fs.writeFileSync)(outFilePath, finalTestFile);
141
+ }).run();
142
+ }
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ main
146
+ });
@@ -0,0 +1,3 @@
1
+ declare function main(tsconfigPath: string, interfaceFolderPath: string, outFilePath: string): Promise<void>;
2
+
3
+ export { main };
@@ -0,0 +1,147 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+
26
+ // src/bin/gen-list/bin.ts
27
+ var import_node_path2 = __toESM(require("path"), 1);
28
+ var import_commander = require("commander");
29
+
30
+ // src/bin/gen-list/index.ts
31
+ var import_node_fs = __toESM(require("fs"), 1);
32
+ var import_node_path = __toESM(require("path"), 1);
33
+ var import_typescript = __toESM(require("typescript"), 1);
34
+ var import_ts_fp_data2 = require("@lsby/ts-fp-data");
35
+
36
+ // src/tools/log.ts
37
+ var import_debug = __toESM(require("debug"), 1);
38
+ var import_ts_fp_data = require("@lsby/ts-fp-data");
39
+ var Log = class _Log {
40
+ constructor(fileName) {
41
+ this.fileName = fileName;
42
+ this.debugObj = (0, import_debug.default)(fileName);
43
+ this._info = this.debugObj.extend("info");
44
+ this._debug = this.debugObj.extend("debug");
45
+ this._err = this.debugObj.extend("err");
46
+ }
47
+ debugObj;
48
+ _info;
49
+ _debug;
50
+ _err;
51
+ extend(name) {
52
+ return new _Log(`${this.fileName}:${name}`);
53
+ }
54
+ info(formatter, ...args) {
55
+ return new import_ts_fp_data.Task(async () => {
56
+ this._info(formatter, ...args);
57
+ });
58
+ }
59
+ debug(formatter, ...args) {
60
+ return new import_ts_fp_data.Task(async () => {
61
+ this._debug(formatter, ...args);
62
+ });
63
+ }
64
+ err(formatter, ...args) {
65
+ return new import_ts_fp_data.Task(async () => {
66
+ this._err(formatter, ...args);
67
+ });
68
+ }
69
+ };
70
+
71
+ // src/bin/gen-list/index.ts
72
+ function main(tsconfigPath, interfaceFolderPath, outFilePath) {
73
+ return new import_ts_fp_data2.Task(async () => {
74
+ var log = new Log("@lsby:net-core").extend("gen-list");
75
+ const \u9879\u76EE\u6839\u8DEF\u5F84 = import_node_path.default.dirname(tsconfigPath);
76
+ const tsconfigJson = import_typescript.default.parseConfigFileTextToJson(tsconfigPath, import_node_fs.default.readFileSync(tsconfigPath, "utf8"));
77
+ if (tsconfigJson.error) {
78
+ throw new Error("\u65E0\u6CD5\u89E3\u6790 tsconfig.json");
79
+ }
80
+ const parsedTsconfig = import_typescript.default.parseJsonConfigFileContent(tsconfigJson.config, import_typescript.default.sys, import_node_path.default.resolve(tsconfigPath, ".."));
81
+ await log.debug("\u6210\u529F\u89E3\u6790 tsconfig \u6587\u4EF6...").run();
82
+ const projectHost = import_typescript.default.createCompilerHost(parsedTsconfig.options);
83
+ const project = import_typescript.default.createProgram(parsedTsconfig.fileNames, parsedTsconfig.options, projectHost);
84
+ await log.debug("\u6210\u529F\u8BFB\u53D6\u9879\u76EE...").run();
85
+ const _check = project.getTypeChecker();
86
+ const \u6240\u6709\u6E90\u6587\u4EF6 = project.getSourceFiles();
87
+ const \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
88
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*type.ts`).test(
89
+ import_node_path.default.resolve(sourceFile.fileName)
90
+ );
91
+ });
92
+ const \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
93
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*index.ts`).test(
94
+ import_node_path.default.resolve(sourceFile.fileName)
95
+ );
96
+ });
97
+ await log.debug("\u627E\u5230 %o \u4E2A\u63A5\u53E3", \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC.length).run();
98
+ const \u5F15\u5165\u533A = [];
99
+ const \u4EE3\u7801\u533A = [];
100
+ for (var i = 0; i < \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length; i++) {
101
+ var \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 = \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC[i];
102
+ if (\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 == null)
103
+ throw new Error("\u975E\u9884\u671F\u7684\u6570\u7EC4\u8D8A\u754C");
104
+ const filenameRelativeToApiFolder = import_node_path.default.relative(interfaceFolderPath, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/");
105
+ const importName = filenameRelativeToApiFolder.replaceAll("/", "_").replaceAll(".ts", "").replaceAll("./", "").replaceAll("-", "_");
106
+ const filenameRelativeToProjectRoot = import_node_path.default.relative(\u9879\u76EE\u6839\u8DEF\u5F84, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/").replaceAll(".ts", "");
107
+ const outputFolderRelativeToProjectRoot = import_node_path.default.relative(import_node_path.default.dirname(outFilePath), \u9879\u76EE\u6839\u8DEF\u5F84).replaceAll("\\", "/");
108
+ const importPath = import_node_path.default.join(outputFolderRelativeToProjectRoot, filenameRelativeToProjectRoot).replaceAll("\\", "/");
109
+ await log.info(`\u5904\u7406\uFF08${i + 1} / ${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length}\uFF09\uFF1A${filenameRelativeToApiFolder}`).run();
110
+ for (const node of \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.statements) {
111
+ if (import_typescript.default.isExportAssignment(node) && node.isExportEquals === void 0) {
112
+ const expression = node.expression;
113
+ if (import_typescript.default.isNewExpression(expression) && expression.expression.getText() === "\u63A5\u53E3") {
114
+ break;
115
+ }
116
+ throw new Error(`${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName}\uFF1A\u9ED8\u8BA4\u5BFC\u51FA\u4E0D\u662F \u63A5\u53E3`);
117
+ }
118
+ }
119
+ \u5F15\u5165\u533A.push(`import * as ${importName} from '${importPath}'`);
120
+ \u4EE3\u7801\u533A.push(`${importName}.default`);
121
+ }
122
+ const finalTestFile = [
123
+ // ..
124
+ `import { \u4EFB\u610F\u63A5\u53E3 } from '@lsby/net-core'`,
125
+ "",
126
+ ...\u5F15\u5165\u533A,
127
+ "",
128
+ `export var interfaceList: \u4EFB\u610F\u63A5\u53E3[] = [${\u4EE3\u7801\u533A.join(",")}]`,
129
+ ""
130
+ ].join("\n");
131
+ var outDir = import_node_path.default.dirname(outFilePath);
132
+ if (!(0, import_node_fs.existsSync)(outDir)) {
133
+ (0, import_node_fs.mkdirSync)(outDir, { recursive: true });
134
+ }
135
+ (0, import_node_fs.writeFileSync)(outFilePath, finalTestFile);
136
+ }).run();
137
+ }
138
+
139
+ // src/bin/gen-list/bin.ts
140
+ var program = new import_commander.Command();
141
+ program.name("\u751F\u6210\u6D4B\u8BD5\u6587\u4EF6").argument("<tsconfigPath>", "tsconfig\u6587\u4EF6\u8DEF\u5F84").argument("<interfaceFolderPath>", "\u63A5\u53E3\u6587\u4EF6\u5939\u8DEF\u5F84").argument("<outFilePath>", "\u8F93\u51FA\u6587\u4EF6\u8DEF\u5F84").action(async (tsconfigPath, interfaceFolderPath, outFilePath) => {
142
+ const absoluteTsconfigPath = import_node_path2.default.resolve(tsconfigPath);
143
+ const absoluteApiFolderPath = import_node_path2.default.resolve(interfaceFolderPath);
144
+ const absoluteOutputPath = import_node_path2.default.resolve(outFilePath);
145
+ await main(absoluteTsconfigPath, absoluteApiFolderPath, absoluteOutputPath);
146
+ });
147
+ program.parse(process.argv);
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/bin/gen-list/index.ts
31
+ var gen_list_exports = {};
32
+ __export(gen_list_exports, {
33
+ main: () => main
34
+ });
35
+ module.exports = __toCommonJS(gen_list_exports);
36
+ var import_node_fs = __toESM(require("fs"), 1);
37
+ var import_node_path = __toESM(require("path"), 1);
38
+ var import_typescript = __toESM(require("typescript"), 1);
39
+ var import_ts_fp_data2 = require("@lsby/ts-fp-data");
40
+
41
+ // src/tools/log.ts
42
+ var import_debug = __toESM(require("debug"), 1);
43
+ var import_ts_fp_data = require("@lsby/ts-fp-data");
44
+ var Log = class _Log {
45
+ constructor(fileName) {
46
+ this.fileName = fileName;
47
+ this.debugObj = (0, import_debug.default)(fileName);
48
+ this._info = this.debugObj.extend("info");
49
+ this._debug = this.debugObj.extend("debug");
50
+ this._err = this.debugObj.extend("err");
51
+ }
52
+ debugObj;
53
+ _info;
54
+ _debug;
55
+ _err;
56
+ extend(name) {
57
+ return new _Log(`${this.fileName}:${name}`);
58
+ }
59
+ info(formatter, ...args) {
60
+ return new import_ts_fp_data.Task(async () => {
61
+ this._info(formatter, ...args);
62
+ });
63
+ }
64
+ debug(formatter, ...args) {
65
+ return new import_ts_fp_data.Task(async () => {
66
+ this._debug(formatter, ...args);
67
+ });
68
+ }
69
+ err(formatter, ...args) {
70
+ return new import_ts_fp_data.Task(async () => {
71
+ this._err(formatter, ...args);
72
+ });
73
+ }
74
+ };
75
+
76
+ // src/bin/gen-list/index.ts
77
+ function main(tsconfigPath, interfaceFolderPath, outFilePath) {
78
+ return new import_ts_fp_data2.Task(async () => {
79
+ var log = new Log("@lsby:net-core").extend("gen-list");
80
+ const \u9879\u76EE\u6839\u8DEF\u5F84 = import_node_path.default.dirname(tsconfigPath);
81
+ const tsconfigJson = import_typescript.default.parseConfigFileTextToJson(tsconfigPath, import_node_fs.default.readFileSync(tsconfigPath, "utf8"));
82
+ if (tsconfigJson.error) {
83
+ throw new Error("\u65E0\u6CD5\u89E3\u6790 tsconfig.json");
84
+ }
85
+ const parsedTsconfig = import_typescript.default.parseJsonConfigFileContent(tsconfigJson.config, import_typescript.default.sys, import_node_path.default.resolve(tsconfigPath, ".."));
86
+ await log.debug("\u6210\u529F\u89E3\u6790 tsconfig \u6587\u4EF6...").run();
87
+ const projectHost = import_typescript.default.createCompilerHost(parsedTsconfig.options);
88
+ const project = import_typescript.default.createProgram(parsedTsconfig.fileNames, parsedTsconfig.options, projectHost);
89
+ await log.debug("\u6210\u529F\u8BFB\u53D6\u9879\u76EE...").run();
90
+ const _check = project.getTypeChecker();
91
+ const \u6240\u6709\u6E90\u6587\u4EF6 = project.getSourceFiles();
92
+ const \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
93
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*type.ts`).test(
94
+ import_node_path.default.resolve(sourceFile.fileName)
95
+ );
96
+ });
97
+ const \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
98
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*index.ts`).test(
99
+ import_node_path.default.resolve(sourceFile.fileName)
100
+ );
101
+ });
102
+ await log.debug("\u627E\u5230 %o \u4E2A\u63A5\u53E3", \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC.length).run();
103
+ const \u5F15\u5165\u533A = [];
104
+ const \u4EE3\u7801\u533A = [];
105
+ for (var i = 0; i < \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length; i++) {
106
+ var \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 = \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC[i];
107
+ if (\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 == null)
108
+ throw new Error("\u975E\u9884\u671F\u7684\u6570\u7EC4\u8D8A\u754C");
109
+ const filenameRelativeToApiFolder = import_node_path.default.relative(interfaceFolderPath, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/");
110
+ const importName = filenameRelativeToApiFolder.replaceAll("/", "_").replaceAll(".ts", "").replaceAll("./", "").replaceAll("-", "_");
111
+ const filenameRelativeToProjectRoot = import_node_path.default.relative(\u9879\u76EE\u6839\u8DEF\u5F84, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/").replaceAll(".ts", "");
112
+ const outputFolderRelativeToProjectRoot = import_node_path.default.relative(import_node_path.default.dirname(outFilePath), \u9879\u76EE\u6839\u8DEF\u5F84).replaceAll("\\", "/");
113
+ const importPath = import_node_path.default.join(outputFolderRelativeToProjectRoot, filenameRelativeToProjectRoot).replaceAll("\\", "/");
114
+ await log.info(`\u5904\u7406\uFF08${i + 1} / ${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length}\uFF09\uFF1A${filenameRelativeToApiFolder}`).run();
115
+ for (const node of \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.statements) {
116
+ if (import_typescript.default.isExportAssignment(node) && node.isExportEquals === void 0) {
117
+ const expression = node.expression;
118
+ if (import_typescript.default.isNewExpression(expression) && expression.expression.getText() === "\u63A5\u53E3") {
119
+ break;
120
+ }
121
+ throw new Error(`${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName}\uFF1A\u9ED8\u8BA4\u5BFC\u51FA\u4E0D\u662F \u63A5\u53E3`);
122
+ }
123
+ }
124
+ \u5F15\u5165\u533A.push(`import * as ${importName} from '${importPath}'`);
125
+ \u4EE3\u7801\u533A.push(`${importName}.default`);
126
+ }
127
+ const finalTestFile = [
128
+ // ..
129
+ `import { \u4EFB\u610F\u63A5\u53E3 } from '@lsby/net-core'`,
130
+ "",
131
+ ...\u5F15\u5165\u533A,
132
+ "",
133
+ `export var interfaceList: \u4EFB\u610F\u63A5\u53E3[] = [${\u4EE3\u7801\u533A.join(",")}]`,
134
+ ""
135
+ ].join("\n");
136
+ var outDir = import_node_path.default.dirname(outFilePath);
137
+ if (!(0, import_node_fs.existsSync)(outDir)) {
138
+ (0, import_node_fs.mkdirSync)(outDir, { recursive: true });
139
+ }
140
+ (0, import_node_fs.writeFileSync)(outFilePath, finalTestFile);
141
+ }).run();
142
+ }
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ main
146
+ });
@@ -0,0 +1,3 @@
1
+ declare function main(tsconfigPath: string, interfaceFolderPath: string, outFilePath: string): Promise<void>;
2
+
3
+ export { main };
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ main
4
+ } from "../../chunk-RDNEJGHR.js";
5
+ import "../../chunk-PLYBVQKK.js";
6
+
7
+ // src/bin/gen-list/bin.ts
8
+ import path from "node:path";
9
+ import { Command } from "commander";
10
+ var program = new Command();
11
+ program.name("\u751F\u6210\u6D4B\u8BD5\u6587\u4EF6").argument("<tsconfigPath>", "tsconfig\u6587\u4EF6\u8DEF\u5F84").argument("<interfaceFolderPath>", "\u63A5\u53E3\u6587\u4EF6\u5939\u8DEF\u5F84").argument("<outFilePath>", "\u8F93\u51FA\u6587\u4EF6\u8DEF\u5F84").action(async (tsconfigPath, interfaceFolderPath, outFilePath) => {
12
+ const absoluteTsconfigPath = path.resolve(tsconfigPath);
13
+ const absoluteApiFolderPath = path.resolve(interfaceFolderPath);
14
+ const absoluteOutputPath = path.resolve(outFilePath);
15
+ await main(absoluteTsconfigPath, absoluteApiFolderPath, absoluteOutputPath);
16
+ });
17
+ program.parse(process.argv);
@@ -0,0 +1,3 @@
1
+ declare function main(tsconfigPath: string, interfaceFolderPath: string, outFilePath: string): Promise<void>;
2
+
3
+ export { main };
@@ -0,0 +1,7 @@
1
+ import {
2
+ main
3
+ } from "../../chunk-RDNEJGHR.js";
4
+ import "../../chunk-PLYBVQKK.js";
5
+ export {
6
+ main
7
+ };
@@ -0,0 +1,79 @@
1
+ import {
2
+ Log
3
+ } from "./chunk-PLYBVQKK.js";
4
+
5
+ // src/bin/gen-list/index.ts
6
+ import fs, { existsSync, mkdirSync, writeFileSync } from "node:fs";
7
+ import path from "node:path";
8
+ import ts from "typescript";
9
+ import { Task } from "@lsby/ts-fp-data";
10
+ function main(tsconfigPath, interfaceFolderPath, outFilePath) {
11
+ return new Task(async () => {
12
+ var log = new Log("@lsby:net-core").extend("gen-list");
13
+ const \u9879\u76EE\u6839\u8DEF\u5F84 = path.dirname(tsconfigPath);
14
+ const tsconfigJson = ts.parseConfigFileTextToJson(tsconfigPath, fs.readFileSync(tsconfigPath, "utf8"));
15
+ if (tsconfigJson.error) {
16
+ throw new Error("\u65E0\u6CD5\u89E3\u6790 tsconfig.json");
17
+ }
18
+ const parsedTsconfig = ts.parseJsonConfigFileContent(tsconfigJson.config, ts.sys, path.resolve(tsconfigPath, ".."));
19
+ await log.debug("\u6210\u529F\u89E3\u6790 tsconfig \u6587\u4EF6...").run();
20
+ const projectHost = ts.createCompilerHost(parsedTsconfig.options);
21
+ const project = ts.createProgram(parsedTsconfig.fileNames, parsedTsconfig.options, projectHost);
22
+ await log.debug("\u6210\u529F\u8BFB\u53D6\u9879\u76EE...").run();
23
+ const _check = project.getTypeChecker();
24
+ const \u6240\u6709\u6E90\u6587\u4EF6 = project.getSourceFiles();
25
+ const \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
26
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*type.ts`).test(
27
+ path.resolve(sourceFile.fileName)
28
+ );
29
+ });
30
+ const \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC = \u6240\u6709\u6E90\u6587\u4EF6.filter((sourceFile) => {
31
+ return new RegExp(`${interfaceFolderPath.replaceAll("\\", "\\\\")}.*index.ts`).test(
32
+ path.resolve(sourceFile.fileName)
33
+ );
34
+ });
35
+ await log.debug("\u627E\u5230 %o \u4E2A\u63A5\u53E3", \u63A5\u53E3\u7C7B\u578B\u6587\u4EF6\u4EEC.length).run();
36
+ const \u5F15\u5165\u533A = [];
37
+ const \u4EE3\u7801\u533A = [];
38
+ for (var i = 0; i < \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length; i++) {
39
+ var \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 = \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC[i];
40
+ if (\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6 == null)
41
+ throw new Error("\u975E\u9884\u671F\u7684\u6570\u7EC4\u8D8A\u754C");
42
+ const filenameRelativeToApiFolder = path.relative(interfaceFolderPath, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/");
43
+ const importName = filenameRelativeToApiFolder.replaceAll("/", "_").replaceAll(".ts", "").replaceAll("./", "").replaceAll("-", "_");
44
+ const filenameRelativeToProjectRoot = path.relative(\u9879\u76EE\u6839\u8DEF\u5F84, \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName).replaceAll("\\", "/").replaceAll(".ts", "");
45
+ const outputFolderRelativeToProjectRoot = path.relative(path.dirname(outFilePath), \u9879\u76EE\u6839\u8DEF\u5F84).replaceAll("\\", "/");
46
+ const importPath = path.join(outputFolderRelativeToProjectRoot, filenameRelativeToProjectRoot).replaceAll("\\", "/");
47
+ await log.info(`\u5904\u7406\uFF08${i + 1} / ${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6\u4EEC.length}\uFF09\uFF1A${filenameRelativeToApiFolder}`).run();
48
+ for (const node of \u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.statements) {
49
+ if (ts.isExportAssignment(node) && node.isExportEquals === void 0) {
50
+ const expression = node.expression;
51
+ if (ts.isNewExpression(expression) && expression.expression.getText() === "\u63A5\u53E3") {
52
+ break;
53
+ }
54
+ throw new Error(`${\u63A5\u53E3\u5B9E\u73B0\u6587\u4EF6.fileName}\uFF1A\u9ED8\u8BA4\u5BFC\u51FA\u4E0D\u662F \u63A5\u53E3`);
55
+ }
56
+ }
57
+ \u5F15\u5165\u533A.push(`import * as ${importName} from '${importPath}'`);
58
+ \u4EE3\u7801\u533A.push(`${importName}.default`);
59
+ }
60
+ const finalTestFile = [
61
+ // ..
62
+ `import { \u4EFB\u610F\u63A5\u53E3 } from '@lsby/net-core'`,
63
+ "",
64
+ ...\u5F15\u5165\u533A,
65
+ "",
66
+ `export var interfaceList: \u4EFB\u610F\u63A5\u53E3[] = [${\u4EE3\u7801\u533A.join(",")}]`,
67
+ ""
68
+ ].join("\n");
69
+ var outDir = path.dirname(outFilePath);
70
+ if (!existsSync(outDir)) {
71
+ mkdirSync(outDir, { recursive: true });
72
+ }
73
+ writeFileSync(outFilePath, finalTestFile);
74
+ }).run();
75
+ }
76
+
77
+ export {
78
+ main
79
+ };
package/dist/esm/index.js CHANGED
@@ -4,12 +4,12 @@ import {
4
4
  import {
5
5
  表单解析插件
6
6
  } from "./chunk-FBQ7H3IE.js";
7
- import {
8
- 服务器
9
- } from "./chunk-R4LHKMZP.js";
10
7
  import {
11
8
  测试
12
9
  } from "./chunk-ET2XZBZD.js";
10
+ import {
11
+ 服务器
12
+ } from "./chunk-R4LHKMZP.js";
13
13
  import {
14
14
  接口类型
15
15
  } from "./chunk-SF5Z34AP.js";
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@lsby/net-core",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",
7
7
  "import": "./dist/esm/index.js"
8
8
  },
9
9
  "bin": {
10
+ "lsby-net-core-gen-list": "./dist/bin/gen-list/bin.cjs",
10
11
  "lsby-net-core-gen-test": "./dist/bin/gen-test/bin.cjs",
11
12
  "lsby-net-core-gen-type": "./dist/bin/gen-type/bin.cjs"
12
13
  },