@pikku/cli 0.12.104 → 0.12.107
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/CHANGELOG.md +7306 -0
- package/console-app/assets/abnfDiagram-N423BO3Z-C5uToS9v.js +1 -0
- package/console-app/assets/arc-D8VmsdJb.js +1 -0
- package/console-app/assets/architecture-TIHT7OUA-B1IpeRpl.js +1 -0
- package/console-app/assets/architectureDiagram-T3A2C74G-BzJDRfv4.js +36 -0
- package/console-app/assets/{blockDiagram-677ZJIJ3-CcSxyQZH.js → blockDiagram-VBNYF7ZC-X5G9Ch-D.js} +5 -5
- package/console-app/assets/c4Diagram-5PPSVZJV-B59aO2Sc.js +10 -0
- package/console-app/assets/channel-sTJGzqn9.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-Atv4wjmh.js → chunk-2GRJ4B5K-Bwe32j_R.js} +1 -1
- package/console-app/assets/{chunk-HOUHSVGY-CyU0q_QM.js → chunk-4I5QYGJK-Beg_uQQN.js} +1 -1
- package/console-app/assets/chunk-5RXB4S5H-0HaMiv3k.js +231 -0
- package/console-app/assets/{chunk-MOJQB5TN-DUKLkDFX.js → chunk-6Q2QTUOP-CXxkExOq.js} +1 -1
- package/console-app/assets/chunk-7Z6QIM7H-zUqPbrvp.js +10 -0
- package/console-app/assets/{chunk-V7JOEXUC-BfBH_WMn.js → chunk-GF5L2VYU-CY0wGPcJ.js} +3 -3
- package/console-app/assets/chunk-I66GZJ75-BP5UNkJY.js +127 -0
- package/console-app/assets/chunk-JQJVKLGR-3dvnUUZN.js +156 -0
- package/console-app/assets/{chunk-VR4S4FIN-q02O9Hva.js → chunk-KBJHAD2P-ChD7o2bf.js} +1 -1
- package/console-app/assets/{chunk-KEIR6QF5-DNzq6p3w.js → chunk-KEIR6QF5-BICK3FdT.js} +32 -32
- package/console-app/assets/chunk-NSK5VX7P-oG1nh33f.js +2 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-2b6-Ub1z.js → chunk-QR6OTTB3-D_uKJrj6.js} +3 -3
- package/console-app/assets/chunk-RYQCIY6F-CtYhP8W5.js +1 -0
- package/console-app/assets/chunk-UBXNYLIW-CMgD3fvL.js +1 -0
- package/console-app/assets/{chunk-C7G6YPKG-DhtQv4yx.js → chunk-W5SLKNZC-cjI56NCs.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-Cpak96ZI.js → chunk-WRU74C26-BQqHgerX.js} +7 -7
- package/console-app/assets/chunk-XXDRQBXY-CLdTtHL4.js +1 -0
- package/console-app/assets/classDiagram-JCYQIIEL-Dh0wx8TK.js +1 -0
- package/console-app/assets/classDiagram-v2-OCEON4UE-Dh0wx8TK.js +1 -0
- package/console-app/assets/cose-bilkent-JH36ORCC-DcHzDpDb.js +1 -0
- package/console-app/assets/cynefin-VYW2F7L2-Cn2zn-8-.js +1 -0
- package/console-app/assets/cynefinDiagram-MW4NZA55-C00zINdu.js +62 -0
- package/console-app/assets/cytoscape.esm-B-NFISlW.js +321 -0
- package/console-app/assets/dagre-DE2imcyX.js +1 -0
- package/console-app/assets/dagre-VZM6K2ZE-Bb2uZ7tL.js +4 -0
- package/console-app/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/console-app/assets/{diagram-OA4YK3LP-Dv-j07Wh.js → diagram-7IWD3JNH-DUN-JIa1.js} +3 -3
- package/console-app/assets/{diagram-FQU43EPY-SGSSyx5P.js → diagram-B4RE2ZJO-Ct5iRFhI.js} +1 -1
- package/console-app/assets/diagram-LBJQPF4R-BZ2Hrr-9.js +24 -0
- package/console-app/assets/diagram-Q27KOJAE-BHaThj6T.js +24 -0
- package/console-app/assets/diagram-UB23O5K3-CH-SzBoh.js +41 -0
- package/console-app/assets/dist-CsdsWTxp.js +1 -0
- package/console-app/assets/ebnfDiagram-BXEA7PRR-BkjeNaQH.js +1 -0
- package/console-app/assets/{erDiagram-Q63AITRT-DQ5Gu1Tw.js → erDiagram-JOGREHBK-BdL77bY3.js} +3 -3
- package/console-app/assets/eventmodeling-45OFAUF4-C6PNVeIU.js +1 -0
- package/console-app/assets/flowDiagram-UKHOOZJN-CmURPvo2.js +1 -0
- package/console-app/assets/ganttDiagram-PKOTCBZU-DfgO68Ez.js +292 -0
- package/console-app/assets/gitGraph-TEB2WS4Q-BNbepAzP.js +1 -0
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-7JFgdH2Q.js → gitGraphDiagram-DS77QQ5N-Crb8obGB.js} +4 -4
- package/console-app/assets/graphlib-IlWVLY3o.js +1 -0
- package/console-app/assets/index-Dsydm-nw.css +1 -0
- package/console-app/assets/index-g8jA8DJo.js +290 -0
- package/console-app/assets/info-DKCQHKI2-D9tXUXel.js +1 -0
- package/console-app/assets/infoDiagram-6WML65LV-BvG8ufLa.js +2 -0
- package/console-app/assets/init-C-OQMol4.js +1 -0
- package/console-app/assets/isUndefined-T4snU1Mx.js +1 -0
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-XjQC7Fmw.js → ishikawaDiagram-WSZJBQD7-BWoGxEjO.js} +3 -3
- package/console-app/assets/{journeyDiagram-5HDEW3XC-DyIcpJQM.js → journeyDiagram-NVQOT4AX-CR4YcPHg.js} +3 -3
- package/console-app/assets/{kanban-definition-HUTT4EX6-B1zYF1dv.js → kanban-definition-27J2QSJJ-DYfc5EZe.js} +6 -6
- package/console-app/assets/{katex-Vhh-h91d.js → katex-CXMH3UgJ.js} +3 -3
- package/console-app/assets/{line-C6UySSzG.js → line-NIaf8Mfw.js} +1 -1
- package/console-app/assets/linear-DB_1BE-l.js +1 -0
- package/console-app/assets/map-BmPfXn7V.js +1 -0
- package/console-app/assets/{mermaid-parser.core-Tfk1Eudy.js → mermaid-parser.core-BqCVMHRZ.js} +3 -3
- package/console-app/assets/mermaid.core-CYaeERjF.js +42 -0
- package/console-app/assets/{mindmap-definition-LN4V7U3C-5tBdCFVy.js → mindmap-definition-FAOFIHXS-BCjT2v4F.js} +3 -3
- package/console-app/assets/{ordinal-hYBb2elL.js → ordinal-BDEzSJ7C.js} +1 -1
- package/console-app/assets/packet-7NZHBO7P-CzFZvntp.js +1 -0
- package/console-app/assets/path-fybaL0A-.js +1 -0
- package/console-app/assets/pegDiagram-VL7TDLO6-3iMotW64.js +1 -0
- package/console-app/assets/pie-RZYD4A2V-CXIoUTJn.js +1 -0
- package/console-app/assets/pieDiagram-7S7Q4E2Y-B-EOKkdd.js +39 -0
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-Bwdtm5-W.js → quadrantDiagram-CIZ2JOQS-DDdq8l2N.js} +2 -2
- package/console-app/assets/radar-I7S5WNFK-9SLSkJ73.js +1 -0
- package/console-app/assets/railroad-3IZDKUUU-DdJ88Ord.js +1 -0
- package/console-app/assets/railroad-abnf-AHOZXSZD-D2QiLT8B.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-CSMqj9L2.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-Cg1-F8im.js +1 -0
- package/console-app/assets/railroadDiagram-AXF67PYL-BMW_s9QW.js +1 -0
- package/console-app/assets/{requirementDiagram-TGXJPOKE-CRV748Vu.js → requirementDiagram-LRYGKXZP-BzcnEvjk.js} +2 -2
- package/console-app/assets/rolldown-runtime-BcKkbAw3.js +1 -0
- package/console-app/assets/{rough.esm-CSKSodPl.js → rough.esm-Dy-Kn_BL.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-CrFvfCvp.js → sankeyDiagram-W5VNT64P-Dh2TFvuG.js} +2 -2
- package/console-app/assets/sequenceDiagram-SI44F4Z6-b-m-tQYz.js +162 -0
- package/console-app/assets/src-Dm8O0hiD.js +1 -0
- package/console-app/assets/stateDiagram-OKZ733FA-W98kCkqj.js +1 -0
- package/console-app/assets/stateDiagram-v2-UEYNNEHI-DpnoMNHC.js +1 -0
- package/console-app/assets/swimlanes-SLNWSIFB-0q_y6cLu.js +2 -0
- package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BmGtOaWo.js +8 -0
- package/console-app/assets/timeline-definition-Z64GVDOM-DmsNlhwe.js +120 -0
- package/console-app/assets/treeView-QDETBFTQ-DY7A9uJm.js +1 -0
- package/console-app/assets/treemap-6X3UGDF4-DI73Vm90.js +1 -0
- package/console-app/assets/vennDiagram-T6HMQDX7-Czpr9diJ.js +34 -0
- package/console-app/assets/wardley-OPB4EBWU-C39AmDqd.js +1 -0
- package/console-app/assets/{wardleyDiagram-EHGQE667-uWxnqqVK.js → wardleyDiagram-T6FBY63Y-DOtWBvnk.js} +36 -36
- package/console-app/assets/{xychartDiagram-FW5EYKEG-ClVawwGR.js → xychartDiagram-ELKLHX3M-VHHuGrWV.js} +4 -4
- package/console-app/index.html +4 -2
- package/dist/.pikku/addon/index.d.ts +7 -0
- package/dist/.pikku/addon/index.js +7 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +7 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.js +7 -0
- package/dist/.pikku/agent/index.d.ts +7 -0
- package/dist/.pikku/agent/index.js +7 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +14 -13
- package/dist/.pikku/agent/pikku-agent-types.gen.js +5 -6
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +2 -2
- package/dist/.pikku/auth/index.d.ts +8 -0
- package/dist/.pikku/auth/index.js +8 -0
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +118 -0
- package/dist/.pikku/auth/pikku-auth-types.gen.js +92 -0
- package/dist/.pikku/channel/index.d.ts +7 -0
- package/dist/.pikku/channel/index.js +7 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +6 -8
- package/dist/.pikku/channel/pikku-channel-types.gen.js +2 -9
- package/dist/.pikku/cli/index.d.ts +7 -0
- package/dist/.pikku/cli/index.js +7 -0
- package/dist/.pikku/cli/pikku-cli-channel.js +14 -3
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- 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 +3 -2
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +86 -22
- 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 +1 -1
- package/dist/.pikku/console/index.d.ts +1 -0
- package/dist/.pikku/console/index.js +1 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/error/index.d.ts +7 -0
- package/dist/.pikku/error/index.js +7 -0
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +7 -0
- package/dist/.pikku/error/pikku-error-types.gen.js +7 -0
- package/dist/.pikku/function/index.d.ts +7 -0
- package/dist/.pikku/function/index.js +7 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +26 -258
- package/dist/.pikku/function/pikku-function-types.gen.js +2 -236
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +193 -128
- package/dist/.pikku/function/pikku-functions.gen.js +14 -12
- package/dist/.pikku/gateway/index.d.ts +7 -0
- package/dist/.pikku/gateway/index.js +7 -0
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +36 -0
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +25 -0
- package/dist/.pikku/http/index.d.ts +7 -0
- package/dist/.pikku/http/index.js +7 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +4 -22
- package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
- package/dist/.pikku/mcp/index.d.ts +7 -0
- package/dist/.pikku/mcp/index.js +7 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +7 -4
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/middleware/index.d.ts +7 -0
- package/dist/.pikku/middleware/index.js +7 -0
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +117 -0
- package/dist/.pikku/middleware/pikku-middleware-types.gen.js +108 -0
- package/dist/.pikku/node/index.d.ts +1 -0
- package/dist/.pikku/node/index.js +1 -0
- 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/index.d.ts +7 -0
- package/dist/.pikku/queue/index.js +7 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +8 -5
- package/dist/.pikku/scenarios/index.d.ts +7 -0
- package/dist/.pikku/scenarios/index.js +7 -0
- package/dist/.pikku/scenarios/pikku-personas.gen.d.ts +17 -0
- package/dist/.pikku/scenarios/pikku-personas.gen.js +17 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +2 -2
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +310 -0
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.js +71 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +2 -2
- 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 +7 -0
- package/dist/.pikku/scheduler/index.js +7 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +3 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +9 -7
- package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
- package/dist/.pikku/scopes/index.d.ts +7 -0
- package/dist/.pikku/scopes/index.js +7 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +5 -13
- 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 -3
- 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 +8 -0
- package/dist/.pikku/secrets/index.js +8 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +8 -12
- package/dist/.pikku/secrets/pikku-secrets.gen.js +7 -9
- package/dist/.pikku/services/pikku-meta-service.gen.d.ts +7 -0
- package/dist/.pikku/services/pikku-meta-service.gen.js +9 -0
- package/dist/.pikku/setup/index.d.ts +7 -0
- package/dist/.pikku/setup/index.js +7 -0
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +66 -0
- package/dist/.pikku/setup/pikku-setup-types.gen.js +87 -0
- package/dist/.pikku/trigger/index.d.ts +7 -0
- package/dist/.pikku/trigger/index.js +7 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +6 -6
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/index.d.ts +8 -0
- package/dist/.pikku/variables/index.js +8 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +7 -10
- package/dist/.pikku/variables/pikku-variables.gen.js +8 -10
- package/dist/.pikku/workflow/index.d.ts +7 -0
- package/dist/.pikku/workflow/index.js +7 -0
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +105 -82
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +1 -2
- package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +21 -263
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +2 -65
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +0 -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 +69 -7
- package/dist/src/deploy/analyzer/analyzer.js +39 -17
- package/dist/src/deploy/build-pipeline.d.ts +13 -0
- package/dist/src/deploy/build-pipeline.js +22 -0
- package/dist/src/deploy/bundler/bundler.js +2 -2
- package/dist/src/deploy/server-entry.js +1 -1
- package/dist/src/fabric/fabric-commands.d.ts +104 -104
- package/dist/src/fabric/functions/add.function.d.ts +4 -4
- package/dist/src/fabric/functions/add.function.js +1 -1
- package/dist/src/fabric/functions/addon-verify.function.d.ts +4 -4
- package/dist/src/fabric/functions/addon-verify.function.js +1 -1
- package/dist/src/fabric/functions/db-schema.function.d.ts +4 -4
- package/dist/src/fabric/functions/db-schema.function.js +1 -1
- package/dist/src/fabric/functions/deploy-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/deploy-list.function.js +1 -1
- package/dist/src/fabric/functions/deploy-units.function.d.ts +4 -4
- package/dist/src/fabric/functions/deploy-units.function.js +1 -1
- package/dist/src/fabric/functions/deploy.function.d.ts +8 -8
- package/dist/src/fabric/functions/deploy.function.js +1 -1
- package/dist/src/fabric/functions/domains-add.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-add.function.js +1 -1
- package/dist/src/fabric/functions/domains-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-list.function.js +1 -1
- package/dist/src/fabric/functions/domains-remove.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-remove.function.js +1 -1
- package/dist/src/fabric/functions/errors.function.d.ts +4 -4
- package/dist/src/fabric/functions/errors.function.js +1 -1
- package/dist/src/fabric/functions/init.function.d.ts +4 -4
- package/dist/src/fabric/functions/init.function.js +1 -1
- package/dist/src/fabric/functions/link.function.d.ts +4 -4
- package/dist/src/fabric/functions/link.function.js +1 -1
- package/dist/src/fabric/functions/llm-key.function.d.ts +4 -4
- package/dist/src/fabric/functions/llm-key.function.js +1 -1
- package/dist/src/fabric/functions/login.function.d.ts +4 -4
- package/dist/src/fabric/functions/login.function.js +1 -1
- package/dist/src/fabric/functions/logs.function.d.ts +4 -4
- package/dist/src/fabric/functions/logs.function.js +1 -1
- package/dist/src/fabric/functions/metrics.function.d.ts +4 -4
- package/dist/src/fabric/functions/metrics.function.js +1 -1
- package/dist/src/fabric/functions/publish.function.d.ts +4 -4
- package/dist/src/fabric/functions/publish.function.js +1 -1
- package/dist/src/fabric/functions/rollback.function.d.ts +4 -4
- package/dist/src/fabric/functions/rollback.function.js +1 -1
- package/dist/src/fabric/functions/secrets-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-list.function.js +1 -1
- package/dist/src/fabric/functions/secrets-rotate.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-rotate.function.js +1 -1
- package/dist/src/fabric/functions/secrets-set.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-set.function.js +1 -1
- package/dist/src/fabric/functions/smoke.function.d.ts +4 -4
- package/dist/src/fabric/functions/smoke.function.js +13 -13
- package/dist/src/fabric/functions/status.function.d.ts +4 -4
- package/dist/src/fabric/functions/status.function.js +1 -1
- package/dist/src/fabric/functions/trace.function.d.ts +4 -4
- package/dist/src/fabric/functions/trace.function.js +1 -1
- package/dist/src/fabric/functions/validate.function.d.ts +4 -4
- package/dist/src/fabric/functions/validate.function.js +90 -27
- package/dist/src/fabric/lib/git.d.ts +23 -0
- package/dist/src/fabric/lib/git.js +39 -0
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/all.js +1 -1
- package/dist/src/functions/commands/audit.d.ts +11 -1
- package/dist/src/functions/commands/audit.js +59 -23
- package/dist/src/functions/commands/binary.d.ts +4 -4
- package/dist/src/functions/commands/binary.js +1 -1
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +5 -4
- package/dist/src/functions/commands/bun-coverage-loader.js +4 -1
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-audit.js +1 -1
- package/dist/src/functions/commands/db-baseline.d.ts +1 -1
- package/dist/src/functions/commands/db-baseline.js +1 -1
- package/dist/src/functions/commands/db-check.d.ts +1 -1
- package/dist/src/functions/commands/db-check.js +1 -1
- package/dist/src/functions/commands/db-codegen.d.ts +1 -1
- package/dist/src/functions/commands/db-codegen.js +1 -1
- package/dist/src/functions/commands/db-export.d.ts +1 -1
- package/dist/src/functions/commands/db-export.js +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.js +1 -1
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-migrate.js +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +4 -4
- package/dist/src/functions/commands/db-reset.js +1 -1
- package/dist/src/functions/commands/deploy-apply.d.ts +4 -4
- package/dist/src/functions/commands/deploy-apply.js +14 -2
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-info.js +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +4 -4
- package/dist/src/functions/commands/deploy-plan.js +6 -2
- package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +5 -4
- package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
- package/dist/src/functions/commands/dev.d.ts +4 -4
- package/dist/src/functions/commands/dev.js +32 -25
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/emails-init.js +19 -6
- package/dist/src/functions/commands/enable.d.ts +8 -8
- package/dist/src/functions/commands/enable.js +4 -2
- package/dist/src/functions/commands/environment.d.ts +27 -0
- package/dist/src/functions/commands/environment.js +36 -2
- package/dist/src/functions/commands/import-n8n.d.ts +4 -4
- package/dist/src/functions/commands/import-n8n.js +1 -1
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/info.js +1 -1
- package/dist/src/functions/commands/knowledge-index.d.ts +4 -4
- package/dist/src/functions/commands/knowledge-index.js +1 -1
- package/dist/src/functions/commands/knowledge-validate.d.ts +4 -4
- package/dist/src/functions/commands/knowledge-validate.js +1 -1
- package/dist/src/functions/commands/login.d.ts +9 -9
- package/dist/src/functions/commands/login.js +1 -1
- package/dist/src/functions/commands/meta.d.ts +37 -37
- package/dist/src/functions/commands/meta.js +1 -1
- package/dist/src/functions/commands/new-addon.d.ts +5 -4
- package/dist/src/functions/commands/new-addon.js +27 -25
- package/dist/src/functions/commands/new-function.d.ts +4 -4
- package/dist/src/functions/commands/new-function.js +4 -4
- package/dist/src/functions/commands/new-middleware.d.ts +4 -4
- package/dist/src/functions/commands/new-middleware.js +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +4 -4
- package/dist/src/functions/commands/new-permission.js +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +4 -4
- package/dist/src/functions/commands/new-wiring.js +8 -8
- package/dist/src/functions/commands/persona-sync.d.ts +4 -4
- package/dist/src/functions/commands/persona-sync.js +1 -1
- package/dist/src/functions/commands/persona.d.ts +5 -5
- package/dist/src/functions/commands/persona.js +6 -6
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-bootstrap.js +7 -2
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.js +2 -2
- package/dist/src/functions/commands/roles-audit.d.ts +1 -1
- package/dist/src/functions/commands/roles-audit.js +1 -1
- package/dist/src/functions/commands/roles-prune.d.ts +4 -4
- package/dist/src/functions/commands/roles-prune.js +1 -1
- package/dist/src/functions/commands/scenario-browser.d.ts +18 -12
- package/dist/src/functions/commands/scenario-browser.js +20 -6
- package/dist/src/functions/commands/scenario-formatter.d.ts +6 -52
- package/dist/src/functions/commands/scenario-ladder.d.ts +4 -4
- package/dist/src/functions/commands/scenario.d.ts +8 -11
- package/dist/src/functions/commands/scenario.js +107 -55
- package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
- package/dist/src/functions/commands/scopes-audit.js +1 -1
- package/dist/src/functions/commands/scopes-prune.d.ts +4 -4
- package/dist/src/functions/commands/scopes-prune.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.d.ts +4 -4
- package/dist/src/functions/commands/serve.js +25 -22
- package/dist/src/functions/commands/skills.d.ts +8 -8
- package/dist/src/functions/commands/skills.js +1 -1
- 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/validate.d.ts +4 -4
- package/dist/src/functions/commands/validate.js +1 -1
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-check.js +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +4 -4
- package/dist/src/functions/commands/versions-init.js +1 -1
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/versions-update.js +1 -1
- package/dist/src/functions/commands/watch.d.ts +4 -4
- package/dist/src/functions/commands/watch.js +1 -1
- package/dist/src/functions/db/annotation-parser.d.ts +11 -3
- package/dist/src/functions/db/better-auth-schema.js +1 -1
- package/dist/src/functions/db/db-codegen.js +4 -2
- package/dist/src/functions/db/local-db.js +3 -3
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/fetch/index.js +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.js +1 -1
- package/dist/src/functions/surface/build-surface-doc.d.ts +22 -0
- package/dist/src/functions/surface/build-surface-doc.js +151 -0
- package/dist/src/functions/surface/collect-surface-usage.d.ts +16 -0
- package/dist/src/functions/surface/collect-surface-usage.js +35 -0
- package/dist/src/functions/surface/collect-surface.d.ts +19 -1
- package/dist/src/functions/surface/collect-surface.js +104 -16
- package/dist/src/functions/surface/generate-surface-doc.d.ts +1 -0
- package/dist/src/functions/surface/generate-surface-doc.js +46 -0
- package/dist/src/functions/surface/shipped-surface-doc.d.ts +16 -0
- package/dist/src/functions/surface/shipped-surface-doc.js +44 -0
- package/dist/src/functions/surface/surface-doc.types.d.ts +69 -0
- package/dist/src/functions/surface/surface-doc.types.js +1 -0
- package/dist/src/functions/surface/surface-editorial.d.ts +25 -0
- package/dist/src/functions/surface/surface-editorial.js +101 -0
- package/dist/src/functions/surface/write-surface-usage.d.ts +12 -0
- package/dist/src/functions/surface/write-surface-usage.js +18 -0
- package/dist/src/functions/validate/pikku-barrel-checks.d.ts +12 -0
- package/dist/src/functions/validate/pikku-barrel-checks.js +97 -0
- package/dist/src/functions/validate/scenario-file-checks.js +1 -1
- package/dist/src/functions/validate/shared-checks.d.ts +10 -0
- package/dist/src/functions/validate/shared-checks.js +16 -2
- package/dist/src/functions/validate/validate-registry.js +20 -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} +5 -4
- 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} +7 -7
- package/dist/src/functions/wirings/agent/pikku-command-public-agent.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +4 -4
- 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} +24 -30
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.js +1 -1
- package/dist/src/functions/wirings/agent/serialize-public-agent.d.ts +5 -0
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +5 -3
- 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} +7 -7
- package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +4 -4
- package/dist/src/functions/wirings/auth/pikku-command-auth.js +5 -4
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +3 -8
- package/dist/src/functions/wirings/auth/serialize-auth-guards.d.ts +12 -0
- package/dist/src/functions/wirings/auth/serialize-auth-guards.js +168 -0
- package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +4 -4
- package/dist/src/functions/wirings/auth/serialize-auth-types.js +4 -4
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.js +2 -2
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.js +6 -3
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +2 -2
- package/dist/src/functions/wirings/channels/serialize-channel-types.d.ts +3 -1
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +18 -24
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +1 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +2 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +3 -3
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -3
- package/dist/src/functions/wirings/cli/serialize-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +9 -3
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +6 -5
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +20 -4
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +2 -2
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +3 -4
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.js +1 -1
- package/dist/src/functions/wirings/emails/serialize-emails.js +2 -2
- package/dist/src/functions/wirings/errors/pikku-command-error-types.d.ts +1 -0
- package/dist/src/functions/wirings/errors/pikku-command-error-types.js +17 -0
- package/dist/src/functions/wirings/errors/serialize-error-types.d.ts +9 -0
- package/dist/src/functions/wirings/errors/serialize-error-types.js +16 -0
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +20 -8
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +17 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.d.ts +14 -0
- package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.js +119 -0
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +18 -3
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +13 -0
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +20 -1
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +7 -2
- package/dist/src/functions/wirings/functions/serialize-function-types.js +46 -361
- package/dist/src/functions/wirings/functions/serialize-leaf-index.d.ts +17 -0
- package/dist/src/functions/wirings/functions/serialize-leaf-index.js +27 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.d.ts +7 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.js +24 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.js +1 -1
- package/dist/src/functions/wirings/gateway/serialize-gateway-types.d.ts +6 -0
- package/dist/src/functions/wirings/gateway/serialize-gateway-types.js +55 -0
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +3 -4
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.js +2 -2
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.js +3 -3
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +2 -2
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.js +7 -3
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +2 -2
- package/dist/src/functions/wirings/http/serialize-http-types.d.ts +3 -1
- package/dist/src/functions/wirings/http/serialize-http-types.js +20 -35
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +5 -1
- package/dist/src/functions/wirings/http/serialize-typed-http-map.js +5 -4
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.js +5 -2
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +7 -3
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.d.ts +3 -1
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +15 -15
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +1 -1
- package/dist/src/functions/wirings/middleware/serialize-middleware-types.d.ts +9 -0
- package/dist/src/functions/wirings/middleware/serialize-middleware-types.js +176 -0
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
- package/dist/src/functions/wirings/package/pikku-command-package-types.js +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.js +1 -1
- package/dist/src/functions/wirings/package/serialize-package-types.js +0 -4
- package/dist/src/functions/wirings/package/serialize-package.js +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +1 -1
- package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +4 -4
- 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 +9 -28
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.js +4 -2
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.js +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.d.ts +3 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +8 -5
- package/dist/src/functions/wirings/queue/serialize-queue-wrapper.js +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +3 -4
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.js +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +4 -8
- package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +4 -4
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +6 -6
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +6 -6
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +3 -2
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +4 -2
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -3
- 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-scenario-meta.js +4 -4
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.js +5 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.d.ts +3 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +10 -5
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +4 -4
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +4 -3
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +13 -19
- package/dist/src/functions/wirings/setup/serialize-setup-types.d.ts +7 -0
- package/dist/src/functions/wirings/setup/serialize-setup-types.js +111 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +4 -4
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +2 -2
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.js +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.d.ts +3 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +18 -11
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.d.ts +1 -1
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +18 -17
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.d.ts +10 -9
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +67 -49
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +12 -16
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -1
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +4 -3
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +1 -1
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +9 -11
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +6 -6
- package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/webhook/serialize-webhook.js +3 -2
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +4 -4
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +14 -5
- package/dist/src/functions/wirings/workflow/serialize-personas.js +2 -1
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -2
- package/dist/src/functions/wirings/workflow/serialize-scenario-types.d.ts +2 -0
- package/dist/src/functions/wirings/workflow/serialize-scenario-types.js +511 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +1 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +4 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +0 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +3 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +28 -441
- package/dist/src/functions/workflows/all.workflow.d.ts +1 -1
- package/dist/src/functions/workflows/all.workflow.js +83 -27
- package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
- package/dist/src/server/bun-server-runner.d.ts +1 -1
- package/dist/src/server/content-signing-jwt.js +1 -1
- package/dist/src/server/dev-server-runner.interface.d.ts +1 -1
- package/dist/src/server/node-server-runner.d.ts +1 -1
- package/dist/src/server/node-server-runner.js +5 -2
- package/dist/src/services/cli-logger.service.d.ts +1 -1
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/services.d.ts +9 -6
- package/dist/src/services.js +22 -6
- package/dist/src/utils/file-writer.d.ts +2 -0
- package/dist/src/utils/file-writer.js +37 -1
- package/dist/src/utils/is-deploy-codegen.d.ts +21 -0
- package/dist/src/utils/is-deploy-codegen.js +23 -0
- package/dist/src/utils/leaf-import-path.d.ts +16 -0
- package/dist/src/utils/leaf-import-path.js +15 -0
- package/dist/src/utils/parse-cli-filters.js +15 -35
- package/dist/src/utils/pikku-cli-config.d.ts +11 -0
- package/dist/src/utils/pikku-cli-config.js +82 -12
- package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
- package/dist/src/utils/remove-legacy-scaffold-file.js +36 -1
- package/dist/src/utils/resolve-scaffold-feature.js +5 -1
- package/dist/src/utils/schema-diff.d.ts +22 -0
- package/dist/src/utils/schema-diff.js +190 -0
- package/dist/src/utils/serialize-meta-ts.js +1 -1
- package/dist/src/utils/serialize-schemas.d.ts +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/src/utils/tsc-check.d.ts +1 -1
- package/dist/src/utils/tsc-check.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +53 -44
- package/surface.json +4464 -0
- package/console-app/assets/abnfDiagram-VRR7QNED-DTI8lQi3.js +0 -1
- package/console-app/assets/arc-B_XK0Xbk.js +0 -1
- package/console-app/assets/architecture-TIHT7OUA-BtQ4ypaP.js +0 -1
- package/console-app/assets/architectureDiagram-ZJ3FMSHR-CzE1T938.js +0 -36
- package/console-app/assets/c4Diagram-LMCZKHZV-DSsAqAm5.js +0 -10
- package/console-app/assets/channel-yWsB39zH.js +0 -1
- package/console-app/assets/chunk-52WLFC77-DkXgWHeH.js +0 -10
- package/console-app/assets/chunk-EX3LRPZG-0GIQyrn1.js +0 -231
- package/console-app/assets/chunk-FWX5IMBZ-DZvpxO7-.js +0 -2
- package/console-app/assets/chunk-ICXQ74PX-CzAIiCX5.js +0 -2
- package/console-app/assets/chunk-OGEWGWER-DhmfsQT_.js +0 -1
- package/console-app/assets/chunk-PUDLZKDR-BMAILUQ6.js +0 -156
- package/console-app/assets/chunk-RYQCIY6F-9OVlGtkS.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-DbUlDq35.js +0 -1
- package/console-app/assets/chunk-WYO6CB5R-cQuwndtk.js +0 -127
- package/console-app/assets/chunk-XXDRQBXY-D0yYTMY0.js +0 -1
- package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +0 -32
- 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/cose-bilkent-JH36ORCC-D8cALtKZ.js +0 -1
- package/console-app/assets/cynefin-VYW2F7L2-BphwdLzc.js +0 -1
- package/console-app/assets/cynefinDiagram-TSTJHNR4-7Rk31pXX.js +0 -62
- package/console-app/assets/cytoscape.esm-h6BdjjI9.js +0 -321
- package/console-app/assets/dagre-CXRCoUWR.js +0 -1
- package/console-app/assets/dagre-VKFMJZFB-e8-5QJxJ.js +0 -4
- package/console-app/assets/defaultLocale-C8Fc0cco.js +0 -1
- package/console-app/assets/diagram-G47NLZAW-F_m68BCv.js +0 -24
- package/console-app/assets/diagram-NH7WQ7WH-5p6A3YHp.js +0 -24
- package/console-app/assets/diagram-WEI45ONY-1gqT-Dqp.js +0 -41
- package/console-app/assets/dist-DQ3gF-0S.js +0 -1
- package/console-app/assets/ebnfDiagram-CCIWWBDH-Dsfd8DxK.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/ganttDiagram-NO4QXBWP-2of9JObw.js +0 -292
- package/console-app/assets/gitGraph-TEB2WS4Q-q2ow8moS.js +0 -1
- package/console-app/assets/graphlib-B8gBHxth.js +0 -1
- package/console-app/assets/index-CTO5cTAD.css +0 -1
- package/console-app/assets/index-FDk51Irw.js +0 -255
- package/console-app/assets/info-DKCQHKI2-DA35x9Eq.js +0 -1
- package/console-app/assets/infoDiagram-FWYZ7A6U-wBw6slQd.js +0 -2
- package/console-app/assets/init-D6jRqBbL.js +0 -1
- package/console-app/assets/linear-B-Zu24zW.js +0 -1
- package/console-app/assets/map-DsCK-0Cs.js +0 -1
- package/console-app/assets/mermaid.core-HtlOIxsD.js +0 -11
- package/console-app/assets/packet-7NZHBO7P-CvZpWSge.js +0 -1
- package/console-app/assets/path-BWPyau1x.js +0 -1
- package/console-app/assets/pegDiagram-2B236MQR-Bw6WA3kx.js +0 -1
- package/console-app/assets/pie-RZYD4A2V-cW9hD9gn.js +0 -1
- package/console-app/assets/pieDiagram-ENE6RG2P-DkD_01Ea.js +0 -39
- package/console-app/assets/radar-I7S5WNFK-tOWig5fu.js +0 -1
- package/console-app/assets/railroad-3IZDKUUU-tZ2PcrQC.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/railroadDiagram-RFXS5EU6-Dljzejc8.js +0 -1
- package/console-app/assets/sequenceDiagram-DBY2YBRQ-CXysYi1c.js +0 -162
- package/console-app/assets/src-Bilm7g2t.js +0 -1
- package/console-app/assets/stateDiagram-2N3HPSRC-C8aGjwyh.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-C21qKRsf.js +0 -1
- package/console-app/assets/swimlanes-5IMT3BWC-VaTW8Eyb.js +0 -2
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CCQS8jgU.js +0 -8
- package/console-app/assets/timeline-definition-FHXFAJF6-D88F4W4L.js +0 -120
- package/console-app/assets/treeView-QDETBFTQ-hN0LxmWJ.js +0 -1
- package/console-app/assets/treemap-6X3UGDF4-Cz4whnzW.js +0 -1
- package/console-app/assets/vennDiagram-L72KCM5P-CoW2kun8.js +0 -34
- package/console-app/assets/wardley-OPB4EBWU-l9vWUHbB.js +0 -1
- package/dist/src/functions/db/coercion-plugin.d.ts +0 -7
- package/dist/src/functions/db/coercion-plugin.js +0 -103
- 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/pikku-command-public-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-agent/serialize-public-agent.d.ts +0 -5
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +0 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.js +0 -21
- package/dist/src/functions/wirings/console/serialize-node-types.d.ts +0 -1
- package/dist/src/functions/wirings/console/serialize-node-types.js +0 -11
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +0 -7
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +0 -43
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +0 -4
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +0 -36
- /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/.pikku/schemas/schemas/{PikkuFunctionTypesInput.schema.json → PikkuGatewayTypesInput.schema.json} +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-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { existsSync } from 'fs';
|
|
2
|
+
import { unresolvedSchemaReferences } from '@pikku/inspector';
|
|
2
3
|
import { pikkuWorkflowComplexFunc } from '#pikku/workflow/pikku-workflow-types.gen.js';
|
|
3
4
|
import { assertSingleCoreVersion } from '../../utils/assert-single-core-version.js';
|
|
4
5
|
import { warnOnSplitTypeIdentity } from '../validate/type-identity-checks.js';
|
|
5
|
-
import { pruneLegacyScaffoldFiles, removeRetiredScaffoldFiles, } from '../../utils/remove-legacy-scaffold-file.js';
|
|
6
|
+
import { pruneLegacyScaffoldFiles, refreshScaffoldsImportingRemovedEntryPoints, removeRetiredScaffoldFiles, } from '../../utils/remove-legacy-scaffold-file.js';
|
|
7
|
+
import { writeSurfaceUsage } from '../surface/write-surface-usage.js';
|
|
6
8
|
import { PikkuTypecheckFailedError, renderTscFull, renderTscSummary, runProjectTypecheck, } from '../../utils/tsc-check.js';
|
|
7
9
|
const scaffoldFiles = (config) => {
|
|
8
10
|
const files = [];
|
|
@@ -51,9 +53,10 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
51
53
|
// it. Say it now or never.
|
|
52
54
|
await warnOnSplitTypeIdentity(config.rootDir, logger);
|
|
53
55
|
await pruneLegacyScaffoldFiles(config);
|
|
56
|
+
await refreshScaffoldsImportingRemovedEntryPoints(config);
|
|
54
57
|
await removeRetiredScaffoldFiles(config);
|
|
55
58
|
const allImports = [];
|
|
56
|
-
let
|
|
59
|
+
let functionTypesFileExists = true;
|
|
57
60
|
if (!existsSync(config.outDir)) {
|
|
58
61
|
logger.debug(`• .pikku directory not found, running bootstrap first...`);
|
|
59
62
|
// Every `getInspectorState` step below discards its result on purpose. A
|
|
@@ -67,11 +70,12 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
67
70
|
await workflow.do('Bootstrap inspect', async () => {
|
|
68
71
|
await getInspectorState(false, true, true);
|
|
69
72
|
});
|
|
70
|
-
// Both before function types:
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
73
|
+
// Both before the function types: the function leaf imports ScopeId from
|
|
74
|
+
// the scopes codegen, so any later import of '#pikku/function' — the
|
|
75
|
+
// inspector reading a project's zod schemas, for one — fails until these
|
|
76
|
+
// two files exist.
|
|
74
77
|
await workflow.do('Bootstrap scope definition types', 'pikkuScopeDefinitionTypes', null);
|
|
78
|
+
await workflow.do('Bootstrap error types', 'pikkuErrorTypes', null);
|
|
75
79
|
await workflow.do('Bootstrap scopes', 'pikkuScopes', { bootstrap: true });
|
|
76
80
|
await workflow.do('Bootstrap roles', 'pikkuRoles', { bootstrap: true });
|
|
77
81
|
await workflow.do('Bootstrap personas', 'pikkuPersonas', {
|
|
@@ -83,17 +87,12 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
83
87
|
await workflow.do('Bootstrap auth types', 'pikkuAuth', {
|
|
84
88
|
bootstrap: true,
|
|
85
89
|
});
|
|
86
|
-
await workflow.do('Bootstrap function types', 'pikkuFunctionTypes', {
|
|
87
|
-
bootstrap: true,
|
|
88
|
-
});
|
|
89
90
|
await workflow.do('Bootstrap addon types', 'pikkuAddonTypes', {
|
|
90
91
|
bootstrap: true,
|
|
91
92
|
});
|
|
92
93
|
await Promise.all([
|
|
93
94
|
workflow.do('Bootstrap HTTP types', 'pikkuHTTPTypes', null),
|
|
94
95
|
workflow.do('Bootstrap channel types', 'pikkuChannelTypes', null),
|
|
95
|
-
workflow.do('Bootstrap scheduler types', 'pikkuSchedulerTypes', null),
|
|
96
|
-
workflow.do('Bootstrap queue types', 'pikkuQueueTypes', null),
|
|
97
96
|
workflow.do('Bootstrap workflow', 'pikkuWorkflow', {
|
|
98
97
|
bootstrap: true,
|
|
99
98
|
}),
|
|
@@ -101,21 +100,35 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
101
100
|
bootstrap: true,
|
|
102
101
|
}),
|
|
103
102
|
workflow.do('Bootstrap MCP types', 'pikkuMCPTypes', null),
|
|
104
|
-
workflow.do('Bootstrap AI agent types', '
|
|
103
|
+
workflow.do('Bootstrap AI agent types', 'pikkuAgentTypes', null),
|
|
104
|
+
...(config.addon
|
|
105
|
+
? []
|
|
106
|
+
: [
|
|
107
|
+
workflow.do('Bootstrap scheduler types', 'pikkuSchedulerTypes', null),
|
|
108
|
+
workflow.do('Bootstrap queue types', 'pikkuQueueTypes', null),
|
|
109
|
+
workflow.do('Bootstrap gateway types', 'pikkuGatewayTypes', {
|
|
110
|
+
bootstrap: true,
|
|
111
|
+
}),
|
|
112
|
+
]),
|
|
105
113
|
]);
|
|
106
|
-
await workflow.do('Bootstrap Node types', 'pikkuNodeTypes', null);
|
|
107
114
|
await workflow.do('Bootstrap Secret definition types', 'pikkuSecretDefinitionTypes', null);
|
|
115
|
+
await workflow.do('Bootstrap Variable definition types', 'pikkuVariableDefinitionTypes', null);
|
|
108
116
|
if (!config.addon) {
|
|
109
117
|
await workflow.do('Bootstrap CLI types', 'pikkuCLITypes', {
|
|
110
118
|
bootstrap: true,
|
|
111
119
|
});
|
|
112
120
|
}
|
|
121
|
+
// Before the re-inspect, not after: the inspector builds its own TS
|
|
122
|
+
// program, and every user file reaches the wirings through
|
|
123
|
+
// `#pikku/<leaf>`. Without the indexes those specifiers do not resolve,
|
|
124
|
+
// and an unresolved factory leaves the function's input silently `any`.
|
|
125
|
+
await workflow.do('Bootstrap leaf subpath entries', 'pikkuLeafIndexes', null);
|
|
113
126
|
await workflow.do('Bootstrap re-inspect', async () => {
|
|
114
127
|
await getInspectorState(true, true);
|
|
115
128
|
});
|
|
116
129
|
}
|
|
117
|
-
if (!existsSync(config.
|
|
118
|
-
|
|
130
|
+
if (!existsSync(config.functionTypesFile)) {
|
|
131
|
+
functionTypesFileExists = false;
|
|
119
132
|
}
|
|
120
133
|
const missingScaffolds = scaffoldFiles(config).filter((s) => !existsSync(s.file));
|
|
121
134
|
if (missingScaffolds.length > 0) {
|
|
@@ -123,24 +136,41 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
123
136
|
await workflow.do(`Scaffold ${generator}`, generator, null);
|
|
124
137
|
}
|
|
125
138
|
}
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
// Before the leaf indexes, because an index only re-exports entry files that
|
|
140
|
+
// exist when it is written. These three are pure — they read `config` and
|
|
141
|
+
// nothing else — so nothing holds them back to the inspected pass below, and
|
|
142
|
+
// running them there would leave the first run after an upgrade with a
|
|
143
|
+
// `#pikku/secrets` that resolves but is missing `defineSecret`.
|
|
144
|
+
await Promise.all([
|
|
145
|
+
workflow.do('Secret definition types', 'pikkuSecretDefinitionTypes', null),
|
|
146
|
+
workflow.do('Scope definition types', 'pikkuScopeDefinitionTypes', null),
|
|
147
|
+
workflow.do('Variable definition types', 'pikkuVariableDefinitionTypes', null),
|
|
148
|
+
]);
|
|
149
|
+
await workflow.do('Function types split', 'pikkuFunctionTypesSplit', {});
|
|
150
|
+
await workflow.do('Leaf subpath entries', 'pikkuLeafIndexes', null);
|
|
151
|
+
if (!functionTypesFileExists || missingScaffolds.length > 0) {
|
|
128
152
|
logger.debug(`• Type file or scaffolds first created, inspecting again...`);
|
|
129
153
|
await workflow.do('Re-inspect after types', async () => {
|
|
130
154
|
await getInspectorState(true);
|
|
131
155
|
});
|
|
132
156
|
}
|
|
133
157
|
// Type generators are independent of each other
|
|
158
|
+
// These write the addon-safe subset of their leaf when the project is an
|
|
159
|
+
// addon, so they run either way. Skipping them for an addon only meant the
|
|
160
|
+
// bootstrap pass's copy was never rewritten, and an addon generated by an
|
|
161
|
+
// older CLI kept wiring leaves that no longer compiled against the current
|
|
162
|
+
// function leaf.
|
|
134
163
|
const typeGenerators = [
|
|
135
|
-
workflow.do('Function types split', 'pikkuFunctionTypesSplit', {}),
|
|
136
164
|
workflow.do('Trigger types', 'pikkuTriggerTypes', {}),
|
|
137
|
-
workflow.do('AI agent types', '
|
|
165
|
+
workflow.do('AI agent types', 'pikkuAgentTypes', null),
|
|
166
|
+
workflow.do('HTTP types', 'pikkuHTTPTypes', null),
|
|
167
|
+
workflow.do('Channel types', 'pikkuChannelTypes', null),
|
|
168
|
+
workflow.do('MCP types', 'pikkuMCPTypes', null),
|
|
138
169
|
];
|
|
139
170
|
if (!config.addon) {
|
|
140
|
-
typeGenerators.push(workflow.do('
|
|
171
|
+
typeGenerators.push(workflow.do('Gateway types', 'pikkuGatewayTypes', {}), workflow.do('Scheduler types', 'pikkuSchedulerTypes', null), workflow.do('Queue types', 'pikkuQueueTypes', null));
|
|
141
172
|
}
|
|
142
173
|
await Promise.all(typeGenerators);
|
|
143
|
-
await workflow.do('Node types', 'pikkuNodeTypes', null);
|
|
144
174
|
if (!config.addon) {
|
|
145
175
|
await workflow.do('CLI types', 'pikkuCLITypes', null);
|
|
146
176
|
}
|
|
@@ -161,8 +191,8 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
161
191
|
}
|
|
162
192
|
const [hasInternalRPCs, agents, scorers] = await Promise.all([
|
|
163
193
|
workflow.do('RPC', 'pikkuRPC', null),
|
|
164
|
-
workflow.do('AI agent', '
|
|
165
|
-
workflow.do('AI scorer', '
|
|
194
|
+
workflow.do('AI agent', 'pikkuAgent', null),
|
|
195
|
+
workflow.do('AI scorer', 'pikkuAgentScorer', null),
|
|
166
196
|
]);
|
|
167
197
|
allImports.push(config.modelAliasesFile);
|
|
168
198
|
if (agents) {
|
|
@@ -183,15 +213,13 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
183
213
|
workflow.do('Virtual user functions', 'pikkuVirtualUserFunctions', null),
|
|
184
214
|
workflow.do('Events scaffold', 'pikkuEventsScaffold', null),
|
|
185
215
|
workflow.do('Emails', 'pikkuEmails', null),
|
|
186
|
-
workflow.do('
|
|
216
|
+
workflow.do('Error types', 'pikkuErrorTypes', null),
|
|
187
217
|
workflow.do('Auth', 'pikkuAuth', {}),
|
|
188
218
|
workflow.do('Secrets', 'pikkuSecrets', null),
|
|
189
219
|
workflow.do('Credentials', 'pikkuCredentials', null),
|
|
190
|
-
workflow.do('Scope definition types', 'pikkuScopeDefinitionTypes', null),
|
|
191
220
|
workflow.do('Scopes', 'pikkuScopes', {}),
|
|
192
221
|
workflow.do('Roles', 'pikkuRoles', {}),
|
|
193
222
|
workflow.do('Personas', 'pikkuPersonas', {}),
|
|
194
|
-
workflow.do('Variable definition types', 'pikkuVariableDefinitionTypes', null),
|
|
195
223
|
workflow.do('Variables', 'pikkuVariables', null),
|
|
196
224
|
workflow.do('Addon types', 'pikkuAddonTypes', null),
|
|
197
225
|
]);
|
|
@@ -224,6 +252,7 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
224
252
|
if (schemas) {
|
|
225
253
|
allImports.push(`${config.schemaDirectory}/register.gen.ts`);
|
|
226
254
|
}
|
|
255
|
+
const hadRPCInternalMap = existsSync(config.rpcInternalMapDeclarationFile);
|
|
227
256
|
const [, , , workflows] = await Promise.all([
|
|
228
257
|
workflow.do('RPC internal map', 'pikkuRPCInternalMap', null),
|
|
229
258
|
workflow.do('RPC exposed map', 'pikkuRPCExposedMap', null),
|
|
@@ -240,7 +269,24 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
240
269
|
workflowRoutes = await workflow.do('Workflow routes', 'pikkuWorkflowRoutes', null);
|
|
241
270
|
}
|
|
242
271
|
}
|
|
243
|
-
|
|
272
|
+
// A contract type reaches the schema generator only through a file that
|
|
273
|
+
// imports it, and for a type exported by nothing but its own function file
|
|
274
|
+
// that file is the RPC internal map — written just above, after schemas.
|
|
275
|
+
// A first build has no map to read yet, so those schemas come out missing
|
|
276
|
+
// from a run that otherwise succeeds and the RPC dies with
|
|
277
|
+
// MissingSchemaError on its first call. The map exists now, so
|
|
278
|
+
// re-inspecting resolves them.
|
|
279
|
+
//
|
|
280
|
+
// Only on the build that created the map: a project whose references are
|
|
281
|
+
// unresolved for some other reason would otherwise pay a second inspection
|
|
282
|
+
// on every run for a re-generation that cannot help it.
|
|
283
|
+
const unresolvedSchemas = !hadRPCInternalMap &&
|
|
284
|
+
unresolvedSchemaReferences(await getInspectorState()).length > 0;
|
|
285
|
+
if (workflows ||
|
|
286
|
+
remoteRPC ||
|
|
287
|
+
webhook ||
|
|
288
|
+
workflowRoutes ||
|
|
289
|
+
unresolvedSchemas) {
|
|
244
290
|
await workflow.do('Re-inspect after workflows', async () => {
|
|
245
291
|
await getInspectorState(true);
|
|
246
292
|
});
|
|
@@ -349,6 +395,16 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
349
395
|
await workflow.do('OpenAPI', 'pikkuOpenAPI', null);
|
|
350
396
|
}
|
|
351
397
|
await workflow.do('Versions update', 'pikkuVersionsUpdate', null);
|
|
398
|
+
// Last, because a leaf index only exists for an entry file that was
|
|
399
|
+
// actually generated — that absence is what makes `#pikku/http` fail to
|
|
400
|
+
// resolve in an addon rather than resolve to a module missing the export.
|
|
401
|
+
await workflow.do('Leaf subpath entries', 'pikkuLeafIndexes', null);
|
|
402
|
+
// Reads the counters the inspector accumulated during the sweep it already
|
|
403
|
+
// makes — no second pass over the project's source, and nothing retained.
|
|
404
|
+
await workflow.do('Surface usage', async () => {
|
|
405
|
+
const { surfaceUsage } = await getInspectorState();
|
|
406
|
+
await writeSurfaceUsage(logger, config, surfaceUsage ?? {});
|
|
407
|
+
});
|
|
352
408
|
await workflow.do('Bootstrap', 'pikkuBootstrap', { allImports });
|
|
353
409
|
await workflow.do('Summary', 'pikkuSummary', null);
|
|
354
410
|
// Opt-in type-check gate (--tsc / --tsc-summary). Runs last, over the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Services } from '../../types/application-types.js';
|
|
2
|
-
import type { PikkuWire } from '@pikku/core';
|
|
2
|
+
import type { PikkuWire } from '@pikku/core/types';
|
|
3
3
|
type PikkuMiddleware = (services: Services, wire: PikkuWire, next: () => Promise<void>) => Promise<void>;
|
|
4
4
|
export interface LogCommandInfoOptions {
|
|
5
5
|
commandStart: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* shared with singleton services so function-side broadcasts reach the sockets
|
|
7
7
|
* the transport holds.
|
|
8
8
|
*/
|
|
9
|
-
import type { EventHubService } from '@pikku/core';
|
|
9
|
+
import type { EventHubService } from '@pikku/core/channel';
|
|
10
10
|
import type { Logger } from '@pikku/core/services';
|
|
11
11
|
import type { DevServerRunner, DevServerInstance, DevServerConfig, DevServerOptions } from './dev-server-runner.interface.js';
|
|
12
12
|
export declare class BunServerRunner implements DevServerRunner {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* waving through requests when no key is configured.
|
|
11
11
|
*/
|
|
12
12
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
13
|
-
import { getRelativeTimeOffsetFromNow } from '@pikku/core';
|
|
13
|
+
import { getRelativeTimeOffsetFromNow } from '@pikku/core/utils';
|
|
14
14
|
export const createEphemeralContentSigningJWT = () => {
|
|
15
15
|
const key = randomBytes(32);
|
|
16
16
|
const sign = (body) => createHmac('sha256', key).update(body).digest('base64url');
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* reach the transport's sockets. The right runner is resolved once in
|
|
9
9
|
* `services.ts` and injected — no `typeof Bun` checks in the dev command.
|
|
10
10
|
*/
|
|
11
|
-
import type { EventHubService } from '@pikku/core';
|
|
11
|
+
import type { EventHubService } from '@pikku/core/channel';
|
|
12
12
|
import type { JWTService, Logger } from '@pikku/core/services';
|
|
13
13
|
import type { NodeHTTPServerConfig } from '@pikku/node-http-server';
|
|
14
14
|
export interface DevServerInstance {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used when the CLI runs under Node. Owns the WebSocketServer so teardown
|
|
4
4
|
* (close ws then the http server) is encapsulated in the returned instance.
|
|
5
5
|
*/
|
|
6
|
-
import type { EventHubService } from '@pikku/core';
|
|
6
|
+
import type { EventHubService } from '@pikku/core/channel';
|
|
7
7
|
import type { Logger } from '@pikku/core/services';
|
|
8
8
|
import type { DevServerRunner, DevServerInstance, DevServerConfig, DevServerOptions } from './dev-server-runner.interface.js';
|
|
9
9
|
export declare class NodeServerRunner implements DevServerRunner {
|
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { LocalEventHubService } from '@pikku/core/channel/local';
|
|
7
7
|
import { PikkuNodeHTTPServer } from '@pikku/node-http-server';
|
|
8
|
-
import { pikkuWebsocketHandler } from '@pikku/ws';
|
|
8
|
+
import { DEFAULT_WS_MAX_PAYLOAD, pikkuWebsocketHandler } from '@pikku/ws';
|
|
9
9
|
import { WebSocketServer } from 'ws';
|
|
10
10
|
export class NodeServerRunner {
|
|
11
11
|
async createEventHub() {
|
|
12
12
|
return new LocalEventHubService();
|
|
13
13
|
}
|
|
14
14
|
createServer(config, logger, options = {}) {
|
|
15
|
-
const wss = new WebSocketServer({
|
|
15
|
+
const wss = new WebSocketServer({
|
|
16
|
+
noServer: true,
|
|
17
|
+
maxPayload: DEFAULT_WS_MAX_PAYLOAD,
|
|
18
|
+
});
|
|
16
19
|
const server = new PikkuNodeHTTPServer(config, logger, {
|
|
17
20
|
configureServer: (httpServer) => {
|
|
18
21
|
pikkuWebsocketHandler({ server: httpServer, wss, logger });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from '@pikku/core/services';
|
|
2
|
-
import type { Safe } from '@pikku/core';
|
|
2
|
+
import type { Safe } from '@pikku/core/classification';
|
|
3
3
|
import { LogLevel } from '@pikku/core/services';
|
|
4
4
|
import type { ErrorCode, DiagnosticSeverity, CodedDiagnostic } from '@pikku/inspector';
|
|
5
5
|
export type CLIOutputMode = 'text' | 'json';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { LogLevel } from '@pikku/core/services';
|
|
3
|
-
import { isExpectedError } from '@pikku/core';
|
|
3
|
+
import { isExpectedError } from '@pikku/core/errors';
|
|
4
4
|
// Compact one-line wordmark — the old multi-line ASCII art got cropped in
|
|
5
5
|
// short/narrow AI-agent panes. Coloured directly (not via the blue `info`
|
|
6
6
|
// path) so the cyan/bold render correctly.
|
package/dist/src/services.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Config, Services, SingletonServices, UserSession } from '../types/application-types.js';
|
|
2
|
-
import type { CreateConfig } from '@pikku/core';
|
|
3
|
-
import type { CreateWireServices, CreateSingletonServices } from '@pikku/core/
|
|
2
|
+
import type { CreateConfig } from '@pikku/core/types';
|
|
3
|
+
import type { CreateWireServices, CreateSingletonServices } from '@pikku/core/types';
|
|
4
4
|
import { LogLevel } from '@pikku/core/services';
|
|
5
5
|
import { CLILogger } from './services/cli-logger.service.js';
|
|
6
6
|
import type { InspectorDiagnostic } from '@pikku/inspector';
|
|
@@ -10,16 +10,19 @@ export declare function processDiagnostics(diagnostics: InspectorDiagnostic[], l
|
|
|
10
10
|
/**
|
|
11
11
|
* Default CLI renderer that logs output using the logger
|
|
12
12
|
*/
|
|
13
|
-
export declare const defaultCLIRenderer: import("@pikku/core/cli").CorePikkuCLIRender<ForwardedLogMessage, import("@pikku/core").CoreSingletonServices<{
|
|
13
|
+
export declare const defaultCLIRenderer: import("@pikku/core/cli").CorePikkuCLIRender<ForwardedLogMessage, import("@pikku/core/types").CoreSingletonServices<{
|
|
14
14
|
logLevel?: LogLevel;
|
|
15
15
|
secrets?: {
|
|
16
16
|
requireAllowedHosts?: boolean;
|
|
17
17
|
};
|
|
18
18
|
workflow?: import("@pikku/core/workflow").WorkflowServiceConfig;
|
|
19
19
|
webhook?: import("@pikku/core/services").WebhookServiceConfig;
|
|
20
|
-
postgres?: import("@pikku/core").PostgresConfig;
|
|
21
|
-
}>, import("@pikku/core").CoreUserSession>;
|
|
22
|
-
export declare const createConfig: CreateConfig<Config, [
|
|
20
|
+
postgres?: import("@pikku/core/types").PostgresConfig;
|
|
21
|
+
}>, import("@pikku/core/types").CoreUserSession>;
|
|
22
|
+
export declare const createConfig: CreateConfig<Config, [
|
|
23
|
+
PikkuCLIConfig,
|
|
24
|
+
string[]?
|
|
25
|
+
]>;
|
|
23
26
|
/**
|
|
24
27
|
* Singleton services factory for the Pikku CLI
|
|
25
28
|
* This function creates the singleton services used by the CLI and is created once on start.
|
package/dist/src/services.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { pikkuCLIRender } from '@pikku/core/cli';
|
|
2
|
-
import { LocalVariablesService, LocalSecretService, LogLevel,
|
|
3
|
-
import {
|
|
2
|
+
import { LocalVariablesService, LocalSecretService, LogLevel, NoopAuditService, } from '@pikku/core/services';
|
|
3
|
+
import { InMemoryWorkflowService } from '@pikku/core/services';
|
|
4
4
|
import { CLILogger } from './services/cli-logger.service.js';
|
|
5
|
-
import { getPikkuCLIConfig } from './utils/pikku-cli-config.js';
|
|
5
|
+
import { getPikkuCLIConfig, tryGetPikkuCLIConfig, } from './utils/pikku-cli-config.js';
|
|
6
6
|
import { inspect, serializeInspectorState, deserializeInspectorState, filterInspectorState, getInitialInspectorState, ErrorCode, } from '@pikku/inspector';
|
|
7
7
|
import { glob } from 'tinyglobby';
|
|
8
8
|
import path from 'path';
|
|
@@ -66,7 +66,17 @@ export const defaultCLIRenderer = pikkuCLIRender((_services, data) => {
|
|
|
66
66
|
return;
|
|
67
67
|
logger[data.level]({ message: data.message, type: data.type });
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Commands that must work in a directory that is not a Pikku project.
|
|
71
|
+
* `skills install` writes agent skills into a repo that has no pikku.config.json
|
|
72
|
+
* yet — that is the whole point of it — so it cannot require one to start.
|
|
73
|
+
*/
|
|
74
|
+
const CONFIG_FREE_COMMANDS = new Set([
|
|
75
|
+
'skills',
|
|
76
|
+
'skills.list',
|
|
77
|
+
'skills.install',
|
|
78
|
+
]);
|
|
79
|
+
export const createConfig = async (_variablesService, data, commandPath = []) => {
|
|
70
80
|
// Determine log level based on CLI flags with precedence:
|
|
71
81
|
// --silent > --loglevel > --verbose > --info > default (info)
|
|
72
82
|
let logLevel = LogLevel.info; // default
|
|
@@ -110,7 +120,13 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
110
120
|
if (!isSilent && outputMode !== 'json') {
|
|
111
121
|
logger.logLogo();
|
|
112
122
|
}
|
|
113
|
-
|
|
123
|
+
// A config-free command still uses the project config when one is there, so
|
|
124
|
+
// it behaves the same inside a project; it just does not demand one.
|
|
125
|
+
const configFree = CONFIG_FREE_COMMANDS.has(commandPath.join('.'));
|
|
126
|
+
const cliConfig = configFree
|
|
127
|
+
? ((await tryGetPikkuCLIConfig(logger, data.configFile, [], data.outDir)) ??
|
|
128
|
+
{})
|
|
129
|
+
: await getPikkuCLIConfig(logger, data.configFile, [], true, data.outDir);
|
|
114
130
|
// Load inspector state from file if stateInput is provided
|
|
115
131
|
let preloadedInspectorState = undefined;
|
|
116
132
|
if (data.stateInput) {
|
|
@@ -161,7 +177,7 @@ export const createSingletonServices = async (config) => {
|
|
|
161
177
|
// In bootstrap mode, return a minimal "zero state" with core types
|
|
162
178
|
// This allows bootstrap to run immediately without inspecting the codebase
|
|
163
179
|
if (bootstrapMode) {
|
|
164
|
-
const corePackagePath = '@pikku/core';
|
|
180
|
+
const corePackagePath = '@pikku/core/types';
|
|
165
181
|
const initialState = getInitialInspectorState(rootDir);
|
|
166
182
|
// Populate filesAndMethods with core types from @pikku/core
|
|
167
183
|
initialState.filesAndMethods = {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { CLILogger } from '../services/cli-logger.service.js';
|
|
2
2
|
export declare const DO_NOT_MODIFY_COMMENT: string;
|
|
3
|
+
export declare const setScaffoldWriteGuard: (dir: string | undefined) => void;
|
|
4
|
+
export declare const isScaffoldWriteGuarded: (path: string) => boolean;
|
|
3
5
|
export declare const getTsWriteGeneration: () => number;
|
|
4
6
|
export declare const writeFileInDir: (logger: CLILogger, path: string, content: string, { ignoreModifyComment, logWrite, }?: {
|
|
5
7
|
ignoreModifyComment?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dirname, join } from 'path';
|
|
1
|
+
import { dirname, join, relative, resolve } from 'path';
|
|
2
2
|
import { mkdir, readFile, rename, writeFile, rm } from 'fs/promises';
|
|
3
3
|
import { existsSync } from 'fs';
|
|
4
4
|
import { getCLIVersion } from './get-cli-version.js';
|
|
@@ -6,10 +6,39 @@ export const DO_NOT_MODIFY_COMMENT = `/**
|
|
|
6
6
|
* This file was generated by @pikku/cli@${getCLIVersion()}
|
|
7
7
|
*/
|
|
8
8
|
`;
|
|
9
|
+
/**
|
|
10
|
+
* While set, writes and removals under this directory are skipped.
|
|
11
|
+
*
|
|
12
|
+
* Deploy plan runs a full `pikku all` per unit with `--outDir` redirected to
|
|
13
|
+
* that unit's `.pikku`. Scaffold files are project *source* — generated once,
|
|
14
|
+
* then owned and edited by the developer — and their imports are computed
|
|
15
|
+
* against `config.outDir`, so regenerating them under a redirected outDir
|
|
16
|
+
* rewrites the developer's tree to point at
|
|
17
|
+
* `.deploy/<provider>/units/<unit>/.pikku` and leaves it failing to typecheck
|
|
18
|
+
* until the next ordinary `pikku all`.
|
|
19
|
+
*
|
|
20
|
+
* Guarding the writer rather than each generator is deliberate: generators are
|
|
21
|
+
* added regularly, several write both scaffold source and `.pikku` artifacts in
|
|
22
|
+
* one pass (so an all-or-nothing early return would skip too much), and a new
|
|
23
|
+
* one that forgets the check is silently correct here.
|
|
24
|
+
*/
|
|
25
|
+
let scaffoldWriteGuardDir;
|
|
26
|
+
export const setScaffoldWriteGuard = (dir) => {
|
|
27
|
+
scaffoldWriteGuardDir = dir ? resolve(dir) : undefined;
|
|
28
|
+
};
|
|
29
|
+
export const isScaffoldWriteGuarded = (path) => scaffoldWriteGuardDir !== undefined &&
|
|
30
|
+
!relative(scaffoldWriteGuardDir, resolve(path)).startsWith('..');
|
|
9
31
|
let tsWriteGeneration = 0;
|
|
10
32
|
const TS_FILE_REGEX = /\.[mc]?tsx?$/;
|
|
11
33
|
export const getTsWriteGeneration = () => tsWriteGeneration;
|
|
12
34
|
export const writeFileInDir = async (logger, path, content, { ignoreModifyComment = false, logWrite = true, } = {}) => {
|
|
35
|
+
if (isScaffoldWriteGuarded(path)) {
|
|
36
|
+
logger.debug({
|
|
37
|
+
message: `↷ Skipped scaffold write to ${path} (per-unit deploy codegen)`,
|
|
38
|
+
type: 'info',
|
|
39
|
+
});
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
13
42
|
if (path.includes('.json')) {
|
|
14
43
|
ignoreModifyComment = true;
|
|
15
44
|
}
|
|
@@ -71,6 +100,13 @@ export function scaffoldFilePath(config, subdir, name, suffix, overrideDir) {
|
|
|
71
100
|
return join(config.rootDir, config.srcDirectories[0], subdir, `${fileName}${suffix}`);
|
|
72
101
|
}
|
|
73
102
|
export const removeFileInDir = async (logger, path, { logRemove = true } = {}) => {
|
|
103
|
+
if (isScaffoldWriteGuarded(path)) {
|
|
104
|
+
logger.debug({
|
|
105
|
+
message: `↷ Skipped scaffold removal of ${path} (per-unit deploy codegen)`,
|
|
106
|
+
type: 'info',
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
74
110
|
// Check if file exists before attempting removal
|
|
75
111
|
if (existsSync(path)) {
|
|
76
112
|
await rm(path, { force: true });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VariablesService } from '@pikku/core/services';
|
|
2
|
+
/**
|
|
3
|
+
* Is this process a per-unit deploy codegen run?
|
|
4
|
+
*
|
|
5
|
+
* Deploy plan runs a full `pikku all` once per unit with `--outDir` pointed at
|
|
6
|
+
* that unit's `.pikku`. Scaffold files are *project source* — written once and
|
|
7
|
+
* then owned by the developer — and their import paths are computed against
|
|
8
|
+
* `config.outDir`, so regenerating them under a redirected outDir rewrites the
|
|
9
|
+
* developer's tree to point at `.deploy/<provider>/units/<unit>/.pikku`. The
|
|
10
|
+
* source then no longer typechecks until `pikku all` is run again.
|
|
11
|
+
*
|
|
12
|
+
* Every generator that writes into the scaffold directory has to ask this
|
|
13
|
+
* before writing.
|
|
14
|
+
*
|
|
15
|
+
* Note the coercion. `LocalVariablesService.get` runs the raw value through
|
|
16
|
+
* `JSON.parse`, so the string `'1'` arrives as the *number* `1` and a
|
|
17
|
+
* `=== '1'` check silently never matches — which is exactly how this guard came
|
|
18
|
+
* to exist while having no effect. Compare on the stringified value so the
|
|
19
|
+
* check holds whichever way the variable is supplied.
|
|
20
|
+
*/
|
|
21
|
+
export declare const isDeployCodegen: (variables: VariablesService) => Promise<boolean>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is this process a per-unit deploy codegen run?
|
|
3
|
+
*
|
|
4
|
+
* Deploy plan runs a full `pikku all` once per unit with `--outDir` pointed at
|
|
5
|
+
* that unit's `.pikku`. Scaffold files are *project source* — written once and
|
|
6
|
+
* then owned by the developer — and their import paths are computed against
|
|
7
|
+
* `config.outDir`, so regenerating them under a redirected outDir rewrites the
|
|
8
|
+
* developer's tree to point at `.deploy/<provider>/units/<unit>/.pikku`. The
|
|
9
|
+
* source then no longer typechecks until `pikku all` is run again.
|
|
10
|
+
*
|
|
11
|
+
* Every generator that writes into the scaffold directory has to ask this
|
|
12
|
+
* before writing.
|
|
13
|
+
*
|
|
14
|
+
* Note the coercion. `LocalVariablesService.get` runs the raw value through
|
|
15
|
+
* `JSON.parse`, so the string `'1'` arrives as the *number* `1` and a
|
|
16
|
+
* `=== '1'` check silently never matches — which is exactly how this guard came
|
|
17
|
+
* to exist while having no effect. Compare on the stringified value so the
|
|
18
|
+
* check holds whichever way the variable is supplied.
|
|
19
|
+
*/
|
|
20
|
+
export const isDeployCodegen = async (variables) => {
|
|
21
|
+
const flag = await variables.get('PIKKU_DEPLOY_CODEGEN');
|
|
22
|
+
return flag !== undefined && flag !== null && String(flag) === '1';
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The import path a generated file uses to reach one wiring's leaf.
|
|
3
|
+
*
|
|
4
|
+
* Scaffolds used to reach `pikku-types.gen.ts`, which re-exported every leaf —
|
|
5
|
+
* so a project with one scaffold pulled every wiring's core dependencies into
|
|
6
|
+
* its module graph whether it wired them or not. Naming the leaf keeps a
|
|
7
|
+
* scaffold's imports to the wirings it actually uses.
|
|
8
|
+
*
|
|
9
|
+
* Relative rather than `#pikku/<leaf>`: a scaffold can be written into a
|
|
10
|
+
* different package to the one that declares the alias, and `#` specifiers are
|
|
11
|
+
* private to the package that declares them.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getLeafImportPath: (from: string, leaf: string, config: {
|
|
14
|
+
outDir: string;
|
|
15
|
+
packageMappings: Record<string, string>;
|
|
16
|
+
}) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { join } from 'path';
|
|
2
|
+
import { getFileImportRelativePath } from './file-import-path.js';
|
|
3
|
+
/**
|
|
4
|
+
* The import path a generated file uses to reach one wiring's leaf.
|
|
5
|
+
*
|
|
6
|
+
* Scaffolds used to reach `pikku-types.gen.ts`, which re-exported every leaf —
|
|
7
|
+
* so a project with one scaffold pulled every wiring's core dependencies into
|
|
8
|
+
* its module graph whether it wired them or not. Naming the leaf keeps a
|
|
9
|
+
* scaffold's imports to the wirings it actually uses.
|
|
10
|
+
*
|
|
11
|
+
* Relative rather than `#pikku/<leaf>`: a scaffold can be written into a
|
|
12
|
+
* different package to the one that declares the alias, and `#` specifiers are
|
|
13
|
+
* private to the package that declares them.
|
|
14
|
+
*/
|
|
15
|
+
export const getLeafImportPath = (from, leaf, config) => getFileImportRelativePath(from, join(config.outDir, leaf, 'index.ts'), config.packageMappings);
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parse a comma-separated string or array into an array of trimmed, non-empty strings
|
|
3
|
-
* Returns undefined if the input is empty/undefined or results in an empty array
|
|
4
|
-
*/
|
|
5
|
-
function parseCommaSeparated(value) {
|
|
6
|
-
if (!value)
|
|
7
|
-
return undefined;
|
|
8
|
-
if (Array.isArray(value)) {
|
|
9
|
-
const flattened = value
|
|
10
|
-
.flatMap((item) => item.split(','))
|
|
11
|
-
.map((item) => item.trim())
|
|
12
|
-
.filter((item) => item.length > 0);
|
|
13
|
-
return flattened.length > 0 ? flattened : undefined;
|
|
14
|
-
}
|
|
15
|
-
const parsed = value
|
|
16
|
-
.split(',')
|
|
17
|
-
.map((item) => item.trim())
|
|
18
|
-
.filter((item) => item.length > 0);
|
|
19
|
-
return parsed.length > 0 ? parsed : undefined;
|
|
20
|
-
}
|
|
21
1
|
/**
|
|
22
2
|
* Parse CLI filter arguments into InspectorFilters format
|
|
23
3
|
*/
|
|
@@ -52,7 +32,7 @@ export function parseCLIFilters(data, cliConfig) {
|
|
|
52
32
|
append('excludeTarget', source.excludeTarget);
|
|
53
33
|
};
|
|
54
34
|
const namedFilters = cliConfig?.namedFilters ?? {};
|
|
55
|
-
const requestedNamedFilters =
|
|
35
|
+
const requestedNamedFilters = data.filter ?? (data.filters ? [data.filters] : undefined);
|
|
56
36
|
if (requestedNamedFilters && requestedNamedFilters.length > 0) {
|
|
57
37
|
for (const name of requestedNamedFilters) {
|
|
58
38
|
const preset = namedFilters[name];
|
|
@@ -66,20 +46,20 @@ export function parseCLIFilters(data, cliConfig) {
|
|
|
66
46
|
}
|
|
67
47
|
}
|
|
68
48
|
mergeFilter({
|
|
69
|
-
names:
|
|
70
|
-
tags:
|
|
71
|
-
wires:
|
|
72
|
-
directories:
|
|
73
|
-
httpRoutes:
|
|
74
|
-
httpMethods:
|
|
75
|
-
target:
|
|
76
|
-
excludeNames:
|
|
77
|
-
excludeTags:
|
|
78
|
-
excludeWires:
|
|
79
|
-
excludeDirectories:
|
|
80
|
-
excludeHttpRoutes:
|
|
81
|
-
excludeHttpMethods:
|
|
82
|
-
excludeTarget:
|
|
49
|
+
names: data.names,
|
|
50
|
+
tags: data.tags,
|
|
51
|
+
wires: data.wires,
|
|
52
|
+
directories: data.directories,
|
|
53
|
+
httpRoutes: data.httpRoutes,
|
|
54
|
+
httpMethods: data.httpMethods,
|
|
55
|
+
target: data.target,
|
|
56
|
+
excludeNames: data.excludeNames,
|
|
57
|
+
excludeTags: data.excludeTags,
|
|
58
|
+
excludeWires: data.excludeWires,
|
|
59
|
+
excludeDirectories: data.excludeDirectories,
|
|
60
|
+
excludeHttpRoutes: data.excludeHttpRoutes,
|
|
61
|
+
excludeHttpMethods: data.excludeHttpMethods,
|
|
62
|
+
excludeTarget: data.excludeTarget,
|
|
83
63
|
});
|
|
84
64
|
const validateTargetList = (values, argName) => {
|
|
85
65
|
if (!values || values.length === 0)
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { PikkuCLIConfig } from '../../types/config.js';
|
|
2
2
|
import type { CLILogger } from '../services/cli-logger.service.js';
|
|
3
3
|
export declare const getPikkuCLIConfig: (logger: CLILogger, configFile: string | undefined, requiredFields: Array<keyof PikkuCLIConfig>, exitProcess?: boolean, outDirOverride?: string) => Promise<PikkuCLIConfig>;
|
|
4
|
+
/**
|
|
5
|
+
* Like `getPikkuCLIConfig`, but returns null when the project has no config at
|
|
6
|
+
* all rather than throwing.
|
|
7
|
+
*
|
|
8
|
+
* Some commands are meant to run *outside* a Pikku project: `pikku skills
|
|
9
|
+
* install` seeds a repo's agent skills, which is something you do before there
|
|
10
|
+
* is a pikku.config.json to read. Requiring one to find out there isn't one is
|
|
11
|
+
* a chicken-and-egg. A config that exists but is broken still throws — that is
|
|
12
|
+
* a real error, and staying quiet about it would hide it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const tryGetPikkuCLIConfig: (logger: CLILogger, configFile: string | undefined, requiredFields: Array<keyof PikkuCLIConfig>, outDirOverride?: string) => Promise<PikkuCLIConfig | null>;
|
|
4
15
|
/** A config that was found and parsed, but says something impossible. */
|
|
5
16
|
export declare class PikkuCLIConfigError extends Error {
|
|
6
17
|
}
|