@mokei/host-protocol 0.1.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/LICENSE +21 -0
- package/README.md +7 -0
- package/lib/index.d.ts +245 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +198 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present Paul Le Cam and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokei Host protocol.
|
|
3
|
+
*
|
|
4
|
+
* ## Installation
|
|
5
|
+
*
|
|
6
|
+
* ```sh
|
|
7
|
+
* npm install @mokei/host-protocol
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @module host-protocol
|
|
11
|
+
*/
|
|
12
|
+
import type { AnyClientMessageOf, AnyServerMessageOf } from '@enkaku/protocol';
|
|
13
|
+
import type { FromSchema } from '@enkaku/schema';
|
|
14
|
+
export declare const DEFAULT_SOCKET_PATH: string;
|
|
15
|
+
export declare const hostEventMetaSchema: {
|
|
16
|
+
readonly type: "object";
|
|
17
|
+
readonly properties: {
|
|
18
|
+
readonly contextID: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
};
|
|
21
|
+
readonly eventID: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
};
|
|
24
|
+
readonly time: {
|
|
25
|
+
readonly type: "integer";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly required: readonly ["contextID", "eventID", "time"];
|
|
29
|
+
readonly additionalProperties: false;
|
|
30
|
+
};
|
|
31
|
+
export type HostEventMeta = FromSchema<typeof hostEventMetaSchema>;
|
|
32
|
+
export declare const hostEventSchema: {
|
|
33
|
+
readonly anyOf: readonly [{
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly type: {
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
readonly const: "context:start";
|
|
39
|
+
};
|
|
40
|
+
readonly meta: {
|
|
41
|
+
readonly type: "object";
|
|
42
|
+
readonly properties: {
|
|
43
|
+
readonly contextID: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
};
|
|
46
|
+
readonly eventID: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
};
|
|
49
|
+
readonly time: {
|
|
50
|
+
readonly type: "integer";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly required: readonly ["contextID", "eventID", "time"];
|
|
54
|
+
readonly additionalProperties: false;
|
|
55
|
+
};
|
|
56
|
+
readonly data: {
|
|
57
|
+
readonly type: "object";
|
|
58
|
+
readonly properties: {
|
|
59
|
+
readonly transport: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
readonly const: "stdio";
|
|
62
|
+
};
|
|
63
|
+
readonly command: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
};
|
|
66
|
+
readonly args: {
|
|
67
|
+
readonly type: "array";
|
|
68
|
+
readonly items: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly required: readonly ["transport", "command", "args"];
|
|
74
|
+
readonly additionalProperties: false;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly required: readonly ["type", "meta", "data"];
|
|
78
|
+
readonly additionalProperties: false;
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "object";
|
|
81
|
+
readonly properties: {
|
|
82
|
+
readonly type: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly const: "context:stop";
|
|
85
|
+
};
|
|
86
|
+
readonly meta: {
|
|
87
|
+
readonly type: "object";
|
|
88
|
+
readonly properties: {
|
|
89
|
+
readonly contextID: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
};
|
|
92
|
+
readonly eventID: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
};
|
|
95
|
+
readonly time: {
|
|
96
|
+
readonly type: "integer";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly required: readonly ["contextID", "eventID", "time"];
|
|
100
|
+
readonly additionalProperties: false;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly required: readonly ["type", "meta"];
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
}, {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly properties: {
|
|
108
|
+
readonly type: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly const: "context:message";
|
|
111
|
+
};
|
|
112
|
+
readonly meta: {
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly properties: {
|
|
115
|
+
readonly contextID: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
};
|
|
118
|
+
readonly eventID: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
};
|
|
121
|
+
readonly time: {
|
|
122
|
+
readonly type: "integer";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly required: readonly ["contextID", "eventID", "time"];
|
|
126
|
+
readonly additionalProperties: false;
|
|
127
|
+
};
|
|
128
|
+
readonly data: {
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly properties: {
|
|
131
|
+
readonly from: {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly enum: readonly ["client", "server"];
|
|
134
|
+
};
|
|
135
|
+
readonly message: {
|
|
136
|
+
readonly type: "object";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
readonly required: readonly ["from", "message"];
|
|
140
|
+
readonly additionalProperties: false;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly required: readonly ["type", "meta", "data"];
|
|
144
|
+
readonly additionalProperties: false;
|
|
145
|
+
}];
|
|
146
|
+
};
|
|
147
|
+
export type HostEvent = FromSchema<typeof hostEventSchema>;
|
|
148
|
+
export declare const activeContextInfoSchema: {
|
|
149
|
+
readonly type: "object";
|
|
150
|
+
readonly properties: {
|
|
151
|
+
readonly startedTime: {
|
|
152
|
+
readonly type: "integer";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly required: readonly ["startedTime"];
|
|
156
|
+
};
|
|
157
|
+
export type ActiveContextInfo = FromSchema<typeof activeContextInfoSchema>;
|
|
158
|
+
export declare const hostInfoResultSchema: {
|
|
159
|
+
readonly type: "object";
|
|
160
|
+
readonly properties: {
|
|
161
|
+
readonly activeContexts: {
|
|
162
|
+
readonly type: "object";
|
|
163
|
+
readonly additionalProperties: {
|
|
164
|
+
readonly type: "object";
|
|
165
|
+
readonly properties: {
|
|
166
|
+
readonly startedTime: {
|
|
167
|
+
readonly type: "integer";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly required: readonly ["startedTime"];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly startedTime: {
|
|
174
|
+
readonly type: "integer";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly required: readonly ["activeContexts", "startedTime"];
|
|
178
|
+
readonly additionalProperties: false;
|
|
179
|
+
};
|
|
180
|
+
export type HostInfoResult = FromSchema<typeof hostInfoResultSchema>;
|
|
181
|
+
export declare const protocol: {
|
|
182
|
+
readonly events: {
|
|
183
|
+
readonly type: "stream";
|
|
184
|
+
readonly receive: {
|
|
185
|
+
readonly type: "object";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly info: {
|
|
189
|
+
readonly type: "request";
|
|
190
|
+
readonly result: {
|
|
191
|
+
readonly type: "object";
|
|
192
|
+
readonly properties: {
|
|
193
|
+
readonly activeContexts: {
|
|
194
|
+
readonly type: "object";
|
|
195
|
+
readonly additionalProperties: {
|
|
196
|
+
readonly type: "object";
|
|
197
|
+
readonly properties: {
|
|
198
|
+
readonly startedTime: {
|
|
199
|
+
readonly type: "integer";
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
readonly required: readonly ["startedTime"];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly startedTime: {
|
|
206
|
+
readonly type: "integer";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly required: readonly ["activeContexts", "startedTime"];
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly shutdown: {
|
|
214
|
+
readonly type: "request";
|
|
215
|
+
};
|
|
216
|
+
readonly spawn: {
|
|
217
|
+
readonly type: "channel";
|
|
218
|
+
readonly param: {
|
|
219
|
+
readonly type: "object";
|
|
220
|
+
readonly properties: {
|
|
221
|
+
readonly command: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
readonly args: {
|
|
225
|
+
readonly type: "array";
|
|
226
|
+
readonly items: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly required: readonly ["command"];
|
|
232
|
+
readonly additionalProperties: false;
|
|
233
|
+
};
|
|
234
|
+
readonly send: {
|
|
235
|
+
readonly type: "object";
|
|
236
|
+
};
|
|
237
|
+
readonly receive: {
|
|
238
|
+
readonly type: "object";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
export type Protocol = typeof protocol;
|
|
243
|
+
export type ClientMessage = AnyClientMessageOf<Protocol>;
|
|
244
|
+
export type ServerMessage = AnyServerMessageOf<Protocol>;
|
|
245
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAsB,MAAM,kBAAkB,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,gBAAgB,CAAA;AAExD,eAAO,MAAM,mBAAmB,QAAwC,CAAA;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;CASL,CAAA;AAC3B,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAElE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDD,CAAA;AAC3B,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,eAAO,MAAM,uBAAuB;;;;;;;;CAMT,CAAA;AAC3B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE1E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAWN,CAAA;AAC3B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEpE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BkB,CAAA;AACvC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AAEtC,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;AACxD,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokei Host protocol.
|
|
3
|
+
*
|
|
4
|
+
* ## Installation
|
|
5
|
+
*
|
|
6
|
+
* ```sh
|
|
7
|
+
* npm install @mokei/host-protocol
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @module host-protocol
|
|
11
|
+
*/ import { homedir } from 'node:os';
|
|
12
|
+
import { join } from 'node:path';
|
|
13
|
+
export const DEFAULT_SOCKET_PATH = join(homedir(), '.mokei-daemon.sock');
|
|
14
|
+
export const hostEventMetaSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
contextID: {
|
|
18
|
+
type: 'string'
|
|
19
|
+
},
|
|
20
|
+
eventID: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
},
|
|
23
|
+
time: {
|
|
24
|
+
type: 'integer'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
required: [
|
|
28
|
+
'contextID',
|
|
29
|
+
'eventID',
|
|
30
|
+
'time'
|
|
31
|
+
],
|
|
32
|
+
additionalProperties: false
|
|
33
|
+
};
|
|
34
|
+
export const hostEventSchema = {
|
|
35
|
+
anyOf: [
|
|
36
|
+
{
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
type: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
const: 'context:start'
|
|
42
|
+
},
|
|
43
|
+
meta: hostEventMetaSchema,
|
|
44
|
+
data: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
transport: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
const: 'stdio'
|
|
50
|
+
},
|
|
51
|
+
command: {
|
|
52
|
+
type: 'string'
|
|
53
|
+
},
|
|
54
|
+
args: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
items: {
|
|
57
|
+
type: 'string'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
required: [
|
|
62
|
+
'transport',
|
|
63
|
+
'command',
|
|
64
|
+
'args'
|
|
65
|
+
],
|
|
66
|
+
additionalProperties: false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
required: [
|
|
70
|
+
'type',
|
|
71
|
+
'meta',
|
|
72
|
+
'data'
|
|
73
|
+
],
|
|
74
|
+
additionalProperties: false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
type: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
const: 'context:stop'
|
|
82
|
+
},
|
|
83
|
+
meta: hostEventMetaSchema
|
|
84
|
+
},
|
|
85
|
+
required: [
|
|
86
|
+
'type',
|
|
87
|
+
'meta'
|
|
88
|
+
],
|
|
89
|
+
additionalProperties: false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
type: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
const: 'context:message'
|
|
97
|
+
},
|
|
98
|
+
meta: hostEventMetaSchema,
|
|
99
|
+
data: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: {
|
|
102
|
+
from: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
enum: [
|
|
105
|
+
'client',
|
|
106
|
+
'server'
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
message: {
|
|
110
|
+
type: 'object'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
required: [
|
|
114
|
+
'from',
|
|
115
|
+
'message'
|
|
116
|
+
],
|
|
117
|
+
additionalProperties: false
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
required: [
|
|
121
|
+
'type',
|
|
122
|
+
'meta',
|
|
123
|
+
'data'
|
|
124
|
+
],
|
|
125
|
+
additionalProperties: false
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
};
|
|
129
|
+
export const activeContextInfoSchema = {
|
|
130
|
+
type: 'object',
|
|
131
|
+
properties: {
|
|
132
|
+
startedTime: {
|
|
133
|
+
type: 'integer'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
required: [
|
|
137
|
+
'startedTime'
|
|
138
|
+
]
|
|
139
|
+
};
|
|
140
|
+
export const hostInfoResultSchema = {
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: {
|
|
143
|
+
activeContexts: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
additionalProperties: activeContextInfoSchema
|
|
146
|
+
},
|
|
147
|
+
startedTime: {
|
|
148
|
+
type: 'integer'
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
required: [
|
|
152
|
+
'activeContexts',
|
|
153
|
+
'startedTime'
|
|
154
|
+
],
|
|
155
|
+
additionalProperties: false
|
|
156
|
+
};
|
|
157
|
+
export const protocol = {
|
|
158
|
+
events: {
|
|
159
|
+
type: 'stream',
|
|
160
|
+
receive: {
|
|
161
|
+
type: 'object'
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
info: {
|
|
165
|
+
type: 'request',
|
|
166
|
+
result: hostInfoResultSchema
|
|
167
|
+
},
|
|
168
|
+
shutdown: {
|
|
169
|
+
type: 'request'
|
|
170
|
+
},
|
|
171
|
+
spawn: {
|
|
172
|
+
type: 'channel',
|
|
173
|
+
param: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: {
|
|
176
|
+
command: {
|
|
177
|
+
type: 'string'
|
|
178
|
+
},
|
|
179
|
+
args: {
|
|
180
|
+
type: 'array',
|
|
181
|
+
items: {
|
|
182
|
+
type: 'string'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
required: [
|
|
187
|
+
'command'
|
|
188
|
+
],
|
|
189
|
+
additionalProperties: false
|
|
190
|
+
},
|
|
191
|
+
send: {
|
|
192
|
+
type: 'object'
|
|
193
|
+
},
|
|
194
|
+
receive: {
|
|
195
|
+
type: 'object'
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mokei/host-protocol",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Mokei Host protocol",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"model",
|
|
8
|
+
"context",
|
|
9
|
+
"protocol",
|
|
10
|
+
"mcp",
|
|
11
|
+
"llm",
|
|
12
|
+
"ai"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/TairuFramework/mokei",
|
|
17
|
+
"directory": "packages/host-protocol"
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "lib/index.js",
|
|
21
|
+
"types": "lib/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./lib/index.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"lib/*"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@enkaku/protocol": "^0.10.0",
|
|
31
|
+
"@enkaku/schema": "^0.10.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build:clean": "del lib",
|
|
35
|
+
"build:js": "swc src -d ./lib --config-file ../../swc.json --strip-leading-paths",
|
|
36
|
+
"build:types": "tsc --emitDeclarationOnly --skipLibCheck",
|
|
37
|
+
"build:types:ci": "tsc --emitDeclarationOnly --skipLibCheck --declarationMap false",
|
|
38
|
+
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|
|
39
|
+
"test:types": "tsc --noEmit",
|
|
40
|
+
"test:unit": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
|
|
41
|
+
"test": "pnpm run test:types && pnpm run test:unit"
|
|
42
|
+
}
|
|
43
|
+
}
|