@pikku/cli 0.12.154 → 0.12.156
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.
- package/console-app/assets/{HelpPanel-BPFBvwZj.js → HelpPanel-DaE02BQE.js} +1 -1
- package/console-app/assets/{abnfDiagram-VCTEODGH-DDuocZ0S.js → abnfDiagram-VCTEODGH-CExRuljg.js} +1 -1
- package/console-app/assets/architecture-7GRP2DOG-DMiKIh61.js +1 -0
- package/console-app/assets/{architectureDiagram-5GKGNRK7-bFIt59Dq.js → architectureDiagram-5GKGNRK7-uKjmdPIQ.js} +1 -1
- package/console-app/assets/{blockDiagram-I7D4REHJ-Bge8309x.js → blockDiagram-I7D4REHJ-DNgIFbT4.js} +1 -1
- package/console-app/assets/{c4Diagram-7LVT6UL2-BdJOmC5x.js → c4Diagram-7LVT6UL2-0vP9sLld.js} +1 -1
- package/console-app/assets/channel-D3pFDQ-Y.js +1 -0
- package/console-app/assets/{chunk-4HAMMTFA-Cenx-5I1.js → chunk-4HAMMTFA-BJ59eqJI.js} +1 -1
- package/console-app/assets/{chunk-75Z2AOVW-CAGQ08f_.js → chunk-75Z2AOVW-Bge6xoqX.js} +1 -1
- package/console-app/assets/{chunk-DU6HZSFF-Bhji7Bhy.js → chunk-DU6HZSFF-CkmYNhC5.js} +1 -1
- package/console-app/assets/{chunk-F27PBJKO-D7gTX3dk.js → chunk-F27PBJKO-C44ef28t.js} +1 -1
- package/console-app/assets/{chunk-GMAD6QVW-DkRx7Brv.js → chunk-GMAD6QVW-Bmqdx1l0.js} +1 -1
- package/console-app/assets/{chunk-GVQU2GXP-DEWdO9pP.js → chunk-GVQU2GXP-AQp_KNx4.js} +1 -1
- package/console-app/assets/{chunk-IMKFNOWR-C1Vtain1.js → chunk-IMKFNOWR-Ca3GoHnO.js} +1 -1
- package/console-app/assets/{chunk-L3NEJ4N5-B_nm0es0.js → chunk-L3NEJ4N5-C_GhayZt.js} +1 -1
- package/console-app/assets/{chunk-OSK3NFVY-C0EPlVq0.js → chunk-OSK3NFVY-DGzfF4JV.js} +1 -1
- package/console-app/assets/{chunk-P2QGCYS3-qs_HwIoO.js → chunk-P2QGCYS3-N8xMDiFw.js} +1 -1
- package/console-app/assets/{chunk-POPQ4Y6H-CJWbAVy_.js → chunk-POPQ4Y6H-CdhIikwj.js} +1 -1
- package/console-app/assets/{chunk-PWAF6VOD-CmyETkG4.js → chunk-PWAF6VOD-CdTJmOYg.js} +1 -1
- package/console-app/assets/{chunk-SHT3W25Y-Coqn0qc9.js → chunk-SHT3W25Y-Ctj8zSAF.js} +1 -1
- package/console-app/assets/{chunk-SVP7TREG-D1E3L3Ry.js → chunk-SVP7TREG-DTNKveWo.js} +1 -1
- package/console-app/assets/{chunk-TICWLB2K-bsfeT6VF.js → chunk-TICWLB2K-Df6e0LIf.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-CPBzG1Ie.js +1 -0
- package/console-app/assets/classDiagram-ZZMXUADV-Bh5HK4MN.js +1 -0
- package/console-app/assets/classDiagram-v2-VYDZK3BY-Bh5HK4MN.js +1 -0
- package/console-app/assets/{cose-bilkent-JH36ORCC-H5-jGbyx.js → cose-bilkent-JH36ORCC-DBd_emhQ.js} +1 -1
- package/console-app/assets/{cynefin-OW5HDTMX-CljdWyve.js → cynefin-OW5HDTMX-3aBVpBMI.js} +1 -1
- package/console-app/assets/{cynefinDiagram-5FMLGOSQ-DmDd9Ruh.js → cynefinDiagram-5FMLGOSQ-5BZzBehJ.js} +1 -1
- package/console-app/assets/{dagre-ChLSY7zR.js → dagre-DATELzSq.js} +1 -1
- package/console-app/assets/{dagre-GXQ25YYZ-DT48xQuH.js → dagre-GXQ25YYZ-orKIUXIt.js} +1 -1
- package/console-app/assets/{diagram-S7CK7UJ4-DKPk5LKU.js → diagram-S7CK7UJ4-CwwxVQ_N.js} +1 -1
- package/console-app/assets/{diagram-UQ7AKVKN-BWnhjDbO.js → diagram-UQ7AKVKN-CcEJxIEU.js} +1 -1
- package/console-app/assets/{diagram-VSXAHHWV-1XCGd7TX.js → diagram-VSXAHHWV-DGfXNB6v.js} +1 -1
- package/console-app/assets/{diagram-VX7I27RA-8dIoEZIX.js → diagram-VX7I27RA-Kqkord1q.js} +1 -1
- package/console-app/assets/{diagram-Z3DM3KII-CgFhlsHg.js → diagram-Z3DM3KII-Dy5rfOxu.js} +1 -1
- package/console-app/assets/{ebnfDiagram-PWID7BFC-j8nbgcPz.js → ebnfDiagram-PWID7BFC-y1bmj1ry.js} +1 -1
- package/console-app/assets/{erDiagram-RLTQ6QDP-fQNmZd6-.js → erDiagram-RLTQ6QDP-CNk_w5Ib.js} +1 -1
- package/console-app/assets/eventmodeling-NTZA5JFV-DLjVcr4S.js +1 -0
- package/console-app/assets/flowDiagram-HODETNUW-CCiyVZIU.js +1 -0
- package/console-app/assets/{ganttDiagram-EL5Y4UJY-D8pzapyN.js → ganttDiagram-EL5Y4UJY-DdVaRGRy.js} +1 -1
- package/console-app/assets/{gitGraph-4MIJSDKK-BvRsGeLo.js → gitGraph-4MIJSDKK-DpSAepQv.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-WWUBYQGX-C_qwjJL5.js → gitGraphDiagram-WWUBYQGX-CIhGnwZW.js} +1 -1
- package/console-app/assets/{graphlib-9R2fmYel.js → graphlib-CRp93vEd.js} +1 -1
- package/console-app/assets/{index-DMQFSpKy.js → index-B34OoL_f.js} +139 -136
- package/console-app/assets/{info-A6RAGUB7-BIjzE3Zr.js → info-A6RAGUB7-DckDPZ56.js} +1 -1
- package/console-app/assets/{infoDiagram-27XIBGKW-DbFqdvGy.js → infoDiagram-27XIBGKW-DMk6mpjP.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-5VMMS53U-D5ei52Uz.js → ishikawaDiagram-5VMMS53U-Dqr5CEc9.js} +1 -1
- package/console-app/assets/{journeyDiagram-3NMN7TZE-DOVQGQxF.js → journeyDiagram-3NMN7TZE-Kv0orI9j.js} +1 -1
- package/console-app/assets/{kanban-definition-UXKFOSKX-D8cjrKvj.js → kanban-definition-UXKFOSKX-BrYb0IpS.js} +1 -1
- package/console-app/assets/{line-S23S00r8.js → line-D2jQ449E.js} +1 -1
- package/console-app/assets/{linear-C2q7Mgrm.js → linear-BKu0S9-y.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-DFVvyiUd.js → mermaid-parser.core-DhWf8x6B.js} +3 -3
- package/console-app/assets/{mermaid.core-C85pnBPI.js → mermaid.core-RkgzUTr1.js} +4 -4
- package/console-app/assets/{mindmap-definition-YA3MSWOX-Bqn28yl9.js → mindmap-definition-YA3MSWOX-BKATx3X1.js} +1 -1
- package/console-app/assets/{packet-AYTQ26CC-Cj1kD_Xa.js → packet-AYTQ26CC-Dek-5xov.js} +1 -1
- package/console-app/assets/{pegDiagram-XKGWAZYB-DJ12pyU4.js → pegDiagram-XKGWAZYB-CkEJ5MeF.js} +1 -1
- package/console-app/assets/{pie-WAS4IAKB-BUmyuH7f.js → pie-WAS4IAKB-BIoN9DHQ.js} +1 -1
- package/console-app/assets/{pieDiagram-E7YTZNPT-jTvMRCtY.js → pieDiagram-E7YTZNPT-CEPQgMPk.js} +1 -1
- package/console-app/assets/{quadrantDiagram-AXDQQJYC-D826kpcV.js → quadrantDiagram-AXDQQJYC-eJxMa_50.js} +1 -1
- package/console-app/assets/{radar-RG4KPBEZ-CYbTAeXH.js → radar-RG4KPBEZ-BwJnovJ0.js} +1 -1
- package/console-app/assets/{railroad-74A4TZTK-mfMkjDWk.js → railroad-74A4TZTK-D1_fi4Md.js} +1 -1
- package/console-app/assets/railroad-abnf-HS5TGJTU-D-_q3UaA.js +1 -0
- package/console-app/assets/railroad-ebnf-LZEXJU2U-kh7JN-2k.js +1 -0
- package/console-app/assets/railroad-peg-WCYAUIDC-rrwoksLW.js +1 -0
- package/console-app/assets/{railroadDiagram-O6MQD6OU-CGlOEAk5.js → railroadDiagram-O6MQD6OU-BpOx1Ffe.js} +1 -1
- package/console-app/assets/{requirementDiagram-BXWQKSXE-DY_zQ4Qu.js → requirementDiagram-BXWQKSXE-D-IEFxpk.js} +1 -1
- package/console-app/assets/{sankeyDiagram-P5KCCOFB-B4QJZukx.js → sankeyDiagram-P5KCCOFB-SdALSgLt.js} +1 -1
- package/console-app/assets/{sequenceDiagram-WJ2MYXX4-DTERMwcf.js → sequenceDiagram-WJ2MYXX4-Burhioru.js} +1 -1
- package/console-app/assets/{src-CRoiE_Pf.js → src-BI-J79xw.js} +1 -1
- package/console-app/assets/{stateDiagram-D77RDMKH-BLnCP1RM.js → stateDiagram-D77RDMKH-BhWb5zb7.js} +1 -1
- package/console-app/assets/stateDiagram-v2-MP3YSRHH-OjHOAFS5.js +1 -0
- package/console-app/assets/{swimlanes-42K2YHIH-CwYZgjxi.js → swimlanes-42K2YHIH-BoaeXC6b.js} +1 -1
- package/console-app/assets/swimlanesDiagram-VR7AAH4N-CkKXVcij.js +8 -0
- package/console-app/assets/{timeline-definition-24CTP7MA-BEv4uhRy.js → timeline-definition-24CTP7MA-uuBDVcEL.js} +1 -1
- package/console-app/assets/{treeView-Q6P3EWNA-CHhQVPzu.js → treeView-Q6P3EWNA-BRZawPMp.js} +1 -1
- package/console-app/assets/{treemap-WGGIJYW6-DSnq4EZT.js → treemap-WGGIJYW6-WSINjp5g.js} +1 -1
- package/console-app/assets/{vennDiagram-4TSXK5OY-CHT6P8GK.js → vennDiagram-4TSXK5OY-K6UjE9uq.js} +1 -1
- package/console-app/assets/{wardley-WFR3VGLG-yPMtiazL.js → wardley-WFR3VGLG-BMecQ-Z6.js} +1 -1
- package/console-app/assets/{wardleyDiagram-VM6X3IG4-Df2U4u0X.js → wardleyDiagram-VM6X3IG4-9blTcGMt.js} +1 -1
- package/console-app/assets/{xychartDiagram-S5SC5T6Z-D4bRAEWS.js → xychartDiagram-S5SC5T6Z-DSnHhis6.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/addon/index.d.ts +1 -1
- package/dist/.pikku/addon/index.js +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
- package/dist/.pikku/agent/index.d.ts +1 -1
- package/dist/.pikku/agent/index.js +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/analytics/index.d.ts +1 -1
- package/dist/.pikku/analytics/index.js +1 -1
- package/dist/.pikku/analytics/pikku-analytics-types.gen.d.ts +1 -1
- package/dist/.pikku/analytics/pikku-analytics-types.gen.js +1 -1
- package/dist/.pikku/auth/index.d.ts +1 -1
- package/dist/.pikku/auth/index.js +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
- package/dist/.pikku/channel/index.d.ts +1 -1
- package/dist/.pikku/channel/index.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/index.d.ts +1 -1
- package/dist/.pikku/cli/index.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +15 -5
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.json +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +15 -6
- package/dist/.pikku/error/index.d.ts +1 -1
- package/dist/.pikku/error/index.js +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/function/index.d.ts +1 -1
- package/dist/.pikku/function/index.js +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +35 -35
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/gateway/index.d.ts +1 -1
- package/dist/.pikku/gateway/index.js +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
- package/dist/.pikku/http/index.d.ts +1 -1
- package/dist/.pikku/http/index.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/index.d.ts +1 -1
- package/dist/.pikku/mcp/index.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/middleware/index.d.ts +1 -1
- package/dist/.pikku/middleware/index.js +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/queue/index.d.ts +1 -1
- package/dist/.pikku/queue/index.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/scenarios/index.d.ts +1 -1
- package/dist/.pikku/scenarios/index.js +1 -1
- package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/index.d.ts +1 -1
- package/dist/.pikku/scheduler/index.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +1 -1
- package/dist/.pikku/scopes/index.d.ts +1 -1
- package/dist/.pikku/scopes/index.js +1 -1
- package/dist/.pikku/scopes/pikku-flags.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/index.d.ts +1 -1
- package/dist/.pikku/secrets/index.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/setup/index.d.ts +1 -1
- package/dist/.pikku/setup/index.js +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
- package/dist/.pikku/trigger/index.d.ts +1 -1
- package/dist/.pikku/trigger/index.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/index.d.ts +1 -1
- package/dist/.pikku/variables/index.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/index.d.ts +1 -1
- package/dist/.pikku/workflow/index.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/bin/pikku.js +32 -2
- package/dist/src/fabric/fabric-commands.js +3 -1
- package/dist/src/fabric/functions/add.function.js +4 -3
- package/dist/src/fabric/functions/changes-file.function.js +2 -1
- package/dist/src/fabric/functions/changes-shot.function.js +3 -2
- package/dist/src/fabric/functions/db-schema.function.js +3 -2
- package/dist/src/fabric/functions/deploy-list.function.js +3 -2
- package/dist/src/fabric/functions/deploy-units.function.js +3 -2
- package/dist/src/fabric/functions/deploy.function.js +4 -4
- package/dist/src/fabric/functions/domains-add.function.js +4 -3
- package/dist/src/fabric/functions/domains-list.function.js +3 -2
- package/dist/src/fabric/functions/domains-remove.function.js +5 -4
- package/dist/src/fabric/functions/errors.function.js +3 -2
- package/dist/src/fabric/functions/findings-flush.function.js +2 -1
- package/dist/src/fabric/functions/init.function.js +3 -2
- package/dist/src/fabric/functions/link.function.js +10 -10
- package/dist/src/fabric/functions/login.function.js +4 -3
- package/dist/src/fabric/functions/logs.function.js +2 -2
- package/dist/src/fabric/functions/metrics.function.js +3 -2
- package/dist/src/fabric/functions/projects-list.function.js +2 -1
- package/dist/src/fabric/functions/publish.function.js +7 -6
- package/dist/src/fabric/functions/report.function.js +4 -3
- package/dist/src/fabric/functions/rollback.function.js +3 -2
- package/dist/src/fabric/functions/secrets-delete.function.js +5 -4
- package/dist/src/fabric/functions/secrets-list.function.js +3 -2
- package/dist/src/fabric/functions/secrets-rotate.function.js +4 -3
- package/dist/src/fabric/functions/secrets-set.function.js +11 -4
- package/dist/src/fabric/functions/smoke.function.js +4 -3
- package/dist/src/fabric/functions/status.function.js +3 -2
- package/dist/src/fabric/functions/trace.function.js +3 -2
- package/dist/src/fabric/functions/variables-get.function.js +3 -2
- package/dist/src/fabric/functions/variables-set.function.js +3 -2
- package/dist/src/fabric/lib/changes.js +3 -2
- package/dist/src/fabric/lib/config.js +2 -1
- package/dist/src/fabric/lib/deployment.js +2 -1
- package/dist/src/fabric/lib/git.d.ts +10 -1
- package/dist/src/fabric/lib/git.js +10 -1
- package/dist/src/fabric/lib/prompt.d.ts +14 -5
- package/dist/src/fabric/lib/prompt.js +78 -15
- package/dist/src/fabric/lib/sealed-box.js +3 -2
- package/dist/src/fabric/lib/stage.js +3 -2
- package/dist/src/functions/commands/audit.js +4 -2
- package/dist/src/functions/commands/watch.js +5 -2
- package/dist/src/functions/wirings/agent/serialize-public-agent.js +2 -0
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +18 -4
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +16 -5
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +26 -2
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.d.ts +6 -2
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +9 -3
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +26 -5
- package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +46 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +7 -2
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +13 -1
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.d.ts +13 -0
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +48 -8
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +9 -4
- package/dist/src/functions/workflows/all.workflow.js +8 -0
- package/dist/src/services.js +1 -0
- package/dist/src/utils/pikku-cli-config-error.d.ts +8 -3
- package/dist/src/utils/pikku-cli-config-error.js +8 -3
- package/dist/src/utils/pikku-cli-config.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/surface.json +10 -20
- package/console-app/assets/architecture-7GRP2DOG-ClxOnHTX.js +0 -1
- package/console-app/assets/channel-c0xM4cPi.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-BkM8vXTQ.js +0 -1
- package/console-app/assets/classDiagram-ZZMXUADV-yCAU184A.js +0 -1
- package/console-app/assets/classDiagram-v2-VYDZK3BY-yCAU184A.js +0 -1
- package/console-app/assets/eventmodeling-NTZA5JFV-bHToGR6p.js +0 -1
- package/console-app/assets/flowDiagram-HODETNUW-Dd1RiDsS.js +0 -1
- package/console-app/assets/railroad-abnf-HS5TGJTU-nuNyByRg.js +0 -1
- package/console-app/assets/railroad-ebnf-LZEXJU2U-BztHKlS5.js +0 -1
- package/console-app/assets/railroad-peg-WCYAUIDC-Bw7jp-js.js +0 -1
- package/console-app/assets/stateDiagram-v2-MP3YSRHH-Bv8nfhYK.js +0 -1
- package/console-app/assets/swimlanesDiagram-VR7AAH4N-BtAfsGDG.js +0 -8
|
@@ -92,10 +92,10 @@ export const FabricDeployApplyOutput = z.object({
|
|
|
92
92
|
async function prepDeploy({ branch, production, ref }) {
|
|
93
93
|
const ctx = await resolveApiContext();
|
|
94
94
|
if (!ctx.token) {
|
|
95
|
-
throw new
|
|
95
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
96
96
|
}
|
|
97
97
|
if (!ctx.projectId) {
|
|
98
|
-
throw new
|
|
98
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
99
99
|
}
|
|
100
100
|
// With no target named, deploy the branch that is checked out — the common
|
|
101
101
|
// case, and the one worth not making people type twice. It is only safe to
|
|
@@ -120,10 +120,10 @@ async function prepDeploy({ branch, production, ref }) {
|
|
|
120
120
|
async function prepAttach() {
|
|
121
121
|
const ctx = await resolveApiContext();
|
|
122
122
|
if (!ctx.token) {
|
|
123
|
-
throw new
|
|
123
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
124
124
|
}
|
|
125
125
|
if (!ctx.projectId) {
|
|
126
|
-
throw new
|
|
126
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
127
127
|
}
|
|
128
128
|
return { ctx, projectId: ctx.projectId };
|
|
129
129
|
}
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { findProjectConfig, resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricDomainsAddInput = z.object({
|
|
6
7
|
hostname: z.string(),
|
|
7
8
|
target: z.enum(['api', 'app']).optional(),
|
|
@@ -18,17 +19,17 @@ export const FabricDomainsAdd = pikkuSessionlessFunc({
|
|
|
18
19
|
func: async (_services, { hostname, target = 'api', apiUrl: apiUrlOverride }) => {
|
|
19
20
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
20
21
|
if (!ctx.token)
|
|
21
|
-
throw new
|
|
22
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
22
23
|
const local = await findProjectConfig();
|
|
23
24
|
if (!local)
|
|
24
|
-
throw new
|
|
25
|
+
throw new FabricPreconditionError('No fabric.config.json found. Run `pikku fabric link` first.');
|
|
25
26
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
26
27
|
const stagesResult = await rpc.invoke('listStages', {
|
|
27
28
|
projectId: local.config.projectId,
|
|
28
29
|
});
|
|
29
30
|
const production = stagesResult.stages.find((s) => s.type === 'production');
|
|
30
31
|
if (!production)
|
|
31
|
-
throw new
|
|
32
|
+
throw new FabricPreconditionError('No production stage exists yet — deploy the project first.');
|
|
32
33
|
const result = await rpc.invoke('addStageCustomHostname', {
|
|
33
34
|
stageId: production.stageId,
|
|
34
35
|
hostname,
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { findProjectConfig, resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricDomainsListInput = z.object({
|
|
6
7
|
apiUrl: z.string().optional(),
|
|
7
8
|
});
|
|
@@ -15,10 +16,10 @@ export const FabricDomainsList = pikkuSessionlessFunc({
|
|
|
15
16
|
func: async (_services, { apiUrl: apiUrlOverride }) => {
|
|
16
17
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
17
18
|
if (!ctx.token)
|
|
18
|
-
throw new
|
|
19
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
19
20
|
const local = await findProjectConfig();
|
|
20
21
|
if (!local)
|
|
21
|
-
throw new
|
|
22
|
+
throw new FabricPreconditionError('No fabric.config.json found. Run `pikku fabric link` first.');
|
|
22
23
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
23
24
|
const stagesResult = await rpc.invoke('listStages', {
|
|
24
25
|
projectId: local.config.projectId,
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { findProjectConfig, resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricDomainsRemoveInput = z.object({
|
|
6
7
|
hostname: z.string(),
|
|
7
8
|
apiUrl: z.string().optional(),
|
|
@@ -16,23 +17,23 @@ export const FabricDomainsRemove = pikkuSessionlessFunc({
|
|
|
16
17
|
func: async (_services, { hostname, apiUrl: apiUrlOverride }) => {
|
|
17
18
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
18
19
|
if (!ctx.token)
|
|
19
|
-
throw new
|
|
20
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
20
21
|
const local = await findProjectConfig();
|
|
21
22
|
if (!local)
|
|
22
|
-
throw new
|
|
23
|
+
throw new FabricPreconditionError('No fabric.config.json found. Run `pikku fabric link` first.');
|
|
23
24
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
24
25
|
const stagesResult = await rpc.invoke('listStages', {
|
|
25
26
|
projectId: local.config.projectId,
|
|
26
27
|
});
|
|
27
28
|
const production = stagesResult.stages.find((s) => s.type === 'production');
|
|
28
29
|
if (!production)
|
|
29
|
-
throw new
|
|
30
|
+
throw new FabricPreconditionError('No production stage found.');
|
|
30
31
|
const hostnamesResult = await rpc.invoke('listStageCustomHostnames', {
|
|
31
32
|
stageId: production.stageId,
|
|
32
33
|
});
|
|
33
34
|
const match = hostnamesResult.hostnames.find((h) => h.hostname === hostname.toLowerCase());
|
|
34
35
|
if (!match)
|
|
35
|
-
throw new
|
|
36
|
+
throw new FabricPreconditionError(`Hostname "${hostname}" is not attached to this project.`);
|
|
36
37
|
await rpc.invoke('removeStageCustomHostname', {
|
|
37
38
|
customHostnameId: match.customHostnameId,
|
|
38
39
|
});
|
|
@@ -3,6 +3,7 @@ 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 { table, removed, dim } from '../lib/output.js';
|
|
6
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
6
7
|
export const FabricErrorsInput = z.object({
|
|
7
8
|
branch: z.string().default('main'),
|
|
8
9
|
function: z.string().optional(),
|
|
@@ -23,9 +24,9 @@ export const FabricErrors = pikkuSessionlessFunc({
|
|
|
23
24
|
func: async (_services, { branch, function: functionName }) => {
|
|
24
25
|
const ctx = await resolveApiContext();
|
|
25
26
|
if (!ctx.token)
|
|
26
|
-
throw new
|
|
27
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
27
28
|
if (!ctx.projectId)
|
|
28
|
-
throw new
|
|
29
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
29
30
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
30
31
|
const { logs } = await rpc.invoke('getFabricLogsByStageKind', {
|
|
31
32
|
projectId: ctx.projectId,
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { flushSpool } from '../lib/finding-spool.js';
|
|
5
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricFindingsFlushInput = z.object({
|
|
6
7
|
apiUrl: z.string().optional(),
|
|
7
8
|
});
|
|
@@ -22,7 +23,7 @@ export const FabricFindingsFlush = pikkuSessionlessFunc({
|
|
|
22
23
|
func: async (_services, { apiUrl: apiUrlOverride }) => {
|
|
23
24
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
24
25
|
if (!ctx.token)
|
|
25
|
-
throw new
|
|
26
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
26
27
|
const result = await flushSpool({
|
|
27
28
|
apiUrl: ctx.apiUrl,
|
|
28
29
|
token: ctx.token,
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { findProjectConfig, isLinkedProjectId, resolveApiContext, writeProjectConfig, } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricInitInput = z.object({
|
|
6
7
|
repo: z.string(),
|
|
7
8
|
name: z.string().optional(),
|
|
@@ -28,10 +29,10 @@ export const FabricInit = pikkuSessionlessFunc({
|
|
|
28
29
|
func: async (_services, { repo, name, branch, force, apiUrl: apiUrlOverride }) => {
|
|
29
30
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
30
31
|
if (!ctx.token)
|
|
31
|
-
throw new
|
|
32
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
32
33
|
const existing = await findProjectConfig();
|
|
33
34
|
if (existing && isLinkedProjectId(existing.config.projectId) && !force) {
|
|
34
|
-
throw new
|
|
35
|
+
throw new FabricPreconditionError(`Already linked: ${existing.config.projectId} at ${existing.path}. Pass --force to replace.`);
|
|
35
36
|
}
|
|
36
37
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
37
38
|
const result = await rpc.invoke('importProject', {
|
|
@@ -32,10 +32,10 @@ export const FabricLink = pikkuSessionlessFunc({
|
|
|
32
32
|
func: async (_services, { apiUrl: apiUrlOverride, github, gitea, repoName }) => {
|
|
33
33
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
34
34
|
if (!ctx.token) {
|
|
35
|
-
throw new
|
|
35
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
36
36
|
}
|
|
37
37
|
if (github && gitea) {
|
|
38
|
-
throw new
|
|
38
|
+
throw new FabricPreconditionError('--github and --gitea name two different places to keep one repo. Pass one, or neither to use whatever `origin` already points at.');
|
|
39
39
|
}
|
|
40
40
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
41
41
|
// Both of these are checked BEFORE anything is created. `assertDeploySafety`
|
|
@@ -58,7 +58,7 @@ export const FabricLink = pikkuSessionlessFunc({
|
|
|
58
58
|
const ghInstall = await rpc.invoke('checkGithubInstall', {});
|
|
59
59
|
if (!ghInstall.installed) {
|
|
60
60
|
if (!ghInstall.installUrl) {
|
|
61
|
-
throw new
|
|
61
|
+
throw new FabricPreconditionError('GitHub App is not configured on this fabric deployment.');
|
|
62
62
|
}
|
|
63
63
|
console.log('');
|
|
64
64
|
console.log(' GitHub App not installed. Connect GitHub to continue:');
|
|
@@ -78,7 +78,7 @@ export const FabricLink = pikkuSessionlessFunc({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
if (!installed) {
|
|
81
|
-
throw new
|
|
81
|
+
throw new FabricPreconditionError('Timed out waiting for GitHub App installation. Run `pikku fabric link` again after installing.');
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -118,10 +118,10 @@ async function adoptExistingRemote({ github, gitea, }) {
|
|
|
118
118
|
const remoteUrl = await getRemoteUrl();
|
|
119
119
|
const onGithub = isGithubUrl(remoteUrl);
|
|
120
120
|
if (github && !onGithub) {
|
|
121
|
-
throw new
|
|
121
|
+
throw new FabricPreconditionError(`--github was passed, but origin is ${remoteUrl}, which is not on github.com.\nDrop the flag to link that remote, or repoint origin at the GitHub repo you meant.`);
|
|
122
122
|
}
|
|
123
123
|
if (gitea && onGithub) {
|
|
124
|
-
throw new
|
|
124
|
+
throw new FabricPreconditionError(`--gitea was passed, but origin is already ${remoteUrl}.\nDrop the flag to link the GitHub repo. To host it on fabric instead, remove the remote first (\`git remote remove origin\`) and run link again.`);
|
|
125
125
|
}
|
|
126
126
|
return remoteUrl;
|
|
127
127
|
}
|
|
@@ -141,15 +141,15 @@ async function adoptExistingRemote({ github, gitea, }) {
|
|
|
141
141
|
*/
|
|
142
142
|
async function createRemote({ rpc, github, gitea, repoName, }) {
|
|
143
143
|
if (github) {
|
|
144
|
-
throw new
|
|
144
|
+
throw new FabricPreconditionError('There is no `origin` to link, and fabric cannot create a GitHub repository for you.\nCreate it on github.com, `git remote add origin <url>`, and run `pikku fabric link` again — or pass --gitea to host it on fabric instead.');
|
|
145
145
|
}
|
|
146
146
|
if (!gitea) {
|
|
147
147
|
if (!process.stdin.isTTY) {
|
|
148
|
-
throw new
|
|
148
|
+
throw new FabricPreconditionError('There is no `origin` to link.\nPass --gitea to create a repository on fabric and push to it, or add a remote yourself and run link again.');
|
|
149
149
|
}
|
|
150
150
|
const confirmed = await promptConfirm('This project has no git remote. Create one on fabric and push this branch to it?', true);
|
|
151
151
|
if (!confirmed) {
|
|
152
|
-
throw new
|
|
152
|
+
throw new FabricPreconditionError('Nothing linked. Add a remote yourself (`git remote add origin <url>`) and run `pikku fabric link` again.');
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
const name = repoName ?? basename(process.cwd());
|
|
@@ -165,7 +165,7 @@ async function createRemote({ rpc, github, gitea, repoName, }) {
|
|
|
165
165
|
// ago — so removing it is safe, and it is what stops a retry dying on
|
|
166
166
|
// "remote origin already exists" instead of on the real problem.
|
|
167
167
|
await removeRemote('origin');
|
|
168
|
-
throw new
|
|
168
|
+
throw new FabricPreconditionError(`Created ${repo.repoUrl} but could not push to it: ${error instanceof Error ? error.message : String(error)}\nThe repository exists and is empty; push to it yourself, or run link again to get a fresh one.`);
|
|
169
169
|
}
|
|
170
170
|
console.log(`[fabric] pushed ${branch} to origin`);
|
|
171
171
|
return repo.repoUrl;
|
|
@@ -4,6 +4,7 @@ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
|
4
4
|
import { readAuthFile, writeAuthFile, resolveApiContext, } from '../lib/config.js';
|
|
5
5
|
import { getFabricRPC } from '../lib/http.js';
|
|
6
6
|
import { deriveConsoleUrl } from '../lib/console-url.js';
|
|
7
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
7
8
|
export const FabricLoginInput = z.object({
|
|
8
9
|
apiKey: z.string().optional(),
|
|
9
10
|
token: z.string().optional(),
|
|
@@ -89,12 +90,12 @@ export const FabricLogin = pikkuSessionlessFunc({
|
|
|
89
90
|
await new Promise((r) => setTimeout(r, POLL_INTERVAL_MS));
|
|
90
91
|
const result = await rpc.invoke('pollCliAuth', { code });
|
|
91
92
|
if (result.status === 'expired') {
|
|
92
|
-
throw new
|
|
93
|
+
throw new FabricPreconditionError('Code expired before confirmation. Run `pikku fabric login` again.');
|
|
93
94
|
}
|
|
94
95
|
// Distinct from expired: the user pressed Cancel, so stop immediately
|
|
95
96
|
// rather than sitting here until the TTL runs out.
|
|
96
97
|
if (result.status === 'rejected') {
|
|
97
|
-
throw new
|
|
98
|
+
throw new FabricPreconditionError('Sign-in was cancelled in the browser. Run `pikku fabric login` again to retry.');
|
|
98
99
|
}
|
|
99
100
|
if (result.status === 'confirmed' && result.token) {
|
|
100
101
|
const auth = await readAuthFile();
|
|
@@ -104,6 +105,6 @@ export const FabricLogin = pikkuSessionlessFunc({
|
|
|
104
105
|
return { ok: true, apiUrl };
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
|
-
throw new
|
|
108
|
+
throw new FabricPreconditionError('Login timed out.');
|
|
108
109
|
},
|
|
109
110
|
});
|
|
@@ -31,9 +31,9 @@ export const FabricLogs = pikkuSessionlessFunc({
|
|
|
31
31
|
func: async (_services, { branch, level, json, follow }) => {
|
|
32
32
|
const ctx = await resolveApiContext();
|
|
33
33
|
if (!ctx.token)
|
|
34
|
-
throw new
|
|
34
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
35
35
|
if (!ctx.projectId)
|
|
36
|
-
throw new
|
|
36
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
37
37
|
if (!branch)
|
|
38
38
|
throw new FabricPreconditionError('Specify --branch <branch-name>.');
|
|
39
39
|
const seen = new Set();
|
|
@@ -2,6 +2,7 @@ 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 { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricMetricsInput = z.object({
|
|
6
7
|
branch: z.string(),
|
|
7
8
|
hours: z.number().optional(),
|
|
@@ -20,9 +21,9 @@ export const FabricMetrics = pikkuSessionlessFunc({
|
|
|
20
21
|
func: async (_services, { branch, hours, function: functionName, json }) => {
|
|
21
22
|
const ctx = await resolveApiContext();
|
|
22
23
|
if (!ctx.token)
|
|
23
|
-
throw new
|
|
24
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
24
25
|
if (!ctx.projectId)
|
|
25
|
-
throw new
|
|
26
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
26
27
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
27
28
|
const res = await rpc.invoke('getProjectMetricsByStageKind', {
|
|
28
29
|
projectId: ctx.projectId,
|
|
@@ -3,6 +3,7 @@ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
|
3
3
|
import { findProjectConfig, resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
5
|
import { dim } from '../lib/output.js';
|
|
6
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
6
7
|
export const FabricProjectsListInput = z.object({
|
|
7
8
|
apiUrl: z.string().optional(),
|
|
8
9
|
});
|
|
@@ -31,7 +32,7 @@ export const FabricProjectsList = pikkuSessionlessFunc({
|
|
|
31
32
|
func: async (_services, { apiUrl: apiUrlOverride }) => {
|
|
32
33
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
33
34
|
if (!ctx.token)
|
|
34
|
-
throw new
|
|
35
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
35
36
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
36
37
|
const { projects } = await rpc.invoke('fabricCliProjects', {});
|
|
37
38
|
const local = await findProjectConfig();
|
|
@@ -6,6 +6,7 @@ import { tmpdir } from 'node:os';
|
|
|
6
6
|
import { execFileSync } from 'node:child_process';
|
|
7
7
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
8
8
|
import { resolveApiContext } from '../lib/config.js';
|
|
9
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
9
10
|
export const FabricPublishInput = z.object({
|
|
10
11
|
dir: z.string().optional(),
|
|
11
12
|
apiUrl: z.string().optional(),
|
|
@@ -33,18 +34,18 @@ export const FabricPublish = pikkuSessionlessFunc({
|
|
|
33
34
|
const verification = await rpc.invoke('FabricAddonVerify', { dir });
|
|
34
35
|
await cli?.channel.send(verification);
|
|
35
36
|
if (!verification.ok) {
|
|
36
|
-
throw new
|
|
37
|
+
throw new FabricPreconditionError('Addon verification failed — fix the errors above before publishing.');
|
|
37
38
|
}
|
|
38
39
|
const ctx = await resolveApiContext({ apiUrlOverride });
|
|
39
40
|
if (!ctx.token)
|
|
40
|
-
throw new
|
|
41
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
41
42
|
const packageDir = dir ?? process.cwd();
|
|
42
43
|
const pkgPath = join(packageDir, 'package.json');
|
|
43
44
|
if (!existsSync(pkgPath))
|
|
44
|
-
throw new
|
|
45
|
+
throw new FabricPreconditionError(`No package.json found in ${packageDir}`);
|
|
45
46
|
const pkg = JSON.parse(await readFile(pkgPath, 'utf8'));
|
|
46
47
|
if (!pkg.name || !pkg.version)
|
|
47
|
-
throw new
|
|
48
|
+
throw new FabricPreconditionError('package.json must have a name and version');
|
|
48
49
|
// Pack via `npm pack` so the artifact honours the package's `files` field
|
|
49
50
|
// (ship src/.pikku/types, not build/VCS noise) and matches the layout a
|
|
50
51
|
// normal install produces. npm nests contents under `package/`; the
|
|
@@ -65,7 +66,7 @@ export const FabricPublish = pikkuSessionlessFunc({
|
|
|
65
66
|
body: JSON.stringify(body),
|
|
66
67
|
});
|
|
67
68
|
if (!r.ok)
|
|
68
|
-
throw new
|
|
69
|
+
throw new FabricPreconditionError(`POST ${path} → ${r.status}: ${await r.text()}`);
|
|
69
70
|
return r.json();
|
|
70
71
|
};
|
|
71
72
|
// 1. presigned upload URL (short-lived)
|
|
@@ -74,7 +75,7 @@ export const FabricPublish = pikkuSessionlessFunc({
|
|
|
74
75
|
// is signed over host only; mismatched headers break the signature).
|
|
75
76
|
const put = await fetch(uploadUrl, { method: 'PUT', body: artifact });
|
|
76
77
|
if (!put.ok)
|
|
77
|
-
throw new
|
|
78
|
+
throw new FabricPreconditionError(`upload failed → ${put.status}: ${await put.text()}`);
|
|
78
79
|
// 3. finalize — server reads the artifact back, extracts meta, indexes it
|
|
79
80
|
const entry = await post('/registry/addons/publish', { artifactKey });
|
|
80
81
|
const publisher = entry.publisher?.name ?? null;
|
|
@@ -4,6 +4,7 @@ import { resolveApiContext } from '../lib/config.js';
|
|
|
4
4
|
import { collectReportEnvironment } from '../lib/report-environment.js';
|
|
5
5
|
import { FindingInput, buildFindingPayload, parseFinding, parseFindingJson, postFinding, renderReceipt, validateFinding, } from '../lib/finding.js';
|
|
6
6
|
import { flushSpool, readSpool, spoolFinding } from '../lib/finding-spool.js';
|
|
7
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
7
8
|
/**
|
|
8
9
|
* Every field is optional here and the strictness lives in `FindingInput`,
|
|
9
10
|
* because `--stdin` supplies the whole finding at once and the flags then
|
|
@@ -21,7 +22,7 @@ export const FabricReportOutput = z.object({
|
|
|
21
22
|
});
|
|
22
23
|
const readStdin = async () => {
|
|
23
24
|
if (process.stdin.isTTY) {
|
|
24
|
-
throw new
|
|
25
|
+
throw new FabricPreconditionError('--stdin expects the finding as JSON on standard input, and nothing was piped in.');
|
|
25
26
|
}
|
|
26
27
|
const chunks = [];
|
|
27
28
|
for await (const chunk of process.stdin)
|
|
@@ -49,11 +50,11 @@ export const FabricReport = pikkuSessionlessFunc({
|
|
|
49
50
|
? parseFindingJson(await readStdin())
|
|
50
51
|
: parseFinding(flags);
|
|
51
52
|
if ('problems' in parsed) {
|
|
52
|
-
throw new
|
|
53
|
+
throw new FabricPreconditionError(parsed.problems.join('\n'));
|
|
53
54
|
}
|
|
54
55
|
const problems = validateFinding(parsed.finding);
|
|
55
56
|
if (problems.length > 0) {
|
|
56
|
-
throw new
|
|
57
|
+
throw new FabricPreconditionError(problems.join('\n'));
|
|
57
58
|
}
|
|
58
59
|
const payload = buildFindingPayload(parsed.finding, await collectReportEnvironment());
|
|
59
60
|
console.log(renderReceipt(payload));
|
|
@@ -2,6 +2,7 @@ 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 { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricRollbackInput = z.object({
|
|
6
7
|
branch: z.string(),
|
|
7
8
|
target: z.string().optional(),
|
|
@@ -29,9 +30,9 @@ export const FabricRollback = pikkuSessionlessFunc({
|
|
|
29
30
|
func: async (_services, { target, list, dryRun }) => {
|
|
30
31
|
const ctx = await resolveApiContext();
|
|
31
32
|
if (!ctx.token)
|
|
32
|
-
throw new
|
|
33
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
33
34
|
if (!ctx.projectId)
|
|
34
|
-
throw new
|
|
35
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
35
36
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
36
37
|
// --list (or no target) → just show candidates.
|
|
37
38
|
if (list || !target) {
|
|
@@ -4,6 +4,7 @@ import { resolveApiContext } from '../lib/config.js';
|
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
5
|
import { promptConfirm } from '../lib/prompt.js';
|
|
6
6
|
import { resolveStage } from '../lib/stage.js';
|
|
7
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
7
8
|
export const FabricSecretsDeleteInput = z.object({
|
|
8
9
|
name: z.string(),
|
|
9
10
|
branch: z.string().optional(),
|
|
@@ -21,21 +22,21 @@ export const FabricSecretsDelete = pikkuSessionlessFunc({
|
|
|
21
22
|
func: async (_services, { name, branch: requested, force }) => {
|
|
22
23
|
const ctx = await resolveApiContext();
|
|
23
24
|
if (!ctx.token)
|
|
24
|
-
throw new
|
|
25
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
25
26
|
if (!ctx.projectId)
|
|
26
|
-
throw new
|
|
27
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
27
28
|
// Resolved before the prompt so the confirmation names the stage that
|
|
28
29
|
// would actually lose the secret, not an argument that may be absent.
|
|
29
30
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
30
31
|
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
31
32
|
if (!force) {
|
|
32
33
|
if (!process.stdin.isTTY) {
|
|
33
|
-
throw new
|
|
34
|
+
throw new FabricPreconditionError(`Refusing to delete ${name} from ${branch} without confirmation — re-run with --force to delete non-interactively.`);
|
|
34
35
|
}
|
|
35
36
|
// Fabric cannot read the sealed value back, so this is not recoverable
|
|
36
37
|
// by re-reading it — the plaintext has to be supplied again.
|
|
37
38
|
if (!(await promptConfirm(`Delete ${name} from ${branch}? It cannot be recovered — the value must be set again.`))) {
|
|
38
|
-
throw new
|
|
39
|
+
throw new FabricPreconditionError('Delete aborted.');
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
const result = await rpc.invoke('deleteStageSecret', { stageId, name });
|
|
@@ -3,6 +3,7 @@ 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 { resolveStage } from '../lib/stage.js';
|
|
6
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
6
7
|
export const FabricSecretsListInput = z.object({
|
|
7
8
|
branch: z.string().optional(),
|
|
8
9
|
json: z.boolean().optional(),
|
|
@@ -17,9 +18,9 @@ export const FabricSecretsList = pikkuSessionlessFunc({
|
|
|
17
18
|
func: async (_services, { branch: requested, json }) => {
|
|
18
19
|
const ctx = await resolveApiContext();
|
|
19
20
|
if (!ctx.token)
|
|
20
|
-
throw new
|
|
21
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
21
22
|
if (!ctx.projectId)
|
|
22
|
-
throw new
|
|
23
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
23
24
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
24
25
|
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
25
26
|
const result = await rpc.invoke('listStageSecretNames', { stageId });
|
|
@@ -3,6 +3,7 @@ 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 { resolveStage } from '../lib/stage.js';
|
|
6
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
6
7
|
export const FabricSecretsRotateInput = z.object({
|
|
7
8
|
branch: z.string().optional(),
|
|
8
9
|
force: z.boolean().optional(),
|
|
@@ -17,9 +18,9 @@ export const FabricSecretsRotate = pikkuSessionlessFunc({
|
|
|
17
18
|
func: async (_services, { branch: requested, force }) => {
|
|
18
19
|
const ctx = await resolveApiContext();
|
|
19
20
|
if (!ctx.token)
|
|
20
|
-
throw new
|
|
21
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
21
22
|
if (!ctx.projectId)
|
|
22
|
-
throw new
|
|
23
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
23
24
|
// Resolved before the refusal, so the one message standing between a
|
|
24
25
|
// typo and unreadable secrets names the stage that would actually be
|
|
25
26
|
// rotated rather than echoing an argument that may not have been passed.
|
|
@@ -29,7 +30,7 @@ export const FabricSecretsRotate = pikkuSessionlessFunc({
|
|
|
29
30
|
// Not a confirmation for politeness — this is the one operation here
|
|
30
31
|
// that destroys access to data. Fabric cannot read the sealed values, so
|
|
31
32
|
// it cannot carry them over, and nobody can undo it afterwards.
|
|
32
|
-
throw new
|
|
33
|
+
throw new FabricPreconditionError(`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.`);
|
|
33
34
|
}
|
|
34
35
|
const result = await rpc.invoke('rotateStageSealingKey', { stageId });
|
|
35
36
|
console.log(`[fabric] retired sealing key ${result.retiredKeyId} on ${branch}`);
|
|
@@ -2,6 +2,7 @@ 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 { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
import { promptSecret } from '../lib/prompt.js';
|
|
6
7
|
import { resolveStage } from '../lib/stage.js';
|
|
7
8
|
import { seal, serializeSealedValue } from '../lib/sealed-box.js';
|
|
@@ -22,12 +23,18 @@ export const FabricSecretsSet = pikkuSessionlessFunc({
|
|
|
22
23
|
func: async (_services, { name, branch: requested, value }) => {
|
|
23
24
|
const ctx = await resolveApiContext();
|
|
24
25
|
if (!ctx.token)
|
|
25
|
-
throw new
|
|
26
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
26
27
|
if (!ctx.projectId)
|
|
27
|
-
throw new
|
|
28
|
-
|
|
28
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
29
|
+
// A value on the command line wins; otherwise the prompt, which reads
|
|
30
|
+
// piped stdin when there is no tty rather than waiting for a human who is
|
|
31
|
+
// not there. Both paths are scriptable, so neither can hang a CI job.
|
|
32
|
+
const plaintext = value ??
|
|
33
|
+
(await promptSecret(`${name} value`, {
|
|
34
|
+
nonInteractiveHint: `Pass the value with \`--value\`, or pipe it: \`echo '<value>' | pikku fabric secrets set ${name}\`.`,
|
|
35
|
+
}));
|
|
29
36
|
if (!plaintext)
|
|
30
|
-
throw new
|
|
37
|
+
throw new FabricPreconditionError('Empty secret value — aborting.');
|
|
31
38
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
32
39
|
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
33
40
|
// Fabric holds only the public half of this keypair. The private half went
|
|
@@ -11,6 +11,7 @@ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
|
11
11
|
import { findProjectRoot, readJsonSafe, } from '../../functions/validate/validate.js';
|
|
12
12
|
import { headSha, isWorkingTreeClean } from '../lib/git.js';
|
|
13
13
|
import { added, changed, dim, removed } from '../lib/output.js';
|
|
14
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
14
15
|
const DEFAULT_BUN_VERSION = 'bun@1.4.0';
|
|
15
16
|
const DEFAULT_STEP_TIMEOUT_SECONDS = 300;
|
|
16
17
|
const DEFAULT_STARTUP_TIMEOUT_SECONDS = 60;
|
|
@@ -146,7 +147,7 @@ async function waitForHealth(args) {
|
|
|
146
147
|
}
|
|
147
148
|
function rewriteFrontendCommand(command) {
|
|
148
149
|
if (command.length === 0) {
|
|
149
|
-
throw new
|
|
150
|
+
throw new FabricPreconditionError('frontend dev.command must not be empty');
|
|
150
151
|
}
|
|
151
152
|
if (command[0] === 'yarn') {
|
|
152
153
|
return {
|
|
@@ -461,7 +462,7 @@ async function createTempWorktree(root) {
|
|
|
461
462
|
timeoutMs: 60_000,
|
|
462
463
|
});
|
|
463
464
|
if (!cloneStep.ok) {
|
|
464
|
-
throw new
|
|
465
|
+
throw new FabricPreconditionError(`Failed to create temp checkout.\nworktree: ${step.tail || 'git worktree add failed.'}\nclone: ${cloneStep.tail || 'git clone failed.'}`);
|
|
465
466
|
}
|
|
466
467
|
const detachStep = await runCommandStep({
|
|
467
468
|
name: 'git checkout --detach',
|
|
@@ -471,7 +472,7 @@ async function createTempWorktree(root) {
|
|
|
471
472
|
timeoutMs: 60_000,
|
|
472
473
|
});
|
|
473
474
|
if (!detachStep.ok) {
|
|
474
|
-
throw new
|
|
475
|
+
throw new FabricPreconditionError(`Failed to detach temp checkout.\n${detachStep.tail || 'git checkout --detach failed.'}`);
|
|
475
476
|
}
|
|
476
477
|
return tempDir;
|
|
477
478
|
}
|
|
@@ -3,6 +3,7 @@ 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 { keyValue, statusColor, dim } from '../lib/output.js';
|
|
6
|
+
import { FabricPreconditionError } from '../lib/errors.js';
|
|
6
7
|
export const FabricStatusInput = z.object({});
|
|
7
8
|
export const FabricStatusOutput = z.object({
|
|
8
9
|
projectId: z.string(),
|
|
@@ -15,9 +16,9 @@ export const FabricStatus = pikkuSessionlessFunc({
|
|
|
15
16
|
func: async (_services) => {
|
|
16
17
|
const ctx = await resolveApiContext();
|
|
17
18
|
if (!ctx.token)
|
|
18
|
-
throw new
|
|
19
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
19
20
|
if (!ctx.projectId)
|
|
20
|
-
throw new
|
|
21
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
21
22
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
22
23
|
const status = await rpc.invoke('getProjectStatus', {
|
|
23
24
|
projectId: ctx.projectId,
|
|
@@ -2,6 +2,7 @@ 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 { FabricPreconditionError } from '../lib/errors.js';
|
|
5
6
|
export const FabricTraceInput = z.object({
|
|
6
7
|
branch: z.string(),
|
|
7
8
|
traceId: z.string(),
|
|
@@ -21,9 +22,9 @@ export const FabricTrace = pikkuSessionlessFunc({
|
|
|
21
22
|
func: async (_services, { branch, traceId, json }) => {
|
|
22
23
|
const ctx = await resolveApiContext();
|
|
23
24
|
if (!ctx.token)
|
|
24
|
-
throw new
|
|
25
|
+
throw new FabricPreconditionError('Not logged in. Run `pikku fabric login` first.');
|
|
25
26
|
if (!ctx.projectId)
|
|
26
|
-
throw new
|
|
27
|
+
throw new FabricPreconditionError('No fabric project linked. Run `pikku fabric link` first.');
|
|
27
28
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
28
29
|
const res = await rpc.invoke('getTraceByStageKind', {
|
|
29
30
|
projectId: ctx.projectId,
|