@pikku/cli 0.11.1 → 0.11.3
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/.pikku/channel/pikku-channel-types.gen.ts +73 -17
- package/.pikku/channel/pikku-channels-map.gen.d.ts +11 -11
- package/.pikku/channel/pikku-channels-meta.gen.json +1 -0
- package/.pikku/channel/pikku-channels-meta.gen.ts +4 -2
- package/.pikku/channel/pikku-channels.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-channel.ts +2 -2
- package/.pikku/cli/pikku-cli-client.gen.ts +1 -3
- package/.pikku/cli/pikku-cli-types.gen.ts +3 -3
- package/.pikku/cli/pikku-cli-wirings-meta.gen.json +147 -0
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +4 -157
- package/.pikku/cli/pikku-cli-wirings.gen.ts +3 -3
- package/.pikku/cli/pikku-cli.gen.ts +3 -3
- package/.pikku/forge/pikku-forge-types.gen.ts +83 -0
- package/.pikku/function/pikku-function-types.gen.ts +223 -91
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +1030 -0
- package/.pikku/function/pikku-functions-meta.gen.json +656 -0
- package/.pikku/function/pikku-functions-meta.gen.ts +4 -970
- package/.pikku/http/pikku-http-types.gen.ts +20 -4
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +11 -11
- package/.pikku/http/pikku-http-wirings-meta.gen.json +9 -0
- package/.pikku/http/pikku-http-wirings-meta.gen.ts +4 -10
- package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-types.gen.ts +72 -20
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +6 -4
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
- package/.pikku/pikku-bootstrap.gen.ts +7 -12
- package/.pikku/pikku-services.gen.ts +6 -7
- package/.pikku/pikku-types.gen.ts +4 -1
- package/.pikku/pikku-websocket.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-types.gen.ts +2 -2
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +11 -11
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +5 -7
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
- package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +5 -2
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +19 -14
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +46 -39
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +2 -2
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +5 -2
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
- package/.pikku/schemas/register.gen.ts +31 -23
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuCLIOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuForgeNodesOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PikkuFunctionsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuHTTPOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuMCPOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuMiddlewareOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuPackageOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PikkuPermissionsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuQueueOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuRPCOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuSchedulerOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -1
- package/.pikku/services/config.gen.json +104 -0
- package/.pikku/services/getInspectorState.gen.json +10 -0
- package/.pikku/services/jwt.gen.json +13 -0
- package/.pikku/services/logger.gen.json +25 -0
- package/.pikku/services/queueService.gen.json +14 -0
- package/.pikku/services/schedulerService.gen.json +17 -0
- package/.pikku/services/schema.gen.json +14 -0
- package/.pikku/services/secrets.gen.json +13 -0
- package/.pikku/services/variables.gen.json +13 -0
- package/.pikku/services/workflowService.gen.json +31 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +2 -36
- package/.pikku/workflow/pikku-workflow-types.gen.ts +305 -48
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +6 -2
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -2
- package/CHANGELOG.md +44 -1
- package/bin/pikku.ts +6 -32
- package/build.sh +53 -31
- package/cli.schema.json +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +51 -10
- package/dist/.pikku/channel/pikku-channel-types.gen.js +3 -13
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +3 -2
- package/dist/.pikku/channel/pikku-channels-meta.gen.json +1 -0
- 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 +2 -2
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -3
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +3 -3
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +3 -157
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +147 -0
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +3 -3
- package/dist/.pikku/forge/pikku-forge-types.gen.d.ts +72 -0
- package/dist/.pikku/forge/pikku-forge-types.gen.js +55 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +141 -99
- package/dist/.pikku/function/pikku-function-types.gen.js +52 -62
- package/dist/.pikku/function/pikku-functions-meta.gen.js +3 -969
- package/dist/.pikku/function/pikku-functions-meta.gen.json +656 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +19 -4
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +3 -10
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +9 -0
- 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 +57 -17
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +7 -31
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +5 -4
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +7 -12
- package/dist/.pikku/pikku-bootstrap.gen.js +7 -12
- package/dist/.pikku/pikku-services.gen.d.ts +5 -7
- package/dist/.pikku/pikku-services.gen.js +3 -5
- package/dist/.pikku/pikku-types.gen.d.ts +2 -1
- package/dist/.pikku/pikku-types.gen.js +3 -1
- 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 +2 -2
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +3 -7
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
- 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 +9 -9
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +5 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +3 -2
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
- 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 +19 -15
- 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/PikkuForgeNodesOutput.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/PikkuPackageOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuPermissionsOutput.schema.json +1 -1
- 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/PikkuWorkflowOutput.schema.json +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +213 -39
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +106 -16
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +3 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -2
- package/dist/bin/pikku.js +5 -26
- package/dist/src/cli.wiring.js +4 -4
- package/dist/src/functions/commands/all.js +172 -94
- package/dist/src/functions/commands/bootstrap.js +21 -16
- package/dist/src/functions/commands/watch.js +6 -3
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +12 -8
- 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 +74 -22
- 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 +72 -20
- package/dist/src/functions/wirings/channels/pikku-channels.js +9 -2
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +18 -2
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +72 -16
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.js +1 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +4 -4
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +17 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +4 -4
- package/dist/src/functions/wirings/forge/pikku-command-forge-nodes.d.ts +1 -0
- package/dist/src/functions/wirings/forge/pikku-command-forge-nodes.js +90 -0
- package/dist/src/functions/wirings/forge/pikku-command-forge-types.d.ts +1 -0
- package/dist/src/functions/wirings/forge/pikku-command-forge-types.js +26 -0
- package/dist/src/functions/wirings/forge/serialize-forge-types.d.ts +4 -0
- package/dist/src/functions/wirings/forge/serialize-forge-types.js +90 -0
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +7 -2
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +35 -10
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +24 -24
- package/dist/src/functions/wirings/functions/pikku-function-types.js +2 -2
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.js +5 -4
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +3 -1
- package/dist/src/functions/wirings/functions/serialize-function-imports.js +7 -3
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +224 -91
- 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 +19 -21
- package/dist/src/functions/wirings/http/openapi-spec-generator.js +5 -5
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +18 -2
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +2 -2
- package/dist/src/functions/wirings/http/pikku-http-routes.js +9 -2
- package/dist/src/functions/wirings/http/serialize-http-types.js +19 -3
- package/dist/src/functions/wirings/http/serialize-typed-http-map.js +33 -8
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +29 -6
- package/dist/src/functions/wirings/mcp/serialize-mcp-json.js +3 -2
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +71 -19
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +29 -2
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.d.ts +5 -2
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.js +5 -13
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -0
- package/dist/src/functions/wirings/package/pikku-command-package.js +58 -0
- package/dist/src/functions/wirings/package/serialize-package.d.ts +5 -0
- package/dist/src/functions/wirings/package/serialize-package.js +32 -0
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +17 -3
- package/dist/src/functions/wirings/queue/pikku-queue.js +9 -11
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +20 -3
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +2 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.js +10 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +4 -4
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +9 -2
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +11 -4
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +4 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +3 -3
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +54 -8
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +15 -3
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +2 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.js +11 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +1 -1
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.d.ts +1 -0
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.js +22 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +58 -16
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +3 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +30 -32
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.d.ts +1 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +43 -8
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.d.ts +7 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +53 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +4 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +308 -49
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +16 -29
- package/dist/src/middleware/log-command-info-and-time.d.ts +2 -2
- package/dist/src/middleware/log-command-info-and-time.js +1 -4
- package/dist/src/services/cli-logger-forwarder.service.js +1 -1
- package/dist/src/services.d.ts +2 -7
- package/dist/src/services.js +18 -13
- package/dist/src/utils/check-required-types.d.ts +2 -2
- package/dist/src/utils/check-required-types.js +2 -3
- package/dist/src/utils/command-summary.d.ts +2 -0
- package/dist/src/utils/command-summary.js +2 -0
- package/dist/src/utils/custom-types-generator.js +13 -15
- package/dist/src/utils/generate-bootstrap-file.js +1 -1
- package/dist/src/utils/pikku-cli-config.js +65 -4
- package/dist/src/utils/pikku-files-and-methods.d.ts +2 -2
- package/dist/src/utils/pikku-files-and-methods.js +4 -4
- package/dist/src/utils/schema-generator.d.ts +4 -3
- package/dist/src/utils/schema-generator.js +135 -15
- package/dist/src/utils/strip-verbose-meta.d.ts +43 -0
- package/dist/src/utils/strip-verbose-meta.js +210 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -9
- package/src/cli.wiring.ts +4 -4
- package/src/functions/commands/all.ts +203 -107
- package/src/functions/commands/bootstrap.ts +23 -16
- package/src/functions/commands/watch.ts +6 -3
- package/src/functions/runtimes/nextjs/pikku-command-nextjs.ts +26 -6
- package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +75 -22
- package/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts +72 -19
- package/src/functions/wirings/channels/pikku-channels.ts +27 -3
- package/src/functions/wirings/channels/pikku-command-channels.ts +46 -3
- package/src/functions/wirings/channels/serialize-channel-types.ts +72 -16
- package/src/functions/wirings/channels/serialize-typed-channel-map.ts +3 -2
- package/src/functions/wirings/cli/pikku-command-cli-entry.ts +4 -4
- package/src/functions/wirings/cli/pikku-command-cli-types.ts +1 -1
- package/src/functions/wirings/cli/pikku-command-cli.ts +45 -3
- package/src/functions/wirings/cli/serialize-channel-cli.ts +1 -1
- package/src/functions/wirings/cli/serialize-cli-types.ts +2 -2
- package/src/functions/wirings/cli/serialize-local-cli-bootstrap.ts +5 -5
- package/src/functions/wirings/forge/pikku-command-forge-nodes.ts +135 -0
- package/src/functions/wirings/forge/pikku-command-forge-types.ts +38 -0
- package/src/functions/wirings/forge/serialize-forge-types.ts +94 -0
- package/src/functions/wirings/functions/pikku-command-function-types-split.ts +9 -8
- package/src/functions/wirings/functions/pikku-command-function-types.ts +17 -10
- package/src/functions/wirings/functions/pikku-command-functions.ts +59 -14
- package/src/functions/wirings/functions/pikku-command-services.ts +26 -26
- package/src/functions/wirings/functions/pikku-function-types.ts +3 -1
- package/src/functions/wirings/functions/schemas.ts +14 -4
- package/src/functions/wirings/functions/serialize-function-imports.ts +12 -3
- package/src/functions/wirings/functions/serialize-function-types.ts +227 -93
- package/src/functions/wirings/functions/serialize-pikku-types-hub.ts +27 -26
- package/src/functions/wirings/http/openapi-spec-generator.ts +15 -6
- package/src/functions/wirings/http/pikku-command-http-routes.ts +46 -2
- package/src/functions/wirings/http/pikku-command-openapi.ts +3 -2
- package/src/functions/wirings/http/pikku-http-routes.ts +28 -2
- package/src/functions/wirings/http/serialize-http-types.ts +19 -3
- package/src/functions/wirings/http/serialize-typed-http-map.ts +32 -8
- package/src/functions/wirings/mcp/pikku-command-mcp.ts +58 -10
- package/src/functions/wirings/mcp/serialize-mcp-json.ts +8 -6
- package/src/functions/wirings/mcp/serialize-mcp-types.ts +71 -19
- package/src/functions/wirings/middleware/pikku-command-middleware.ts +39 -2
- package/src/functions/wirings/middleware/serialize-middleware-groups-meta.ts +4 -19
- package/src/functions/wirings/package/pikku-command-package.ts +81 -0
- package/src/functions/wirings/package/serialize-package.ts +69 -0
- package/src/functions/wirings/permissions/pikku-command-permissions.ts +2 -2
- package/src/functions/wirings/queue/pikku-command-queue.ts +47 -2
- package/src/functions/wirings/queue/pikku-queue.ts +26 -10
- package/src/functions/wirings/queue/serialize-queue-map.ts +18 -3
- package/src/functions/wirings/queue/serialize-queue-meta.ts +15 -1
- package/src/functions/wirings/queue/serialize-queue-types.ts +1 -1
- package/src/functions/wirings/rpc/pikku-command-rpc-map.ts +7 -4
- package/src/functions/wirings/rpc/pikku-command-rpc.ts +25 -2
- package/src/functions/wirings/rpc/serialize-public-rpc.ts +11 -4
- package/src/functions/wirings/rpc/serialize-remote-rpc.ts +4 -1
- package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +3 -3
- package/src/functions/wirings/rpc/serialize-typed-rpc-map.ts +74 -8
- package/src/functions/wirings/scheduler/pikku-command-scheduler.ts +51 -4
- package/src/functions/wirings/scheduler/serialize-scheduler-meta.ts +20 -1
- package/src/functions/wirings/scheduler/serialize-scheduler-types.ts +1 -1
- package/src/functions/wirings/services/pikku-command-service-metadata.ts +25 -0
- package/src/functions/wirings/workflow/pikku-command-workflow.ts +114 -19
- package/src/functions/wirings/workflow/serialize-workflow-map.ts +38 -40
- package/src/functions/wirings/workflow/serialize-workflow-meta.ts +68 -11
- package/src/functions/wirings/workflow/serialize-workflow-registration.ts +83 -0
- package/src/functions/wirings/workflow/serialize-workflow-types.ts +311 -49
- package/src/functions/wirings/workflow/serialize-workflow-workers.ts +16 -29
- package/src/middleware/log-command-info-and-time.ts +3 -6
- package/src/services/cli-logger-forwarder.service.ts +1 -1
- package/src/services.ts +23 -16
- package/src/utils/check-required-types.ts +4 -7
- package/src/utils/command-summary.ts +4 -0
- package/src/utils/custom-types-generator.ts +15 -15
- package/src/utils/generate-bootstrap-file.ts +1 -1
- package/src/utils/pikku-cli-config.ts +105 -5
- package/src/utils/pikku-files-and-methods.ts +10 -13
- package/src/utils/schema-generator.ts +185 -22
- package/src/utils/strip-verbose-meta.ts +254 -0
- package/types/application-types.d.ts +1 -1
- package/types/config.d.ts +47 -2
- package/.pikku/function/pikku-functions-meta.min.gen.ts +0 -211
- package/.pikku/function/pikku-functions.gen.ts +0 -84
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -47
- package/dist/.pikku/function/pikku-functions-meta.min.gen.d.ts +0 -1
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +0 -211
- package/dist/.pikku/function/pikku-functions.gen.d.ts +0 -1
- package/dist/.pikku/function/pikku-functions.gen.js +0 -83
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +0 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +0 -47
- package/dist/.pikku/schemas/schemas/PikkuRemoteInternalRPCInput.schema.json +0 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.d.ts +0 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.js +0 -12
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.d.ts +0 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.js +0 -11
- package/src/functions/wirings/workflow/pikku-command-workflow-map.ts +0 -24
- package/src/functions/wirings/workflow/pikku-command-workflow-types.ts +0 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
|
|
@@ -7,9 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { CoreChannel, wireChannel as wireChannelCore } from '@pikku/core/channel'
|
|
10
|
-
import { CorePikkuFunctionConfig } from '@pikku/core'
|
|
11
10
|
import { AssertHTTPWiringParams } from '@pikku/core/http'
|
|
12
|
-
import type {
|
|
11
|
+
import type { PikkuFunctionConfig, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware } from '../function/pikku-function-types.gen.js'
|
|
12
|
+
import type { ZodLike, CorePermissionGroup } from '@pikku/core'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Helper type to infer the output type from a Zod schema
|
|
16
|
+
*/
|
|
17
|
+
type InferZodOutput<T> = T extends ZodLike<infer U> ? U : never
|
|
13
18
|
|
|
14
19
|
/**
|
|
15
20
|
* Type definition for WebSocket channels with typed data exchange.
|
|
@@ -22,9 +27,9 @@ import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMid
|
|
|
22
27
|
type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<
|
|
23
28
|
ChannelData,
|
|
24
29
|
Channel,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
PikkuFunctionConfig<void, any, 'channel' | 'session' | 'rpc'>,
|
|
31
|
+
PikkuFunctionConfig<void, void, 'channel' | 'session' | 'rpc'>,
|
|
32
|
+
PikkuFunctionConfig<any, any, 'channel' | 'session' | 'rpc'>,
|
|
28
33
|
PikkuPermission,
|
|
29
34
|
PikkuMiddleware
|
|
30
35
|
>
|
|
@@ -39,8 +44,8 @@ type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<
|
|
|
39
44
|
*/
|
|
40
45
|
export const pikkuChannelConnectionFunc = <Out = unknown>(
|
|
41
46
|
func:
|
|
42
|
-
| PikkuFunctionSessionless<void, Out,
|
|
43
|
-
|
|
|
47
|
+
| PikkuFunctionSessionless<void, Out, 'channel' | 'session' | 'rpc'>
|
|
48
|
+
| PikkuFunctionConfig<void, Out, 'channel' | 'session' | 'rpc'>
|
|
44
49
|
) => {
|
|
45
50
|
return typeof func === 'function' ? { func } : func
|
|
46
51
|
}
|
|
@@ -54,27 +59,78 @@ export const pikkuChannelConnectionFunc = <Out = unknown>(
|
|
|
54
59
|
*/
|
|
55
60
|
export const pikkuChannelDisconnectionFunc = (
|
|
56
61
|
func:
|
|
57
|
-
| PikkuFunctionSessionless<void, void,
|
|
58
|
-
|
|
|
62
|
+
| PikkuFunctionSessionless<void, void, 'channel'>
|
|
63
|
+
| PikkuFunctionConfig<void, void, 'channel' | 'session' | 'rpc'>
|
|
59
64
|
) => {
|
|
60
65
|
return typeof func === 'function' ? { func } : func
|
|
61
66
|
}
|
|
62
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Configuration object for channel functions with Zod schema validation.
|
|
70
|
+
*/
|
|
71
|
+
type PikkuChannelFuncConfigWithSchema<
|
|
72
|
+
InputSchema extends ZodLike,
|
|
73
|
+
OutputSchema extends ZodLike | undefined = undefined
|
|
74
|
+
> = {
|
|
75
|
+
name?: string
|
|
76
|
+
tags?: string[]
|
|
77
|
+
expose?: boolean
|
|
78
|
+
internal?: boolean
|
|
79
|
+
func: PikkuFunctionSessionless<
|
|
80
|
+
InferZodOutput<InputSchema>,
|
|
81
|
+
OutputSchema extends ZodLike ? InferZodOutput<OutputSchema> : unknown,
|
|
82
|
+
'channel' | 'session' | 'rpc'
|
|
83
|
+
>
|
|
84
|
+
auth?: boolean
|
|
85
|
+
permissions?: CorePermissionGroup<PikkuPermission<InferZodOutput<InputSchema>>>
|
|
86
|
+
middleware?: PikkuMiddleware[]
|
|
87
|
+
input: InputSchema
|
|
88
|
+
output?: OutputSchema
|
|
89
|
+
}
|
|
90
|
+
|
|
63
91
|
/**
|
|
64
92
|
* Creates a function that handles WebSocket channel messages.
|
|
65
93
|
* Called when a message is received on a channel.
|
|
66
|
-
* This is the same as pikkuSessionlessFunc but with ChannelData = unknown by default.
|
|
67
94
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
95
|
+
* Supports two patterns:
|
|
96
|
+
* 1. Generic types: `pikkuChannelFunc<Input, Output>({ func: ... })`
|
|
97
|
+
* 2. Zod schemas: `pikkuChannelFunc({ input: z.object(...), func: ... })`
|
|
98
|
+
*
|
|
99
|
+
* @template In - Input type for channel messages (inferred from schema if provided)
|
|
100
|
+
* @template Out - Output type for channel responses (inferred from schema if provided)
|
|
70
101
|
* @param func - Function definition, either direct function or configuration object
|
|
71
102
|
* @returns The normalized configuration object
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* // Pattern 1: Using generic types
|
|
107
|
+
* const handleMessage = pikkuChannelFunc<{text: string}, {received: boolean}>({
|
|
108
|
+
* func: async (_services, { text }) => ({ received: true })
|
|
109
|
+
* })
|
|
110
|
+
*
|
|
111
|
+
* // Pattern 2: Using Zod schemas
|
|
112
|
+
* const messageInput = z.object({ text: z.string() })
|
|
113
|
+
* const messageOutput = z.object({ received: z.boolean() })
|
|
114
|
+
*
|
|
115
|
+
* const handleMessage = pikkuChannelFunc({
|
|
116
|
+
* input: messageInput,
|
|
117
|
+
* output: messageOutput,
|
|
118
|
+
* func: async (_services, { text }) => ({ received: true })
|
|
119
|
+
* })
|
|
120
|
+
* ```
|
|
72
121
|
*/
|
|
73
|
-
export
|
|
122
|
+
export function pikkuChannelFunc<
|
|
123
|
+
InputSchema extends ZodLike,
|
|
124
|
+
OutputSchema extends ZodLike | undefined = undefined
|
|
125
|
+
>(
|
|
126
|
+
config: PikkuChannelFuncConfigWithSchema<InputSchema, OutputSchema>
|
|
127
|
+
): PikkuFunctionConfig<InferZodOutput<InputSchema>, OutputSchema extends ZodLike ? InferZodOutput<OutputSchema> : unknown, 'channel' | 'session' | 'rpc'>
|
|
128
|
+
export function pikkuChannelFunc<In, Out = unknown>(
|
|
74
129
|
func:
|
|
75
|
-
| PikkuFunctionSessionless<In, Out,
|
|
76
|
-
|
|
|
77
|
-
)
|
|
130
|
+
| PikkuFunctionSessionless<In, Out, 'channel' | 'session' | 'rpc'>
|
|
131
|
+
| PikkuFunctionConfig<In, Out, 'channel' | 'session' | 'rpc'>
|
|
132
|
+
): PikkuFunctionConfig<In, Out, 'channel' | 'session' | 'rpc'>
|
|
133
|
+
export function pikkuChannelFunc(func: any) {
|
|
78
134
|
return typeof func === 'function' ? { func } : func
|
|
79
135
|
}
|
|
80
136
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for TypeScript to be aware of channels
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
// or are broken into simpler types
|
|
9
|
+
|
|
12
10
|
export type PikkuSchemasOutput = false | true
|
|
13
|
-
export type PikkuChannelsOutput = false | true
|
|
14
|
-
export type PikkuCLIOutput = false | true
|
|
15
11
|
export type PikkuFunctionsOutput = false | true
|
|
16
|
-
export type PikkuHTTPOutput = false | true
|
|
17
|
-
export type PikkuMCPOutput = false | true
|
|
18
12
|
export type PikkuMiddlewareOutput = false | true
|
|
19
13
|
export type PikkuPermissionsOutput = false | true
|
|
20
|
-
export type PikkuQueueOutput = false | true
|
|
21
|
-
export type PikkuPublicRPCOutput = false | true
|
|
22
|
-
export type PikkuRemoteRPCOutput = false | true
|
|
23
14
|
export type PikkuRPCOutput = false | true
|
|
15
|
+
export type PikkuPublicRPCOutput = false | true
|
|
16
|
+
export type PikkuHTTPOutput = false | true
|
|
24
17
|
export type PikkuSchedulerOutput = false | true
|
|
25
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
26
|
|
|
27
27
|
interface ChannelHandler<I, O> {
|
|
28
28
|
input: I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core'
|
|
5
|
-
|
|
5
|
+
import type { ChannelsMeta } from '@pikku/core/channel'
|
|
6
|
+
import metaData from './pikku-channels-meta.gen.json' with { type: 'json' }
|
|
7
|
+
pikkuState(null, 'channel', 'meta', metaData as ChannelsMeta)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* WebSocket channel backend for 'pikku' CLI commands
|
|
@@ -18,7 +18,7 @@ import { pikkuOpenAPI } from '../../src/functions/wirings/http/pikku-command-ope
|
|
|
18
18
|
import { pikkuNext } from '../../src/functions/runtimes/nextjs/pikku-command-nextjs.js'
|
|
19
19
|
|
|
20
20
|
// Middleware to close the channel after CLI command completes
|
|
21
|
-
const cliCloseOnComplete = pikkuMiddleware(async (
|
|
21
|
+
const cliCloseOnComplete = pikkuMiddleware(async (_services, { channel }, next) => {
|
|
22
22
|
const closeChannel = () => {
|
|
23
23
|
setTimeout(async () => {
|
|
24
24
|
try {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { executeCLIViaChannel } from '@pikku/core/cli/channel'
|
|
6
6
|
import { CorePikkuWebsocket } from '@pikku/websocket'
|
|
7
7
|
import '../pikku-bootstrap.gen.js'
|
|
8
|
-
import { clientCLIRenderer } from '../../src/services.js'
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Pikku CLI Client (via WebSocket Channel)
|
|
@@ -26,7 +25,6 @@ export async function PikkuCLIClient(
|
|
|
26
25
|
pikkuWS,
|
|
27
26
|
args,
|
|
28
27
|
renderers,
|
|
29
|
-
defaultRenderer: clientCLIRenderer,
|
|
30
28
|
})
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
|
|
@@ -49,7 +49,7 @@ export const pikkuCLIRender = <Data, RequiredServices extends SingletonServices
|
|
|
49
49
|
* CLI command configuration with project-specific types.
|
|
50
50
|
* Uses CoreCLICommandConfig from @pikku/core with local middleware and render types.
|
|
51
51
|
*/
|
|
52
|
-
type CLICommandConfig<Func extends PikkuFunctionConfig<In, Out>, In = any, Out = any, Params extends string = string> = CoreCLICommandConfig<Func, PikkuMiddleware, PikkuCLIRender<any>, Params>
|
|
52
|
+
type CLICommandConfig<Func extends PikkuFunctionConfig<In, Out, 'cli' | 'rpc' | 'session'>, In = any, Out = any, Params extends string = string> = CoreCLICommandConfig<Func, PikkuMiddleware, PikkuCLIRender<any>, Params>
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Type definition for CLI applications with commands and global options.
|
|
@@ -83,7 +83,7 @@ export const wireCLI = <Commands extends Record<string, CoreCLICommandConfig<any
|
|
|
83
83
|
* @returns CLI command configuration with inferred types
|
|
84
84
|
*/
|
|
85
85
|
export const pikkuCLICommand = <
|
|
86
|
-
FuncConfig extends PikkuFunctionConfig<any, any>,
|
|
86
|
+
FuncConfig extends PikkuFunctionConfig<any, any, 'cli' | 'rpc' | 'session'>,
|
|
87
87
|
Params extends string
|
|
88
88
|
>(
|
|
89
89
|
config: CLICommandConfig<FuncConfig, any, any, Params>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"programs": {
|
|
3
|
+
"pikku": {
|
|
4
|
+
"program": "pikku",
|
|
5
|
+
"commands": {
|
|
6
|
+
"all": {
|
|
7
|
+
"pikkuFuncName": "all",
|
|
8
|
+
"positionals": [],
|
|
9
|
+
"options": {
|
|
10
|
+
"tags": {
|
|
11
|
+
"description": "Filter functions by tags (comma-separated)",
|
|
12
|
+
"short": "t"
|
|
13
|
+
},
|
|
14
|
+
"types": {
|
|
15
|
+
"description": "Filter functions by types (comma-separated)"
|
|
16
|
+
},
|
|
17
|
+
"directories": {
|
|
18
|
+
"description": "Filter functions by directories (comma-separated)",
|
|
19
|
+
"short": "d"
|
|
20
|
+
},
|
|
21
|
+
"httpMethods": {
|
|
22
|
+
"description": "Filter HTTP routes by methods (comma-separated)"
|
|
23
|
+
},
|
|
24
|
+
"httpRoutes": {
|
|
25
|
+
"description": "Filter HTTP routes by route patterns (comma-separated)"
|
|
26
|
+
},
|
|
27
|
+
"names": {
|
|
28
|
+
"description": "Filter functions by name patterns (supports wildcards)",
|
|
29
|
+
"short": "n"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"description": "Generate all Pikku files (types, schemas, wirings, etc.)",
|
|
33
|
+
"isDefault": true
|
|
34
|
+
},
|
|
35
|
+
"bootstrap": {
|
|
36
|
+
"pikkuFuncName": "bootstrap",
|
|
37
|
+
"positionals": [],
|
|
38
|
+
"options": {},
|
|
39
|
+
"description": "Generate only type files (setup phase only)"
|
|
40
|
+
},
|
|
41
|
+
"watch": {
|
|
42
|
+
"pikkuFuncName": "watch",
|
|
43
|
+
"positionals": [],
|
|
44
|
+
"options": {},
|
|
45
|
+
"description": "Watch for file changes and regenerate automatically"
|
|
46
|
+
},
|
|
47
|
+
"schemas": {
|
|
48
|
+
"pikkuFuncName": "pikkuSchemas",
|
|
49
|
+
"positionals": [],
|
|
50
|
+
"options": {},
|
|
51
|
+
"description": "Generate JSON schemas for function input/output types"
|
|
52
|
+
},
|
|
53
|
+
"fetch": {
|
|
54
|
+
"pikkuFuncName": "pikkuFetch",
|
|
55
|
+
"positionals": [],
|
|
56
|
+
"options": {},
|
|
57
|
+
"description": "Generate type-safe HTTP fetch client"
|
|
58
|
+
},
|
|
59
|
+
"websocket": {
|
|
60
|
+
"pikkuFuncName": "pikkuWebSocketTyped",
|
|
61
|
+
"positionals": [],
|
|
62
|
+
"options": {},
|
|
63
|
+
"description": "Generate type-safe WebSocket client"
|
|
64
|
+
},
|
|
65
|
+
"rpc": {
|
|
66
|
+
"pikkuFuncName": "pikkuRPCClient",
|
|
67
|
+
"positionals": [],
|
|
68
|
+
"options": {},
|
|
69
|
+
"description": "Generate RPC client wrappers"
|
|
70
|
+
},
|
|
71
|
+
"queue-service": {
|
|
72
|
+
"pikkuFuncName": "pikkuQueueService",
|
|
73
|
+
"positionals": [],
|
|
74
|
+
"options": {},
|
|
75
|
+
"description": "Generate queue service wrapper"
|
|
76
|
+
},
|
|
77
|
+
"openapi": {
|
|
78
|
+
"pikkuFuncName": "pikkuOpenAPI",
|
|
79
|
+
"positionals": [],
|
|
80
|
+
"options": {},
|
|
81
|
+
"description": "Generate OpenAPI specification from HTTP routes"
|
|
82
|
+
},
|
|
83
|
+
"nextjs": {
|
|
84
|
+
"pikkuFuncName": "pikkuNext",
|
|
85
|
+
"positionals": [],
|
|
86
|
+
"options": {},
|
|
87
|
+
"description": "Generate Next.js backend and HTTP wrappers"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"options": {
|
|
91
|
+
"config": {
|
|
92
|
+
"description": "Path to pikku.config.json file",
|
|
93
|
+
"short": "c"
|
|
94
|
+
},
|
|
95
|
+
"logLevel": {
|
|
96
|
+
"description": "Set log level",
|
|
97
|
+
"short": "l",
|
|
98
|
+
"choices": [
|
|
99
|
+
"trace",
|
|
100
|
+
"debug",
|
|
101
|
+
"info",
|
|
102
|
+
"warn",
|
|
103
|
+
"error",
|
|
104
|
+
"critical"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"userSessionType": {
|
|
108
|
+
"description": "Specify which UserSession type to use (when multiple exist)"
|
|
109
|
+
},
|
|
110
|
+
"singletonServicesFactoryType": {
|
|
111
|
+
"description": "Specify which singleton services factory to use"
|
|
112
|
+
},
|
|
113
|
+
"wireServicesFactoryType": {
|
|
114
|
+
"description": "Specify which wire services factory to use"
|
|
115
|
+
},
|
|
116
|
+
"stateOutput": {
|
|
117
|
+
"description": "Save inspector state to JSON file for reuse"
|
|
118
|
+
},
|
|
119
|
+
"stateInput": {
|
|
120
|
+
"description": "Load inspector state from JSON file (skips inspection)"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"renderers": {
|
|
126
|
+
"defaultCLIRenderer": {
|
|
127
|
+
"name": "defaultCLIRenderer",
|
|
128
|
+
"exportedName": "defaultCLIRenderer",
|
|
129
|
+
"services": {
|
|
130
|
+
"optimized": true,
|
|
131
|
+
"services": [
|
|
132
|
+
"logger",
|
|
133
|
+
"getInspectorState",
|
|
134
|
+
"schema",
|
|
135
|
+
"jwt",
|
|
136
|
+
"config",
|
|
137
|
+
"variables",
|
|
138
|
+
"secrets",
|
|
139
|
+
"workflowService",
|
|
140
|
+
"queueService",
|
|
141
|
+
"schedulerService"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -1,160 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"program": "pikku",
|
|
9
|
-
"commands": {
|
|
10
|
-
"all": {
|
|
11
|
-
"pikkuFuncName": "all",
|
|
12
|
-
"positionals": [],
|
|
13
|
-
"options": {
|
|
14
|
-
"tags": {
|
|
15
|
-
"description": "Filter functions by tags (comma-separated)",
|
|
16
|
-
"short": "t"
|
|
17
|
-
},
|
|
18
|
-
"types": {
|
|
19
|
-
"description": "Filter functions by types (comma-separated)"
|
|
20
|
-
},
|
|
21
|
-
"directories": {
|
|
22
|
-
"description": "Filter functions by directories (comma-separated)",
|
|
23
|
-
"short": "d"
|
|
24
|
-
},
|
|
25
|
-
"httpMethods": {
|
|
26
|
-
"description": "Filter HTTP routes by methods (comma-separated)"
|
|
27
|
-
},
|
|
28
|
-
"httpRoutes": {
|
|
29
|
-
"description": "Filter HTTP routes by route patterns (comma-separated)"
|
|
30
|
-
},
|
|
31
|
-
"names": {
|
|
32
|
-
"description": "Filter functions by name patterns (supports wildcards)",
|
|
33
|
-
"short": "n"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"description": "Generate all Pikku files (types, schemas, wirings, etc.)",
|
|
37
|
-
"isDefault": true
|
|
38
|
-
},
|
|
39
|
-
"bootstrap": {
|
|
40
|
-
"pikkuFuncName": "bootstrap",
|
|
41
|
-
"positionals": [],
|
|
42
|
-
"options": {},
|
|
43
|
-
"description": "Generate only type files (setup phase only)"
|
|
44
|
-
},
|
|
45
|
-
"watch": {
|
|
46
|
-
"pikkuFuncName": "watch",
|
|
47
|
-
"positionals": [],
|
|
48
|
-
"options": {},
|
|
49
|
-
"description": "Watch for file changes and regenerate automatically"
|
|
50
|
-
},
|
|
51
|
-
"schemas": {
|
|
52
|
-
"pikkuFuncName": "pikkuSchemas",
|
|
53
|
-
"positionals": [],
|
|
54
|
-
"options": {},
|
|
55
|
-
"description": "Generate JSON schemas for function input/output types"
|
|
56
|
-
},
|
|
57
|
-
"fetch": {
|
|
58
|
-
"pikkuFuncName": "pikkuFetch",
|
|
59
|
-
"positionals": [],
|
|
60
|
-
"options": {},
|
|
61
|
-
"description": "Generate type-safe HTTP fetch client"
|
|
62
|
-
},
|
|
63
|
-
"websocket": {
|
|
64
|
-
"pikkuFuncName": "pikkuWebSocketTyped",
|
|
65
|
-
"positionals": [],
|
|
66
|
-
"options": {},
|
|
67
|
-
"description": "Generate type-safe WebSocket client"
|
|
68
|
-
},
|
|
69
|
-
"rpc": {
|
|
70
|
-
"pikkuFuncName": "pikkuRPCClient",
|
|
71
|
-
"positionals": [],
|
|
72
|
-
"options": {},
|
|
73
|
-
"description": "Generate RPC client wrappers"
|
|
74
|
-
},
|
|
75
|
-
"queue-service": {
|
|
76
|
-
"pikkuFuncName": "pikkuQueueService",
|
|
77
|
-
"positionals": [],
|
|
78
|
-
"options": {},
|
|
79
|
-
"description": "Generate queue service wrapper"
|
|
80
|
-
},
|
|
81
|
-
"openapi": {
|
|
82
|
-
"pikkuFuncName": "pikkuOpenAPI",
|
|
83
|
-
"positionals": [],
|
|
84
|
-
"options": {},
|
|
85
|
-
"description": "Generate OpenAPI specification from HTTP routes"
|
|
86
|
-
},
|
|
87
|
-
"nextjs": {
|
|
88
|
-
"pikkuFuncName": "pikkuNext",
|
|
89
|
-
"positionals": [],
|
|
90
|
-
"options": {},
|
|
91
|
-
"description": "Generate Next.js backend and HTTP wrappers"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"options": {
|
|
95
|
-
"config": {
|
|
96
|
-
"description": "Path to pikku.config.json file",
|
|
97
|
-
"short": "c"
|
|
98
|
-
},
|
|
99
|
-
"logLevel": {
|
|
100
|
-
"description": "Set log level",
|
|
101
|
-
"short": "l",
|
|
102
|
-
"choices": [
|
|
103
|
-
"trace",
|
|
104
|
-
"debug",
|
|
105
|
-
"info",
|
|
106
|
-
"warn",
|
|
107
|
-
"error",
|
|
108
|
-
"critical"
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"userSessionType": {
|
|
112
|
-
"description": "Specify which UserSession type to use (when multiple exist)"
|
|
113
|
-
},
|
|
114
|
-
"singletonServicesFactoryType": {
|
|
115
|
-
"description": "Specify which singleton services factory to use"
|
|
116
|
-
},
|
|
117
|
-
"sessionServicesFactoryType": {
|
|
118
|
-
"description": "Specify which session services factory to use"
|
|
119
|
-
},
|
|
120
|
-
"stateOutput": {
|
|
121
|
-
"description": "Save inspector state to JSON file for reuse"
|
|
122
|
-
},
|
|
123
|
-
"stateInput": {
|
|
124
|
-
"description": "Load inspector state from JSON file (skips inspection)"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"defaultRenderName": "clientCLIRenderer"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"renderers": {
|
|
131
|
-
"defaultCLIRenderer": {
|
|
132
|
-
"name": "defaultCLIRenderer",
|
|
133
|
-
"exportedName": "defaultCLIRenderer",
|
|
134
|
-
"services": {
|
|
135
|
-
"optimized": true,
|
|
136
|
-
"services": [
|
|
137
|
-
"logger",
|
|
138
|
-
"getInspectorState",
|
|
139
|
-
"schema",
|
|
140
|
-
"jwt",
|
|
141
|
-
"config",
|
|
142
|
-
"variables",
|
|
143
|
-
"workflowService",
|
|
144
|
-
"queueService",
|
|
145
|
-
"schedulerService"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
149
|
-
},
|
|
150
|
-
"clientCLIRenderer": {
|
|
151
|
-
"name": "clientCLIRenderer",
|
|
152
|
-
"exportedName": "clientCLIRenderer",
|
|
153
|
-
"services": {
|
|
154
|
-
"optimized": true,
|
|
155
|
-
"services": []
|
|
156
|
-
},
|
|
157
|
-
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
})
|
|
5
|
+
import { CLIMeta } from '@pikku/core/cli'
|
|
6
|
+
import metaData from './pikku-cli-wirings-meta.gen.json' with { type: 'json' }
|
|
7
|
+
pikkuState(null, 'cli', 'meta', metaData as CLIMeta)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
/* The files with an wireCLI function call */
|
|
5
|
-
import '../../src/
|
|
6
|
-
import '../../src/
|
|
5
|
+
import '../../src/cli.wiring.js'
|
|
6
|
+
import '../../src/services.js'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.3
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { executeCLI, CLIError } from '@pikku/core/cli'
|
|
6
6
|
import { createConfig as createConfig } from '../../src/services.js'
|
|
7
7
|
import { createSingletonServices as createSingletonServices } from '../../src/services.js'
|
|
8
|
-
import {
|
|
8
|
+
import { createWireServices as createWireServices } from '../../src/services.js'
|
|
9
9
|
import '../pikku-bootstrap.gen.js'
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -19,7 +19,7 @@ export async function PikkuCLI(args: string[]): Promise<void> {
|
|
|
19
19
|
args: args || process.argv.slice(2),
|
|
20
20
|
createConfig,
|
|
21
21
|
createSingletonServices,
|
|
22
|
-
|
|
22
|
+
createWireServices,
|
|
23
23
|
})
|
|
24
24
|
} catch (error) {
|
|
25
25
|
if (error instanceof CLIError) {
|