@pikku/cli 0.12.124 → 0.12.126

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 (296) hide show
  1. package/CHANGELOG.md +245 -0
  2. package/console-app/assets/{abnfDiagram-N423BO3Z-BP7zxMq6.js → abnfDiagram-N423BO3Z-B2suyn6i.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-DmG0bXDT.js +1 -0
  4. package/console-app/assets/{architectureDiagram-T3A2C74G-mvqdkIfF.js → architectureDiagram-T3A2C74G-BQ5Dfvpo.js} +1 -1
  5. package/console-app/assets/{blockDiagram-VBNYF7ZC-daD8h3VT.js → blockDiagram-VBNYF7ZC-D4pVRDiF.js} +1 -1
  6. package/console-app/assets/{c4Diagram-5PPSVZJV-Bd0_wKJj.js → c4Diagram-5PPSVZJV-Da04jGpq.js} +1 -1
  7. package/console-app/assets/channel-BgCT5gon.js +1 -0
  8. package/console-app/assets/{chunk-2GRJ4B5K-BFRr_H2V.js → chunk-2GRJ4B5K-CwODIPP4.js} +1 -1
  9. package/console-app/assets/{chunk-4I5QYGJK-BXWo5Xyx.js → chunk-4I5QYGJK-Bep4akjR.js} +1 -1
  10. package/console-app/assets/{chunk-5RXB4S5H-BFnXfzzz.js → chunk-5RXB4S5H-CGyCRU9L.js} +1 -1
  11. package/console-app/assets/{chunk-6Q2QTUOP-Bswg4T3s.js → chunk-6Q2QTUOP-D0IK0SMT.js} +1 -1
  12. package/console-app/assets/{chunk-7Z6QIM7H-StNGH40U.js → chunk-7Z6QIM7H-D12vS1jX.js} +1 -1
  13. package/console-app/assets/{chunk-GF5L2VYU-QwXKtQxa.js → chunk-GF5L2VYU-kOLwTzIA.js} +1 -1
  14. package/console-app/assets/{chunk-I66GZJ75-DDQhhfA0.js → chunk-I66GZJ75-Cb2nDoa3.js} +1 -1
  15. package/console-app/assets/{chunk-JQJVKLGR-wFyF2bUv.js → chunk-JQJVKLGR-B3a_ctfQ.js} +1 -1
  16. package/console-app/assets/{chunk-KBJHAD2P-CQPQVDkD.js → chunk-KBJHAD2P-DeP2Lqwp.js} +1 -1
  17. package/console-app/assets/{chunk-NSK5VX7P-DZhjvnHm.js → chunk-NSK5VX7P-BO8vlGrO.js} +1 -1
  18. package/console-app/assets/{chunk-QR6OTTB3-D1-TbcCP.js → chunk-QR6OTTB3-sX5V0Lok.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-82OYF6U8.js → chunk-RYQCIY6F-DoCObEhk.js} +1 -1
  20. package/console-app/assets/{chunk-UBXNYLIW-D85x6Zh2.js → chunk-UBXNYLIW-BndMXU5r.js} +1 -1
  21. package/console-app/assets/{chunk-W5SLKNZC-B1Ps46_n.js → chunk-W5SLKNZC--VrZN8EC.js} +1 -1
  22. package/console-app/assets/{chunk-WRU74C26-Ct8XrToU.js → chunk-WRU74C26-DdS0mzXO.js} +1 -1
  23. package/console-app/assets/chunk-XXDRQBXY-EP2C9tTO.js +1 -0
  24. package/console-app/assets/classDiagram-JCYQIIEL-D9wGqB4J.js +1 -0
  25. package/console-app/assets/classDiagram-v2-OCEON4UE-D9wGqB4J.js +1 -0
  26. package/console-app/assets/{cose-bilkent-JH36ORCC-DdevwV5Y.js → cose-bilkent-JH36ORCC-C5EnHkFn.js} +1 -1
  27. package/console-app/assets/{cynefin-VYW2F7L2-Dj55csoo.js → cynefin-VYW2F7L2-9irdkTt4.js} +1 -1
  28. package/console-app/assets/{cynefinDiagram-MW4NZA55-XWSzdajo.js → cynefinDiagram-MW4NZA55-DY19660c.js} +1 -1
  29. package/console-app/assets/{dagre-VZM6K2ZE-BV2l3zSF.js → dagre-VZM6K2ZE-BYFZSaSb.js} +1 -1
  30. package/console-app/assets/{dagre-CLoXIMX5.js → dagre-nXgDYqvf.js} +1 -1
  31. package/console-app/assets/{diagram-7IWD3JNH-DC9NK-nv.js → diagram-7IWD3JNH-oDftiTp1.js} +1 -1
  32. package/console-app/assets/{diagram-B4RE2ZJO-Cirfb0aN.js → diagram-B4RE2ZJO-Cbj-pPbH.js} +1 -1
  33. package/console-app/assets/{diagram-LBJQPF4R-BuRRy5X5.js → diagram-LBJQPF4R-Ch53oSKw.js} +1 -1
  34. package/console-app/assets/{diagram-Q27KOJAE-CAOKQ2xs.js → diagram-Q27KOJAE-DA7K814v.js} +1 -1
  35. package/console-app/assets/{diagram-UB23O5K3-Bto5kBJo.js → diagram-UB23O5K3-B-_C-ctS.js} +1 -1
  36. package/console-app/assets/{ebnfDiagram-BXEA7PRR-C5OndYGC.js → ebnfDiagram-BXEA7PRR-DsOdsKXy.js} +1 -1
  37. package/console-app/assets/{erDiagram-JOGREHBK-DqU4xV4C.js → erDiagram-JOGREHBK-XB1mP5_A.js} +1 -1
  38. package/console-app/assets/eventmodeling-45OFAUF4-NKFCZ8Fj.js +1 -0
  39. package/console-app/assets/flowDiagram-UKHOOZJN-BpdPkmum.js +1 -0
  40. package/console-app/assets/{ganttDiagram-PKOTCBZU-D5_DE9R0.js → ganttDiagram-PKOTCBZU-knk0XSHi.js} +1 -1
  41. package/console-app/assets/{gitGraph-TEB2WS4Q-nuqfz7Fd.js → gitGraph-TEB2WS4Q-COJnK2tM.js} +1 -1
  42. package/console-app/assets/{gitGraphDiagram-DS77QQ5N-BtJwp2Y3.js → gitGraphDiagram-DS77QQ5N-sF0v605q.js} +1 -1
  43. package/console-app/assets/{index-DXcH2K9z.css → index-C8MC-uMB.css} +1 -1
  44. package/console-app/assets/{index-DRfts2XF.js → index-DMnbsgzs.js} +3 -3
  45. package/console-app/assets/{info-DKCQHKI2-CIfPVqHr.js → info-DKCQHKI2-Cbatr0w6.js} +1 -1
  46. package/console-app/assets/{infoDiagram-6WML65LV-B-gTHQad.js → infoDiagram-6WML65LV-93TFPCu2.js} +1 -1
  47. package/console-app/assets/{ishikawaDiagram-WSZJBQD7-CCwAWb1g.js → ishikawaDiagram-WSZJBQD7-BBR8_Qms.js} +1 -1
  48. package/console-app/assets/{journeyDiagram-NVQOT4AX-DhqNj_ci.js → journeyDiagram-NVQOT4AX-zG55yDoc.js} +1 -1
  49. package/console-app/assets/{kanban-definition-27J2QSJJ-DspZ1b3Y.js → kanban-definition-27J2QSJJ-DonGcEAY.js} +1 -1
  50. package/console-app/assets/{line-D7ZCpNkR.js → line-D1WdVm1S.js} +1 -1
  51. package/console-app/assets/{linear-B5jMy_q9.js → linear-D2GQL4Cm.js} +1 -1
  52. package/console-app/assets/{mermaid-parser.core-CMBFGJ0U.js → mermaid-parser.core-b4yKyO56.js} +3 -3
  53. package/console-app/assets/{mermaid.core-DYoDrSEJ.js → mermaid.core-Cwfec1gr.js} +4 -4
  54. package/console-app/assets/{mindmap-definition-FAOFIHXS-DsHwd2K9.js → mindmap-definition-FAOFIHXS-D0G4yKgw.js} +1 -1
  55. package/console-app/assets/{packet-7NZHBO7P-BSRRjf4H.js → packet-7NZHBO7P-DDa4HL2T.js} +1 -1
  56. package/console-app/assets/{pegDiagram-VL7TDLO6-Bi0OlzgS.js → pegDiagram-VL7TDLO6-fPdN5VZs.js} +1 -1
  57. package/console-app/assets/{pie-RZYD4A2V-D-8tgqYW.js → pie-RZYD4A2V-DRHURUqo.js} +1 -1
  58. package/console-app/assets/{pieDiagram-7S7Q4E2Y-CsYbVqaR.js → pieDiagram-7S7Q4E2Y-DMYn8ga_.js} +1 -1
  59. package/console-app/assets/{quadrantDiagram-CIZ2JOQS-LkLWrWKK.js → quadrantDiagram-CIZ2JOQS-C190OamC.js} +1 -1
  60. package/console-app/assets/{radar-I7S5WNFK-Bst62XZP.js → radar-I7S5WNFK-Djvqzz9A.js} +1 -1
  61. package/console-app/assets/{railroad-3IZDKUUU-zJswMQYF.js → railroad-3IZDKUUU-C9YvFeFq.js} +1 -1
  62. package/console-app/assets/railroad-abnf-AHOZXSZD-B3CYVW4p.js +1 -0
  63. package/console-app/assets/railroad-ebnf-EBAXGLYW-DrZ2yF62.js +1 -0
  64. package/console-app/assets/railroad-peg-LSFZ7HO6-CWAmMyxd.js +1 -0
  65. package/console-app/assets/{railroadDiagram-AXF67PYL-C0QZkg7m.js → railroadDiagram-AXF67PYL-IRFg1VrU.js} +1 -1
  66. package/console-app/assets/{requirementDiagram-LRYGKXZP-BQg0AbLI.js → requirementDiagram-LRYGKXZP-L-7ubbcT.js} +1 -1
  67. package/console-app/assets/{sankeyDiagram-W5VNT64P-CQb0BMMi.js → sankeyDiagram-W5VNT64P-DBttV6Gt.js} +1 -1
  68. package/console-app/assets/{sequenceDiagram-SI44F4Z6-BzgBi0a5.js → sequenceDiagram-SI44F4Z6-Bg15oKAB.js} +1 -1
  69. package/console-app/assets/{src-Dg-KiSsV.js → src-DUC7tLWb.js} +1 -1
  70. package/console-app/assets/{stateDiagram-OKZ733FA-BiqXn68g.js → stateDiagram-OKZ733FA-PWl0XGs5.js} +1 -1
  71. package/console-app/assets/stateDiagram-v2-UEYNNEHI-Celbgz4u.js +1 -0
  72. package/console-app/assets/{swimlanes-SLNWSIFB-Dy7wDP1q.js → swimlanes-SLNWSIFB-CyXEtGBV.js} +1 -1
  73. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-zxpNaB4U.js +8 -0
  74. package/console-app/assets/{timeline-definition-Z64GVDOM-DSWXli8X.js → timeline-definition-Z64GVDOM-BLA-DhBt.js} +1 -1
  75. package/console-app/assets/{treeView-QDETBFTQ-CeWwcs9r.js → treeView-QDETBFTQ-Bfnmn2UY.js} +1 -1
  76. package/console-app/assets/{treemap-6X3UGDF4-BfrumiJh.js → treemap-6X3UGDF4-DTA0wveO.js} +1 -1
  77. package/console-app/assets/{vennDiagram-T6HMQDX7-BsuldZ1n.js → vennDiagram-T6HMQDX7-CLXYZln0.js} +1 -1
  78. package/console-app/assets/{wardley-OPB4EBWU-oZldxS8z.js → wardley-OPB4EBWU-zwxqisG0.js} +1 -1
  79. package/console-app/assets/{wardleyDiagram-T6FBY63Y-C5LXyHMj.js → wardleyDiagram-T6FBY63Y-hKtKvNlv.js} +1 -1
  80. package/console-app/assets/{xychartDiagram-ELKLHX3M-CwhqhNkO.js → xychartDiagram-ELKLHX3M-BGf8p4bo.js} +1 -1
  81. package/console-app/index.html +2 -2
  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/auth/index.d.ts +1 -1
  91. package/dist/.pikku/auth/index.js +1 -1
  92. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
  93. package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
  94. package/dist/.pikku/channel/index.d.ts +1 -1
  95. package/dist/.pikku/channel/index.js +1 -1
  96. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  97. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  98. package/dist/.pikku/cli/index.d.ts +1 -1
  99. package/dist/.pikku/cli/index.js +1 -1
  100. package/dist/.pikku/cli/pikku-cli-channel.js +11 -1
  101. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  102. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  103. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  104. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  105. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.json +7 -0
  106. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  107. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  108. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  109. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +27 -0
  110. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  111. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  112. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  113. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  114. package/dist/.pikku/error/index.d.ts +1 -1
  115. package/dist/.pikku/error/index.js +1 -1
  116. package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
  117. package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
  118. package/dist/.pikku/function/index.d.ts +1 -1
  119. package/dist/.pikku/function/index.js +1 -1
  120. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  121. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  122. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  123. package/dist/.pikku/function/pikku-functions-meta.gen.json +59 -23
  124. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  125. package/dist/.pikku/gateway/index.d.ts +1 -1
  126. package/dist/.pikku/gateway/index.js +1 -1
  127. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
  128. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
  129. package/dist/.pikku/http/index.d.ts +1 -1
  130. package/dist/.pikku/http/index.js +1 -1
  131. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  132. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  133. package/dist/.pikku/mcp/index.d.ts +1 -1
  134. package/dist/.pikku/mcp/index.js +1 -1
  135. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  136. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  137. package/dist/.pikku/middleware/index.d.ts +1 -1
  138. package/dist/.pikku/middleware/index.js +1 -1
  139. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
  140. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
  141. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  142. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  143. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  144. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  145. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  146. package/dist/.pikku/queue/index.d.ts +1 -1
  147. package/dist/.pikku/queue/index.js +1 -1
  148. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  149. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  150. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  151. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  152. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  153. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  154. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -0
  155. package/dist/.pikku/scenarios/index.d.ts +1 -1
  156. package/dist/.pikku/scenarios/index.js +1 -1
  157. package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
  158. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  159. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  160. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  161. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  162. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  163. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  164. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  165. package/dist/.pikku/scheduler/index.d.ts +1 -1
  166. package/dist/.pikku/scheduler/index.js +1 -1
  167. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  168. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  169. package/dist/.pikku/schemas/register.gen.js +7 -1
  170. package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -1
  171. package/dist/.pikku/schemas/schemas/FabricProjectsListInput.schema.json +1 -0
  172. package/dist/.pikku/schemas/schemas/FabricProjectsListOutput.schema.json +1 -0
  173. package/dist/.pikku/schemas/schemas/FabricSecretsListInput.schema.json +1 -1
  174. package/dist/.pikku/schemas/schemas/FabricSecretsRotateInput.schema.json +1 -1
  175. package/dist/.pikku/schemas/schemas/FabricSecretsSetInput.schema.json +1 -1
  176. package/dist/.pikku/schemas/schemas/FabricVariablesGetInput.schema.json +1 -1
  177. package/dist/.pikku/schemas/schemas/FabricVariablesSetInput.schema.json +1 -1
  178. package/dist/.pikku/schemas/schemas/PersonaSecretInput.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-personas.gen.js +1 -1
  182. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  183. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  184. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  185. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  186. package/dist/.pikku/secrets/index.d.ts +1 -1
  187. package/dist/.pikku/secrets/index.js +1 -1
  188. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  189. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  190. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  191. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  192. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
  193. package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
  194. package/dist/.pikku/setup/index.d.ts +1 -1
  195. package/dist/.pikku/setup/index.js +1 -1
  196. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
  197. package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
  198. package/dist/.pikku/trigger/index.d.ts +1 -1
  199. package/dist/.pikku/trigger/index.js +1 -1
  200. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  201. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  202. package/dist/.pikku/variables/index.d.ts +1 -1
  203. package/dist/.pikku/variables/index.js +1 -1
  204. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  205. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  206. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  207. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  208. package/dist/.pikku/workflow/index.d.ts +1 -1
  209. package/dist/.pikku/workflow/index.js +1 -1
  210. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  211. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  212. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  213. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  214. package/dist/bin/pikku-bin.mjs +2 -2
  215. package/dist/src/cli.wiring.js +13 -1
  216. package/dist/src/deploy/build-pipeline.d.ts +10 -0
  217. package/dist/src/deploy/build-pipeline.js +16 -1
  218. package/dist/src/deploy/bundler/bun-bundler.js +12 -5
  219. package/dist/src/deploy/frontend-assets.d.ts +50 -0
  220. package/dist/src/deploy/frontend-assets.js +82 -0
  221. package/dist/src/fabric/fabric-commands.d.ts +55 -15
  222. package/dist/src/fabric/fabric-commands.js +6 -0
  223. package/dist/src/fabric/functions/deploy.function.js +12 -2
  224. package/dist/src/fabric/functions/projects-list.function.d.ts +72 -0
  225. package/dist/src/fabric/functions/projects-list.function.js +63 -0
  226. package/dist/src/fabric/functions/secrets-list.function.d.ts +4 -4
  227. package/dist/src/fabric/functions/secrets-list.function.js +4 -4
  228. package/dist/src/fabric/functions/secrets-rotate.function.d.ts +4 -4
  229. package/dist/src/fabric/functions/secrets-rotate.function.js +8 -5
  230. package/dist/src/fabric/functions/secrets-set.function.d.ts +4 -4
  231. package/dist/src/fabric/functions/secrets-set.function.js +4 -4
  232. package/dist/src/fabric/functions/validate.function.js +49 -24
  233. package/dist/src/fabric/functions/variables-get.function.d.ts +4 -4
  234. package/dist/src/fabric/functions/variables-get.function.js +4 -4
  235. package/dist/src/fabric/functions/variables-set.function.d.ts +4 -4
  236. package/dist/src/fabric/functions/variables-set.function.js +4 -4
  237. package/dist/src/fabric/lib/blank-comments.d.ts +21 -0
  238. package/dist/src/fabric/lib/blank-comments.js +71 -0
  239. package/dist/src/fabric/lib/blank-scenario-meta.d.ts +1 -0
  240. package/dist/src/fabric/lib/blank-scenario-meta.js +110 -0
  241. package/dist/src/fabric/lib/deployment.d.ts +26 -0
  242. package/dist/src/fabric/lib/deployment.js +35 -0
  243. package/dist/src/fabric/lib/stage.d.ts +19 -3
  244. package/dist/src/fabric/lib/stage.js +29 -6
  245. package/dist/src/functions/commands/db-reset.js +6 -2
  246. package/dist/src/functions/commands/deploy-apply.d.ts +10 -0
  247. package/dist/src/functions/commands/deploy-apply.js +8 -0
  248. package/dist/src/functions/commands/deploy-plan.js +1 -0
  249. package/dist/src/functions/commands/dev.js +18 -3
  250. package/dist/src/functions/commands/environment.d.ts +10 -0
  251. package/dist/src/functions/commands/environment.js +24 -0
  252. package/dist/src/functions/commands/persona.d.ts +18 -0
  253. package/dist/src/functions/commands/persona.js +41 -2
  254. package/dist/src/functions/commands/scenario-browser.d.ts +13 -5
  255. package/dist/src/functions/commands/serve-frontend.d.ts +11 -0
  256. package/dist/src/functions/commands/serve-frontend.js +17 -0
  257. package/dist/src/functions/commands/serve.js +16 -3
  258. package/dist/src/functions/db/annotation-parser.d.ts +8 -0
  259. package/dist/src/functions/db/annotation-parser.js +2 -0
  260. package/dist/src/functions/db/check-enums.d.ts +38 -0
  261. package/dist/src/functions/db/check-enums.js +103 -0
  262. package/dist/src/functions/db/db-codegen.js +35 -1
  263. package/dist/src/functions/db/postgres/postgres-introspector.d.ts +14 -0
  264. package/dist/src/functions/db/postgres/postgres-introspector.js +48 -0
  265. package/dist/src/functions/db/sqlite/sqlite-introspector.d.ts +3 -4
  266. package/dist/src/functions/db/sqlite/sqlite-introspector.js +5 -17
  267. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +9 -6
  268. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +57 -30
  269. package/dist/src/server/actor-sign-in.d.ts +24 -1
  270. package/dist/src/server/actor-sign-in.js +45 -2
  271. package/dist/src/server/dev-server-runner.interface.d.ts +9 -0
  272. package/dist/src/server/node-server-runner.js +3 -0
  273. package/dist/src/server/server-ready.d.ts +6 -9
  274. package/dist/src/server/server-ready.js +6 -9
  275. package/dist/src/utils/frontend.d.ts +9 -0
  276. package/dist/src/utils/frontend.js +18 -0
  277. package/dist/src/utils/persona-credentials.d.ts +23 -2
  278. package/dist/src/utils/persona-credentials.js +55 -2
  279. package/dist/src/utils/pikku-cli-config.d.ts +14 -5
  280. package/dist/src/utils/pikku-cli-config.js +57 -10
  281. package/dist/tsconfig.tsbuildinfo +1 -1
  282. package/package.json +12 -12
  283. package/snippets.json +2 -2
  284. package/surface.json +101 -51
  285. package/console-app/assets/architecture-TIHT7OUA-D4Hj6824.js +0 -1
  286. package/console-app/assets/channel-09aKDzM0.js +0 -1
  287. package/console-app/assets/chunk-XXDRQBXY-C1KaR4pt.js +0 -1
  288. package/console-app/assets/classDiagram-JCYQIIEL-23nagJMi.js +0 -1
  289. package/console-app/assets/classDiagram-v2-OCEON4UE-23nagJMi.js +0 -1
  290. package/console-app/assets/eventmodeling-45OFAUF4-RyG54ZHy.js +0 -1
  291. package/console-app/assets/flowDiagram-UKHOOZJN-DNdfrnRg.js +0 -1
  292. package/console-app/assets/railroad-abnf-AHOZXSZD-DX4FqVY6.js +0 -1
  293. package/console-app/assets/railroad-ebnf-EBAXGLYW-DdyOtX1l.js +0 -1
  294. package/console-app/assets/railroad-peg-LSFZ7HO6-CclC1sXF.js +0 -1
  295. package/console-app/assets/stateDiagram-v2-UEYNNEHI-I34jrzP0.js +0 -1
  296. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-C1PrPB0G.js +0 -8
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Embed a built frontend into a `bun build --compile` binary.
3
+ *
4
+ * Bun embeds a file imported with `with { type: 'file' }` and hands back an
5
+ * opaque `/$bunfs/…` path at runtime. That attribute cannot be applied to a
6
+ * dynamic import, and there is no way to embed a directory, so each file needs
7
+ * its own literal `import` statement — hence a generated module rather than a
8
+ * walk at startup.
9
+ *
10
+ * esbuild rejects the attribute outright ("Importing with a type attribute of
11
+ * \"file\" is not supported"), so this module is kept out of the esbuild bundle
12
+ * as an external and is resolved by the later `bun build --compile` step, which
13
+ * follows the import from the emitted `bundle.js`.
14
+ *
15
+ * The manifest can only name files that already exist, which fixes the build
16
+ * order: frontend build → manifest generation → server bundle → compile.
17
+ */
18
+ import { cp, readdir, rm, writeFile } from 'node:fs/promises';
19
+ import { join, relative } from 'node:path';
20
+ export const FRONTEND_ASSET_MANIFEST_FILE = 'frontend-assets.gen.js';
21
+ /** Directory name the built frontend is copied to inside a deploy unit. */
22
+ export const FRONTEND_DIR_NAME = 'frontend';
23
+ const toPosix = (value) => value.replace(/\\/g, '/');
24
+ /**
25
+ * Every file under `dir`, keyed by its path relative to it.
26
+ *
27
+ * Sorted by key: directory read order is not stable across filesystems, and the
28
+ * manifest feeds a build whose output should not change run to run.
29
+ */
30
+ export async function collectFrontendAssets(dir) {
31
+ const assets = [];
32
+ const walk = async (current) => {
33
+ const entries = await readdir(current, { withFileTypes: true });
34
+ for (const entry of entries) {
35
+ const absolute = join(current, entry.name);
36
+ if (entry.isDirectory()) {
37
+ await walk(absolute);
38
+ }
39
+ else if (entry.isFile()) {
40
+ assets.push({ key: toPosix(relative(dir, absolute)), path: absolute });
41
+ }
42
+ }
43
+ };
44
+ await walk(dir);
45
+ return assets.sort((a, b) => (a.key < b.key ? -1 : a.key > b.key ? 1 : 0));
46
+ }
47
+ /**
48
+ * The manifest module source, with specifiers relative to `manifestDir` — the
49
+ * directory the file itself is written to.
50
+ */
51
+ export function generateFrontendAssetManifest(assets, manifestDir) {
52
+ const lines = ['// Generated by @pikku/cli — do not edit'];
53
+ assets.forEach((asset, index) => {
54
+ const specifier = toPosix(relative(manifestDir, asset.path));
55
+ lines.push(`import asset${index} from './${specifier}' with { type: 'file' }`);
56
+ });
57
+ lines.push('', 'export const frontendAssets = {');
58
+ assets.forEach((asset, index) => {
59
+ lines.push(` '${asset.key}': asset${index},`);
60
+ });
61
+ lines.push('}', '');
62
+ return lines.join('\n');
63
+ }
64
+ /**
65
+ * Copy a built frontend into a deploy unit and write the manifest beside it.
66
+ *
67
+ * The copy comes first and the manifest is generated from the copy, not the
68
+ * source: the unit directory is what the bundle and the compile step see, and
69
+ * the machine that compiles has no reason to still hold the frontend's build
70
+ * tree. A stale copy is removed rather than merged into, so a file dropped
71
+ * from the frontend's output cannot survive into the next binary.
72
+ *
73
+ * Returns the keys that were embedded, in manifest order.
74
+ */
75
+ export async function materializeFrontend(frontendDir, unitDir) {
76
+ const target = join(unitDir, FRONTEND_DIR_NAME);
77
+ await rm(target, { recursive: true, force: true });
78
+ await cp(frontendDir, target, { recursive: true });
79
+ const assets = await collectFrontendAssets(target);
80
+ await writeFile(join(unitDir, FRONTEND_ASSET_MANIFEST_FILE), generateFrontendAssetManifest(assets, unitDir), 'utf-8');
81
+ return assets.map((asset) => asset.key);
82
+ }
@@ -563,7 +563,7 @@ export declare const fabricCommands: {
563
563
  subcommands: {
564
564
  set: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
565
565
  name: string;
566
- branch: string;
566
+ branch?: string | undefined;
567
567
  value?: string | undefined;
568
568
  force?: boolean | undefined;
569
569
  }, {
@@ -571,7 +571,7 @@ export declare const fabricCommands: {
571
571
  keyId: string;
572
572
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
573
573
  name: string;
574
- branch: string;
574
+ branch?: string | undefined;
575
575
  value?: string | undefined;
576
576
  force?: boolean | undefined;
577
577
  }, {
@@ -579,7 +579,7 @@ export declare const fabricCommands: {
579
579
  keyId: string;
580
580
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
581
581
  name: string;
582
- branch: string;
582
+ branch?: string | undefined;
583
583
  value?: string | undefined;
584
584
  force?: boolean | undefined;
585
585
  }, {
@@ -587,7 +587,7 @@ export declare const fabricCommands: {
587
587
  keyId: string;
588
588
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
589
589
  list: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
590
- branch: string;
590
+ branch?: string | undefined;
591
591
  json?: boolean | undefined;
592
592
  }, {
593
593
  secrets: {
@@ -595,7 +595,7 @@ export declare const fabricCommands: {
595
595
  updatedAt: string;
596
596
  }[];
597
597
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
598
- branch: string;
598
+ branch?: string | undefined;
599
599
  json?: boolean | undefined;
600
600
  }, {
601
601
  secrets: {
@@ -603,7 +603,7 @@ export declare const fabricCommands: {
603
603
  updatedAt: string;
604
604
  }[];
605
605
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
606
- branch: string;
606
+ branch?: string | undefined;
607
607
  json?: boolean | undefined;
608
608
  }, {
609
609
  secrets: {
@@ -612,17 +612,17 @@ export declare const fabricCommands: {
612
612
  }[];
613
613
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
614
614
  rotate: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
615
- branch: string;
615
+ branch?: string | undefined;
616
616
  force?: boolean | undefined;
617
617
  }, {
618
618
  retiredKeyId: string | null;
619
619
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
620
- branch: string;
620
+ branch?: string | undefined;
621
621
  force?: boolean | undefined;
622
622
  }, {
623
623
  retiredKeyId: string | null;
624
624
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
625
- branch: string;
625
+ branch?: string | undefined;
626
626
  force?: boolean | undefined;
627
627
  }, {
628
628
  retiredKeyId: string | null;
@@ -634,29 +634,29 @@ export declare const fabricCommands: {
634
634
  subcommands: {
635
635
  set: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
636
636
  name: string;
637
- branch: string;
638
637
  value: string;
638
+ branch?: string | undefined;
639
639
  }, {
640
640
  name: string;
641
641
  success: boolean;
642
642
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
643
643
  name: string;
644
- branch: string;
645
644
  value: string;
645
+ branch?: string | undefined;
646
646
  }, {
647
647
  name: string;
648
648
  success: boolean;
649
649
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
650
650
  name: string;
651
- branch: string;
652
651
  value: string;
652
+ branch?: string | undefined;
653
653
  }, {
654
654
  name: string;
655
655
  success: boolean;
656
656
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
657
657
  get: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
658
658
  name: string;
659
- branch: string;
659
+ branch?: string | undefined;
660
660
  json?: boolean | undefined;
661
661
  }, {
662
662
  name: string;
@@ -664,7 +664,7 @@ export declare const fabricCommands: {
664
664
  value: unknown;
665
665
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
666
666
  name: string;
667
- branch: string;
667
+ branch?: string | undefined;
668
668
  json?: boolean | undefined;
669
669
  }, {
670
670
  name: string;
@@ -672,7 +672,7 @@ export declare const fabricCommands: {
672
672
  value: unknown;
673
673
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
674
674
  name: string;
675
- branch: string;
675
+ branch?: string | undefined;
676
676
  json?: boolean | undefined;
677
677
  }, {
678
678
  name: string;
@@ -760,6 +760,46 @@ export declare const fabricCommands: {
760
760
  projectId: string;
761
761
  status: any;
762
762
  }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
763
+ projects: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
764
+ apiUrl?: string | undefined;
765
+ }, {
766
+ projects: {
767
+ projectId: string;
768
+ name: string;
769
+ slug: string;
770
+ status: string;
771
+ productionBranch: string;
772
+ gitRepoUrl: string | null;
773
+ createdAt: string;
774
+ linked: boolean;
775
+ }[];
776
+ }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
777
+ apiUrl?: string | undefined;
778
+ }, {
779
+ projects: {
780
+ projectId: string;
781
+ name: string;
782
+ slug: string;
783
+ status: string;
784
+ productionBranch: string;
785
+ gitRepoUrl: string | null;
786
+ createdAt: string;
787
+ linked: boolean;
788
+ }[];
789
+ }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
790
+ apiUrl?: string | undefined;
791
+ }, {
792
+ projects: {
793
+ projectId: string;
794
+ name: string;
795
+ slug: string;
796
+ status: string;
797
+ productionBranch: string;
798
+ gitRepoUrl: string | null;
799
+ createdAt: string;
800
+ linked: boolean;
801
+ }[];
802
+ }, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
763
803
  errors: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
764
804
  branch: string;
765
805
  function?: string | undefined;
@@ -26,6 +26,7 @@ import { FabricDeployApply, renderDeployApply, } from './functions/deploy.functi
26
26
  import { FabricDeployList, renderDeployList, } from './functions/deploy-list.function.js';
27
27
  import { FabricDeployUnits, renderDeployUnits, } from './functions/deploy-units.function.js';
28
28
  import { FabricStatus, renderStatus } from './functions/status.function.js';
29
+ import { FabricProjectsList, renderProjectsList, } from './functions/projects-list.function.js';
29
30
  import { FabricErrors, renderErrors } from './functions/errors.function.js';
30
31
  import { FabricDbSchema, renderDbSchema, } from './functions/db-schema.function.js';
31
32
  import { FabricRollback } from './functions/rollback.function.js';
@@ -325,6 +326,11 @@ export const fabricCommands = defineCLICommands({
325
326
  render: renderStatus,
326
327
  description: 'Show the linked project status (active + in-flight deploy)',
327
328
  }),
329
+ projects: pikkuCLICommand({
330
+ func: FabricProjectsList,
331
+ render: renderProjectsList,
332
+ description: 'List the projects in your organization, with their ids (works unlinked)',
333
+ }),
328
334
  errors: pikkuCLICommand({
329
335
  func: FabricErrors,
330
336
  render: renderErrors,
@@ -5,7 +5,7 @@ import { getFabricRPC } from '../lib/http.js';
5
5
  import { assertNamedBranchDeploySafety, resolveRef } from '../lib/git.js';
6
6
  import { promptConfirm } from '../lib/prompt.js';
7
7
  import { added, changed, removed, dim, table } from '../lib/output.js';
8
- import { blockedReason, blockedSummary, missingConfigHints, changesAreEmpty, classifyStatus, describeDeployment, destructiveMigrations, isApprovable, readDeploymentStatus, readWorkers, stateLabel, waitForDeployment, } from '../lib/deployment.js';
8
+ import { blockedReason, blockedSummary, missingConfigHints, changesAreEmpty, classifyStatus, describeDeployment, destructiveMigrations, isApprovable, readDeploymentStatus, readWorkers, reconcileDeployedRef, stateLabel, waitForDeployment, } from '../lib/deployment.js';
9
9
  const DEFAULT_TIMEOUT_SECONDS = 900;
10
10
  export const FabricDeployInput = z.object({
11
11
  branch: z.string().optional(),
@@ -181,7 +181,17 @@ export const FabricDeployApply = pikkuSessionlessFunc({
181
181
  deploymentId = created.deploymentId;
182
182
  stageId = created.stageId;
183
183
  runId = created.runId;
184
- emit({ event: 'created', deploymentId, branch, ref: resolved });
184
+ // Read the commit back off the deployment rather than repeating the one
185
+ // that was asked for: `deployByStageKind` attaches to an already-parked
186
+ // plan for the branch instead of cutting a new one, and that plan is
187
+ // pinned to whatever commit it was created at.
188
+ ref = reconcileDeployedRef({
189
+ requested: resolved,
190
+ actual: (await describeDeployment(rpc, projectId, deploymentId))?.gitSha ??
191
+ null,
192
+ deploymentId,
193
+ });
194
+ emit({ event: 'created', deploymentId, branch, ref });
185
195
  }
186
196
  const base = {
187
197
  event: 'result',
@@ -0,0 +1,72 @@
1
+ import { z } from 'zod';
2
+ export declare const FabricProjectsListInput: z.ZodObject<{
3
+ apiUrl: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export declare const FabricProjectsListOutput: z.ZodObject<{
6
+ projects: z.ZodArray<z.ZodObject<{
7
+ projectId: z.ZodString;
8
+ name: z.ZodString;
9
+ slug: z.ZodString;
10
+ status: z.ZodString;
11
+ productionBranch: z.ZodString;
12
+ gitRepoUrl: z.ZodNullable<z.ZodString>;
13
+ createdAt: z.ZodString;
14
+ linked: z.ZodBoolean;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>;
17
+ /**
18
+ * The only fabric command that does not need a linked project, which is the
19
+ * point of it: a checkout whose config still holds `__PROJECT_ID__` can run
20
+ * nothing else, and `fabric init` cannot recover the id either — it creates,
21
+ * so against an existing project it fails with a 409 that carries no id.
22
+ */
23
+ export declare const FabricProjectsList: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
24
+ apiUrl?: string | undefined;
25
+ }, {
26
+ projects: {
27
+ projectId: string;
28
+ name: string;
29
+ slug: string;
30
+ status: string;
31
+ productionBranch: string;
32
+ gitRepoUrl: string | null;
33
+ createdAt: string;
34
+ linked: boolean;
35
+ }[];
36
+ }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
37
+ apiUrl?: string | undefined;
38
+ }, {
39
+ projects: {
40
+ projectId: string;
41
+ name: string;
42
+ slug: string;
43
+ status: string;
44
+ productionBranch: string;
45
+ gitRepoUrl: string | null;
46
+ createdAt: string;
47
+ linked: boolean;
48
+ }[];
49
+ }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
50
+ apiUrl?: string | undefined;
51
+ }, {
52
+ projects: {
53
+ projectId: string;
54
+ name: string;
55
+ slug: string;
56
+ status: string;
57
+ productionBranch: string;
58
+ gitRepoUrl: string | null;
59
+ createdAt: string;
60
+ linked: boolean;
61
+ }[];
62
+ }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
63
+ type FabricProject = {
64
+ projectId: string;
65
+ name: string;
66
+ gitRepoUrl: string | null;
67
+ linked: boolean;
68
+ };
69
+ export declare const renderProjectsList: (_s: unknown, { projects }: {
70
+ projects: FabricProject[];
71
+ }) => void;
72
+ export {};
@@ -0,0 +1,63 @@
1
+ import { z } from 'zod';
2
+ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
3
+ import { findProjectConfig, resolveApiContext } from '../lib/config.js';
4
+ import { getFabricRPC } from '../lib/http.js';
5
+ import { dim } from '../lib/output.js';
6
+ export const FabricProjectsListInput = z.object({
7
+ apiUrl: z.string().optional(),
8
+ });
9
+ export const FabricProjectsListOutput = z.object({
10
+ projects: z.array(z.object({
11
+ projectId: z.string(),
12
+ name: z.string(),
13
+ slug: z.string(),
14
+ status: z.string(),
15
+ productionBranch: z.string(),
16
+ gitRepoUrl: z.string().nullable(),
17
+ createdAt: z.string(),
18
+ linked: z.boolean(),
19
+ })),
20
+ });
21
+ /**
22
+ * The only fabric command that does not need a linked project, which is the
23
+ * point of it: a checkout whose config still holds `__PROJECT_ID__` can run
24
+ * nothing else, and `fabric init` cannot recover the id either — it creates,
25
+ * so against an existing project it fails with a 409 that carries no id.
26
+ */
27
+ export const FabricProjectsList = pikkuSessionlessFunc({
28
+ description: 'List the projects in your organization.',
29
+ input: FabricProjectsListInput,
30
+ output: FabricProjectsListOutput,
31
+ func: async (_services, { apiUrl: apiUrlOverride }) => {
32
+ const ctx = await resolveApiContext({ apiUrlOverride });
33
+ if (!ctx.token)
34
+ throw new Error('Not logged in. Run `pikku fabric login` first.');
35
+ const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
36
+ const { projects } = await rpc.invoke('fabricCliProjects', {});
37
+ const local = await findProjectConfig();
38
+ const linkedId = local?.config.projectId;
39
+ return {
40
+ projects: projects.map((project) => ({
41
+ ...project,
42
+ linked: linkedId !== undefined && project.projectId === linkedId,
43
+ })),
44
+ };
45
+ },
46
+ });
47
+ export const renderProjectsList = (_s, { projects }) => {
48
+ console.log('');
49
+ if (projects.length === 0) {
50
+ console.log(dim(' No projects yet. Run `pikku fabric link` to create one.'));
51
+ console.log('');
52
+ return;
53
+ }
54
+ const width = Math.max(...projects.map((p) => p.name.length));
55
+ for (const project of projects) {
56
+ console.log(` ${project.linked ? '*' : ' '} ${project.name.padEnd(width)} ${project.projectId} ${dim(project.gitRepoUrl ?? 'no repo')}`);
57
+ }
58
+ console.log('');
59
+ if (projects.some((p) => p.linked)) {
60
+ console.log(dim(' * this checkout'));
61
+ console.log('');
62
+ }
63
+ };
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FabricSecretsListInput: z.ZodObject<{
3
- branch: z.ZodString;
3
+ branch: z.ZodOptional<z.ZodString>;
4
4
  json: z.ZodOptional<z.ZodBoolean>;
5
5
  }, z.core.$strip>;
6
6
  export declare const FabricSecretsListOutput: z.ZodObject<{
@@ -10,7 +10,7 @@ export declare const FabricSecretsListOutput: z.ZodObject<{
10
10
  }, z.core.$strip>>;
11
11
  }, z.core.$strip>;
12
12
  export declare const FabricSecretsList: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
13
- branch: string;
13
+ branch?: string | undefined;
14
14
  json?: boolean | undefined;
15
15
  }, {
16
16
  secrets: {
@@ -18,7 +18,7 @@ export declare const FabricSecretsList: import("../../../.pikku/function/pikku-f
18
18
  updatedAt: string;
19
19
  }[];
20
20
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
21
- branch: string;
21
+ branch?: string | undefined;
22
22
  json?: boolean | undefined;
23
23
  }, {
24
24
  secrets: {
@@ -26,7 +26,7 @@ export declare const FabricSecretsList: import("../../../.pikku/function/pikku-f
26
26
  updatedAt: string;
27
27
  }[];
28
28
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
29
- branch: string;
29
+ branch?: string | undefined;
30
30
  json?: boolean | undefined;
31
31
  }, {
32
32
  secrets: {
@@ -2,9 +2,9 @@ import { z } from 'zod';
2
2
  import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
3
3
  import { resolveApiContext } from '../lib/config.js';
4
4
  import { getFabricRPC } from '../lib/http.js';
5
- import { resolveStageId } from '../lib/stage.js';
5
+ import { resolveStage } from '../lib/stage.js';
6
6
  export const FabricSecretsListInput = z.object({
7
- branch: z.string(),
7
+ branch: z.string().optional(),
8
8
  json: z.boolean().optional(),
9
9
  });
10
10
  export const FabricSecretsListOutput = z.object({
@@ -14,14 +14,14 @@ export const FabricSecretsList = pikkuSessionlessFunc({
14
14
  description: 'List the secrets set on a stage, by name. Values are sealed to the stage and never leave it.',
15
15
  input: FabricSecretsListInput,
16
16
  output: FabricSecretsListOutput,
17
- func: async (_services, { branch, json }) => {
17
+ func: async (_services, { branch: requested, json }) => {
18
18
  const ctx = await resolveApiContext();
19
19
  if (!ctx.token)
20
20
  throw new Error('Not logged in. Run `pikku fabric login` first.');
21
21
  if (!ctx.projectId)
22
22
  throw new Error('No fabric project linked. Run `pikku fabric link` first.');
23
23
  const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
24
- const stageId = await resolveStageId(rpc, ctx.projectId, branch);
24
+ const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
25
25
  const result = await rpc.invoke('listStageSecretNames', { stageId });
26
26
  if (json) {
27
27
  console.log(JSON.stringify({ branch, secrets: result.secrets }, null, 2));
@@ -1,23 +1,23 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FabricSecretsRotateInput: z.ZodObject<{
3
- branch: z.ZodString;
3
+ branch: z.ZodOptional<z.ZodString>;
4
4
  force: z.ZodOptional<z.ZodBoolean>;
5
5
  }, z.core.$strip>;
6
6
  export declare const FabricSecretsRotateOutput: z.ZodObject<{
7
7
  retiredKeyId: z.ZodNullable<z.ZodString>;
8
8
  }, z.core.$strip>;
9
9
  export declare const FabricSecretsRotate: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
10
- branch: string;
10
+ branch?: string | undefined;
11
11
  force?: boolean | undefined;
12
12
  }, {
13
13
  retiredKeyId: string | null;
14
14
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
15
- branch: string;
15
+ branch?: string | undefined;
16
16
  force?: boolean | undefined;
17
17
  }, {
18
18
  retiredKeyId: string | null;
19
19
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
20
- branch: string;
20
+ branch?: string | undefined;
21
21
  force?: boolean | undefined;
22
22
  }, {
23
23
  retiredKeyId: string | null;
@@ -2,9 +2,9 @@ import { z } from 'zod';
2
2
  import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
3
3
  import { resolveApiContext } from '../lib/config.js';
4
4
  import { getFabricRPC } from '../lib/http.js';
5
- import { resolveStageId } from '../lib/stage.js';
5
+ import { resolveStage } from '../lib/stage.js';
6
6
  export const FabricSecretsRotateInput = z.object({
7
- branch: z.string(),
7
+ branch: z.string().optional(),
8
8
  force: z.boolean().optional(),
9
9
  });
10
10
  export const FabricSecretsRotateOutput = z.object({
@@ -14,20 +14,23 @@ export const FabricSecretsRotate = pikkuSessionlessFunc({
14
14
  description: "Retire a stage's sealing key so the next deploy issues a new one. Secrets sealed to the old key must be set again.",
15
15
  input: FabricSecretsRotateInput,
16
16
  output: FabricSecretsRotateOutput,
17
- func: async (_services, { branch, force }) => {
17
+ func: async (_services, { branch: requested, force }) => {
18
18
  const ctx = await resolveApiContext();
19
19
  if (!ctx.token)
20
20
  throw new Error('Not logged in. Run `pikku fabric login` first.');
21
21
  if (!ctx.projectId)
22
22
  throw new Error('No fabric project linked. Run `pikku fabric link` first.');
23
+ // Resolved before the refusal, so the one message standing between a
24
+ // typo and unreadable secrets names the stage that would actually be
25
+ // rotated rather than echoing an argument that may not have been passed.
26
+ const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
27
+ const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
23
28
  if (!force) {
24
29
  // Not a confirmation for politeness — this is the one operation here
25
30
  // that destroys access to data. Fabric cannot read the sealed values, so
26
31
  // it cannot carry them over, and nobody can undo it afterwards.
27
32
  throw new Error(`Rotating the sealing key on ${branch} makes every secret already set on it unreadable — fabric cannot re-seal values it cannot open, so each one must be set again after the next deploy. Re-run with --force if that is what you want.`);
28
33
  }
29
- const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
30
- const stageId = await resolveStageId(rpc, ctx.projectId, branch);
31
34
  const result = await rpc.invoke('rotateStageSealingKey', { stageId });
32
35
  console.log(`[fabric] retired sealing key ${result.retiredKeyId} on ${branch}`);
33
36
  console.log('[fabric] deploy the stage to issue a new key, then set its secrets again');
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FabricSecretsSetInput: z.ZodObject<{
3
3
  name: z.ZodString;
4
- branch: z.ZodString;
4
+ branch: z.ZodOptional<z.ZodString>;
5
5
  value: z.ZodOptional<z.ZodString>;
6
6
  force: z.ZodOptional<z.ZodBoolean>;
7
7
  }, z.core.$strip>;
@@ -11,7 +11,7 @@ export declare const FabricSecretsSetOutput: z.ZodObject<{
11
11
  }, z.core.$strip>;
12
12
  export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
13
13
  name: string;
14
- branch: string;
14
+ branch?: string | undefined;
15
15
  value?: string | undefined;
16
16
  force?: boolean | undefined;
17
17
  }, {
@@ -19,7 +19,7 @@ export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-fu
19
19
  keyId: string;
20
20
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
21
21
  name: string;
22
- branch: string;
22
+ branch?: string | undefined;
23
23
  value?: string | undefined;
24
24
  force?: boolean | undefined;
25
25
  }, {
@@ -27,7 +27,7 @@ export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-fu
27
27
  keyId: string;
28
28
  }, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
29
29
  name: string;
30
- branch: string;
30
+ branch?: string | undefined;
31
31
  value?: string | undefined;
32
32
  force?: boolean | undefined;
33
33
  }, {
@@ -3,11 +3,11 @@ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
3
3
  import { resolveApiContext } from '../lib/config.js';
4
4
  import { getFabricRPC } from '../lib/http.js';
5
5
  import { promptSecret } from '../lib/prompt.js';
6
- import { resolveStageId } from '../lib/stage.js';
6
+ import { resolveStage } from '../lib/stage.js';
7
7
  import { seal, serializeSealedValue } from '../lib/sealed-box.js';
8
8
  export const FabricSecretsSetInput = z.object({
9
9
  name: z.string(),
10
- branch: z.string(),
10
+ branch: z.string().optional(),
11
11
  value: z.string().optional(),
12
12
  force: z.boolean().optional(),
13
13
  });
@@ -19,7 +19,7 @@ export const FabricSecretsSet = pikkuSessionlessFunc({
19
19
  description: 'Set a stage-scoped secret. Sealed here to the stage public key — the plaintext never leaves this machine.',
20
20
  input: FabricSecretsSetInput,
21
21
  output: FabricSecretsSetOutput,
22
- func: async (_services, { name, branch, value }) => {
22
+ func: async (_services, { name, branch: requested, value }) => {
23
23
  const ctx = await resolveApiContext();
24
24
  if (!ctx.token)
25
25
  throw new Error('Not logged in. Run `pikku fabric login` first.');
@@ -29,7 +29,7 @@ export const FabricSecretsSet = pikkuSessionlessFunc({
29
29
  if (!plaintext)
30
30
  throw new Error('Empty secret value — aborting.');
31
31
  const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
32
- const stageId = await resolveStageId(rpc, ctx.projectId, branch);
32
+ const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
33
33
  // Fabric holds only the public half of this keypair. The private half went
34
34
  // to the stage's worker at deploy time and was dropped there, so the value
35
35
  // sealed below can be opened by that worker and by nothing else — including