@pikku/cli 0.12.21 → 0.12.22
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/assets/index-C52h1B_L.css +1 -0
- package/console-app/assets/index-CAk106ji.js +232 -0
- package/console-app/index.html +3 -6
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +3 -3
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +6 -6
- package/dist/.pikku/cli/pikku-cli-channel.js +280 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +782 -7
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +41 -73
- package/dist/.pikku/function/pikku-function-types.gen.js +30 -40
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +1526 -491
- package/dist/.pikku/function/pikku-functions.gen.js +13 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- 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 +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +3 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +3 -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 +2 -1
- package/dist/.pikku/pikku-services.gen.js +1 -0
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.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 +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +6 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +250 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +4 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +5 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +56 -4
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +155 -13
- package/dist/.pikku/schemas/schemas/BinaryInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbMigrateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbResetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbSeedInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDbSchemaInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDbSchemaOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployApplyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployApplyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployPlanInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployPlanOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployUnitsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployUnitsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsAddInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsAddOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsRemoveInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsRemoveOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricErrorsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricErrorsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricInitInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricInitOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLLMKeyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLLMKeyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLinkInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLinkOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLoginInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLoginOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLogsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLogsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricMetricsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricMetricsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricRollbackInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricRollbackOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsSetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsSetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricStatusInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricStatusOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricTraceInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricTraceOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricValidateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricValidateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIEntryOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuEventsScaffoldOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaClientsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaContextInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaFunctionsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaFunctionsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaMiddlewareGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaMiddlewareListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaPermissionsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaPermissionsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaSchemasGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaSchemasListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresChannelInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresHttpInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresQueueInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresSchedulerInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresTriggerInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresTypeInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWorkflowsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWorkflowsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSkillsInstallInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSkillsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuTestsCoverageInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuTestsInitInput.schema.json +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +235 -627
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +23 -0
- package/dist/bin/pikku.js +28 -1
- package/dist/src/cli.wiring.js +274 -8
- package/dist/src/deploy/analyzer/analyzer.d.ts +16 -1
- package/dist/src/deploy/analyzer/analyzer.js +83 -43
- package/dist/src/deploy/build-pipeline.js +83 -17
- package/dist/src/deploy/bundler/bundler.d.ts +1 -0
- package/dist/src/deploy/bundler/bundler.js +13 -5
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +8 -0
- package/dist/src/deploy/codegen/per-unit-codegen.js +46 -5
- package/dist/src/deploy/provider-adapter.d.ts +34 -0
- package/dist/src/deploy/server-entry.d.ts +16 -0
- package/dist/src/deploy/server-entry.js +81 -0
- package/dist/src/fabric/fabric-commands.d.ts +522 -0
- package/dist/src/fabric/fabric-commands.js +299 -0
- package/dist/src/fabric/functions/db-schema.function.d.ts +35 -0
- package/dist/src/fabric/functions/db-schema.function.js +37 -0
- package/dist/src/fabric/functions/deploy-list.function.d.ts +41 -0
- package/dist/src/fabric/functions/deploy-list.function.js +43 -0
- package/dist/src/fabric/functions/deploy-units.function.d.ts +35 -0
- package/dist/src/fabric/functions/deploy-units.function.js +41 -0
- package/dist/src/fabric/functions/deploy.function.d.ts +105 -0
- package/dist/src/fabric/functions/deploy.function.js +122 -0
- package/dist/src/fabric/functions/domains-add.function.d.ts +35 -0
- package/dist/src/fabric/functions/domains-add.function.js +46 -0
- package/dist/src/fabric/functions/domains-list.function.d.ts +20 -0
- package/dist/src/fabric/functions/domains-list.function.js +50 -0
- package/dist/src/fabric/functions/domains-remove.function.d.ts +24 -0
- package/dist/src/fabric/functions/domains-remove.function.js +44 -0
- package/dist/src/fabric/functions/errors.function.d.ts +44 -0
- package/dist/src/fabric/functions/errors.function.js +50 -0
- package/dist/src/fabric/functions/init.function.d.ts +51 -0
- package/dist/src/fabric/functions/init.function.js +54 -0
- package/dist/src/fabric/functions/link.function.d.ts +28 -0
- package/dist/src/fabric/functions/link.function.js +77 -0
- package/dist/src/fabric/functions/llm-key.function.d.ts +46 -0
- package/dist/src/fabric/functions/llm-key.function.js +76 -0
- package/dist/src/fabric/functions/login.function.d.ts +42 -0
- package/dist/src/fabric/functions/login.function.js +68 -0
- package/dist/src/fabric/functions/logs.function.d.ts +40 -0
- package/dist/src/fabric/functions/logs.function.js +84 -0
- package/dist/src/fabric/functions/metrics.function.d.ts +32 -0
- package/dist/src/fabric/functions/metrics.function.js +49 -0
- package/dist/src/fabric/functions/rollback.function.d.ts +76 -0
- package/dist/src/fabric/functions/rollback.function.js +69 -0
- package/dist/src/fabric/functions/secrets-list.function.d.ts +24 -0
- package/dist/src/fabric/functions/secrets-list.function.js +37 -0
- package/dist/src/fabric/functions/secrets-set.function.d.ts +32 -0
- package/dist/src/fabric/functions/secrets-set.function.js +36 -0
- package/dist/src/fabric/functions/status.function.d.ts +34 -0
- package/dist/src/fabric/functions/status.function.js +43 -0
- package/dist/src/fabric/functions/trace.function.d.ts +28 -0
- package/dist/src/fabric/functions/trace.function.js +45 -0
- package/dist/src/fabric/functions/validate.function.d.ts +50 -0
- package/dist/src/fabric/functions/validate.function.js +363 -0
- package/dist/src/fabric/lib/config.d.ts +64 -0
- package/dist/src/fabric/lib/config.js +62 -0
- package/dist/src/fabric/lib/console-url.d.ts +5 -0
- package/dist/src/fabric/lib/console-url.js +13 -0
- package/dist/src/fabric/lib/git.d.ts +53 -0
- package/dist/src/fabric/lib/git.js +151 -0
- package/dist/src/fabric/lib/http.d.ts +4 -0
- package/dist/src/fabric/lib/http.js +12 -0
- package/dist/src/fabric/lib/not-implemented.d.ts +5 -0
- package/dist/src/fabric/lib/not-implemented.js +8 -0
- package/dist/src/fabric/lib/output.d.ts +23 -0
- package/dist/src/fabric/lib/output.js +39 -0
- package/dist/src/fabric/lib/prompt.d.ts +12 -0
- package/dist/src/fabric/lib/prompt.js +32 -0
- package/dist/src/fabric/lib/stage.d.ts +7 -0
- package/dist/src/fabric/lib/stage.js +14 -0
- package/dist/src/fabric/sdk/pikku-fetch.gen.d.ts +14 -0
- package/dist/src/fabric/sdk/pikku-fetch.gen.js +30 -0
- package/dist/src/fabric/sdk/pikku-rpc.gen.d.ts +105 -0
- package/dist/src/fabric/sdk/pikku-rpc.gen.js +126 -0
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +7 -0
- package/dist/src/functions/commands/binary.js +40 -0
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +7 -4
- package/dist/src/functions/commands/console.d.ts +3 -3
- package/dist/src/functions/commands/db-migrate.d.ts +1 -0
- package/dist/src/functions/commands/db-migrate.js +35 -0
- package/dist/src/functions/commands/db-reset.d.ts +1 -0
- package/dist/src/functions/commands/db-reset.js +36 -0
- package/dist/src/functions/commands/db-seed.d.ts +1 -0
- package/dist/src/functions/commands/db-seed.js +27 -0
- package/dist/src/functions/commands/db-shared.d.ts +32 -0
- package/dist/src/functions/commands/db-shared.js +26 -0
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -3
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -3
- package/dist/src/functions/commands/dev.d.ts +3 -3
- package/dist/src/functions/commands/dev.js +142 -86
- package/dist/src/functions/commands/enable.d.ts +5 -4
- package/dist/src/functions/commands/enable.js +4 -0
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/load-user-project.d.ts +11 -0
- package/dist/src/functions/commands/load-user-project.js +40 -0
- package/dist/src/functions/commands/meta.d.ts +82 -0
- package/dist/src/functions/commands/meta.js +454 -0
- package/dist/src/functions/commands/new-addon.d.ts +3 -3
- package/dist/src/functions/commands/new-function.d.ts +3 -3
- package/dist/src/functions/commands/new-middleware.d.ts +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +3 -3
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-bootstrap.js +15 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.js +3 -0
- package/dist/src/functions/commands/skills.d.ts +26 -0
- package/dist/src/functions/commands/skills.js +184 -0
- package/dist/src/functions/commands/tests-coverage.d.ts +7 -0
- package/dist/src/functions/commands/tests-coverage.js +231 -0
- package/dist/src/functions/commands/tests-init.d.ts +7 -0
- package/dist/src/functions/commands/tests-init.js +225 -0
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +3 -3
- package/dist/src/functions/commands/watch.js +1 -1
- package/dist/src/functions/db/local-db.d.ts +48 -0
- package/dist/src/functions/db/local-db.js +106 -0
- package/dist/src/functions/db/seed.d.ts +11 -0
- package/dist/src/functions/db/seed.js +22 -0
- package/dist/src/functions/db/sql-migrator.d.ts +26 -0
- package/dist/src/functions/db/sql-migrator.js +104 -0
- package/dist/src/functions/db/sqlite-codegen.d.ts +45 -0
- package/dist/src/functions/db/sqlite-codegen.js +294 -0
- package/dist/src/functions/db/zod-codegen.d.ts +10 -0
- package/dist/src/functions/db/zod-codegen.js +109 -0
- package/dist/src/functions/runtimes/fetch/index.d.ts +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 +21 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.d.ts +1 -0
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.js +163 -0
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +5 -2
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -0
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +32 -0
- package/dist/src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.d.ts +11 -0
- package/dist/src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.js +36 -0
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +1 -10
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +76 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- 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 +5 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +5 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +8 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +27 -9
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +5 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +13 -3
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +5 -0
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +5 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +7 -2
- 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 +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +78 -83
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +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.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +2 -2
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +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-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -0
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +26 -0
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -0
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.js +35 -0
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +23 -0
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +98 -0
- package/dist/src/functions/wirings/realtime/serialize-realtime-client.d.ts +22 -0
- package/dist/src/functions/wirings/realtime/serialize-realtime-client.js +337 -0
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +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 +3 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +2 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +13 -7
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +1 -0
- package/dist/src/functions/wirings/rpc/serialize-react-query-hooks.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +7 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- 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 +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +5 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +18 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.d.ts +3 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.js +40 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +14 -2
- package/dist/src/functions/workflows/all.workflow.js +41 -8
- package/dist/src/scaffold/rpc-remote.gen.d.ts +3 -3
- package/dist/src/scaffold/rpc-remote.gen.js +7 -2
- package/dist/src/scaffold/workflow-routes.gen.d.ts +18 -18
- package/dist/src/services/cli-logger.service.d.ts +0 -1
- package/dist/src/services/cli-logger.service.js +12 -22
- package/dist/src/services.js +24 -66
- package/dist/src/utils/generate-bootstrap-file.js +3 -0
- package/dist/src/utils/parse-cli-filters.d.ts +18 -0
- package/dist/src/utils/parse-cli-filters.js +99 -0
- package/dist/src/utils/pikku-cli-config.js +29 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -4
- package/skills/pikku-addon/SKILL.md +330 -0
- package/skills/pikku-ai-agent/SKILL.md +227 -0
- package/skills/pikku-ai-vercel/SKILL.md +78 -0
- package/skills/pikku-ai-voice/SKILL.md +85 -0
- package/skills/pikku-auth-js/SKILL.md +106 -0
- package/skills/pikku-aws/SKILL.md +107 -0
- package/skills/pikku-backblaze/SKILL.md +70 -0
- package/skills/pikku-cli/SKILL.md +281 -0
- package/skills/pikku-concepts/SKILL.md +281 -0
- package/skills/pikku-concepts/references/concept-mapping.md +528 -0
- package/skills/pikku-config/SKILL.md +208 -0
- package/skills/pikku-cron/SKILL.md +211 -0
- package/skills/pikku-deploy-azure/SKILL.md +69 -0
- package/skills/pikku-deploy-cloudflare/SKILL.md +80 -0
- package/skills/pikku-deploy-express/SKILL.md +83 -0
- package/skills/pikku-deploy-fastify/SKILL.md +70 -0
- package/skills/pikku-deploy-lambda/SKILL.md +107 -0
- package/skills/pikku-deploy-nextjs/SKILL.md +76 -0
- package/skills/pikku-deploy-uws/SKILL.md +85 -0
- package/skills/pikku-fabric/SKILL.md +245 -0
- package/skills/pikku-feature/SKILL.md +258 -0
- package/skills/pikku-gateway-slack/SKILL.md +112 -0
- package/skills/pikku-http/SKILL.md +317 -0
- package/skills/pikku-i18n/SKILL.md +208 -0
- package/skills/pikku-info/SKILL.md +95 -0
- package/skills/pikku-jose/SKILL.md +102 -0
- package/skills/pikku-kysely/SKILL.md +145 -0
- package/skills/pikku-mcp/SKILL.md +237 -0
- package/skills/pikku-mongodb/SKILL.md +102 -0
- package/skills/pikku-n8n-addon-map/SKILL.md +178 -0
- package/skills/pikku-n8n-code-translate/SKILL.md +166 -0
- package/skills/pikku-pino/SKILL.md +77 -0
- package/skills/pikku-queue/SKILL.md +237 -0
- package/skills/pikku-react/SKILL.md +183 -0
- package/skills/pikku-react-query/SKILL.md +205 -0
- package/skills/pikku-realtime/SKILL.md +285 -0
- package/skills/pikku-redis/SKILL.md +87 -0
- package/skills/pikku-rpc/SKILL.md +168 -0
- package/skills/pikku-rtl/SKILL.md +205 -0
- package/skills/pikku-schedule/SKILL.md +54 -0
- package/skills/pikku-schema-ajv/SKILL.md +60 -0
- package/skills/pikku-schema-cfworker/SKILL.md +60 -0
- package/skills/pikku-security/SKILL.md +243 -0
- package/skills/pikku-services/SKILL.md +247 -0
- package/skills/pikku-template-clone/SKILL.md +39 -0
- package/skills/pikku-testing/SKILL.md +428 -0
- package/skills/pikku-trigger/SKILL.md +177 -0
- package/skills/pikku-versioning/SKILL.md +169 -0
- package/skills/pikku-websocket/SKILL.md +239 -0
- package/skills/pikku-workflow/SKILL.md +283 -0
- package/skills/pikku-workflows-client/SKILL.md +150 -0
- package/skills/pikku-ws/SKILL.md +45 -0
- package/console-app/assets/index-BpY2pSuA.css +0 -10
- package/console-app/assets/index-DXLy-_D4.js +0 -717
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuPermissions: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "
|
|
1
|
+
export declare const pikkuPermissions: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCommandQueueMap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuCommandQueueMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuQueueService: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuQueueService: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuQueueTypes: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuQueueTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCommandQueue: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "
|
|
1
|
+
export declare const pikkuCommandQueue: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuQueueMap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuQueueMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuQueue: import("#pikku").PikkuFunctionConfig<void, boolean, "
|
|
1
|
+
export declare const pikkuQueue: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pikkuEventsScaffold: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
|
+
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
|
+
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
|
+
import { serializeEventsScaffold } from './serialize-events-scaffold.js';
|
|
6
|
+
export const pikkuEventsScaffold = pikkuSessionlessFunc({
|
|
7
|
+
func: async ({ logger, config }) => {
|
|
8
|
+
if (!config.scaffold?.events || !config.eventsChannelFile) {
|
|
9
|
+
logger.debug({
|
|
10
|
+
message: 'Skipping events scaffold (set scaffold.events in pikku.config.json to enable).',
|
|
11
|
+
type: 'skip',
|
|
12
|
+
});
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const authRequired = config.scaffold.events === 'auth';
|
|
16
|
+
const pikkuTypesImportPath = getFileImportRelativePath(config.eventsChannelFile, config.typesDeclarationFile, config.packageMappings);
|
|
17
|
+
await writeFileInDir(logger, config.eventsChannelFile, serializeEventsScaffold(authRequired, pikkuTypesImportPath));
|
|
18
|
+
return true;
|
|
19
|
+
},
|
|
20
|
+
middleware: [
|
|
21
|
+
logCommandInfoAndTime({
|
|
22
|
+
commandStart: 'Generating events channel scaffold',
|
|
23
|
+
commandEnd: 'Generated events channel scaffold',
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pikkuRealtime: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
|
+
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
|
+
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
|
+
import { serializeRealtimeClient } from './serialize-realtime-client.js';
|
|
6
|
+
export const pikkuRealtime = pikkuSessionlessFunc({
|
|
7
|
+
func: async ({ logger, config }) => {
|
|
8
|
+
const realtimeFile = config.clientFiles?.realtimeFile;
|
|
9
|
+
const fetchFile = config.clientFiles?.fetchFile;
|
|
10
|
+
if (!realtimeFile) {
|
|
11
|
+
logger.debug({
|
|
12
|
+
message: 'Skipping realtime client (set clientFiles.realtimeFile in pikku.config.json to enable).',
|
|
13
|
+
type: 'skip',
|
|
14
|
+
});
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!fetchFile) {
|
|
18
|
+
logger.debug({
|
|
19
|
+
message: 'Skipping realtime client (clientFiles.fetchFile is required so PikkuRealtime can wrap PikkuFetch).',
|
|
20
|
+
type: 'skip',
|
|
21
|
+
});
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const topicsImport = config.clientFiles?.realtimeEventHubTopicsImport;
|
|
25
|
+
const fetchImportPath = getFileImportRelativePath(realtimeFile, fetchFile, config.packageMappings);
|
|
26
|
+
const content = serializeRealtimeClient(topicsImport, fetchImportPath);
|
|
27
|
+
await writeFileInDir(logger, realtimeFile, content);
|
|
28
|
+
},
|
|
29
|
+
middleware: [
|
|
30
|
+
logCommandInfoAndTime({
|
|
31
|
+
commandStart: 'Generating realtime client',
|
|
32
|
+
commandEnd: 'Generated realtime client',
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the server-side `events.gen.ts` scaffold.
|
|
3
|
+
*
|
|
4
|
+
* This file lives in the user's project and wires two transports against the
|
|
5
|
+
* project's `eventHub` service:
|
|
6
|
+
*
|
|
7
|
+
* 1. WebSocket channel at `/events` — bidirectional. Clients send
|
|
8
|
+
* `{action: 'subscribe' | 'unsubscribe', topic}` over the same socket;
|
|
9
|
+
* multiple topic subscriptions per connection. On disconnect the
|
|
10
|
+
* eventHub's onChannelClosed hook auto-cleans subscriptions.
|
|
11
|
+
*
|
|
12
|
+
* 2. SSE endpoint at `GET /events/:topic` — one connection = one topic.
|
|
13
|
+
* Subscribes the channel, returns; the eventHub fans out via
|
|
14
|
+
* `channel.send` until the client closes. onChannelClosed cleans up.
|
|
15
|
+
*
|
|
16
|
+
* Both routes call `eventHub.subscribe`/`unsubscribe` with the channel id;
|
|
17
|
+
* publish-side ergonomics (envelope shape) are documented in the
|
|
18
|
+
* pikku-realtime skill.
|
|
19
|
+
*
|
|
20
|
+
* Uses TypeScript generics (not named Zod schema constants) so schemas and
|
|
21
|
+
* wiring calls can safely coexist in a single generated file.
|
|
22
|
+
*/
|
|
23
|
+
export declare const serializeEventsScaffold: (authRequired: boolean, pikkuTypesImportPath: string) => string;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the server-side `events.gen.ts` scaffold.
|
|
3
|
+
*
|
|
4
|
+
* This file lives in the user's project and wires two transports against the
|
|
5
|
+
* project's `eventHub` service:
|
|
6
|
+
*
|
|
7
|
+
* 1. WebSocket channel at `/events` — bidirectional. Clients send
|
|
8
|
+
* `{action: 'subscribe' | 'unsubscribe', topic}` over the same socket;
|
|
9
|
+
* multiple topic subscriptions per connection. On disconnect the
|
|
10
|
+
* eventHub's onChannelClosed hook auto-cleans subscriptions.
|
|
11
|
+
*
|
|
12
|
+
* 2. SSE endpoint at `GET /events/:topic` — one connection = one topic.
|
|
13
|
+
* Subscribes the channel, returns; the eventHub fans out via
|
|
14
|
+
* `channel.send` until the client closes. onChannelClosed cleans up.
|
|
15
|
+
*
|
|
16
|
+
* Both routes call `eventHub.subscribe`/`unsubscribe` with the channel id;
|
|
17
|
+
* publish-side ergonomics (envelope shape) are documented in the
|
|
18
|
+
* pikku-realtime skill.
|
|
19
|
+
*
|
|
20
|
+
* Uses TypeScript generics (not named Zod schema constants) so schemas and
|
|
21
|
+
* wiring calls can safely coexist in a single generated file.
|
|
22
|
+
*/
|
|
23
|
+
export const serializeEventsScaffold = (authRequired, pikkuTypesImportPath) => {
|
|
24
|
+
const auth = authRequired ? 'true' : 'false';
|
|
25
|
+
return `import {
|
|
26
|
+
pikkuChannelFunc,
|
|
27
|
+
pikkuSessionlessFunc,
|
|
28
|
+
wireChannel,
|
|
29
|
+
wireHTTP,
|
|
30
|
+
defineChannelRoutes,
|
|
31
|
+
} from '${pikkuTypesImportPath}'
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Topic envelope clients receive: \`{ topic, data }\`. Functions that publish
|
|
35
|
+
* events should send this shape:
|
|
36
|
+
*
|
|
37
|
+
* await eventHub.publish('todo-created', null, { topic: 'todo-created', data: { todo } })
|
|
38
|
+
*
|
|
39
|
+
* The pikku-realtime skill covers a thin \`publishEvent\` helper to remove
|
|
40
|
+
* the duplication; pick whichever style your project prefers.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export const realtimeSubscribe = pikkuChannelFunc<{ topic: string }>({
|
|
44
|
+
func: async ({ eventHub }, { topic }, { channel }) => {
|
|
45
|
+
await eventHub?.subscribe(topic, channel.channelId)
|
|
46
|
+
},
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
export const realtimeUnsubscribe = pikkuChannelFunc<{ topic: string }>({
|
|
50
|
+
func: async ({ eventHub }, { topic }, { channel }) => {
|
|
51
|
+
await eventHub?.unsubscribe(topic, channel.channelId)
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// Pikku dispatches by the \`action\` field; client sends
|
|
56
|
+
// { action: 'subscribe', topic: 'todo-created' }
|
|
57
|
+
// { action: 'unsubscribe', topic: 'todo-created' }
|
|
58
|
+
export const realtimeRoutes = defineChannelRoutes({
|
|
59
|
+
subscribe: realtimeSubscribe,
|
|
60
|
+
unsubscribe: realtimeUnsubscribe,
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
wireChannel({
|
|
64
|
+
name: 'events',
|
|
65
|
+
route: '/events',
|
|
66
|
+
auth: ${auth},
|
|
67
|
+
onMessageWiring: {
|
|
68
|
+
action: realtimeRoutes,
|
|
69
|
+
},
|
|
70
|
+
tags: ['pikku:realtime'],
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* SSE per-topic stream. One connection = one subscription. The eventHub
|
|
75
|
+
* cleans up automatically when the channel closes (onChannelClosed).
|
|
76
|
+
*/
|
|
77
|
+
export const realtimeEventStream = pikkuSessionlessFunc<{ topic: string }, void>({
|
|
78
|
+
description: 'Auto-generated SSE stream for a single event-hub topic',
|
|
79
|
+
func: async ({ eventHub }, { topic }, { channel }) => {
|
|
80
|
+
if (!channel) {
|
|
81
|
+
throw new Error('Realtime SSE handler invoked without a channel')
|
|
82
|
+
}
|
|
83
|
+
await eventHub?.subscribe(topic, channel.channelId)
|
|
84
|
+
// Function returns; eventHub continues pushing via channel.send until
|
|
85
|
+
// the client disconnects, at which point onChannelClosed unsubscribes.
|
|
86
|
+
},
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
wireHTTP({
|
|
90
|
+
method: 'get',
|
|
91
|
+
route: '/events/:topic',
|
|
92
|
+
func: realtimeEventStream,
|
|
93
|
+
auth: ${auth},
|
|
94
|
+
sse: true,
|
|
95
|
+
tags: ['pikku:realtime', 'sse'],
|
|
96
|
+
})
|
|
97
|
+
`;
|
|
98
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the client-side `realtime.gen.ts`.
|
|
3
|
+
*
|
|
4
|
+
* `PikkuRealtime` mirrors the `PikkuRPC` pattern: it wraps the project's
|
|
5
|
+
* generated `PikkuFetch` (so server URL + auth come from one place) and
|
|
6
|
+
* exposes:
|
|
7
|
+
*
|
|
8
|
+
* - `subscribe(topic, handler)` / `unsubscribe(topic)` — typed pub/sub
|
|
9
|
+
* over the websocket at `/events`. Multi-topic per connection.
|
|
10
|
+
* - `subscribeToTopic(topic, handler)` — same shape but via SSE
|
|
11
|
+
* (one EventSource per topic, auto-cleanup on close).
|
|
12
|
+
* - `subscribeToSSE(path, handler)` — generic SSE subscribe for any
|
|
13
|
+
* `sse: true` route (workflow streams, agent streams, etc.).
|
|
14
|
+
* - `connectToChannel(channelRoute, protocols?)` — open a raw WebSocket
|
|
15
|
+
* for any wireChannel route, ready to wrap in
|
|
16
|
+
* `PikkuWebSocket<'channel-name'>` for typed subscribe/send.
|
|
17
|
+
*
|
|
18
|
+
* Topic types come from `EventHubTopics` if the user supplies an import
|
|
19
|
+
* via `clientFiles.realtimeEventHubTopicsImport`. Otherwise topics fall
|
|
20
|
+
* back to `Record<string, unknown>`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const serializeRealtimeClient: (topicsImport: string | undefined, fetchImportPath: string) => string;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the client-side `realtime.gen.ts`.
|
|
3
|
+
*
|
|
4
|
+
* `PikkuRealtime` mirrors the `PikkuRPC` pattern: it wraps the project's
|
|
5
|
+
* generated `PikkuFetch` (so server URL + auth come from one place) and
|
|
6
|
+
* exposes:
|
|
7
|
+
*
|
|
8
|
+
* - `subscribe(topic, handler)` / `unsubscribe(topic)` — typed pub/sub
|
|
9
|
+
* over the websocket at `/events`. Multi-topic per connection.
|
|
10
|
+
* - `subscribeToTopic(topic, handler)` — same shape but via SSE
|
|
11
|
+
* (one EventSource per topic, auto-cleanup on close).
|
|
12
|
+
* - `subscribeToSSE(path, handler)` — generic SSE subscribe for any
|
|
13
|
+
* `sse: true` route (workflow streams, agent streams, etc.).
|
|
14
|
+
* - `connectToChannel(channelRoute, protocols?)` — open a raw WebSocket
|
|
15
|
+
* for any wireChannel route, ready to wrap in
|
|
16
|
+
* `PikkuWebSocket<'channel-name'>` for typed subscribe/send.
|
|
17
|
+
*
|
|
18
|
+
* Topic types come from `EventHubTopics` if the user supplies an import
|
|
19
|
+
* via `clientFiles.realtimeEventHubTopicsImport`. Otherwise topics fall
|
|
20
|
+
* back to `Record<string, unknown>`.
|
|
21
|
+
*/
|
|
22
|
+
export const serializeRealtimeClient = (topicsImport, fetchImportPath) => {
|
|
23
|
+
const topicsTypeImport = topicsImport
|
|
24
|
+
? buildImportLine(topicsImport)
|
|
25
|
+
: `// No EventHubTopics import configured. Set clientFiles.realtimeEventHubTopicsImport
|
|
26
|
+
// in pikku.config.json (e.g. \"../types/eventhub-topics.js#EventHubTopics\")
|
|
27
|
+
// to get fully-typed subscribe/unsubscribe.
|
|
28
|
+
type EventHubTopics = Record<string, unknown>`;
|
|
29
|
+
return `/**
|
|
30
|
+
* Generated by @pikku/cli — do not edit.
|
|
31
|
+
* Regenerate with \`pikku all\` (or \`pikku realtime\`).
|
|
32
|
+
*/
|
|
33
|
+
import { CorePikkuFetch } from '@pikku/fetch'
|
|
34
|
+
import { PikkuFetch } from '${fetchImportPath}'
|
|
35
|
+
${topicsTypeImport}
|
|
36
|
+
|
|
37
|
+
type Handler<T> = (data: T) => void
|
|
38
|
+
|
|
39
|
+
interface RealtimeOptions {
|
|
40
|
+
/** Auto-reconnect with backoff (default: true) */
|
|
41
|
+
reconnect?: boolean
|
|
42
|
+
/** Initial reconnect delay in ms (default: 500) */
|
|
43
|
+
reconnectDelayMs?: number
|
|
44
|
+
/** Cap on reconnect delay (default: 10_000) */
|
|
45
|
+
reconnectMaxDelayMs?: number
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Realtime client. Mirrors the PikkuRPC pattern: wraps a PikkuFetch so
|
|
50
|
+
* the server URL + auth are configured once and shared across transports.
|
|
51
|
+
*
|
|
52
|
+
* \`\`\`ts
|
|
53
|
+
* const pikku = createPikku(PikkuFetch, PikkuRPC, { serverUrl: 'http://localhost:3000' })
|
|
54
|
+
* const realtime = new PikkuRealtime()
|
|
55
|
+
* realtime.setPikkuFetch(pikku.fetch)
|
|
56
|
+
*
|
|
57
|
+
* const off = realtime.subscribe('todo-created', ({ todo }) => { ... })
|
|
58
|
+
* // later: off(); realtime.close()
|
|
59
|
+
* \`\`\`
|
|
60
|
+
*/
|
|
61
|
+
export class PikkuRealtime {
|
|
62
|
+
/** The underlying HTTP client used to derive server URL + auth */
|
|
63
|
+
pikkuFetch = new PikkuFetch()
|
|
64
|
+
|
|
65
|
+
private ws: WebSocket | null = null
|
|
66
|
+
private readonly handlers = new Map<string, Set<Handler<any>>>()
|
|
67
|
+
private readonly options: Required<RealtimeOptions>
|
|
68
|
+
private reconnectAttempt = 0
|
|
69
|
+
private closed = false
|
|
70
|
+
private connectScheduled = false
|
|
71
|
+
|
|
72
|
+
constructor(options: RealtimeOptions = {}) {
|
|
73
|
+
this.options = {
|
|
74
|
+
reconnect: options.reconnect ?? true,
|
|
75
|
+
reconnectDelayMs: options.reconnectDelayMs ?? 500,
|
|
76
|
+
reconnectMaxDelayMs: options.reconnectMaxDelayMs ?? 10_000,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Use a shared PikkuFetch instance (typically from \`createPikku(...)\`).
|
|
82
|
+
* The realtime client picks up its server URL + auth from this fetch,
|
|
83
|
+
* so you only configure connection details in one place.
|
|
84
|
+
*/
|
|
85
|
+
setPikkuFetch(pikkuFetch: PikkuFetch): void {
|
|
86
|
+
this.pikkuFetch = pikkuFetch
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Sets the base server URL on the underlying PikkuFetch. */
|
|
90
|
+
setServerUrl(serverUrl: string): void {
|
|
91
|
+
this.pikkuFetch.setServerUrl(serverUrl)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Sets the JWT for auth on transports that send headers (SSE). */
|
|
95
|
+
setAuthorizationJWT(jwt: string | null): void {
|
|
96
|
+
this.pikkuFetch.setAuthorizationJWT(jwt)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Sets the API key for auth on transports that send headers (SSE). */
|
|
100
|
+
setAPIKey(apiKey: string | null): void {
|
|
101
|
+
this.pikkuFetch.setAPIKey(apiKey)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Subscribe to a typed event topic over the websocket. Returns an
|
|
106
|
+
* \`unsubscribe\` function. Auto-reconnects re-send subscriptions.
|
|
107
|
+
*/
|
|
108
|
+
subscribe<K extends keyof EventHubTopics & string>(
|
|
109
|
+
topic: K,
|
|
110
|
+
handler: Handler<EventHubTopics[K]>
|
|
111
|
+
): () => void {
|
|
112
|
+
const set = this.handlers.get(topic) ?? new Set<Handler<any>>()
|
|
113
|
+
if (set.size === 0) {
|
|
114
|
+
this.send({ action: 'subscribe', topic })
|
|
115
|
+
}
|
|
116
|
+
set.add(handler)
|
|
117
|
+
this.handlers.set(topic, set)
|
|
118
|
+
this.ensureConnected()
|
|
119
|
+
return () => this.unsubscribe(topic, handler)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
unsubscribe<K extends keyof EventHubTopics & string>(
|
|
123
|
+
topic: K,
|
|
124
|
+
handler?: Handler<EventHubTopics[K]>
|
|
125
|
+
): void {
|
|
126
|
+
const set = this.handlers.get(topic)
|
|
127
|
+
if (!set) return
|
|
128
|
+
if (handler) set.delete(handler)
|
|
129
|
+
else set.clear()
|
|
130
|
+
if (set.size === 0) {
|
|
131
|
+
this.handlers.delete(topic)
|
|
132
|
+
this.send({ action: 'unsubscribe', topic })
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* SSE alternative for a single topic stream. One EventSource per topic;
|
|
138
|
+
* close the returned object to unsubscribe (the server cleans up
|
|
139
|
+
* automatically on disconnect).
|
|
140
|
+
*/
|
|
141
|
+
subscribeToTopic<K extends keyof EventHubTopics & string>(
|
|
142
|
+
topic: K,
|
|
143
|
+
handler: Handler<EventHubTopics[K]>
|
|
144
|
+
): { close: () => void } {
|
|
145
|
+
return this.subscribeToSSE<EventHubTopics[K]>(
|
|
146
|
+
\`/events/\${encodeURIComponent(topic)}\`,
|
|
147
|
+
handler
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Generic SSE subscribe. Use for any \`sse: true\` HTTP route in your
|
|
153
|
+
* project. Caller supplies the path (with any params/query) — the base
|
|
154
|
+
* URL comes from the wrapped PikkuFetch.
|
|
155
|
+
*
|
|
156
|
+
* \`\`\`ts
|
|
157
|
+
* const sub = realtime.subscribeToSSE<{ progress: number }>(
|
|
158
|
+
* \`/workflow-run/\${runId}/stream\`,
|
|
159
|
+
* (e) => setProgress(e.progress)
|
|
160
|
+
* )
|
|
161
|
+
* \`\`\`
|
|
162
|
+
*/
|
|
163
|
+
subscribeToSSE<T = unknown>(
|
|
164
|
+
path: string,
|
|
165
|
+
handler: Handler<T>,
|
|
166
|
+
onError?: (err: unknown) => void
|
|
167
|
+
): { close: () => void } {
|
|
168
|
+
const controller = new AbortController()
|
|
169
|
+
const closed = { value: false }
|
|
170
|
+
|
|
171
|
+
const run = async () => {
|
|
172
|
+
try {
|
|
173
|
+
const response = await (this.pikkuFetch as CorePikkuFetch).fetch(
|
|
174
|
+
path,
|
|
175
|
+
'GET',
|
|
176
|
+
null,
|
|
177
|
+
{
|
|
178
|
+
headers: { Accept: 'text/event-stream' },
|
|
179
|
+
signal: controller.signal,
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
if (!response.ok || !response.body) {
|
|
183
|
+
throw new Error(\`SSE request failed: \${response.status}\`)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const reader = response.body
|
|
187
|
+
.pipeThrough(new TextDecoderStream())
|
|
188
|
+
.getReader()
|
|
189
|
+
let buffer = ''
|
|
190
|
+
|
|
191
|
+
while (!closed.value) {
|
|
192
|
+
const { done, value } = await reader.read()
|
|
193
|
+
if (done) break
|
|
194
|
+
buffer += value
|
|
195
|
+
|
|
196
|
+
let sep: number
|
|
197
|
+
while ((sep = buffer.indexOf('\\n\\n')) !== -1) {
|
|
198
|
+
const raw = buffer.slice(0, sep)
|
|
199
|
+
buffer = buffer.slice(sep + 2)
|
|
200
|
+
|
|
201
|
+
const dataLines = raw
|
|
202
|
+
.split('\\n')
|
|
203
|
+
.filter((l) => l.startsWith('data:'))
|
|
204
|
+
.map((l) => l.slice(5).trimStart())
|
|
205
|
+
if (dataLines.length === 0) continue
|
|
206
|
+
const data = dataLines.join('\\n')
|
|
207
|
+
|
|
208
|
+
try {
|
|
209
|
+
handler(JSON.parse(data) as T)
|
|
210
|
+
} catch {
|
|
211
|
+
// Ignore malformed events
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
} catch (err) {
|
|
216
|
+
if (closed.value) return
|
|
217
|
+
if (onError) onError(err)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
void run()
|
|
222
|
+
|
|
223
|
+
return {
|
|
224
|
+
close: () => {
|
|
225
|
+
closed.value = true
|
|
226
|
+
controller.abort()
|
|
227
|
+
},
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Open a raw WebSocket against one of the project's wireChannel routes.
|
|
233
|
+
* Wrap the returned socket in \`PikkuWebSocket<'channel-name'>\` from the
|
|
234
|
+
* generated websocket client for typed subscribe/send.
|
|
235
|
+
*/
|
|
236
|
+
connectToChannel(
|
|
237
|
+
channelPath: string,
|
|
238
|
+
protocols?: string | string[]
|
|
239
|
+
): WebSocket {
|
|
240
|
+
return new WebSocket(this.resolveWsUrl(channelPath), protocols)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/** Disconnect the events websocket and clear all subscriptions. */
|
|
244
|
+
close(): void {
|
|
245
|
+
this.closed = true
|
|
246
|
+
this.handlers.clear()
|
|
247
|
+
this.ws?.close()
|
|
248
|
+
this.ws = null
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
private ensureConnected() {
|
|
252
|
+
if (this.ws || this.connectScheduled || this.closed) return
|
|
253
|
+
this.connect()
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
private connect() {
|
|
257
|
+
if (this.closed) return
|
|
258
|
+
this.connectScheduled = false
|
|
259
|
+
const url = this.resolveWsUrl('/events')
|
|
260
|
+
this.ws = new WebSocket(url)
|
|
261
|
+
this.ws.onopen = () => {
|
|
262
|
+
this.reconnectAttempt = 0
|
|
263
|
+
for (const topic of this.handlers.keys()) {
|
|
264
|
+
this.send({ action: 'subscribe', topic })
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
this.ws.onmessage = (e: MessageEvent) => {
|
|
268
|
+
let payload: unknown
|
|
269
|
+
try {
|
|
270
|
+
payload =
|
|
271
|
+
typeof e.data === 'string' ? JSON.parse(e.data) : (e.data as unknown)
|
|
272
|
+
} catch {
|
|
273
|
+
return
|
|
274
|
+
}
|
|
275
|
+
if (
|
|
276
|
+
payload &&
|
|
277
|
+
typeof payload === 'object' &&
|
|
278
|
+
'topic' in (payload as any) &&
|
|
279
|
+
typeof (payload as any).topic === 'string'
|
|
280
|
+
) {
|
|
281
|
+
const { topic, data } = payload as { topic: string; data: unknown }
|
|
282
|
+
const set = this.handlers.get(topic)
|
|
283
|
+
if (set) for (const h of set) h(data)
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
this.ws.onclose = () => {
|
|
287
|
+
this.ws = null
|
|
288
|
+
if (this.closed || !this.options.reconnect) return
|
|
289
|
+
const delay = Math.min(
|
|
290
|
+
this.options.reconnectDelayMs * 2 ** this.reconnectAttempt,
|
|
291
|
+
this.options.reconnectMaxDelayMs
|
|
292
|
+
)
|
|
293
|
+
this.reconnectAttempt += 1
|
|
294
|
+
this.connectScheduled = true
|
|
295
|
+
setTimeout(() => this.connect(), delay)
|
|
296
|
+
}
|
|
297
|
+
this.ws.onerror = () => {
|
|
298
|
+
this.ws?.close()
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
private send(message: { action: 'subscribe' | 'unsubscribe'; topic: string }) {
|
|
303
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
304
|
+
this.ws.send(JSON.stringify(message))
|
|
305
|
+
}
|
|
306
|
+
// If not open, onopen replays current handler keys.
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
private resolveHttpUrl(path: string): string {
|
|
310
|
+
const base = this.pikkuFetch.getServerUrl()
|
|
311
|
+
if (!base) {
|
|
312
|
+
throw new Error(
|
|
313
|
+
'PikkuRealtime: no server URL — call setServerUrl(...) or setPikkuFetch(...) first.'
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
return \`\${base}\${path.startsWith('/') ? path : \`/\${path}\`}\`
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
private resolveWsUrl(path: string): string {
|
|
320
|
+
const httpUrl = this.resolveHttpUrl(path)
|
|
321
|
+
return httpUrl.replace(/^http/i, 'ws')
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
`;
|
|
325
|
+
};
|
|
326
|
+
function buildImportLine(spec) {
|
|
327
|
+
const hashIdx = spec.lastIndexOf('#');
|
|
328
|
+
if (hashIdx === -1) {
|
|
329
|
+
return `import type { EventHubTopics } from '${spec}'`;
|
|
330
|
+
}
|
|
331
|
+
const path = spec.slice(0, hashIdx);
|
|
332
|
+
const typeName = spec.slice(hashIdx + 1);
|
|
333
|
+
if (typeName === 'EventHubTopics') {
|
|
334
|
+
return `import type { EventHubTopics } from '${path}'`;
|
|
335
|
+
}
|
|
336
|
+
return `import type { ${typeName} as EventHubTopics } from '${path}'`;
|
|
337
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuPublicRPC: import("#pikku").PikkuFunctionConfig<void, boolean, "
|
|
1
|
+
export declare const pikkuPublicRPC: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuReactQuery: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuReactQuery: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuRemoteRPC: import("#pikku").PikkuFunctionConfig<void, boolean, "
|
|
1
|
+
export declare const pikkuRemoteRPC: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuRPCClient: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuRPCClient: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -16,7 +16,9 @@ export const pikkuRPCClient = pikkuSessionlessFunc({
|
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const rpcMapDeclarationPath = getFileImportRelativePath(rpcWiringsFile, rpcMapDeclarationFile, packageMappings);
|
|
19
|
-
const content = [
|
|
19
|
+
const content = [
|
|
20
|
+
serializeRPCWrapper(rpcMapDeclarationPath, config.globalHTTPPrefix || ''),
|
|
21
|
+
];
|
|
20
22
|
await writeFileInDir(logger, rpcWiringsFile, content.join('\n'));
|
|
21
23
|
},
|
|
22
24
|
middleware: [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const pikkuRPCInternalMap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
2
|
-
export declare const pikkuRPCExposedMap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuRPCInternalMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
2
|
+
export declare const pikkuRPCExposedMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function filterInternalRPCMeta(internalMeta: Record<string, string>, functionsMeta: Record<string, unknown>): Record<string, string>;
|
|
2
|
+
export declare const pikkuRPC: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|