@lsby/net-core 0.5.1 → 0.6.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/dist/bin/gen-api-type/bin.cjs +11 -22
- package/dist/bin/gen-api-type/index.cjs +11 -22
- package/dist/cjs/bin/gen-api-type/bin.cjs +11 -22
- package/dist/cjs/bin/gen-api-type/index.cjs +11 -22
- package/dist/esm/bin/gen-api-type/bin.js +1 -1
- package/dist/esm/bin/gen-api-type/index.js +1 -1
- package/dist/esm/{chunk-7SSS4GXM.js → chunk-D6H6RJRI.js} +11 -22
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
|
@@ -95,37 +95,28 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
95
95
|
type jsonInput = \u5408\u5E76JSON\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
96
96
|
type jsonErrorOutput = \u83B7\u5F97\u63A5\u53E3\u9519\u8BEF\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
97
97
|
type jsonSuccessOutput = \u83B7\u5F97\u63A5\u53E3\u6B63\u786E\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
98
|
+
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
98
99
|
type JSON\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = jsonPath extends infer _
|
|
99
100
|
? jsonMethod extends infer _
|
|
100
101
|
? jsonInput extends infer _
|
|
101
102
|
? jsonErrorOutput extends infer _
|
|
102
103
|
? jsonSuccessOutput extends infer _
|
|
103
|
-
?
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
? wsData extends infer _
|
|
105
|
+
? {
|
|
106
|
+
path: jsonPath
|
|
107
|
+
method: jsonMethod
|
|
108
|
+
input: jsonInput
|
|
109
|
+
errorOutput: jsonErrorOutput
|
|
110
|
+
successOutput: jsonSuccessOutput
|
|
111
|
+
webSocketData: wsData
|
|
112
|
+
}
|
|
113
|
+
: never
|
|
110
114
|
: never
|
|
111
115
|
: never
|
|
112
116
|
: never
|
|
113
117
|
: never
|
|
114
118
|
: never
|
|
115
119
|
|
|
116
|
-
type wsPath = \u83B7\u5F97\u63A5\u53E3\u8DEF\u5F84\u7C7B\u578B<typeof \u5BFC\u5165>
|
|
117
|
-
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
118
|
-
type WS\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = wsPath extends infer _
|
|
119
|
-
? wsData extends infer _
|
|
120
|
-
? wsData extends Record<string, never>
|
|
121
|
-
? never
|
|
122
|
-
: {
|
|
123
|
-
path: wsPath
|
|
124
|
-
data: wsData
|
|
125
|
-
}
|
|
126
|
-
: never
|
|
127
|
-
: never
|
|
128
|
-
|
|
129
120
|
type \u5BFC\u51FA\u7C7B\u578B\u540D\u79F0 = GetNetCoreExportTypeName<\u5BFC\u5165>
|
|
130
121
|
type \u5BFC\u51FA\u7C7B\u578B\u5B9A\u4E49 = GetNetCoreExportTypeDefine<\u5BFC\u5165>
|
|
131
122
|
`;
|
|
@@ -208,8 +199,6 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
208
199
|
let \u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B = Array.from(new Set(\u5BFC\u51FA\u7C7B\u578B.filter((a) => a !== "any" && a !== "never" && a !== "unknown")));
|
|
209
200
|
await log.debug(`\u6700\u7EC8\u7B5B\u9009\u51FA ${\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B.length} \u4E2A\u5BFC\u51FA\u7C7B\u578B`);
|
|
210
201
|
let \u6700\u7EC8\u4EE3\u7801 = [
|
|
211
|
-
`import { GetNetCoreExportTypeName, GetNetCoreExportTypeDefine } from '@lsby/net-core'`,
|
|
212
|
-
"",
|
|
213
202
|
...\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B,
|
|
214
203
|
`export type InterfaceType = [${\u6700\u7EC8\u7ED3\u679C_JSON.join(",")}]`,
|
|
215
204
|
`export type InterfaceWsType = [${\u6700\u7EC8\u7ED3\u679C_WS.join(",")}]`,
|
|
@@ -100,37 +100,28 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
100
100
|
type jsonInput = \u5408\u5E76JSON\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
101
101
|
type jsonErrorOutput = \u83B7\u5F97\u63A5\u53E3\u9519\u8BEF\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
102
102
|
type jsonSuccessOutput = \u83B7\u5F97\u63A5\u53E3\u6B63\u786E\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
103
|
+
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
103
104
|
type JSON\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = jsonPath extends infer _
|
|
104
105
|
? jsonMethod extends infer _
|
|
105
106
|
? jsonInput extends infer _
|
|
106
107
|
? jsonErrorOutput extends infer _
|
|
107
108
|
? jsonSuccessOutput extends infer _
|
|
108
|
-
?
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
? wsData extends infer _
|
|
110
|
+
? {
|
|
111
|
+
path: jsonPath
|
|
112
|
+
method: jsonMethod
|
|
113
|
+
input: jsonInput
|
|
114
|
+
errorOutput: jsonErrorOutput
|
|
115
|
+
successOutput: jsonSuccessOutput
|
|
116
|
+
webSocketData: wsData
|
|
117
|
+
}
|
|
118
|
+
: never
|
|
115
119
|
: never
|
|
116
120
|
: never
|
|
117
121
|
: never
|
|
118
122
|
: never
|
|
119
123
|
: never
|
|
120
124
|
|
|
121
|
-
type wsPath = \u83B7\u5F97\u63A5\u53E3\u8DEF\u5F84\u7C7B\u578B<typeof \u5BFC\u5165>
|
|
122
|
-
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
123
|
-
type WS\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = wsPath extends infer _
|
|
124
|
-
? wsData extends infer _
|
|
125
|
-
? wsData extends Record<string, never>
|
|
126
|
-
? never
|
|
127
|
-
: {
|
|
128
|
-
path: wsPath
|
|
129
|
-
data: wsData
|
|
130
|
-
}
|
|
131
|
-
: never
|
|
132
|
-
: never
|
|
133
|
-
|
|
134
125
|
type \u5BFC\u51FA\u7C7B\u578B\u540D\u79F0 = GetNetCoreExportTypeName<\u5BFC\u5165>
|
|
135
126
|
type \u5BFC\u51FA\u7C7B\u578B\u5B9A\u4E49 = GetNetCoreExportTypeDefine<\u5BFC\u5165>
|
|
136
127
|
`;
|
|
@@ -213,8 +204,6 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
213
204
|
let \u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B = Array.from(new Set(\u5BFC\u51FA\u7C7B\u578B.filter((a) => a !== "any" && a !== "never" && a !== "unknown")));
|
|
214
205
|
await log.debug(`\u6700\u7EC8\u7B5B\u9009\u51FA ${\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B.length} \u4E2A\u5BFC\u51FA\u7C7B\u578B`);
|
|
215
206
|
let \u6700\u7EC8\u4EE3\u7801 = [
|
|
216
|
-
`import { GetNetCoreExportTypeName, GetNetCoreExportTypeDefine } from '@lsby/net-core'`,
|
|
217
|
-
"",
|
|
218
207
|
...\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B,
|
|
219
208
|
`export type InterfaceType = [${\u6700\u7EC8\u7ED3\u679C_JSON.join(",")}]`,
|
|
220
209
|
`export type InterfaceWsType = [${\u6700\u7EC8\u7ED3\u679C_WS.join(",")}]`,
|
|
@@ -95,37 +95,28 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
95
95
|
type jsonInput = \u5408\u5E76JSON\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
96
96
|
type jsonErrorOutput = \u83B7\u5F97\u63A5\u53E3\u9519\u8BEF\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
97
97
|
type jsonSuccessOutput = \u83B7\u5F97\u63A5\u53E3\u6B63\u786E\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
98
|
+
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
98
99
|
type JSON\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = jsonPath extends infer _
|
|
99
100
|
? jsonMethod extends infer _
|
|
100
101
|
? jsonInput extends infer _
|
|
101
102
|
? jsonErrorOutput extends infer _
|
|
102
103
|
? jsonSuccessOutput extends infer _
|
|
103
|
-
?
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
? wsData extends infer _
|
|
105
|
+
? {
|
|
106
|
+
path: jsonPath
|
|
107
|
+
method: jsonMethod
|
|
108
|
+
input: jsonInput
|
|
109
|
+
errorOutput: jsonErrorOutput
|
|
110
|
+
successOutput: jsonSuccessOutput
|
|
111
|
+
webSocketData: wsData
|
|
112
|
+
}
|
|
113
|
+
: never
|
|
110
114
|
: never
|
|
111
115
|
: never
|
|
112
116
|
: never
|
|
113
117
|
: never
|
|
114
118
|
: never
|
|
115
119
|
|
|
116
|
-
type wsPath = \u83B7\u5F97\u63A5\u53E3\u8DEF\u5F84\u7C7B\u578B<typeof \u5BFC\u5165>
|
|
117
|
-
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
118
|
-
type WS\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = wsPath extends infer _
|
|
119
|
-
? wsData extends infer _
|
|
120
|
-
? wsData extends Record<string, never>
|
|
121
|
-
? never
|
|
122
|
-
: {
|
|
123
|
-
path: wsPath
|
|
124
|
-
data: wsData
|
|
125
|
-
}
|
|
126
|
-
: never
|
|
127
|
-
: never
|
|
128
|
-
|
|
129
120
|
type \u5BFC\u51FA\u7C7B\u578B\u540D\u79F0 = GetNetCoreExportTypeName<\u5BFC\u5165>
|
|
130
121
|
type \u5BFC\u51FA\u7C7B\u578B\u5B9A\u4E49 = GetNetCoreExportTypeDefine<\u5BFC\u5165>
|
|
131
122
|
`;
|
|
@@ -208,8 +199,6 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
208
199
|
let \u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B = Array.from(new Set(\u5BFC\u51FA\u7C7B\u578B.filter((a) => a !== "any" && a !== "never" && a !== "unknown")));
|
|
209
200
|
await log.debug(`\u6700\u7EC8\u7B5B\u9009\u51FA ${\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B.length} \u4E2A\u5BFC\u51FA\u7C7B\u578B`);
|
|
210
201
|
let \u6700\u7EC8\u4EE3\u7801 = [
|
|
211
|
-
`import { GetNetCoreExportTypeName, GetNetCoreExportTypeDefine } from '@lsby/net-core'`,
|
|
212
|
-
"",
|
|
213
202
|
...\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B,
|
|
214
203
|
`export type InterfaceType = [${\u6700\u7EC8\u7ED3\u679C_JSON.join(",")}]`,
|
|
215
204
|
`export type InterfaceWsType = [${\u6700\u7EC8\u7ED3\u679C_WS.join(",")}]`,
|
|
@@ -100,37 +100,28 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
100
100
|
type jsonInput = \u5408\u5E76JSON\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
101
101
|
type jsonErrorOutput = \u83B7\u5F97\u63A5\u53E3\u9519\u8BEF\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
102
102
|
type jsonSuccessOutput = \u83B7\u5F97\u63A5\u53E3\u6B63\u786E\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
103
|
+
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
103
104
|
type JSON\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = jsonPath extends infer _
|
|
104
105
|
? jsonMethod extends infer _
|
|
105
106
|
? jsonInput extends infer _
|
|
106
107
|
? jsonErrorOutput extends infer _
|
|
107
108
|
? jsonSuccessOutput extends infer _
|
|
108
|
-
?
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
? wsData extends infer _
|
|
110
|
+
? {
|
|
111
|
+
path: jsonPath
|
|
112
|
+
method: jsonMethod
|
|
113
|
+
input: jsonInput
|
|
114
|
+
errorOutput: jsonErrorOutput
|
|
115
|
+
successOutput: jsonSuccessOutput
|
|
116
|
+
webSocketData: wsData
|
|
117
|
+
}
|
|
118
|
+
: never
|
|
115
119
|
: never
|
|
116
120
|
: never
|
|
117
121
|
: never
|
|
118
122
|
: never
|
|
119
123
|
: never
|
|
120
124
|
|
|
121
|
-
type wsPath = \u83B7\u5F97\u63A5\u53E3\u8DEF\u5F84\u7C7B\u578B<typeof \u5BFC\u5165>
|
|
122
|
-
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
123
|
-
type WS\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = wsPath extends infer _
|
|
124
|
-
? wsData extends infer _
|
|
125
|
-
? wsData extends Record<string, never>
|
|
126
|
-
? never
|
|
127
|
-
: {
|
|
128
|
-
path: wsPath
|
|
129
|
-
data: wsData
|
|
130
|
-
}
|
|
131
|
-
: never
|
|
132
|
-
: never
|
|
133
|
-
|
|
134
125
|
type \u5BFC\u51FA\u7C7B\u578B\u540D\u79F0 = GetNetCoreExportTypeName<\u5BFC\u5165>
|
|
135
126
|
type \u5BFC\u51FA\u7C7B\u578B\u5B9A\u4E49 = GetNetCoreExportTypeDefine<\u5BFC\u5165>
|
|
136
127
|
`;
|
|
@@ -213,8 +204,6 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
213
204
|
let \u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B = Array.from(new Set(\u5BFC\u51FA\u7C7B\u578B.filter((a) => a !== "any" && a !== "never" && a !== "unknown")));
|
|
214
205
|
await log.debug(`\u6700\u7EC8\u7B5B\u9009\u51FA ${\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B.length} \u4E2A\u5BFC\u51FA\u7C7B\u578B`);
|
|
215
206
|
let \u6700\u7EC8\u4EE3\u7801 = [
|
|
216
|
-
`import { GetNetCoreExportTypeName, GetNetCoreExportTypeDefine } from '@lsby/net-core'`,
|
|
217
|
-
"",
|
|
218
207
|
...\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B,
|
|
219
208
|
`export type InterfaceType = [${\u6700\u7EC8\u7ED3\u679C_JSON.join(",")}]`,
|
|
220
209
|
`export type InterfaceWsType = [${\u6700\u7EC8\u7ED3\u679C_WS.join(",")}]`,
|
|
@@ -65,37 +65,28 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
65
65
|
type jsonInput = \u5408\u5E76JSON\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
66
66
|
type jsonErrorOutput = \u83B7\u5F97\u63A5\u53E3\u9519\u8BEF\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
67
67
|
type jsonSuccessOutput = \u83B7\u5F97\u63A5\u53E3\u6B63\u786E\u5F62\u5F0F<typeof \u5BFC\u5165>
|
|
68
|
+
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
68
69
|
type JSON\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = jsonPath extends infer _
|
|
69
70
|
? jsonMethod extends infer _
|
|
70
71
|
? jsonInput extends infer _
|
|
71
72
|
? jsonErrorOutput extends infer _
|
|
72
73
|
? jsonSuccessOutput extends infer _
|
|
73
|
-
?
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
? wsData extends infer _
|
|
75
|
+
? {
|
|
76
|
+
path: jsonPath
|
|
77
|
+
method: jsonMethod
|
|
78
|
+
input: jsonInput
|
|
79
|
+
errorOutput: jsonErrorOutput
|
|
80
|
+
successOutput: jsonSuccessOutput
|
|
81
|
+
webSocketData: wsData
|
|
82
|
+
}
|
|
83
|
+
: never
|
|
80
84
|
: never
|
|
81
85
|
: never
|
|
82
86
|
: never
|
|
83
87
|
: never
|
|
84
88
|
: never
|
|
85
89
|
|
|
86
|
-
type wsPath = \u83B7\u5F97\u63A5\u53E3\u8DEF\u5F84\u7C7B\u578B<typeof \u5BFC\u5165>
|
|
87
|
-
type wsData = \u53D6\u7B2C\u4E00\u4E2AWS\u63D2\u4EF6\u7ED3\u679C<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u63D2\u4EF6\u7C7B\u578B<\u83B7\u5F97\u63A5\u53E3\u903B\u8F91\u7C7B\u578B<typeof \u5BFC\u5165>>>
|
|
88
|
-
type WS\u63A5\u53E3\u8BA1\u7B97\u7ED3\u679C = wsPath extends infer _
|
|
89
|
-
? wsData extends infer _
|
|
90
|
-
? wsData extends Record<string, never>
|
|
91
|
-
? never
|
|
92
|
-
: {
|
|
93
|
-
path: wsPath
|
|
94
|
-
data: wsData
|
|
95
|
-
}
|
|
96
|
-
: never
|
|
97
|
-
: never
|
|
98
|
-
|
|
99
90
|
type \u5BFC\u51FA\u7C7B\u578B\u540D\u79F0 = GetNetCoreExportTypeName<\u5BFC\u5165>
|
|
100
91
|
type \u5BFC\u51FA\u7C7B\u578B\u5B9A\u4E49 = GetNetCoreExportTypeDefine<\u5BFC\u5165>
|
|
101
92
|
`;
|
|
@@ -178,8 +169,6 @@ async function main(tsconfig\u8DEF\u5F84, \u76EE\u6807\u8DEF\u5F84, \u8F93\u51FA
|
|
|
178
169
|
let \u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B = Array.from(new Set(\u5BFC\u51FA\u7C7B\u578B.filter((a) => a !== "any" && a !== "never" && a !== "unknown")));
|
|
179
170
|
await log.debug(`\u6700\u7EC8\u7B5B\u9009\u51FA ${\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B.length} \u4E2A\u5BFC\u51FA\u7C7B\u578B`);
|
|
180
171
|
let \u6700\u7EC8\u4EE3\u7801 = [
|
|
181
|
-
`import { GetNetCoreExportTypeName, GetNetCoreExportTypeDefine } from '@lsby/net-core'`,
|
|
182
|
-
"",
|
|
183
172
|
...\u6700\u7EC8\u7ED3\u679C_\u5BFC\u51FA\u7C7B\u578B,
|
|
184
173
|
`export type InterfaceType = [${\u6700\u7EC8\u7ED3\u679C_JSON.join(",")}]`,
|
|
185
174
|
`export type InterfaceWsType = [${\u6700\u7EC8\u7ED3\u679C_WS.join(",")}]`,
|
package/dist/esm/index.js
CHANGED
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
JSON解析插件
|
|
15
15
|
} from "./chunk-P6HJULSY.js";
|
|
16
|
-
import {
|
|
17
|
-
服务器
|
|
18
|
-
} from "./chunk-JBHOWUYP.js";
|
|
19
16
|
import {
|
|
20
17
|
插件
|
|
21
18
|
} from "./chunk-43GZE5YL.js";
|
|
22
19
|
import {
|
|
23
20
|
EXPORT_TYPE
|
|
24
21
|
} from "./chunk-ZF7EC2OM.js";
|
|
22
|
+
import {
|
|
23
|
+
服务器
|
|
24
|
+
} from "./chunk-JBHOWUYP.js";
|
|
25
25
|
import {
|
|
26
26
|
截断字符串,
|
|
27
27
|
递归截断字符串
|