@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
@@ -47,7 +47,7 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
47
47
  ],
48
48
  schema: {
49
49
  additionalProperties: false,
50
- supportsImportAttributes: false,
50
+ supportsImportAttributes: true,
51
51
  ...extendedConfig.schema,
52
52
  ...config.schema,
53
53
  },
@@ -69,7 +69,7 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
69
69
  ],
70
70
  schema: {
71
71
  additionalProperties: false,
72
- supportsImportAttributes: false,
72
+ supportsImportAttributes: true,
73
73
  ...config.schema,
74
74
  },
75
75
  };
@@ -96,9 +96,15 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
96
96
  if (!result.functionsMetaFile) {
97
97
  result.functionsMetaFile = join(functionDir, 'pikku-functions-meta.gen.ts');
98
98
  }
99
+ if (!result.functionsMetaJsonFile) {
100
+ result.functionsMetaJsonFile = join(functionDir, 'pikku-functions-meta.gen.json');
101
+ }
99
102
  if (!result.functionsMetaMinFile) {
100
103
  result.functionsMetaMinFile = join(functionDir, 'pikku-functions-meta.min.gen.ts');
101
104
  }
105
+ if (!result.functionsMetaMinJsonFile) {
106
+ result.functionsMetaMinJsonFile = join(functionDir, 'pikku-functions-meta.min.gen.json');
107
+ }
102
108
  if (!result.functionTypesFile) {
103
109
  result.functionTypesFile = join(functionDir, 'pikku-function-types.gen.ts');
104
110
  }
@@ -112,6 +118,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
112
118
  if (!result.httpWiringMetaFile) {
113
119
  result.httpWiringMetaFile = join(httpDir, 'pikku-http-wirings-meta.gen.ts');
114
120
  }
121
+ if (!result.httpWiringMetaJsonFile) {
122
+ result.httpWiringMetaJsonFile = join(httpDir, 'pikku-http-wirings-meta.gen.json');
123
+ }
115
124
  if (!result.httpMapDeclarationFile) {
116
125
  result.httpMapDeclarationFile = join(httpDir, 'pikku-http-wirings-map.gen.d.ts');
117
126
  }
@@ -125,6 +134,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
125
134
  if (!result.channelsWiringMetaFile) {
126
135
  result.channelsWiringMetaFile = join(channelDir, 'pikku-channels-meta.gen.ts');
127
136
  }
137
+ if (!result.channelsWiringMetaJsonFile) {
138
+ result.channelsWiringMetaJsonFile = join(channelDir, 'pikku-channels-meta.gen.json');
139
+ }
128
140
  if (!result.channelsMapDeclarationFile) {
129
141
  result.channelsMapDeclarationFile = join(channelDir, 'pikku-channels-map.gen.d.ts');
130
142
  }
@@ -135,6 +147,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
135
147
  if (!result.rpcInternalWiringMetaFile) {
136
148
  result.rpcInternalWiringMetaFile = join(rpcDir, 'pikku-rpc-wirings-meta.internal.gen.ts');
137
149
  }
150
+ if (!result.rpcInternalWiringMetaJsonFile) {
151
+ result.rpcInternalWiringMetaJsonFile = join(rpcDir, 'pikku-rpc-wirings-meta.internal.gen.json');
152
+ }
138
153
  if (!result.rpcInternalMapDeclarationFile) {
139
154
  result.rpcInternalMapDeclarationFile = join(rpcDir, 'pikku-rpc-wirings-map.internal.gen.d.ts');
140
155
  }
@@ -155,6 +170,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
155
170
  if (!result.schedulersWiringMetaFile) {
156
171
  result.schedulersWiringMetaFile = join(schedulerDir, 'pikku-schedulers-wirings-meta.gen.ts');
157
172
  }
173
+ if (!result.schedulersWiringMetaJsonFile) {
174
+ result.schedulersWiringMetaJsonFile = join(schedulerDir, 'pikku-schedulers-wirings-meta.gen.json');
175
+ }
158
176
  if (!result.schedulersTypesFile) {
159
177
  result.schedulersTypesFile = join(schedulerDir, 'pikku-scheduler-types.gen.ts');
160
178
  }
@@ -165,6 +183,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
165
183
  if (!result.queueWorkersWiringMetaFile) {
166
184
  result.queueWorkersWiringMetaFile = join(queueDir, 'pikku-queue-workers-wirings-meta.gen.ts');
167
185
  }
186
+ if (!result.queueWorkersWiringMetaJsonFile) {
187
+ result.queueWorkersWiringMetaJsonFile = join(queueDir, 'pikku-queue-workers-wirings-meta.gen.json');
188
+ }
168
189
  if (!result.queueMapDeclarationFile) {
169
190
  result.queueMapDeclarationFile = join(queueDir, 'pikku-queue-workers-wirings-map.gen.d.ts');
170
191
  }
@@ -178,6 +199,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
178
199
  if (!result.workflowsWiringMetaFile) {
179
200
  result.workflowsWiringMetaFile = join(workflowDir, 'pikku-workflow-wirings-meta.gen.ts');
180
201
  }
202
+ if (!result.workflowsWiringMetaJsonFile) {
203
+ result.workflowsWiringMetaJsonFile = join(workflowDir, 'pikku-workflow-wirings-meta.gen.json');
204
+ }
181
205
  if (!result.workflowsWorkersFile) {
182
206
  result.workflowsWorkersFile = join(workflowDir, 'pikku-workflow-workers.gen.ts');
183
207
  }
@@ -198,6 +222,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
198
222
  if (!result.middlewareGroupsMetaFile) {
199
223
  result.middlewareGroupsMetaFile = join(middlewareDir, 'pikku-middleware-groups-meta.gen.ts');
200
224
  }
225
+ if (!result.middlewareGroupsMetaJsonFile) {
226
+ result.middlewareGroupsMetaJsonFile = join(middlewareDir, 'pikku-middleware-groups-meta.gen.json');
227
+ }
201
228
  // Permissions
202
229
  const permissionsDir = join(result.outDir, 'permissions');
203
230
  if (!result.permissionsFile) {
@@ -211,6 +238,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
211
238
  if (!result.mcpWiringsMetaFile) {
212
239
  result.mcpWiringsMetaFile = join(mcpDir, 'pikku-mcp-wirings-meta.gen.ts');
213
240
  }
241
+ if (!result.mcpWiringsMetaJsonFile) {
242
+ result.mcpWiringsMetaJsonFile = join(mcpDir, 'pikku-mcp-wirings-meta.gen.json');
243
+ }
214
244
  if (!result.mcpWiringsFile) {
215
245
  result.mcpWiringsFile = join(mcpDir, 'pikku-mcp-wirings.gen.ts');
216
246
  }
@@ -227,6 +257,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
227
257
  if (!result.cliWiringMetaFile) {
228
258
  result.cliWiringMetaFile = join(cliDir, 'pikku-cli-wirings-meta.gen.ts');
229
259
  }
260
+ if (!result.cliWiringMetaJsonFile) {
261
+ result.cliWiringMetaJsonFile = join(cliDir, 'pikku-cli-wirings-meta.gen.json');
262
+ }
230
263
  if (!result.cliBootstrapFile) {
231
264
  result.cliBootstrapFile = join(cliDir, 'pikku-cli-bootstrap.gen.ts');
232
265
  }
@@ -8,11 +8,11 @@ interface Meta {
8
8
  }
9
9
  export type FilesAndMethods = {
10
10
  userSessionType: Meta;
11
- sessionServicesType: Meta;
11
+ wireServicesType: Meta;
12
12
  singletonServicesType: Meta;
13
13
  pikkuConfigFactory: Meta;
14
14
  singletonServicesFactory: Meta;
15
- sessionServicesFactory: Meta;
15
+ wireServicesFactory: Meta;
16
16
  };
17
17
  /**
18
18
  * @deprecated Use state.filesAndMethods from InspectorState instead
@@ -45,16 +45,16 @@ const getMetaTypes = (type, map, desiredType) => {
45
45
  * @deprecated Use state.filesAndMethods from InspectorState instead
46
46
  */
47
47
  export const getPikkuFilesAndMethods = async (state, options = {}) => {
48
- const { singletonServicesTypeImportMap, sessionServicesTypeImportMap, userSessionTypeImportMap, sessionServicesFactories, singletonServicesFactories, configFactories, } = state;
49
- const { configFileType, userSessionType, singletonServicesFactoryType, sessionServicesFactoryType, } = options;
48
+ const { singletonServicesTypeImportMap, wireServicesTypeImportMap, userSessionTypeImportMap, wireServicesFactories, singletonServicesFactories, configFactories, } = state;
49
+ const { configFileType, userSessionType, singletonServicesFactoryType, wireServicesFactoryType, } = options;
50
50
  let errors = new Map();
51
51
  const result = {
52
52
  userSessionType: getMetaTypes('CoreUserSession', userSessionTypeImportMap, userSessionType),
53
53
  singletonServicesType: getMetaTypes('CoreSingletonServices', singletonServicesTypeImportMap),
54
- sessionServicesType: getMetaTypes('CoreServices', sessionServicesTypeImportMap),
54
+ wireServicesType: getMetaTypes('CoreServices', wireServicesTypeImportMap),
55
55
  pikkuConfigFactory: getMetaTypes('CoreConfig', configFactories, configFileType),
56
56
  singletonServicesFactory: getMetaTypes('CreateSingletonServices', singletonServicesFactories, singletonServicesFactoryType),
57
- sessionServicesFactory: getMetaTypes('CreateSessionServices', sessionServicesFactories, sessionServicesFactoryType),
57
+ wireServicesFactory: getMetaTypes('CreateWireServices', wireServicesFactories, wireServicesFactoryType),
58
58
  };
59
59
  if (errors.size > 0) {
60
60
  const result = ['Found errors:'];
@@ -3,4 +3,4 @@ import { HTTPWiringsMeta } from '@pikku/core/http';
3
3
  import { TypesMap } from '@pikku/inspector';
4
4
  import { CLILogger } from '../services/cli-logger.service.js';
5
5
  export declare function generateSchemas(logger: CLILogger, tsconfig: string, typesMap: TypesMap, functionMeta: FunctionsMeta, httpWiringsMeta: HTTPWiringsMeta, additionalTypes?: string[], additionalProperties?: boolean): Promise<Record<string, JSONValue>>;
6
- export declare function saveSchemas(logger: CLILogger, schemaParentDir: string, schemas: Record<string, JSONValue>, typesMap: TypesMap, functionsMeta: FunctionsMeta, additionalTypes?: string[], supportsImportAttributes?: boolean): Promise<void>;
6
+ export declare function saveSchemas(logger: CLILogger, schemaParentDir: string, schemas: Record<string, JSONValue>, typesMap: TypesMap, functionsMeta: FunctionsMeta, supportsImportAttributes: boolean, additionalTypes?: string[]): Promise<void>;
@@ -65,7 +65,7 @@ export async function generateSchemas(logger, tsconfig, typesMap, functionMeta,
65
65
  });
66
66
  return schemas;
67
67
  }
68
- export async function saveSchemas(logger, schemaParentDir, schemas, typesMap, functionsMeta, additionalTypes, supportsImportAttributes = false) {
68
+ export async function saveSchemas(logger, schemaParentDir, schemas, typesMap, functionsMeta, supportsImportAttributes, additionalTypes) {
69
69
  await writeFileInDir(logger, `${schemaParentDir}/register.gen.ts`, 'export const empty = null;');
70
70
  const desiredSchemas = new Set([
71
71
  ...Object.values(functionsMeta)
@@ -1 +1 @@
1
- {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/pikku-command-websocket-typed.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/channels/serialize-websocket-wrapper.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/fetch/index.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/pikku-function-types.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/http/openapi-spec-generator.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-json.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-groups-meta.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-map.ts","../src/functions/wirings/workflow/pikku-command-workflow-types.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/wirings/workflow/serialize-workflow-workers.ts","../src/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/custom-types-generator.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/schema-generator.ts","../src/utils/serialize-import-map.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions-meta.min.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
1
+ {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/pikku-command-websocket-typed.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/channels/serialize-websocket-wrapper.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/fetch/index.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/pikku-function-types.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/http/openapi-spec-generator.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-json.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-groups-meta.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/services/pikku-command-service-metadata.ts","../src/functions/wirings/workflow/pikku-command-workflow-map.ts","../src/functions/wirings/workflow/pikku-command-workflow-types.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/wirings/workflow/serialize-workflow-wirings.ts","../src/functions/wirings/workflow/serialize-workflow-workers.ts","../src/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/custom-types-generator.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/schema-generator.ts","../src/utils/serialize-import-map.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions-meta.min.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "author": "yasser.fadl@gmail.com",
5
- "license": "MIT",
5
+ "license": "BUSL-1.1",
6
6
  "bin": {
7
7
  "pikku": "dist/bin/pikku.js"
8
8
  },
@@ -12,8 +12,7 @@
12
12
  "scripts": {
13
13
  "tsc": "tsc",
14
14
  "schema": "ts-json-schema-generator -o cli.schema.json --path 'src/utils/pikku-cli-config.ts' --type 'PikkuCLIConfig'",
15
- "build": "yarn build:esm",
16
- "build:esm": "./build.sh",
15
+ "build": "./build.sh",
17
16
  "ncu": "npx npm-check-updates -x '/.*glob.*/'",
18
17
  "release": "yarn build && npm test",
19
18
  "test": "bash run-tests.sh",
@@ -21,9 +20,9 @@
21
20
  "test:coverage": "bash run-tests.sh --coverage"
22
21
  },
23
22
  "dependencies": {
24
- "@openapi-contrib/json-schema-to-openapi-schema": "^4.2.0",
25
- "@pikku/core": "^0.11.0",
26
- "@pikku/inspector": "^0.11.0",
23
+ "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.0",
24
+ "@pikku/core": "^0.11.1",
25
+ "@pikku/inspector": "^0.11.1",
27
26
  "@types/cookie": "^1.0.0",
28
27
  "@types/json-schema": "^7.0.15",
29
28
  "chalk": "^5.6.2",
@@ -37,7 +36,7 @@
37
36
  "yaml": "^2.8.1"
38
37
  },
39
38
  "devDependencies": {
40
- "@types/node": "^24.9.1"
39
+ "@types/node": "^24.10.1"
41
40
  },
42
41
  "engines": {
43
42
  "node": ">=18"
package/src/cli.wiring.ts CHANGED
@@ -1,107 +1,112 @@
1
- // import { pikkuSchemas } from './functions/wirings/functions/schemas.js'
2
- // import { pikkuFetch } from './functions/wirings/fetch/index.js'
3
- // import { pikkuWebSocketTyped } from './functions/wirings/channels/pikku-command-websocket-typed.js'
4
- // import { pikkuRPCClient } from './functions/wirings/rpc/pikku-command-rpc-client.js'
5
- // import { pikkuQueueService } from './functions/wirings/queue/pikku-command-queue-service.js'
6
- // import { pikkuOpenAPI } from './functions/wirings/http/pikku-command-openapi.js'
7
- // import { pikkuNext } from './functions/runtimes/nextjs/pikku-command-nextjs.js'
8
- // import { pikkuCLICommand, wireCLI } from '../.pikku/cli/pikku-cli-types.gen.js'
9
- // import { all } from './functions/commands/all.js'
10
- // import { bootstrap } from './functions/commands/bootstrap.js'
1
+ import { pikkuSchemas } from './functions/wirings/functions/schemas.js'
2
+ import { pikkuFetch } from './functions/wirings/fetch/index.js'
3
+ import { pikkuWebSocketTyped } from './functions/wirings/channels/pikku-command-websocket-typed.js'
4
+ import { pikkuRPCClient } from './functions/wirings/rpc/pikku-command-rpc-client.js'
5
+ import { pikkuQueueService } from './functions/wirings/queue/pikku-command-queue-service.js'
6
+ import { pikkuOpenAPI } from './functions/wirings/http/pikku-command-openapi.js'
7
+ import { pikkuNext } from './functions/runtimes/nextjs/pikku-command-nextjs.js'
8
+ import { pikkuCLICommand, wireCLI } from '../.pikku/cli/pikku-cli-types.gen.js'
9
+ import { all } from './functions/commands/all.js'
10
+ import { bootstrap } from './functions/commands/bootstrap.js'
11
+ import { watch } from './functions/commands/watch.js'
11
12
  // import { clientCLIRenderer } from './services.js'
12
13
 
13
- // wireCLI({
14
- // program: 'pikku',
15
- // description:
16
- // 'Pikku CLI - Code generation tool for type-safe backend development',
17
- // render: clientCLIRenderer,
18
- // options: {
19
- // config: {
20
- // description: 'Path to pikku.config.json file',
21
- // short: 'c',
22
- // },
23
- // logLevel: {
24
- // description: 'Set log level',
25
- // default: 'info' as const,
26
- // short: 'l',
27
- // },
28
- // userSessionType: {
29
- // description:
30
- // 'Specify which UserSession type to use (when multiple exist)',
31
- // },
32
- // singletonServicesFactoryType: {
33
- // description: 'Specify which singleton services factory to use',
34
- // },
35
- // sessionServicesFactoryType: {
36
- // description: 'Specify which session services factory to use',
37
- // },
38
- // stateOutput: {
39
- // description: 'Save inspector state to JSON file for reuse',
40
- // },
41
- // stateInput: {
42
- // description: 'Load inspector state from JSON file (skips inspection)',
43
- // },
44
- // },
45
- // commands: {
46
- // all: pikkuCLICommand({
47
- // func: all,
48
- // description: 'Generate all Pikku files (types, schemas, wirings, etc.)',
49
- // isDefault: true,
50
- // options: {
51
- // tags: {
52
- // description: 'Filter functions by tags (comma-separated)',
53
- // short: 't',
54
- // },
55
- // types: {
56
- // description: 'Filter functions by types (comma-separated)',
57
- // },
58
- // directories: {
59
- // description: 'Filter functions by directories (comma-separated)',
60
- // short: 'd',
61
- // },
62
- // httpMethods: {
63
- // description: 'Filter HTTP routes by methods (comma-separated)',
64
- // },
65
- // httpRoutes: {
66
- // description: 'Filter HTTP routes by route patterns (comma-separated)',
67
- // },
68
- // names: {
69
- // description: 'Filter functions by name patterns (supports wildcards)',
70
- // short: 'n',
71
- // },
72
- // },
73
- // }),
74
- // bootstrap: pikkuCLICommand({
75
- // func: bootstrap,
76
- // description: 'Generate only type files (setup phase only)',
77
- // }),
78
- // schemas: pikkuCLICommand({
79
- // func: pikkuSchemas,
80
- // description: 'Generate JSON schemas for function input/output types',
81
- // }),
82
- // fetch: pikkuCLICommand({
83
- // func: pikkuFetch,
84
- // description: 'Generate type-safe HTTP fetch client',
85
- // }),
86
- // websocket: pikkuCLICommand({
87
- // func: pikkuWebSocketTyped,
88
- // description: 'Generate type-safe WebSocket client',
89
- // }),
90
- // rpc: pikkuCLICommand({
91
- // func: pikkuRPCClient,
92
- // description: 'Generate RPC client wrappers',
93
- // }),
94
- // 'queue-service': pikkuCLICommand({
95
- // func: pikkuQueueService,
96
- // description: 'Generate queue service wrapper',
97
- // }),
98
- // openapi: pikkuCLICommand({
99
- // func: pikkuOpenAPI,
100
- // description: 'Generate OpenAPI specification from HTTP routes',
101
- // }),
102
- // nextjs: pikkuCLICommand({
103
- // func: pikkuNext,
104
- // description: 'Generate Next.js backend and HTTP wrappers',
105
- // }),
106
- // },
107
- // })
14
+ wireCLI({
15
+ program: 'pikku',
16
+ description:
17
+ 'Pikku CLI - Code generation tool for type-safe backend development',
18
+ // render: clientCLIRenderer,
19
+ options: {
20
+ config: {
21
+ description: 'Path to pikku.config.json file',
22
+ short: 'c',
23
+ },
24
+ logLevel: {
25
+ description: 'Set log level',
26
+ default: 'info' as const,
27
+ short: 'l',
28
+ },
29
+ userSessionType: {
30
+ description:
31
+ 'Specify which UserSession type to use (when multiple exist)',
32
+ },
33
+ singletonServicesFactoryType: {
34
+ description: 'Specify which singleton services factory to use',
35
+ },
36
+ wireServicesFactoryType: {
37
+ description: 'Specify which wire services factory to use',
38
+ },
39
+ stateOutput: {
40
+ description: 'Save inspector state to JSON file for reuse',
41
+ },
42
+ stateInput: {
43
+ description: 'Load inspector state from JSON file (skips inspection)',
44
+ },
45
+ },
46
+ commands: {
47
+ all: pikkuCLICommand({
48
+ func: all,
49
+ description: 'Generate all Pikku files (types, schemas, wirings, etc.)',
50
+ isDefault: true,
51
+ options: {
52
+ tags: {
53
+ description: 'Filter functions by tags (comma-separated)',
54
+ short: 't',
55
+ },
56
+ types: {
57
+ description: 'Filter functions by types (comma-separated)',
58
+ },
59
+ directories: {
60
+ description: 'Filter functions by directories (comma-separated)',
61
+ short: 'd',
62
+ },
63
+ httpMethods: {
64
+ description: 'Filter HTTP routes by methods (comma-separated)',
65
+ },
66
+ httpRoutes: {
67
+ description: 'Filter HTTP routes by route patterns (comma-separated)',
68
+ },
69
+ names: {
70
+ description: 'Filter functions by name patterns (supports wildcards)',
71
+ short: 'n',
72
+ },
73
+ },
74
+ }),
75
+ bootstrap: pikkuCLICommand({
76
+ func: bootstrap,
77
+ description: 'Generate only type files (setup phase only)',
78
+ }),
79
+ watch: pikkuCLICommand({
80
+ func: watch,
81
+ description: 'Watch for file changes and regenerate automatically',
82
+ }),
83
+ schemas: pikkuCLICommand({
84
+ func: pikkuSchemas,
85
+ description: 'Generate JSON schemas for function input/output types',
86
+ }),
87
+ fetch: pikkuCLICommand({
88
+ func: pikkuFetch,
89
+ description: 'Generate type-safe HTTP fetch client',
90
+ }),
91
+ websocket: pikkuCLICommand({
92
+ func: pikkuWebSocketTyped,
93
+ description: 'Generate type-safe WebSocket client',
94
+ }),
95
+ rpc: pikkuCLICommand({
96
+ func: pikkuRPCClient,
97
+ description: 'Generate RPC client wrappers',
98
+ }),
99
+ 'queue-service': pikkuCLICommand({
100
+ func: pikkuQueueService,
101
+ description: 'Generate queue service wrapper',
102
+ }),
103
+ openapi: pikkuCLICommand({
104
+ func: pikkuOpenAPI,
105
+ description: 'Generate OpenAPI specification from HTTP routes',
106
+ }),
107
+ nextjs: pikkuCLICommand({
108
+ func: pikkuNext,
109
+ description: 'Generate Next.js backend and HTTP wrappers',
110
+ }),
111
+ },
112
+ })