@pikku/cli 0.11.0 → 0.11.2

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 (262) hide show
  1. package/.pikku/channel/pikku-channel-types.gen.ts +11 -12
  2. package/.pikku/channel/pikku-channels-map.gen.d.ts +9 -9
  3. package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
  4. package/.pikku/channel/pikku-channels.gen.ts +1 -1
  5. package/.pikku/cli/pikku-cli-channel.ts +92 -0
  6. package/.pikku/cli/pikku-cli-client.gen.ts +54 -0
  7. package/.pikku/cli/pikku-cli-types.gen.ts +3 -3
  8. package/.pikku/cli/pikku-cli-wirings-meta.gen.json +146 -0
  9. package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +4 -34
  10. package/.pikku/cli/pikku-cli-wirings.gen.ts +2 -1
  11. package/.pikku/cli/pikku-cli.gen.ts +41 -0
  12. package/.pikku/function/pikku-function-types.gen.ts +49 -63
  13. package/.pikku/function/pikku-functions-meta.gen.json +988 -0
  14. package/.pikku/function/pikku-functions-meta.gen.ts +4 -970
  15. package/.pikku/function/pikku-functions-meta.min.gen.json +212 -0
  16. package/.pikku/function/pikku-functions-meta.min.gen.ts +4 -209
  17. package/.pikku/http/pikku-http-types.gen.ts +2 -2
  18. package/.pikku/http/pikku-http-wirings-map.gen.d.ts +9 -9
  19. package/.pikku/http/pikku-http-wirings-meta.gen.ts +1 -1
  20. package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
  21. package/.pikku/mcp/pikku-mcp-types.gen.ts +13 -13
  22. package/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
  23. package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +6 -4
  24. package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
  25. package/.pikku/pikku-bootstrap.gen.ts +1 -4
  26. package/.pikku/pikku-services.gen.ts +6 -8
  27. package/.pikku/pikku-types.gen.ts +1 -1
  28. package/.pikku/pikku-websocket.gen.ts +1 -1
  29. package/.pikku/queue/pikku-queue-types.gen.ts +2 -2
  30. package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +9 -9
  31. package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
  32. package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +5 -7
  33. package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
  34. package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +2 -2
  35. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +9 -9
  36. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +41 -40
  37. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +2 -2
  38. package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
  39. package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +5 -2
  40. package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
  41. package/.pikku/schemas/register.gen.ts +27 -27
  42. package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  43. package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
  44. package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
  45. package/.pikku/services/config.gen.json +99 -0
  46. package/.pikku/services/getInspectorState.gen.json +10 -0
  47. package/.pikku/services/jwt.gen.json +13 -0
  48. package/.pikku/services/logger.gen.json +25 -0
  49. package/.pikku/services/queueService.gen.json +14 -0
  50. package/.pikku/services/schedulerService.gen.json +17 -0
  51. package/.pikku/services/schema.gen.json +14 -0
  52. package/.pikku/services/variables.gen.json +13 -0
  53. package/.pikku/services/workflowService.gen.json +31 -0
  54. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -9
  55. package/.pikku/workflow/pikku-workflow-types.gen.ts +36 -31
  56. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.json +1 -0
  57. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +5 -2
  58. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +6 -2
  59. package/CHANGELOG.md +27 -1
  60. package/bin/pikku.ts +6 -32
  61. package/build.sh +53 -31
  62. package/cli.schema.json +1 -1
  63. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +6 -7
  64. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  65. package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
  66. package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
  67. package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
  68. package/dist/.pikku/cli/pikku-cli-channel.js +91 -0
  69. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +10 -0
  70. package/dist/.pikku/cli/pikku-cli-client.gen.js +44 -0
  71. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +3 -3
  72. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  73. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +3 -34
  74. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +146 -0
  75. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +2 -1
  76. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +2 -1
  77. package/dist/.pikku/cli/pikku-cli.gen.d.ts +10 -0
  78. package/dist/.pikku/cli/pikku-cli.gen.js +38 -0
  79. package/dist/.pikku/function/pikku-function-types.gen.d.ts +29 -79
  80. package/dist/.pikku/function/pikku-function-types.gen.js +19 -15
  81. package/dist/.pikku/function/pikku-functions-meta.gen.js +3 -969
  82. package/dist/.pikku/function/pikku-functions-meta.gen.json +988 -0
  83. package/dist/.pikku/function/pikku-functions-meta.min.gen.js +3 -208
  84. package/dist/.pikku/function/pikku-functions-meta.min.gen.json +212 -0
  85. package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -2
  86. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  87. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  88. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  89. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  90. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +13 -13
  91. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  92. package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +5 -4
  93. package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
  94. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
  95. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
  96. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -4
  97. package/dist/.pikku/pikku-bootstrap.gen.js +1 -4
  98. package/dist/.pikku/pikku-services.gen.d.ts +5 -8
  99. package/dist/.pikku/pikku-services.gen.js +3 -6
  100. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  101. package/dist/.pikku/pikku-types.gen.js +1 -1
  102. package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
  103. package/dist/.pikku/pikku-websocket.gen.js +1 -1
  104. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +2 -2
  105. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  106. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +3 -7
  107. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
  108. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  109. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  110. package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.d.ts +6 -9
  111. package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +2 -2
  112. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +2 -2
  113. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  114. package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +3 -2
  115. package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
  116. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
  117. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
  118. package/dist/.pikku/schemas/register.gen.js +17 -17
  119. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  120. package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
  121. package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
  122. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +29 -25
  123. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +22 -8
  124. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +3 -2
  125. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.json +1 -0
  126. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +6 -2
  127. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +6 -3
  128. package/dist/bin/pikku.js +5 -28
  129. package/dist/src/cli.wiring.js +108 -106
  130. package/dist/src/functions/commands/all.js +82 -42
  131. package/dist/src/functions/commands/bootstrap.js +22 -10
  132. package/dist/src/functions/commands/watch.js +6 -3
  133. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +12 -7
  134. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
  135. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +42 -4
  136. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
  137. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +40 -2
  138. package/dist/src/functions/wirings/channels/pikku-channels.js +9 -2
  139. package/dist/src/functions/wirings/channels/serialize-channel-types.js +10 -11
  140. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +4 -4
  141. package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +1 -1
  142. package/dist/src/functions/wirings/cli/pikku-command-cli.js +9 -3
  143. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +1 -1
  144. package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -2
  145. package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.d.ts +1 -1
  146. package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +4 -4
  147. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +4 -4
  148. package/dist/src/functions/wirings/functions/pikku-command-functions.js +15 -5
  149. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
  150. package/dist/src/functions/wirings/functions/pikku-command-services.js +23 -23
  151. package/dist/src/functions/wirings/functions/schemas.js +1 -1
  152. package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
  153. package/dist/src/functions/wirings/functions/serialize-function-types.js +50 -64
  154. package/dist/src/functions/wirings/http/openapi-spec-generator.js +4 -4
  155. package/dist/src/functions/wirings/http/pikku-http-routes.js +9 -2
  156. package/dist/src/functions/wirings/http/serialize-http-types.js +1 -1
  157. package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +18 -4
  158. package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +12 -12
  159. package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +26 -2
  160. package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.d.ts +5 -2
  161. package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.js +5 -13
  162. package/dist/src/functions/wirings/queue/pikku-command-queue.js +9 -3
  163. package/dist/src/functions/wirings/queue/pikku-queue.js +9 -3
  164. package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +2 -1
  165. package/dist/src/functions/wirings/queue/serialize-queue-meta.js +10 -1
  166. package/dist/src/functions/wirings/queue/serialize-queue-types.js +1 -1
  167. package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +9 -2
  168. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +11 -4
  169. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +1 -1
  170. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +3 -3
  171. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +6 -3
  172. package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +2 -1
  173. package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.js +11 -1
  174. package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +1 -1
  175. package/dist/src/functions/wirings/services/pikku-command-service-metadata.d.ts +1 -0
  176. package/dist/src/functions/wirings/services/pikku-command-service-metadata.js +22 -0
  177. package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.js +3 -1
  178. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +12 -8
  179. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.d.ts +2 -1
  180. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +11 -1
  181. package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
  182. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +36 -31
  183. package/dist/src/functions/wirings/workflow/serialize-workflow-wirings.d.ts +8 -0
  184. package/dist/src/functions/wirings/workflow/serialize-workflow-wirings.js +30 -0
  185. package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +2 -2
  186. package/dist/src/middleware/log-command-info-and-time.d.ts +2 -2
  187. package/dist/src/middleware/log-command-info-and-time.js +1 -4
  188. package/dist/src/services/cli-logger-forwarder.service.d.ts +3 -0
  189. package/dist/src/services/cli-logger-forwarder.service.js +9 -2
  190. package/dist/src/services.d.ts +2 -7
  191. package/dist/src/services.js +14 -12
  192. package/dist/src/utils/check-required-types.d.ts +2 -2
  193. package/dist/src/utils/check-required-types.js +2 -3
  194. package/dist/src/utils/pikku-cli-config.js +35 -2
  195. package/dist/src/utils/pikku-files-and-methods.d.ts +2 -2
  196. package/dist/src/utils/pikku-files-and-methods.js +4 -4
  197. package/dist/src/utils/schema-generator.d.ts +1 -1
  198. package/dist/src/utils/schema-generator.js +1 -1
  199. package/dist/tsconfig.tsbuildinfo +1 -1
  200. package/package.json +7 -8
  201. package/src/cli.wiring.ts +110 -105
  202. package/src/functions/commands/all.ts +94 -45
  203. package/src/functions/commands/bootstrap.ts +25 -10
  204. package/src/functions/commands/watch.ts +6 -3
  205. package/src/functions/runtimes/nextjs/pikku-command-nextjs.ts +26 -5
  206. package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +43 -4
  207. package/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts +40 -1
  208. package/src/functions/wirings/channels/pikku-channels.ts +27 -3
  209. package/src/functions/wirings/channels/serialize-channel-types.ts +10 -11
  210. package/src/functions/wirings/cli/pikku-command-cli-entry.ts +4 -4
  211. package/src/functions/wirings/cli/pikku-command-cli-types.ts +1 -1
  212. package/src/functions/wirings/cli/pikku-command-cli.ts +26 -3
  213. package/src/functions/wirings/cli/serialize-channel-cli.ts +1 -1
  214. package/src/functions/wirings/cli/serialize-cli-types.ts +2 -2
  215. package/src/functions/wirings/cli/serialize-local-cli-bootstrap.ts +5 -5
  216. package/src/functions/wirings/functions/pikku-command-function-types-split.ts +6 -6
  217. package/src/functions/wirings/functions/pikku-command-functions.ts +39 -4
  218. package/src/functions/wirings/functions/pikku-command-services.ts +25 -25
  219. package/src/functions/wirings/functions/schemas.ts +2 -2
  220. package/src/functions/wirings/functions/serialize-function-types.ts +51 -65
  221. package/src/functions/wirings/http/openapi-spec-generator.ts +14 -5
  222. package/src/functions/wirings/http/pikku-http-routes.ts +28 -2
  223. package/src/functions/wirings/http/serialize-http-types.ts +1 -1
  224. package/src/functions/wirings/mcp/pikku-command-mcp.ts +30 -4
  225. package/src/functions/wirings/mcp/serialize-mcp-types.ts +12 -12
  226. package/src/functions/wirings/middleware/pikku-command-middleware.ts +35 -2
  227. package/src/functions/wirings/middleware/serialize-middleware-groups-meta.ts +4 -19
  228. package/src/functions/wirings/permissions/pikku-command-permissions.ts +2 -2
  229. package/src/functions/wirings/queue/pikku-command-queue.ts +27 -2
  230. package/src/functions/wirings/queue/pikku-queue.ts +27 -2
  231. package/src/functions/wirings/queue/serialize-queue-meta.ts +15 -1
  232. package/src/functions/wirings/queue/serialize-queue-types.ts +1 -1
  233. package/src/functions/wirings/rpc/pikku-command-rpc.ts +25 -2
  234. package/src/functions/wirings/rpc/serialize-public-rpc.ts +11 -4
  235. package/src/functions/wirings/rpc/serialize-remote-rpc.ts +1 -1
  236. package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +3 -3
  237. package/src/functions/wirings/scheduler/pikku-command-scheduler.ts +30 -4
  238. package/src/functions/wirings/scheduler/serialize-scheduler-meta.ts +20 -1
  239. package/src/functions/wirings/scheduler/serialize-scheduler-types.ts +1 -1
  240. package/src/functions/wirings/services/pikku-command-service-metadata.ts +25 -0
  241. package/src/functions/wirings/workflow/pikku-command-workflow-types.ts +8 -1
  242. package/src/functions/wirings/workflow/pikku-command-workflow.ts +36 -8
  243. package/src/functions/wirings/workflow/serialize-workflow-meta.ts +18 -1
  244. package/src/functions/wirings/workflow/serialize-workflow-types.ts +39 -31
  245. package/src/functions/wirings/workflow/serialize-workflow-wirings.ts +47 -0
  246. package/src/functions/wirings/workflow/serialize-workflow-workers.ts +2 -2
  247. package/src/middleware/log-command-info-and-time.ts +3 -6
  248. package/src/services/cli-logger-forwarder.service.ts +11 -2
  249. package/src/services.ts +15 -15
  250. package/src/utils/check-required-types.ts +4 -7
  251. package/src/utils/pikku-cli-config.ts +69 -2
  252. package/src/utils/pikku-files-and-methods.ts +10 -13
  253. package/src/utils/schema-generator.ts +2 -2
  254. package/types/application-types.d.ts +1 -1
  255. package/types/config.d.ts +12 -1
  256. package/.pikku/function/pikku-functions.gen.ts +0 -84
  257. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -47
  258. package/dist/.pikku/function/pikku-functions.gen.js +0 -83
  259. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +0 -1
  260. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +0 -47
  261. package/dist/.pikku/schemas/schemas/PikkuRemoteInternalRPCInput.schema.json +0 -1
  262. /package/dist/.pikku/{function/pikku-functions.gen.d.ts → cli/pikku-cli-channel.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  // Singleton services map: true if required, false if available but unused
2
2
  export const requiredSingletonServices = {
3
3
  'config': true,
4
- 'getInspectorState': false,
4
+ 'getInspectorState': true,
5
5
  'jwt': false,
6
6
  'logger': true,
7
7
  'queueService': false,
@@ -10,8 +10,5 @@ export const requiredSingletonServices = {
10
10
  'variables': true,
11
11
  'workflowService': false,
12
12
  };
13
- // Session services map: true if required, false if available but unused
14
- export const requiredSessionServices = {
15
- 'workflow': false,
16
- 'workflowStep': false,
17
- };
13
+ // Wire services map: true if required, false if available but unused
14
+ export const requiredWireServices = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket';
5
5
  import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket';
5
5
  class PikkuWebSocketRoute extends CorePikkuRouteHandler {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -12,7 +12,7 @@ import type { PikkuFunctionConfig } from '../function/pikku-function-types.gen.j
12
12
  * @template In - Input type for the queue job
13
13
  * @template Out - Output type for the queue job
14
14
  */
15
- type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out>>;
15
+ type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out, 'session' | 'rpc'>>;
16
16
  /**
17
17
  * Registers a queue worker with the Pikku framework.
18
18
  * Workers process background jobs from queues.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -1,10 +1,6 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
- pikkuState('queue', 'meta', {
6
- "pikku-remote-internal-rpc": {
7
- "pikkuFuncName": "pikkuRemoteInternalRPC",
8
- "queueName": "pikku-remote-internal-rpc"
9
- }
10
- });
5
+ import metaData from './pikku-queue-workers-wirings-meta.gen.json' with { type: 'json' };
6
+ pikkuState('queue', 'meta', metaData);
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.11.0
3
+ * This file was generated by @pikku/cli@0.11.2
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.11.0
3
+ * This file was generated by @pikku/cli@0.11.2
4
4
  */
5
5
  /* The files with an addQueueWorkers function call */
@@ -2,16 +2,13 @@
2
2
  * Generic remote RPC worker that invokes any internal RPC by name
3
3
  * This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
4
4
  */
5
- export declare const pikkuRemoteInternalRPC: import("@pikku/core").CorePikkuFunctionConfig<import("../pikku-types.gen.js").PikkuFunctionSessionless<{
5
+ export declare const pikkuRemoteInternalRPC: import("../pikku-types.gen.js").PikkuFunctionConfig<{
6
6
  rpcName: string;
7
7
  data?: any;
8
- }, any, null, null, Omit<import("../../types/application-types.js").Services, "rpc" | "channel" | "mcp"> & {
9
- rpc: import("./pikku-rpc-wirings-map.internal.gen.js").TypedPikkuRPC;
10
- } & {
11
- channel?: import("@pikku/core").PikkuChannel<unknown, any> | undefined;
12
- } & {
13
- mcp?: import("@pikku/core").PikkuMCP;
14
- }>, import("../pikku-types.gen.js").PikkuPermission<{
8
+ }, any, "rpc" | "session", import("../pikku-types.gen.js").PikkuFunctionSessionless<{
15
9
  rpcName: string;
16
10
  data?: any;
17
- }, import("../../types/application-types.js").Services>, import("../pikku-types.gen.js").PikkuMiddleware<import("../../types/application-types.js").SingletonServices>>;
11
+ }, any, "rpc" | "session", import("../../types/application-types.js").Services> | import("../pikku-types.gen.js").PikkuFunction<{
12
+ rpcName: string;
13
+ data?: any;
14
+ }, any, "rpc" | "session", import("../../types/application-types.js").Services>>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Auto-generated remote internal RPC queue worker and HTTP endpoint
@@ -11,7 +11,7 @@ import { pikkuSessionlessFunc, wireQueueWorker } from '../pikku-types.gen.js';
11
11
  * This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
12
12
  */
13
13
  export const pikkuRemoteInternalRPC = pikkuSessionlessFunc({
14
- func: async ({ rpc }, { rpcName, data }) => {
14
+ func: async (_services, { rpcName, data }, { rpc }) => {
15
15
  return await rpc.invoke(rpcName, data);
16
16
  },
17
17
  internal: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -10,7 +10,7 @@ import type { PikkuFunctionConfig, PikkuMiddleware } from '../function/pikku-fun
10
10
  * Type definition for scheduled tasks that run at specified intervals.
11
11
  * These are sessionless functions that execute based on cron expressions.
12
12
  */
13
- type SchedulerWiring = CoreScheduledTask<PikkuFunctionConfig<void, void>, PikkuMiddleware>;
13
+ type SchedulerWiring = CoreScheduledTask<PikkuFunctionConfig<void, void, 'session' | 'rpc'>, PikkuMiddleware>;
14
14
  /**
15
15
  * Registers a scheduled task with the Pikku framework.
16
16
  * Tasks run based on cron expressions and are sessionless.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,6 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
- pikkuState('scheduler', 'meta', {});
5
+ import metaData from './pikku-schedulers-wirings-meta.gen.json' with { type: 'json' };
6
+ pikkuState('scheduler', 'meta', metaData);
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.11.0
3
+ * This file was generated by @pikku/cli@0.11.2
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.11.0
3
+ * This file was generated by @pikku/cli@0.11.2
4
4
  */
5
5
  /* The files with an addScheduledTasks function call */
@@ -1,34 +1,34 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
- import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
6
- addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
7
- import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
8
- addSchema('PikkuCLIOutput', PikkuCLIOutput);
9
- import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
10
- addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
11
5
  import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
12
6
  addSchema('PikkuSchemasOutput', PikkuSchemasOutput);
13
- import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
14
- addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
15
- import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
16
- addSchema('PikkuMCPOutput', PikkuMCPOutput);
7
+ import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
8
+ addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
17
9
  import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
18
10
  addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
19
11
  import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
20
12
  addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
21
- import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
22
- addSchema('PikkuQueueOutput', PikkuQueueOutput);
23
- import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
24
- addSchema('PikkuPublicRPCOutput', PikkuPublicRPCOutput);
25
- import * as PikkuRemoteRPCOutput from './schemas/PikkuRemoteRPCOutput.schema.json' with { type: 'json' };
26
- addSchema('PikkuRemoteRPCOutput', PikkuRemoteRPCOutput);
27
13
  import * as PikkuRPCOutput from './schemas/PikkuRPCOutput.schema.json' with { type: 'json' };
28
14
  addSchema('PikkuRPCOutput', PikkuRPCOutput);
15
+ import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
16
+ addSchema('PikkuPublicRPCOutput', PikkuPublicRPCOutput);
17
+ import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
18
+ addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
29
19
  import * as PikkuSchedulerOutput from './schemas/PikkuSchedulerOutput.schema.json' with { type: 'json' };
30
20
  addSchema('PikkuSchedulerOutput', PikkuSchedulerOutput);
31
21
  import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
32
22
  addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
23
+ import * as PikkuRemoteRPCOutput from './schemas/PikkuRemoteRPCOutput.schema.json' with { type: 'json' };
24
+ addSchema('PikkuRemoteRPCOutput', PikkuRemoteRPCOutput);
25
+ import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
26
+ addSchema('PikkuQueueOutput', PikkuQueueOutput);
27
+ import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
28
+ addSchema('PikkuMCPOutput', PikkuMCPOutput);
29
+ import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
30
+ addSchema('PikkuCLIOutput', PikkuCLIOutput);
31
+ import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
32
+ addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
33
33
  import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
34
34
  addSchema('PikkuCLIConfig', PikkuCLIConfig);
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaMinFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "ignoreFiles": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "sessionServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" }, "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "schema": { "type": "object", "properties": { "additionalProperties": { "type": "boolean" }, "supportsImportAttributes": { "type": "boolean" } }, "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "workflows": { "anyOf": [{ "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": true }, "path": { "type": "string" }, "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "required": ["singleQueue", "path"], "additionalProperties": false }, { "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": false }, "dir": { "type": "string" }, "orchestratorQueuePrefix": { "type": "string" }, "workerQueuePrefix": { "type": "string" } }, "required": ["singleQueue", "dir"], "additionalProperties": false }] }, "rpc": { "type": "object", "properties": { "remoteRpcWorkersPath": { "type": "string" }, "publicRpcPath": { "type": "string" } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringsFile", "configDir", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaMinFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "middlewareFile", "middlewareGroupsMetaFile", "outDir", "packageMappings", "permissionsFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schemaDirectory", "servicesFile", "srcDirectories", "tsconfig", "typesDeclarationFile", "workflowMapDeclarationFile", "workflowTypesFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWorkersFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaJsonFile": { "type": "string" }, "functionsMetaMinFile": { "type": "string" }, "functionsMetaMinJsonFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpWiringMetaJsonFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsWiringMetaJsonFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalWiringMetaJsonFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersWiringMetaJsonFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueWorkersWiringMetaJsonFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWiringMetaJsonFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpWiringsMetaJsonFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliWiringMetaJsonFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaFile": { "type": "string" }, "middlewareGroupsMetaJsonFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "ignoreFiles": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "wireServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" }, "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "schema": { "type": "object", "properties": { "additionalProperties": { "type": "boolean" }, "supportsImportAttributes": { "type": "boolean" } }, "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "workflows": { "anyOf": [{ "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": true }, "path": { "type": "string" }, "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "required": ["singleQueue", "path"], "additionalProperties": false }, { "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": false }, "dir": { "type": "string" }, "orchestratorQueuePrefix": { "type": "string" }, "workerQueuePrefix": { "type": "string" } }, "required": ["singleQueue", "dir"], "additionalProperties": false }] }, "rpc": { "type": "object", "properties": { "remoteRpcWorkersPath": { "type": "string" }, "publicRpcPath": { "type": "string" } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "channelsWiringMetaJsonFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringMetaJsonFile", "cliWiringsFile", "configDir", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaJsonFile", "functionsMetaMinFile", "functionsMetaMinJsonFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringMetaJsonFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "mcpWiringsMetaJsonFile", "middlewareFile", "middlewareGroupsMetaFile", "middlewareGroupsMetaJsonFile", "outDir", "packageMappings", "permissionsFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "queueWorkersWiringMetaJsonFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcInternalWiringMetaJsonFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schedulersWiringMetaJsonFile", "schemaDirectory", "servicesFile", "srcDirectories", "tsconfig", "typesDeclarationFile", "workflowMapDeclarationFile", "workflowTypesFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWiringMetaJsonFile", "workflowsWorkersFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "description": "This provides the structure needed for typescript to be aware of RPCs and their return types", "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "description": "This provides the structure needed for typescript to be aware of RPCs and their return types", "definitions": {} }
@@ -1,24 +1,17 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Workflow-specific type definitions for tree-shaking optimization
6
6
  */
7
- import { CoreWorkflow, PikkuWorkflowInteraction, WorkflowStepOptions } from '@pikku/core/workflow';
8
- import { CorePikkuFunctionConfig, CorePikkuFunctionSessionless } from '@pikku/core';
9
- import type { PikkuPermission, PikkuMiddleware } from '../function/pikku-function-types.gen.js';
10
- import type { UserSession, SingletonServices } from '../../types/application-types.d.js';
11
- import type { TypedPikkuRPC, RPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
7
+ import { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
8
+ import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
9
+ import type { RPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
12
10
  /**
13
- * Type definition for workflows that orchestrate multi-step processes.
14
- * Workflows support both inline and remote execution modes with step caching.
15
- */
16
- type WorkflowWiring = CoreWorkflow<CorePikkuFunctionConfig<PikkuFunctionWorkflow<any, any>, PikkuPermission<any>, PikkuMiddleware>>;
17
- /**
18
- * Typed workflow interaction with RPC awareness
11
+ * Typed workflow wire with RPC awareness
19
12
  * Provides type-safe workflow.do() for RPC steps
20
13
  */
21
- export interface TypedWorkflow extends PikkuWorkflowInteraction {
14
+ export interface TypedWorkflow extends PikkuWorkflowWire {
22
15
  /**
23
16
  * Execute a workflow step with RPC invocation (typed based on available RPCs)
24
17
  * @template K - RPC name from the RPC map
@@ -32,27 +25,38 @@ export interface TypedWorkflow extends PikkuWorkflowInteraction {
32
25
  }
33
26
  /**
34
27
  * Workflow function type with typed workflow service
35
- * Includes the workflow interaction object with typed RPC methods
28
+ * Includes the workflow wire object with typed RPC methods
36
29
  */
37
- export type PikkuFunctionWorkflow<In = unknown, Out = never> = CorePikkuFunctionSessionless<In, Out, null, SingletonServices & {
38
- rpc: TypedPikkuRPC;
39
- workflow: TypedWorkflow;
40
- }, UserSession>;
30
+ export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
41
31
  /**
42
32
  * Creates a workflow function with typed input and output.
43
- * Workflow functions have access to the workflow interaction object for step execution.
33
+ * Workflow functions have access to the workflow wire object for step execution.
34
+ *
35
+ * This is the permissive mode - workflows that don't conform to simple DSL will fall back
36
+ * to basic extraction with a warning.
44
37
  *
45
38
  * @template In - Input type for the workflow
46
39
  * @template Out - Output type for the workflow
47
40
  * @param func - Function definition, either direct function or configuration object
48
41
  * @returns The normalized configuration object
49
42
  */
50
- export declare const pikkuWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | CorePikkuFunctionConfig<PikkuFunctionWorkflow<In, Out>, PikkuPermission<In>, PikkuMiddleware>) => CorePikkuFunctionConfig<PikkuFunctionWorkflow<In, Out>, PikkuPermission<In>, PikkuMiddleware>;
43
+ export declare const pikkuWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>) => PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>;
51
44
  /**
52
- * Registers a workflow with the Pikku framework.
53
- * Workflows can run in 'inline' (synchronous) or 'remote' (queue-based) execution modes.
45
+ * Creates a simple workflow function with typed input and output.
46
+ * Simple workflows must conform to the restricted DSL for static analysis.
47
+ *
48
+ * This is the strict mode - workflows that don't conform to simple DSL will cause
49
+ * a critical error during inspection.
50
+ *
51
+ * Constraints:
52
+ * - Must use only workflow.do() with RPC form (no inline functions)
53
+ * - Only if/else, for..of, and Promise.all(array.map()) control flow allowed
54
+ * - Step names must be unique (except across mutually exclusive branches)
55
+ * - All workflow calls must be awaited
54
56
  *
55
- * @param workflow - Workflow definition with name, execution mode, and handler function
57
+ * @template In - Input type for the workflow
58
+ * @template Out - Output type for the workflow
59
+ * @param func - Function definition, either direct function or configuration object
60
+ * @returns The normalized configuration object
56
61
  */
57
- export declare const wireWorkflow: (workflow: WorkflowWiring) => void;
58
- export {};
62
+ export declare const pikkuSimpleWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>) => PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>;
@@ -1,13 +1,15 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  /**
5
5
  * Workflow-specific type definitions for tree-shaking optimization
6
6
  */
7
- import { wireWorkflow as wireWorkflowCore } from '@pikku/core/workflow';
8
7
  /**
9
8
  * Creates a workflow function with typed input and output.
10
- * Workflow functions have access to the workflow interaction object for step execution.
9
+ * Workflow functions have access to the workflow wire object for step execution.
10
+ *
11
+ * This is the permissive mode - workflows that don't conform to simple DSL will fall back
12
+ * to basic extraction with a warning.
11
13
  *
12
14
  * @template In - Input type for the workflow
13
15
  * @template Out - Output type for the workflow
@@ -18,11 +20,23 @@ export const pikkuWorkflowFunc = (func) => {
18
20
  return typeof func === 'function' ? { func } : func;
19
21
  };
20
22
  /**
21
- * Registers a workflow with the Pikku framework.
22
- * Workflows can run in 'inline' (synchronous) or 'remote' (queue-based) execution modes.
23
+ * Creates a simple workflow function with typed input and output.
24
+ * Simple workflows must conform to the restricted DSL for static analysis.
25
+ *
26
+ * This is the strict mode - workflows that don't conform to simple DSL will cause
27
+ * a critical error during inspection.
23
28
  *
24
- * @param workflow - Workflow definition with name, execution mode, and handler function
29
+ * Constraints:
30
+ * - Must use only workflow.do() with RPC form (no inline functions)
31
+ * - Only if/else, for..of, and Promise.all(array.map()) control flow allowed
32
+ * - Step names must be unique (except across mutually exclusive branches)
33
+ * - All workflow calls must be awaited
34
+ *
35
+ * @template In - Input type for the workflow
36
+ * @template Out - Output type for the workflow
37
+ * @param func - Function definition, either direct function or configuration object
38
+ * @returns The normalized configuration object
25
39
  */
26
- export const wireWorkflow = (workflow) => {
27
- wireWorkflowCore(workflow);
40
+ export const pikkuSimpleWorkflowFunc = (func) => {
41
+ return typeof func === 'function' ? { func } : func;
28
42
  };
@@ -1,5 +1,6 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
- pikkuState('workflows', 'meta', {});
5
+ import metaData from './pikku-workflow-wirings-meta.gen.json' with { type: 'json' };
6
+ pikkuState('workflows', 'meta', metaData);
@@ -1,4 +1,8 @@
1
- export {};
2
1
  /**
3
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
+ */
4
+ /**
5
+ * Auto-generated workflow registrations
6
+ * Do not edit manually - regenerate with 'npx pikku'
4
7
  */
8
+ export {};
@@ -1,5 +1,8 @@
1
- export {};
2
1
  /**
3
- * This file was generated by @pikku/cli@0.11.0
2
+ * This file was generated by @pikku/cli@0.11.2
3
+ */
4
+ /**
5
+ * Auto-generated workflow registrations
6
+ * Do not edit manually - regenerate with 'npx pikku'
4
7
  */
5
- /* The files with an wireWorkflow function call */
8
+ export {};
package/dist/bin/pikku.js CHANGED
@@ -1,30 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import { createConfig, createSingletonServices } from '../src/services.js';
4
- import { PikkuRPCService } from '@pikku/core/rpc';
5
4
  import { LocalVariablesService } from '@pikku/core/services';
6
- // import { existsSync } from 'fs'
7
- // import { fileURLToPath } from 'url'
8
- // import { dirname, join } from 'path'
9
- // const __filename = fileURLToPath(import.meta.url)
10
- // const __dirname = dirname(__filename)
11
- // Check if Pikku CLI is available
12
- // const pikkuCliPath = join(__dirname, '../.pikku/cli/pikku-cli.gen.js')
13
- // if (existsSync(pikkuCliPath)) {
14
- // try {
15
- // // Use the generated Pikku CLI
16
- // const { PikkuCLI } = await import('../.pikku/cli/pikku-cli.gen.js')
17
- // await PikkuCLI(process.argv.slice(2))
18
- // process.exit(0)
19
- // } catch (error) {
20
- // // If import fails, fall back to Commander.js
21
- // console.warn(
22
- // 'Failed to load Pikku CLI, using fallback mode:',
23
- // error.message
24
- // )
25
- // }
26
- // }
27
- // Fallback to Commander.js for initial setup
5
+ import { all as allCommand } from '../src/functions/commands/all.js';
6
+ import { watch as watchCommand } from '../src/functions/commands/watch.js';
28
7
  // Import bootstrap if it exists
29
8
  try {
30
9
  await import('../.pikku/pikku-bootstrap.gen.js');
@@ -35,13 +14,11 @@ catch {
35
14
  const action = async (command, cliConfig) => {
36
15
  const config = await createConfig(new LocalVariablesService(), cliConfig);
37
16
  const services = await createSingletonServices(config);
38
- const rpcWrapper = new PikkuRPCService();
39
- const { rpc } = await rpcWrapper.injectRPCService(services, {}, false);
40
17
  if (command === 'watch') {
41
- await rpc.invoke('watch', null);
18
+ await watchCommand.func(services);
42
19
  }
43
20
  else {
44
- await rpc.invoke('all', null);
21
+ await allCommand.func(services);
45
22
  }
46
23
  };
47
24
  const all = (program, name, description) => {
@@ -50,7 +27,7 @@ const all = (program, name, description) => {
50
27
  .description(description)
51
28
  .option('--pikku-config-type', 'The type of your pikku config object')
52
29
  .option('--singleton-services-factory-type', 'The type of your singleton services factory')
53
- .option('--session-services-factory-type', 'The type of your session services factory')
30
+ .option('--session-services-factory-type', 'The type of your wire services factory')
54
31
  .option('-c, --config <string>', 'The path to pikku cli config file')
55
32
  .option('-t, --tags <tags...>', 'Which tags to filter by')
56
33
  .option('--types <types...>', 'Which types to filter by (http, channel, queue, scheduler, rpc, mcp)')