@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
@@ -1,4 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
+ import type { PGlite } from '@electric-sql/pglite';
2
3
  import { type MigrateResult } from '@pikku/migrator-sql';
3
4
  import type { ColumnInfo } from './db-introspector.js';
4
5
  import { type CodegenResult } from './db-codegen.js';
@@ -74,6 +75,16 @@ export declare function resolveDb(userConfig: UserConfigShape, rootDir: string,
74
75
  defaultSchema?: string;
75
76
  pgliteExtensions?: string[];
76
77
  } | string): ResolvedDb | null;
78
+ export interface PostgresQueryClient {
79
+ query<T = unknown>(sql: string, params?: unknown[]): Promise<{
80
+ rows: T[];
81
+ }>;
82
+ connect?(): Promise<unknown>;
83
+ end(): Promise<void>;
84
+ exec?(sql: string): Promise<unknown>;
85
+ __connectionString?: string;
86
+ __pglite?: PGlite;
87
+ }
77
88
  /**
78
89
  * What an embedded PGlite instance needs beyond its data directory: where to
79
90
  * resolve extension packages from, and which ones to load.
@@ -109,6 +120,7 @@ type PGliteExtension = {
109
120
  * also names is not registered twice.
110
121
  */
111
122
  export declare function loadPGliteExtensions(rootDir: string, specs: string[]): Promise<Record<string, PGliteExtension>>;
123
+ export declare function withPostgresClient<T>(resolved: ResolvedPostgresDb, run: (client: PostgresQueryClient) => Promise<T>): Promise<T>;
112
124
  export interface MigrateAndCodegenOutcome {
113
125
  migrate: MigrateResult;
114
126
  codegen: CodegenResult;
@@ -294,7 +294,7 @@ function pgliteAsClient(db) {
294
294
  },
295
295
  };
296
296
  }
297
- async function withPostgresClient(resolved, run) {
297
+ export async function withPostgresClient(resolved, run) {
298
298
  const client = await createPostgresClient(resolved);
299
299
  try {
300
300
  return await run(client);
@@ -0,0 +1,3 @@
1
+ import { type ResolvedPostgresDb } from '../local-db.js';
2
+ import { type ScenarioBaseline, type ScenarioBaselineOptions } from '../scenario-baseline.js';
3
+ export declare function capturePostgresScenarioBaseline(resolved: ResolvedPostgresDb, { keep }: ScenarioBaselineOptions): Promise<ScenarioBaseline>;
@@ -0,0 +1,112 @@
1
+ import { MIGRATION_TRACKING_TABLE } from '@pikku/migrator-sql';
2
+ import { withPostgresClient } from '../local-db.js';
3
+ import { BASELINE_SCHEMA, FEATURE_LAYER, SEED_LAYER, copyName, keepMatcher, quoteIdentifier, } from '../scenario-baseline.js';
4
+ export async function capturePostgresScenarioBaseline(resolved, { keep = [] }) {
5
+ const shouldKeep = keepMatcher(keep);
6
+ const sequencesByLayer = new Map();
7
+ const copy = (layer, schema, table) => `${quoteIdentifier(BASELINE_SCHEMA)}.${quoteIdentifier(copyName([layer, schema, table]))}`;
8
+ const tables = await withPostgresClient(resolved, async (client) => {
9
+ const { rows } = await client.query(`
10
+ SELECT table_schema, table_name
11
+ FROM information_schema.tables
12
+ WHERE table_type = 'BASE TABLE'
13
+ AND table_schema NOT IN ('information_schema', '${BASELINE_SCHEMA}')
14
+ AND table_schema NOT LIKE 'pg_%'
15
+ ORDER BY table_schema, table_name
16
+ `);
17
+ await client.query(`CREATE SCHEMA IF NOT EXISTS ${quoteIdentifier(BASELINE_SCHEMA)}`);
18
+ return rows.filter(({ table_schema, table_name }) => table_name !== MIGRATION_TRACKING_TABLE &&
19
+ !shouldKeep(table_schema, table_name));
20
+ });
21
+ const captureLayer = (layer) => withPostgresClient(resolved, async (client) => {
22
+ for (const { table_schema, table_name } of tables) {
23
+ const target = copy(layer, table_schema, table_name);
24
+ await client.query(`DROP TABLE IF EXISTS ${target}`);
25
+ await client.query(`CREATE TABLE ${target} AS TABLE ${quoteIdentifier(table_schema)}.${quoteIdentifier(table_name)}`);
26
+ }
27
+ // Sequences are state the row copies do not carry: restoring the rows
28
+ // without them leaves the next insert claiming an id that already exists.
29
+ const { rows } = await client.query(`
30
+ SELECT s.schemaname, s.sequencename, s.last_value, s.start_value,
31
+ owner_ns.nspname AS owner_schema,
32
+ owner_cls.relname AS owner_table
33
+ FROM pg_sequences s
34
+ JOIN pg_namespace seq_ns ON seq_ns.nspname = s.schemaname
35
+ JOIN pg_class seq_cls
36
+ ON seq_cls.relname = s.sequencename
37
+ AND seq_cls.relnamespace = seq_ns.oid
38
+ LEFT JOIN pg_depend dep
39
+ ON dep.classid = 'pg_class'::regclass
40
+ AND dep.objid = seq_cls.oid
41
+ AND dep.refclassid = 'pg_class'::regclass
42
+ AND dep.deptype IN ('a', 'i')
43
+ LEFT JOIN pg_class owner_cls ON owner_cls.oid = dep.refobjid
44
+ LEFT JOIN pg_namespace owner_ns ON owner_ns.oid = owner_cls.relnamespace
45
+ WHERE s.schemaname NOT IN ('information_schema', '${BASELINE_SCHEMA}')
46
+ AND s.schemaname NOT LIKE 'pg_%'
47
+ `);
48
+ sequencesByLayer.set(layer, rows
49
+ // A sequence owned by a kept table is left alone with the table: its
50
+ // rows survive the restore, so winding its counter back hands the
51
+ // next insert an id that is already taken.
52
+ .filter((sequence) => !(sequence.owner_table !== null &&
53
+ shouldKeep(sequence.owner_schema, sequence.owner_table)))
54
+ .map((sequence) => ({
55
+ qualified: `${quoteIdentifier(sequence.schemaname)}.${quoteIdentifier(sequence.sequencename)}`,
56
+ lastValue: sequence.last_value,
57
+ startValue: sequence.start_value,
58
+ })));
59
+ });
60
+ const restoreLayer = (layer) => withPostgresClient(resolved, async (client) => {
61
+ // Foreign keys are switched off for the duration rather than the tables
62
+ // sorted into dependency order: `keep` can hold the parent of a table
63
+ // being replaced, which no ordering makes legal.
64
+ try {
65
+ await client.query(`SET session_replication_role = 'replica'`);
66
+ }
67
+ catch (error) {
68
+ throw new Error(`Scenario database reset needs 'SET session_replication_role' to suspend foreign keys, and this role may not: ${error?.message ?? error}. Connect as a superuser, or run the suite against sqlite.`);
69
+ }
70
+ try {
71
+ await client.query('BEGIN');
72
+ try {
73
+ for (const { table_schema, table_name } of tables) {
74
+ const target = `${quoteIdentifier(table_schema)}.${quoteIdentifier(table_name)}`;
75
+ await client.query(`DELETE FROM ${target}`);
76
+ await client.query(`INSERT INTO ${target} SELECT * FROM ${copy(layer, table_schema, table_name)}`);
77
+ }
78
+ await client.query('COMMIT');
79
+ }
80
+ catch (error) {
81
+ await client.query('ROLLBACK');
82
+ throw error;
83
+ }
84
+ for (const { qualified, lastValue, startValue } of sequencesByLayer.get(layer) ?? []) {
85
+ await client.query(lastValue === null
86
+ ? `SELECT setval('${qualified}', ${startValue}, false)`
87
+ : `SELECT setval('${qualified}', ${lastValue}, true)`);
88
+ }
89
+ }
90
+ finally {
91
+ await client.query(`SET session_replication_role = 'origin'`);
92
+ }
93
+ });
94
+ await captureLayer(SEED_LAYER);
95
+ let active = SEED_LAYER;
96
+ return {
97
+ tables: tables.map(({ table_schema, table_name }) => `${table_schema}.${table_name}`),
98
+ restore: () => restoreLayer(active),
99
+ async pushFeatureLayer() {
100
+ await captureLayer(FEATURE_LAYER);
101
+ active = FEATURE_LAYER;
102
+ },
103
+ async popFeatureLayer() {
104
+ active = SEED_LAYER;
105
+ },
106
+ async drop() {
107
+ await withPostgresClient(resolved, async (client) => {
108
+ await client.query(`DROP SCHEMA IF EXISTS ${quoteIdentifier(BASELINE_SCHEMA)} CASCADE`);
109
+ });
110
+ },
111
+ };
112
+ }
@@ -0,0 +1,51 @@
1
+ import type { ResolvedDb } from './local-db.js';
2
+ /**
3
+ * Where the captured copies live: a schema of its own in Postgres, a name
4
+ * prefix in sqlite, which has no schemas to hide them in.
5
+ */
6
+ export declare const BASELINE_SCHEMA = "pikku_scenario_baseline";
7
+ export declare const BASELINE_PREFIX = "pikku_scenario_baseline__";
8
+ /**
9
+ * The seed layer is the database as the suite found it. The feature layer is
10
+ * that plus whatever a feature's `before` hook built, and it exists so a
11
+ * scenario can be rolled back without losing its feature's fixtures.
12
+ */
13
+ export declare const SEED_LAYER = "seed";
14
+ export declare const FEATURE_LAYER = "feature";
15
+ export declare const LAYERS: string[];
16
+ export interface ScenarioBaselineOptions {
17
+ /**
18
+ * Tables left alone by both the capture and the restore.
19
+ *
20
+ * The session tables belong here: an actor signs in once for the whole run,
21
+ * and rolling its session back to a baseline taken before the sign-in logs
22
+ * every actor out mid-suite.
23
+ */
24
+ keep?: string[];
25
+ }
26
+ export interface ScenarioBaseline {
27
+ /** The tables this baseline holds a copy of, qualified as the dialect names them. */
28
+ tables: string[];
29
+ /** Put every captured table back as the active layer holds it. */
30
+ restore(): Promise<void>;
31
+ /**
32
+ * Capture the database as it stands now and make that the active layer, so
33
+ * later restores come back to here rather than to the seed.
34
+ */
35
+ pushFeatureLayer(): Promise<void>;
36
+ /** Make the seed the active layer again. */
37
+ popFeatureLayer(): Promise<void>;
38
+ /** Drop the captured copies. A database left with them reads as schema drift. */
39
+ drop(): Promise<void>;
40
+ }
41
+ /** An identifier, quoted so its casing and any punctuation survive the parser. */
42
+ export declare const quoteIdentifier: (name: string) => string;
43
+ /**
44
+ * A copy's name, stable for a given layer and source table and short enough for
45
+ * Postgres. Long names keep a readable prefix and earn a hash suffix, because a
46
+ * blind truncation maps two different tables onto one copy.
47
+ */
48
+ export declare const copyName: (parts: string[]) => string;
49
+ /** Matches a `keep` entry against a table, bare or schema-qualified. */
50
+ export declare const keepMatcher: (keep: string[]) => (schema: string | null, table: string) => boolean;
51
+ export declare function captureScenarioBaseline(resolved: ResolvedDb, options?: ScenarioBaselineOptions): Promise<ScenarioBaseline>;
@@ -0,0 +1,60 @@
1
+ import { createHash } from 'node:crypto';
2
+ /**
3
+ * Where the captured copies live: a schema of its own in Postgres, a name
4
+ * prefix in sqlite, which has no schemas to hide them in.
5
+ */
6
+ export const BASELINE_SCHEMA = 'pikku_scenario_baseline';
7
+ export const BASELINE_PREFIX = `${BASELINE_SCHEMA}__`;
8
+ /**
9
+ * The seed layer is the database as the suite found it. The feature layer is
10
+ * that plus whatever a feature's `before` hook built, and it exists so a
11
+ * scenario can be rolled back without losing its feature's fixtures.
12
+ */
13
+ export const SEED_LAYER = 'seed';
14
+ export const FEATURE_LAYER = 'feature';
15
+ export const LAYERS = [SEED_LAYER, FEATURE_LAYER];
16
+ /** Postgres truncates identifiers at 63 bytes, silently colliding two tables. */
17
+ const MAX_IDENTIFIER_LENGTH = 63;
18
+ /** An identifier, quoted so its casing and any punctuation survive the parser. */
19
+ export const quoteIdentifier = (name) => `"${name.replace(/"/g, '""')}"`;
20
+ /**
21
+ * A copy's name, stable for a given layer and source table and short enough for
22
+ * Postgres. Long names keep a readable prefix and earn a hash suffix, because a
23
+ * blind truncation maps two different tables onto one copy.
24
+ */
25
+ export const copyName = (parts) => {
26
+ const raw = parts.join('__');
27
+ if (raw.length <= MAX_IDENTIFIER_LENGTH)
28
+ return raw;
29
+ const hash = createHash('sha1').update(raw).digest('hex').slice(0, 8);
30
+ return `${raw.slice(0, MAX_IDENTIFIER_LENGTH - 9)}_${hash}`;
31
+ };
32
+ /** Matches a `keep` entry against a table, bare or schema-qualified. */
33
+ export const keepMatcher = (keep) => {
34
+ const names = new Set(keep.map((name) => name.toLowerCase()));
35
+ return (schema, table) => names.has(table.toLowerCase()) ||
36
+ (schema !== null && names.has(`${schema}.${table}`.toLowerCase()));
37
+ };
38
+ export async function captureScenarioBaseline(resolved, options = {}) {
39
+ if (process.env.NODE_ENV === 'production') {
40
+ throw new Error(`Scenario database reset refused: NODE_ENV=production. It replaces live rows with seed data — it only runs in dev.`);
41
+ }
42
+ // `isLocalUrl` on the environment's apiUrl says nothing about where the
43
+ // database is: a local server can be configured against a remote postgres,
44
+ // and this replaces every row it finds.
45
+ if (resolved.dialect === 'postgres' && resolved.mode === 'url') {
46
+ const { isLocalUrl } = await import('../commands/environment.js');
47
+ if (!isLocalUrl(resolved.connectionString ?? '')) {
48
+ throw new Error(`Scenario database reset refused: postgresUrl points at a host other than this machine. It rolls every table back to a copy taken at the start of the run, so it only runs against a database on this machine.`);
49
+ }
50
+ }
51
+ // Imported here rather than at the top because both dialects import the
52
+ // shared helpers back out of this module, and a static edge each way is a
53
+ // cycle.
54
+ if (resolved.dialect === 'sqlite') {
55
+ const { captureSqliteScenarioBaseline } = await import('./sqlite/scenario-baseline.js');
56
+ return captureSqliteScenarioBaseline(resolved, options);
57
+ }
58
+ const { capturePostgresScenarioBaseline } = await import('./postgres/scenario-baseline.js');
59
+ return capturePostgresScenarioBaseline(resolved, options);
60
+ }
@@ -0,0 +1,3 @@
1
+ import type { ResolvedSqliteDb } from '../local-db.js';
2
+ import { type ScenarioBaseline, type ScenarioBaselineOptions } from '../scenario-baseline.js';
3
+ export declare function captureSqliteScenarioBaseline(resolved: ResolvedSqliteDb, { keep }: ScenarioBaselineOptions): Promise<ScenarioBaseline>;
@@ -0,0 +1,82 @@
1
+ import { MIGRATION_TRACKING_TABLE } from '@pikku/migrator-sql';
2
+ import { loadSqliteRuntime } from '@pikku/migrator-sql/sqlite';
3
+ import { BASELINE_PREFIX, FEATURE_LAYER, LAYERS, SEED_LAYER, copyName, keepMatcher, quoteIdentifier, } from '../scenario-baseline.js';
4
+ export async function captureSqliteScenarioBaseline(resolved, { keep = [] }) {
5
+ const runtime = await loadSqliteRuntime();
6
+ const shouldKeep = keepMatcher(keep);
7
+ const withDb = (run) => {
8
+ const db = runtime.open(resolved.dbFile);
9
+ // The app under test is still connected to this file. A rollback-journal
10
+ // database gives a writer an exclusive lock, so without a timeout the first
11
+ // statement that overlaps one of the app's reads fails outright with
12
+ // SQLITE_BUSY and takes the scenario with it.
13
+ db.exec('PRAGMA busy_timeout = 10000');
14
+ try {
15
+ return run(db);
16
+ }
17
+ finally {
18
+ db.close();
19
+ }
20
+ };
21
+ const copy = (layer, table) => quoteIdentifier(BASELINE_PREFIX + copyName([layer, table]));
22
+ const tables = withDb((db) => db
23
+ .prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%'`)
24
+ .all()
25
+ .map(({ name }) => name)
26
+ .filter((name) => name !== MIGRATION_TRACKING_TABLE &&
27
+ !name.startsWith(BASELINE_PREFIX) &&
28
+ !shouldKeep(null, name))
29
+ .sort());
30
+ const captureLayer = (layer) => withDb((db) => {
31
+ for (const table of tables) {
32
+ db.exec(`DROP TABLE IF EXISTS ${copy(layer, table)}`);
33
+ db.exec(`CREATE TABLE ${copy(layer, table)} AS SELECT * FROM ${quoteIdentifier(table)}`);
34
+ }
35
+ });
36
+ const restoreLayer = (layer) => withDb((db) => {
37
+ // Foreign keys are switched off for the duration rather than the tables
38
+ // sorted into dependency order: `keep` can hold the parent of a table
39
+ // being replaced, which no ordering makes legal. The pragma is a no-op
40
+ // inside a transaction, so it goes before BEGIN.
41
+ db.exec('PRAGMA foreign_keys = OFF');
42
+ db.exec('BEGIN');
43
+ try {
44
+ for (const table of tables) {
45
+ db.exec(`DELETE FROM ${quoteIdentifier(table)}`);
46
+ db.exec(`INSERT INTO ${quoteIdentifier(table)} SELECT * FROM ${copy(layer, table)}`);
47
+ }
48
+ db.exec('COMMIT');
49
+ }
50
+ catch (error) {
51
+ db.exec('ROLLBACK');
52
+ throw error;
53
+ }
54
+ finally {
55
+ db.exec('PRAGMA foreign_keys = ON');
56
+ }
57
+ });
58
+ captureLayer(SEED_LAYER);
59
+ let active = SEED_LAYER;
60
+ return {
61
+ tables,
62
+ async restore() {
63
+ restoreLayer(active);
64
+ },
65
+ async pushFeatureLayer() {
66
+ captureLayer(FEATURE_LAYER);
67
+ active = FEATURE_LAYER;
68
+ },
69
+ async popFeatureLayer() {
70
+ active = SEED_LAYER;
71
+ },
72
+ async drop() {
73
+ withDb((db) => {
74
+ for (const layer of LAYERS) {
75
+ for (const table of tables) {
76
+ db.exec(`DROP TABLE IF EXISTS ${copy(layer, table)}`);
77
+ }
78
+ }
79
+ });
80
+ },
81
+ };
82
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The schemas the wired commands bind to.
3
+ *
4
+ * Re-bound here for the reason the knowledge commands re-bind theirs: the inspector that
5
+ * reads a command's schema is the PUBLISHED one during the bootstrap build, and a command
6
+ * file imports `#pikku`, which points at output that does not exist yet at that point. A
7
+ * schema the inspector has to import therefore cannot live beside a wired function.
8
+ */
9
+ export declare const ExamplesListInputSchema: import("zod").ZodObject<{
10
+ group: import("zod").ZodOptional<import("zod").ZodString>;
11
+ }, import("zod/v4/core").$strip>;
12
+ export declare const ExamplesListOutputSchema: import("zod").ZodObject<{
13
+ examples: import("zod").ZodArray<import("zod").ZodObject<{
14
+ name: import("zod").ZodString;
15
+ title: import("zod").ZodString;
16
+ when: import("zod").ZodString;
17
+ lang: import("zod").ZodString;
18
+ entity: import("zod").ZodString;
19
+ deferUntil: import("zod").ZodString;
20
+ }, import("zod/v4/core").$strip>>;
21
+ }, import("zod/v4/core").$strip>;
22
+ export declare const ExamplesShowInputSchema: import("zod").ZodObject<{
23
+ name: import("zod").ZodString;
24
+ entity: import("zod").ZodOptional<import("zod").ZodString>;
25
+ }, import("zod/v4/core").$strip>;
26
+ export declare const ExamplesShowOutputSchema: import("zod").ZodObject<{
27
+ found: import("zod").ZodBoolean;
28
+ name: import("zod").ZodString;
29
+ title: import("zod").ZodString;
30
+ when: import("zod").ZodString;
31
+ source: import("zod").ZodString;
32
+ steps: import("zod").ZodString;
33
+ code: import("zod").ZodString;
34
+ notes: import("zod").ZodArray<import("zod").ZodObject<{
35
+ anchor: import("zod").ZodNullable<import("zod").ZodString>;
36
+ lines: import("zod").ZodArray<import("zod").ZodString>;
37
+ }, import("zod/v4/core").$strip>>;
38
+ available: import("zod").ZodArray<import("zod").ZodString>;
39
+ }, import("zod/v4/core").$strip>;
40
+ export declare const ExamplesAddInputSchema: import("zod").ZodObject<{
41
+ name: import("zod").ZodString;
42
+ entity: import("zod").ZodOptional<import("zod").ZodString>;
43
+ app: import("zod").ZodOptional<import("zod").ZodString>;
44
+ }, import("zod/v4/core").$strip>;
45
+ export declare const ExamplesAddOutputSchema: import("zod").ZodObject<{
46
+ ok: import("zod").ZodBoolean;
47
+ name: import("zod").ZodString;
48
+ entity: import("zod").ZodString;
49
+ refusal: import("zod").ZodString;
50
+ written: import("zod").ZodArray<import("zod").ZodString>;
51
+ kept: import("zod").ZodArray<import("zod").ZodString>;
52
+ failed: import("zod").ZodArray<import("zod").ZodString>;
53
+ deferred: import("zod").ZodArray<import("zod").ZodObject<{
54
+ path: import("zod").ZodString;
55
+ tables: import("zod").ZodArray<import("zod").ZodString>;
56
+ }, import("zod/v4/core").$strip>>;
57
+ manual: import("zod").ZodArray<import("zod").ZodString>;
58
+ api: import("zod").ZodArray<import("zod").ZodObject<{
59
+ path: import("zod").ZodString;
60
+ exports: import("zod").ZodArray<import("zod").ZodString>;
61
+ declarations: import("zod").ZodArray<import("zod").ZodString>;
62
+ }, import("zod/v4/core").$strip>>;
63
+ when: import("zod").ZodString;
64
+ steps: import("zod").ZodString;
65
+ notes: import("zod").ZodArray<import("zod").ZodObject<{
66
+ anchor: import("zod").ZodNullable<import("zod").ZodString>;
67
+ lines: import("zod").ZodArray<import("zod").ZodString>;
68
+ }, import("zod/v4/core").$strip>>;
69
+ }, import("zod/v4/core").$strip>;
@@ -0,0 +1,15 @@
1
+ import { ExamplesAddInput, ExamplesAddOutput, ExamplesListInput, ExamplesListOutput, ExamplesShowInput, ExamplesShowOutput, } from './schemas.js';
2
+ /**
3
+ * The schemas the wired commands bind to.
4
+ *
5
+ * Re-bound here for the reason the knowledge commands re-bind theirs: the inspector that
6
+ * reads a command's schema is the PUBLISHED one during the bootstrap build, and a command
7
+ * file imports `#pikku`, which points at output that does not exist yet at that point. A
8
+ * schema the inspector has to import therefore cannot live beside a wired function.
9
+ */
10
+ export const ExamplesListInputSchema = ExamplesListInput;
11
+ export const ExamplesListOutputSchema = ExamplesListOutput;
12
+ export const ExamplesShowInputSchema = ExamplesShowInput;
13
+ export const ExamplesShowOutputSchema = ExamplesShowOutput;
14
+ export const ExamplesAddInputSchema = ExamplesAddInput;
15
+ export const ExamplesAddOutputSchema = ExamplesAddOutput;
@@ -0,0 +1,115 @@
1
+ import type { PikkuExample } from '../../examples.gen.js';
2
+ /**
3
+ * Strip the `//~` teaching comments so what lands on disk is clean code.
4
+ *
5
+ * Keeps a code line that carries a trailing `//~` by removing just the comment; drops a
6
+ * line that is entirely one. This is what lets a recipe be heavily annotated for whoever
7
+ * reads it while the file it writes has no comments in it at all.
8
+ */
9
+ export declare function stripTeaching(content: string): string;
10
+ /** A run of `//~` teaching, and the code line it was written against. */
11
+ export interface ExampleNote {
12
+ /** The line the prose annotates, trimmed; null for prose that opens a file. */
13
+ anchor: string | null;
14
+ lines: string[];
15
+ }
16
+ /**
17
+ * Every `//~` teaching line in a recipe, paired with the code it annotates.
18
+ *
19
+ * The anchor is what makes a flat dump readable: prose like "swap this for your own list
20
+ * RPC" means nothing on its own and everything beside the line it points at. The leading
21
+ * header block is skipped by the same rule the header parser uses, so `name`, `when` and
22
+ * `steps:` are never repeated here.
23
+ */
24
+ export declare function extractTeaching(content: string): ExampleNote[];
25
+ export interface ExampleFile {
26
+ path: string;
27
+ body: string;
28
+ /**
29
+ * `(overwrite)` on the marker line. The default is never-clobber, which is right for a
30
+ * file the caller may have customised; a recipe that REPLACES a shipped file says so.
31
+ */
32
+ overwrite: boolean;
33
+ }
34
+ export declare function splitExampleFiles(content: string): ExampleFile[];
35
+ /**
36
+ * Where a recipe's file lands, relative to the project root.
37
+ *
38
+ * A marker path beginning `src/` is FRONTEND-relative; one beginning
39
+ * `packages/functions/src/` is backend, and is rebased onto whatever this project calls
40
+ * its source directory — the starter template keeps functions in a workspace package and
41
+ * a single-package project keeps them at `src/`, and a recipe should not have to know
42
+ * which. Anything else is taken from the project root as written.
43
+ */
44
+ export declare function resolveExamplePath(path: string, appBase: string, functionsDir: string): string;
45
+ /** The three spellings a recipe spells its domain symbol in. */
46
+ export interface EntityNames {
47
+ /** `sessionNote` — identifiers, RPC names. */
48
+ camel: string;
49
+ /** `SessionNote` — types, generated zod (`SessionNoteZ`), components. */
50
+ pascal: string;
51
+ /** `session-note` — file names and route paths. */
52
+ kebab: string;
53
+ }
54
+ export declare function entityNames(raw: string): EntityNames;
55
+ /**
56
+ * Entity names the stack already owns, with what each one would collide with.
57
+ *
58
+ * The rename lands a `CREATE TABLE <entity>` in a migration, so `--entity session` does
59
+ * not produce a second table — it collides with Better Auth's session store and breaks
60
+ * login. Deliberately a refusal rather than an auto-prefix: the caller has to pick the
61
+ * domain word they actually mean, and a silent rewrite would hand back files named for
62
+ * something they never asked for.
63
+ */
64
+ export declare const RESERVED_ENTITY_NAMES: Map<string, string>;
65
+ /** What `--entity <raw>` would collide with, or null when the name is free to use. */
66
+ export declare function reservedEntityCollision(raw: string): string | null;
67
+ export declare function renameEntityInCode(content: string, from: EntityNames, to: EntityNames): string;
68
+ export declare function renameEntityInPath(path: string, from: EntityNames, to: EntityNames): string;
69
+ /**
70
+ * Point an example's `actors.<id>` at somebody this project actually declares.
71
+ *
72
+ * A browser step's actor has to be a literal `actors.<name>`, so every scenario recipe
73
+ * names one — and a persona that does not exist fails codegen, which stops everything
74
+ * written afterwards from registering. Distinct unknown ids map to distinct personas in
75
+ * declaration order, so a two-colleague example keeps its two colleagues, and saturate
76
+ * on the last one when the cast is smaller.
77
+ */
78
+ export declare function renameActorsInCode(content: string, cast: string[]): string;
79
+ /**
80
+ * Every RPC a scenario recipe's steps call BY NAME, after the entity rename.
81
+ *
82
+ * A scenario is the one family that is a FORWARD REFERENCE: codegen auto-discovers every
83
+ * `*.scenario.ts` and types `scenario.do`'s second argument as the union of registered
84
+ * RPCs, so a step naming one that does not exist yet is a type error the moment the file
85
+ * lands — and while codegen is red nothing written after it registers.
86
+ */
87
+ export declare function scenarioRpcNames(body: string): string[];
88
+ /** What a written file offers whatever imports it. */
89
+ export interface ExampleApi {
90
+ exports: string[];
91
+ /** The `Props` (and transitively referenced) type declarations, verbatim. */
92
+ declarations: string[];
93
+ }
94
+ /**
95
+ * The API of a written file, taken from its source rather than described by hand.
96
+ *
97
+ * A recipe that WRITES its files leaves the caller holding filenames and nothing else —
98
+ * they have not seen a single prop, and buy them back one file read at a time.
99
+ * Declarations come back verbatim, teaching comments included, because the comment is
100
+ * routinely the part a type cannot express.
101
+ */
102
+ export declare function extractExampleApi(body: string): ExampleApi;
103
+ /**
104
+ * The recipes that must be written before this one, dependencies first.
105
+ *
106
+ * A recipe that declares an example entity is NOT installed unattended — the rename is
107
+ * the whole point of it, and guessing the caller's domain word would write the example
108
+ * one into their app. Those come back as `manual` so the caller can be told to run each
109
+ * with the entity it is for.
110
+ */
111
+ export declare function requiredChain(name: string, entries: readonly PikkuExample[]): {
112
+ install: string[];
113
+ manual: string[];
114
+ missing: string[];
115
+ };