@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,23 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.107
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Core function
|
|
5
|
+
* Core function types for all wirings
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
7
|
+
import type { PickRequired } from '@pikku/core/utils';
|
|
8
|
+
import type { ListInput, ListOutput } from '@pikku/core/function';
|
|
9
|
+
import type { CorePermissionGroup } from '@pikku/core/function';
|
|
10
|
+
import type { PikkuWire, SecretlessServices } from '@pikku/core/types';
|
|
11
|
+
import type { CorePikkuFunctionConfig, CorePikkuSessionlessFunctionConfig, CorePikkuPermission } from '@pikku/core/function';
|
|
10
12
|
import type { NodeType } from '@pikku/core/node';
|
|
13
|
+
import type { PikkuMiddleware } from '../middleware/pikku-middleware-types.gen.js';
|
|
14
|
+
import type { PikkuPermission } from '../auth/pikku-auth-types.gen.js';
|
|
11
15
|
import type { ScopeId } from '../scopes/pikku-scopes.gen.js';
|
|
16
|
+
type CredentialsMap = Record<string, unknown>;
|
|
12
17
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
13
18
|
import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function';
|
|
14
19
|
import type { UserSession } from '../../types/application-types.d.js';
|
|
15
20
|
import type { SingletonServices } from '../../types/application-types.d.js';
|
|
16
21
|
import type { Services } from '../../types/application-types.d.js';
|
|
17
|
-
import type { Config } from '../../types/application-types.d.js';
|
|
18
22
|
import type { TypedPikkuRPC, FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
19
|
-
import type { RequiredSingletonServices
|
|
20
|
-
import type { TypedWorkflow
|
|
23
|
+
import type { RequiredSingletonServices } from '../pikku-services.gen.js';
|
|
24
|
+
import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js';
|
|
25
|
+
import type { TypedScenario, TypedPersonas } from '../scenarios/pikku-scenario-types.gen.js';
|
|
21
26
|
export type { SingletonServices as SingletonServices };
|
|
22
27
|
export type { Services as Services };
|
|
23
28
|
export type Session = UserSession;
|
|
@@ -31,8 +36,6 @@ export type Session = UserSession;
|
|
|
31
36
|
*/
|
|
32
37
|
export type WiredSingletonServices = RequiredSingletonServices & SingletonServices;
|
|
33
38
|
export type WiredServices = SecretlessServices<RequiredSingletonServices & Services>;
|
|
34
|
-
/** `WiredSingletonServices` without `secrets`, for auth gates. */
|
|
35
|
-
export type WiredAuthServices = SecretlessServices<WiredSingletonServices>;
|
|
36
39
|
/**
|
|
37
40
|
* Inline node configuration for function definitions.
|
|
38
41
|
*/
|
|
@@ -42,162 +45,6 @@ export type NodeConfig = {
|
|
|
42
45
|
type: NodeType;
|
|
43
46
|
errorOutput?: boolean;
|
|
44
47
|
};
|
|
45
|
-
/**
|
|
46
|
-
* Type-safe API permission definition that integrates with your application's session type.
|
|
47
|
-
* Use this to define authorization logic for your API endpoints.
|
|
48
|
-
*
|
|
49
|
-
* @template In - The input type that the permission check will receive
|
|
50
|
-
* @template RequiredServices - The services required for this permission check
|
|
51
|
-
*/
|
|
52
|
-
export type PikkuPermission<In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>;
|
|
53
|
-
/**
|
|
54
|
-
* Type-safe middleware definition that can access your application's services and session.
|
|
55
|
-
* Use this to define reusable middleware that can be applied to multiple wirings.
|
|
56
|
-
*
|
|
57
|
-
* @template RequiredServices - The services required for this middleware
|
|
58
|
-
*/
|
|
59
|
-
export type PikkuMiddleware<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuMiddleware<RequiredServices>;
|
|
60
|
-
/**
|
|
61
|
-
* Configuration object for creating a permission with metadata
|
|
62
|
-
*/
|
|
63
|
-
export type PikkuPermissionConfig<In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices> = {
|
|
64
|
-
/** The permission function */
|
|
65
|
-
func: PikkuPermission<In, RequiredServices>;
|
|
66
|
-
/** Optional human-readable name for the permission */
|
|
67
|
-
name?: string;
|
|
68
|
-
/** Optional description of what the permission checks */
|
|
69
|
-
description?: string;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Factory function for creating permissions with tree-shaking support.
|
|
73
|
-
* Supports both direct function and configuration object syntax.
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```typescript
|
|
77
|
-
* // Direct function syntax
|
|
78
|
-
* const permission = pikkuPermission(async ({ logger }, data, { session }) => {
|
|
79
|
-
* const session = await session?.get()
|
|
80
|
-
* return session?.role === 'admin'
|
|
81
|
-
* })
|
|
82
|
-
*
|
|
83
|
-
* // Configuration object syntax with metadata
|
|
84
|
-
* const adminPermission = pikkuPermission({
|
|
85
|
-
* name: 'Admin Permission',
|
|
86
|
-
* description: 'Checks if user has admin role',
|
|
87
|
-
* func: async ({ logger }, data, { session }) => {
|
|
88
|
-
* const session = await session?.get()
|
|
89
|
-
* return session?.role === 'admin'
|
|
90
|
-
* }
|
|
91
|
-
* })
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export declare const pikkuPermission: <In>(permission: PikkuPermission<In> | PikkuPermissionConfig<In>) => PikkuPermission<In>;
|
|
95
|
-
/**
|
|
96
|
-
* Type-safe auth-only permission that only needs services and session.
|
|
97
|
-
* Use this for upfront authorization gates (MCP tools, AI agents, workflows)
|
|
98
|
-
* where request data isn't available yet.
|
|
99
|
-
*
|
|
100
|
-
* @template RequiredServices - The services required for this auth check
|
|
101
|
-
*/
|
|
102
|
-
export type PikkuAuth<RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices> = CorePikkuAuth<RequiredServices, Session>;
|
|
103
|
-
/**
|
|
104
|
-
* Configuration object for creating an auth permission with metadata
|
|
105
|
-
*/
|
|
106
|
-
export type PikkuAuthConfig<RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices> = CorePikkuAuthConfig<RequiredServices, Session>;
|
|
107
|
-
/**
|
|
108
|
-
* Factory function for creating auth-only permissions with tree-shaking support.
|
|
109
|
-
* Auth permissions only receive services and session (no request data),
|
|
110
|
-
* making them evaluable before request data is available.
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* \`\`\`typescript
|
|
114
|
-
* const isAuthenticated = pikkuAuth(async ({ logger }, session) => {
|
|
115
|
-
* return !!session
|
|
116
|
-
* })
|
|
117
|
-
*
|
|
118
|
-
* const isAdmin = pikkuAuth({
|
|
119
|
-
* name: 'Admin Auth',
|
|
120
|
-
* description: 'Checks if user is an admin',
|
|
121
|
-
* func: async ({ logger }, session) => {
|
|
122
|
-
* return session?.role === 'admin'
|
|
123
|
-
* }
|
|
124
|
-
* })
|
|
125
|
-
* \`\`\`
|
|
126
|
-
*/
|
|
127
|
-
export declare const pikkuAuth: <RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices>(auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>) => PikkuPermission<any, any>;
|
|
128
|
-
/**
|
|
129
|
-
* Configuration object for creating middleware with metadata
|
|
130
|
-
*/
|
|
131
|
-
export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = {
|
|
132
|
-
/** The middleware function */
|
|
133
|
-
func: PikkuMiddleware<RequiredServices>;
|
|
134
|
-
/** Optional human-readable name for the middleware */
|
|
135
|
-
name?: string;
|
|
136
|
-
/** Optional description of what the middleware does */
|
|
137
|
-
description?: string;
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* Factory function for creating middleware with tree-shaking support.
|
|
141
|
-
* Supports both direct function and configuration object syntax.
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```typescript
|
|
145
|
-
* // Direct function syntax
|
|
146
|
-
* const middleware = pikkuMiddleware(({ logger }, wires, next) => {
|
|
147
|
-
* logger.info('Middleware executed')
|
|
148
|
-
* await next()
|
|
149
|
-
* })
|
|
150
|
-
*
|
|
151
|
-
* // Configuration object syntax with metadata
|
|
152
|
-
* const logMiddleware = pikkuMiddleware({
|
|
153
|
-
* name: 'Request Logger',
|
|
154
|
-
* description: 'Logs all incoming requests',
|
|
155
|
-
* func: async ({ logger }, wires, next) => {
|
|
156
|
-
* logger.info('Request started')
|
|
157
|
-
* await next()
|
|
158
|
-
* }
|
|
159
|
-
* })
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
export declare const pikkuMiddleware: <RequiredServices extends SingletonServices = WiredSingletonServices>(middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>) => PikkuMiddleware<RequiredServices>;
|
|
163
|
-
/**
|
|
164
|
-
* Factory function for creating middleware factories
|
|
165
|
-
* Use this when your middleware needs configuration/input parameters
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* ```typescript
|
|
169
|
-
* export const logMiddleware = pikkuMiddlewareFactory<LogOptions>(({
|
|
170
|
-
* message,
|
|
171
|
-
* level = 'info'
|
|
172
|
-
* }) => {
|
|
173
|
-
* return pikkuMiddleware(async ({ logger }, next) => {
|
|
174
|
-
* logger[level](message)
|
|
175
|
-
* await next()
|
|
176
|
-
* })
|
|
177
|
-
* })
|
|
178
|
-
* ```
|
|
179
|
-
*/
|
|
180
|
-
export declare const pikkuMiddlewareFactory: <In = any>(factory: (input: In) => PikkuMiddleware) => ((input: In) => PikkuMiddleware);
|
|
181
|
-
/**
|
|
182
|
-
* Factory function for creating permission factories
|
|
183
|
-
* Use this when your permission needs configuration/input parameters
|
|
184
|
-
*
|
|
185
|
-
* @example
|
|
186
|
-
* ```typescript
|
|
187
|
-
* export const requireRole = pikkuPermissionFactory<{ role: string }>(({
|
|
188
|
-
* role
|
|
189
|
-
* }) => {
|
|
190
|
-
* return pikkuPermission(async ({ logger }, data, { session }) => {
|
|
191
|
-
* if (!session || session.role !== role) {
|
|
192
|
-
* logger.warn(`Permission denied: required role '${role}'`)
|
|
193
|
-
* return false
|
|
194
|
-
* }
|
|
195
|
-
* return true
|
|
196
|
-
* })
|
|
197
|
-
* })
|
|
198
|
-
* ```
|
|
199
|
-
*/
|
|
200
|
-
export declare const pikkuPermissionFactory: <In = any>(factory: (input: In) => PikkuPermission<any>) => ((input: In) => PikkuPermission<any>);
|
|
201
48
|
/**
|
|
202
49
|
* A function that generates a human-readable description of a pending approval action.
|
|
203
50
|
* Used by AI agents to show meaningful approval prompts instead of raw tool arguments.
|
|
@@ -232,7 +79,7 @@ export declare const pikkuApprovalDescription: <In = unknown, RequiredServices e
|
|
|
232
79
|
* type vary with its return type and cost a `func` written against the
|
|
233
80
|
* `PikkuFunction | PikkuFunctionSessionless` union its contextual typing.
|
|
234
81
|
*/
|
|
235
|
-
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends SecretlessServices<Services> = WiredServices, ScenarioOut = unknown> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario<ScenarioOut>, TypedPersonas>, RequiredWires>>;
|
|
82
|
+
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends SecretlessServices<Services> = WiredServices, ScenarioOut = unknown> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario<ScenarioOut>, TypedPersonas, CredentialsMap>, RequiredWires>>;
|
|
236
83
|
/**
|
|
237
84
|
* A session-aware API function that requires user authentication.
|
|
238
85
|
* Use this for protected endpoints that need access to user session data.
|
|
@@ -241,7 +88,7 @@ export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires ex
|
|
|
241
88
|
* @template Out - The output type that the function returns
|
|
242
89
|
* @template RequiredServices - Services required by this function
|
|
243
90
|
*/
|
|
244
|
-
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends SecretlessServices<Services> = WiredServices> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario, TypedPersonas>, RequiredWires>>;
|
|
91
|
+
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends SecretlessServices<Services> = WiredServices> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario, TypedPersonas, CredentialsMap>, RequiredWires>>;
|
|
245
92
|
/**
|
|
246
93
|
* Helper type to infer the output type from a Standard Schema
|
|
247
94
|
*/
|
|
@@ -254,12 +101,16 @@ export type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output>
|
|
|
254
101
|
* @template Out - The output type
|
|
255
102
|
* @template PikkuFunc - The function type (can be narrowed to PikkuFunction or PikkuFunctionSessionless)
|
|
256
103
|
*/
|
|
257
|
-
export type PikkuFunctionConfig<In = unknown, Out = unknown, RequiredWires extends keyof PikkuWire = never, PikkuFunc extends PikkuFunction<In, Out, RequiredWires, any> | PikkuFunctionSessionless<In, Out, RequiredWires, any, any> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>, InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema, ScopeId
|
|
104
|
+
export type PikkuFunctionConfig<In = unknown, Out = unknown, RequiredWires extends keyof PikkuWire = never, PikkuFunc extends PikkuFunction<In, Out, RequiredWires, any> | PikkuFunctionSessionless<In, Out, RequiredWires, any, any> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>, InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = Omit<CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema, ScopeId>, 'node'> & {
|
|
105
|
+
node?: NodeConfig;
|
|
106
|
+
};
|
|
258
107
|
/**
|
|
259
108
|
* {@link PikkuFunctionConfig} for a function that runs without a session.
|
|
260
109
|
* Has no `scopes`: an anonymous caller holds none, so none can ever be met.
|
|
261
110
|
*/
|
|
262
|
-
|
|
111
|
+
type PikkuFunctionSessionlessConfig<In = unknown, Out = unknown, RequiredWires extends keyof PikkuWire = never, PikkuFunc extends PikkuFunctionSessionless<In, Out, RequiredWires, any> = PikkuFunctionSessionless<In, Out, RequiredWires>, InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = Omit<CorePikkuSessionlessFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema>, 'node'> & {
|
|
112
|
+
node?: NodeConfig;
|
|
113
|
+
};
|
|
263
114
|
/**
|
|
264
115
|
* Configuration object for Pikku functions with Zod schema validation.
|
|
265
116
|
* Use this when you want to define input/output schemas using Zod.
|
|
@@ -270,10 +121,11 @@ type SchemaInferred<S, Fallback = unknown> = S extends StandardSchemaV1 ? InferS
|
|
|
270
121
|
* Schema-overload variant for pikkuFunc. Derived from CorePikkuFunctionConfig
|
|
271
122
|
* so adding a field on the core type automatically propagates here.
|
|
272
123
|
*/
|
|
273
|
-
|
|
124
|
+
type PikkuFunctionConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never, RequiredServices extends SecretlessServices<Services> = WiredServices> = Omit<CorePikkuFunctionConfig<PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices> | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>, CorePikkuPermission<any>, PikkuMiddleware, undefined, undefined, ScopeId>, 'func' | 'input' | 'output' | 'permissions' | 'approvalDescription' | 'node'> & {
|
|
274
125
|
func: PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices> | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>;
|
|
275
126
|
input?: InputSchema;
|
|
276
127
|
output?: OutputSchema;
|
|
128
|
+
node?: NodeConfig;
|
|
277
129
|
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined;
|
|
278
130
|
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never;
|
|
279
131
|
};
|
|
@@ -305,7 +157,6 @@ export type PikkuFunctionConfigWithSchema<InputSchema extends StandardSchemaV1 |
|
|
|
305
157
|
*/
|
|
306
158
|
export declare function pikkuFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuFunctionConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>;
|
|
307
159
|
export declare function pikkuFunc<In, Out = unknown>(func: PikkuFunction<In, Out, 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>;
|
|
308
|
-
export type PikkuListFunction<F extends Record<string, unknown> = {}, Row = unknown, S extends string = never> = PikkuFunction<ListInput<F, S>, ListOutput<Row>, 'session' | 'rpc'> | PikkuFunctionSessionless<ListInput<F, S>, ListOutput<Row>, 'session' | 'rpc'>;
|
|
309
160
|
export declare const pikkuListFunc: <F extends Record<string, unknown> = {}, Row = unknown, S extends string = never>(config: PikkuFunctionConfig<ListInput<F, S>, ListOutput<Row>, "session" | "rpc">) => PikkuFunctionConfig<ListInput<F, S>, ListOutput<Row>, "session" | "rpc">;
|
|
310
161
|
/**
|
|
311
162
|
* Configuration object for sessionless Pikku functions with Zod schema validation.
|
|
@@ -315,10 +166,11 @@ export declare const pikkuListFunc: <F extends Record<string, unknown> = {}, Row
|
|
|
315
166
|
* CorePikkuSessionlessFunctionConfig to stay in sync with the generic-typed
|
|
316
167
|
* config — so it has no `scopes` either.
|
|
317
168
|
*/
|
|
318
|
-
|
|
169
|
+
type PikkuFunctionSessionlessConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never, RequiredServices extends SecretlessServices<Services> = WiredServices> = Omit<CorePikkuSessionlessFunctionConfig<PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>>, 'func' | 'input' | 'output' | 'permissions' | 'approvalDescription' | 'node'> & {
|
|
319
170
|
func: PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>;
|
|
320
171
|
input?: InputSchema;
|
|
321
172
|
output?: OutputSchema;
|
|
173
|
+
node?: NodeConfig;
|
|
322
174
|
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined;
|
|
323
175
|
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never;
|
|
324
176
|
};
|
|
@@ -364,7 +216,7 @@ export declare function pikkuSessionlessFunc<In, Out = unknown, RequiredServices
|
|
|
364
216
|
* })
|
|
365
217
|
* ```
|
|
366
218
|
*/
|
|
367
|
-
export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionSessionlessConfig<void, void, "session" | "rpc">) =>
|
|
219
|
+
export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionSessionlessConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "session" | "rpc">;
|
|
368
220
|
/**
|
|
369
221
|
* References a registered function by name for use in any wiring.
|
|
370
222
|
* Works for both local and addon functions — resolves via RPC at runtime.
|
|
@@ -402,90 +254,6 @@ export declare const ref: <Name extends keyof FlattenedRPCMap>(rpcName: Name) =>
|
|
|
402
254
|
* ```
|
|
403
255
|
*/
|
|
404
256
|
export declare function pikkuRemoteChannelFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: Omit<PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>, 'func'>): PikkuFunctionConfig<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, 'session' | 'rpc'>;
|
|
405
|
-
/**
|
|
406
|
-
* Creates a Pikku config factory.
|
|
407
|
-
* Use this to define your application's configuration factory.
|
|
408
|
-
*
|
|
409
|
-
* @param func - Config factory function that returns your application's config
|
|
410
|
-
* @returns The config factory function
|
|
411
|
-
*
|
|
412
|
-
* @example
|
|
413
|
-
* ```typescript
|
|
414
|
-
* export const createConfig = pikkuConfig(async () => {
|
|
415
|
-
* return {
|
|
416
|
-
* apiUrl: process.env.API_URL || 'http://localhost:3000',
|
|
417
|
-
* dbUrl: process.env.DATABASE_URL
|
|
418
|
-
* }
|
|
419
|
-
* })
|
|
420
|
-
* ```
|
|
421
|
-
*/
|
|
422
|
-
export declare const pikkuConfig: (func: (variables?: any, ...args: any[]) => Promise<Config>) => (variables?: any, ...args: any[]) => Promise<Config>;
|
|
423
|
-
/**
|
|
424
|
-
* Creates a Pikku singleton services factory.
|
|
425
|
-
* Use this to define services that are created once and shared across all requests.
|
|
426
|
-
*
|
|
427
|
-
* @param func - Singleton services factory function
|
|
428
|
-
* @returns The singleton services factory function
|
|
429
|
-
*
|
|
430
|
-
* @example
|
|
431
|
-
* ```typescript
|
|
432
|
-
* export const createSingletonServices = pikkuServices(async (config, existingServices) => {
|
|
433
|
-
* return {
|
|
434
|
-
* config,
|
|
435
|
-
* logger: new CustomLogger(),
|
|
436
|
-
* db: await createDatabaseConnection(config.dbUrl)
|
|
437
|
-
* }
|
|
438
|
-
* })
|
|
439
|
-
* ```
|
|
440
|
-
*/
|
|
441
|
-
export declare const pikkuServices: (func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Partial<Omit<RequiredSingletonServices, "auth">>>) => (config: Config, existingServices?: Partial<SingletonServices>) => Promise<RequiredSingletonServices>;
|
|
442
|
-
/**
|
|
443
|
-
* Creates a Pikku wire services factory.
|
|
444
|
-
* Use this to define services that are created per-request/session.
|
|
445
|
-
*
|
|
446
|
-
* @param func - Wire services factory function
|
|
447
|
-
* @returns The wire services factory function
|
|
448
|
-
*
|
|
449
|
-
* @example
|
|
450
|
-
* ```typescript
|
|
451
|
-
* export const createWireServices = pikkuWireServices(async (services, wire) => {
|
|
452
|
-
* const session = await wire.session?.get()
|
|
453
|
-
* return {
|
|
454
|
-
* userCache: new UserCache(session?.userId)
|
|
455
|
-
* }
|
|
456
|
-
* })
|
|
457
|
-
* ```
|
|
458
|
-
*/
|
|
459
|
-
export declare const pikkuWireServices: (func: (services: SingletonServices, wire: any) => Promise<RequiredWireServices>) => CreateWireServices;
|
|
460
|
-
/**
|
|
461
|
-
* Tag-scoped middleware. Applies to any wiring that carries the matching tag.
|
|
462
|
-
*
|
|
463
|
-
* @example
|
|
464
|
-
* addTagMiddleware('admin', [adminMiddleware])
|
|
465
|
-
*/
|
|
466
|
-
export declare const addTagMiddleware: (tag: string, middleware: PikkuMiddleware[]) => void;
|
|
467
|
-
/**
|
|
468
|
-
* Wire-agnostic global middleware. Runs at the top of every wiring's
|
|
469
|
-
* middleware chain — before wire-, tag-, and function-level entries.
|
|
470
|
-
*
|
|
471
|
-
* Resolution order: global -> wire -> tag -> function.
|
|
472
|
-
*
|
|
473
|
-
* @example
|
|
474
|
-
* addGlobalMiddleware([telemetryMiddleware])
|
|
475
|
-
*/
|
|
476
|
-
export declare const addGlobalMiddleware: (middleware: PikkuMiddleware[]) => void;
|
|
477
|
-
/**
|
|
478
|
-
* Wire-agnostic global permissions. Runs at the top of every wiring's
|
|
479
|
-
* permission resolution — before wire-, tag-, and function-level entries.
|
|
480
|
-
*
|
|
481
|
-
* Resolution order: global -> wire -> tag -> function.
|
|
482
|
-
*
|
|
483
|
-
* @example
|
|
484
|
-
* addGlobalPermission([signedInUser])
|
|
485
|
-
*/
|
|
486
|
-
export declare const addGlobalPermission: <In = unknown>(permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => void;
|
|
487
|
-
export { wireAddon, wireRemoteAddon } from '@pikku/core/rpc';
|
|
488
|
-
export type { WireAddonConfig, WireRemoteAddonConfig, RemoteAddonAuth } from '@pikku/core/rpc';
|
|
489
257
|
/**
|
|
490
258
|
* Addon contract references. Generated from each wired addon's published
|
|
491
259
|
* contract metadata — no addon source is imported. Functions are proxied via
|
|
@@ -1,129 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.107
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Core function
|
|
5
|
+
* Core function types for all wirings
|
|
6
6
|
*/
|
|
7
|
-
import { pikkuAuth as pikkuAuthCore } from '@pikku/core/function';
|
|
8
|
-
import { addTagMiddleware as addTagMiddlewareCore, addGlobalMiddleware as addGlobalMiddlewareCore, addGlobalPermission as addGlobalPermissionCore, } from '@pikku/core/middleware';
|
|
9
|
-
import { pikkuState as __pikkuState } from '@pikku/core/ecosystem';
|
|
10
|
-
/**
|
|
11
|
-
* Factory function for creating permissions with tree-shaking support.
|
|
12
|
-
* Supports both direct function and configuration object syntax.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* // Direct function syntax
|
|
17
|
-
* const permission = pikkuPermission(async ({ logger }, data, { session }) => {
|
|
18
|
-
* const session = await session?.get()
|
|
19
|
-
* return session?.role === 'admin'
|
|
20
|
-
* })
|
|
21
|
-
*
|
|
22
|
-
* // Configuration object syntax with metadata
|
|
23
|
-
* const adminPermission = pikkuPermission({
|
|
24
|
-
* name: 'Admin Permission',
|
|
25
|
-
* description: 'Checks if user has admin role',
|
|
26
|
-
* func: async ({ logger }, data, { session }) => {
|
|
27
|
-
* const session = await session?.get()
|
|
28
|
-
* return session?.role === 'admin'
|
|
29
|
-
* }
|
|
30
|
-
* })
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export const pikkuPermission = (permission) => {
|
|
34
|
-
return typeof permission === 'function' ? permission : permission.func;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Factory function for creating auth-only permissions with tree-shaking support.
|
|
38
|
-
* Auth permissions only receive services and session (no request data),
|
|
39
|
-
* making them evaluable before request data is available.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* \`\`\`typescript
|
|
43
|
-
* const isAuthenticated = pikkuAuth(async ({ logger }, session) => {
|
|
44
|
-
* return !!session
|
|
45
|
-
* })
|
|
46
|
-
*
|
|
47
|
-
* const isAdmin = pikkuAuth({
|
|
48
|
-
* name: 'Admin Auth',
|
|
49
|
-
* description: 'Checks if user is an admin',
|
|
50
|
-
* func: async ({ logger }, session) => {
|
|
51
|
-
* return session?.role === 'admin'
|
|
52
|
-
* }
|
|
53
|
-
* })
|
|
54
|
-
* \`\`\`
|
|
55
|
-
*/
|
|
56
|
-
export const pikkuAuth = (auth) => {
|
|
57
|
-
return pikkuAuthCore(auth);
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Factory function for creating middleware with tree-shaking support.
|
|
61
|
-
* Supports both direct function and configuration object syntax.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* // Direct function syntax
|
|
66
|
-
* const middleware = pikkuMiddleware(({ logger }, wires, next) => {
|
|
67
|
-
* logger.info('Middleware executed')
|
|
68
|
-
* await next()
|
|
69
|
-
* })
|
|
70
|
-
*
|
|
71
|
-
* // Configuration object syntax with metadata
|
|
72
|
-
* const logMiddleware = pikkuMiddleware({
|
|
73
|
-
* name: 'Request Logger',
|
|
74
|
-
* description: 'Logs all incoming requests',
|
|
75
|
-
* func: async ({ logger }, wires, next) => {
|
|
76
|
-
* logger.info('Request started')
|
|
77
|
-
* await next()
|
|
78
|
-
* }
|
|
79
|
-
* })
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
export const pikkuMiddleware = (middleware) => {
|
|
83
|
-
return typeof middleware === 'function' ? middleware : middleware.func;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Factory function for creating middleware factories
|
|
87
|
-
* Use this when your middleware needs configuration/input parameters
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* export const logMiddleware = pikkuMiddlewareFactory<LogOptions>(({
|
|
92
|
-
* message,
|
|
93
|
-
* level = 'info'
|
|
94
|
-
* }) => {
|
|
95
|
-
* return pikkuMiddleware(async ({ logger }, next) => {
|
|
96
|
-
* logger[level](message)
|
|
97
|
-
* await next()
|
|
98
|
-
* })
|
|
99
|
-
* })
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
export const pikkuMiddlewareFactory = (factory) => {
|
|
103
|
-
return factory;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Factory function for creating permission factories
|
|
107
|
-
* Use this when your permission needs configuration/input parameters
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* export const requireRole = pikkuPermissionFactory<{ role: string }>(({
|
|
112
|
-
* role
|
|
113
|
-
* }) => {
|
|
114
|
-
* return pikkuPermission(async ({ logger }, data, { session }) => {
|
|
115
|
-
* if (!session || session.role !== role) {
|
|
116
|
-
* logger.warn(`Permission denied: required role '${role}'`)
|
|
117
|
-
* return false
|
|
118
|
-
* }
|
|
119
|
-
* return true
|
|
120
|
-
* })
|
|
121
|
-
* })
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
export const pikkuPermissionFactory = (factory) => {
|
|
125
|
-
return factory;
|
|
126
|
-
};
|
|
127
7
|
/**
|
|
128
8
|
* Factory function for creating approval description functions with tree-shaking support.
|
|
129
9
|
*
|
|
@@ -218,120 +98,6 @@ export function pikkuRemoteChannelFunc(config) {
|
|
|
218
98
|
},
|
|
219
99
|
};
|
|
220
100
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Creates a Pikku config factory.
|
|
223
|
-
* Use this to define your application's configuration factory.
|
|
224
|
-
*
|
|
225
|
-
* @param func - Config factory function that returns your application's config
|
|
226
|
-
* @returns The config factory function
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
* ```typescript
|
|
230
|
-
* export const createConfig = pikkuConfig(async () => {
|
|
231
|
-
* return {
|
|
232
|
-
* apiUrl: process.env.API_URL || 'http://localhost:3000',
|
|
233
|
-
* dbUrl: process.env.DATABASE_URL
|
|
234
|
-
* }
|
|
235
|
-
* })
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
export const pikkuConfig = (func) => func;
|
|
239
|
-
/**
|
|
240
|
-
* Creates a Pikku singleton services factory.
|
|
241
|
-
* Use this to define services that are created once and shared across all requests.
|
|
242
|
-
*
|
|
243
|
-
* @param func - Singleton services factory function
|
|
244
|
-
* @returns The singleton services factory function
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```typescript
|
|
248
|
-
* export const createSingletonServices = pikkuServices(async (config, existingServices) => {
|
|
249
|
-
* return {
|
|
250
|
-
* config,
|
|
251
|
-
* logger: new CustomLogger(),
|
|
252
|
-
* db: await createDatabaseConnection(config.dbUrl)
|
|
253
|
-
* }
|
|
254
|
-
* })
|
|
255
|
-
* ```
|
|
256
|
-
*/
|
|
257
|
-
export const pikkuServices = (func) => {
|
|
258
|
-
return async (config, existingServices = {}) => {
|
|
259
|
-
const createdServices = await func(config, existingServices);
|
|
260
|
-
const services = { ...existingServices, ...createdServices };
|
|
261
|
-
const authFactory = __pikkuState(null, 'package', 'authFactory');
|
|
262
|
-
if (authFactory) {
|
|
263
|
-
let authInstance;
|
|
264
|
-
services.auth = () => {
|
|
265
|
-
authInstance ??= Promise.resolve()
|
|
266
|
-
.then(() => authFactory(services))
|
|
267
|
-
.catch((error) => {
|
|
268
|
-
authInstance = undefined;
|
|
269
|
-
throw error;
|
|
270
|
-
});
|
|
271
|
-
return authInstance;
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
const resolved = services;
|
|
275
|
-
__pikkuState(null, 'package', 'singletonServices', resolved);
|
|
276
|
-
return resolved;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Creates a Pikku wire services factory.
|
|
281
|
-
* Use this to define services that are created per-request/session.
|
|
282
|
-
*
|
|
283
|
-
* @param func - Wire services factory function
|
|
284
|
-
* @returns The wire services factory function
|
|
285
|
-
*
|
|
286
|
-
* @example
|
|
287
|
-
* ```typescript
|
|
288
|
-
* export const createWireServices = pikkuWireServices(async (services, wire) => {
|
|
289
|
-
* const session = await wire.session?.get()
|
|
290
|
-
* return {
|
|
291
|
-
* userCache: new UserCache(session?.userId)
|
|
292
|
-
* }
|
|
293
|
-
* })
|
|
294
|
-
* ```
|
|
295
|
-
*/
|
|
296
|
-
export const pikkuWireServices = (func) => {
|
|
297
|
-
const factories = __pikkuState(null, 'package', 'factories');
|
|
298
|
-
__pikkuState(null, 'package', 'factories', { ...factories, createWireServices: func });
|
|
299
|
-
return func;
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* Tag-scoped middleware. Applies to any wiring that carries the matching tag.
|
|
303
|
-
*
|
|
304
|
-
* @example
|
|
305
|
-
* addTagMiddleware('admin', [adminMiddleware])
|
|
306
|
-
*/
|
|
307
|
-
export const addTagMiddleware = (tag, middleware) => {
|
|
308
|
-
addTagMiddlewareCore(tag, middleware, null);
|
|
309
|
-
};
|
|
310
|
-
/**
|
|
311
|
-
* Wire-agnostic global middleware. Runs at the top of every wiring's
|
|
312
|
-
* middleware chain — before wire-, tag-, and function-level entries.
|
|
313
|
-
*
|
|
314
|
-
* Resolution order: global -> wire -> tag -> function.
|
|
315
|
-
*
|
|
316
|
-
* @example
|
|
317
|
-
* addGlobalMiddleware([telemetryMiddleware])
|
|
318
|
-
*/
|
|
319
|
-
export const addGlobalMiddleware = (middleware) => {
|
|
320
|
-
addGlobalMiddlewareCore(middleware, null);
|
|
321
|
-
};
|
|
322
|
-
/**
|
|
323
|
-
* Wire-agnostic global permissions. Runs at the top of every wiring's
|
|
324
|
-
* permission resolution — before wire-, tag-, and function-level entries.
|
|
325
|
-
*
|
|
326
|
-
* Resolution order: global -> wire -> tag -> function.
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
* addGlobalPermission([signedInUser])
|
|
330
|
-
*/
|
|
331
|
-
export const addGlobalPermission = (permissions) => {
|
|
332
|
-
addGlobalPermissionCore(permissions, null);
|
|
333
|
-
};
|
|
334
|
-
export { wireAddon, wireRemoteAddon } from '@pikku/core/rpc';
|
|
335
101
|
/**
|
|
336
102
|
* Addon contract references. Generated from each wired addon's published
|
|
337
103
|
* contract metadata — no addon source is imported. Functions are proxied via
|