@pikku/cli 0.12.104 → 0.12.105
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/{abnfDiagram-VRR7QNED-DTI8lQi3.js → abnfDiagram-VRR7QNED-QRjCVsso.js} +1 -1
- package/console-app/assets/{arc-B_XK0Xbk.js → arc-CloGjkHW.js} +1 -1
- package/console-app/assets/architecture-TIHT7OUA-Cz78Qi5H.js +1 -0
- package/console-app/assets/{architectureDiagram-ZJ3FMSHR-CzE1T938.js → architectureDiagram-ZJ3FMSHR-Dl10fVqw.js} +1 -1
- package/console-app/assets/{blockDiagram-677ZJIJ3-CcSxyQZH.js → blockDiagram-677ZJIJ3-CMNoQhwm.js} +1 -1
- package/console-app/assets/{c4Diagram-LMCZKHZV-DSsAqAm5.js → c4Diagram-LMCZKHZV-C2pWYCa6.js} +1 -1
- package/console-app/assets/channel-Bm4o-pNB.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-Atv4wjmh.js → chunk-32BRIVSS-DC3ZGIPN.js} +1 -1
- package/console-app/assets/{chunk-52WLFC77-DkXgWHeH.js → chunk-52WLFC77-DuAheIlc.js} +1 -1
- package/console-app/assets/{chunk-C7G6YPKG-DhtQv4yx.js → chunk-C7G6YPKG-BVtRZIEZ.js} +1 -1
- package/console-app/assets/{chunk-EX3LRPZG-0GIQyrn1.js → chunk-EX3LRPZG-CWXF7N33.js} +1 -1
- package/console-app/assets/{chunk-FWX5IMBZ-DZvpxO7-.js → chunk-FWX5IMBZ-UN3i5qMG.js} +2 -2
- package/console-app/assets/{chunk-HOUHSVGY-CyU0q_QM.js → chunk-HOUHSVGY-DMorD8Ib.js} +1 -1
- package/console-app/assets/{chunk-ICXQ74PX-CzAIiCX5.js → chunk-ICXQ74PX-BiuzWyj2.js} +1 -1
- package/console-app/assets/{chunk-MOJQB5TN-DUKLkDFX.js → chunk-MOJQB5TN-6BhXmDyj.js} +1 -1
- package/console-app/assets/{chunk-OGEWGWER-DhmfsQT_.js → chunk-OGEWGWER-BNi3Gsmc.js} +1 -1
- package/console-app/assets/{chunk-PUDLZKDR-BMAILUQ6.js → chunk-PUDLZKDR-DNWGCeoL.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-Cpak96ZI.js → chunk-Q4XR5HBZ-i4zkt4cc.js} +1 -1
- package/console-app/assets/{chunk-RYQCIY6F-9OVlGtkS.js → chunk-RYQCIY6F-DvRUzuDz.js} +1 -1
- package/console-app/assets/{chunk-V7JOEXUC-BfBH_WMn.js → chunk-V7JOEXUC-JMjbqEgu.js} +1 -1
- package/console-app/assets/chunk-VAUOI2AC-D4_whP-t.js +1 -0
- package/console-app/assets/{chunk-VR4S4FIN-q02O9Hva.js → chunk-VR4S4FIN-BcHHugM0.js} +1 -1
- package/console-app/assets/{chunk-WYO6CB5R-cQuwndtk.js → chunk-WYO6CB5R-COKjEQwP.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-mkAF2YHU.js +1 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-2b6-Ub1z.js → chunk-ZGVPDNZ5-CENGdlFJ.js} +1 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-B2cEvfK0.js +1 -0
- package/console-app/assets/classDiagram-v2-EOCWNBFH-B2cEvfK0.js +1 -0
- package/console-app/assets/{cose-bilkent-JH36ORCC-D8cALtKZ.js → cose-bilkent-JH36ORCC-D6F1MghO.js} +1 -1
- package/console-app/assets/{cynefin-VYW2F7L2-BphwdLzc.js → cynefin-VYW2F7L2-BIhff1Ln.js} +1 -1
- package/console-app/assets/{cynefinDiagram-TSTJHNR4-7Rk31pXX.js → cynefinDiagram-TSTJHNR4-DrlBq_QP.js} +1 -1
- package/console-app/assets/{dagre-VKFMJZFB-e8-5QJxJ.js → dagre-VKFMJZFB-Cm2eP0ez.js} +1 -1
- package/console-app/assets/{diagram-FQU43EPY-SGSSyx5P.js → diagram-FQU43EPY-C667dC19.js} +1 -1
- package/console-app/assets/{diagram-G47NLZAW-F_m68BCv.js → diagram-G47NLZAW-3K3OPEuG.js} +1 -1
- package/console-app/assets/{diagram-NH7WQ7WH-5p6A3YHp.js → diagram-NH7WQ7WH-CUK-d5iT.js} +1 -1
- package/console-app/assets/{diagram-OA4YK3LP-Dv-j07Wh.js → diagram-OA4YK3LP-BmjCoGBZ.js} +1 -1
- package/console-app/assets/{diagram-WEI45ONY-1gqT-Dqp.js → diagram-WEI45ONY-D33qA2d9.js} +1 -1
- package/console-app/assets/{dist-DQ3gF-0S.js → dist-jqlCD26w.js} +1 -1
- package/console-app/assets/{ebnfDiagram-CCIWWBDH-Dsfd8DxK.js → ebnfDiagram-CCIWWBDH-DUHkt7z6.js} +1 -1
- package/console-app/assets/{erDiagram-Q63AITRT-DQ5Gu1Tw.js → erDiagram-Q63AITRT-BAtdfbq3.js} +1 -1
- package/console-app/assets/eventmodeling-45OFAUF4-iK6rmyk3.js +1 -0
- package/console-app/assets/flowDiagram-23GEKE2U-CSYhKO9Y.js +1 -0
- package/console-app/assets/{ganttDiagram-NO4QXBWP-2of9JObw.js → ganttDiagram-NO4QXBWP-64_vh9rj.js} +1 -1
- package/console-app/assets/{gitGraph-TEB2WS4Q-q2ow8moS.js → gitGraph-TEB2WS4Q-DlFJY0cQ.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-7JFgdH2Q.js → gitGraphDiagram-IHSO6WYX-D9fpmYRm.js} +1 -1
- package/console-app/assets/{index-FDk51Irw.js → index-Byf4wkdP.js} +156 -150
- package/console-app/assets/{info-DKCQHKI2-DA35x9Eq.js → info-DKCQHKI2-DhyT_-b1.js} +1 -1
- package/console-app/assets/{infoDiagram-FWYZ7A6U-wBw6slQd.js → infoDiagram-FWYZ7A6U-ufTemVSR.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-XjQC7Fmw.js → ishikawaDiagram-FXEZZL3T-CWHvEncb.js} +1 -1
- package/console-app/assets/{journeyDiagram-5HDEW3XC-DyIcpJQM.js → journeyDiagram-5HDEW3XC-DKH8UvEq.js} +1 -1
- package/console-app/assets/{kanban-definition-HUTT4EX6-B1zYF1dv.js → kanban-definition-HUTT4EX6-BODtp_fB.js} +1 -1
- package/console-app/assets/{line-C6UySSzG.js → line-Do9j3HRL.js} +1 -1
- package/console-app/assets/{linear-B-Zu24zW.js → linear-5Z8stnH-.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-Tfk1Eudy.js → mermaid-parser.core-CYJsdwMO.js} +3 -3
- package/console-app/assets/{mermaid.core-HtlOIxsD.js → mermaid.core-DwI4IdKs.js} +3 -3
- package/console-app/assets/{mindmap-definition-LN4V7U3C-5tBdCFVy.js → mindmap-definition-LN4V7U3C-D7IWNYnf.js} +1 -1
- package/console-app/assets/{packet-7NZHBO7P-CvZpWSge.js → packet-7NZHBO7P-comMLvz_.js} +1 -1
- package/console-app/assets/{pegDiagram-2B236MQR-Bw6WA3kx.js → pegDiagram-2B236MQR-CbqiI_m5.js} +1 -1
- package/console-app/assets/{pie-RZYD4A2V-cW9hD9gn.js → pie-RZYD4A2V-VZXoX73g.js} +1 -1
- package/console-app/assets/{pieDiagram-ENE6RG2P-DkD_01Ea.js → pieDiagram-ENE6RG2P-SA-sCnrt.js} +1 -1
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-Bwdtm5-W.js → quadrantDiagram-ABIIQ3AL-CI840rae.js} +1 -1
- package/console-app/assets/{radar-I7S5WNFK-tOWig5fu.js → radar-I7S5WNFK-W0UH9BdP.js} +1 -1
- package/console-app/assets/{railroad-3IZDKUUU-tZ2PcrQC.js → railroad-3IZDKUUU-_HEtbruA.js} +1 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-ghLnUEfg.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-D8JHCZD5.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-C9eC4l2D.js +1 -0
- package/console-app/assets/{railroadDiagram-RFXS5EU6-Dljzejc8.js → railroadDiagram-RFXS5EU6-Cm2SfP9Z.js} +1 -1
- package/console-app/assets/{requirementDiagram-TGXJPOKE-CRV748Vu.js → requirementDiagram-TGXJPOKE-CyHrMdrC.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-CrFvfCvp.js → sankeyDiagram-HTMAVEWB-DL0eJ1aK.js} +1 -1
- package/console-app/assets/{sequenceDiagram-DBY2YBRQ-CXysYi1c.js → sequenceDiagram-DBY2YBRQ-B2AvEvXu.js} +1 -1
- package/console-app/assets/{src-Bilm7g2t.js → src-72nNqhBu.js} +1 -1
- package/console-app/assets/{stateDiagram-2N3HPSRC-C8aGjwyh.js → stateDiagram-2N3HPSRC-vgyc-CMC.js} +1 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-B2WCkCZh.js +1 -0
- package/console-app/assets/{swimlanes-5IMT3BWC-VaTW8Eyb.js → swimlanes-5IMT3BWC-GiOMMhZh.js} +1 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CkCbtoLb.js +8 -0
- package/console-app/assets/{timeline-definition-FHXFAJF6-D88F4W4L.js → timeline-definition-FHXFAJF6-DTJQsTn8.js} +1 -1
- package/console-app/assets/{treeView-QDETBFTQ-hN0LxmWJ.js → treeView-QDETBFTQ-aizmbgl7.js} +1 -1
- package/console-app/assets/{treemap-6X3UGDF4-Cz4whnzW.js → treemap-6X3UGDF4-DIBl6bfV.js} +1 -1
- package/console-app/assets/{vennDiagram-L72KCM5P-CoW2kun8.js → vennDiagram-L72KCM5P-C4Ngu7VX.js} +1 -1
- package/console-app/assets/{wardley-OPB4EBWU-l9vWUHbB.js → wardley-OPB4EBWU-BqdXyJTm.js} +1 -1
- package/console-app/assets/{wardleyDiagram-EHGQE667-uWxnqqVK.js → wardleyDiagram-EHGQE667-Cw2M8s0p.js} +1 -1
- package/console-app/assets/{xychartDiagram-FW5EYKEG-ClVawwGR.js → xychartDiagram-FW5EYKEG-BxMLZdbF.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +12 -12
- package/dist/.pikku/agent/pikku-agent-types.gen.js +6 -6
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +4 -4
- package/dist/.pikku/channel/pikku-channel-types.gen.js +3 -2
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +13 -3
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +2 -2
- package/dist/.pikku/cli/pikku-cli-client.gen.js +2 -2
- 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-types.gen.d.ts +2 -2
- 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 +48 -4
- 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 +2 -2
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +9 -7
- package/dist/.pikku/function/pikku-function-types.gen.js +5 -4
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +95 -52
- package/dist/.pikku/function/pikku-functions.gen.js +8 -8
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +3 -3
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +4 -3
- package/dist/.pikku/mcp/pikku-mcp-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-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +4 -4
- package/dist/.pikku/pikku-services.gen.js +3 -3
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +2 -2
- 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/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -3
- 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-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/pikku-scheduler-types.gen.d.ts +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +8 -6
- package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +2 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-roles.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +5 -5
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -3
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-scopes.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +3 -2
- 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/trigger/pikku-trigger-types.gen.d.ts +3 -3
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +3 -3
- package/dist/.pikku/variables/pikku-variables.gen.js +2 -2
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +9 -9
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +3 -2
- package/dist/.pikku/workflow/pikku-personas.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +6 -6
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +3 -3
- 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/src/cli.wiring.js +50 -4
- package/dist/src/deploy/analyzer/analyzer.js +5 -5
- package/dist/src/deploy/bundler/bundler.js +2 -2
- package/dist/src/functions/commands/audit.js +33 -9
- package/dist/src/functions/commands/bootstrap.js +1 -1
- package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +3 -3
- package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
- package/dist/src/functions/commands/dev.js +29 -23
- package/dist/src/functions/commands/persona-sync.js +2 -2
- package/dist/src/functions/commands/persona.js +7 -6
- package/dist/src/functions/commands/roles-shared.d.ts +1 -1
- package/dist/src/functions/commands/roles-shared.js +1 -1
- package/dist/src/functions/commands/scenario-browser.d.ts +2 -2
- package/dist/src/functions/commands/scenario-formatter.d.ts +1 -1
- package/dist/src/functions/commands/scenario-ladder.d.ts +4 -3
- package/dist/src/functions/commands/scenario-ladder.js +1 -1
- package/dist/src/functions/commands/scenario-plan.d.ts +2 -2
- package/dist/src/functions/commands/scenario-plan.js +1 -1
- package/dist/src/functions/commands/scenario.d.ts +0 -3
- package/dist/src/functions/commands/scenario.js +40 -38
- package/dist/src/functions/commands/scopes-shared.d.ts +1 -1
- package/dist/src/functions/commands/scopes-shared.js +1 -1
- package/dist/src/functions/commands/semver-render.d.ts +2 -0
- package/dist/src/functions/commands/semver-render.js +60 -0
- package/dist/src/functions/commands/semver.d.ts +25 -0
- package/dist/src/functions/commands/semver.js +50 -0
- package/dist/src/functions/commands/serve.js +20 -19
- package/dist/src/functions/commands/start-coverage.d.ts +1 -1
- package/dist/src/functions/commands/start-coverage.js +2 -2
- package/dist/src/functions/commands/update-render.d.ts +2 -0
- package/dist/src/functions/commands/update-render.js +102 -0
- package/dist/src/functions/commands/update.d.ts +99 -0
- package/dist/src/functions/commands/update.js +392 -0
- package/dist/src/functions/commands/virtual-user-formatter.d.ts +1 -1
- package/dist/src/functions/validate/scenario-file-checks.js +1 -1
- package/dist/src/functions/validate/validate-registry.js +10 -0
- package/dist/src/functions/validate/workspace-exports-checks.d.ts +14 -0
- package/dist/src/functions/validate/workspace-exports-checks.js +211 -0
- package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent-types.js → agent/pikku-command-agent-types.js} +3 -3
- package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent.js → agent/pikku-command-agent.js} +5 -5
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.d.ts +2 -2
- package/dist/src/functions/wirings/agent/serialize-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/serialize-ai-agent-types.js → agent/serialize-agent-types.js} +21 -32
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +1 -1
- package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-scorer/pikku-command-ai-scorer.js → agent-scorer/pikku-command-agent-scorer.js} +5 -5
- package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +4 -3
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +2 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +3 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +4 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +2 -1
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +11 -12
- package/dist/src/functions/wirings/gateway/serialize-gateway-meta.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/serialize-http-types.js +3 -2
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +1 -1
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +3 -11
- package/dist/src/functions/wirings/package/serialize-package-types.js +7 -6
- package/dist/src/functions/wirings/personas/pikku-command-personas.js +1 -1
- package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +1 -1
- package/dist/src/functions/wirings/personas/serialize-personas-types.js +6 -2
- package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +2 -1
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +1 -1
- package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +1 -1
- package/dist/src/functions/wirings/roles/serialize-roles-types.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -2
- package/dist/src/functions/wirings/scenarios/scenario-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/scenario-schema-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-feature-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +2 -2
- package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +2 -1
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +3 -3
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +4 -3
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +3 -2
- package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +3 -3
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +7 -13
- package/dist/src/functions/wirings/webhook/serialize-webhook.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-personas.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-personas.js +4 -3
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +6 -9
- package/dist/src/functions/workflows/all.workflow.js +6 -5
- package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
- package/dist/src/server/node-server-runner.js +5 -2
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/utils/precise-coverage-map.d.ts +1 -1
- package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
- package/dist/src/utils/remove-legacy-scaffold-file.js +28 -1
- package/dist/src/utils/resolve-personas.d.ts +3 -3
- package/dist/src/utils/resolve-personas.js +2 -2
- package/dist/src/utils/schema-diff.d.ts +22 -0
- package/dist/src/utils/schema-diff.js +190 -0
- package/dist/src/utils/serialize-schemas.d.ts +1 -1
- package/dist/src/utils/serialize-schemas.js +1 -1
- package/dist/src/utils/surface-diff.d.ts +35 -0
- package/dist/src/utils/surface-diff.js +183 -0
- package/dist/src/utils/surface.d.ts +51 -0
- package/dist/src/utils/surface.js +156 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -17
- package/console-app/assets/architecture-TIHT7OUA-BtQ4ypaP.js +0 -1
- package/console-app/assets/channel-yWsB39zH.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-DbUlDq35.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-D0yYTMY0.js +0 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-jBNBOKfR.js +0 -1
- package/console-app/assets/classDiagram-v2-EOCWNBFH-jBNBOKfR.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-BSTAXikh.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-zX29jtvN.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-D3lzFQzK.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-DRp6_rsA.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-CuWNWp3P.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-C21qKRsf.js +0 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CCQS8jgU.js +0 -8
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +0 -1
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
- /package/dist/.pikku/schemas/schemas/{PikkuAIAgentOutput.schema.json → PikkuAgentOutput.schema.json} +0 -0
- /package/dist/.pikku/schemas/schemas/{PikkuAIScorerOutput.schema.json → PikkuAgentScorerOutput.schema.json} +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.js +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.js +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { added, changed, dim, removed, table } from '../../fabric/lib/output.js';
|
|
2
|
+
const STATUS_COLOUR = {
|
|
3
|
+
added,
|
|
4
|
+
removed,
|
|
5
|
+
modified: changed,
|
|
6
|
+
};
|
|
7
|
+
const verdictColour = (verdict) => verdict === 'major'
|
|
8
|
+
? removed(verdict)
|
|
9
|
+
: verdict === 'minor'
|
|
10
|
+
? changed(verdict)
|
|
11
|
+
: dim(verdict);
|
|
12
|
+
export const renderSemver = (_services, result) => {
|
|
13
|
+
if (result.mode === 'emit') {
|
|
14
|
+
// No `--out`: the snapshot itself is the output, so it can be redirected.
|
|
15
|
+
if (!result.written) {
|
|
16
|
+
console.log(JSON.stringify(result.surface));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const counts = [
|
|
20
|
+
`${Object.keys(result.surface.functions).length} functions`,
|
|
21
|
+
`${Object.keys(result.surface.schemas).length} schemas`,
|
|
22
|
+
].join(', ');
|
|
23
|
+
console.log(`Surface snapshot written to ${result.written} ${dim(counts)}`);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const lines = [''];
|
|
27
|
+
if (result.changes.length === 0) {
|
|
28
|
+
lines.push(`${verdictColour('patch')} no surface change against ${result.baseline}`, dim(' only internals moved'), '');
|
|
29
|
+
lines.push(dim(` written to ${result.written}`));
|
|
30
|
+
console.log(lines.join('\n'));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const rows = result.changes.map((change) => [
|
|
34
|
+
change.breaking ? removed('breaking') : dim('compatible'),
|
|
35
|
+
change.kind,
|
|
36
|
+
STATUS_COLOUR[change.status](change.status),
|
|
37
|
+
change.id,
|
|
38
|
+
change.reasons[0] ?? '',
|
|
39
|
+
]);
|
|
40
|
+
lines.push(table(['', 'Kind', 'Status', 'Id', 'Reason'], rows));
|
|
41
|
+
// Only the first reason fits the table; a function whose schema moved in
|
|
42
|
+
// several ways gets the rest listed underneath so nothing is lost to layout.
|
|
43
|
+
for (const change of result.changes) {
|
|
44
|
+
if (change.reasons.length <= 1)
|
|
45
|
+
continue;
|
|
46
|
+
lines.push('', `${change.kind} ${change.id}`);
|
|
47
|
+
for (const reason of change.reasons) {
|
|
48
|
+
lines.push(dim(` ${reason}`));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const { breaking, added: addedCount, removed: removedCount, modified, } = result.summary;
|
|
52
|
+
const summary = [
|
|
53
|
+
`${breaking} breaking`,
|
|
54
|
+
`${addedCount} added`,
|
|
55
|
+
`${removedCount} removed`,
|
|
56
|
+
`${modified} modified`,
|
|
57
|
+
].join(' ');
|
|
58
|
+
lines.push('', '─'.repeat(40), `${verdictColour(result.verdict)} against ${result.baseline}`, dim(` ${summary}`), dim(` written to ${result.written}`));
|
|
59
|
+
console.log(lines.join('\n'));
|
|
60
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Surface } from '../../utils/surface.js';
|
|
2
|
+
import { type SurfaceChanges } from '../../utils/surface-diff.js';
|
|
3
|
+
/**
|
|
4
|
+
* `pikku semver` — what does this build owe the clients of another one?
|
|
5
|
+
*
|
|
6
|
+
* The baseline is deliberately external: a deployed environment, not the
|
|
7
|
+
* previous commit. Comparing against production is what makes the answer
|
|
8
|
+
* actionable, and pointing `--against` somewhere else is how you ask the same
|
|
9
|
+
* question about staging.
|
|
10
|
+
*/
|
|
11
|
+
export type SemverInput = {
|
|
12
|
+
against?: string;
|
|
13
|
+
emit?: boolean;
|
|
14
|
+
out?: string;
|
|
15
|
+
failOn?: string;
|
|
16
|
+
};
|
|
17
|
+
export type SemverResult = {
|
|
18
|
+
mode: 'emit';
|
|
19
|
+
surface: Surface;
|
|
20
|
+
written: string | null;
|
|
21
|
+
} | ({
|
|
22
|
+
mode: 'compare';
|
|
23
|
+
written: string;
|
|
24
|
+
} & SurfaceChanges);
|
|
25
|
+
export declare const pikkuSemver: import("#pikku").PikkuFunctionConfig<SemverInput, SemverResult, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<SemverInput, SemverResult, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<SemverInput, SemverResult, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'fs';
|
|
2
|
+
import { dirname, join, resolve } from 'path';
|
|
3
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
4
|
+
import { loadManifest } from '../../utils/contract-versions.js';
|
|
5
|
+
import { loadSurface, readSurface } from '../../utils/surface.js';
|
|
6
|
+
import { computeSurfaceDiff, } from '../../utils/surface-diff.js';
|
|
7
|
+
const FAIL_LEVELS = ['major', 'minor', 'patch'];
|
|
8
|
+
// Ordered by severity, so `--fail-on minor` also fails on major.
|
|
9
|
+
const SEVERITY = { patch: 0, minor: 1, major: 2 };
|
|
10
|
+
async function currentSurface(rootDir, outDir) {
|
|
11
|
+
const manifest = await loadManifest(join(rootDir, 'versions.pikku.json'));
|
|
12
|
+
return readSurface(outDir, manifest);
|
|
13
|
+
}
|
|
14
|
+
function writeJson(path, value) {
|
|
15
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
16
|
+
writeFileSync(path, JSON.stringify(value, null, 2) + '\n', 'utf-8');
|
|
17
|
+
}
|
|
18
|
+
export const pikkuSemver = pikkuSessionlessFunc({
|
|
19
|
+
func: async ({ config }, input) => {
|
|
20
|
+
const outDir = resolve(config.rootDir, config.outDir);
|
|
21
|
+
const out = input?.out ? resolve(config.rootDir, input.out) : null;
|
|
22
|
+
if (input?.emit === true) {
|
|
23
|
+
const surface = await currentSurface(config.rootDir, outDir);
|
|
24
|
+
if (out)
|
|
25
|
+
writeJson(out, surface);
|
|
26
|
+
return { mode: 'emit', surface, written: out };
|
|
27
|
+
}
|
|
28
|
+
const against = input?.against;
|
|
29
|
+
if (!against) {
|
|
30
|
+
throw new Error("Nothing to compare against. Pass `--against <path|url>` — a `.pikku` directory, a snapshot file, or a snapshot URL — or `--emit` to produce this build's snapshot.");
|
|
31
|
+
}
|
|
32
|
+
const [before, after] = await Promise.all([
|
|
33
|
+
loadSurface(against),
|
|
34
|
+
currentSurface(config.rootDir, outDir),
|
|
35
|
+
]);
|
|
36
|
+
const changes = computeSurfaceDiff(before, after, against);
|
|
37
|
+
const changesPath = out ?? join(outDir, 'changes.gen.json');
|
|
38
|
+
writeJson(changesPath, changes);
|
|
39
|
+
const failOn = input?.failOn;
|
|
40
|
+
if (failOn) {
|
|
41
|
+
if (!FAIL_LEVELS.includes(failOn)) {
|
|
42
|
+
throw new Error(`--fail-on must be one of ${FAIL_LEVELS.join(', ')}, got '${failOn}'.`);
|
|
43
|
+
}
|
|
44
|
+
if (SEVERITY[changes.verdict] >= SEVERITY[failOn]) {
|
|
45
|
+
throw new Error(`Release is ${changes.verdict} against ${against}, at or above --fail-on ${failOn}. See ${changesPath}.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return { mode: 'compare', written: changesPath, ...changes };
|
|
49
|
+
},
|
|
50
|
+
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { join, resolve } from 'path';
|
|
2
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
|
-
import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService,
|
|
4
|
-
import {
|
|
3
|
+
import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, QueueWebhookService, } from '@pikku/core/services';
|
|
4
|
+
import { InMemoryAgentRunStateService } from '@pikku/core/ecosystem/services';
|
|
5
|
+
import { KyselyAgentStorageService, KyselyAgentRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
|
|
5
6
|
import { stopSingletonServices } from '@pikku/core';
|
|
6
7
|
import { pikkuState } from '@pikku/core/ecosystem';
|
|
7
|
-
import {
|
|
8
|
+
import { wireAgentScorerQueueWorkers } from '@pikku/core/ecosystem/agent-scorer';
|
|
8
9
|
import { LocalMetaService } from '@pikku/core/services/local-meta';
|
|
9
10
|
import { LocalContent, } from '@pikku/core/services/local-content';
|
|
10
11
|
import { InMemorySchedulerService } from '@pikku/schedule';
|
|
@@ -12,7 +13,7 @@ import { resolveDb, createKysely, parseDatabaseUrl, } from '../db/local-db.js';
|
|
|
12
13
|
import { loadUserBootstrap, loadUserModule } from './load-user-project.js';
|
|
13
14
|
import { registerScenarioInstrumentation } from '../wirings/scenarios/register-scenario-instrumentation.js';
|
|
14
15
|
import { resolveScaffoldFeature } from '../../utils/resolve-scaffold-feature.js';
|
|
15
|
-
import {
|
|
16
|
+
import { createDevAgentRunner } from './dev-agent-runner.js';
|
|
16
17
|
import { resolveConsoleMount } from './serve-console.js';
|
|
17
18
|
import { serverReadyLine } from '../../server/server-ready.js';
|
|
18
19
|
import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
|
|
@@ -75,24 +76,24 @@ export const serve = pikkuSessionlessFunc({
|
|
|
75
76
|
? new LocalContent(localContentConfig, logger, contentSigningJWT)
|
|
76
77
|
: undefined;
|
|
77
78
|
const schedulerService = new InMemorySchedulerService();
|
|
78
|
-
const
|
|
79
|
-
? new
|
|
79
|
+
const agentStorage = kysely
|
|
80
|
+
? new KyselyAgentStorageService(kysely)
|
|
80
81
|
: undefined;
|
|
81
|
-
const
|
|
82
|
-
? new
|
|
83
|
-
: new
|
|
82
|
+
const agentRunState = kysely
|
|
83
|
+
? new KyselyAgentRunStateService(kysely)
|
|
84
|
+
: new InMemoryAgentRunStateService();
|
|
84
85
|
const agentRunService = kysely
|
|
85
86
|
? new KyselyAgentRunService(kysely)
|
|
86
87
|
: undefined;
|
|
87
|
-
if (
|
|
88
|
-
await
|
|
89
|
-
if ('init' in
|
|
90
|
-
await
|
|
88
|
+
if (agentStorage)
|
|
89
|
+
await agentStorage.init();
|
|
90
|
+
if ('init' in agentRunState && typeof agentRunState.init === 'function') {
|
|
91
|
+
await agentRunState.init();
|
|
91
92
|
}
|
|
92
93
|
const devLogger = new ConsoleLogger();
|
|
93
94
|
const hasAgents = Object.keys(inspectorState.agents.agentsMeta).length > 0;
|
|
94
|
-
const
|
|
95
|
-
? await
|
|
95
|
+
const agentRunner = hasAgents
|
|
96
|
+
? await createDevAgentRunner({
|
|
96
97
|
logger,
|
|
97
98
|
projectRoot: config.rootDir,
|
|
98
99
|
variables,
|
|
@@ -102,7 +103,7 @@ export const serve = pikkuSessionlessFunc({
|
|
|
102
103
|
const serveQueueService = new InMemoryQueueService();
|
|
103
104
|
const inMemoryServices = {
|
|
104
105
|
logger: devLogger,
|
|
105
|
-
...(
|
|
106
|
+
...(agentRunner ? { agentRunner } : {}),
|
|
106
107
|
emailService: new LocalEmailService(),
|
|
107
108
|
metaService: new LocalMetaService(pikkuDir),
|
|
108
109
|
schedulerService,
|
|
@@ -111,8 +112,8 @@ export const serve = pikkuSessionlessFunc({
|
|
|
111
112
|
workflowService,
|
|
112
113
|
workflowRunService: workflowService,
|
|
113
114
|
triggerService: new InMemoryTriggerService(),
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
agentStorage,
|
|
116
|
+
agentRunState,
|
|
116
117
|
agentRunService,
|
|
117
118
|
eventHub,
|
|
118
119
|
...(kysely ? { kysely } : {}),
|
|
@@ -128,7 +129,7 @@ export const serve = pikkuSessionlessFunc({
|
|
|
128
129
|
};
|
|
129
130
|
pikkuState(null, 'package', 'singletonServices', resolvedServices);
|
|
130
131
|
resolvedServices.workflowService?.wireQueueWorkers?.();
|
|
131
|
-
|
|
132
|
+
wireAgentScorerQueueWorkers();
|
|
132
133
|
const { serverLifecycleFactory } = inspectorState.filesAndMethods;
|
|
133
134
|
const loadLifecycle = async () => {
|
|
134
135
|
if (!serverLifecycleFactory)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V8CoverageService } from '@pikku/core/services/v8-coverage';
|
|
2
|
-
import { IstanbulCoverageService } from '@pikku/core/services/istanbul-coverage';
|
|
1
|
+
import { V8CoverageService } from '@pikku/core/ecosystem/services/v8-coverage';
|
|
2
|
+
import { IstanbulCoverageService } from '@pikku/core/ecosystem/services/istanbul-coverage';
|
|
3
3
|
import { registerBunCoverageLoader } from './bun-coverage-loader.js';
|
|
4
4
|
import { mapPreciseCoverage, mapLineHitsToReport, } from '../../utils/precise-coverage-map.js';
|
|
5
5
|
const isBunRuntime = () => typeof globalThis.Bun !== 'undefined';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { added, changed, dim, removed, table } from '../../fabric/lib/output.js';
|
|
2
|
+
const STATUS_LABEL = {
|
|
3
|
+
current: dim('current'),
|
|
4
|
+
outdated: changed('outdated'),
|
|
5
|
+
'stale-install': changed('stale install'),
|
|
6
|
+
linked: dim('linked'),
|
|
7
|
+
manual: dim('manual'),
|
|
8
|
+
unresolved: removed('unresolved'),
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A linked package is a deliberate local checkout, not a decision waiting on
|
|
12
|
+
* the user — so it is counted but never listed. Listing it buries the two rows
|
|
13
|
+
* that matter under twenty that don't, which is what a monorepo run looks like.
|
|
14
|
+
*/
|
|
15
|
+
const QUIET = ['current', 'linked'];
|
|
16
|
+
export const renderUpdate = (_services, result) => {
|
|
17
|
+
const { entries, peers, summary, applied } = result;
|
|
18
|
+
if (entries.length === 0) {
|
|
19
|
+
console.log(dim('No @pikku/* dependencies found.'));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const multiManifest = new Set(entries.map((entry) => entry.manifest)).size > 1;
|
|
23
|
+
const interesting = entries.filter((entry) => !QUIET.includes(entry.status));
|
|
24
|
+
const rows = (interesting.length > 0 ? interesting : entries).map((entry) => [
|
|
25
|
+
entry.package,
|
|
26
|
+
entry.range,
|
|
27
|
+
entry.installed ?? dim('—'),
|
|
28
|
+
entry.latest ?? dim('—'),
|
|
29
|
+
entry.target ? added(entry.target) : dim('—'),
|
|
30
|
+
STATUS_LABEL[entry.status],
|
|
31
|
+
...(multiManifest ? [dim(entry.manifest)] : []),
|
|
32
|
+
]);
|
|
33
|
+
console.log(table([
|
|
34
|
+
'Package',
|
|
35
|
+
'Range',
|
|
36
|
+
'Installed',
|
|
37
|
+
'Latest',
|
|
38
|
+
applied ? 'Written' : 'Update to',
|
|
39
|
+
'Status',
|
|
40
|
+
...(multiManifest ? ['Manifest'] : []),
|
|
41
|
+
], rows));
|
|
42
|
+
for (const entry of entries) {
|
|
43
|
+
if (entry.reason &&
|
|
44
|
+
entry.status !== 'stale-install' &&
|
|
45
|
+
!QUIET.includes(entry.status)) {
|
|
46
|
+
console.log(`${dim('•')} ${entry.package}: ${dim(entry.reason)}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (peers.length > 0) {
|
|
50
|
+
console.log();
|
|
51
|
+
console.log(changed(`${peers.length} unsatisfied peer requirement(s):`));
|
|
52
|
+
for (const peer of peers) {
|
|
53
|
+
const has = peer.found
|
|
54
|
+
? `has ${peer.found}${peer.resolved ? dim(` (${peer.resolved})`) : ''}`
|
|
55
|
+
: removed('not declared');
|
|
56
|
+
console.log(` ${peer.package} needs ${peer.peer}@${peer.required} — ${has}`);
|
|
57
|
+
}
|
|
58
|
+
if (!applied && peers.some((peer) => peer.found)) {
|
|
59
|
+
console.log(dim(' run with --update-peers to write the ranges you already declare'));
|
|
60
|
+
}
|
|
61
|
+
if (peers.some((peer) => !peer.found)) {
|
|
62
|
+
console.log(dim(' a peer you do not declare is yours to add — update never adds one'));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
console.log('─'.repeat(40));
|
|
66
|
+
const counts = [
|
|
67
|
+
dim(`${summary.checked} @pikku dependenc${summary.checked === 1 ? 'y' : 'ies'}`),
|
|
68
|
+
];
|
|
69
|
+
if (summary.outdated > 0)
|
|
70
|
+
counts.push(changed(`${summary.outdated} outdated`));
|
|
71
|
+
if (summary.staleInstall > 0)
|
|
72
|
+
counts.push(changed(`${summary.staleInstall} stale install`));
|
|
73
|
+
if (summary.linked > 0)
|
|
74
|
+
counts.push(dim(`${summary.linked} linked`));
|
|
75
|
+
if (summary.manual > 0)
|
|
76
|
+
counts.push(dim(`${summary.manual} manual`));
|
|
77
|
+
if (summary.unresolved > 0)
|
|
78
|
+
counts.push(removed(`${summary.unresolved} unresolved`));
|
|
79
|
+
console.log(counts.join(' '));
|
|
80
|
+
if (applied) {
|
|
81
|
+
if (result.written.length === 0) {
|
|
82
|
+
console.log(added('✓') + ' ' + dim('nothing to write — already current'));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
console.log(added('✓') +
|
|
86
|
+
` ${result.written.length} package.json file${result.written.length !== 1 ? 's' : ''} updated`);
|
|
87
|
+
console.log(result.installed
|
|
88
|
+
? added('✓') +
|
|
89
|
+
' ' +
|
|
90
|
+
dim(`${result.packageManager} install completed`)
|
|
91
|
+
: dim(result.packageManager === 'unknown'
|
|
92
|
+
? ' no lockfile found — install with your package manager'
|
|
93
|
+
: ` skipped install — run \`${result.packageManager} install\``));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else if (summary.outdated > 0 || summary.staleInstall > 0) {
|
|
97
|
+
console.log(dim(' run `pikku update --update` to apply'));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
console.log(added('✓') + ' ' + dim('every @pikku dependency is current'));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export type PackageManager = 'bun' | 'npm' | 'yarn' | 'pnpm' | 'unknown';
|
|
2
|
+
export type DependencyField = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
|
|
3
|
+
export type UpdateStatus = 'current' | 'outdated' | 'stale-install' | 'linked' | 'manual' | 'unresolved';
|
|
4
|
+
export type UpdateEntry = {
|
|
5
|
+
package: string;
|
|
6
|
+
/** package.json holding the range, relative to the project root. */
|
|
7
|
+
manifest: string;
|
|
8
|
+
field: DependencyField;
|
|
9
|
+
range: string;
|
|
10
|
+
/** Version resolved in node_modules, when the project has been installed. */
|
|
11
|
+
installed: string | null;
|
|
12
|
+
latest: string | null;
|
|
13
|
+
/** The range `--update` would write, or null when there is nothing to write. */
|
|
14
|
+
target: string | null;
|
|
15
|
+
status: UpdateStatus;
|
|
16
|
+
reason?: string;
|
|
17
|
+
};
|
|
18
|
+
export type PeerFinding = {
|
|
19
|
+
/** The @pikku package that declares the peer. */
|
|
20
|
+
package: string;
|
|
21
|
+
peer: string;
|
|
22
|
+
required: string;
|
|
23
|
+
/** The range the project declares for the peer, or null when it declares none. */
|
|
24
|
+
found: string | null;
|
|
25
|
+
resolved: string | null;
|
|
26
|
+
manifest: string;
|
|
27
|
+
optional: boolean;
|
|
28
|
+
/** The range `--update-peers` would write. */
|
|
29
|
+
target: string;
|
|
30
|
+
};
|
|
31
|
+
export type UpdateResult = {
|
|
32
|
+
root: string;
|
|
33
|
+
registry: string;
|
|
34
|
+
tag: string;
|
|
35
|
+
packageManager: PackageManager;
|
|
36
|
+
entries: UpdateEntry[];
|
|
37
|
+
peers: PeerFinding[];
|
|
38
|
+
applied: boolean;
|
|
39
|
+
/** Manifests rewritten by `--update`, relative to the project root. */
|
|
40
|
+
written: string[];
|
|
41
|
+
installed: boolean;
|
|
42
|
+
summary: {
|
|
43
|
+
checked: number;
|
|
44
|
+
outdated: number;
|
|
45
|
+
staleInstall: number;
|
|
46
|
+
linked: number;
|
|
47
|
+
manual: number;
|
|
48
|
+
unresolved: number;
|
|
49
|
+
peerIssues: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type UpdateInput = {
|
|
53
|
+
update?: boolean;
|
|
54
|
+
updatePeers?: boolean;
|
|
55
|
+
install?: boolean;
|
|
56
|
+
tag?: string;
|
|
57
|
+
registry?: string;
|
|
58
|
+
};
|
|
59
|
+
export type Packument = {
|
|
60
|
+
'dist-tags'?: Record<string, string>;
|
|
61
|
+
versions?: Record<string, {
|
|
62
|
+
peerDependencies?: Record<string, string>;
|
|
63
|
+
peerDependenciesMeta?: Record<string, {
|
|
64
|
+
optional?: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
68
|
+
export type FetchPackument = (name: string) => Promise<Packument | null>;
|
|
69
|
+
/** The range `--update` writes for `latest`, or null when the range is not ours to move. */
|
|
70
|
+
export declare const rewriteRange: (range: string, latest: string) => string | null;
|
|
71
|
+
export declare const findProjectRoot: (startDir: string, exists?: (path: string) => boolean) => string;
|
|
72
|
+
/**
|
|
73
|
+
* Where `install` has to run: the nearest directory at or above the project
|
|
74
|
+
* root that says which package manager owns the tree. In a monorepo that is the
|
|
75
|
+
* workspace root, not the package the command was invoked in.
|
|
76
|
+
*
|
|
77
|
+
* The corepack `packageManager` field wins over lockfiles — it states intent
|
|
78
|
+
* before a lockfile exists, and a project can carry a stale one from another
|
|
79
|
+
* tool. Guessing wrong is not a soft failure: the install spawns a binary that
|
|
80
|
+
* isn't on PATH.
|
|
81
|
+
*/
|
|
82
|
+
export declare const findInstallRoot: (root: string, exists?: (path: string) => boolean, read?: (path: string) => any | null) => {
|
|
83
|
+
dir: string;
|
|
84
|
+
packageManager: PackageManager;
|
|
85
|
+
};
|
|
86
|
+
/** Every package.json the run covers: the project root, plus its workspaces. */
|
|
87
|
+
export declare const collectManifestPaths: (root: string) => Promise<string[]>;
|
|
88
|
+
/** Version resolved in node_modules, walking up from the manifest's own directory. */
|
|
89
|
+
export declare const resolveInstalled: (manifestDir: string, name: string, read?: (path: string) => any | null) => string | null;
|
|
90
|
+
export declare const runUpdate: ({ rootDir, apply, updatePeers, install, tag, registry, fetchPackument, }: {
|
|
91
|
+
rootDir: string;
|
|
92
|
+
apply: boolean;
|
|
93
|
+
updatePeers: boolean;
|
|
94
|
+
install: boolean;
|
|
95
|
+
tag: string;
|
|
96
|
+
registry: string;
|
|
97
|
+
fetchPackument?: FetchPackument;
|
|
98
|
+
}) => Promise<UpdateResult>;
|
|
99
|
+
export declare const pikkuUpdate: import("#pikku").PikkuFunctionConfig<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|