@pikku/cli 0.12.105 → 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-CMNoQhwm.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-DC3ZGIPN.js → chunk-2GRJ4B5K-Bwe32j_R.js} +1 -1
- package/console-app/assets/{chunk-HOUHSVGY-DMorD8Ib.js → chunk-4I5QYGJK-Beg_uQQN.js} +1 -1
- package/console-app/assets/chunk-5RXB4S5H-0HaMiv3k.js +231 -0
- package/console-app/assets/{chunk-MOJQB5TN-6BhXmDyj.js → chunk-6Q2QTUOP-CXxkExOq.js} +1 -1
- package/console-app/assets/chunk-7Z6QIM7H-zUqPbrvp.js +10 -0
- package/console-app/assets/{chunk-V7JOEXUC-JMjbqEgu.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-BcHHugM0.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-CENGdlFJ.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-BVtRZIEZ.js → chunk-W5SLKNZC-cjI56NCs.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-i4zkt4cc.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-BmjCoGBZ.js → diagram-7IWD3JNH-DUN-JIa1.js} +3 -3
- package/console-app/assets/{diagram-FQU43EPY-C667dC19.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-BAtdfbq3.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-D9fpmYRm.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-CWHvEncb.js → ishikawaDiagram-WSZJBQD7-BWoGxEjO.js} +3 -3
- package/console-app/assets/{journeyDiagram-5HDEW3XC-DKH8UvEq.js → journeyDiagram-NVQOT4AX-CR4YcPHg.js} +3 -3
- package/console-app/assets/{kanban-definition-HUTT4EX6-BODtp_fB.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-Do9j3HRL.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-CYJsdwMO.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-D7IWNYnf.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-CI840rae.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-CyHrMdrC.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-DL0eJ1aK.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-Cw2M8s0p.js → wardleyDiagram-T6FBY63Y-DOtWBvnk.js} +36 -36
- package/console-app/assets/{xychartDiagram-FW5EYKEG-BxMLZdbF.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 +9 -8
- package/dist/.pikku/agent/pikku-agent-types.gen.js +2 -3
- 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 +7 -9
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -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.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +6 -5
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +2 -2
- package/dist/.pikku/cli/pikku-cli-client.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +4 -3
- 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 +38 -18
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +2 -2
- package/dist/.pikku/console/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 +28 -262
- package/dist/.pikku/function/pikku-function-types.gen.js +2 -237
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +112 -90
- package/dist/.pikku/function/pikku-functions.gen.js +7 -5
- 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 +6 -24
- 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 +6 -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 +1 -1
- 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 +2 -2
- 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 +3 -2
- 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 +4 -3
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +4 -4
- 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 +4 -13
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-roles.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +3 -5
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -3
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-scopes.gen.js +1 -1
- package/dist/.pikku/secrets/index.d.ts +8 -0
- package/dist/.pikku/secrets/index.js +8 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -3
- 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 +8 -8
- 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 +8 -11
- 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 +97 -74
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +1 -3
- package/dist/.pikku/workflow/pikku-personas.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +22 -264
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -64
- 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 +19 -3
- package/dist/src/deploy/analyzer/analyzer.js +34 -12
- package/dist/src/deploy/build-pipeline.d.ts +13 -0
- package/dist/src/deploy/build-pipeline.js +22 -0
- 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 +26 -14
- 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 +4 -3
- 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-agent-runner.d.ts +2 -1
- package/dist/src/functions/commands/dev.d.ts +4 -4
- package/dist/src/functions/commands/dev.js +9 -8
- 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 +3 -3
- package/dist/src/functions/commands/persona.d.ts +5 -5
- package/dist/src/functions/commands/persona.js +3 -4
- 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/roles-shared.d.ts +1 -1
- package/dist/src/functions/commands/roles-shared.js +1 -1
- package/dist/src/functions/commands/scenario-browser.d.ts +19 -13
- 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 -5
- package/dist/src/functions/commands/scenario-ladder.js +1 -1
- package/dist/src/functions/commands/scenario-plan.d.ts +2 -2
- package/dist/src/functions/commands/scenario-plan.js +1 -1
- package/dist/src/functions/commands/scenario.d.ts +8 -8
- package/dist/src/functions/commands/scenario.js +73 -23
- 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/scopes-shared.d.ts +1 -1
- package/dist/src/functions/commands/scopes-shared.js +1 -1
- package/dist/src/functions/commands/semver.d.ts +1 -1
- package/dist/src/functions/commands/semver.js +1 -1
- package/dist/src/functions/commands/serve.d.ts +4 -4
- package/dist/src/functions/commands/serve.js +8 -6
- package/dist/src/functions/commands/skills.d.ts +8 -8
- package/dist/src/functions/commands/skills.js +1 -1
- package/dist/src/functions/commands/start-coverage.d.ts +1 -1
- package/dist/src/functions/commands/start-coverage.js +2 -2
- package/dist/src/functions/commands/update.d.ts +1 -1
- package/dist/src/functions/commands/update.js +1 -1
- 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/virtual-user-formatter.d.ts +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/shared-checks.d.ts +10 -0
- package/dist/src/functions/validate/shared-checks.js +16 -2
- package/dist/src/functions/validate/validate-registry.js +10 -0
- package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/agent/pikku-command-agent-types.js +3 -2
- package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -1
- package/dist/src/functions/wirings/agent/pikku-command-agent.js +4 -4
- package/dist/src/functions/wirings/agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/agent/pikku-command-public-agent.js +4 -4
- package/dist/src/functions/wirings/agent/serialize-agent-map.d.ts +1 -1
- package/dist/src/functions/wirings/agent/serialize-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/agent/serialize-agent-types.js +17 -12
- package/dist/src/functions/wirings/agent/serialize-model-aliases.js +1 -1
- package/dist/src/functions/wirings/agent/serialize-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/agent/serialize-public-agent.js +5 -3
- package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -1
- package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.js +4 -4
- package/dist/src/functions/wirings/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 -25
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +2 -3
- 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-client.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +3 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +2 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +11 -5
- package/dist/src/functions/wirings/cli/serialize-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +8 -3
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +1 -1
- 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 +2 -2
- 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.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +4 -6
- 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 -2
- 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 +47 -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-meta.d.ts +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 -36
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +6 -2
- 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 +17 -9
- 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 +2 -7
- 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 +2 -2
- package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +2 -2
- package/dist/src/functions/wirings/personas/serialize-personas-types.js +4 -27
- 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.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +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 -6
- 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 +3 -3
- package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +1 -1
- package/dist/src/functions/wirings/roles/serialize-roles-types.js +2 -2
- package/dist/src/functions/wirings/rpc/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 +5 -3
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +1 -1
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -4
- package/dist/src/functions/wirings/scenarios/scenario-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/scenario-schema-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-feature-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +4 -4
- package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +1 -1
- 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-meta.d.ts +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 -6
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +4 -4
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +5 -4
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +3 -3
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +2 -2
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +14 -21
- 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.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +4 -4
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.d.ts +3 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +19 -13
- 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 +2 -2
- package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +13 -17
- 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 +7 -3
- 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 +4 -3
- 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.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-personas.js +3 -3
- 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-bootstrap-map.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +2 -3
- 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 +4 -3
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +28 -438
- package/dist/src/functions/workflows/all.workflow.d.ts +1 -1
- package/dist/src/functions/workflows/all.workflow.js +77 -22
- 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/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/precise-coverage-map.d.ts +1 -1
- package/dist/src/utils/remove-legacy-scaffold-file.d.ts +1 -1
- package/dist/src/utils/remove-legacy-scaffold-file.js +11 -3
- package/dist/src/utils/resolve-personas.d.ts +3 -3
- package/dist/src/utils/resolve-personas.js +2 -2
- package/dist/src/utils/resolve-scaffold-feature.js +5 -1
- package/dist/src/utils/serialize-meta-ts.js +1 -1
- package/dist/src/utils/serialize-schemas.d.ts +1 -1
- package/dist/src/utils/serialize-schemas.js +1 -1
- package/dist/src/utils/surface.js +1 -1
- 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 +48 -47
- package/surface.json +4464 -0
- package/console-app/assets/abnfDiagram-VRR7QNED-QRjCVsso.js +0 -1
- package/console-app/assets/arc-CloGjkHW.js +0 -1
- package/console-app/assets/architecture-TIHT7OUA-Cz78Qi5H.js +0 -1
- package/console-app/assets/architectureDiagram-ZJ3FMSHR-Dl10fVqw.js +0 -36
- package/console-app/assets/c4Diagram-LMCZKHZV-C2pWYCa6.js +0 -10
- package/console-app/assets/channel-Bm4o-pNB.js +0 -1
- package/console-app/assets/chunk-52WLFC77-DuAheIlc.js +0 -10
- package/console-app/assets/chunk-EX3LRPZG-CWXF7N33.js +0 -231
- package/console-app/assets/chunk-FWX5IMBZ-UN3i5qMG.js +0 -2
- package/console-app/assets/chunk-ICXQ74PX-BiuzWyj2.js +0 -2
- package/console-app/assets/chunk-OGEWGWER-BNi3Gsmc.js +0 -1
- package/console-app/assets/chunk-PUDLZKDR-DNWGCeoL.js +0 -156
- package/console-app/assets/chunk-RYQCIY6F-DvRUzuDz.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-D4_whP-t.js +0 -1
- package/console-app/assets/chunk-WYO6CB5R-COKjEQwP.js +0 -127
- package/console-app/assets/chunk-XXDRQBXY-mkAF2YHU.js +0 -1
- package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +0 -32
- package/console-app/assets/classDiagram-OUVF2IWQ-B2cEvfK0.js +0 -1
- package/console-app/assets/classDiagram-v2-EOCWNBFH-B2cEvfK0.js +0 -1
- package/console-app/assets/cose-bilkent-JH36ORCC-D6F1MghO.js +0 -1
- package/console-app/assets/cynefin-VYW2F7L2-BIhff1Ln.js +0 -1
- package/console-app/assets/cynefinDiagram-TSTJHNR4-DrlBq_QP.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-Cm2eP0ez.js +0 -4
- package/console-app/assets/defaultLocale-C8Fc0cco.js +0 -1
- package/console-app/assets/diagram-G47NLZAW-3K3OPEuG.js +0 -24
- package/console-app/assets/diagram-NH7WQ7WH-CUK-d5iT.js +0 -24
- package/console-app/assets/diagram-WEI45ONY-D33qA2d9.js +0 -41
- package/console-app/assets/dist-jqlCD26w.js +0 -1
- package/console-app/assets/ebnfDiagram-CCIWWBDH-DUHkt7z6.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-iK6rmyk3.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-CSYhKO9Y.js +0 -1
- package/console-app/assets/ganttDiagram-NO4QXBWP-64_vh9rj.js +0 -292
- package/console-app/assets/gitGraph-TEB2WS4Q-DlFJY0cQ.js +0 -1
- package/console-app/assets/graphlib-B8gBHxth.js +0 -1
- package/console-app/assets/index-Byf4wkdP.js +0 -261
- package/console-app/assets/index-CTO5cTAD.css +0 -1
- package/console-app/assets/info-DKCQHKI2-DhyT_-b1.js +0 -1
- package/console-app/assets/infoDiagram-FWYZ7A6U-ufTemVSR.js +0 -2
- package/console-app/assets/init-D6jRqBbL.js +0 -1
- package/console-app/assets/linear-5Z8stnH-.js +0 -1
- package/console-app/assets/map-DsCK-0Cs.js +0 -1
- package/console-app/assets/mermaid.core-DwI4IdKs.js +0 -11
- package/console-app/assets/packet-7NZHBO7P-comMLvz_.js +0 -1
- package/console-app/assets/path-BWPyau1x.js +0 -1
- package/console-app/assets/pegDiagram-2B236MQR-CbqiI_m5.js +0 -1
- package/console-app/assets/pie-RZYD4A2V-VZXoX73g.js +0 -1
- package/console-app/assets/pieDiagram-ENE6RG2P-SA-sCnrt.js +0 -39
- package/console-app/assets/radar-I7S5WNFK-W0UH9BdP.js +0 -1
- package/console-app/assets/railroad-3IZDKUUU-_HEtbruA.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-ghLnUEfg.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-D8JHCZD5.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-C9eC4l2D.js +0 -1
- package/console-app/assets/railroadDiagram-RFXS5EU6-Cm2SfP9Z.js +0 -1
- package/console-app/assets/sequenceDiagram-DBY2YBRQ-B2AvEvXu.js +0 -162
- package/console-app/assets/src-72nNqhBu.js +0 -1
- package/console-app/assets/stateDiagram-2N3HPSRC-vgyc-CMC.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-B2WCkCZh.js +0 -1
- package/console-app/assets/swimlanes-5IMT3BWC-GiOMMhZh.js +0 -2
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CkCbtoLb.js +0 -8
- package/console-app/assets/timeline-definition-FHXFAJF6-DTJQsTn8.js +0 -120
- package/console-app/assets/treeView-QDETBFTQ-aizmbgl7.js +0 -1
- package/console-app/assets/treemap-6X3UGDF4-DIBl6bfV.js +0 -1
- package/console-app/assets/vennDiagram-L72KCM5P-C4Ngu7VX.js +0 -34
- package/console-app/assets/wardley-OPB4EBWU-BqdXyJTm.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/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/{PikkuFunctionTypesInput.schema.json → PikkuGatewayTypesInput.schema.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuTanStackStart: 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 pikkuTanStackStart: 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,4 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
3
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
4
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuWebSocketTyped: 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 pikkuWebSocketTyped: 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,4 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
3
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
4
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SurfaceDoc, SurfaceEntryPointId } from './surface-doc.types.js';
|
|
2
|
+
/** The specifier an application reaches its generated leaves through. */
|
|
3
|
+
export declare const PIKKU_IMPORTS_SUBPATH = "#pikku/*";
|
|
4
|
+
export declare class MissingSurfaceEditorialError extends Error {
|
|
5
|
+
constructor(entryPoint: SurfaceEntryPointId, leaves: string[]);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A generated project — an application or an addon — whose `.pikku` tree has
|
|
9
|
+
* been written and whose package.json maps `#pikku/*` onto it.
|
|
10
|
+
*/
|
|
11
|
+
export type SurfaceProject = {
|
|
12
|
+
projectDir: string;
|
|
13
|
+
/** The generated tree, so a symbol declared inside it reads as `generated`. */
|
|
14
|
+
outDir?: string;
|
|
15
|
+
};
|
|
16
|
+
export type BuildSurfaceDocOptions = {
|
|
17
|
+
/** The `@pikku/cli` version the doc describes. */
|
|
18
|
+
version: string;
|
|
19
|
+
app: SurfaceProject;
|
|
20
|
+
addon: SurfaceProject;
|
|
21
|
+
};
|
|
22
|
+
export declare const buildSurfaceDoc: ({ version, app, addon, }: BuildSurfaceDocOptions) => Promise<SurfaceDoc>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
3
|
+
import { collectSurface } from './collect-surface.js';
|
|
4
|
+
import { ENTRY_POINT_EDITORIAL, LEAF_EDITORIAL, } from './surface-editorial.js';
|
|
5
|
+
/** The specifier an application reaches its generated leaves through. */
|
|
6
|
+
export const PIKKU_IMPORTS_SUBPATH = '#pikku/*';
|
|
7
|
+
const CORE_PACKAGE_NAME = '@pikku/core';
|
|
8
|
+
const STEP_ORDER = [
|
|
9
|
+
'create a function',
|
|
10
|
+
'enhance it',
|
|
11
|
+
'wire it up',
|
|
12
|
+
'guard it',
|
|
13
|
+
'orchestrate it',
|
|
14
|
+
'test it',
|
|
15
|
+
];
|
|
16
|
+
export class MissingSurfaceEditorialError extends Error {
|
|
17
|
+
constructor(entryPoint, leaves) {
|
|
18
|
+
super(`The ${entryPoint} surface has ${leaves.length} leaf${leaves.length === 1 ? '' : 'es'} with no editorial entry: ${leaves.join(', ')}. Add ${leaves.length === 1 ? 'it' : 'them'} to LEAF_EDITORIAL in src/functions/surface/surface-editorial.ts.`);
|
|
19
|
+
this.name = 'MissingSurfaceEditorialError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const readPackageJson = (path) => {
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const nearestPackage = (file) => {
|
|
31
|
+
let directory = dirname(file);
|
|
32
|
+
for (;;) {
|
|
33
|
+
const candidate = join(directory, 'package.json');
|
|
34
|
+
if (existsSync(candidate)) {
|
|
35
|
+
const packageJson = readPackageJson(candidate);
|
|
36
|
+
if (packageJson?.name)
|
|
37
|
+
return { dir: directory, packageJson };
|
|
38
|
+
}
|
|
39
|
+
const parent = dirname(directory);
|
|
40
|
+
if (parent === directory)
|
|
41
|
+
return null;
|
|
42
|
+
directory = parent;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const isInside = (parent, child) => {
|
|
46
|
+
const rel = relative(parent, child);
|
|
47
|
+
return rel.length > 0 && !rel.startsWith('..') && !rel.startsWith(sep);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Which `@pikku/core` subpath a declaration sits behind. The declaring file is
|
|
51
|
+
* usually deeper than the entry the leaf re-exported — `wireHTTP` is declared in
|
|
52
|
+
* `src/wirings/http/http-runner.ts`, not in the `./http` entry — so the longest
|
|
53
|
+
* declared subpath that prefixes the path wins, and the package root is the
|
|
54
|
+
* answer when none does.
|
|
55
|
+
*/
|
|
56
|
+
const coreSubpathOf = (packageDir, packageJson, file) => {
|
|
57
|
+
const declared = new Set(Object.keys(packageJson.exports ?? {}).filter((key) => key.startsWith('./') && !key.includes('*')));
|
|
58
|
+
const segments = relative(packageDir, file)
|
|
59
|
+
.split(sep)
|
|
60
|
+
.filter((segment) => segment !== 'src' && segment !== 'dist');
|
|
61
|
+
// Wirings live one directory down from the subpath that publishes them.
|
|
62
|
+
const meaningful = segments[0] === 'wirings' ? segments.slice(1) : segments;
|
|
63
|
+
for (let length = Math.min(meaningful.length, 2); length > 0; length--) {
|
|
64
|
+
const candidate = `./${meaningful.slice(0, length).join('/')}`;
|
|
65
|
+
if (declared.has(candidate))
|
|
66
|
+
return candidate;
|
|
67
|
+
}
|
|
68
|
+
return '.';
|
|
69
|
+
};
|
|
70
|
+
const originOf = (declaredIn, generatedRoot) => {
|
|
71
|
+
if (!declaredIn)
|
|
72
|
+
return { via: 'generated' };
|
|
73
|
+
if (generatedRoot && isInside(generatedRoot, declaredIn)) {
|
|
74
|
+
return { via: 'generated' };
|
|
75
|
+
}
|
|
76
|
+
const owner = nearestPackage(declaredIn);
|
|
77
|
+
if (!owner)
|
|
78
|
+
return { via: 'generated' };
|
|
79
|
+
const packageName = owner.packageJson.name;
|
|
80
|
+
if (packageName === CORE_PACKAGE_NAME) {
|
|
81
|
+
return {
|
|
82
|
+
via: 'core',
|
|
83
|
+
subpath: coreSubpathOf(owner.dir, owner.packageJson, declaredIn),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return { via: 'package', packageName };
|
|
87
|
+
};
|
|
88
|
+
const toDocSymbols = (entrypoint, generatedRoot) => [...entrypoint.symbols]
|
|
89
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
90
|
+
.map((symbol) => ({
|
|
91
|
+
name: symbol.name,
|
|
92
|
+
kind: symbol.kind,
|
|
93
|
+
origin: originOf(symbol.declaredIn, generatedRoot),
|
|
94
|
+
...(symbol.summary ? { summary: symbol.summary } : {}),
|
|
95
|
+
...(symbol.docs ? { docs: symbol.docs } : {}),
|
|
96
|
+
...(symbol.deprecated
|
|
97
|
+
? { deprecated: symbol.deprecatedReason ?? 'Deprecated' }
|
|
98
|
+
: {}),
|
|
99
|
+
}));
|
|
100
|
+
const byStepThenName = (a, b) => STEP_ORDER.indexOf(a.step) - STEP_ORDER.indexOf(b.step) ||
|
|
101
|
+
a.name.localeCompare(b.name);
|
|
102
|
+
const leafNameOf = (subpath) => subpath
|
|
103
|
+
.replace(/^#pikku\//, '')
|
|
104
|
+
.replace(/^\.\//, '')
|
|
105
|
+
// An addon's whole tree roots under `addon/`, so the prefix locates a leaf
|
|
106
|
+
// rather than naming one — `#pikku/addon/http` is the http leaf as an addon
|
|
107
|
+
// reaches it. The application's install leaf is bare `addon` and stays.
|
|
108
|
+
.replace(/^addon\/(?=.)/, '');
|
|
109
|
+
const toLeaves = (entryPoint, entrypoints, editorial, generatedRoot) => {
|
|
110
|
+
const leaves = [];
|
|
111
|
+
const missing = [];
|
|
112
|
+
for (const entrypoint of entrypoints) {
|
|
113
|
+
const name = leafNameOf(entrypoint.subpath);
|
|
114
|
+
const copy = editorial(entrypoint.subpath);
|
|
115
|
+
if (!copy) {
|
|
116
|
+
missing.push(name);
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
leaves.push({
|
|
120
|
+
specifier: entrypoint.specifier,
|
|
121
|
+
name,
|
|
122
|
+
step: copy.step,
|
|
123
|
+
summary: copy.summary,
|
|
124
|
+
symbols: toDocSymbols(entrypoint, generatedRoot),
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (missing.length > 0) {
|
|
128
|
+
throw new MissingSurfaceEditorialError(entryPoint, missing.sort());
|
|
129
|
+
}
|
|
130
|
+
return leaves.sort(byStepThenName);
|
|
131
|
+
};
|
|
132
|
+
const projectEntryPoint = async (id, project) => {
|
|
133
|
+
const projectDir = resolve(project.projectDir);
|
|
134
|
+
const generatedRoot = resolve(project.outDir ?? join(projectDir, '.pikku'));
|
|
135
|
+
const entrypoints = await collectSurface(projectDir, {
|
|
136
|
+
importsSubpath: PIKKU_IMPORTS_SUBPATH,
|
|
137
|
+
});
|
|
138
|
+
return {
|
|
139
|
+
id,
|
|
140
|
+
...ENTRY_POINT_EDITORIAL[id],
|
|
141
|
+
specifierBase: '#pikku',
|
|
142
|
+
leaves: toLeaves(id, entrypoints, (subpath) => LEAF_EDITORIAL[leafNameOf(subpath)], generatedRoot),
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export const buildSurfaceDoc = async ({ version, app, addon, }) => ({
|
|
146
|
+
version,
|
|
147
|
+
entryPoints: [
|
|
148
|
+
await projectEntryPoint('app', app),
|
|
149
|
+
await projectEntryPoint('addon', addon),
|
|
150
|
+
],
|
|
151
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SurfaceUsageCounts } from '@pikku/inspector';
|
|
2
|
+
import type { SurfaceDoc, SurfaceUsage } from './surface-doc.types.js';
|
|
3
|
+
export type MergeSurfaceUsageOptions = {
|
|
4
|
+
/** Counted by the inspector during the sweep it already makes. */
|
|
5
|
+
counts: SurfaceUsageCounts;
|
|
6
|
+
/**
|
|
7
|
+
* Seeds the result, so an export nothing imports is reported as `imports: 0`
|
|
8
|
+
* rather than being absent. Without it only what was seen is reported.
|
|
9
|
+
*/
|
|
10
|
+
doc?: SurfaceDoc;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The per-project overlay: the inspector's raw counters, seeded with every
|
|
14
|
+
* export the shipped doc describes and given a stable ordering.
|
|
15
|
+
*/
|
|
16
|
+
export declare const mergeSurfaceUsage: ({ counts, doc, }: MergeSurfaceUsageOptions) => SurfaceUsage;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-project overlay: the inspector's raw counters, seeded with every
|
|
3
|
+
* export the shipped doc describes and given a stable ordering.
|
|
4
|
+
*/
|
|
5
|
+
export const mergeSurfaceUsage = ({ counts, doc, }) => {
|
|
6
|
+
const bySpecifier = {};
|
|
7
|
+
for (const entryPoint of doc?.entryPoints ?? []) {
|
|
8
|
+
for (const leaf of entryPoint.leaves) {
|
|
9
|
+
if (!leaf.specifier.startsWith('#pikku/'))
|
|
10
|
+
continue;
|
|
11
|
+
const symbols = (bySpecifier[leaf.specifier] ??= {});
|
|
12
|
+
for (const symbol of leaf.symbols) {
|
|
13
|
+
symbols[symbol.name] ??= { imports: 0, seenIn: [], files: [] };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (const [specifier, symbols] of Object.entries(counts)) {
|
|
18
|
+
const merged = (bySpecifier[specifier] ??= {});
|
|
19
|
+
for (const [name, usage] of Object.entries(symbols)) {
|
|
20
|
+
merged[name] = {
|
|
21
|
+
imports: usage.imports,
|
|
22
|
+
seenIn: [...usage.seenIn].sort(),
|
|
23
|
+
files: [...usage.files].sort(),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
bySpecifier: Object.fromEntries(Object.entries(bySpecifier)
|
|
29
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
30
|
+
.map(([specifier, symbols]) => [
|
|
31
|
+
specifier,
|
|
32
|
+
Object.fromEntries(Object.entries(symbols).sort(([a], [b]) => a.localeCompare(b))),
|
|
33
|
+
])),
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -3,7 +3,15 @@ export type SurfaceSymbol = {
|
|
|
3
3
|
name: string;
|
|
4
4
|
kind: SurfaceKind;
|
|
5
5
|
declaredAt: string;
|
|
6
|
+
/** Absolute path of the declaring file, or null when it could not be found. */
|
|
7
|
+
declaredIn: string | null;
|
|
6
8
|
deprecated: boolean;
|
|
9
|
+
/** The text of the `@deprecated` tag, when it carries one. */
|
|
10
|
+
deprecatedReason?: string;
|
|
11
|
+
/** First paragraph of the symbol's JSDoc. */
|
|
12
|
+
summary?: string;
|
|
13
|
+
/** The symbol's JSDoc in full, paragraphs and examples included. */
|
|
14
|
+
docs?: string;
|
|
7
15
|
};
|
|
8
16
|
export type SurfaceEntrypoint = {
|
|
9
17
|
subpath: string;
|
|
@@ -11,4 +19,14 @@ export type SurfaceEntrypoint = {
|
|
|
11
19
|
entryFile: string;
|
|
12
20
|
symbols: SurfaceSymbol[];
|
|
13
21
|
};
|
|
14
|
-
export
|
|
22
|
+
export type CollectSurfaceOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* Read the package's `imports` map instead of its `exports` map, taking the
|
|
25
|
+
* one key given — `#pikku/*` is what an application reaches its generated
|
|
26
|
+
* leaves through, and it is a private specifier rather than a published one.
|
|
27
|
+
*/
|
|
28
|
+
importsSubpath?: string;
|
|
29
|
+
/** Restrict collection to these subpaths, so the program stays small. */
|
|
30
|
+
subpaths?: string[];
|
|
31
|
+
};
|
|
32
|
+
export declare const collectSurface: (packageDir: string, { importsSubpath, subpaths }?: CollectSurfaceOptions) => Promise<SurfaceEntrypoint[]>;
|
|
@@ -44,10 +44,19 @@ const sourceForTarget = (packageDir, target, outDir) => {
|
|
|
44
44
|
}
|
|
45
45
|
return null;
|
|
46
46
|
};
|
|
47
|
-
const expandWildcard = (packageDir, subpath, target) => {
|
|
47
|
+
const expandWildcard = (packageDir, subpath, target, outDir) => {
|
|
48
48
|
const targetDir = target.replace(/^\.\//, '').split('*')[0] ?? '';
|
|
49
49
|
const suffix = target.slice(target.indexOf('*') + 1);
|
|
50
|
-
const
|
|
50
|
+
const suffixStem = wildcardStem(suffix) ?? suffix;
|
|
51
|
+
// A package that points its subpaths at the build output has nothing to walk
|
|
52
|
+
// until it is built, so the sources the output would be compiled from stand
|
|
53
|
+
// in for it. `sourceForTarget` strips the same prefix, so the target stays
|
|
54
|
+
// the declared one and only the directory being read changes.
|
|
55
|
+
const scanDir = existsSync(join(packageDir, targetDir)) ||
|
|
56
|
+
!targetDir.startsWith(`${outDir}/`)
|
|
57
|
+
? targetDir
|
|
58
|
+
: targetDir.slice(outDir.length + 1);
|
|
59
|
+
const absolute = join(packageDir, scanDir);
|
|
51
60
|
if (!existsSync(absolute))
|
|
52
61
|
return [];
|
|
53
62
|
const expanded = [];
|
|
@@ -59,14 +68,25 @@ const expandWildcard = (packageDir, subpath, target) => {
|
|
|
59
68
|
}
|
|
60
69
|
if (!entry.isFile())
|
|
61
70
|
continue;
|
|
62
|
-
if (
|
|
71
|
+
if (wildcardStem(entry.name) === null)
|
|
63
72
|
continue;
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
// The suffix is matched against the path the wildcard stands in for, not
|
|
74
|
+
// the file name, so `#pikku/*` → `./.pikku/*/index.ts` captures the leaf
|
|
75
|
+
// directory rather than failing to match `index.ts` against `/index.ts`.
|
|
76
|
+
const relativePath = `${prefix}${entry.name}`;
|
|
77
|
+
// Matched without extensions, so a `*/index.js` target still finds the
|
|
78
|
+
// `index.ts` it would have been compiled from.
|
|
79
|
+
const pathStem = `${prefix}${wildcardStem(entry.name)}`;
|
|
80
|
+
if (suffixStem && !pathStem.endsWith(suffixStem))
|
|
81
|
+
continue;
|
|
82
|
+
const captured = suffixStem
|
|
83
|
+
? pathStem.slice(0, -suffixStem.length)
|
|
84
|
+
: pathStem;
|
|
85
|
+
if (!captured)
|
|
66
86
|
continue;
|
|
67
87
|
expanded.push({
|
|
68
|
-
subpath: subpath.replace('*',
|
|
69
|
-
target: `${
|
|
88
|
+
subpath: subpath.replace('*', captured),
|
|
89
|
+
target: `${scanDir}${relativePath}`,
|
|
70
90
|
});
|
|
71
91
|
}
|
|
72
92
|
};
|
|
@@ -76,6 +96,16 @@ const expandWildcard = (packageDir, subpath, target) => {
|
|
|
76
96
|
const targetOf = (value) => {
|
|
77
97
|
if (typeof value === 'string')
|
|
78
98
|
return value;
|
|
99
|
+
// A fallback array declares the same specifier several ways; the first entry
|
|
100
|
+
// is the one a resolver reaches for, and the rest only matter when it misses.
|
|
101
|
+
if (Array.isArray(value)) {
|
|
102
|
+
for (const candidate of value) {
|
|
103
|
+
const resolved = targetOf(candidate);
|
|
104
|
+
if (resolved)
|
|
105
|
+
return resolved;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
79
109
|
if (!value || typeof value !== 'object')
|
|
80
110
|
return null;
|
|
81
111
|
const conditions = value;
|
|
@@ -140,6 +170,45 @@ const kindOf = (symbol, checker) => {
|
|
|
140
170
|
return 'const';
|
|
141
171
|
};
|
|
142
172
|
const isDeprecated = (symbol) => symbol.getJsDocTags().some((tag) => tag.name === 'deprecated');
|
|
173
|
+
const deprecationReason = (symbol) => {
|
|
174
|
+
const tag = symbol.getJsDocTags().find((each) => each.name === 'deprecated');
|
|
175
|
+
if (!tag)
|
|
176
|
+
return undefined;
|
|
177
|
+
const text = ts.displayPartsToString(tag.text).trim();
|
|
178
|
+
return text.length > 0 ? text : undefined;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* The doc comment as written. A leaf re-exports through `export *`, so the
|
|
182
|
+
* symbol reached here is an alias carrying no documentation of its own, and an
|
|
183
|
+
* overloaded function documents whichever overload the author chose to explain
|
|
184
|
+
* — hence the walk through the aliased symbol and then every declaration.
|
|
185
|
+
*/
|
|
186
|
+
const documentationOf = (symbol, checker) => {
|
|
187
|
+
const targets = [symbol];
|
|
188
|
+
if (symbol.flags & ts.SymbolFlags.Alias) {
|
|
189
|
+
targets.push(checker.getAliasedSymbol(symbol));
|
|
190
|
+
}
|
|
191
|
+
for (const target of targets) {
|
|
192
|
+
const documentation = ts
|
|
193
|
+
.displayPartsToString(target.getDocumentationComment(checker))
|
|
194
|
+
.trim();
|
|
195
|
+
if (documentation.length > 0)
|
|
196
|
+
return documentation;
|
|
197
|
+
}
|
|
198
|
+
return undefined;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* The first paragraph of the doc comment. A symbol's JSDoc regularly runs to
|
|
202
|
+
* several paragraphs of examples, and a list row shows one line.
|
|
203
|
+
*/
|
|
204
|
+
const summaryOf = (documentation) => {
|
|
205
|
+
if (!documentation)
|
|
206
|
+
return undefined;
|
|
207
|
+
return documentation
|
|
208
|
+
.split(/\n\s*\n/)[0]
|
|
209
|
+
.replace(/\s+/g, ' ')
|
|
210
|
+
.trim();
|
|
211
|
+
};
|
|
143
212
|
const declarationFileOf = (symbol, checker) => {
|
|
144
213
|
const target = symbol.flags & ts.SymbolFlags.Alias
|
|
145
214
|
? checker.getAliasedSymbol(symbol)
|
|
@@ -147,34 +216,47 @@ const declarationFileOf = (symbol, checker) => {
|
|
|
147
216
|
const declaration = target.declarations?.[0] ?? symbol.declarations?.[0];
|
|
148
217
|
return declaration?.getSourceFile().fileName ?? null;
|
|
149
218
|
};
|
|
150
|
-
export const collectSurface = async (packageDir) => {
|
|
219
|
+
export const collectSurface = async (packageDir, { importsSubpath, subpaths } = {}) => {
|
|
151
220
|
const root = resolve(packageDir);
|
|
152
221
|
const packageJson = await readJson(join(root, 'package.json'));
|
|
153
|
-
if (!packageJson
|
|
222
|
+
if (!packageJson)
|
|
223
|
+
return [];
|
|
224
|
+
const declaredMap = importsSubpath
|
|
225
|
+
? packageJson.imports?.[importsSubpath] !== undefined
|
|
226
|
+
? { [importsSubpath]: packageJson.imports[importsSubpath] }
|
|
227
|
+
: {}
|
|
228
|
+
: packageJson.exports
|
|
229
|
+
? subpathMap(packageJson.exports)
|
|
230
|
+
: {};
|
|
231
|
+
if (Object.keys(declaredMap).length === 0)
|
|
154
232
|
return [];
|
|
155
233
|
const { outDir, paths } = await readCompilerOptions(root);
|
|
156
234
|
const packageName = packageJson.name ?? '';
|
|
157
235
|
const entries = [];
|
|
158
236
|
const seenEntryFiles = new Set();
|
|
159
|
-
for (const [subpath, value] of Object.entries(
|
|
160
|
-
if (!subpath.startsWith('.'))
|
|
237
|
+
for (const [subpath, value] of Object.entries(declaredMap)) {
|
|
238
|
+
if (!importsSubpath && !subpath.startsWith('.'))
|
|
161
239
|
continue;
|
|
162
240
|
const target = targetOf(value);
|
|
163
241
|
if (!target || !publishesCode(target))
|
|
164
242
|
continue;
|
|
165
243
|
const declared = target.includes('*')
|
|
166
|
-
? expandWildcard(root, subpath, target)
|
|
244
|
+
? expandWildcard(root, subpath, target, outDir)
|
|
167
245
|
: [{ subpath, target }];
|
|
168
246
|
for (const each of declared) {
|
|
247
|
+
if (subpaths && !subpaths.includes(each.subpath))
|
|
248
|
+
continue;
|
|
169
249
|
const entryFile = sourceForTarget(root, each.target, outDir);
|
|
170
250
|
if (!entryFile || seenEntryFiles.has(entryFile))
|
|
171
251
|
continue;
|
|
172
252
|
seenEntryFiles.add(entryFile);
|
|
173
253
|
entries.push({
|
|
174
254
|
subpath: each.subpath,
|
|
175
|
-
specifier:
|
|
176
|
-
?
|
|
177
|
-
:
|
|
255
|
+
specifier: importsSubpath
|
|
256
|
+
? each.subpath
|
|
257
|
+
: each.subpath === '.'
|
|
258
|
+
? packageName
|
|
259
|
+
: `${packageName}${each.subpath.slice(1)}`,
|
|
178
260
|
entryFile,
|
|
179
261
|
});
|
|
180
262
|
}
|
|
@@ -203,11 +285,17 @@ export const collectSurface = async (packageDir) => {
|
|
|
203
285
|
? checker.getExportsOfModule(moduleSymbol)
|
|
204
286
|
: []) {
|
|
205
287
|
const file = declarationFileOf(symbol, checker);
|
|
288
|
+
const kind = kindOf(symbol, checker);
|
|
289
|
+
const docs = documentationOf(symbol, checker);
|
|
206
290
|
symbols.push({
|
|
207
291
|
name: symbol.getName(),
|
|
208
|
-
kind
|
|
292
|
+
kind,
|
|
209
293
|
declaredAt: file ? relative(root, file) : entry.entryFile,
|
|
294
|
+
declaredIn: file,
|
|
210
295
|
deprecated: isDeprecated(symbol),
|
|
296
|
+
deprecatedReason: deprecationReason(symbol),
|
|
297
|
+
summary: summaryOf(docs),
|
|
298
|
+
docs,
|
|
211
299
|
});
|
|
212
300
|
}
|
|
213
301
|
return { ...entry, symbols };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { getCLIVersion } from '../../utils/get-cli-version.js';
|
|
5
|
+
import { buildSurfaceDoc } from './build-surface-doc.js';
|
|
6
|
+
/**
|
|
7
|
+
* Build-time entry point: `@pikku/cli` ships the surface doc, so it is computed
|
|
8
|
+
* once when the CLI is built rather than by every project that consumes it.
|
|
9
|
+
* `build.sh` generates the two projects it reads — one application, one addon —
|
|
10
|
+
* and points this at them.
|
|
11
|
+
*/
|
|
12
|
+
const usage = `Usage: generate-surface-doc --app <dir> --addon <dir> --out <file>`;
|
|
13
|
+
const parseArgs = (argv) => {
|
|
14
|
+
const parsed = {};
|
|
15
|
+
for (let index = 0; index < argv.length; index += 2) {
|
|
16
|
+
const flag = argv[index];
|
|
17
|
+
const value = argv[index + 1];
|
|
18
|
+
if (!flag?.startsWith('--') || value === undefined) {
|
|
19
|
+
throw new Error(usage);
|
|
20
|
+
}
|
|
21
|
+
parsed[flag.slice(2)] = value;
|
|
22
|
+
}
|
|
23
|
+
return parsed;
|
|
24
|
+
};
|
|
25
|
+
const main = async (argv) => {
|
|
26
|
+
const args = parseArgs(argv);
|
|
27
|
+
const { app, addon, out } = args;
|
|
28
|
+
if (!app || !addon || !out)
|
|
29
|
+
throw new Error(usage);
|
|
30
|
+
const doc = await buildSurfaceDoc({
|
|
31
|
+
version: getCLIVersion(),
|
|
32
|
+
app: { projectDir: app },
|
|
33
|
+
addon: { projectDir: addon },
|
|
34
|
+
});
|
|
35
|
+
const outFile = resolve(out);
|
|
36
|
+
await mkdir(dirname(outFile), { recursive: true });
|
|
37
|
+
await writeFile(outFile, `${JSON.stringify(doc, null, 2)}\n`, 'utf8');
|
|
38
|
+
for (const entryPoint of doc.entryPoints) {
|
|
39
|
+
const symbols = entryPoint.leaves.reduce((total, leaf) => total + leaf.symbols.length, 0);
|
|
40
|
+
process.stdout.write(` ${entryPoint.id}: ${entryPoint.leaves.length} leaves, ${symbols} exports\n`);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
if (process.argv[1] &&
|
|
44
|
+
resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
45
|
+
await main(process.argv.slice(2));
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SurfaceDoc } from './surface-doc.types.js';
|
|
2
|
+
/** The name the doc is published under, inside the `@pikku/cli` package. */
|
|
3
|
+
export declare const SURFACE_DOC_FILE = "surface.json";
|
|
4
|
+
/**
|
|
5
|
+
* Where the shipped surface doc lives. It sits at the root of the `@pikku/cli`
|
|
6
|
+
* package, so a consumer outside this repository resolves it as
|
|
7
|
+
* `@pikku/cli/surface.json` — from in here the package root has to be walked to,
|
|
8
|
+
* because this module runs both from `src` and from `dist/src`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const shippedSurfaceDocPath: () => string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The doc is built with the CLI, so a CLI running out of a source checkout that
|
|
13
|
+
* has never been built has none. That is a reason to skip seeding the usage
|
|
14
|
+
* overlay, not a reason to fail a prebuild.
|
|
15
|
+
*/
|
|
16
|
+
export declare const readShippedSurfaceDoc: () => SurfaceDoc | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
/** The name the doc is published under, inside the `@pikku/cli` package. */
|
|
5
|
+
export const SURFACE_DOC_FILE = 'surface.json';
|
|
6
|
+
/**
|
|
7
|
+
* Where the shipped surface doc lives. It sits at the root of the `@pikku/cli`
|
|
8
|
+
* package, so a consumer outside this repository resolves it as
|
|
9
|
+
* `@pikku/cli/surface.json` — from in here the package root has to be walked to,
|
|
10
|
+
* because this module runs both from `src` and from `dist/src`.
|
|
11
|
+
*/
|
|
12
|
+
export const shippedSurfaceDocPath = () => {
|
|
13
|
+
let directory = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
for (;;) {
|
|
15
|
+
// The first package.json above this module is the CLI's own, whether it is
|
|
16
|
+
// running from `src` or from `dist/src`. Stopping there rather than looking
|
|
17
|
+
// for the file itself keeps the search from wandering into a consumer's
|
|
18
|
+
// project and finding an unrelated surface.json.
|
|
19
|
+
if (existsSync(join(directory, 'package.json'))) {
|
|
20
|
+
const path = join(directory, SURFACE_DOC_FILE);
|
|
21
|
+
return existsSync(path) ? path : null;
|
|
22
|
+
}
|
|
23
|
+
const parent = dirname(directory);
|
|
24
|
+
if (parent === directory)
|
|
25
|
+
return null;
|
|
26
|
+
directory = parent;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The doc is built with the CLI, so a CLI running out of a source checkout that
|
|
31
|
+
* has never been built has none. That is a reason to skip seeding the usage
|
|
32
|
+
* overlay, not a reason to fail a prebuild.
|
|
33
|
+
*/
|
|
34
|
+
export const readShippedSurfaceDoc = () => {
|
|
35
|
+
const path = shippedSurfaceDocPath();
|
|
36
|
+
if (!path)
|
|
37
|
+
return null;
|
|
38
|
+
try {
|
|
39
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { SurfaceKind } from './collect-surface.js';
|
|
2
|
+
export type { SurfaceKind };
|
|
3
|
+
/**
|
|
4
|
+
* The order in which you meet these doors while building a service. It is the
|
|
5
|
+
* page's spine: the console groups by it and the reading order follows it.
|
|
6
|
+
*/
|
|
7
|
+
export type SurfaceStep = 'create a function' | 'enhance it' | 'wire it up' | 'guard it' | 'orchestrate it' | 'test it';
|
|
8
|
+
export type SurfaceOrigin = {
|
|
9
|
+
via: 'generated';
|
|
10
|
+
} | {
|
|
11
|
+
via: 'core';
|
|
12
|
+
subpath: string;
|
|
13
|
+
} | {
|
|
14
|
+
via: 'package';
|
|
15
|
+
packageName: string;
|
|
16
|
+
};
|
|
17
|
+
export type SurfaceDocSymbol = {
|
|
18
|
+
name: string;
|
|
19
|
+
kind: SurfaceKind;
|
|
20
|
+
origin: SurfaceOrigin;
|
|
21
|
+
/** One line, for a list row. */
|
|
22
|
+
summary?: string;
|
|
23
|
+
/** The full documentation, for the panel that reads one export. */
|
|
24
|
+
docs?: string;
|
|
25
|
+
deprecated?: string;
|
|
26
|
+
};
|
|
27
|
+
export type SurfaceLeaf = {
|
|
28
|
+
/** The specifier you import from, e.g. `#pikku/http`. */
|
|
29
|
+
specifier: string;
|
|
30
|
+
name: string;
|
|
31
|
+
step: SurfaceStep;
|
|
32
|
+
summary: string;
|
|
33
|
+
symbols: SurfaceDocSymbol[];
|
|
34
|
+
};
|
|
35
|
+
export type SurfaceEntryPointId = 'app' | 'addon';
|
|
36
|
+
export type SurfaceEntryPoint = {
|
|
37
|
+
id: SurfaceEntryPointId;
|
|
38
|
+
/** What someone reaching for this entry point is trying to do. */
|
|
39
|
+
job: string;
|
|
40
|
+
specifierBase: string;
|
|
41
|
+
summary: string;
|
|
42
|
+
leaves: SurfaceLeaf[];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Metadata about the framework itself rather than about any one project: which
|
|
46
|
+
* leaves an application gets, which an addon gets, and what each one exports.
|
|
47
|
+
* It is computed when `@pikku/cli` is built and published inside it, so a
|
|
48
|
+
* consumer reads it at `@pikku/cli/surface.json` without generating anything.
|
|
49
|
+
*/
|
|
50
|
+
export type SurfaceDoc = {
|
|
51
|
+
/** The `@pikku/cli` version this surface was computed from. */
|
|
52
|
+
version: string;
|
|
53
|
+
entryPoints: SurfaceEntryPoint[];
|
|
54
|
+
};
|
|
55
|
+
export type SurfaceSymbolUsage = {
|
|
56
|
+
imports: number;
|
|
57
|
+
/** The workspace packages or top-level source directories it is imported in. */
|
|
58
|
+
seenIn: string[];
|
|
59
|
+
/** The project-relative files the imports are written in. */
|
|
60
|
+
files: string[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Measured usage, keyed by specifier and then by export name. It is per-project
|
|
64
|
+
* and written at prebuild time, so the console has it and the website does not
|
|
65
|
+
* — every affordance that reads it is optional.
|
|
66
|
+
*/
|
|
67
|
+
export type SurfaceUsage = {
|
|
68
|
+
bySpecifier: Record<string, Record<string, SurfaceSymbolUsage>>;
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|