@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,4 +1,4 @@
|
|
|
1
|
-
export const serializeConsoleFunctions = (
|
|
1
|
+
export const serializeConsoleFunctions = (leaf, _pathToAgentTypes, globalHTTPPrefix = '') => {
|
|
2
2
|
const schemas = `/**
|
|
3
3
|
* Auto-generated console function schemas
|
|
4
4
|
* Do not edit manually - regenerate with 'npx pikku'
|
|
@@ -19,7 +19,9 @@ export const ValueResult = z.object({
|
|
|
19
19
|
|
|
20
20
|
export const Success = z.object({ success: z.boolean() })
|
|
21
21
|
`;
|
|
22
|
-
const functions = `import { pikkuFunc,
|
|
22
|
+
const functions = `import { pikkuFunc, ref } from '${leaf('function')}'
|
|
23
|
+
import { wireAddon } from '${leaf('addon')}'
|
|
24
|
+
import { defineHTTPRoutes, wireHTTPRoutes } from '${leaf('http')}'
|
|
23
25
|
import {
|
|
24
26
|
VariableRef,
|
|
25
27
|
SetVariable,
|
|
@@ -74,17 +76,31 @@ export const consoleRoutes = defineHTTPRoutes({
|
|
|
74
76
|
sse: true,
|
|
75
77
|
func: ref('console:streamWorkflowRun'),
|
|
76
78
|
},
|
|
79
|
+
// A route rather than an RPC because a <video> and an <img> take a URL.
|
|
80
|
+
// Authenticated even though the group is not: everything else here is
|
|
81
|
+
// metadata, and these are recordings of an application being used. \`path\`
|
|
82
|
+
// arrives as a query parameter because an artifact key contains slashes.
|
|
83
|
+
scenarioArtifact: {
|
|
84
|
+
route: '/scenario-run/:runId/artifact',
|
|
85
|
+
method: 'get',
|
|
86
|
+
auth: true,
|
|
87
|
+
func: ref('console:getScenarioArtifact'),
|
|
88
|
+
},
|
|
77
89
|
},
|
|
78
90
|
})
|
|
79
91
|
|
|
92
|
+
// The console's own root, not \`admin\`: administering the application (users,
|
|
93
|
+
// roles, credentials, the audit trail) is \`@pikku/addon-admin\` under the
|
|
94
|
+
// \`admin\` tree, and the two are granted separately. Addon scopes union with
|
|
95
|
+
// each function's, so this is the floor for reaching the console at all.
|
|
80
96
|
wireAddon({
|
|
81
97
|
name: 'console',
|
|
82
98
|
package: '@pikku/addon-console',
|
|
83
|
-
scopes: ['
|
|
99
|
+
scopes: ['pikku:console'],
|
|
84
100
|
globalSecrets:
|
|
85
101
|
'the console administers secrets an operator names at runtime, so no static declaration can cover them',
|
|
86
102
|
globalCredentials:
|
|
87
|
-
'the console
|
|
103
|
+
'the console reports whether the caller has connected the OAuth credentials an agent needs, which are declared by other addons',
|
|
88
104
|
})
|
|
89
105
|
wireHTTPRoutes({ basePath: '${globalHTTPPrefix}', routes: { console: consoleRoutes } })
|
|
90
106
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCredentials: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuCredentials: import("#pikku/function").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
3
3
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
4
4
|
import { serializeCredentialsTypes } from './serialize-credentials-types.js';
|
|
5
|
-
import { validateAndBuildCredentialDefinitionsMeta } from '@pikku/core/credential';
|
|
5
|
+
import { validateAndBuildCredentialDefinitionsMeta, } from '@pikku/core/credential';
|
|
6
6
|
export const pikkuCredentials = pikkuSessionlessFunc({
|
|
7
7
|
func: async ({ logger, config, getInspectorState }) => {
|
|
8
8
|
const { credentialsFile, credentialsMetaJsonFile, packageMappings } = config;
|
|
@@ -42,7 +42,8 @@ export const serializeCredentialsTypes = ({ definitions, schemaLookup, credentia
|
|
|
42
42
|
metaEntries.push(` '${name}': { ${metaParts.join(', ')} }`);
|
|
43
43
|
}
|
|
44
44
|
const imports = [];
|
|
45
|
-
imports.push(`import { TypedCredentialService as CoreTypedCredentialService
|
|
45
|
+
imports.push(`import { TypedCredentialService as CoreTypedCredentialService } from '@pikku/core/services'
|
|
46
|
+
import type { CredentialMetaInfo } from '@pikku/core/services'`);
|
|
46
47
|
imports.push(`import type { CredentialService } from '@pikku/core/services'`);
|
|
47
48
|
if (oauth2Entries.length > 0) {
|
|
48
49
|
imports.push(`import type { OAuth2CredentialConfig } from '@pikku/core/secret'`);
|
|
@@ -70,12 +71,10 @@ ${oauth2Entries.join(',\n')}
|
|
|
70
71
|
: '';
|
|
71
72
|
return `${imports.join('\n')}
|
|
72
73
|
|
|
73
|
-
export
|
|
74
|
+
export type CredentialsMap = {
|
|
74
75
|
${mapEntries.join('\n')}
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
export type CredentialName = keyof CredentialsMap
|
|
78
|
-
|
|
79
78
|
const CREDENTIALS_META: Record<string, CredentialMetaInfo> = {
|
|
80
79
|
${metaEntries.join(',\n')}
|
|
81
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PikkuCLIConfig } from '../../../../types/config.js';
|
|
2
2
|
import type { CLILogger } from '../../../services/cli-logger.service.js';
|
|
3
|
-
export declare const pikkuEmails: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
3
|
+
export declare const pikkuEmails: import("#pikku/function").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
4
4
|
export declare function generateEmailsArtifacts(logger: CLILogger, config: Pick<PikkuCLIConfig, 'outDir'> & {
|
|
5
5
|
emailTemplatesDir?: string;
|
|
6
6
|
}): Promise<true | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { readdir, readFile } from 'node:fs/promises';
|
|
3
3
|
import { basename, extname, join } from 'node:path';
|
|
4
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
4
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
5
5
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
6
6
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
7
7
|
import { serializeEmailsModule } from './serialize-emails.js';
|
|
@@ -29,10 +29,10 @@ ${template.variables
|
|
|
29
29
|
.join('\n')}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
type EmailTemplateVariables<TName extends EmailTemplateName> =
|
|
33
33
|
TemplateVariableMap[TName]
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
type RenderEmailInput<TName extends EmailTemplateName> = {
|
|
36
36
|
name: TName
|
|
37
37
|
locale?: EmailLocale
|
|
38
38
|
data: EmailTemplateVariables<TName>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pikkuErrorTypes: import("#pikku/function").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { pikkuVoidFunc } from '#pikku/function';
|
|
2
|
+
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
3
|
+
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
4
|
+
import { serializeErrorTypes } from './serialize-error-types.js';
|
|
5
|
+
export const pikkuErrorTypes = pikkuVoidFunc({
|
|
6
|
+
func: async ({ logger, config }) => {
|
|
7
|
+
const { errorTypesFile } = config;
|
|
8
|
+
const content = serializeErrorTypes();
|
|
9
|
+
await writeFileInDir(logger, errorTypesFile, content);
|
|
10
|
+
},
|
|
11
|
+
middleware: [
|
|
12
|
+
logCommandInfoAndTime({
|
|
13
|
+
commandStart: 'Creating error types',
|
|
14
|
+
commandEnd: 'Created error types',
|
|
15
|
+
}),
|
|
16
|
+
],
|
|
17
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the error leaf — the file `#pikku/error` resolves to.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the wiring leaves there is nothing project-specific to generate: the
|
|
5
|
+
* catalogue, `PikkuError` and `addError` all come from core as they are. The
|
|
6
|
+
* leaf exists so an application names one door for every Pikku import it makes,
|
|
7
|
+
* rather than reaching past `#pikku` into `@pikku/core` for errors alone.
|
|
8
|
+
*/
|
|
9
|
+
export declare const serializeErrorTypes: () => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the error leaf — the file `#pikku/error` resolves to.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the wiring leaves there is nothing project-specific to generate: the
|
|
5
|
+
* catalogue, `PikkuError` and `addError` all come from core as they are. The
|
|
6
|
+
* leaf exists so an application names one door for every Pikku import it makes,
|
|
7
|
+
* rather than reaching past `#pikku` into `@pikku/core` for errors alone.
|
|
8
|
+
*/
|
|
9
|
+
export const serializeErrorTypes = () => {
|
|
10
|
+
return `/**
|
|
11
|
+
* Error catalogue — \`#pikku/error\` resolves here.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export * from '@pikku/core/errors'
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type AddonTypesCommandInput = {
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
};
|
|
4
|
-
export declare const pikkuAddonTypes: import("#pikku").PikkuFunctionConfig<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
4
|
+
export declare const pikkuAddonTypes: import("#pikku/function").PikkuFunctionConfig<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
5
5
|
export {};
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
|
+
import { rm } from 'fs/promises';
|
|
2
3
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
4
|
import { checkRequiredTypes } from '../../../utils/check-required-types.js';
|
|
4
5
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
5
6
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
6
|
-
import { serializeAddonTypes } from './serialize-addon-types.js';
|
|
7
|
+
import { serializeAddonInstallTypes, serializeAddonTypes, } from './serialize-addon-types.js';
|
|
7
8
|
export const pikkuAddonTypes = pikkuSessionlessFunc({
|
|
8
9
|
func: async ({ logger, config, getInspectorState }, input) => {
|
|
10
|
+
const { addonTypesFile, addonSetupTypesFile, packageMappings, servicesFile, secretsFile, credentialsFile, variablesFile, } = config;
|
|
11
|
+
// A project is one or the other, so the half it is not keeps no file on
|
|
12
|
+
// disk. A tree generated before it changed kind still has that file, and
|
|
13
|
+
// `existsSync` is what decides a leaf is alive — so left behind it would
|
|
14
|
+
// keep the wrong `#pikku/addon` resolving forever.
|
|
15
|
+
await rm(config.addon ? addonTypesFile : addonSetupTypesFile, {
|
|
16
|
+
force: true,
|
|
17
|
+
});
|
|
18
|
+
// An application installs addons; an addon package declares itself. Both
|
|
19
|
+
// halves are static, so the app half needs no inspector pass and is written
|
|
20
|
+
// on the bootstrap run as readily as on the full one.
|
|
9
21
|
if (!config.addon) {
|
|
22
|
+
await writeFileInDir(logger, addonTypesFile, serializeAddonInstallTypes());
|
|
10
23
|
return;
|
|
11
24
|
}
|
|
12
|
-
const { addonTypesFile, packageMappings, servicesFile, secretsFile, credentialsFile, variablesFile, } = config;
|
|
13
25
|
const bootstrap = input?.bootstrap === true;
|
|
14
26
|
if (bootstrap) {
|
|
15
|
-
await writeFileInDir(logger,
|
|
27
|
+
await writeFileInDir(logger, addonSetupTypesFile, 'export {}\n');
|
|
16
28
|
return;
|
|
17
29
|
}
|
|
18
30
|
const visitState = await getInspectorState();
|
|
@@ -24,12 +36,12 @@ export const pikkuAddonTypes = pikkuSessionlessFunc({
|
|
|
24
36
|
throw new Error('Required types not found');
|
|
25
37
|
}
|
|
26
38
|
const configTypeImport = pikkuConfigType
|
|
27
|
-
? `import type { ${pikkuConfigType.type} } from '${getFileImportRelativePath(
|
|
39
|
+
? `import type { ${pikkuConfigType.type} } from '${getFileImportRelativePath(addonSetupTypesFile, pikkuConfigType.typePath, packageMappings)}'`
|
|
28
40
|
: '// Config type not found, will use fallback';
|
|
29
|
-
const content = serializeAddonTypes(`import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(
|
|
30
|
-
? `import { TypedCredentialService } from '${getFileImportRelativePath(
|
|
41
|
+
const content = serializeAddonTypes(`import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(addonSetupTypesFile, singletonServicesType.typePath, packageMappings)}'`, singletonServicesType.type, configTypeImport, `import type { RequiredSingletonServices } from '${getFileImportRelativePath(addonSetupTypesFile, servicesFile, packageMappings)}'`, `import { TypedSecretService } from '${getFileImportRelativePath(addonSetupTypesFile, secretsFile, packageMappings)}'`, `import { TypedVariablesService } from '${getFileImportRelativePath(addonSetupTypesFile, variablesFile, packageMappings)}'`, visitState.credentials?.definitions?.length > 0
|
|
42
|
+
? `import { TypedCredentialService } from '${getFileImportRelativePath(addonSetupTypesFile, credentialsFile, packageMappings)}'`
|
|
31
43
|
: null);
|
|
32
|
-
await writeFileInDir(logger,
|
|
44
|
+
await writeFileInDir(logger, addonSetupTypesFile, content);
|
|
33
45
|
},
|
|
34
46
|
middleware: [
|
|
35
47
|
logCommandInfoAndTime({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const pikkuFunctionTypesSplit: import("#pikku").PikkuFunctionConfig<{
|
|
1
|
+
export declare const pikkuFunctionTypesSplit: import("#pikku/function").PikkuFunctionConfig<{
|
|
2
2
|
bootstrap?: boolean;
|
|
3
|
-
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
3
|
+
}, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<{
|
|
4
4
|
bootstrap?: boolean;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<{
|
|
6
6
|
bootstrap?: boolean;
|
|
7
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
3
|
import { checkRequiredTypes } from '../../../utils/check-required-types.js';
|
|
4
4
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
5
5
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
6
6
|
import { serializeFunctionTypes } from './serialize-function-types.js';
|
|
7
7
|
import { serializeAddonRefs } from './serialize-addon-refs.js';
|
|
8
|
+
import { serializeMiddlewareTypes } from '../middleware/serialize-middleware-types.js';
|
|
9
|
+
import { serializeSetupTypes } from '../setup/serialize-setup-types.js';
|
|
10
|
+
import { serializeAuthGuards } from '../auth/serialize-auth-guards.js';
|
|
8
11
|
export const pikkuFunctionTypesSplit = pikkuSessionlessFunc({
|
|
9
12
|
func: async ({ logger, config, getInspectorState }, data) => {
|
|
10
13
|
const visitState = await getInspectorState(false, true, data?.bootstrap ?? false);
|
|
11
|
-
const { functionTypesFile, packageMappings, rpcInternalMapDeclarationFile, servicesFile, } = config;
|
|
14
|
+
const { functionTypesFile, middlewareTypesFile, setupTypesFile, authGuardsFile, packageMappings, rpcInternalMapDeclarationFile, servicesFile, credentialsFile, } = config;
|
|
12
15
|
// Check for required types
|
|
13
16
|
checkRequiredTypes(visitState.filesAndMethodsErrors, {
|
|
14
17
|
userSessionType: true,
|
|
@@ -19,10 +22,21 @@ export const pikkuFunctionTypesSplit = pikkuSessionlessFunc({
|
|
|
19
22
|
if (!userSessionType || !wireServicesType || !singletonServicesType) {
|
|
20
23
|
throw new Error('Required types not found');
|
|
21
24
|
}
|
|
25
|
+
// The credentials leaf is only written when the project declares at least
|
|
26
|
+
// one credential, so importing from it unconditionally would emit a broken
|
|
27
|
+
// import for every project that declares none.
|
|
28
|
+
const credentialsTypeImport = credentialsFile && visitState.credentials?.definitions.length
|
|
29
|
+
? `import type { CredentialsMap } from '${getFileImportRelativePath(functionTypesFile, credentialsFile, packageMappings)}'`
|
|
30
|
+
: undefined;
|
|
22
31
|
const configTypeImport = pikkuConfigType
|
|
23
32
|
? `import type { ${pikkuConfigType.type} } from '${getFileImportRelativePath(functionTypesFile, pikkuConfigType.typePath, packageMappings)}'`
|
|
24
33
|
: '// Config type not found, will use fallback';
|
|
25
|
-
const content = serializeFunctionTypes(`import type { ${userSessionType.type} } from '${getFileImportRelativePath(functionTypesFile, userSessionType.typePath, packageMappings)}'`, userSessionType.type, `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, singletonServicesType.typePath, packageMappings)}'`, singletonServicesType.type, `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, wireServicesType.typePath, packageMappings)}'`, wireServicesType.type, `import type { TypedPikkuRPC, FlattenedRPCMap } from '${getFileImportRelativePath(functionTypesFile, rpcInternalMapDeclarationFile, packageMappings)}'`, `import type { RequiredSingletonServices
|
|
34
|
+
const content = serializeFunctionTypes(`import type { ${userSessionType.type} } from '${getFileImportRelativePath(functionTypesFile, userSessionType.typePath, packageMappings)}'`, userSessionType.type, `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, singletonServicesType.typePath, packageMappings)}'`, singletonServicesType.type, `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, wireServicesType.typePath, packageMappings)}'`, wireServicesType.type, `import type { TypedPikkuRPC, FlattenedRPCMap } from '${getFileImportRelativePath(functionTypesFile, rpcInternalMapDeclarationFile, packageMappings)}'`, `import type { RequiredSingletonServices } from '${getFileImportRelativePath(functionTypesFile, servicesFile, packageMappings)}'`, configTypeImport, getFileImportRelativePath(functionTypesFile, authGuardsFile, packageMappings), undefined, typeof config.addon === 'object' ? config.addon?.categories : undefined, `import type { ScopeId } from '${getFileImportRelativePath(functionTypesFile, config.scopesFile, packageMappings)}'`, credentialsTypeImport, getFileImportRelativePath(functionTypesFile, middlewareTypesFile, packageMappings), { addon: !!config.addon });
|
|
35
|
+
await writeFileInDir(logger, middlewareTypesFile, serializeMiddlewareTypes(getFileImportRelativePath(middlewareTypesFile, functionTypesFile, packageMappings), config.addonName));
|
|
36
|
+
await writeFileInDir(logger, setupTypesFile, serializeSetupTypes(getFileImportRelativePath(setupTypesFile, functionTypesFile, packageMappings), pikkuConfigType
|
|
37
|
+
? `import type { ${pikkuConfigType.type} } from '${getFileImportRelativePath(setupTypesFile, pikkuConfigType.typePath, packageMappings)}'`
|
|
38
|
+
: '// Config type not found, will use fallback', pikkuConfigType?.type, `import type { RequiredSingletonServices, RequiredWireServices } from '${getFileImportRelativePath(setupTypesFile, servicesFile, packageMappings)}'`));
|
|
39
|
+
await writeFileInDir(logger, authGuardsFile, serializeAuthGuards(getFileImportRelativePath(authGuardsFile, functionTypesFile, packageMappings), config.addonName));
|
|
26
40
|
const addonRefs = serializeAddonRefs({
|
|
27
41
|
addonHttp: visitState.exportedContracts.addonHttp,
|
|
28
42
|
addonChannel: visitState.exportedContracts.addonChannel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuFunctions: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuFunctions: import("#pikku/function").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
3
3
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
4
4
|
import { serializeFunctionImports } from './serialize-function-imports.js';
|
|
@@ -27,7 +27,7 @@ export const pikkuFunctions = pikkuSessionlessFunc({
|
|
|
27
27
|
? `import metaData from '${jsonImportPath}' with { type: 'json' }`
|
|
28
28
|
: `import metaData from '${jsonImportPath}'`;
|
|
29
29
|
const packageName = config.addonName ? `'${config.addonName}'` : 'null';
|
|
30
|
-
await writeFileInDir(logger, functionsMetaFile, `import { pikkuState } from '@pikku/core/
|
|
30
|
+
await writeFileInDir(logger, functionsMetaFile, `import { pikkuState } from '@pikku/core/state'\nimport type { FunctionsMeta } from '@pikku/core/services'\n${importStatement}\npikkuState(${packageName}, 'function', 'meta', metaData as FunctionsMeta)`);
|
|
31
31
|
// For addon packages, register ALL functions (they'll be invoked by consumers)
|
|
32
32
|
// For main packages, only register functions that are invoked via internal RPCs
|
|
33
33
|
const isAddon = !!config.addonName;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entry files a wiring's leaf is reached by. An addon never generates
|
|
3
|
+
* the wiring leaves, so those indexes are simply absent and `#pikku/http`
|
|
4
|
+
* fails to resolve rather than resolving to a module missing the export.
|
|
5
|
+
*
|
|
6
|
+
* Most leaves have a single entry. `secrets` and `variables` split their definer
|
|
7
|
+
* from their typed-service map across two generated files, `auth` pairs its
|
|
8
|
+
* always-written permission surface with a better-auth wrapper only some
|
|
9
|
+
* projects have, and `setup` holds the application's definers or the addon's —
|
|
10
|
+
* a project being only ever one kind — so each entry is listed and the index
|
|
11
|
+
* re-exports whichever of them the project actually generated.
|
|
12
|
+
*/
|
|
13
|
+
export declare const leafEntries: readonly [readonly ["function", readonly ["functionTypesFile"]], readonly ["middleware", readonly ["middlewareTypesFile"]], readonly ["setup", readonly ["setupTypesFile", "addonSetupTypesFile"]], readonly ["error", readonly ["errorTypesFile"]], readonly ["http", readonly ["httpTypesFile"]], readonly ["channel", readonly ["channelsTypesFile"]], readonly ["gateway", readonly ["gatewaysTypesFile"]], readonly ["trigger", readonly ["triggersTypesFile"]], readonly ["scheduler", readonly ["schedulersTypesFile"]], readonly ["queue", readonly ["queueTypesFile"]], readonly ["workflow", readonly ["workflowTypesFile"]], readonly ["scenarios", readonly ["scenarioTypesFile"]], readonly ["mcp", readonly ["mcpTypesFile"]], readonly ["agent", readonly ["agentTypesFile"]], readonly ["cli", readonly ["cliTypesFile"]], readonly ["addon", readonly ["addonTypesFile"]], readonly ["secrets", readonly ["secretTypesFile", "secretsFile"]], readonly ["credentials", readonly ["credentialsFile"]], readonly ["scopes", readonly ["scopeTypesFile"]], readonly ["variables", readonly ["variableTypesFile", "variablesFile"]], readonly ["auth", readonly ["authGuardsFile", "authTypesFile"]]];
|
|
14
|
+
export declare const pikkuLeafIndexes: import("#pikku/function").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
|
+
import { existsSync } from 'fs';
|
|
3
|
+
import { readdir, rm } from 'fs/promises';
|
|
4
|
+
import { basename, dirname, join } from 'path';
|
|
5
|
+
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
6
|
+
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
7
|
+
import { serializeLeafIndex } from './serialize-leaf-index.js';
|
|
8
|
+
/**
|
|
9
|
+
* The entry files a wiring's leaf is reached by. An addon never generates
|
|
10
|
+
* the wiring leaves, so those indexes are simply absent and `#pikku/http`
|
|
11
|
+
* fails to resolve rather than resolving to a module missing the export.
|
|
12
|
+
*
|
|
13
|
+
* Most leaves have a single entry. `secrets` and `variables` split their definer
|
|
14
|
+
* from their typed-service map across two generated files, `auth` pairs its
|
|
15
|
+
* always-written permission surface with a better-auth wrapper only some
|
|
16
|
+
* projects have, and `setup` holds the application's definers or the addon's —
|
|
17
|
+
* a project being only ever one kind — so each entry is listed and the index
|
|
18
|
+
* re-exports whichever of them the project actually generated.
|
|
19
|
+
*/
|
|
20
|
+
export const leafEntries = [
|
|
21
|
+
['function', ['functionTypesFile']],
|
|
22
|
+
['middleware', ['middlewareTypesFile']],
|
|
23
|
+
['setup', ['setupTypesFile', 'addonSetupTypesFile']],
|
|
24
|
+
['error', ['errorTypesFile']],
|
|
25
|
+
['http', ['httpTypesFile']],
|
|
26
|
+
['channel', ['channelsTypesFile']],
|
|
27
|
+
['gateway', ['gatewaysTypesFile']],
|
|
28
|
+
['trigger', ['triggersTypesFile']],
|
|
29
|
+
['scheduler', ['schedulersTypesFile']],
|
|
30
|
+
['queue', ['queueTypesFile']],
|
|
31
|
+
['workflow', ['workflowTypesFile']],
|
|
32
|
+
['scenarios', ['scenarioTypesFile']],
|
|
33
|
+
['mcp', ['mcpTypesFile']],
|
|
34
|
+
['agent', ['agentTypesFile']],
|
|
35
|
+
['cli', ['cliTypesFile']],
|
|
36
|
+
['addon', ['addonTypesFile']],
|
|
37
|
+
['secrets', ['secretTypesFile', 'secretsFile']],
|
|
38
|
+
['credentials', ['credentialsFile']],
|
|
39
|
+
['scopes', ['scopeTypesFile']],
|
|
40
|
+
['variables', ['variableTypesFile', 'variablesFile']],
|
|
41
|
+
['auth', ['authGuardsFile', 'authTypesFile']],
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Leaves whose entire content is a wiring an addon has no registry to reach, so
|
|
45
|
+
* the addon half of the leaf would export nothing at all. They are named rather
|
|
46
|
+
* than inferred from what is on disk: a project that used to be an application
|
|
47
|
+
* still has the files an earlier run wrote, which would otherwise keep the leaf
|
|
48
|
+
* looking alive to `existsSync` forever.
|
|
49
|
+
*/
|
|
50
|
+
const ADDON_RETIRED_LEAVES = new Set(['queue', 'scheduler', 'gateway', 'cli']);
|
|
51
|
+
export const pikkuLeafIndexes = pikkuSessionlessFunc({
|
|
52
|
+
func: async ({ logger, config }) => {
|
|
53
|
+
const written = new Set();
|
|
54
|
+
const retired = [];
|
|
55
|
+
for (const [leaf, keys] of leafEntries) {
|
|
56
|
+
const entryFiles = config.addon && ADDON_RETIRED_LEAVES.has(leaf)
|
|
57
|
+
? []
|
|
58
|
+
: keys
|
|
59
|
+
.map((key) => config[key])
|
|
60
|
+
.filter((entryFile) => Boolean(entryFile && existsSync(entryFile)));
|
|
61
|
+
if (entryFiles.length === 0) {
|
|
62
|
+
// A leaf this project stopped generating — the wiring leaves an addon
|
|
63
|
+
// never gets, most often. Its directory is still full of the files an
|
|
64
|
+
// earlier run wrote, and tsc compiles every file in the output tree
|
|
65
|
+
// whether a barrel re-exports it or not, so they have to go with it.
|
|
66
|
+
retired.push(...keys.map((key) => config[key]).filter(Boolean));
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const indexFile = join(dirname(entryFiles[0]), 'index.ts');
|
|
70
|
+
const entryImportPaths = entryFiles
|
|
71
|
+
.filter((entryFile) => entryFile !== indexFile)
|
|
72
|
+
.map((entryFile) => `./${basename(entryFile).replace(/\.ts$/, '.js')}`);
|
|
73
|
+
if (entryImportPaths.length === 0)
|
|
74
|
+
continue;
|
|
75
|
+
await writeFileInDir(logger, indexFile, serializeLeafIndex(leaf, entryImportPaths));
|
|
76
|
+
written.add(indexFile);
|
|
77
|
+
}
|
|
78
|
+
// This command owns the leaf surface outright. An index it did not write is
|
|
79
|
+
// one whose entry file is gone — a wiring the project stopped generating,
|
|
80
|
+
// or a directory that was never a leaf — and left in place it keeps
|
|
81
|
+
// `#pikku/<name>` resolving to a module that no longer compiles.
|
|
82
|
+
const outDirEntries = existsSync(config.outDir)
|
|
83
|
+
? await readdir(config.outDir, { withFileTypes: true })
|
|
84
|
+
: [];
|
|
85
|
+
for (const entry of outDirEntries) {
|
|
86
|
+
if (!entry.isDirectory())
|
|
87
|
+
continue;
|
|
88
|
+
const indexFile = join(config.outDir, entry.name, 'index.ts');
|
|
89
|
+
if (written.has(indexFile) || !existsSync(indexFile))
|
|
90
|
+
continue;
|
|
91
|
+
await rm(indexFile, { force: true });
|
|
92
|
+
}
|
|
93
|
+
for (const entryFile of retired) {
|
|
94
|
+
await rm(entryFile, { force: true });
|
|
95
|
+
await rm(join(dirname(entryFile), 'index.ts'), { force: true });
|
|
96
|
+
}
|
|
97
|
+
// `console/pikku-node-types.gen.ts` held only `NodeCategory` and
|
|
98
|
+
// `NodeRPCName`, which nothing derived from. A project generated before it
|
|
99
|
+
// was dropped still has the file, and tsc compiles every file in the output
|
|
100
|
+
// tree whether anything re-exports it or not.
|
|
101
|
+
await rm(join(config.outDir, 'console', 'pikku-node-types.gen.ts'), {
|
|
102
|
+
force: true,
|
|
103
|
+
});
|
|
104
|
+
// `defineCredential` moved to the auth leaf, next to the permissions and
|
|
105
|
+
// auth gates it is declared alongside. A project generated before the move
|
|
106
|
+
// still has the file, and tsc compiles every file in the output tree.
|
|
107
|
+
await rm(join(config.outDir, 'credentials', 'pikku-credential-types.gen.ts'), { force: true });
|
|
108
|
+
// The re-export hub every leaf now replaces. A project generated before the
|
|
109
|
+
// split still has it, and it would keep resolving `#pikku` while pulling in
|
|
110
|
+
// every wiring's core dependencies.
|
|
111
|
+
await rm(join(config.outDir, 'pikku-types.gen.ts'), { force: true });
|
|
112
|
+
},
|
|
113
|
+
middleware: [
|
|
114
|
+
logCommandInfoAndTime({
|
|
115
|
+
commandStart: 'Creating leaf subpath entries',
|
|
116
|
+
commandEnd: 'Created leaf subpath entries',
|
|
117
|
+
}),
|
|
118
|
+
],
|
|
119
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const serializeServicesMap: (allSingletonServices: string[], allWireServices: string[], requiredServices: Set<string>, forceRequiredServices: string[] | undefined, servicesImport: string, wireServicesImport: string, addonRequiredParentServices?: string[], authInjected?: boolean, agentScaffoldEnabled?: boolean) => string;
|
|
2
|
-
export declare const pikkuServices: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
2
|
+
export declare const pikkuServices: import("#pikku/function").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, void, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
|
+
import { ErrorCode } from '@pikku/inspector';
|
|
2
3
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
4
|
import { checkRequiredTypes } from '../../../utils/check-required-types.js';
|
|
4
5
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
@@ -116,8 +117,22 @@ export const pikkuServices = pikkuSessionlessFunc({
|
|
|
116
117
|
if (!wireServicesType || !singletonServicesType) {
|
|
117
118
|
throw new Error('Required types not found: wireServicesType or singletonServicesType');
|
|
118
119
|
}
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
// `SingletonServices` always carries the framework's own singletons, so an
|
|
121
|
+
// empty list is never a project with no services — it is the inspector's
|
|
122
|
+
// program failing to resolve the type, usually because a `#pikku/*` leaf it
|
|
123
|
+
// imports does not exist yet. Written out, every service becomes optional in
|
|
124
|
+
// `RequiredSingletonServices`, and the failure resurfaces as dozens of
|
|
125
|
+
// unrelated "possibly undefined" errors in files nobody touched.
|
|
126
|
+
if (visitState.serviceAggregation.allSingletonServices.length === 0) {
|
|
127
|
+
throw new Error(`[${ErrorCode.SINGLETON_SERVICES_TYPE_UNRESOLVED}] '${singletonServicesType.type}' resolved to no services at all, which means it did not resolve.\n` +
|
|
128
|
+
`Declared in ${singletonServicesType.typePath}.\n\n` +
|
|
129
|
+
'This is usually a stale or partial generated tree: a source file imports a ' +
|
|
130
|
+
'`#pikku/*` leaf that the current output no longer writes, so the type it ' +
|
|
131
|
+
'feeds resolves to an error type. Delete the output directory and re-run to ' +
|
|
132
|
+
'rebuild it from scratch.');
|
|
133
|
+
}
|
|
134
|
+
const servicesImport = `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(config.servicesFile, singletonServicesType.typePath, config.packageMappings)}'`;
|
|
135
|
+
const wireServicesImport = `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(config.servicesFile, wireServicesType.typePath, config.packageMappings)}'`;
|
|
121
136
|
const servicesCode = serializeServicesMap(visitState.serviceAggregation.allSingletonServices, visitState.serviceAggregation.allWireServices, visitState.serviceAggregation.requiredServices, config.forceRequiredServices, servicesImport, wireServicesImport, config.addonName ? visitState.addonRequiredParentServices : [], Boolean(visitState.auth?.definition), Boolean(config.scaffold?.agent));
|
|
122
137
|
await writeFileInDir(logger, config.servicesFile, servicesCode);
|
|
123
138
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuSchemas: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuSchemas: import("#pikku/function").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { saveSchemas } from '../../../utils/serialize-schemas.js';
|
|
3
3
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
4
4
|
import { partitionRequiredSchemas } from '../scenarios/scenario-schema-partition.js';
|
|
@@ -1 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The install side of `#pikku/addon`, written for an application rather than an
|
|
3
|
+
* addon. Installing an addon and authoring one are the same concept approached
|
|
4
|
+
* from opposite ends, and a project is only ever one of the two — but they
|
|
5
|
+
* cannot share a tree, because a runtime template maps `#pikku/*` onto a
|
|
6
|
+
* sibling package through tsconfig `paths`, and `paths` are global to a tsx
|
|
7
|
+
* process rather than scoped to the package that declared them. A linked
|
|
8
|
+
* addon's leaves would otherwise resolve against the host application's, so an
|
|
9
|
+
* addon generates its whole tree one level down and authors against
|
|
10
|
+
* `#pikku/addon/<leaf>` — a depth at which an application has nothing to match,
|
|
11
|
+
* leaving the resolver to fall back to Node's per-package `imports`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const serializeAddonInstallTypes: () => string;
|
|
1
14
|
export declare const serializeAddonTypes: (singletonServicesTypeImport: string, singletonServicesTypeName: string, configTypeImport: string, requiredServicesTypeImport: string, typedSecretServiceImport: string, typedVariablesServiceImport: string, typedCredentialServiceImport?: string | null) => string;
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The install side of `#pikku/addon`, written for an application rather than an
|
|
3
|
+
* addon. Installing an addon and authoring one are the same concept approached
|
|
4
|
+
* from opposite ends, and a project is only ever one of the two — but they
|
|
5
|
+
* cannot share a tree, because a runtime template maps `#pikku/*` onto a
|
|
6
|
+
* sibling package through tsconfig `paths`, and `paths` are global to a tsx
|
|
7
|
+
* process rather than scoped to the package that declared them. A linked
|
|
8
|
+
* addon's leaves would otherwise resolve against the host application's, so an
|
|
9
|
+
* addon generates its whole tree one level down and authors against
|
|
10
|
+
* `#pikku/addon/<leaf>` — a depth at which an application has nothing to match,
|
|
11
|
+
* leaving the resolver to fall back to Node's per-package `imports`.
|
|
12
|
+
*/
|
|
13
|
+
export const serializeAddonInstallTypes = () => `/**
|
|
14
|
+
* Installing an addon into this application
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { wireAddon, wireRemoteAddon } from '@pikku/core/addon'
|
|
18
|
+
`;
|
|
1
19
|
export const serializeAddonTypes = (singletonServicesTypeImport, singletonServicesTypeName, configTypeImport, requiredServicesTypeImport, typedSecretServiceImport, typedVariablesServiceImport, typedCredentialServiceImport = null) => {
|
|
2
20
|
return `/**
|
|
3
21
|
* Addon package types for pikkuAddonConfig and pikkuAddonServices
|
|
4
22
|
*/
|
|
5
23
|
|
|
6
|
-
import type { CreateConfig
|
|
24
|
+
import type { CreateConfig } from '@pikku/core/types'
|
|
25
|
+
import type { PikkuWire } from '@pikku/core/types'
|
|
7
26
|
${singletonServicesTypeImport}
|
|
8
27
|
${configTypeImport}
|
|
9
28
|
${requiredServicesTypeImport}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generates
|
|
2
|
+
* Generates the function authoring surface — the definers every wiring points
|
|
3
|
+
* at and the types they are written against. Middleware, permissions and the
|
|
4
|
+
* bootstrap factories used to live here too; each is its own decision taken at
|
|
5
|
+
* its own time, so each is now its own leaf.
|
|
3
6
|
*/
|
|
4
|
-
export declare const serializeFunctionTypes: (userSessionTypeImport: string, userSessionTypeName: string, singletonServicesTypeImport: string, singletonServicesTypeName: string, wireServicesTypeImport: string, wireServicesTypeName: string, rpcMapTypeImport: string, requiredServicesTypeImport: string, configTypeImport: string,
|
|
7
|
+
export declare const serializeFunctionTypes: (userSessionTypeImport: string, userSessionTypeName: string, singletonServicesTypeImport: string, singletonServicesTypeName: string, wireServicesTypeImport: string, wireServicesTypeName: string, rpcMapTypeImport: string, requiredServicesTypeImport: string, configTypeImport: string, authTypesImportPath?: string, workflowTypesImport?: string, nodeCategories?: string[], scopesTypeImport?: string, credentialsTypeImport?: string, middlewareTypesImportPath?: string, { addon }?: {
|
|
8
|
+
addon?: boolean;
|
|
9
|
+
}) => string;
|