@pikku/cli 0.9.12 → 0.9.14
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @pikku/cli
|
|
2
2
|
|
|
3
|
+
## 0.9.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 798d52c: refactor: move all rpc generated info into rpc and removing rpc-internal
|
|
8
|
+
|
|
9
|
+
## 0.9.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ccd2a45: fix: adding functions should always be using func config and not pure functions
|
|
14
|
+
|
|
3
15
|
## 0.9.12
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/cli.schema.json
CHANGED
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"type": "string"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"required": [
|
|
42
|
+
"required": [
|
|
43
|
+
"url"
|
|
44
|
+
],
|
|
43
45
|
"type": "object"
|
|
44
46
|
},
|
|
45
47
|
"info": {
|
|
@@ -73,7 +75,9 @@
|
|
|
73
75
|
"type": "string"
|
|
74
76
|
}
|
|
75
77
|
},
|
|
76
|
-
"required": [
|
|
78
|
+
"required": [
|
|
79
|
+
"name"
|
|
80
|
+
],
|
|
77
81
|
"type": "object"
|
|
78
82
|
},
|
|
79
83
|
"termsOfService": {
|
|
@@ -86,7 +90,11 @@
|
|
|
86
90
|
"type": "string"
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
|
-
"required": [
|
|
93
|
+
"required": [
|
|
94
|
+
"title",
|
|
95
|
+
"version",
|
|
96
|
+
"description"
|
|
97
|
+
],
|
|
90
98
|
"type": "object"
|
|
91
99
|
},
|
|
92
100
|
"security": {
|
|
@@ -113,7 +121,9 @@
|
|
|
113
121
|
"type": "string"
|
|
114
122
|
}
|
|
115
123
|
},
|
|
116
|
-
"required": [
|
|
124
|
+
"required": [
|
|
125
|
+
"url"
|
|
126
|
+
],
|
|
117
127
|
"type": "object"
|
|
118
128
|
},
|
|
119
129
|
"type": "array"
|
|
@@ -129,13 +139,18 @@
|
|
|
129
139
|
"type": "string"
|
|
130
140
|
}
|
|
131
141
|
},
|
|
132
|
-
"required": [
|
|
142
|
+
"required": [
|
|
143
|
+
"name"
|
|
144
|
+
],
|
|
133
145
|
"type": "object"
|
|
134
146
|
},
|
|
135
147
|
"type": "array"
|
|
136
148
|
}
|
|
137
149
|
},
|
|
138
|
-
"required": [
|
|
150
|
+
"required": [
|
|
151
|
+
"info",
|
|
152
|
+
"servers"
|
|
153
|
+
],
|
|
139
154
|
"type": "object"
|
|
140
155
|
},
|
|
141
156
|
"PikkuCLIConfig": {
|
|
@@ -169,7 +184,14 @@
|
|
|
169
184
|
"type": "string"
|
|
170
185
|
}
|
|
171
186
|
},
|
|
172
|
-
"required": [
|
|
187
|
+
"required": [
|
|
188
|
+
"http",
|
|
189
|
+
"scheduler",
|
|
190
|
+
"channel",
|
|
191
|
+
"rpc",
|
|
192
|
+
"queue",
|
|
193
|
+
"mcp"
|
|
194
|
+
],
|
|
173
195
|
"type": "object"
|
|
174
196
|
},
|
|
175
197
|
"channelsMapDeclarationFile": {
|
|
@@ -242,7 +264,10 @@
|
|
|
242
264
|
"type": "string"
|
|
243
265
|
}
|
|
244
266
|
},
|
|
245
|
-
"required": [
|
|
267
|
+
"required": [
|
|
268
|
+
"outputFile",
|
|
269
|
+
"additionalInfo"
|
|
270
|
+
],
|
|
246
271
|
"type": "object"
|
|
247
272
|
},
|
|
248
273
|
"outDir": {
|
|
@@ -354,4 +379,4 @@
|
|
|
354
379
|
"type": "object"
|
|
355
380
|
}
|
|
356
381
|
}
|
|
357
|
-
}
|
|
382
|
+
}
|
|
@@ -61,8 +61,7 @@ const _getPikkuCLIConfig = async (configFile = undefined, requiredFields, filter
|
|
|
61
61
|
const functionDir = join(result.outDir, 'function');
|
|
62
62
|
const httpDir = join(result.outDir, 'http');
|
|
63
63
|
const channelDir = join(result.outDir, 'channel');
|
|
64
|
-
const
|
|
65
|
-
const externalRPCDirectory = join(result.outDir, 'rpc');
|
|
64
|
+
const rpcDir = join(result.outDir, 'rpc');
|
|
66
65
|
const schedulerDir = join(result.outDir, 'scheduler');
|
|
67
66
|
const queueDir = join(result.outDir, 'queue');
|
|
68
67
|
const mcpDir = join(result.outDir, 'mcp');
|
|
@@ -103,16 +102,15 @@ const _getPikkuCLIConfig = async (configFile = undefined, requiredFields, filter
|
|
|
103
102
|
if (!result.channelsMapDeclarationFile) {
|
|
104
103
|
result.channelsMapDeclarationFile = join(channelDir, 'pikku-channels-map.gen.d.ts');
|
|
105
104
|
}
|
|
106
|
-
//
|
|
105
|
+
// RPC (internal and exposed)
|
|
107
106
|
if (!result.rpcInternalWiringMetaFile) {
|
|
108
|
-
result.rpcInternalWiringMetaFile = join(
|
|
107
|
+
result.rpcInternalWiringMetaFile = join(rpcDir, 'pikku-rpc-wirings-meta.internal.gen.ts');
|
|
109
108
|
}
|
|
110
109
|
if (!result.rpcInternalMapDeclarationFile) {
|
|
111
|
-
result.rpcInternalMapDeclarationFile = join(
|
|
110
|
+
result.rpcInternalMapDeclarationFile = join(rpcDir, 'pikku-rpc-wirings-map.internal.gen.d.ts');
|
|
112
111
|
}
|
|
113
|
-
// External
|
|
114
112
|
if (!result.rpcMapDeclarationFile) {
|
|
115
|
-
result.rpcMapDeclarationFile = join(
|
|
113
|
+
result.rpcMapDeclarationFile = join(rpcDir, 'pikku-rpc-wirings-map.gen.d.ts');
|
|
116
114
|
}
|
|
117
115
|
// Scheduler
|
|
118
116
|
if (!result.schedulersWiringFile) {
|
|
@@ -204,7 +204,7 @@ export const pikkuFunc = <In, Out = unknown>(
|
|
|
204
204
|
| PikkuFunction<In, Out>
|
|
205
205
|
| CorePikkuFunctionConfig<PikkuFunction<In, Out>, PikkuPermission<In>>
|
|
206
206
|
) => {
|
|
207
|
-
return typeof func === 'function' ? func : func
|
|
207
|
+
return typeof func === 'function' ? { func } : func
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/**
|
|
@@ -232,7 +232,7 @@ export const pikkuSessionlessFunc = <In, Out = unknown>(
|
|
|
232
232
|
| PikkuFunctionSessionless<In, Out>
|
|
233
233
|
| CorePikkuFunctionConfig<PikkuFunctionSessionless<In, Out>, PikkuPermission<In>, PikkuMiddleware>
|
|
234
234
|
) => {
|
|
235
|
-
return typeof func === 'function' ? func : func
|
|
235
|
+
return typeof func === 'function' ? { func } : func
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/**
|
|
@@ -263,7 +263,7 @@ export const pikkuChannelConnectionFunc = <Out = unknown, ChannelData = unknown>
|
|
|
263
263
|
name?: string
|
|
264
264
|
}
|
|
265
265
|
) => {
|
|
266
|
-
return typeof func === 'function' ? func : func
|
|
266
|
+
return typeof func === 'function' ? { func } : func
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
/**
|
|
@@ -292,7 +292,7 @@ export const pikkuChannelDisconnectionFunc = <ChannelData = unknown>(
|
|
|
292
292
|
name?: string
|
|
293
293
|
}
|
|
294
294
|
) => {
|
|
295
|
-
return typeof func === 'function' ? func : func
|
|
295
|
+
return typeof func === 'function' ? { func } : func
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
/**
|
|
@@ -319,7 +319,7 @@ export const pikkuChannelFunc = <In = unknown, Out = unknown, ChannelData = unkn
|
|
|
319
319
|
| PikkuFunctionSessionless<In, Out, ChannelData>
|
|
320
320
|
| CorePikkuFunctionConfig<PikkuFunction<In, Out, ChannelData>, PikkuPermission<In>>
|
|
321
321
|
) => {
|
|
322
|
-
return typeof func === 'function' ? func : func
|
|
322
|
+
return typeof func === 'function' ? { func } : func
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
@@ -343,7 +343,7 @@ export const pikkuVoidFunc = (
|
|
|
343
343
|
| PikkuFunctionSessionless<void, void>
|
|
344
344
|
| CorePikkuFunctionConfig<PikkuFunctionSessionless<void, void>, PikkuPermission<void>>
|
|
345
345
|
) => {
|
|
346
|
-
return typeof func === 'function' ? func : func
|
|
346
|
+
return typeof func === 'function' ? { func } : func
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
/**
|
|
@@ -534,7 +534,7 @@ export const pikkuMCPPromptFunc = <In>(
|
|
|
534
534
|
name?: string
|
|
535
535
|
}
|
|
536
536
|
) => {
|
|
537
|
-
return typeof func === 'function' ? func : func
|
|
537
|
+
return typeof func === 'function' ? { func } : func
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
/**
|
|
@@ -566,7 +566,7 @@ export const pikkuMCPToolFunc = <In>(
|
|
|
566
566
|
name?: string
|
|
567
567
|
}
|
|
568
568
|
) => {
|
|
569
|
-
return typeof func === 'function' ? func : func
|
|
569
|
+
return typeof func === 'function' ? { func } : func
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
/**
|
|
@@ -599,7 +599,7 @@ export const pikkuMCPResourceFunc = <In>(
|
|
|
599
599
|
name?: string
|
|
600
600
|
}
|
|
601
601
|
) => {
|
|
602
|
-
return typeof func === 'function' ? func : func
|
|
602
|
+
return typeof func === 'function' ? { func } : func
|
|
603
603
|
}
|
|
604
604
|
`;
|
|
605
605
|
};
|
package/package.json
CHANGED
package/src/pikku-cli-config.ts
CHANGED
|
@@ -172,8 +172,7 @@ const _getPikkuCLIConfig = async (
|
|
|
172
172
|
const functionDir = join(result.outDir, 'function')
|
|
173
173
|
const httpDir = join(result.outDir, 'http')
|
|
174
174
|
const channelDir = join(result.outDir, 'channel')
|
|
175
|
-
const
|
|
176
|
-
const externalRPCDirectory = join(result.outDir, 'rpc')
|
|
175
|
+
const rpcDir = join(result.outDir, 'rpc')
|
|
177
176
|
const schedulerDir = join(result.outDir, 'scheduler')
|
|
178
177
|
const queueDir = join(result.outDir, 'queue')
|
|
179
178
|
const mcpDir = join(result.outDir, 'mcp')
|
|
@@ -238,25 +237,24 @@ const _getPikkuCLIConfig = async (
|
|
|
238
237
|
)
|
|
239
238
|
}
|
|
240
239
|
|
|
241
|
-
//
|
|
240
|
+
// RPC (internal and exposed)
|
|
242
241
|
if (!result.rpcInternalWiringMetaFile) {
|
|
243
242
|
result.rpcInternalWiringMetaFile = join(
|
|
244
|
-
|
|
243
|
+
rpcDir,
|
|
245
244
|
'pikku-rpc-wirings-meta.internal.gen.ts'
|
|
246
245
|
)
|
|
247
246
|
}
|
|
248
247
|
|
|
249
248
|
if (!result.rpcInternalMapDeclarationFile) {
|
|
250
249
|
result.rpcInternalMapDeclarationFile = join(
|
|
251
|
-
|
|
250
|
+
rpcDir,
|
|
252
251
|
'pikku-rpc-wirings-map.internal.gen.d.ts'
|
|
253
252
|
)
|
|
254
253
|
}
|
|
255
254
|
|
|
256
|
-
// External
|
|
257
255
|
if (!result.rpcMapDeclarationFile) {
|
|
258
256
|
result.rpcMapDeclarationFile = join(
|
|
259
|
-
|
|
257
|
+
rpcDir,
|
|
260
258
|
'pikku-rpc-wirings-map.gen.d.ts'
|
|
261
259
|
)
|
|
262
260
|
}
|
|
@@ -212,7 +212,7 @@ export const pikkuFunc = <In, Out = unknown>(
|
|
|
212
212
|
| PikkuFunction<In, Out>
|
|
213
213
|
| CorePikkuFunctionConfig<PikkuFunction<In, Out>, PikkuPermission<In>>
|
|
214
214
|
) => {
|
|
215
|
-
return typeof func === 'function' ? func : func
|
|
215
|
+
return typeof func === 'function' ? { func } : func
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
/**
|
|
@@ -240,7 +240,7 @@ export const pikkuSessionlessFunc = <In, Out = unknown>(
|
|
|
240
240
|
| PikkuFunctionSessionless<In, Out>
|
|
241
241
|
| CorePikkuFunctionConfig<PikkuFunctionSessionless<In, Out>, PikkuPermission<In>, PikkuMiddleware>
|
|
242
242
|
) => {
|
|
243
|
-
return typeof func === 'function' ? func : func
|
|
243
|
+
return typeof func === 'function' ? { func } : func
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/**
|
|
@@ -271,7 +271,7 @@ export const pikkuChannelConnectionFunc = <Out = unknown, ChannelData = unknown>
|
|
|
271
271
|
name?: string
|
|
272
272
|
}
|
|
273
273
|
) => {
|
|
274
|
-
return typeof func === 'function' ? func : func
|
|
274
|
+
return typeof func === 'function' ? { func } : func
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
/**
|
|
@@ -300,7 +300,7 @@ export const pikkuChannelDisconnectionFunc = <ChannelData = unknown>(
|
|
|
300
300
|
name?: string
|
|
301
301
|
}
|
|
302
302
|
) => {
|
|
303
|
-
return typeof func === 'function' ? func : func
|
|
303
|
+
return typeof func === 'function' ? { func } : func
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
/**
|
|
@@ -327,7 +327,7 @@ export const pikkuChannelFunc = <In = unknown, Out = unknown, ChannelData = unkn
|
|
|
327
327
|
| PikkuFunctionSessionless<In, Out, ChannelData>
|
|
328
328
|
| CorePikkuFunctionConfig<PikkuFunction<In, Out, ChannelData>, PikkuPermission<In>>
|
|
329
329
|
) => {
|
|
330
|
-
return typeof func === 'function' ? func : func
|
|
330
|
+
return typeof func === 'function' ? { func } : func
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
/**
|
|
@@ -351,7 +351,7 @@ export const pikkuVoidFunc = (
|
|
|
351
351
|
| PikkuFunctionSessionless<void, void>
|
|
352
352
|
| CorePikkuFunctionConfig<PikkuFunctionSessionless<void, void>, PikkuPermission<void>>
|
|
353
353
|
) => {
|
|
354
|
-
return typeof func === 'function' ? func : func
|
|
354
|
+
return typeof func === 'function' ? { func } : func
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
/**
|
|
@@ -542,7 +542,7 @@ export const pikkuMCPPromptFunc = <In>(
|
|
|
542
542
|
name?: string
|
|
543
543
|
}
|
|
544
544
|
) => {
|
|
545
|
-
return typeof func === 'function' ? func : func
|
|
545
|
+
return typeof func === 'function' ? { func } : func
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
/**
|
|
@@ -574,7 +574,7 @@ export const pikkuMCPToolFunc = <In>(
|
|
|
574
574
|
name?: string
|
|
575
575
|
}
|
|
576
576
|
) => {
|
|
577
|
-
return typeof func === 'function' ? func : func
|
|
577
|
+
return typeof func === 'function' ? { func } : func
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
/**
|
|
@@ -607,7 +607,7 @@ export const pikkuMCPResourceFunc = <In>(
|
|
|
607
607
|
name?: string
|
|
608
608
|
}
|
|
609
609
|
) => {
|
|
610
|
-
return typeof func === 'function' ? func : func
|
|
610
|
+
return typeof func === 'function' ? { func } : func
|
|
611
611
|
}
|
|
612
612
|
`
|
|
613
613
|
}
|