@pikku/cli 0.12.152 → 0.12.154

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 (274) hide show
  1. package/console-app/assets/{HelpPanel-CxjgE40i.js → HelpPanel-BPFBvwZj.js} +1 -1
  2. package/console-app/assets/{abnfDiagram-VCTEODGH-UPW1PlxM.js → abnfDiagram-VCTEODGH-DDuocZ0S.js} +1 -1
  3. package/console-app/assets/architecture-7GRP2DOG-ClxOnHTX.js +1 -0
  4. package/console-app/assets/{architectureDiagram-5GKGNRK7-B3XFrvZk.js → architectureDiagram-5GKGNRK7-bFIt59Dq.js} +1 -1
  5. package/console-app/assets/{blockDiagram-I7D4REHJ-Ca0v9UJQ.js → blockDiagram-I7D4REHJ-Bge8309x.js} +1 -1
  6. package/console-app/assets/{c4Diagram-7LVT6UL2-CLewVsj_.js → c4Diagram-7LVT6UL2-BdJOmC5x.js} +1 -1
  7. package/console-app/assets/channel-c0xM4cPi.js +1 -0
  8. package/console-app/assets/{chunk-4HAMMTFA-BwhbhOD9.js → chunk-4HAMMTFA-Cenx-5I1.js} +1 -1
  9. package/console-app/assets/{chunk-75Z2AOVW-C7nAgNk0.js → chunk-75Z2AOVW-CAGQ08f_.js} +1 -1
  10. package/console-app/assets/{chunk-DU6HZSFF-D4yYAcHt.js → chunk-DU6HZSFF-Bhji7Bhy.js} +1 -1
  11. package/console-app/assets/{chunk-F27PBJKO-UHllOPps.js → chunk-F27PBJKO-D7gTX3dk.js} +1 -1
  12. package/console-app/assets/{chunk-GMAD6QVW-C0l_vm7T.js → chunk-GMAD6QVW-DkRx7Brv.js} +1 -1
  13. package/console-app/assets/{chunk-GVQU2GXP-h-H2Oird.js → chunk-GVQU2GXP-DEWdO9pP.js} +1 -1
  14. package/console-app/assets/{chunk-IMKFNOWR-DJ_W9CSg.js → chunk-IMKFNOWR-C1Vtain1.js} +1 -1
  15. package/console-app/assets/{chunk-L3NEJ4N5-Ce9oniwE.js → chunk-L3NEJ4N5-B_nm0es0.js} +1 -1
  16. package/console-app/assets/{chunk-OSK3NFVY-CdGE5qxS.js → chunk-OSK3NFVY-C0EPlVq0.js} +1 -1
  17. package/console-app/assets/{chunk-P2QGCYS3-DK1pHDdz.js → chunk-P2QGCYS3-qs_HwIoO.js} +1 -1
  18. package/console-app/assets/{chunk-POPQ4Y6H-DjevEFNo.js → chunk-POPQ4Y6H-CJWbAVy_.js} +1 -1
  19. package/console-app/assets/{chunk-PWAF6VOD-BVF5N1No.js → chunk-PWAF6VOD-CmyETkG4.js} +1 -1
  20. package/console-app/assets/{chunk-SHT3W25Y-BX8We-wN.js → chunk-SHT3W25Y-Coqn0qc9.js} +1 -1
  21. package/console-app/assets/{chunk-SVP7TREG-Cl0GgAPC.js → chunk-SVP7TREG-D1E3L3Ry.js} +1 -1
  22. package/console-app/assets/{chunk-TICWLB2K-IWZAWDhu.js → chunk-TICWLB2K-bsfeT6VF.js} +1 -1
  23. package/console-app/assets/chunk-XXDRQBXY-BkM8vXTQ.js +1 -0
  24. package/console-app/assets/classDiagram-ZZMXUADV-yCAU184A.js +1 -0
  25. package/console-app/assets/classDiagram-v2-VYDZK3BY-yCAU184A.js +1 -0
  26. package/console-app/assets/{cose-bilkent-JH36ORCC-GsQ0JAnL.js → cose-bilkent-JH36ORCC-H5-jGbyx.js} +1 -1
  27. package/console-app/assets/{cynefin-OW5HDTMX-hZsAZp_5.js → cynefin-OW5HDTMX-CljdWyve.js} +1 -1
  28. package/console-app/assets/{cynefinDiagram-5FMLGOSQ-CsyMovx1.js → cynefinDiagram-5FMLGOSQ-DmDd9Ruh.js} +1 -1
  29. package/console-app/assets/{dagre-BP8XEFz-.js → dagre-ChLSY7zR.js} +1 -1
  30. package/console-app/assets/{dagre-GXQ25YYZ-Jg5285rx.js → dagre-GXQ25YYZ-DT48xQuH.js} +1 -1
  31. package/console-app/assets/{diagram-S7CK7UJ4-n9JiR8HK.js → diagram-S7CK7UJ4-DKPk5LKU.js} +1 -1
  32. package/console-app/assets/{diagram-UQ7AKVKN-Cde-dgbI.js → diagram-UQ7AKVKN-BWnhjDbO.js} +1 -1
  33. package/console-app/assets/{diagram-VSXAHHWV-CPZUg4FP.js → diagram-VSXAHHWV-1XCGd7TX.js} +1 -1
  34. package/console-app/assets/{diagram-VX7I27RA-B2rCDWvn.js → diagram-VX7I27RA-8dIoEZIX.js} +1 -1
  35. package/console-app/assets/{diagram-Z3DM3KII-UwO0hte3.js → diagram-Z3DM3KII-CgFhlsHg.js} +1 -1
  36. package/console-app/assets/{ebnfDiagram-PWID7BFC-BGJ_PBlS.js → ebnfDiagram-PWID7BFC-j8nbgcPz.js} +1 -1
  37. package/console-app/assets/{erDiagram-RLTQ6QDP-CKsTScr3.js → erDiagram-RLTQ6QDP-fQNmZd6-.js} +1 -1
  38. package/console-app/assets/eventmodeling-NTZA5JFV-bHToGR6p.js +1 -0
  39. package/console-app/assets/flowDiagram-HODETNUW-Dd1RiDsS.js +1 -0
  40. package/console-app/assets/{ganttDiagram-EL5Y4UJY-koeTkIEA.js → ganttDiagram-EL5Y4UJY-D8pzapyN.js} +1 -1
  41. package/console-app/assets/{gitGraph-4MIJSDKK-DyRPbcM4.js → gitGraph-4MIJSDKK-BvRsGeLo.js} +1 -1
  42. package/console-app/assets/{gitGraphDiagram-WWUBYQGX-DSIejrYw.js → gitGraphDiagram-WWUBYQGX-C_qwjJL5.js} +1 -1
  43. package/console-app/assets/{graphlib-BpQ_697T.js → graphlib-9R2fmYel.js} +1 -1
  44. package/console-app/assets/{index-Du9_fRSw.js → index-DMQFSpKy.js} +147 -147
  45. package/console-app/assets/{info-A6RAGUB7-C63f9an_.js → info-A6RAGUB7-BIjzE3Zr.js} +1 -1
  46. package/console-app/assets/{infoDiagram-27XIBGKW-Dz5gMcUF.js → infoDiagram-27XIBGKW-DbFqdvGy.js} +1 -1
  47. package/console-app/assets/{ishikawaDiagram-5VMMS53U-m-nTAZTH.js → ishikawaDiagram-5VMMS53U-D5ei52Uz.js} +1 -1
  48. package/console-app/assets/{journeyDiagram-3NMN7TZE-C7mjFY7i.js → journeyDiagram-3NMN7TZE-DOVQGQxF.js} +1 -1
  49. package/console-app/assets/{kanban-definition-UXKFOSKX-Cm7PqOOP.js → kanban-definition-UXKFOSKX-D8cjrKvj.js} +1 -1
  50. package/console-app/assets/{line-RZNRGurC.js → line-S23S00r8.js} +1 -1
  51. package/console-app/assets/{linear-C2IGWMlF.js → linear-C2q7Mgrm.js} +1 -1
  52. package/console-app/assets/{mermaid-parser.core-DN1yDqgB.js → mermaid-parser.core-DFVvyiUd.js} +3 -3
  53. package/console-app/assets/{mermaid.core-DDRs3TbC.js → mermaid.core-C85pnBPI.js} +4 -4
  54. package/console-app/assets/{mindmap-definition-YA3MSWOX-o6riOwlF.js → mindmap-definition-YA3MSWOX-Bqn28yl9.js} +1 -1
  55. package/console-app/assets/{packet-AYTQ26CC-B89F6gXG.js → packet-AYTQ26CC-Cj1kD_Xa.js} +1 -1
  56. package/console-app/assets/{pegDiagram-XKGWAZYB-BQ1AAIaV.js → pegDiagram-XKGWAZYB-DJ12pyU4.js} +1 -1
  57. package/console-app/assets/{pie-WAS4IAKB-CzuwQlQz.js → pie-WAS4IAKB-BUmyuH7f.js} +1 -1
  58. package/console-app/assets/{pieDiagram-E7YTZNPT-DlcGHWGT.js → pieDiagram-E7YTZNPT-jTvMRCtY.js} +1 -1
  59. package/console-app/assets/{quadrantDiagram-AXDQQJYC-DdITwqw-.js → quadrantDiagram-AXDQQJYC-D826kpcV.js} +1 -1
  60. package/console-app/assets/{radar-RG4KPBEZ-DlJ29jAN.js → radar-RG4KPBEZ-CYbTAeXH.js} +1 -1
  61. package/console-app/assets/{railroad-74A4TZTK-BL49fdM8.js → railroad-74A4TZTK-mfMkjDWk.js} +1 -1
  62. package/console-app/assets/railroad-abnf-HS5TGJTU-nuNyByRg.js +1 -0
  63. package/console-app/assets/railroad-ebnf-LZEXJU2U-BztHKlS5.js +1 -0
  64. package/console-app/assets/railroad-peg-WCYAUIDC-Bw7jp-js.js +1 -0
  65. package/console-app/assets/{railroadDiagram-O6MQD6OU-BNgQGtF5.js → railroadDiagram-O6MQD6OU-CGlOEAk5.js} +1 -1
  66. package/console-app/assets/{requirementDiagram-BXWQKSXE-48lE_WeD.js → requirementDiagram-BXWQKSXE-DY_zQ4Qu.js} +1 -1
  67. package/console-app/assets/{sankeyDiagram-P5KCCOFB-WmTardCP.js → sankeyDiagram-P5KCCOFB-B4QJZukx.js} +1 -1
  68. package/console-app/assets/{sequenceDiagram-WJ2MYXX4-Bd5cHDMs.js → sequenceDiagram-WJ2MYXX4-DTERMwcf.js} +1 -1
  69. package/console-app/assets/{src-BTXg_NtK.js → src-CRoiE_Pf.js} +1 -1
  70. package/console-app/assets/{stateDiagram-D77RDMKH-DBoCkqGv.js → stateDiagram-D77RDMKH-BLnCP1RM.js} +1 -1
  71. package/console-app/assets/stateDiagram-v2-MP3YSRHH-Bv8nfhYK.js +1 -0
  72. package/console-app/assets/{swimlanes-42K2YHIH-lecUPBaK.js → swimlanes-42K2YHIH-CwYZgjxi.js} +1 -1
  73. package/console-app/assets/swimlanesDiagram-VR7AAH4N-BtAfsGDG.js +8 -0
  74. package/console-app/assets/{timeline-definition-24CTP7MA-CWq0OWm1.js → timeline-definition-24CTP7MA-BEv4uhRy.js} +1 -1
  75. package/console-app/assets/{treeView-Q6P3EWNA-C7lEeqUz.js → treeView-Q6P3EWNA-CHhQVPzu.js} +1 -1
  76. package/console-app/assets/{treemap-WGGIJYW6-Bkx2DAoI.js → treemap-WGGIJYW6-DSnq4EZT.js} +1 -1
  77. package/console-app/assets/{vennDiagram-4TSXK5OY-Bw_kGRL3.js → vennDiagram-4TSXK5OY-CHT6P8GK.js} +1 -1
  78. package/console-app/assets/{wardley-WFR3VGLG-V0zki2L0.js → wardley-WFR3VGLG-yPMtiazL.js} +1 -1
  79. package/console-app/assets/{wardleyDiagram-VM6X3IG4-C5vrwEHM.js → wardleyDiagram-VM6X3IG4-Df2U4u0X.js} +1 -1
  80. package/console-app/assets/{xychartDiagram-S5SC5T6Z-B9uA0moC.js → xychartDiagram-S5SC5T6Z-D4bRAEWS.js} +1 -1
  81. package/console-app/index.html +1 -1
  82. package/dist/.pikku/addon/index.d.ts +1 -1
  83. package/dist/.pikku/addon/index.js +1 -1
  84. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  85. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  86. package/dist/.pikku/agent/index.d.ts +1 -1
  87. package/dist/.pikku/agent/index.js +1 -1
  88. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  89. package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
  90. package/dist/.pikku/analytics/index.d.ts +1 -1
  91. package/dist/.pikku/analytics/index.js +1 -1
  92. package/dist/.pikku/analytics/pikku-analytics-types.gen.d.ts +1 -1
  93. package/dist/.pikku/analytics/pikku-analytics-types.gen.js +1 -1
  94. package/dist/.pikku/auth/index.d.ts +1 -1
  95. package/dist/.pikku/auth/index.js +1 -1
  96. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
  97. package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
  98. package/dist/.pikku/channel/index.d.ts +1 -1
  99. package/dist/.pikku/channel/index.js +1 -1
  100. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  101. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  102. package/dist/.pikku/cli/index.d.ts +1 -1
  103. package/dist/.pikku/cli/index.js +1 -1
  104. package/dist/.pikku/cli/pikku-cli-channel.js +16 -1
  105. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  106. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  107. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  108. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  109. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  110. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  111. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  112. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +56 -0
  113. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  114. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  115. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  116. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  117. package/dist/.pikku/error/index.d.ts +1 -1
  118. package/dist/.pikku/error/index.js +1 -1
  119. package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
  120. package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
  121. package/dist/.pikku/function/index.d.ts +1 -1
  122. package/dist/.pikku/function/index.js +1 -1
  123. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  124. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  125. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  126. package/dist/.pikku/function/pikku-functions-meta.gen.json +61 -4
  127. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  128. package/dist/.pikku/gateway/index.d.ts +1 -1
  129. package/dist/.pikku/gateway/index.js +1 -1
  130. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
  131. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
  132. package/dist/.pikku/http/index.d.ts +1 -1
  133. package/dist/.pikku/http/index.js +1 -1
  134. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  135. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  136. package/dist/.pikku/mcp/index.d.ts +1 -1
  137. package/dist/.pikku/mcp/index.js +1 -1
  138. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  139. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  140. package/dist/.pikku/middleware/index.d.ts +1 -1
  141. package/dist/.pikku/middleware/index.js +1 -1
  142. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
  143. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
  144. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  145. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  146. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  147. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  148. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  149. package/dist/.pikku/queue/index.d.ts +1 -1
  150. package/dist/.pikku/queue/index.js +1 -1
  151. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  152. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  153. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  154. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  155. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  156. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  157. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +3 -0
  158. package/dist/.pikku/scenarios/index.d.ts +1 -1
  159. package/dist/.pikku/scenarios/index.js +1 -1
  160. package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
  161. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  162. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  163. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  164. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  165. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  166. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  167. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  168. package/dist/.pikku/scheduler/index.d.ts +1 -1
  169. package/dist/.pikku/scheduler/index.js +1 -1
  170. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  171. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  172. package/dist/.pikku/schemas/register.gen.js +13 -1
  173. package/dist/.pikku/schemas/schemas/ExamplesAddInput.schema.json +1 -0
  174. package/dist/.pikku/schemas/schemas/ExamplesAddOutput.schema.json +1 -0
  175. package/dist/.pikku/schemas/schemas/ExamplesListInput.schema.json +1 -0
  176. package/dist/.pikku/schemas/schemas/ExamplesListOutput.schema.json +1 -0
  177. package/dist/.pikku/schemas/schemas/ExamplesShowInput.schema.json +1 -0
  178. package/dist/.pikku/schemas/schemas/ExamplesShowOutput.schema.json +1 -0
  179. package/dist/.pikku/scopes/index.d.ts +1 -1
  180. package/dist/.pikku/scopes/index.js +1 -1
  181. package/dist/.pikku/scopes/pikku-flags.gen.d.ts +1 -1
  182. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  183. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  184. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  185. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  186. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  187. package/dist/.pikku/secrets/index.d.ts +1 -1
  188. package/dist/.pikku/secrets/index.js +1 -1
  189. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  190. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  191. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  192. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  193. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
  194. package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
  195. package/dist/.pikku/setup/index.d.ts +1 -1
  196. package/dist/.pikku/setup/index.js +1 -1
  197. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
  198. package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
  199. package/dist/.pikku/trigger/index.d.ts +1 -1
  200. package/dist/.pikku/trigger/index.js +1 -1
  201. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  202. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  203. package/dist/.pikku/variables/index.d.ts +1 -1
  204. package/dist/.pikku/variables/index.js +1 -1
  205. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  206. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  207. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  208. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  209. package/dist/.pikku/workflow/index.d.ts +1 -1
  210. package/dist/.pikku/workflow/index.js +1 -1
  211. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  212. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  213. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  214. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  215. package/dist/bin/pikku-bin.mjs +2 -2
  216. package/dist/src/cli.wiring.js +51 -0
  217. package/dist/src/deploy/build-pipeline.d.ts +43 -0
  218. package/dist/src/deploy/build-pipeline.js +79 -30
  219. package/dist/src/examples.gen.d.ts +17 -0
  220. package/dist/src/examples.gen.js +7 -0
  221. package/dist/src/fabric/functions/validate.function.d.ts +34 -0
  222. package/dist/src/fabric/functions/validate.function.js +118 -0
  223. package/dist/src/fabric/lib/config.d.ts +1 -0
  224. package/dist/src/fabric/lib/config.js +1 -1
  225. package/dist/src/fabric/lib/report-environment.d.ts +5 -4
  226. package/dist/src/fabric/lib/report-environment.js +18 -4
  227. package/dist/src/functions/commands/deploy-apply.js +1 -0
  228. package/dist/src/functions/commands/deploy-plan.js +1 -0
  229. package/dist/src/functions/commands/dev-address.d.ts +27 -0
  230. package/dist/src/functions/commands/dev-address.js +45 -0
  231. package/dist/src/functions/commands/dev.js +6 -0
  232. package/dist/src/functions/commands/environment.d.ts +8 -0
  233. package/dist/src/functions/commands/environment.js +15 -0
  234. package/dist/src/functions/commands/examples.d.ts +170 -0
  235. package/dist/src/functions/commands/examples.js +28 -0
  236. package/dist/src/functions/commands/scenario.js +356 -273
  237. package/dist/src/functions/db/local-db.d.ts +12 -0
  238. package/dist/src/functions/db/local-db.js +1 -1
  239. package/dist/src/functions/db/postgres/scenario-baseline.d.ts +3 -0
  240. package/dist/src/functions/db/postgres/scenario-baseline.js +112 -0
  241. package/dist/src/functions/db/scenario-baseline.d.ts +51 -0
  242. package/dist/src/functions/db/scenario-baseline.js +60 -0
  243. package/dist/src/functions/db/sqlite/scenario-baseline.d.ts +3 -0
  244. package/dist/src/functions/db/sqlite/scenario-baseline.js +82 -0
  245. package/dist/src/functions/examples/command-schemas.d.ts +69 -0
  246. package/dist/src/functions/examples/command-schemas.js +15 -0
  247. package/dist/src/functions/examples/corpus.d.ts +115 -0
  248. package/dist/src/functions/examples/corpus.js +307 -0
  249. package/dist/src/functions/examples/project.d.ts +64 -0
  250. package/dist/src/functions/examples/project.js +363 -0
  251. package/dist/src/functions/examples/render.d.ts +4 -0
  252. package/dist/src/functions/examples/render.js +101 -0
  253. package/dist/src/functions/examples/run.d.ts +9 -0
  254. package/dist/src/functions/examples/run.js +242 -0
  255. package/dist/src/functions/examples/schemas.d.ts +65 -0
  256. package/dist/src/functions/examples/schemas.js +76 -0
  257. package/dist/src/functions/surface/render-surface-doc.js +32 -2
  258. package/dist/tsconfig.tsbuildinfo +1 -1
  259. package/package.json +8 -7
  260. package/snippets-meta.json +2 -0
  261. package/snippets.json +2 -0
  262. package/surface.json +1 -1
  263. package/console-app/assets/architecture-7GRP2DOG-BQN972Vc.js +0 -1
  264. package/console-app/assets/channel-B8xtOmL3.js +0 -1
  265. package/console-app/assets/chunk-XXDRQBXY-CGWcS5Ol.js +0 -1
  266. package/console-app/assets/classDiagram-ZZMXUADV-OGsmOlmO.js +0 -1
  267. package/console-app/assets/classDiagram-v2-VYDZK3BY-OGsmOlmO.js +0 -1
  268. package/console-app/assets/eventmodeling-NTZA5JFV-CnZOTLz3.js +0 -1
  269. package/console-app/assets/flowDiagram-HODETNUW-TYMCrte8.js +0 -1
  270. package/console-app/assets/railroad-abnf-HS5TGJTU-D9Ej_sin.js +0 -1
  271. package/console-app/assets/railroad-ebnf-LZEXJU2U-CjzlC3qv.js +0 -1
  272. package/console-app/assets/railroad-peg-WCYAUIDC-BPa6lIrj.js +0 -1
  273. package/console-app/assets/stateDiagram-v2-MP3YSRHH-BLbaZawL.js +0 -1
  274. package/console-app/assets/swimlanesDiagram-VR7AAH4N-CM_5HS_7.js +0 -8
@@ -0,0 +1,363 @@
1
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
2
+ import { join, relative, isAbsolute } from 'node:path';
3
+ /**
4
+ * The tables the generator has actually emitted zod for, or null when it has emitted
5
+ * none.
6
+ *
7
+ * Null and empty are different: no generated file means codegen has never run here, and
8
+ * every caller must skip the check rather than report the whole schema missing.
9
+ */
10
+ export function generatedTables(outDir) {
11
+ let generated;
12
+ try {
13
+ generated = readFileSync(join(outDir, 'db', 'zod.gen.ts'), 'utf-8');
14
+ }
15
+ catch {
16
+ return null;
17
+ }
18
+ const tables = [];
19
+ for (const match of generated.matchAll(/export const (\w+) =/g)) {
20
+ const name = match[1];
21
+ if (name.endsWith('Z') &&
22
+ !name.endsWith('InsertZ') &&
23
+ !name.endsWith('PatchZ')) {
24
+ tables.push(name.slice(0, -1));
25
+ }
26
+ }
27
+ return tables;
28
+ }
29
+ /**
30
+ * The table this name most likely meant, by containment either way.
31
+ *
32
+ * `--entity changeover` against a `weeklyChangeover` table is the shape this is for.
33
+ * Containment only — a guess dressed up as certainty sends the caller off to rename
34
+ * working code, which costs more than saying nothing.
35
+ */
36
+ export function nearestTable(wanted, tables) {
37
+ const want = wanted.toLowerCase();
38
+ const hits = tables.filter((t) => {
39
+ const has = t.toLowerCase();
40
+ return has.includes(want) || want.includes(has);
41
+ });
42
+ return hits.length === 1 ? hits[0] : null;
43
+ }
44
+ /** Every `.ts`/`.tsx` under a directory, ignoring generated files and dependencies. */
45
+ function sourceFiles(dir) {
46
+ try {
47
+ return readdirSync(dir, { recursive: true, encoding: 'utf8' })
48
+ .filter((f) => /\.tsx?$/.test(f) &&
49
+ !f.includes('node_modules') &&
50
+ !f.includes('.gen.'))
51
+ .map((f) => join(dir, f));
52
+ }
53
+ catch {
54
+ return [];
55
+ }
56
+ }
57
+ /**
58
+ * This project's persona cast, in declaration order.
59
+ *
60
+ * Read from the `definePersonas` call rather than from generated meta because a cast
61
+ * rewritten a moment ago has not been through codegen yet, and a recipe that substitutes
62
+ * an example's actor has to substitute the CURRENT one or it writes a scenario naming
63
+ * somebody who no longer exists.
64
+ */
65
+ export function personaCast(srcDirectories) {
66
+ for (const dir of srcDirectories) {
67
+ for (const file of sourceFiles(dir)) {
68
+ let body;
69
+ try {
70
+ body = readFileSync(file, 'utf-8');
71
+ }
72
+ catch {
73
+ continue;
74
+ }
75
+ const call = /definePersonas\(\s*\{/.exec(body);
76
+ if (!call)
77
+ continue;
78
+ const open = call.index + call[0].length - 1;
79
+ const block = balancedBlock(body, open);
80
+ if (!block)
81
+ continue;
82
+ const names = [];
83
+ let depth = 0;
84
+ for (const line of block.split('\n')) {
85
+ const trimmed = line.trim();
86
+ if (depth === 1) {
87
+ const key = /^['"]?([A-Za-z_$][\w$]*)['"]?\s*:/.exec(trimmed);
88
+ if (key)
89
+ names.push(key[1]);
90
+ }
91
+ for (const ch of line) {
92
+ if (ch === '{' || ch === '[' || ch === '(')
93
+ depth++;
94
+ else if (ch === '}' || ch === ']' || ch === ')')
95
+ depth--;
96
+ }
97
+ }
98
+ if (names.length > 0)
99
+ return names;
100
+ }
101
+ }
102
+ return [];
103
+ }
104
+ function balancedBlock(source, open) {
105
+ let depth = 0;
106
+ for (let i = open; i < source.length; i++) {
107
+ if (source[i] === '{')
108
+ depth++;
109
+ else if (source[i] === '}' && --depth === 0)
110
+ return source.slice(open, i + 1);
111
+ }
112
+ return null;
113
+ }
114
+ /** Every RPC the generated function meta says is registered. */
115
+ export function registeredRpcs(outDir) {
116
+ try {
117
+ const meta = JSON.parse(readFileSync(join(outDir, 'function', 'meta.gen.json'), 'utf-8'));
118
+ return Object.keys(meta);
119
+ }
120
+ catch {
121
+ return [];
122
+ }
123
+ }
124
+ /**
125
+ * The frontend a recipe's `src/` files belong to.
126
+ *
127
+ * A project with no `apps/` directory writes them at the root, which is what a
128
+ * single-package project wants. An unknown slug returns null rather than falling back —
129
+ * a recipe aimed at an app that does not exist is a mistake worth refusing, not one
130
+ * worth silently redirecting into another app.
131
+ */
132
+ export function resolveAppBase(rootDir, slug) {
133
+ const appsDir = join(rootDir, 'apps');
134
+ let apps = [];
135
+ try {
136
+ apps = readdirSync(appsDir, { withFileTypes: true })
137
+ .filter((e) => e.isDirectory() && existsSync(join(appsDir, e.name, 'package.json')))
138
+ .map((e) => e.name)
139
+ .sort();
140
+ }
141
+ catch {
142
+ apps = [];
143
+ }
144
+ if (apps.length === 0)
145
+ return slug ? null : { slug: '.', base: '.' };
146
+ if (!slug) {
147
+ const primary = apps.includes('app') ? 'app' : apps[0];
148
+ return { slug: primary, base: `apps/${primary}` };
149
+ }
150
+ return apps.includes(slug) ? { slug, base: `apps/${slug}` } : null;
151
+ }
152
+ const GENERATED_MIGRATION_HEADER = /--\s*Generated by `pikku db generate`/;
153
+ /**
154
+ * Better Auth and runtime tables by name — the fallback for a schema written before
155
+ * `pikku db generate` stamped its own migrations with their provenance.
156
+ *
157
+ * Self-retiring: this only ever decides a table the header did not already claim. Do not
158
+ * extend it; a framework table's real answer is the provenance stamp, which moves with
159
+ * the project's own auth config where a static list cannot.
160
+ */
161
+ const AUTH_INFRA_TABLES = new Set([
162
+ 'user',
163
+ 'session',
164
+ 'account',
165
+ 'verification',
166
+ 'apikey',
167
+ 'api_key',
168
+ 'jwks',
169
+ 'two_factor',
170
+ 'passkey',
171
+ 'organization',
172
+ 'member',
173
+ 'invitation',
174
+ 'team',
175
+ 'team_member',
176
+ 'audit',
177
+ 'audit_log',
178
+ ]);
179
+ const LOOKUP_LABEL_COLUMNS = new Set([
180
+ 'id',
181
+ 'name',
182
+ 'label',
183
+ 'title',
184
+ 'description',
185
+ 'code',
186
+ 'color',
187
+ 'icon',
188
+ 'sort_order',
189
+ 'created_at',
190
+ 'updated_at',
191
+ ]);
192
+ function stripSqlComments(sql) {
193
+ return sql.replace(/\/\*[\s\S]*?\*\//g, ' ').replace(/--[^\n]*/g, ' ');
194
+ }
195
+ function unquoteIdent(raw) {
196
+ return raw.replace(/^["`[]|["`\]]$/g, '');
197
+ }
198
+ function splitTopLevel(body) {
199
+ const items = [];
200
+ let depth = 0;
201
+ let current = '';
202
+ for (const ch of body) {
203
+ if (ch === '(')
204
+ depth++;
205
+ else if (ch === ')')
206
+ depth--;
207
+ if (ch === ',' && depth === 0) {
208
+ items.push(current);
209
+ current = '';
210
+ continue;
211
+ }
212
+ current += ch;
213
+ }
214
+ if (current.trim())
215
+ items.push(current);
216
+ return items;
217
+ }
218
+ function balancedParens(sql, openParenIdx) {
219
+ let depth = 0;
220
+ for (let i = openParenIdx; i < sql.length; i++) {
221
+ if (sql[i] === '(')
222
+ depth++;
223
+ else if (sql[i] === ')' && --depth === 0)
224
+ return sql.slice(openParenIdx + 1, i);
225
+ }
226
+ return null;
227
+ }
228
+ function parseCreateTables(sql) {
229
+ const clean = stripSqlComments(sql);
230
+ const tables = [];
231
+ const re = /CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?([\w"`[\].]+)\s*\(/gi;
232
+ for (const match of clean.matchAll(re)) {
233
+ const name = unquoteIdent(match[1].split('.').pop());
234
+ const body = balancedParens(clean, match.index + match[0].length - 1);
235
+ if (body === null)
236
+ continue;
237
+ const columns = [];
238
+ const pkColumns = [];
239
+ const fkColumns = [];
240
+ for (const raw of splitTopLevel(body)) {
241
+ const item = raw.trim();
242
+ if (!item)
243
+ continue;
244
+ const constraint = /^(PRIMARY\s+KEY|FOREIGN\s+KEY|UNIQUE|CHECK|CONSTRAINT)\b/i.exec(item);
245
+ if (constraint) {
246
+ if (/^PRIMARY\s+KEY/i.test(item)) {
247
+ const cols = balancedParens(item, item.indexOf('('));
248
+ if (cols)
249
+ pkColumns.push(...cols.split(',').map((c) => unquoteIdent(c.trim())));
250
+ }
251
+ if (/^FOREIGN\s+KEY/i.test(item)) {
252
+ const cols = balancedParens(item, item.indexOf('('));
253
+ if (cols)
254
+ fkColumns.push(...cols.split(',').map((c) => unquoteIdent(c.trim())));
255
+ }
256
+ continue;
257
+ }
258
+ const colName = unquoteIdent(item.split(/\s+/)[0]);
259
+ columns.push(colName);
260
+ if (/PRIMARY\s+KEY/i.test(item))
261
+ pkColumns.push(colName);
262
+ if (/REFERENCES\s+/i.test(item))
263
+ fkColumns.push(colName);
264
+ }
265
+ tables.push({ name, columns, pkColumns, fkColumns });
266
+ }
267
+ return tables;
268
+ }
269
+ /**
270
+ * The tables this project promised its users, from its own migrations.
271
+ *
272
+ * Excluded: anything a framework declared (the `pikku db generate` provenance stamp, or
273
+ * the auth names above), a pure junction table, and a lookup table other rows point at
274
+ * but nobody edits. What is left is the set a person is supposed to be able to create
275
+ * and edit, which is the denominator the `entity-write` precondition is measured against.
276
+ */
277
+ export function requiredEntities(rootDir) {
278
+ const engine = existsSync(join(rootDir, 'db', 'postgres'))
279
+ ? 'postgres'
280
+ : 'sqlite';
281
+ const dir = join(rootDir, 'db', engine);
282
+ if (!existsSync(dir))
283
+ return [];
284
+ const byName = new Map();
285
+ const generated = new Set();
286
+ for (const file of readdirSync(dir).sort()) {
287
+ if (!file.endsWith('.sql'))
288
+ continue;
289
+ let sql;
290
+ try {
291
+ sql = readFileSync(join(dir, file), 'utf-8');
292
+ }
293
+ catch {
294
+ continue;
295
+ }
296
+ const isGenerated = GENERATED_MIGRATION_HEADER.test(sql);
297
+ for (const table of parseCreateTables(sql)) {
298
+ byName.set(table.name, table);
299
+ if (isGenerated)
300
+ generated.add(table.name.toLowerCase());
301
+ }
302
+ }
303
+ const required = [];
304
+ for (const table of byName.values()) {
305
+ const lower = table.name.toLowerCase();
306
+ if (AUTH_INFRA_TABLES.has(lower) || generated.has(lower))
307
+ continue;
308
+ const nonKey = table.columns.filter((c) => !table.pkColumns.includes(c) && c !== 'created_at' && c !== 'updated_at');
309
+ const isJunction = table.pkColumns.length >= 2 &&
310
+ table.fkColumns.length >= 2 &&
311
+ nonKey.length === 0;
312
+ if (isJunction)
313
+ continue;
314
+ const isLookup = table.fkColumns.length === 0 &&
315
+ table.columns.every((c) => LOOKUP_LABEL_COLUMNS.has(c.toLowerCase()));
316
+ if (isLookup)
317
+ continue;
318
+ required.push(table.name);
319
+ }
320
+ return required.sort();
321
+ }
322
+ /** SQL table names are snake_case; the generated Kysely interface is camelCase. */
323
+ const normalizeTable = (name) => name.toLowerCase().replace(/_/g, '');
324
+ /** Tables with at least one `insertInto`/`updateTable` reachable from the app's source. */
325
+ export function coveredEntities(srcDirectories) {
326
+ const covered = new Set();
327
+ const writeRe = /\.(?:insertInto|updateTable)\(\s*['"]([A-Za-z_][A-Za-z0-9_]*)['"]/g;
328
+ for (const dir of srcDirectories) {
329
+ for (const file of sourceFiles(dir)) {
330
+ let body;
331
+ try {
332
+ body = readFileSync(file, 'utf-8');
333
+ }
334
+ catch {
335
+ continue;
336
+ }
337
+ for (const m of body.matchAll(writeRe))
338
+ covered.add(normalizeTable(m[1]));
339
+ }
340
+ }
341
+ return covered;
342
+ }
343
+ /**
344
+ * required − covered: the tables a person could never create or edit through this app,
345
+ * even though the schema promised them.
346
+ *
347
+ * Empty `required` (no schema yet) fails open — a project with nothing written has no
348
+ * pacing problem to have.
349
+ */
350
+ export function entityWriteCoverage(rootDir, srcDirectories) {
351
+ const required = requiredEntities(rootDir);
352
+ if (required.length === 0)
353
+ return { required: [], uncovered: [] };
354
+ const covered = coveredEntities(srcDirectories);
355
+ return {
356
+ required,
357
+ uncovered: required.filter((t) => !covered.has(normalizeTable(t))),
358
+ };
359
+ }
360
+ /** A path under the project, for printing. */
361
+ export function projectRelative(rootDir, path) {
362
+ return isAbsolute(path) ? relative(rootDir, path) : path;
363
+ }
@@ -0,0 +1,4 @@
1
+ import type { ExamplesAddResult, ExamplesListResult, ExamplesShowResult } from './schemas.js';
2
+ export declare const renderExamplesList: (_services: unknown, { examples }: ExamplesListResult) => void;
3
+ export declare const renderExamplesShow: (_services: unknown, result: ExamplesShowResult) => void;
4
+ export declare const renderExamplesAdd: (_services: unknown, result: ExamplesAddResult) => void;
@@ -0,0 +1,101 @@
1
+ import { added, changed, dim, removed } from '../../fabric/lib/output.js';
2
+ export const renderExamplesList = (_services, { examples }) => {
3
+ if (examples.length === 0) {
4
+ console.log(dim('no examples matched'));
5
+ return;
6
+ }
7
+ for (const example of examples) {
8
+ const tags = [example.lang];
9
+ if (example.entity)
10
+ tags.push(`--entity`);
11
+ console.log(`${added(example.name)} ${dim(`(${tags.join(', ')})`)} ${example.title}`);
12
+ if (example.when)
13
+ console.log(` ${dim(example.when)}`);
14
+ console.log();
15
+ }
16
+ console.log('─'.repeat(40));
17
+ console.log(dim(`${examples.length} example${examples.length !== 1 ? 's' : ''} · read one with \`pikku examples show --name <name>\`, write it with \`pikku examples add --name <name>\``));
18
+ };
19
+ const renderNotes = (notes) => {
20
+ if (notes.length === 0)
21
+ return;
22
+ console.log();
23
+ console.log(dim('What the example says about itself — none of this lands in the files:'));
24
+ for (const note of notes) {
25
+ console.log();
26
+ if (note.anchor)
27
+ console.log(`${changed('▸')} ${note.anchor}`);
28
+ for (const line of note.lines)
29
+ console.log(` ${line}`);
30
+ }
31
+ };
32
+ export const renderExamplesShow = (_services, result) => {
33
+ if (!result.found) {
34
+ console.log(removed(`✗ no example named "${result.name}"`));
35
+ console.log(dim(`available: ${result.available.join(', ')}`));
36
+ return;
37
+ }
38
+ console.log(`${added(result.name)} ${result.title}`);
39
+ if (result.when)
40
+ console.log(dim(result.when));
41
+ console.log(dim(result.source));
42
+ console.log();
43
+ console.log(result.code);
44
+ renderNotes(result.notes);
45
+ if (result.steps) {
46
+ console.log();
47
+ console.log(result.steps);
48
+ }
49
+ };
50
+ export const renderExamplesAdd = (_services, result) => {
51
+ if (result.refusal) {
52
+ console.log(changed('⏸') + ' ' + result.refusal);
53
+ process.exitCode = 1;
54
+ return;
55
+ }
56
+ const label = result.entity
57
+ ? `${result.name} (${result.entity})`
58
+ : result.name;
59
+ console.log(`${added('✓')} ${label} — ${result.written.length} file(s) written, already named for this app`);
60
+ for (const path of result.written)
61
+ console.log(` ${added('+')} ${path}`);
62
+ if (result.kept.length > 0) {
63
+ console.log(dim(` ${result.kept.length} already existed and were left untouched: ${result.kept.join(', ')}`));
64
+ }
65
+ for (const failure of result.failed)
66
+ console.log(` ${removed('✗')} ${failure}`);
67
+ if (result.deferred.length > 0) {
68
+ console.log();
69
+ console.log(changed('⏸') +
70
+ ` not written — ${result.deferred.length} file(s) build their schemas from a table this project does not have yet:`);
71
+ for (const entry of result.deferred) {
72
+ console.log(` · ${entry.path} — needs ${entry.tables.map((t) => `\`${t}\``).join(', ')}`);
73
+ }
74
+ console.log(dim('Write that migration in db/<engine>/*.sql, run `pikku db migrate`, then run this again and the file lands.'));
75
+ }
76
+ if (result.api.length > 0) {
77
+ console.log();
78
+ console.log(dim('Their API — compose against this rather than reading the files back:'));
79
+ for (const file of result.api) {
80
+ console.log();
81
+ console.log(`${file.path} — exports ${file.exports.join(', ')}`);
82
+ for (const declaration of file.declarations) {
83
+ console.log(declaration.replace(/^/gm, ' '));
84
+ }
85
+ }
86
+ }
87
+ if (result.manual.length > 0) {
88
+ console.log();
89
+ console.log(changed('⚠') +
90
+ ` ${result.name} also needs ${result.manual.join(', ')}, which carry an example domain — run each with the entity it is for.`);
91
+ }
92
+ if (result.when) {
93
+ console.log();
94
+ console.log(result.when);
95
+ }
96
+ renderNotes(result.notes);
97
+ if (result.steps) {
98
+ console.log();
99
+ console.log(result.steps);
100
+ }
101
+ };
@@ -0,0 +1,9 @@
1
+ import type { ExamplesAddResult, ExamplesListResult, ExamplesShowResult } from './schemas.js';
2
+ export interface ExampleProject {
3
+ rootDir: string;
4
+ outDir: string;
5
+ srcDirectories: string[];
6
+ }
7
+ export declare function runExamplesList(group?: string): ExamplesListResult;
8
+ export declare function runExamplesShow(project: ExampleProject, name: string, entity?: string): ExamplesShowResult;
9
+ export declare function runExamplesAdd(project: ExampleProject, name: string, entity?: string, app?: string): ExamplesAddResult;