@pikku/cli 0.11.3 → 0.12.1
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/cli.schema.json +1 -1
- package/console-app/android-chrome-192x192.png +0 -0
- package/console-app/android-chrome-512x512.png +0 -0
- package/console-app/apple-touch-icon.png +0 -0
- package/console-app/assets/index-0Ui5UudO.css +1 -0
- package/console-app/assets/index-DiYPTQU_.js +676 -0
- package/console-app/favicon-16x16.png +0 -0
- package/console-app/favicon-32x32.png +0 -0
- package/console-app/favicon.ico +0 -0
- package/console-app/index.html +34 -0
- package/console-app/pikku-console-logo.png +0 -0
- package/console-app/site.webmanifest +19 -0
- package/console-app/wiring-icons/cron.svg +6 -0
- package/console-app/wiring-icons/function.png +0 -0
- package/console-app/wiring-icons/http.svg +2 -0
- package/console-app/wiring-icons/mcp.svg +1 -0
- package/console-app/wiring-icons/queue.svg +18 -0
- package/console-app/wiring-icons/sse.svg +5 -0
- package/console-app/wiring-icons/websocket.svg +8 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +46 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.js +17 -0
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +6 -0
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +3 -0
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +4 -0
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +4 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +27 -14
- package/dist/.pikku/channel/pikku-channel-types.gen.js +21 -4
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +2 -2
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +72 -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-types.gen.d.ts +9 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +12 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +261 -11
- 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 -5
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -5
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +6 -0
- package/dist/.pikku/console/pikku-node-types.gen.js +1 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +83 -29
- package/dist/.pikku/function/pikku-function-types.gen.js +51 -15
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +896 -192
- package/dist/.pikku/function/pikku-functions.gen.d.ts +1 -0
- package/dist/.pikku/function/pikku-functions.gen.js +119 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +55 -19
- package/dist/.pikku/http/pikku-http-types.gen.js +11 -2
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +2 -2
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +26 -27
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +2 -12
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +2 -2
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +2 -2
- package/dist/.pikku/node/pikku-node-types.gen.d.ts +1 -0
- package/dist/.pikku/node/pikku-node-types.gen.js +1 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +5 -4
- package/dist/.pikku/pikku-bootstrap.gen.js +13 -2
- package/dist/.pikku/pikku-services.gen.d.ts +6 -1
- package/dist/.pikku/pikku-services.gen.js +5 -0
- package/dist/.pikku/pikku-types.gen.d.ts +4 -2
- package/dist/.pikku/pikku-types.gen.js +7 -3
- package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
- package/dist/.pikku/pikku-websocket.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +2 -2
- 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-remote-rpc-workers.gen.d.ts +3 -3
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +3 -3
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +6 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +70 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +2 -2
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +2 -2
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +43 -19
- package/dist/.pikku/schemas/schemas/BootstrapInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ConsoleCommandInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuAIAgentOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuConsoleFunctionsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuFunctionsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuHTTPOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuMCPOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuMiddlewareOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuNewAddonInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewFunctionInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewMiddlewareInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewPermissionInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewWiringInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNodesMetaOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuPackageOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuPermissionsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuPublicAgentOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuQueueOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuRPCOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuSchedulerOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuTriggerOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuVersionsInitInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +5 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +4 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.js +10 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +113 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +33 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +5 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.js +4 -0
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -0
- package/dist/.pikku/variables/pikku-variables.gen.js +10 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +28 -180
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +18 -106
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku.js +20 -47
- package/dist/src/cli.wiring.js +210 -2
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/all.js +83 -180
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +13 -22
- package/dist/src/functions/commands/console.d.ts +7 -0
- package/dist/src/functions/commands/console.js +106 -0
- package/dist/src/functions/commands/info.d.ts +9 -0
- package/dist/src/functions/commands/info.js +283 -0
- package/dist/src/functions/commands/new-addon.d.ts +34 -0
- package/dist/src/functions/commands/new-addon.js +636 -0
- package/dist/src/functions/commands/new-function.d.ts +10 -0
- package/dist/src/functions/commands/new-function.js +79 -0
- package/dist/src/functions/commands/new-middleware.d.ts +10 -0
- package/dist/src/functions/commands/new-middleware.js +48 -0
- package/dist/src/functions/commands/new-permission.d.ts +10 -0
- package/dist/src/functions/commands/new-permission.js +45 -0
- package/dist/src/functions/commands/new-wiring.d.ts +10 -0
- package/dist/src/functions/commands/new-wiring.js +102 -0
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +4 -0
- package/dist/src/functions/commands/pikku-command-bootstrap.js +38 -0
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -0
- package/dist/src/functions/commands/pikku-command-summary.js +55 -0
- package/dist/src/functions/commands/versions-check.d.ts +1 -0
- package/dist/src/functions/commands/versions-check.js +99 -0
- package/dist/src/functions/commands/versions-init.d.ts +7 -0
- package/dist/src/functions/commands/versions-init.js +15 -0
- package/dist/src/functions/commands/versions-update.d.ts +1 -0
- package/dist/src/functions/commands/versions-update.js +20 -0
- package/dist/src/functions/commands/watch.d.ts +1 -1
- package/dist/src/functions/commands/watch.js +4 -5
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -0
- package/dist/src/functions/{wirings → runtimes}/fetch/index.js +3 -3
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +6 -7
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +4 -16
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +4 -8
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -0
- package/dist/src/functions/{wirings/channels → runtimes/websocket}/pikku-command-websocket-typed.js +2 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +20 -0
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -0
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +68 -0
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -0
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +23 -0
- package/dist/src/functions/wirings/ai-agent/serialize-agent-map.d.ts +4 -0
- package/dist/src/functions/wirings/ai-agent/serialize-agent-map.js +48 -0
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +76 -0
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +1 -0
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +68 -0
- 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 +3 -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 +2 -2
- 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 +1 -1
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +47 -17
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +5 -4
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.js +8 -8
- 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 +3 -7
- 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 +1 -1
- 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 +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 +8 -8
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +14 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.d.ts +3 -3
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +10 -11
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -0
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +24 -0
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -0
- package/dist/src/functions/wirings/console/pikku-command-node-types.js +21 -0
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -0
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +79 -0
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -0
- package/dist/src/functions/wirings/console/serialize-console-functions.js +90 -0
- package/dist/src/functions/wirings/console/serialize-node-types.d.ts +1 -0
- package/dist/src/functions/wirings/console/serialize-node-types.js +11 -0
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -0
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +33 -0
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +6 -6
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +9 -15
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -4
- package/dist/src/functions/wirings/functions/schemas.js +8 -10
- package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +1 -0
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +78 -0
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +3 -4
- package/dist/src/functions/wirings/functions/serialize-function-imports.js +13 -20
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +126 -45
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +5 -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 +4 -4
- 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 +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +11 -9
- 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.js +65 -20
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +7 -4
- package/dist/src/functions/wirings/http/serialize-typed-http-map.js +33 -46
- 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 +5 -6
- 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 +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +14 -5
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +27 -36
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +11 -34
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +19 -24
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +2 -0
- package/dist/src/functions/wirings/package/pikku-command-package-types.js +30 -0
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.js +8 -8
- package/dist/src/functions/wirings/package/serialize-package-types.d.ts +2 -0
- package/dist/src/functions/wirings/package/serialize-package-types.js +10 -0
- package/dist/src/functions/wirings/package/serialize-package.js +2 -2
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +7 -7
- 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 +3 -3
- 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 +2 -2
- 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 +1 -1
- 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 +3 -3
- 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 +6 -3
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +12 -40
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.js +9 -10
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +14 -9
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +3 -2
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +34 -20
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +55 -8
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.d.ts +11 -3
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +106 -71
- 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 +1 -1
- 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 +2 -2
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.js +13 -12
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -0
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +31 -0
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +9 -0
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +64 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +1 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +24 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.js +40 -0
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.d.ts +5 -0
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +35 -0
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.d.ts +4 -0
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +163 -0
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -0
- package/dist/src/functions/wirings/variables/pikku-command-variables.js +31 -0
- package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +9 -0
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +53 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +8 -37
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +5 -3
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +63 -12
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +32 -33
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +4 -31
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -6
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +60 -256
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +5 -5
- package/dist/src/services/cli-logger-forwarder.service.d.ts +4 -3
- package/dist/src/services/cli-logger-forwarder.service.js +1 -1
- package/dist/src/services/cli-logger.service.d.ts +3 -2
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/services.d.ts +5 -4
- package/dist/src/services.js +53 -7
- package/dist/src/utils/check-required-types.d.ts +1 -1
- package/dist/src/utils/command-summary.d.ts +2 -1
- package/dist/src/utils/command-summary.js +2 -1
- package/dist/src/utils/contract-versions.d.ts +6 -0
- package/dist/src/utils/contract-versions.js +25 -0
- package/dist/src/utils/file-import-path.js +20 -6
- package/dist/src/utils/file-writer.d.ts +6 -1
- package/dist/src/utils/file-writer.js +14 -1
- package/dist/src/utils/generate-bootstrap-file.d.ts +2 -2
- package/dist/src/utils/openapi/codegen.d.ts +19 -0
- package/dist/src/utils/openapi/codegen.js +288 -0
- package/dist/src/utils/openapi/naming.d.ts +30 -0
- package/dist/src/utils/openapi/naming.js +167 -0
- package/dist/src/utils/openapi/parse-openapi.d.ts +36 -0
- package/dist/src/utils/openapi/parse-openapi.js +196 -0
- package/dist/src/utils/openapi/zod-codegen.d.ts +53 -0
- package/dist/src/utils/openapi/zod-codegen.js +251 -0
- package/dist/src/utils/pikku-cli-config.d.ts +2 -2
- package/dist/src/utils/pikku-cli-config.js +80 -23
- package/dist/src/utils/pikku-files-and-methods.d.ts +1 -2
- package/dist/src/utils/pikku-files-and-methods.js +15 -60
- package/dist/src/utils/serialize-import-map.d.ts +3 -2
- package/dist/src/utils/serialize-import-map.js +4 -55
- package/dist/src/utils/serialize-meta-ts.d.ts +8 -0
- package/dist/src/utils/serialize-meta-ts.js +12 -0
- package/dist/src/utils/serialize-schemas.d.ts +3 -0
- package/dist/src/utils/serialize-schemas.js +38 -0
- package/dist/src/utils/strip-verbose-meta.d.ts +5 -5
- package/dist/src/utils/strip-verbose-meta.js +15 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -10
- package/.pikku/channel/pikku-channel-types.gen.ts +0 -148
- package/.pikku/channel/pikku-channels-map.gen.d.ts +0 -47
- package/.pikku/channel/pikku-channels-meta.gen.json +0 -1
- package/.pikku/channel/pikku-channels-meta.gen.ts +0 -7
- package/.pikku/channel/pikku-channels.gen.ts +0 -4
- package/.pikku/cli/pikku-cli-channel.ts +0 -92
- package/.pikku/cli/pikku-cli-client.gen.ts +0 -54
- package/.pikku/cli/pikku-cli-types.gen.ts +0 -92
- package/.pikku/cli/pikku-cli-wirings-meta.gen.json +0 -147
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +0 -7
- package/.pikku/cli/pikku-cli-wirings.gen.ts +0 -6
- package/.pikku/cli/pikku-cli.gen.ts +0 -41
- package/.pikku/forge/pikku-forge-types.gen.ts +0 -83
- package/.pikku/function/pikku-function-types.gen.ts +0 -572
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -1030
- package/.pikku/function/pikku-functions-meta.gen.json +0 -656
- package/.pikku/function/pikku-functions-meta.gen.ts +0 -6
- package/.pikku/http/pikku-http-types.gen.ts +0 -102
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +0 -46
- package/.pikku/http/pikku-http-wirings-meta.gen.json +0 -9
- package/.pikku/http/pikku-http-wirings-meta.gen.ts +0 -7
- package/.pikku/http/pikku-http-wirings.gen.ts +0 -4
- package/.pikku/mcp/pikku-mcp-types.gen.ts +0 -192
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +0 -5
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +0 -9
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +0 -4
- package/.pikku/mcp/pikku-mcp.gen.json +0 -5
- package/.pikku/pikku-bootstrap.gen.ts +0 -17
- package/.pikku/pikku-services.gen.ts +0 -28
- package/.pikku/pikku-types.gen.ts +0 -30
- package/.pikku/pikku-websocket.gen.ts +0 -90
- package/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +0 -60
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +0 -1
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +0 -8
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +0 -4
- package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +0 -30
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +0 -62
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -105
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +0 -1
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +0 -8
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +0 -4
- package/.pikku/schemas/register.gen.ts +0 -71
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuCLIOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuForgeNodesOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuFunctionsOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuHTTPOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuMCPOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuMiddlewareOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuPackageOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuPermissionsOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuQueueOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuRPCOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuSchedulerOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +0 -1
- package/.pikku/services/config.gen.json +0 -104
- package/.pikku/services/getInspectorState.gen.json +0 -10
- package/.pikku/services/jwt.gen.json +0 -13
- package/.pikku/services/logger.gen.json +0 -25
- package/.pikku/services/queueService.gen.json +0 -14
- package/.pikku/services/schedulerService.gen.json +0 -17
- package/.pikku/services/schema.gen.json +0 -14
- package/.pikku/services/secrets.gen.json +0 -13
- package/.pikku/services/variables.gen.json +0 -13
- package/.pikku/services/workflowService.gen.json +0 -31
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -28
- package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -349
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
- package/CHANGELOG.md +0 -957
- package/bin/pikku.ts +0 -88
- package/build.sh +0 -75
- package/dist/.pikku/forge/pikku-forge-types.gen.d.ts +0 -72
- package/dist/.pikku/forge/pikku-forge-types.gen.js +0 -55
- package/dist/.pikku/schemas/schemas/PikkuForgeNodesOutput.schema.json +0 -1
- package/dist/src/functions/wirings/channels/pikku-command-websocket-typed.d.ts +0 -1
- package/dist/src/functions/wirings/fetch/index.d.ts +0 -1
- package/dist/src/functions/wirings/forge/pikku-command-forge-nodes.d.ts +0 -1
- package/dist/src/functions/wirings/forge/pikku-command-forge-nodes.js +0 -90
- package/dist/src/functions/wirings/forge/pikku-command-forge-types.d.ts +0 -1
- package/dist/src/functions/wirings/forge/pikku-command-forge-types.js +0 -26
- package/dist/src/functions/wirings/forge/serialize-forge-types.d.ts +0 -4
- package/dist/src/functions/wirings/forge/serialize-forge-types.js +0 -90
- package/dist/src/functions/wirings/functions/pikku-function-types.d.ts +0 -1
- package/dist/src/functions/wirings/functions/pikku-function-types.js +0 -18
- package/dist/src/functions/wirings/http/openapi-spec-generator.d.ts +0 -81
- package/dist/src/functions/wirings/http/openapi-spec-generator.js +0 -152
- package/dist/src/functions/wirings/mcp/serialize-mcp-json.d.ts +0 -5
- package/dist/src/functions/wirings/mcp/serialize-mcp-json.js +0 -102
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.d.ts +0 -11
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.js +0 -36
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.d.ts +0 -1
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.js +0 -22
- package/dist/src/utils/custom-types-generator.d.ts +0 -2
- package/dist/src/utils/custom-types-generator.js +0 -41
- package/dist/src/utils/schema-generator.d.ts +0 -7
- package/dist/src/utils/schema-generator.js +0 -238
- package/pikku.config.json +0 -29
- package/run-tests.sh +0 -53
- package/src/cli.wiring.ts +0 -112
- package/src/functions/commands/all.ts +0 -313
- package/src/functions/commands/bootstrap.ts +0 -35
- package/src/functions/commands/watch.ts +0 -61
- package/src/functions/runtimes/nextjs/pikku-command-nextjs.ts +0 -131
- package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +0 -282
- package/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts +0 -215
- package/src/functions/wirings/channels/pikku-channels.ts +0 -59
- package/src/functions/wirings/channels/pikku-command-channel-types.ts +0 -25
- package/src/functions/wirings/channels/pikku-command-channels-map.ts +0 -26
- package/src/functions/wirings/channels/pikku-command-channels.ts +0 -83
- package/src/functions/wirings/channels/pikku-command-websocket-typed.ts +0 -37
- package/src/functions/wirings/channels/serialize-channel-types.ts +0 -151
- package/src/functions/wirings/channels/serialize-typed-channel-map.ts +0 -173
- package/src/functions/wirings/channels/serialize-websocket-wrapper.ts +0 -89
- package/src/functions/wirings/cli/pikku-command-cli-entry.ts +0 -216
- package/src/functions/wirings/cli/pikku-command-cli-types.ts +0 -48
- package/src/functions/wirings/cli/pikku-command-cli.ts +0 -81
- package/src/functions/wirings/cli/serialize-channel-cli-client.ts +0 -184
- package/src/functions/wirings/cli/serialize-channel-cli.ts +0 -134
- package/src/functions/wirings/cli/serialize-cli-types.ts +0 -101
- package/src/functions/wirings/cli/serialize-local-cli-bootstrap.ts +0 -80
- package/src/functions/wirings/fetch/index.ts +0 -36
- package/src/functions/wirings/forge/pikku-command-forge-nodes.ts +0 -135
- package/src/functions/wirings/forge/pikku-command-forge-types.ts +0 -38
- package/src/functions/wirings/forge/serialize-forge-types.ts +0 -94
- package/src/functions/wirings/functions/pikku-command-function-types-split.ts +0 -61
- package/src/functions/wirings/functions/pikku-command-function-types.ts +0 -50
- package/src/functions/wirings/functions/pikku-command-functions.ts +0 -104
- package/src/functions/wirings/functions/pikku-command-services.ts +0 -140
- package/src/functions/wirings/functions/pikku-function-types.ts +0 -45
- package/src/functions/wirings/functions/schemas.ts +0 -56
- package/src/functions/wirings/functions/serialize-function-imports.ts +0 -80
- package/src/functions/wirings/functions/serialize-function-types.ts +0 -587
- package/src/functions/wirings/functions/serialize-pikku-types-hub.ts +0 -39
- package/src/functions/wirings/http/openapi-spec-generator.ts +0 -265
- package/src/functions/wirings/http/pikku-command-http-map.ts +0 -27
- package/src/functions/wirings/http/pikku-command-http-routes.ts +0 -80
- package/src/functions/wirings/http/pikku-command-http-types.ts +0 -25
- package/src/functions/wirings/http/pikku-command-openapi.ts +0 -64
- package/src/functions/wirings/http/pikku-http-routes.ts +0 -61
- package/src/functions/wirings/http/serialize-fetch-wrapper.ts +0 -67
- package/src/functions/wirings/http/serialize-http-types.ts +0 -105
- package/src/functions/wirings/http/serialize-typed-http-map.ts +0 -178
- package/src/functions/wirings/mcp/pikku-command-mcp-json.ts +0 -33
- package/src/functions/wirings/mcp/pikku-command-mcp-types.ts +0 -25
- package/src/functions/wirings/mcp/pikku-command-mcp.ts +0 -162
- package/src/functions/wirings/mcp/serialize-mcp-json.ts +0 -161
- package/src/functions/wirings/mcp/serialize-mcp-types.ts +0 -195
- package/src/functions/wirings/middleware/pikku-command-middleware.ts +0 -89
- package/src/functions/wirings/middleware/serialize-middleware-groups-meta.ts +0 -40
- package/src/functions/wirings/middleware/serialize-middleware-imports.ts +0 -78
- package/src/functions/wirings/package/pikku-command-package.ts +0 -81
- package/src/functions/wirings/package/serialize-package.ts +0 -69
- package/src/functions/wirings/permissions/pikku-command-permissions.ts +0 -49
- package/src/functions/wirings/permissions/serialize-permissions-imports.test.ts +0 -274
- package/src/functions/wirings/permissions/serialize-permissions-imports.ts +0 -78
- package/src/functions/wirings/queue/pikku-command-queue-map.ts +0 -26
- package/src/functions/wirings/queue/pikku-command-queue-service.ts +0 -37
- package/src/functions/wirings/queue/pikku-command-queue-types.ts +0 -25
- package/src/functions/wirings/queue/pikku-command-queue.ts +0 -86
- package/src/functions/wirings/queue/pikku-queue-map.ts +0 -26
- package/src/functions/wirings/queue/pikku-queue.ts +0 -66
- package/src/functions/wirings/queue/serialize-queue-map.ts +0 -134
- package/src/functions/wirings/queue/serialize-queue-meta.ts +0 -24
- package/src/functions/wirings/queue/serialize-queue-types.ts +0 -30
- package/src/functions/wirings/queue/serialize-queue-wrapper.ts +0 -35
- package/src/functions/wirings/rpc/pikku-command-public-rpc.ts +0 -32
- package/src/functions/wirings/rpc/pikku-command-remote-rpc.ts +0 -35
- package/src/functions/wirings/rpc/pikku-command-rpc-client.ts +0 -35
- package/src/functions/wirings/rpc/pikku-command-rpc-map.ts +0 -51
- package/src/functions/wirings/rpc/pikku-command-rpc.ts +0 -49
- package/src/functions/wirings/rpc/serialize-public-rpc.ts +0 -37
- package/src/functions/wirings/rpc/serialize-remote-rpc.ts +0 -33
- package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +0 -68
- package/src/functions/wirings/rpc/serialize-typed-rpc-map.ts +0 -194
- package/src/functions/wirings/scheduler/pikku-command-scheduler-types.ts +0 -25
- package/src/functions/wirings/scheduler/pikku-command-scheduler.ts +0 -88
- package/src/functions/wirings/scheduler/serialize-scheduler-meta.ts +0 -37
- package/src/functions/wirings/scheduler/serialize-scheduler-types.ts +0 -28
- package/src/functions/wirings/services/pikku-command-service-metadata.ts +0 -25
- package/src/functions/wirings/workflow/pikku-command-workflow.ts +0 -218
- package/src/functions/wirings/workflow/serialize-workflow-map.ts +0 -121
- package/src/functions/wirings/workflow/serialize-workflow-meta.ts +0 -73
- package/src/functions/wirings/workflow/serialize-workflow-registration.ts +0 -83
- package/src/functions/wirings/workflow/serialize-workflow-types.ts +0 -357
- package/src/functions/wirings/workflow/serialize-workflow-workers.ts +0 -47
- package/src/middleware/log-command-info-and-time.ts +0 -35
- package/src/services/cli-logger-forwarder.service.ts +0 -99
- package/src/services/cli-logger.service.ts +0 -108
- package/src/services.ts +0 -322
- package/src/utils/check-required-types.ts +0 -65
- package/src/utils/command-summary.ts +0 -107
- package/src/utils/custom-types-generator.ts +0 -55
- package/src/utils/file-import-path.test.ts +0 -175
- package/src/utils/file-import-path.ts +0 -53
- package/src/utils/file-imports-serializer.ts +0 -25
- package/src/utils/file-writer.ts +0 -72
- package/src/utils/generate-bootstrap-file.ts +0 -43
- package/src/utils/get-cli-version.ts +0 -28
- package/src/utils/pikku-cli-config.ts +0 -495
- package/src/utils/pikku-files-and-methods.ts +0 -145
- package/src/utils/schema-generator.ts +0 -335
- package/src/utils/serialize-import-map.ts +0 -102
- package/src/utils/strip-verbose-meta.ts +0 -254
- package/tsconfig.json +0 -21
- package/types/application-types.d.ts +0 -27
- package/types/config.d.ts +0 -304
- /package/dist/src/functions/{wirings/channels → runtimes/websocket}/serialize-websocket-wrapper.d.ts +0 -0
- /package/dist/src/functions/{wirings/channels → runtimes/websocket}/serialize-websocket-wrapper.js +0 -0
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* HTTP-specific type definitions for tree-shaking optimization
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { AssertHTTPWiringParams, wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, addHTTPPermission as addHTTPPermissionCore } from '@pikku/core/http'
|
|
9
|
-
import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware } from '../function/pikku-function-types.gen.js'
|
|
10
|
-
import type { CoreHTTPFunctionWiring, HTTPMethod } from '@pikku/core/http'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Type definition for HTTP API wirings with type-safe path parameters.
|
|
14
|
-
* Supports both authenticated and unauthenticated functions.
|
|
15
|
-
*
|
|
16
|
-
* @template In - Input type for the HTTP wiring
|
|
17
|
-
* @template Out - Output type for the HTTP wiring
|
|
18
|
-
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
19
|
-
*/
|
|
20
|
-
type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out, Route, PikkuFunction<In, Out, 'rpc' | 'session'>, PikkuFunctionSessionless<In, Out, 'rpc' | 'session'>, PikkuPermission<In>, PikkuMiddleware>
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* HTTP wiring for workflow triggers (no function needed)
|
|
24
|
-
*/
|
|
25
|
-
type HTTPWorkflowWiring<Route extends string> = {
|
|
26
|
-
route: Route
|
|
27
|
-
method: HTTPMethod
|
|
28
|
-
workflow: true
|
|
29
|
-
func?: undefined
|
|
30
|
-
permissions?: undefined
|
|
31
|
-
auth?: undefined
|
|
32
|
-
tags?: undefined
|
|
33
|
-
middleware?: undefined
|
|
34
|
-
returnsJSON?: undefined
|
|
35
|
-
sse?: boolean
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Registers an HTTP wiring with the Pikku framework.
|
|
40
|
-
*
|
|
41
|
-
* @template In - Input type for the HTTP wiring
|
|
42
|
-
* @template Out - Output type for the HTTP wiring
|
|
43
|
-
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
44
|
-
* @param httpWiring - HTTP wiring definition with handler, method, and optional middleware
|
|
45
|
-
*/
|
|
46
|
-
export const wireHTTP = <In, Out, Route extends string>(
|
|
47
|
-
httpWiring: (HTTPWiring<In, Out, Route> & AssertHTTPWiringParams<In, Route>) | HTTPWorkflowWiring<Route>
|
|
48
|
-
) => {
|
|
49
|
-
wireHTTPCore(httpWiring as any)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Registers HTTP middleware either globally or for a specific route pattern.
|
|
54
|
-
*
|
|
55
|
-
* When a string route pattern is provided along with middleware, the middleware
|
|
56
|
-
* is applied only to that route. Otherwise, if an array is provided, it is treated
|
|
57
|
-
* as global middleware (applied to all routes).
|
|
58
|
-
*
|
|
59
|
-
* @param routeOrMiddleware - Either a global middleware array or a route pattern string
|
|
60
|
-
* @param middleware - The middleware array to apply when a route pattern is specified
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* // Add global HTTP middleware
|
|
65
|
-
* addHTTPMiddleware([authMiddleware, loggingMiddleware])
|
|
66
|
-
*
|
|
67
|
-
* // Add route-specific middleware
|
|
68
|
-
* addHTTPMiddleware('/api/admin/*', [adminAuthMiddleware])
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export const addHTTPMiddleware = (
|
|
72
|
-
routeOrMiddleware: PikkuMiddleware[] | string,
|
|
73
|
-
middleware?: PikkuMiddleware[]
|
|
74
|
-
) => {
|
|
75
|
-
addHTTPMiddlewareCore(routeOrMiddleware as any, middleware as any)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Registers HTTP permissions either globally or for a specific route pattern.
|
|
80
|
-
*
|
|
81
|
-
* When a string route pattern is provided along with permissions, the permissions
|
|
82
|
-
* are applied only to that route. Permissions can be passed as an array or as a
|
|
83
|
-
* permission group object.
|
|
84
|
-
*
|
|
85
|
-
* @param pattern - Route pattern string (e.g., '*' for all routes, '/api/*' for specific routes)
|
|
86
|
-
* @param permissions - The permissions to apply for the specified route pattern
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```typescript
|
|
90
|
-
* // Add global HTTP permissions
|
|
91
|
-
* addHTTPPermission('*', { global: globalPermission })
|
|
92
|
-
*
|
|
93
|
-
* // Add route-specific permissions
|
|
94
|
-
* addHTTPPermission('/api/admin/*', { admin: adminPermission })
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
export const addHTTPPermission = <In = unknown>(
|
|
98
|
-
pattern: string,
|
|
99
|
-
permissions: Record<string, PikkuPermission<In>> | PikkuPermission<In>[]
|
|
100
|
-
) => {
|
|
101
|
-
addHTTPPermissionCore(pattern, permissions as any)
|
|
102
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* This provides the structure needed for typescript to be aware of routes and their return types
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type PikkuSchemasOutput = false | true
|
|
11
|
-
export type PikkuFunctionsOutput = false | true
|
|
12
|
-
export type PikkuMiddlewareOutput = false | true
|
|
13
|
-
export type PikkuPermissionsOutput = false | true
|
|
14
|
-
export type PikkuRPCOutput = false | true
|
|
15
|
-
export type PikkuPublicRPCOutput = false | true
|
|
16
|
-
export type PikkuHTTPOutput = false | true
|
|
17
|
-
export type PikkuSchedulerOutput = false | true
|
|
18
|
-
export type PikkuWorkflowOutput = false | true
|
|
19
|
-
export type PikkuRemoteRPCOutput = false | true
|
|
20
|
-
export type PikkuQueueOutput = false | true
|
|
21
|
-
export type PikkuChannelsOutput = false | true
|
|
22
|
-
export type PikkuMCPOutput = false | true
|
|
23
|
-
export type PikkuCLIOutput = false | true
|
|
24
|
-
export type PikkuPackageOutput = false | true
|
|
25
|
-
export type PikkuForgeNodesOutput = false | true
|
|
26
|
-
|
|
27
|
-
// The '& {}' is a workaround for not directly refering to a type since it confuses typescript
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
interface HTTPWiringHandler<I, O> {
|
|
31
|
-
input: I;
|
|
32
|
-
output: O;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type HTTPWiringsMap = {
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type HTTPWiringHandlerOf<HTTPWiring extends keyof HTTPWiringsMap, Method extends keyof HTTPWiringsMap[HTTPWiring]> =
|
|
39
|
-
HTTPWiringsMap[HTTPWiring][Method] extends { input: infer I; output: infer O }
|
|
40
|
-
? HTTPWiringHandler<I, O>
|
|
41
|
-
: never;
|
|
42
|
-
|
|
43
|
-
export type HTTPWiringsWithMethod<Method extends string> = {
|
|
44
|
-
[HTTPWiring in keyof HTTPWiringsMap]: Method extends keyof HTTPWiringsMap[HTTPWiring] ? HTTPWiring : never;
|
|
45
|
-
}[keyof HTTPWiringsMap];
|
|
46
|
-
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core'
|
|
5
|
-
import type { HTTPWiringsMeta } from '@pikku/core/http'
|
|
6
|
-
import metaData from './pikku-http-wirings-meta.gen.json' with { type: 'json' }
|
|
7
|
-
pikkuState(null, 'http', 'meta', metaData as HTTPWiringsMeta)
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* MCP-specific type definitions for tree-shaking optimization
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
CoreMCPResource,
|
|
10
|
-
CoreMCPTool,
|
|
11
|
-
CoreMCPPrompt,
|
|
12
|
-
wireMCPResource as wireMCPResourceCore,
|
|
13
|
-
wireMCPTool as wireMCPToolCore,
|
|
14
|
-
wireMCPPrompt as wireMCPPromptCore,
|
|
15
|
-
MCPResourceResponse,
|
|
16
|
-
MCPToolResponse,
|
|
17
|
-
MCPPromptResponse,
|
|
18
|
-
AssertMCPResourceURIParams
|
|
19
|
-
} from '@pikku/core/mcp'
|
|
20
|
-
|
|
21
|
-
import type { PikkuFunctionConfig, PikkuFunctionSessionless, InferZodOutput } from '../function/pikku-function-types.gen.js'
|
|
22
|
-
import type { ZodLike } from '@pikku/core'
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Type definition for MCP resources that provide data to AI models.
|
|
26
|
-
*
|
|
27
|
-
* @template In - Input type for the resource request
|
|
28
|
-
* @template URI - URI template string type for compile-time parameter validation
|
|
29
|
-
*/
|
|
30
|
-
type MCPResourceWiring<In, URI extends string> = CoreMCPResource<PikkuFunctionConfig<In, MCPResourceResponse, 'rpc' | 'session' | 'mcp'>> & { uri: URI }
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Type definition for MCP tools that AI models can invoke.
|
|
34
|
-
*
|
|
35
|
-
* @template In - Input type for the tool invocation
|
|
36
|
-
*/
|
|
37
|
-
type MCPToolWiring<In> = CoreMCPTool<PikkuFunctionConfig<In, MCPToolResponse, 'rpc' | 'session' | 'mcp'>>
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Type definition for MCP prompts that provide templates to AI models.
|
|
41
|
-
*
|
|
42
|
-
* @template In - Input type for the prompt parameters
|
|
43
|
-
*/
|
|
44
|
-
type MCPPromptWiring<In> = CoreMCPPrompt<PikkuFunctionConfig<In, MCPPromptResponse, 'rpc' | 'session' | 'mcp'>>
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Registers an MCP resource with the Pikku framework.
|
|
48
|
-
* Resources provide data that AI models can access.
|
|
49
|
-
*
|
|
50
|
-
* @template In - Input type for the resource request
|
|
51
|
-
* @template URI - URI template string for compile-time parameter validation
|
|
52
|
-
* @param mcpResource - MCP resource definition with data provider function
|
|
53
|
-
*/
|
|
54
|
-
export const wireMCPResource = <In, URI extends string>(
|
|
55
|
-
mcpResource: MCPResourceWiring<In, URI> & AssertMCPResourceURIParams<In, URI>
|
|
56
|
-
) => {
|
|
57
|
-
wireMCPResourceCore(mcpResource as any)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Registers an MCP tool with the Pikku framework.
|
|
62
|
-
* Tools are functions that AI models can invoke.
|
|
63
|
-
*
|
|
64
|
-
* @template In - Input type for the tool invocation
|
|
65
|
-
* @param mcpTool - MCP tool definition with action function
|
|
66
|
-
*/
|
|
67
|
-
export const wireMCPTool = <In>(
|
|
68
|
-
mcpTool: MCPToolWiring<In>
|
|
69
|
-
) => {
|
|
70
|
-
wireMCPToolCore(mcpTool as any)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Registers an MCP prompt with the Pikku framework.
|
|
75
|
-
* Prompts provide templates that AI models can use.
|
|
76
|
-
*
|
|
77
|
-
* @template In - Input type for the prompt parameters
|
|
78
|
-
* @param mcpPrompt - MCP prompt definition with template function
|
|
79
|
-
*/
|
|
80
|
-
export const wireMCPPrompt = <In>(
|
|
81
|
-
mcpPrompt: MCPPromptWiring<In>
|
|
82
|
-
) => {
|
|
83
|
-
wireMCPPromptCore(mcpPrompt as any)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Configuration for MCP prompt with Zod schema input validation.
|
|
88
|
-
*/
|
|
89
|
-
type MCPPromptFuncConfigWithSchema<InputSchema extends ZodLike> = {
|
|
90
|
-
func: PikkuFunctionSessionless<InferZodOutput<InputSchema>, MCPPromptResponse, 'mcp' | 'rpc'>
|
|
91
|
-
name?: string
|
|
92
|
-
input: InputSchema
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Creates a function for handling MCP prompt requests.
|
|
97
|
-
* These functions generate prompt templates for AI models.
|
|
98
|
-
*
|
|
99
|
-
* Supports two patterns:
|
|
100
|
-
* 1. Generic types: `pikkuMCPPromptFunc<Input>({ func: ... })`
|
|
101
|
-
* 2. Zod schemas: `pikkuMCPPromptFunc({ input: z.object(...), func: ... })`
|
|
102
|
-
*
|
|
103
|
-
* @template In - Input type for the prompt parameters (inferred from schema if provided)
|
|
104
|
-
* @param func - Function definition, either direct function or configuration object
|
|
105
|
-
* @returns The unwrapped function for internal use
|
|
106
|
-
*/
|
|
107
|
-
export function pikkuMCPPromptFunc<InputSchema extends ZodLike>(
|
|
108
|
-
config: MCPPromptFuncConfigWithSchema<InputSchema>
|
|
109
|
-
): PikkuFunctionConfig<InferZodOutput<InputSchema>, MCPPromptResponse, 'mcp' | 'rpc'>
|
|
110
|
-
export function pikkuMCPPromptFunc<In>(
|
|
111
|
-
func:
|
|
112
|
-
| PikkuFunctionSessionless<In, MCPPromptResponse, 'mcp' | 'rpc'>
|
|
113
|
-
| {
|
|
114
|
-
func: PikkuFunctionSessionless<In, MCPPromptResponse, 'mcp' | 'rpc'>
|
|
115
|
-
name?: string
|
|
116
|
-
}
|
|
117
|
-
): PikkuFunctionConfig<In, MCPPromptResponse, 'mcp' | 'rpc'>
|
|
118
|
-
export function pikkuMCPPromptFunc(func: any): any {
|
|
119
|
-
return typeof func === 'function' ? { func } : func
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Configuration for MCP tool with Zod schema input validation.
|
|
124
|
-
*/
|
|
125
|
-
type MCPToolFuncConfigWithSchema<InputSchema extends ZodLike> = {
|
|
126
|
-
func: PikkuFunctionSessionless<InferZodOutput<InputSchema>, MCPToolResponse, 'mcp' | 'rpc'>
|
|
127
|
-
name?: string
|
|
128
|
-
input: InputSchema
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Creates a function for handling MCP tool invocations.
|
|
133
|
-
* These functions perform actions that AI models can request.
|
|
134
|
-
*
|
|
135
|
-
* Supports two patterns:
|
|
136
|
-
* 1. Generic types: `pikkuMCPToolFunc<Input>({ func: ... })`
|
|
137
|
-
* 2. Zod schemas: `pikkuMCPToolFunc({ input: z.object(...), func: ... })`
|
|
138
|
-
*
|
|
139
|
-
* @template In - Input type for the tool invocation (inferred from schema if provided)
|
|
140
|
-
* @param func - Function definition, either direct function or configuration object
|
|
141
|
-
* @returns The unwrapped function for internal use
|
|
142
|
-
*/
|
|
143
|
-
export function pikkuMCPToolFunc<InputSchema extends ZodLike>(
|
|
144
|
-
config: MCPToolFuncConfigWithSchema<InputSchema>
|
|
145
|
-
): PikkuFunctionConfig<InferZodOutput<InputSchema>, MCPToolResponse, 'mcp' | 'rpc'>
|
|
146
|
-
export function pikkuMCPToolFunc<In>(
|
|
147
|
-
func:
|
|
148
|
-
| PikkuFunctionSessionless<In, MCPToolResponse, 'mcp' | 'rpc'>
|
|
149
|
-
| {
|
|
150
|
-
func: PikkuFunctionSessionless<In, MCPToolResponse, 'mcp' | 'rpc'>
|
|
151
|
-
name?: string
|
|
152
|
-
}
|
|
153
|
-
): PikkuFunctionConfig<In, MCPToolResponse, 'mcp' | 'rpc'>
|
|
154
|
-
export function pikkuMCPToolFunc(func: any): any {
|
|
155
|
-
return typeof func === 'function' ? { func } : func
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Configuration for MCP resource with Zod schema input validation.
|
|
160
|
-
*/
|
|
161
|
-
type MCPResourceFuncConfigWithSchema<InputSchema extends ZodLike> = {
|
|
162
|
-
func: PikkuFunctionSessionless<InferZodOutput<InputSchema>, MCPResourceResponse, 'mcp' | 'rpc'>
|
|
163
|
-
name?: string
|
|
164
|
-
input: InputSchema
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Creates a function for handling MCP resource requests.
|
|
169
|
-
* These functions provide data that AI models can access.
|
|
170
|
-
*
|
|
171
|
-
* Supports two patterns:
|
|
172
|
-
* 1. Generic types: `pikkuMCPResourceFunc<Input>({ func: ... })`
|
|
173
|
-
* 2. Zod schemas: `pikkuMCPResourceFunc({ input: z.object(...), func: ... })`
|
|
174
|
-
*
|
|
175
|
-
* @template In - Input type for the resource request (inferred from schema if provided)
|
|
176
|
-
* @param func - Function definition, either direct function or configuration object
|
|
177
|
-
* @returns The unwrapped function for internal use
|
|
178
|
-
*/
|
|
179
|
-
export function pikkuMCPResourceFunc<InputSchema extends ZodLike>(
|
|
180
|
-
config: MCPResourceFuncConfigWithSchema<InputSchema>
|
|
181
|
-
): PikkuFunctionConfig<InferZodOutput<InputSchema>, MCPResourceResponse, 'mcp' | 'rpc'>
|
|
182
|
-
export function pikkuMCPResourceFunc<In>(
|
|
183
|
-
func:
|
|
184
|
-
| PikkuFunctionSessionless<In, MCPResourceResponse, 'mcp' | 'rpc'>
|
|
185
|
-
| {
|
|
186
|
-
func: PikkuFunctionSessionless<In, MCPResourceResponse, 'mcp' | 'rpc'>
|
|
187
|
-
name?: string
|
|
188
|
-
}
|
|
189
|
-
): PikkuFunctionConfig<In, MCPResourceResponse, 'mcp' | 'rpc'>
|
|
190
|
-
export function pikkuMCPResourceFunc(func: any): any {
|
|
191
|
-
return typeof func === 'function' ? { func } : func
|
|
192
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core'
|
|
5
|
-
import type { MCPResourceMeta, MCPToolMeta, MCPPromptMeta } from '@pikku/core/mcp'
|
|
6
|
-
import metaData from './pikku-mcp-wirings-meta.gen.json' with { type: 'json' }
|
|
7
|
-
pikkuState(null, 'mcp', 'resourcesMeta', metaData.resourcesMeta as MCPResourceMeta)
|
|
8
|
-
pikkuState(null, 'mcp', 'toolsMeta', metaData.toolsMeta as MCPToolMeta)
|
|
9
|
-
pikkuState(null, 'mcp', 'promptsMeta', metaData.promptsMeta as MCPPromptMeta)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import './function/pikku-functions-meta.gen.js'
|
|
5
|
-
import './http/pikku-http-wirings-meta.gen.js'
|
|
6
|
-
import './scheduler/pikku-schedulers-wirings-meta.gen.js'
|
|
7
|
-
import './queue/pikku-queue-workers-wirings-meta.gen.js'
|
|
8
|
-
import './channel/pikku-channels-meta.gen.js'
|
|
9
|
-
import './mcp/pikku-mcp-wirings-meta.gen.js'
|
|
10
|
-
import './cli/pikku-cli-wirings-meta.gen.js'
|
|
11
|
-
import './schemas/register.gen.js'
|
|
12
|
-
import './http/pikku-http-wirings.gen.js'
|
|
13
|
-
import './scheduler/pikku-schedulers-wirings.gen.js'
|
|
14
|
-
import './queue/pikku-queue-workers-wirings.gen.js'
|
|
15
|
-
import './channel/pikku-channels.gen.js'
|
|
16
|
-
import './mcp/pikku-mcp-wirings.gen.js'
|
|
17
|
-
import './cli/pikku-cli-wirings.gen.js'
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import type { SingletonServices } from '../types/application-types.d.js'
|
|
5
|
-
import type { Services } from '../types/application-types.d.js'
|
|
6
|
-
|
|
7
|
-
// Singleton services map: true if required, false if available but unused
|
|
8
|
-
export const requiredSingletonServices = {
|
|
9
|
-
'config': true,
|
|
10
|
-
'getInspectorState': true,
|
|
11
|
-
'jwt': false,
|
|
12
|
-
'logger': true,
|
|
13
|
-
'queueService': false,
|
|
14
|
-
'schedulerService': false,
|
|
15
|
-
'schema': true,
|
|
16
|
-
'secrets': true,
|
|
17
|
-
'variables': true,
|
|
18
|
-
'workflowService': false,
|
|
19
|
-
} as const
|
|
20
|
-
|
|
21
|
-
// Wire services map: true if required, false if available but unused
|
|
22
|
-
export const requiredWireServices = {
|
|
23
|
-
} as const
|
|
24
|
-
|
|
25
|
-
// Type exports
|
|
26
|
-
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'secrets' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'secrets' | 'variables'>>
|
|
27
|
-
|
|
28
|
-
export type RequiredWireServices = Partial<Services>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Main type export hub - re-exports all wiring-specific types
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Core function, middleware, and permission types
|
|
9
|
-
export * from './function/pikku-function-types.gen.js'
|
|
10
|
-
|
|
11
|
-
// HTTP wiring types
|
|
12
|
-
export * from './http/pikku-http-types.gen.js'
|
|
13
|
-
|
|
14
|
-
// Channel wiring types
|
|
15
|
-
export * from './channel/pikku-channel-types.gen.js'
|
|
16
|
-
|
|
17
|
-
// Scheduler wiring types
|
|
18
|
-
export * from './scheduler/pikku-scheduler-types.gen.js'
|
|
19
|
-
|
|
20
|
-
// Queue wiring types
|
|
21
|
-
export * from './queue/pikku-queue-types.gen.js'
|
|
22
|
-
|
|
23
|
-
// MCP wiring types
|
|
24
|
-
export * from './mcp/pikku-mcp-types.gen.js'
|
|
25
|
-
|
|
26
|
-
// CLI wiring types
|
|
27
|
-
export * from './cli/pikku-cli-types.gen.js'
|
|
28
|
-
|
|
29
|
-
// Forge wiring types
|
|
30
|
-
export * from './forge/pikku-forge-types.gen.js'
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket'
|
|
5
|
-
import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
|
|
6
|
-
|
|
7
|
-
class PikkuWebSocketRoute<Channel extends keyof ChannelsMap, Route extends keyof ChannelsMap[Channel]['routes']> extends CorePikkuRouteHandler {
|
|
8
|
-
public subscribe<
|
|
9
|
-
Method extends keyof ChannelsMap[Channel]['routes'][Route],
|
|
10
|
-
Data extends ChannelWiringHandlerOf<Channel, Route, Method>['output']
|
|
11
|
-
>(method: Method, callback: (data: Data) => void
|
|
12
|
-
) {
|
|
13
|
-
super.subscribe(method.toString(), callback)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public unsubscribe<
|
|
17
|
-
Method extends keyof ChannelsMap[Channel]['routes'][Route],
|
|
18
|
-
Data extends ChannelWiringHandlerOf<Channel, Route, Method>['output']
|
|
19
|
-
>(method: Method, callback?: (data: Data) => void) {
|
|
20
|
-
super.unsubscribe(method.toString(), callback)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public send<
|
|
24
|
-
Method extends keyof ChannelsMap[Channel]['routes'][Route],
|
|
25
|
-
Data extends ChannelWiringHandlerOf<Channel, Route, Method>['input']
|
|
26
|
-
>(method: Method, data: Data) {
|
|
27
|
-
super.send(method.toString(), data)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Type-safe WebSocket wrapper for Pikku channels.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* // Browser usage
|
|
36
|
-
* const ws = new WebSocket('ws://localhost:3000')
|
|
37
|
-
* const pikkuWS = new PikkuWebSocket<'events'>(ws)
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* // Node.js usage
|
|
41
|
-
* import WebSocket from 'ws'
|
|
42
|
-
* const ws = new WebSocket('ws://localhost:3000')
|
|
43
|
-
* const pikkuWS = new PikkuWebSocket<'events'>(ws)
|
|
44
|
-
*/
|
|
45
|
-
export class PikkuWebSocket<Channel extends keyof ChannelsMap, EventHubTopics extends Record<string, any> = {}> extends CorePikkuWebsocket {
|
|
46
|
-
/**
|
|
47
|
-
* Send a message to a specific route and method.
|
|
48
|
-
* Validates the input data type.
|
|
49
|
-
*/
|
|
50
|
-
public getRoute<Route extends keyof ChannelsMap[Channel]['routes']>(route: Route): PikkuWebSocketRoute<Channel, Route> {
|
|
51
|
-
return super.getRoute(route)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Subscribe to a specific route and method.
|
|
56
|
-
*/
|
|
57
|
-
public subscribe<Data extends ChannelDefaultHandlerOf<Channel>['output']>(
|
|
58
|
-
callback: (data: Data) => void
|
|
59
|
-
) {
|
|
60
|
-
super.subscribe(callback)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Subscribe to a specific route and method.
|
|
65
|
-
*/
|
|
66
|
-
public unsubscribe<Data extends ChannelDefaultHandlerOf<Channel>['output']>(
|
|
67
|
-
callback?: (data: Data) => void
|
|
68
|
-
) {
|
|
69
|
-
super.unsubscribe(callback)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public send(data: ChannelDefaultHandlerOf<Channel>['input']) {
|
|
73
|
-
super.send(data)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Subscribe to a topic from the EventHub system with strong typing.
|
|
78
|
-
*/
|
|
79
|
-
public subscribeToEventHub<Topic extends keyof EventHubTopics>(
|
|
80
|
-
topic: Topic,
|
|
81
|
-
callback: (data: EventHubTopics[Topic]) => void
|
|
82
|
-
) {
|
|
83
|
-
super.subscribe((data) => {
|
|
84
|
-
if (data.topic === topic) {
|
|
85
|
-
callback(data as EventHubTopics[Topic])
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Queue-specific type definitions for tree-shaking optimization
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { CoreQueueWorker, wireQueueWorker as wireQueueWorkerCore } from '@pikku/core/queue'
|
|
9
|
-
import type { PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Type definition for queue workers that process background jobs.
|
|
13
|
-
*
|
|
14
|
-
* @template In - Input type for the queue job
|
|
15
|
-
* @template Out - Output type for the queue job
|
|
16
|
-
*/
|
|
17
|
-
type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out, 'session' | 'rpc'>>
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Registers a queue worker with the Pikku framework.
|
|
21
|
-
* Workers process background jobs from queues.
|
|
22
|
-
*
|
|
23
|
-
* @param queueWorker - Queue worker definition with job handler
|
|
24
|
-
*/
|
|
25
|
-
export const wireQueueWorker = (queueWorker: QueueWiring<any, any>) => {
|
|
26
|
-
wireQueueWorkerCore(queueWorker as any) // TODO
|
|
27
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* This provides the structure needed for typescript to be aware of Queue workers and their input/output types
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type PikkuSchemasOutput = false | true
|
|
11
|
-
export type PikkuFunctionsOutput = false | true
|
|
12
|
-
export type PikkuMiddlewareOutput = false | true
|
|
13
|
-
export type PikkuPermissionsOutput = false | true
|
|
14
|
-
export type PikkuRPCOutput = false | true
|
|
15
|
-
export type PikkuPublicRPCOutput = false | true
|
|
16
|
-
export type PikkuHTTPOutput = false | true
|
|
17
|
-
export type PikkuSchedulerOutput = false | true
|
|
18
|
-
export type PikkuWorkflowOutput = false | true
|
|
19
|
-
export type PikkuRemoteRPCOutput = false | true
|
|
20
|
-
export type PikkuQueueOutput = false | true
|
|
21
|
-
export type PikkuChannelsOutput = false | true
|
|
22
|
-
export type PikkuMCPOutput = false | true
|
|
23
|
-
export type PikkuCLIOutput = false | true
|
|
24
|
-
export type PikkuPackageOutput = false | true
|
|
25
|
-
export type PikkuForgeNodesOutput = false | true
|
|
26
|
-
|
|
27
|
-
import type { QueueJob } from '@pikku/core/queue'
|
|
28
|
-
|
|
29
|
-
interface QueueHandler<I, O> {
|
|
30
|
-
input: I;
|
|
31
|
-
output: O;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type QueueMap = {
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type QueueAdd = <Name extends keyof QueueMap>(
|
|
39
|
-
name: Name,
|
|
40
|
-
data: QueueMap[Name]['input'],
|
|
41
|
-
options?: {
|
|
42
|
-
priority?: number
|
|
43
|
-
delay?: number
|
|
44
|
-
attempts?: number
|
|
45
|
-
removeOnComplete?: number
|
|
46
|
-
removeOnFail?: number
|
|
47
|
-
jobId?: string
|
|
48
|
-
}
|
|
49
|
-
) => Promise<string>
|
|
50
|
-
|
|
51
|
-
type QueueGetJob = <Name extends keyof QueueMap>(
|
|
52
|
-
name: Name,
|
|
53
|
-
jobId: string
|
|
54
|
-
) => Promise<QueueJob<QueueMap[Name]['input'], QueueMap[Name]['output']> | null>
|
|
55
|
-
|
|
56
|
-
export type TypedPikkuQueue = {
|
|
57
|
-
add: QueueAdd;
|
|
58
|
-
getJob: QueueGetJob;
|
|
59
|
-
}
|
|
60
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.3
|
|
3
|
-
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core'
|
|
5
|
-
import { QueueWorkersMeta } from '@pikku/core/queue'
|
|
6
|
-
import metaData from './pikku-queue-workers-wirings-meta.gen.json' with { type: 'json' }
|
|
7
|
-
|
|
8
|
-
pikkuState(null, 'queue', 'meta', metaData as QueueWorkersMeta)
|