@pikku/cli 0.7.7 → 0.8.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bin/pikku-all.ts +87 -48
  3. package/bin/pikku-fetch.ts +5 -37
  4. package/bin/pikku-nextjs.ts +7 -112
  5. package/bin/pikku-openapi.ts +6 -53
  6. package/bin/pikku-queue-service.ts +24 -0
  7. package/bin/pikku-schemas.ts +6 -32
  8. package/bin/pikku-websocket.ts +6 -40
  9. package/bin/pikku.ts +2 -0
  10. package/dist/bin/pikku-all.d.ts +1 -1
  11. package/dist/bin/pikku-all.js +68 -48
  12. package/dist/bin/pikku-fetch.d.ts +1 -3
  13. package/dist/bin/pikku-fetch.js +4 -14
  14. package/dist/bin/pikku-nextjs.d.ts +1 -4
  15. package/dist/bin/pikku-nextjs.js +5 -39
  16. package/dist/bin/pikku-openapi.d.ts +0 -3
  17. package/dist/bin/pikku-openapi.js +5 -23
  18. package/dist/bin/pikku-queue-service.d.ts +4 -0
  19. package/dist/bin/pikku-queue-service.js +15 -0
  20. package/dist/bin/pikku-schemas.d.ts +0 -3
  21. package/dist/bin/pikku-schemas.js +5 -11
  22. package/dist/bin/pikku-websocket.d.ts +1 -3
  23. package/dist/bin/pikku-websocket.js +4 -17
  24. package/dist/bin/pikku.js +2 -0
  25. package/dist/src/events/channels/pikku-channels.d.ts +2 -0
  26. package/dist/src/events/channels/pikku-channels.js +9 -0
  27. package/dist/src/events/channels/pikku-command-channels-map.d.ts +2 -0
  28. package/dist/src/events/channels/pikku-command-channels-map.js +8 -0
  29. package/dist/src/events/channels/pikku-command-channels.d.ts +2 -0
  30. package/dist/src/events/channels/pikku-command-channels.js +9 -0
  31. package/dist/src/events/channels/pikku-command-websocket-typed.d.ts +2 -0
  32. package/dist/src/events/channels/pikku-command-websocket-typed.js +15 -0
  33. package/dist/src/{serialize-typed-channel-map.js → events/channels/serialize-typed-channel-map.js} +2 -2
  34. package/dist/src/events/fetch/index.d.ts +2 -0
  35. package/dist/src/events/fetch/index.js +12 -0
  36. package/dist/src/events/functions/pikku-command-function-types.d.ts +2 -0
  37. package/dist/src/events/functions/pikku-command-function-types.js +13 -0
  38. package/dist/src/events/functions/pikku-command-functions.d.ts +6 -0
  39. package/dist/src/events/functions/pikku-command-functions.js +35 -0
  40. package/dist/src/events/functions/pikku-function-types.d.ts +2 -0
  41. package/dist/{bin → src/events/functions}/pikku-function-types.js +6 -6
  42. package/dist/src/events/functions/pikku-functions.d.ts +6 -0
  43. package/dist/{bin → src/events/functions}/pikku-functions.js +5 -5
  44. package/dist/src/events/http/pikku-command-http-map.d.ts +2 -0
  45. package/dist/src/events/http/pikku-command-http-map.js +8 -0
  46. package/dist/src/events/http/pikku-command-http-routes.d.ts +2 -0
  47. package/dist/src/events/http/pikku-command-http-routes.js +9 -0
  48. package/dist/src/events/http/pikku-command-nextjs.d.ts +2 -0
  49. package/dist/src/events/http/pikku-command-nextjs.js +36 -0
  50. package/dist/src/events/http/pikku-command-openapi.d.ts +2 -0
  51. package/dist/src/events/http/pikku-command-openapi.js +20 -0
  52. package/dist/src/events/http/pikku-http-routes.d.ts +2 -0
  53. package/dist/src/events/http/pikku-http-routes.js +9 -0
  54. package/dist/src/{serialize-typed-http-map.js → events/http/serialize-typed-http-map.js} +1 -1
  55. package/dist/src/events/mcp/pikku-command-mcp-json.d.ts +2 -0
  56. package/dist/src/events/mcp/pikku-command-mcp-json.js +13 -0
  57. package/dist/src/events/mcp/pikku-command-mcp.d.ts +2 -0
  58. package/dist/src/events/mcp/pikku-command-mcp.js +54 -0
  59. package/dist/src/events/mcp/serialize-mcp-json.d.ts +5 -0
  60. package/dist/src/events/mcp/serialize-mcp-json.js +101 -0
  61. package/dist/src/events/queue/pikku-command-queue-map.d.ts +2 -0
  62. package/dist/src/events/queue/pikku-command-queue-map.js +8 -0
  63. package/dist/src/events/queue/pikku-command-queue-service.d.ts +2 -0
  64. package/dist/src/events/queue/pikku-command-queue-service.js +12 -0
  65. package/dist/src/events/queue/pikku-command-queue.d.ts +2 -0
  66. package/dist/src/events/queue/pikku-command-queue.js +10 -0
  67. package/dist/src/events/queue/pikku-queue-map.d.ts +2 -0
  68. package/dist/src/events/queue/pikku-queue-map.js +8 -0
  69. package/dist/src/events/queue/pikku-queue.d.ts +2 -0
  70. package/dist/src/events/queue/pikku-queue.js +10 -0
  71. package/dist/src/events/queue/serialize-queue-map.d.ts +4 -0
  72. package/dist/src/events/queue/serialize-queue-map.js +77 -0
  73. package/dist/src/events/queue/serialize-queue-meta.d.ts +2 -0
  74. package/dist/src/events/queue/serialize-queue-meta.js +6 -0
  75. package/dist/src/events/queue/serialize-queue-wrapper.d.ts +1 -0
  76. package/dist/src/events/queue/serialize-queue-wrapper.js +35 -0
  77. package/dist/src/events/rpc/pikku-command-rpc-map.d.ts +2 -0
  78. package/dist/src/events/rpc/pikku-command-rpc-map.js +8 -0
  79. package/dist/src/events/rpc/pikku-command-rpc.d.ts +2 -0
  80. package/dist/src/events/rpc/pikku-command-rpc.js +6 -0
  81. package/dist/src/events/rpc/pikku-rpc.d.ts +2 -0
  82. package/dist/src/events/rpc/pikku-rpc.js +6 -0
  83. package/dist/src/{serialize-typed-rpc-map.d.ts → events/rpc/serialize-typed-rpc-map.d.ts} +1 -1
  84. package/dist/src/{serialize-typed-rpc-map.js → events/rpc/serialize-typed-rpc-map.js} +2 -2
  85. package/dist/src/events/scheduler/pikku-command-scheduler.d.ts +2 -0
  86. package/dist/src/events/scheduler/pikku-command-scheduler.js +10 -0
  87. package/dist/src/inspector-glob.d.ts +1 -1
  88. package/dist/src/inspector-glob.js +3 -3
  89. package/dist/src/pikku-cli-config.d.ts +8 -1
  90. package/dist/src/pikku-cli-config.js +59 -22
  91. package/dist/src/pikku-command-schemas.d.ts +2 -0
  92. package/dist/src/pikku-command-schemas.js +8 -0
  93. package/dist/src/runtimes/nextjs/pikku-command-nextjs.d.ts +2 -0
  94. package/dist/src/runtimes/nextjs/pikku-command-nextjs.js +36 -0
  95. package/dist/src/schema-generator.d.ts +3 -2
  96. package/dist/src/schema-generator.js +7 -7
  97. package/dist/src/schemas.d.ts +2 -0
  98. package/dist/src/schemas.js +8 -0
  99. package/dist/src/{utils/serialize-import-map.js → serialize-import-map.js} +3 -0
  100. package/dist/src/serialize-pikku-types.js +378 -1
  101. package/dist/src/types.d.ts +5 -0
  102. package/dist/src/types.js +1 -0
  103. package/dist/src/{utils/utils.d.ts → utils.d.ts} +17 -7
  104. package/dist/src/{utils/utils.js → utils.js} +47 -29
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +3 -3
  107. package/{bin → src/events/channels}/pikku-channels.ts +8 -3
  108. package/src/events/channels/pikku-command-channels-map.ts +26 -0
  109. package/src/events/channels/pikku-command-channels.ts +38 -0
  110. package/src/events/channels/pikku-command-websocket-typed.ts +36 -0
  111. package/src/{serialize-typed-channel-map.ts → events/channels/serialize-typed-channel-map.ts} +2 -2
  112. package/src/events/fetch/index.ts +33 -0
  113. package/src/events/functions/pikku-command-function-types.ts +48 -0
  114. package/src/events/functions/pikku-command-functions.ts +84 -0
  115. package/{bin → src/events/functions}/pikku-function-types.ts +12 -15
  116. package/{bin → src/events/functions}/pikku-functions.ts +9 -6
  117. package/src/events/http/pikku-command-http-map.ts +27 -0
  118. package/src/events/http/pikku-command-http-routes.ts +40 -0
  119. package/src/events/http/pikku-command-nextjs.ts +111 -0
  120. package/src/events/http/pikku-command-openapi.ts +54 -0
  121. package/{bin → src/events/http}/pikku-http-routes.ts +8 -3
  122. package/src/{serialize-typed-http-map.ts → events/http/serialize-typed-http-map.ts} +1 -1
  123. package/src/events/mcp/pikku-command-mcp-json.ts +33 -0
  124. package/src/events/mcp/pikku-command-mcp.ts +110 -0
  125. package/src/events/mcp/serialize-mcp-json.ts +159 -0
  126. package/src/events/queue/pikku-command-queue-map.ts +26 -0
  127. package/src/events/queue/pikku-command-queue-service.ts +33 -0
  128. package/src/events/queue/pikku-command-queue.ts +42 -0
  129. package/src/events/queue/pikku-queue-map.ts +26 -0
  130. package/src/events/queue/pikku-queue.ts +40 -0
  131. package/src/events/queue/serialize-queue-map.ts +119 -0
  132. package/src/events/queue/serialize-queue-meta.ts +10 -0
  133. package/src/events/queue/serialize-queue-wrapper.ts +35 -0
  134. package/src/events/rpc/pikku-command-rpc-map.ts +26 -0
  135. package/src/events/rpc/pikku-command-rpc.ts +22 -0
  136. package/{bin → src/events/rpc}/pikku-rpc.ts +8 -6
  137. package/src/{serialize-typed-rpc-map.ts → events/rpc/serialize-typed-rpc-map.ts} +4 -3
  138. package/{bin/pikku-scheduler.ts → src/events/scheduler/pikku-command-scheduler.ts} +11 -8
  139. package/src/inspector-glob.ts +3 -1
  140. package/src/pikku-cli-config.ts +93 -32
  141. package/src/pikku-command-schemas.ts +33 -0
  142. package/src/runtimes/nextjs/pikku-command-nextjs.ts +110 -0
  143. package/src/schema-generator.ts +8 -3
  144. package/src/schemas.ts +33 -0
  145. package/src/{utils/serialize-import-map.ts → serialize-import-map.ts} +5 -0
  146. package/src/serialize-pikku-types.ts +378 -1
  147. package/src/types.ts +16 -0
  148. package/src/{utils/utils.ts → utils.ts} +55 -31
  149. package/tsconfig.json +1 -1
  150. package/bin/pikku-channels-map.ts +0 -25
  151. package/bin/pikku-http-map.ts +0 -26
  152. package/bin/pikku-nextjs.test.ts +0 -279
  153. package/bin/pikku-rpc-map.ts +0 -25
  154. package/dist/bin/pikku-channels-map.d.ts +0 -3
  155. package/dist/bin/pikku-channels-map.js +0 -8
  156. package/dist/bin/pikku-channels.d.ts +0 -3
  157. package/dist/bin/pikku-channels.js +0 -9
  158. package/dist/bin/pikku-function-types.d.ts +0 -4
  159. package/dist/bin/pikku-functions.d.ts +0 -7
  160. package/dist/bin/pikku-http-map.d.ts +0 -3
  161. package/dist/bin/pikku-http-map.js +0 -8
  162. package/dist/bin/pikku-http-routes.d.ts +0 -3
  163. package/dist/bin/pikku-http-routes.js +0 -9
  164. package/dist/bin/pikku-rpc-map.d.ts +0 -3
  165. package/dist/bin/pikku-rpc-map.js +0 -8
  166. package/dist/bin/pikku-rpc.d.ts +0 -3
  167. package/dist/bin/pikku-rpc.js +0 -6
  168. package/dist/bin/pikku-scheduler.d.ts +0 -3
  169. package/dist/bin/pikku-scheduler.js +0 -10
  170. /package/dist/src/{serialize-typed-channel-map.d.ts → events/channels/serialize-typed-channel-map.d.ts} +0 -0
  171. /package/dist/src/{serialize-websocket-wrapper.d.ts → events/channels/serialize-websocket-wrapper.d.ts} +0 -0
  172. /package/dist/src/{serialize-websocket-wrapper.js → events/channels/serialize-websocket-wrapper.js} +0 -0
  173. /package/dist/src/{openapi-spec-generator.d.ts → events/http/openapi-spec-generator.d.ts} +0 -0
  174. /package/dist/src/{openapi-spec-generator.js → events/http/openapi-spec-generator.js} +0 -0
  175. /package/dist/src/{serialize-fetch-wrapper.d.ts → events/http/serialize-fetch-wrapper.d.ts} +0 -0
  176. /package/dist/src/{serialize-fetch-wrapper.js → events/http/serialize-fetch-wrapper.js} +0 -0
  177. /package/dist/src/{serialize-typed-http-map.d.ts → events/http/serialize-typed-http-map.d.ts} +0 -0
  178. /package/dist/src/{serialize-scheduler-meta.d.ts → events/scheduler/serialize-scheduler-meta.d.ts} +0 -0
  179. /package/dist/src/{serialize-scheduler-meta.js → events/scheduler/serialize-scheduler-meta.js} +0 -0
  180. /package/dist/src/{serialize-nextjs-backend-wrapper.d.ts → runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts} +0 -0
  181. /package/dist/src/{serialize-nextjs-backend-wrapper.js → runtimes/nextjs/serialize-nextjs-backend-wrapper.js} +0 -0
  182. /package/dist/src/{serialize-nextjs-http-wrapper.d.ts → runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts} +0 -0
  183. /package/dist/src/{serialize-nextjs-http-wrapper.js → runtimes/nextjs/serialize-nextjs-http-wrapper.js} +0 -0
  184. /package/dist/src/{utils/serialize-import-map.d.ts → serialize-import-map.d.ts} +0 -0
  185. /package/src/{serialize-websocket-wrapper.ts → events/channels/serialize-websocket-wrapper.ts} +0 -0
  186. /package/src/{openapi-spec-generator.ts → events/http/openapi-spec-generator.ts} +0 -0
  187. /package/src/{serialize-fetch-wrapper.ts → events/http/serialize-fetch-wrapper.ts} +0 -0
  188. /package/src/{serialize-scheduler-meta.ts → events/scheduler/serialize-scheduler-meta.ts} +0 -0
  189. /package/src/{serialize-nextjs-backend-wrapper.ts → runtimes/nextjs/serialize-nextjs-backend-wrapper.ts} +0 -0
  190. /package/src/{serialize-nextjs-http-wrapper.ts → runtimes/nextjs/serialize-nextjs-http-wrapper.ts} +0 -0
@@ -11,43 +11,158 @@ import { CoreAPIFunction, CoreAPIFunctionSessionless } from '@pikku/core/functio
11
11
  import { CoreHTTPFunctionRoute, AssertRouteParams, addHTTPRoute as addCoreHTTPRoute } from '@pikku/core/http'
12
12
  import { CoreScheduledTask, addScheduledTask as addCoreScheduledTask } from '@pikku/core/scheduler'
13
13
  import { CoreAPIChannel, PikkuChannel, addChannel as addCoreChannel } from '@pikku/core/channel'
14
+ import { CoreQueueWorker, addQueueWorker as addCoreQueueWorker } from '@pikku/core/queue'
15
+ import { CoreMCPResource, CoreMCPTool, CoreMCPPrompt, addMCPResource as addCoreMCPResource, addMCPTool as addCoreMCPTool, addMCPPrompt as addCoreMCPPrompt, MCPResourceResponse, MCPToolResponse, MCPPromptResponse, PikkuMCP } from '@pikku/core'
14
16
 
15
17
  ${userSessionTypeImport}
16
18
  ${singletonServicesTypeImport}
17
19
  ${sessionServicesTypeImport}
18
20
  ${rpcMapTypeImport}
19
21
 
22
+ /**
23
+ * Type-safe API permission definition that integrates with your application's session type.
24
+ * Use this to define authorization logic for your API endpoints.
25
+ *
26
+ * @template In - The input type that the permission check will receive
27
+ * @template RequiredServices - The services required for this permission check
28
+ */
20
29
  export type APIPermission<In = unknown, RequiredServices extends ${singletonServicesTypeName} = ${singletonServicesTypeName}> = CoreAPIPermission<In, RequiredServices, ${userSessionTypeName}>
30
+
31
+ /**
32
+ * Type-safe middleware definition that can access your application's services and session.
33
+ * Use this to define reusable middleware that can be applied to multiple routes.
34
+ *
35
+ * @template RequiredServices - The services required for this middleware
36
+ */
21
37
  export type APIMiddleware<RequiredServices extends ${singletonServicesTypeName} = ${singletonServicesTypeName}> = PikkuMiddleware<RequiredServices, ${userSessionTypeName}>
22
38
 
39
+ /**
40
+ * A sessionless API function that doesn't require user authentication.
41
+ * Use this for public endpoints, health checks, or operations that don't need user context.
42
+ *
43
+ * @template In - The input type
44
+ * @template Out - The output type that the function returns
45
+ * @template ChannelData - Channel data type (null = optional channel)
46
+ * @template MCPData - MCP data type (null = optional MCP)
47
+ * @template RequiredServices - Services required by this function
48
+ */
23
49
  type APIFunctionSessionless<
24
50
  In = unknown,
25
51
  Out = never,
26
52
  ChannelData = null, // null means optional channel
53
+ MCPData = null, // null means optional MCP
27
54
  RequiredServices extends Services = Services &
28
55
  { rpc: TypedPikkuRPC } & (
29
56
  [ChannelData] extends [null]
30
57
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
31
58
  : { channel: PikkuChannel<ChannelData, Out> } // Required channel with any data type
59
+ ) & ([MCPData] extends [null]
60
+ ? { mcp?: PikkuMCP } // Optional MCP
61
+ : { mcp: PikkuMCP } // Required MCP
32
62
  )
33
63
  > = CoreAPIFunctionSessionless<In, Out, ChannelData, RequiredServices, ${userSessionTypeName}>
34
64
 
65
+ /**
66
+ * A session-aware API function that requires user authentication.
67
+ * Use this for protected endpoints that need access to user session data.
68
+ *
69
+ * @template In - The input type
70
+ * @template Out - The output type that the function returns
71
+ * @template ChannelData - Channel data type (null = optional channel)
72
+ * @template MCPData - MCP data type (null = optional MCP)
73
+ * @template RequiredServices - Services required by this function
74
+ */
35
75
  type APIFunction<
36
76
  In = unknown,
37
77
  Out = never,
38
78
  ChannelData = null, // null means optional channel
79
+ MCPData = null, // null means optional MCP
39
80
  RequiredServices extends Services = Services &
40
81
  { rpc: TypedPikkuRPC } & (
41
82
  [ChannelData] extends [null]
42
83
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
43
84
  : { channel: PikkuChannel<ChannelData, Out> } // Required channel with any data type
85
+ ) & ([MCPData] extends [null]
86
+ ? { mcp?: PikkuMCP } // Optional MCP
87
+ : { mcp: PikkuMCP } // Required MCP
44
88
  )
45
89
  > = CoreAPIFunction<In, Out, ChannelData, RequiredServices, ${userSessionTypeName}>
46
90
 
91
+ /**
92
+ * Type definition for HTTP API routes with type-safe path parameters.
93
+ * Supports both authenticated and unauthenticated functions.
94
+ *
95
+ * @template In - Input type for the route
96
+ * @template Out - Output type for the route
97
+ * @template Route - String literal type for the route path (e.g., "/users/:id")
98
+ */
47
99
  type APIRoute<In, Out, Route extends string> = CoreHTTPFunctionRoute<In, Out, Route, APIFunction<In, Out>, APIFunctionSessionless<In, Out>, APIPermission<In>, APIMiddleware>
100
+
101
+ /**
102
+ * Type definition for WebSocket channels with typed data exchange.
103
+ * Supports connection, disconnection, and message handling.
104
+ *
105
+ * @template ChannelData - Type of data exchanged through the channel
106
+ * @template Channel - String literal type for the channel name
107
+ */
48
108
  type APIChannel<ChannelData, Channel extends string> = CoreAPIChannel<ChannelData, Channel, APIFunction<void, unknown> | APIFunction<void, unknown, ChannelData>, APIFunction<void, void> | APIFunction<void, void, ChannelData>, APIFunction<any, any> | APIFunction<any, any, ChannelData>, APIPermission>
49
- type ScheduledTask = CoreScheduledTask<APIFunctionSessionless<void, void>, ${userSessionTypeName}>
50
109
 
110
+ /**
111
+ * Type definition for scheduled tasks that run at specified intervals.
112
+ * These are sessionless functions that execute based on cron expressions.
113
+ */
114
+ type ScheduledTask = CoreScheduledTask<APIFunctionSessionless<void, void>>
115
+
116
+ /**
117
+ * Type definition for queue workers that process background jobs.
118
+ *
119
+ * @template In - Input type for the queue job
120
+ * @template Out - Output type for the queue job
121
+ */
122
+ type QueueWorker<In, Out> = CoreQueueWorker<APIFunctionSessionless<In, Out>>
123
+
124
+ /**
125
+ * Type definition for MCP resources that provide data to AI models.
126
+ *
127
+ * @template In - Input type for the resource request
128
+ */
129
+ type MCPResource<In> = CoreMCPResource<APIFunctionSessionless<In, MCPResourceResponse, null, true>>
130
+
131
+ /**
132
+ * Type definition for MCP tools that AI models can invoke.
133
+ *
134
+ * @template In - Input type for the tool invocation
135
+ */
136
+ type MCPTool<In> = CoreMCPTool<APIFunctionSessionless<In, MCPToolResponse, null, true>>
137
+
138
+ /**
139
+ * Type definition for MCP prompts that provide templates to AI models.
140
+ *
141
+ * @template In - Input type for the prompt parameters
142
+ */
143
+ type MCPPrompt<In> = CoreMCPPrompt<APIFunctionSessionless<In, MCPPromptResponse, null, true>>
144
+
145
+ /**
146
+ * Creates a Pikku function that can be either session-aware or sessionless.
147
+ * This is the main function wrapper for creating API endpoints.
148
+ *
149
+ * @template In - Input type for the function
150
+ * @template Out - Output type for the function
151
+ * @param func - Function definition, either direct function or configuration object
152
+ * @returns The unwrapped function for internal use
153
+ *
154
+ * @example
155
+ * \\\`\\\`\\\`typescript
156
+ * const createUser = pikkuFunc<{name: string, email: string}, {id: number, message: string}>({
157
+ * func: async ({db, logger}, input) => {
158
+ * logger.info('Creating user', input.name)
159
+ * const user = await db.users.create(input)
160
+ * return {id: user.id, message: \\\`User \\\${input.name} created successfully\\\`}
161
+ * },
162
+ * auth: true
163
+ * })
164
+ * \\\`\\\`\\\`
165
+ */
51
166
  export const pikkuFunc = <In, Out = unknown>(
52
167
  func:
53
168
  | APIFunction<In, Out>
@@ -65,6 +180,26 @@ export const pikkuFunc = <In, Out = unknown>(
65
180
  return typeof func === 'function' ? func : func.func
66
181
  }
67
182
 
183
+ /**
184
+ * Creates a sessionless Pikku function that doesn't require user authentication.
185
+ * Use this for public endpoints, webhooks, or background tasks.
186
+ *
187
+ * @template In - Input type for the function
188
+ * @template Out - Output type for the function
189
+ * @param func - Function definition, either direct function or configuration object
190
+ * @returns The unwrapped function for internal use
191
+ *
192
+ * @example
193
+ * \\\`\\\`\\\`typescript
194
+ * const healthCheck = pikkuSessionlessFunc<void, {status: string, timestamp: string}>({
195
+ * func: async ({logger}) => {
196
+ * logger.info('Health check requested')
197
+ * return {status: 'healthy', timestamp: new Date().toISOString()}
198
+ * },
199
+ * name: 'healthCheck'
200
+ * })
201
+ * \\\`\\\`\\\`
202
+ */
68
203
  export const pikkuSessionlessFunc = <In, Out = unknown>(
69
204
  func:
70
205
  | APIFunctionSessionless<In, Out>
@@ -76,6 +211,26 @@ export const pikkuSessionlessFunc = <In, Out = unknown>(
76
211
  return typeof func === 'function' ? func : func.func
77
212
  }
78
213
 
214
+ /**
215
+ * Creates a function that handles WebSocket channel connections.
216
+ * Called when a client connects to a channel.
217
+ *
218
+ * @template Out - Output type for connection response
219
+ * @template ChannelData - Type of data associated with the channel
220
+ * @param func - Function definition, either direct function or configuration object
221
+ * @returns The unwrapped function for internal use
222
+ *
223
+ * @example
224
+ * \\\`\\\`\\\`typescript
225
+ * const onChatConnect = pikkuChannelConnectionFunc<string>({
226
+ * func: async ({logger, channel, eventHub}) => {
227
+ * logger.info('User connected to chat')
228
+ * await eventHub.publish('chat:join', channel.channelId, {channelId: channel.channelId})
229
+ * return 'Welcome to the chat!'
230
+ * }
231
+ * })
232
+ * \\\`\\\`\\\`
233
+ */
79
234
  export const pikkuChannelConnectionFunc = <Out = unknown, ChannelData = unknown>(
80
235
  func:
81
236
  | APIFunctionSessionless<void, Out, ChannelData>
@@ -87,6 +242,24 @@ export const pikkuChannelConnectionFunc = <Out = unknown, ChannelData = unknown>
87
242
  return typeof func === 'function' ? func : func.func
88
243
  }
89
244
 
245
+ /**
246
+ * Creates a function that handles WebSocket channel disconnections.
247
+ * Called when a client disconnects from a channel.
248
+ *
249
+ * @template ChannelData - Type of data associated with the channel
250
+ * @param func - Function definition, either direct function or configuration object
251
+ * @returns The unwrapped function for internal use
252
+ *
253
+ * @example
254
+ * \\\`\\\`\\\`typescript
255
+ * const onChatDisconnect = pikkuChannelDisconnectionFunc({
256
+ * func: async ({logger, channel, eventHub}) => {
257
+ * logger.info('User disconnected from chat')
258
+ * await eventHub.publish('chat:join', channel.channelId, {channelId: channel.channelId})
259
+ * }
260
+ * })
261
+ * \\\`\\\`\\\`
262
+ */
90
263
  export const pikkuChannelDisconnectionFunc = <ChannelData = unknown>(
91
264
  func:
92
265
  | APIFunctionSessionless<void, void, ChannelData>
@@ -98,6 +271,25 @@ export const pikkuChannelDisconnectionFunc = <ChannelData = unknown>(
98
271
  return typeof func === 'function' ? func : func.func
99
272
  }
100
273
 
274
+ /**
275
+ * Creates a function that handles WebSocket channel messages.
276
+ * Called when a message is received on a channel.
277
+ *
278
+ * @template In - Input type for channel messages
279
+ * @template Out - Output type for channel responses
280
+ * @template ChannelData - Type of data associated with the channel
281
+ * @param func - Function definition, either direct function or configuration object
282
+ * @returns The unwrapped function for internal use
283
+ *
284
+ * @example
285
+ * \\\`\\\`\\\`typescript
286
+ * const handleChatMessage = pikkuChannelFunc<{message: string}, void>({
287
+ * func: async ({logger, channel}, input) => {
288
+ * logger.info('Chat message received:', input.message)
289
+ * }
290
+ * })
291
+ * \\\`\\\`\\\`
292
+ */
101
293
  export const pikkuChannelFunc = <In = unknown, Out = unknown, ChannelData = unknown>(
102
294
  func:
103
295
  | APIFunctionSessionless<In, Out, ChannelData>
@@ -109,6 +301,22 @@ export const pikkuChannelFunc = <In = unknown, Out = unknown, ChannelData = unkn
109
301
  return typeof func === 'function' ? func : func.func
110
302
  }
111
303
 
304
+ /**
305
+ * Creates a function that takes no input and returns no output.
306
+ * Useful for health checks, triggers, or cleanup operations.
307
+ *
308
+ * @param func - Function definition, either direct function or configuration object
309
+ * @returns The unwrapped function for internal use
310
+ *
311
+ * @example
312
+ * \\\`\\\`\\\`typescript
313
+ * const cleanupTempFiles = pikkuVoidFunc(async ({fileSystem, logger}) => {
314
+ * logger.info('Starting cleanup of temporary files')
315
+ * await fileSystem.deleteDirectory('/tmp/uploads')
316
+ * logger.info('Cleanup completed')
317
+ * })
318
+ * \\\`\\\`\\\`
319
+ */
112
320
  export const pikkuVoidFunc = (
113
321
  func:
114
322
  | APIFunctionSessionless<void, void>
@@ -120,20 +328,189 @@ export const pikkuVoidFunc = (
120
328
  return typeof func === 'function' ? func : func.func
121
329
  }
122
330
 
331
+ /**
332
+ * Registers a WebSocket channel with the Pikku framework.
333
+ *
334
+ * @template ChannelData - Type of data associated with the channel
335
+ * @template Channel - String literal type for the channel name
336
+ * @param channel - Channel definition with connection, disconnection, and message handlers
337
+ */
123
338
  export const addChannel = <ChannelData, Channel extends string>(
124
339
  channel: APIChannel<ChannelData, Channel> & AssertRouteParams<ChannelData, Channel>
125
340
  ) => {
126
341
  addCoreChannel(channel as any) // TODO
127
342
  }
128
343
 
344
+ /**
345
+ * Registers an HTTP route with the Pikku framework.
346
+ *
347
+ * @template In - Input type for the route
348
+ * @template Out - Output type for the route
349
+ * @template Route - String literal type for the route path (e.g., "/users/:id")
350
+ * @param route - Route definition with handler, method, and optional middleware
351
+ */
129
352
  export const addHTTPRoute = <In, Out, Route extends string>(
130
353
  route: APIRoute<In, Out, Route> & AssertRouteParams<In, Route>
131
354
  ) => {
132
355
  addCoreHTTPRoute(route)
133
356
  }
134
357
 
358
+ /**
359
+ * Registers a scheduled task with the Pikku framework.
360
+ * Tasks run based on cron expressions and are sessionless.
361
+ *
362
+ * @param task - Scheduled task definition with cron expression and handler
363
+ */
135
364
  export const addScheduledTask = (task: ScheduledTask) => {
136
365
  addCoreScheduledTask(task as any) // TODO
137
366
  }
367
+
368
+ /**
369
+ * Registers a queue worker with the Pikku framework.
370
+ * Workers process background jobs from queues.
371
+ *
372
+ * @param queueWorker - Queue worker definition with job handler
373
+ */
374
+ export const addQueueWorker = (queueWorker: QueueWorker<any, any>) => {
375
+ addCoreQueueWorker(queueWorker as any) // TODO
376
+ }
377
+
378
+ /**
379
+ * Registers an MCP resource with the Pikku framework.
380
+ * Resources provide data that AI models can access.
381
+ *
382
+ * @template In - Input type for the resource request
383
+ * @param mcpResource - MCP resource definition with data provider function
384
+ */
385
+ export const addMCPResource = <In>(
386
+ mcpResource: MCPResource<In>
387
+ ) => {
388
+ addCoreMCPResource(mcpResource as any)
389
+ }
390
+
391
+ /**
392
+ * Registers an MCP tool with the Pikku framework.
393
+ * Tools are functions that AI models can invoke.
394
+ *
395
+ * @template In - Input type for the tool invocation
396
+ * @param mcpTool - MCP tool definition with action function
397
+ */
398
+ export const addMCPTool = <In>(
399
+ mcpTool: MCPTool<In>
400
+ ) => {
401
+ addCoreMCPTool(mcpTool as any)
402
+ }
403
+
404
+ /**
405
+ * Registers an MCP prompt with the Pikku framework.
406
+ * Prompts provide templates that AI models can use.
407
+ *
408
+ * @template In - Input type for the prompt parameters
409
+ * @param mcpPrompt - MCP prompt definition with template function
410
+ */
411
+ export const addMCPPrompt = <In>(
412
+ mcpPrompt: MCPPrompt<In>
413
+ ) => {
414
+ addCoreMCPPrompt(mcpPrompt as any)
415
+ }
416
+
417
+ /**
418
+ * Creates a function for handling MCP prompt requests.
419
+ * These functions generate prompt templates for AI models.
420
+ *
421
+ * @template In - Input type for the prompt parameters
422
+ * @param func - Function definition, either direct function or configuration object
423
+ * @returns The unwrapped function for internal use
424
+ *
425
+ * @example
426
+ * \`\`\`typescript
427
+ * const codeReviewPrompt = pikkuMCPPromptFunc<{language: string, code: string}>({
428
+ * func: async ({}, input) => ({
429
+ * messages: [{
430
+ * role: 'user',
431
+ * content: {
432
+ * type: 'text',
433
+ * text: \`Please review this \${input.language} code: \${input.code}\`
434
+ * }
435
+ * }]
436
+ * })
437
+ * })
438
+ * \`\`\`
439
+ */
440
+ export const pikkuMCPPromptFunc = <In>(
441
+ func:
442
+ | APIFunctionSessionless<In, MCPPromptResponse>
443
+ | {
444
+ func: APIFunctionSessionless<In, MCPPromptResponse>
445
+ name?: string
446
+ }
447
+ ) => {
448
+ return typeof func === 'function' ? func : func.func
449
+ }
450
+
451
+ /**
452
+ * Creates a function for handling MCP tool invocations.
453
+ * These functions perform actions that AI models can request.
454
+ *
455
+ * @template In - Input type for the tool invocation
456
+ * @param func - Function definition, either direct function or configuration object
457
+ * @returns The unwrapped function for internal use
458
+ *
459
+ * @example
460
+ * \`\`\`typescript
461
+ * const searchFiles = pikkuMCPToolFunc<{query: string, directory: string}>({
462
+ * func: async ({fileSystem}, input) => {
463
+ * const results = await fileSystem.search(input.query, input.directory)
464
+ * return [{
465
+ * type: 'text',
466
+ * text: \`Found \${results.length} files matching \"\${input.query}\"\`
467
+ * }]
468
+ * }
469
+ * })
470
+ * \`\`\`
471
+ */
472
+ export const pikkuMCPToolFunc = <In>(
473
+ func:
474
+ | APIFunctionSessionless<In, MCPToolResponse, null, true>
475
+ | {
476
+ func: APIFunctionSessionless<In, MCPToolResponse, null, true>
477
+ name?: string
478
+ }
479
+ ) => {
480
+ return typeof func === 'function' ? func : func.func
481
+ }
482
+
483
+ /**
484
+ * Creates a function for handling MCP resource requests.
485
+ * These functions provide data that AI models can access.
486
+ *
487
+ * @template In - Input type for the resource request
488
+ * @param func - Function definition, either direct function or configuration object
489
+ * @returns The unwrapped function for internal use
490
+ *
491
+ * @example
492
+ * \`\`\`typescript
493
+ * const getProjectFiles = pikkuMCPResourceFunc<{path: string}>({
494
+ * func: async ({ fileSystem }, input) => {
495
+ * const fileContent = await fileSystem.readFile(input.path)
496
+ * return [{
497
+ * uri: \`file://\${input.path}\`,
498
+ * mimeType: 'text/plain',
499
+ * text: fileContent
500
+ * }]
501
+ * }
502
+ * })
503
+ * \`\`\`
504
+ */
505
+ export const pikkuMCPResourceFunc = <In>(
506
+ func:
507
+ | APIFunctionSessionless<In, MCPResourceResponse, null, true>
508
+ | {
509
+ func: APIFunctionSessionless<In, MCPResourceResponse, null, true>
510
+ name?: string
511
+ }
512
+ ) => {
513
+ return typeof func === 'function' ? func : func.func
514
+ }
138
515
  `;
139
516
  };
@@ -0,0 +1,5 @@
1
+ import { InspectorState } from '@pikku/inspector';
2
+ import { PikkuCLIConfig } from './pikku-cli-config.js';
3
+ import { CLILogger, PikkuCLIOptions } from './utils.js';
4
+ export type PikkuCommand = (logger: CLILogger, cliConfig: PikkuCLIConfig, visitState: InspectorState, options?: PikkuCLIOptions) => Promise<boolean>;
5
+ export type PikkuCommandWithoutState = (logger: CLILogger, cliConfig: PikkuCLIConfig, options?: PikkuCLIOptions) => Promise<boolean>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,15 @@
1
1
  import { InspectorState, TypesMap } from '@pikku/inspector';
2
- export declare const logPrimary: (message: string) => void;
3
- export declare const logSuccess: (message: string) => void;
4
- export declare const logInfo: (message: string) => void;
2
+ export declare class CLILogger {
3
+ constructor({ logLogo }: {
4
+ logLogo: boolean;
5
+ });
6
+ primary(message: string): void;
7
+ success(message: string): void;
8
+ info(message: string): void;
9
+ error(message: string): void;
10
+ warn(message: string): void;
11
+ private logPikkuLogo;
12
+ }
5
13
  export declare const getFileImportRelativePath: (from: string, to: string, packageMappings: Record<string, string>) => string;
6
14
  interface Meta {
7
15
  file: string;
@@ -26,7 +34,7 @@ export interface PikkuCLIOptions {
26
34
  sessionServicesFactoryType?: string;
27
35
  tags?: string[];
28
36
  }
29
- export declare const getPikkuFilesAndMethods: ({ singletonServicesTypeImportMap, sessionServicesTypeImportMap, userSessionTypeImportMap, sessionServicesFactories, singletonServicesFactories, configFactories, }: InspectorState, packageMappings: Record<string, string>, outputFile: string, { configFileType, singletonServicesFactoryType, sessionServicesFactoryType, }: PikkuCLIOptions, requires?: Partial<{
37
+ export declare const getPikkuFilesAndMethods: (logger: CLILogger, { singletonServicesTypeImportMap, sessionServicesTypeImportMap, userSessionTypeImportMap, sessionServicesFactories, singletonServicesFactories, configFactories, }: InspectorState, packageMappings: Record<string, string>, outputFile: string, { configFileType, singletonServicesFactoryType, sessionServicesFactoryType, }: PikkuCLIOptions, requires?: Partial<{
30
38
  config: boolean;
31
39
  sessionServiceType: boolean;
32
40
  singletonServicesType: boolean;
@@ -34,9 +42,11 @@ export declare const getPikkuFilesAndMethods: ({ singletonServicesTypeImportMap,
34
42
  singletonServicesFactory: boolean;
35
43
  sessionServicesFactory: boolean;
36
44
  }>) => Promise<FilesAndMethods>;
37
- export declare const writeFileInDir: (path: string, content: string, ignoreModifyComment?: boolean) => Promise<void>;
38
- export declare const logCommandInfoAndTime: (commandStart: string, commandEnd: string, [skipCondition, skipMessage]: [boolean] | [boolean, string], callback: (...args: any[]) => Promise<unknown>) => Promise<boolean>;
39
- export declare const logPikkuLogo: () => void;
45
+ export declare const writeFileInDir: (logger: CLILogger, path: string, content: string, { ignoreModifyComment, logWrite, }?: {
46
+ ignoreModifyComment?: boolean;
47
+ logWrite?: boolean;
48
+ }) => Promise<void>;
49
+ export declare const logCommandInfoAndTime: (logger: CLILogger, commandStart: string, commandEnd: string, [skipCondition, skipMessage]: [boolean] | [boolean, string], callback: (...args: any[]) => Promise<unknown>) => Promise<boolean>;
40
50
  export declare const DO_NOT_MODIFY_COMMENT = "/**\n * This file was generated by the @pikku/cli\n */\n";
41
51
  export declare const serializeFileImports: (importType: string, outputPath: string, files: Set<string>, packageMappings?: Record<string, string>) => string;
42
52
  export declare function generateCustomTypes(typesMap: TypesMap, requiredTypes: Set<string>): string;
@@ -4,15 +4,41 @@ import chalk from 'chalk';
4
4
  import { fileURLToPath } from 'url';
5
5
  import { readFileSync } from 'fs';
6
6
  const __filename = fileURLToPath(import.meta.url);
7
- export const logPrimary = (message) => {
8
- console.log(chalk.green(message));
9
- };
10
- export const logSuccess = (message) => {
11
- console.log(chalk.green(message));
12
- };
13
- export const logInfo = (message) => {
14
- console.log(chalk.blue(message));
15
- };
7
+ const logo = `
8
+ ______ _ _ _
9
+ (_____ (_) | | |
10
+ _____) )| | _| | _ _ _
11
+ | ____/ | |_/ ) |_/ ) | | |
12
+ | | | | _ (| _ (| |_| |
13
+ |_| |_|_| \_)_| \_)____/
14
+ `;
15
+ export class CLILogger {
16
+ constructor({ logLogo }) {
17
+ if (logLogo) {
18
+ this.logPikkuLogo();
19
+ }
20
+ }
21
+ primary(message) {
22
+ console.log(chalk.green(message));
23
+ }
24
+ success(message) {
25
+ console.log(chalk.green(message));
26
+ }
27
+ info(message) {
28
+ console.log(chalk.blue(message));
29
+ }
30
+ error(message) {
31
+ console.error(chalk.red(message));
32
+ }
33
+ warn(message) {
34
+ console.error(chalk.yellow(message));
35
+ }
36
+ logPikkuLogo() {
37
+ this.primary(logo);
38
+ const packageJson = JSON.parse(readFileSync(`${dirname(__filename)}/../../package.json`, 'utf-8'));
39
+ this.primary(`⚙️ Welcome to the Pikku CLI (v${packageJson.version})\n`);
40
+ }
41
+ }
16
42
  export const getFileImportRelativePath = (from, to, packageMappings) => {
17
43
  let filePath = relative(dirname(from), to);
18
44
  if (!/^\.+\//.test(filePath)) {
@@ -60,7 +86,7 @@ const getMetaTypes = (type, errors, map, desiredType) => {
60
86
  }
61
87
  return undefined;
62
88
  };
63
- export const getPikkuFilesAndMethods = async ({ singletonServicesTypeImportMap, sessionServicesTypeImportMap, userSessionTypeImportMap, sessionServicesFactories, singletonServicesFactories, configFactories, }, packageMappings, outputFile, { configFileType, singletonServicesFactoryType, sessionServicesFactoryType, }, requires = {
89
+ export const getPikkuFilesAndMethods = async (logger, { singletonServicesTypeImportMap, sessionServicesTypeImportMap, userSessionTypeImportMap, sessionServicesFactories, singletonServicesFactories, configFactories, }, packageMappings, outputFile, { configFileType, singletonServicesFactoryType, sessionServicesFactoryType, }, requires = {
64
90
  config: false,
65
91
  singletonServicesType: false,
66
92
  sessionServiceType: false,
@@ -86,12 +112,15 @@ export const getPikkuFilesAndMethods = async ({ singletonServicesTypeImportMap,
86
112
  result.push(`\t* methods: ${methods.map(({ variable, type }) => `${variable}: ${type}`).join(', ')}`);
87
113
  }
88
114
  });
89
- console.error(result.join('\n'));
115
+ logger.error(result.join('\n'));
90
116
  process.exit(1);
91
117
  }
92
118
  return result;
93
119
  };
94
- export const writeFileInDir = async (path, content, ignoreModifyComment = false) => {
120
+ export const writeFileInDir = async (logger, path, content, { ignoreModifyComment = false, logWrite = true, } = {}) => {
121
+ if (path.includes('.json')) {
122
+ ignoreModifyComment = true;
123
+ }
95
124
  if (content.includes('server-only')) {
96
125
  content = content.replace("'server-only'", `'server-only'\n\n${ignoreModifyComment ? '' : DO_NOT_MODIFY_COMMENT}`);
97
126
  }
@@ -100,32 +129,21 @@ export const writeFileInDir = async (path, content, ignoreModifyComment = false)
100
129
  }
101
130
  await mkdir(dirname(path), { recursive: true });
102
131
  await writeFile(path, content, 'utf-8');
103
- logSuccess(`✓ File written to ${path}`);
132
+ if (logWrite) {
133
+ logger.success(`✓ File written to ${path}`);
134
+ }
104
135
  };
105
- export const logCommandInfoAndTime = async (commandStart, commandEnd, [skipCondition, skipMessage = 'none found'], callback) => {
136
+ export const logCommandInfoAndTime = async (logger, commandStart, commandEnd, [skipCondition, skipMessage = 'none found'], callback) => {
106
137
  if (skipCondition === true) {
107
- logInfo(`• Skipping ${commandStart.charAt(0).toLocaleLowerCase()}${commandStart.slice(1)} since ${skipMessage}.`);
138
+ logger.info(`• Skipping ${commandStart.charAt(0).toLocaleLowerCase()}${commandStart.slice(1)} since ${skipMessage}.`);
108
139
  return false;
109
140
  }
110
141
  const start = Date.now();
111
142
  chalk.blue(`• ${commandStart}...`);
112
143
  await callback();
113
- logSuccess(`✓ ${commandEnd} in ${Date.now() - start}ms.`);
144
+ logger.success(`✓ ${commandEnd} in ${Date.now() - start}ms.`);
114
145
  return true;
115
146
  };
116
- const logo = `
117
- ______ _ _ _
118
- (_____ (_) | | |
119
- _____) )| | _| | _ _ _
120
- | ____/ | |_/ ) |_/ ) | | |
121
- | | | | _ (| _ (| |_| |
122
- |_| |_|_| \_)_| \_)____/
123
- `;
124
- export const logPikkuLogo = () => {
125
- logPrimary(logo);
126
- const packageJson = JSON.parse(readFileSync(`${dirname(__filename)}/../../../package.json`, 'utf-8'));
127
- logPrimary(`⚙️ Welcome to the Pikku CLI (v${packageJson.version})\n`);
128
- };
129
147
  // TODO: add version back in once the ESM dust settles
130
148
  export const DO_NOT_MODIFY_COMMENT = `/**
131
149
  * This file was generated by the @pikku/cli
@@ -1 +1 @@
1
- {"root":["../bin/pikku-all.ts","../bin/pikku-channels-map.ts","../bin/pikku-channels.ts","../bin/pikku-fetch.ts","../bin/pikku-function-types.ts","../bin/pikku-functions.ts","../bin/pikku-http-map.ts","../bin/pikku-http-routes.ts","../bin/pikku-nextjs.ts","../bin/pikku-openapi.ts","../bin/pikku-rpc-map.ts","../bin/pikku-rpc.ts","../bin/pikku-scheduler.ts","../bin/pikku-schemas.ts","../bin/pikku-websocket.ts","../bin/pikku.ts","../src/inspector-glob.ts","../src/openapi-spec-generator.ts","../src/pikku-cli-config.ts","../src/schema-generator.ts","../src/serialize-fetch-wrapper.ts","../src/serialize-nextjs-backend-wrapper.ts","../src/serialize-nextjs-http-wrapper.ts","../src/serialize-pikku-types.ts","../src/serialize-scheduler-meta.ts","../src/serialize-typed-channel-map.ts","../src/serialize-typed-http-map.ts","../src/serialize-typed-rpc-map.ts","../src/serialize-websocket-wrapper.ts","../src/utils/serialize-import-map.ts","../src/utils/utils.ts"],"version":"5.7.3"}
1
+ {"root":["../bin/pikku-all.ts","../bin/pikku-fetch.ts","../bin/pikku-nextjs.ts","../bin/pikku-openapi.ts","../bin/pikku-queue-service.ts","../bin/pikku-schemas.ts","../bin/pikku-websocket.ts","../bin/pikku.ts","../src/inspector-glob.ts","../src/pikku-cli-config.ts","../src/pikku-command-schemas.ts","../src/schema-generator.ts","../src/schemas.ts","../src/serialize-import-map.ts","../src/serialize-pikku-types.ts","../src/types.ts","../src/utils.ts","../src/events/channels/pikku-channels.ts","../src/events/channels/pikku-command-channels-map.ts","../src/events/channels/pikku-command-channels.ts","../src/events/channels/pikku-command-websocket-typed.ts","../src/events/channels/serialize-typed-channel-map.ts","../src/events/channels/serialize-websocket-wrapper.ts","../src/events/fetch/index.ts","../src/events/functions/pikku-command-function-types.ts","../src/events/functions/pikku-command-functions.ts","../src/events/functions/pikku-function-types.ts","../src/events/functions/pikku-functions.ts","../src/events/http/openapi-spec-generator.ts","../src/events/http/pikku-command-http-map.ts","../src/events/http/pikku-command-http-routes.ts","../src/events/http/pikku-command-nextjs.ts","../src/events/http/pikku-command-openapi.ts","../src/events/http/pikku-http-routes.ts","../src/events/http/serialize-fetch-wrapper.ts","../src/events/http/serialize-typed-http-map.ts","../src/events/mcp/pikku-command-mcp-json.ts","../src/events/mcp/pikku-command-mcp.ts","../src/events/mcp/serialize-mcp-json.ts","../src/events/queue/pikku-command-queue-map.ts","../src/events/queue/pikku-command-queue-service.ts","../src/events/queue/pikku-command-queue.ts","../src/events/queue/pikku-queue-map.ts","../src/events/queue/pikku-queue.ts","../src/events/queue/serialize-queue-map.ts","../src/events/queue/serialize-queue-meta.ts","../src/events/queue/serialize-queue-wrapper.ts","../src/events/rpc/pikku-command-rpc-map.ts","../src/events/rpc/pikku-command-rpc.ts","../src/events/rpc/pikku-rpc.ts","../src/events/rpc/serialize-typed-rpc-map.ts","../src/events/scheduler/pikku-command-scheduler.ts","../src/events/scheduler/serialize-scheduler-meta.ts","../src/runtimes/nextjs/pikku-command-nextjs.ts","../src/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/runtimes/nextjs/serialize-nextjs-http-wrapper.ts"],"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.7.7",
3
+ "version": "0.8.0",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@openapi-contrib/json-schema-to-openapi-schema": "^3.0.2",
25
- "@pikku/core": "^0.7.8",
26
- "@pikku/inspector": "^0.7.7",
25
+ "@pikku/core": "^0.8.0",
26
+ "@pikku/inspector": "^0.8.0",
27
27
  "@types/cookie": "^0.6.0",
28
28
  "@types/uuid": "^10.0.0",
29
29
  "chalk": "^5.4.1",