@pikku/cli 0.12.20 → 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 +792 -8
- 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 +44 -70
- package/dist/.pikku/function/pikku-function-types.gen.js +33 -40
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +1439 -316
- package/dist/.pikku/function/pikku-functions.gen.js +21 -9
- 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 +66 -10
- 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 +157 -11
- 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/PikkuCommandChannelsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandHTTPOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandQueueOutput.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/schemas/schemas/WorkflowRunStatus.schema.json +1 -1
- 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 +237 -629
- 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 +286 -10
- package/dist/src/deploy/analyzer/analyzer.d.ts +16 -1
- package/dist/src/deploy/analyzer/analyzer.js +83 -43
- package/dist/src/deploy/analyzer/manifest.d.ts +10 -0
- package/dist/src/deploy/build-pipeline.d.ts +2 -0
- package/dist/src/deploy/build-pipeline.js +123 -19
- package/dist/src/deploy/bundler/bundler.d.ts +3 -1
- package/dist/src/deploy/bundler/bundler.js +40 -9
- package/dist/src/deploy/bundler/dep-extractor.d.ts +5 -2
- package/dist/src/deploy/bundler/dep-extractor.js +103 -23
- package/dist/src/deploy/bundler/types.d.ts +5 -1
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +11 -1
- package/dist/src/deploy/codegen/per-unit-codegen.js +49 -6
- package/dist/src/deploy/plan/planner.js +25 -3
- package/dist/src/deploy/plan/provider.d.ts +2 -0
- 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-apply.js +6 -4
- 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/deploy-plan.js +7 -1
- 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 +7 -1
- 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/versions-update.js +4 -2
- 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/channels/pikku-command-channels.js +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-console-functions.js +5 -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 +105 -80
- 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-routes.js +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-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-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-command-queue.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.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-public-rpc.js +5 -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-remote-rpc.js +5 -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/rpc/serialize-typed-rpc-map.js +16 -2
- 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 +56 -2
- package/dist/src/functions/workflows/all.workflow.js +45 -12
- 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/scaffold/workflow-routes.gen.js +33 -1
- package/dist/src/services/cli-logger.service.d.ts +22 -3
- package/dist/src/services/cli-logger.service.js +107 -41
- package/dist/src/services.js +32 -67
- 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
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +0 -10
- package/dist/.pikku/cli/pikku-cli-client.gen.js +0 -44
- /package/dist/.pikku/schemas/schemas/{PikkuChannelsOutput.schema.json → PikkuCLIEntryOutput.schema.json} +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pikku addon entrypoint. Exports `fabricCommands` — a `defineCLICommands`
|
|
3
|
+
* map intended to be nested under the parent pikku CLI's `fabric:` subcommand
|
|
4
|
+
* group:
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { fabricCommands } from '@pikku/fabric-cli'
|
|
8
|
+
*
|
|
9
|
+
* wireCLI({
|
|
10
|
+
* program: 'pikku',
|
|
11
|
+
* commands: {
|
|
12
|
+
* // …existing commands…
|
|
13
|
+
* fabric: { description: 'PikkuFabric commands', subcommands: fabricCommands },
|
|
14
|
+
* },
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* There is only one `wireCLI` in the pikku binary — this package contributes
|
|
19
|
+
* a typed command map, nothing more.
|
|
20
|
+
*/
|
|
21
|
+
import { defineCLICommands, pikkuCLICommand, } from '../../.pikku/cli/pikku-cli-types.gen.js';
|
|
22
|
+
import { FabricLogin } from './functions/login.function.js';
|
|
23
|
+
import { FabricInit } from './functions/init.function.js';
|
|
24
|
+
import { FabricLink } from './functions/link.function.js';
|
|
25
|
+
import { FabricDeployPlan, FabricDeployApply, renderDeployPlan, renderDeployApply, } from './functions/deploy.function.js';
|
|
26
|
+
import { FabricDeployList, renderDeployList, } from './functions/deploy-list.function.js';
|
|
27
|
+
import { FabricDeployUnits, renderDeployUnits, } from './functions/deploy-units.function.js';
|
|
28
|
+
import { FabricStatus, renderStatus } from './functions/status.function.js';
|
|
29
|
+
import { FabricErrors, renderErrors } from './functions/errors.function.js';
|
|
30
|
+
import { FabricDbSchema, renderDbSchema, } from './functions/db-schema.function.js';
|
|
31
|
+
import { FabricRollback } from './functions/rollback.function.js';
|
|
32
|
+
import { FabricSecretsSet } from './functions/secrets-set.function.js';
|
|
33
|
+
import { FabricSecretsList } from './functions/secrets-list.function.js';
|
|
34
|
+
import { FabricLogs } from './functions/logs.function.js';
|
|
35
|
+
import { FabricMetrics } from './functions/metrics.function.js';
|
|
36
|
+
import { FabricTrace } from './functions/trace.function.js';
|
|
37
|
+
import { FabricDomainsList } from './functions/domains-list.function.js';
|
|
38
|
+
import { FabricDomainsAdd } from './functions/domains-add.function.js';
|
|
39
|
+
import { FabricDomainsRemove } from './functions/domains-remove.function.js';
|
|
40
|
+
import { FabricLLMKey, renderLLMKey } from './functions/llm-key.function.js';
|
|
41
|
+
import { FabricValidate, renderValidate, } from './functions/validate.function.js';
|
|
42
|
+
export const fabricCommands = defineCLICommands({
|
|
43
|
+
validate: pikkuCLICommand({
|
|
44
|
+
func: FabricValidate,
|
|
45
|
+
render: renderValidate,
|
|
46
|
+
description: 'Check the project structure for fabric compatibility — prints all missing or misconfigured items with fix hints',
|
|
47
|
+
}),
|
|
48
|
+
login: pikkuCLICommand({
|
|
49
|
+
func: FabricLogin,
|
|
50
|
+
description: 'Authenticate against fabric-api',
|
|
51
|
+
options: {
|
|
52
|
+
apiKey: { description: 'Use a static API key instead of browser flow' },
|
|
53
|
+
token: {
|
|
54
|
+
description: 'Use an existing fabric token instead of browser flow',
|
|
55
|
+
},
|
|
56
|
+
apiUrl: { description: 'Override the fabric-api URL for this login' },
|
|
57
|
+
consoleUrl: { description: 'Override the console URL the browser opens' },
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
init: pikkuCLICommand({
|
|
61
|
+
parameters: '<repo>',
|
|
62
|
+
func: FabricInit,
|
|
63
|
+
description: 'Adopt an existing git repo as a fabric project',
|
|
64
|
+
options: {
|
|
65
|
+
name: {
|
|
66
|
+
description: 'Override the project display name (defaults to repo name)',
|
|
67
|
+
},
|
|
68
|
+
branch: { description: 'Default branch (defaults to main)' },
|
|
69
|
+
force: {
|
|
70
|
+
description: 'Replace existing fabric.config.json',
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
link: pikkuCLICommand({
|
|
77
|
+
func: FabricLink,
|
|
78
|
+
description: 'Register the current git repo as a fabric project and queue an initial deploy',
|
|
79
|
+
options: {
|
|
80
|
+
apiUrl: {
|
|
81
|
+
description: 'Override the fabric-api URL stored in fabric.config.json',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
deploy: {
|
|
86
|
+
description: 'Plan and apply deploys for a named branch or production',
|
|
87
|
+
subcommands: {
|
|
88
|
+
plan: pikkuCLICommand({
|
|
89
|
+
func: FabricDeployPlan,
|
|
90
|
+
render: renderDeployPlan,
|
|
91
|
+
description: 'Resolve the target ref and report what a deploy would do',
|
|
92
|
+
options: {
|
|
93
|
+
branch: { description: 'Target branch to deploy', short: 'b' },
|
|
94
|
+
production: {
|
|
95
|
+
description: 'Plan production (always main)',
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
}),
|
|
100
|
+
apply: pikkuCLICommand({
|
|
101
|
+
func: FabricDeployApply,
|
|
102
|
+
render: renderDeployApply,
|
|
103
|
+
description: 'Build + deploy a named branch or production (main)',
|
|
104
|
+
options: {
|
|
105
|
+
branch: { description: 'Target branch to deploy', short: 'b' },
|
|
106
|
+
production: {
|
|
107
|
+
description: 'Deploy production (always main)',
|
|
108
|
+
default: false,
|
|
109
|
+
},
|
|
110
|
+
message: {
|
|
111
|
+
description: 'Annotation stored on the deployment',
|
|
112
|
+
short: 'm',
|
|
113
|
+
},
|
|
114
|
+
autoApply: {
|
|
115
|
+
description: 'Deploy without the confirmation prompt',
|
|
116
|
+
default: false,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
}),
|
|
120
|
+
list: pikkuCLICommand({
|
|
121
|
+
func: FabricDeployList,
|
|
122
|
+
render: renderDeployList,
|
|
123
|
+
description: 'List recent deployments for a branch',
|
|
124
|
+
options: {
|
|
125
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
units: pikkuCLICommand({
|
|
129
|
+
func: FabricDeployUnits,
|
|
130
|
+
render: renderDeployUnits,
|
|
131
|
+
description: 'List the deployed worker units (topology) for a branch',
|
|
132
|
+
options: {
|
|
133
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
134
|
+
},
|
|
135
|
+
}),
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
rollback: pikkuCLICommand({
|
|
139
|
+
parameters: '<branch> [target]',
|
|
140
|
+
func: FabricRollback,
|
|
141
|
+
description: 'Roll live back to a previous deployment artifact',
|
|
142
|
+
options: {
|
|
143
|
+
list: { description: 'List rollback candidates', default: false },
|
|
144
|
+
dryRun: {
|
|
145
|
+
description: 'Show schema-compat result without switching',
|
|
146
|
+
default: false,
|
|
147
|
+
},
|
|
148
|
+
yes: {
|
|
149
|
+
description: 'Skip confirmation prompts',
|
|
150
|
+
short: 'y',
|
|
151
|
+
default: false,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
}),
|
|
155
|
+
secrets: {
|
|
156
|
+
description: 'Manage stage-scoped secrets',
|
|
157
|
+
subcommands: {
|
|
158
|
+
set: pikkuCLICommand({
|
|
159
|
+
parameters: '<name>',
|
|
160
|
+
func: FabricSecretsSet,
|
|
161
|
+
description: 'Set a stage-scoped secret',
|
|
162
|
+
options: {
|
|
163
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
164
|
+
value: { description: 'Secret value (prompted if omitted)' },
|
|
165
|
+
force: {
|
|
166
|
+
description: 'Overwrite without confirmation',
|
|
167
|
+
default: false,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}),
|
|
171
|
+
list: pikkuCLICommand({
|
|
172
|
+
func: FabricSecretsList,
|
|
173
|
+
description: 'List stage secrets',
|
|
174
|
+
options: {
|
|
175
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
176
|
+
json: { description: 'Machine-readable output', default: false },
|
|
177
|
+
},
|
|
178
|
+
}),
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
logs: pikkuCLICommand({
|
|
182
|
+
func: FabricLogs,
|
|
183
|
+
description: 'Stream or fetch logs',
|
|
184
|
+
options: {
|
|
185
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
186
|
+
deployment: { description: 'Specific deployment id' },
|
|
187
|
+
level: { description: 'Minimum level (debug/info/warn/error)' },
|
|
188
|
+
since: { description: 'Time window (e.g. 15m, 2h)' },
|
|
189
|
+
follow: {
|
|
190
|
+
description: 'Stream new logs (SSE)',
|
|
191
|
+
short: 'f',
|
|
192
|
+
default: false,
|
|
193
|
+
},
|
|
194
|
+
json: { description: 'Machine-readable output', default: false },
|
|
195
|
+
},
|
|
196
|
+
}),
|
|
197
|
+
metrics: pikkuCLICommand({
|
|
198
|
+
func: FabricMetrics,
|
|
199
|
+
description: 'Show request rate / error rate / latency for a stage',
|
|
200
|
+
options: {
|
|
201
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
202
|
+
hours: { description: 'Lookback window in hours (default 24)' },
|
|
203
|
+
function: { description: 'Filter by wire id (e.g. function name)' },
|
|
204
|
+
json: { description: 'Machine-readable output', default: false },
|
|
205
|
+
},
|
|
206
|
+
}),
|
|
207
|
+
trace: pikkuCLICommand({
|
|
208
|
+
parameters: '<traceId>',
|
|
209
|
+
func: FabricTrace,
|
|
210
|
+
description: 'Print every event for a single trace across the stage',
|
|
211
|
+
options: {
|
|
212
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
213
|
+
json: { description: 'Machine-readable output', default: false },
|
|
214
|
+
},
|
|
215
|
+
}),
|
|
216
|
+
status: pikkuCLICommand({
|
|
217
|
+
func: FabricStatus,
|
|
218
|
+
render: renderStatus,
|
|
219
|
+
description: 'Show the linked project status (active + in-flight deploy)',
|
|
220
|
+
}),
|
|
221
|
+
errors: pikkuCLICommand({
|
|
222
|
+
func: FabricErrors,
|
|
223
|
+
render: renderErrors,
|
|
224
|
+
description: 'Show recent error-level events for a branch (with traceIds)',
|
|
225
|
+
options: {
|
|
226
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
227
|
+
function: { description: 'Filter by function name' },
|
|
228
|
+
},
|
|
229
|
+
}),
|
|
230
|
+
db: {
|
|
231
|
+
description: 'Inspect the stage database',
|
|
232
|
+
subcommands: {
|
|
233
|
+
schema: pikkuCLICommand({
|
|
234
|
+
func: FabricDbSchema,
|
|
235
|
+
render: renderDbSchema,
|
|
236
|
+
description: 'Show the live database schema (tables + columns)',
|
|
237
|
+
options: {
|
|
238
|
+
branch: { description: 'Target branch', short: 'b' },
|
|
239
|
+
},
|
|
240
|
+
}),
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
domains: {
|
|
244
|
+
description: 'Manage custom domains for the production stage',
|
|
245
|
+
subcommands: {
|
|
246
|
+
list: pikkuCLICommand({
|
|
247
|
+
func: FabricDomainsList,
|
|
248
|
+
description: 'List custom domains for the linked project',
|
|
249
|
+
options: {
|
|
250
|
+
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
251
|
+
},
|
|
252
|
+
}),
|
|
253
|
+
add: pikkuCLICommand({
|
|
254
|
+
parameters: '<hostname>',
|
|
255
|
+
func: FabricDomainsAdd,
|
|
256
|
+
description: 'Add a custom domain to the production stage',
|
|
257
|
+
options: {
|
|
258
|
+
target: {
|
|
259
|
+
description: 'Route target: api (Backend API) or app (Frontend App)',
|
|
260
|
+
default: 'api',
|
|
261
|
+
},
|
|
262
|
+
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
263
|
+
},
|
|
264
|
+
}),
|
|
265
|
+
remove: pikkuCLICommand({
|
|
266
|
+
parameters: '<hostname>',
|
|
267
|
+
func: FabricDomainsRemove,
|
|
268
|
+
description: 'Remove a custom domain from the production stage',
|
|
269
|
+
options: {
|
|
270
|
+
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
271
|
+
},
|
|
272
|
+
}),
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
llm: {
|
|
276
|
+
description: 'Fabric AI gateway developer key commands',
|
|
277
|
+
subcommands: {
|
|
278
|
+
key: pikkuCLICommand({
|
|
279
|
+
func: FabricLLMKey,
|
|
280
|
+
render: renderLLMKey,
|
|
281
|
+
description: 'Mint or reuse a developer-scoped Fabric AI gateway key',
|
|
282
|
+
options: {
|
|
283
|
+
shell: {
|
|
284
|
+
description: 'Print shell export lines',
|
|
285
|
+
default: false,
|
|
286
|
+
},
|
|
287
|
+
env: {
|
|
288
|
+
description: 'Print .env-style key-value lines',
|
|
289
|
+
default: false,
|
|
290
|
+
},
|
|
291
|
+
json: {
|
|
292
|
+
description: 'Print machine-readable JSON',
|
|
293
|
+
default: false,
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
}),
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FabricDbSchemaInput: z.ZodObject<{
|
|
3
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const FabricDbSchemaOutput: z.ZodObject<{
|
|
6
|
+
branch: z.ZodString;
|
|
7
|
+
schema: z.ZodAny;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const FabricDbSchema: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
10
|
+
branch: string;
|
|
11
|
+
}, {
|
|
12
|
+
branch: string;
|
|
13
|
+
schema: any;
|
|
14
|
+
}, "rpc" | "session", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
|
+
branch: string;
|
|
16
|
+
}, {
|
|
17
|
+
branch: string;
|
|
18
|
+
schema: any;
|
|
19
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
20
|
+
branch: string;
|
|
21
|
+
}, {
|
|
22
|
+
branch: string;
|
|
23
|
+
schema: any;
|
|
24
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
25
|
+
type Schema = {
|
|
26
|
+
tables?: {
|
|
27
|
+
name: string;
|
|
28
|
+
columns: unknown[];
|
|
29
|
+
}[];
|
|
30
|
+
} | null;
|
|
31
|
+
export declare const renderDbSchema: (_s: unknown, { branch, schema }: {
|
|
32
|
+
branch: string;
|
|
33
|
+
schema: Schema;
|
|
34
|
+
}) => void;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
|
|
3
|
+
import { resolveApiContext } from '../lib/config.js';
|
|
4
|
+
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { resolveStageId } from '../lib/stage.js';
|
|
6
|
+
import { table, dim } from '../lib/output.js';
|
|
7
|
+
export const FabricDbSchemaInput = z.object({
|
|
8
|
+
branch: z.string().default('main'),
|
|
9
|
+
});
|
|
10
|
+
export const FabricDbSchemaOutput = z.object({
|
|
11
|
+
branch: z.string(),
|
|
12
|
+
schema: z.any(),
|
|
13
|
+
});
|
|
14
|
+
export const FabricDbSchema = pikkuSessionlessFunc({
|
|
15
|
+
description: 'Show the live database schema (tables + columns) for a branch',
|
|
16
|
+
input: FabricDbSchemaInput,
|
|
17
|
+
output: FabricDbSchemaOutput,
|
|
18
|
+
func: async (_services, { branch }) => {
|
|
19
|
+
const ctx = await resolveApiContext();
|
|
20
|
+
if (!ctx.token)
|
|
21
|
+
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
22
|
+
if (!ctx.projectId)
|
|
23
|
+
throw new Error('No fabric project linked. Run `pikku fabric link` first.');
|
|
24
|
+
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
25
|
+
const stageId = await resolveStageId(rpc, ctx.projectId, branch);
|
|
26
|
+
const { schema } = await rpc.invoke('getStageDatabaseSchema', { stageId });
|
|
27
|
+
return { branch, schema };
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const renderDbSchema = (_s, { branch, schema }) => {
|
|
31
|
+
const tables = schema?.tables ?? [];
|
|
32
|
+
if (tables.length === 0) {
|
|
33
|
+
console.log(dim(`No schema for ${branch} (stage may have no database yet).`));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
console.log(table(['TABLE', 'COLUMNS'], tables.map((t) => [t.name, t.columns.length])));
|
|
37
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FabricDeployListInput: z.ZodObject<{
|
|
3
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const FabricDeployListOutput: z.ZodObject<{
|
|
6
|
+
branch: z.ZodString;
|
|
7
|
+
deployments: z.ZodArray<z.ZodAny>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const FabricDeployList: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
10
|
+
branch: string;
|
|
11
|
+
}, {
|
|
12
|
+
branch: string;
|
|
13
|
+
deployments: any[];
|
|
14
|
+
}, "rpc" | "session", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
|
+
branch: string;
|
|
16
|
+
}, {
|
|
17
|
+
branch: string;
|
|
18
|
+
deployments: any[];
|
|
19
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
20
|
+
branch: string;
|
|
21
|
+
}, {
|
|
22
|
+
branch: string;
|
|
23
|
+
deployments: any[];
|
|
24
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
25
|
+
type DeploymentRow = {
|
|
26
|
+
deploymentId: string;
|
|
27
|
+
status: string;
|
|
28
|
+
gitSha?: string | null;
|
|
29
|
+
versionMajor: number;
|
|
30
|
+
versionMinor: number;
|
|
31
|
+
versionPatch: number;
|
|
32
|
+
triggeredBy?: string | null;
|
|
33
|
+
trigger: string;
|
|
34
|
+
deployedAt?: string | null;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const renderDeployList: (_s: unknown, { branch, deployments }: {
|
|
38
|
+
branch: string;
|
|
39
|
+
deployments: DeploymentRow[];
|
|
40
|
+
}) => void;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
|
|
3
|
+
import { resolveApiContext } from '../lib/config.js';
|
|
4
|
+
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { resolveStageId } from '../lib/stage.js';
|
|
6
|
+
import { table, statusColor, dim } from '../lib/output.js';
|
|
7
|
+
export const FabricDeployListInput = z.object({
|
|
8
|
+
branch: z.string().default('main'),
|
|
9
|
+
});
|
|
10
|
+
export const FabricDeployListOutput = z.object({
|
|
11
|
+
branch: z.string(),
|
|
12
|
+
deployments: z.array(z.any()),
|
|
13
|
+
});
|
|
14
|
+
export const FabricDeployList = pikkuSessionlessFunc({
|
|
15
|
+
description: 'List recent deployments for a branch',
|
|
16
|
+
input: FabricDeployListInput,
|
|
17
|
+
output: FabricDeployListOutput,
|
|
18
|
+
func: async (_services, { branch }) => {
|
|
19
|
+
const ctx = await resolveApiContext();
|
|
20
|
+
if (!ctx.token)
|
|
21
|
+
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
22
|
+
if (!ctx.projectId)
|
|
23
|
+
throw new Error('No fabric project linked. Run `pikku fabric link` first.');
|
|
24
|
+
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
25
|
+
const stageId = await resolveStageId(rpc, ctx.projectId, branch);
|
|
26
|
+
const { deployments } = await rpc.invoke('listDeployments', { stageId });
|
|
27
|
+
return { branch, deployments };
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const renderDeployList = (_s, { branch, deployments }) => {
|
|
31
|
+
if (deployments.length === 0) {
|
|
32
|
+
console.log(dim(`No deployments for ${branch}.`));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
console.log(table(['DEPLOYMENT', 'STATUS', 'SHA', 'VER', 'BY', 'WHEN'], deployments.map((d) => [
|
|
36
|
+
d.deploymentId,
|
|
37
|
+
statusColor(d.status === 'suspended' ? 'planned' : d.status),
|
|
38
|
+
(d.gitSha ?? '').slice(0, 7),
|
|
39
|
+
`${d.versionMajor}.${d.versionMinor}.${d.versionPatch}`,
|
|
40
|
+
d.triggeredBy ?? d.trigger,
|
|
41
|
+
d.deployedAt ?? d.createdAt,
|
|
42
|
+
])));
|
|
43
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FabricDeployUnitsInput: z.ZodObject<{
|
|
3
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const FabricDeployUnitsOutput: z.ZodObject<{
|
|
6
|
+
branch: z.ZodString;
|
|
7
|
+
workers: z.ZodArray<z.ZodAny>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const FabricDeployUnits: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
10
|
+
branch: string;
|
|
11
|
+
}, {
|
|
12
|
+
branch: string;
|
|
13
|
+
workers: any[];
|
|
14
|
+
}, "rpc" | "session", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
|
+
branch: string;
|
|
16
|
+
}, {
|
|
17
|
+
branch: string;
|
|
18
|
+
workers: any[];
|
|
19
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
20
|
+
branch: string;
|
|
21
|
+
}, {
|
|
22
|
+
branch: string;
|
|
23
|
+
workers: any[];
|
|
24
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
25
|
+
type WorkerRow = {
|
|
26
|
+
name: string;
|
|
27
|
+
role: string;
|
|
28
|
+
status: string;
|
|
29
|
+
functionIds: string[];
|
|
30
|
+
};
|
|
31
|
+
export declare const renderDeployUnits: (_s: unknown, { branch, workers }: {
|
|
32
|
+
branch: string;
|
|
33
|
+
workers: WorkerRow[];
|
|
34
|
+
}) => void;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
|
|
3
|
+
import { resolveApiContext } from '../lib/config.js';
|
|
4
|
+
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
+
import { resolveStageId } from '../lib/stage.js';
|
|
6
|
+
import { table, statusColor, dim } from '../lib/output.js';
|
|
7
|
+
export const FabricDeployUnitsInput = z.object({
|
|
8
|
+
branch: z.string().default('main'),
|
|
9
|
+
});
|
|
10
|
+
export const FabricDeployUnitsOutput = z.object({
|
|
11
|
+
branch: z.string(),
|
|
12
|
+
workers: z.array(z.any()),
|
|
13
|
+
});
|
|
14
|
+
export const FabricDeployUnits = pikkuSessionlessFunc({
|
|
15
|
+
description: 'List the deployed worker units (topology) for a branch',
|
|
16
|
+
input: FabricDeployUnitsInput,
|
|
17
|
+
output: FabricDeployUnitsOutput,
|
|
18
|
+
func: async (_services, { branch }) => {
|
|
19
|
+
const ctx = await resolveApiContext();
|
|
20
|
+
if (!ctx.token)
|
|
21
|
+
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
22
|
+
if (!ctx.projectId)
|
|
23
|
+
throw new Error('No fabric project linked. Run `pikku fabric link` first.');
|
|
24
|
+
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
25
|
+
const stageId = await resolveStageId(rpc, ctx.projectId, branch);
|
|
26
|
+
const { workers } = await rpc.invoke('listDeploymentWorkers', { stageId });
|
|
27
|
+
return { branch, workers };
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const renderDeployUnits = (_s, { branch, workers }) => {
|
|
31
|
+
if (workers.length === 0) {
|
|
32
|
+
console.log(dim(`No deployed units for ${branch}.`));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
console.log(table(['WORKER', 'ROLE', 'STATUS', 'FUNCTIONS'], workers.map((w) => [
|
|
36
|
+
w.name,
|
|
37
|
+
w.role,
|
|
38
|
+
statusColor(w.status),
|
|
39
|
+
w.functionIds.length,
|
|
40
|
+
])));
|
|
41
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FabricDeployInput: z.ZodObject<{
|
|
3
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
4
|
+
production: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
6
|
+
message: z.ZodOptional<z.ZodString>;
|
|
7
|
+
autoApply: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const FabricDeployValidatedInput: z.ZodObject<{
|
|
10
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
11
|
+
production: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
13
|
+
message: z.ZodOptional<z.ZodString>;
|
|
14
|
+
autoApply: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const FabricDeployPlanOutput: z.ZodObject<{
|
|
17
|
+
projectId: z.ZodString;
|
|
18
|
+
branch: z.ZodString;
|
|
19
|
+
ref: z.ZodString;
|
|
20
|
+
requestedRef: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const FabricDeployApplyOutput: z.ZodObject<{
|
|
23
|
+
projectId: z.ZodString;
|
|
24
|
+
branch: z.ZodString;
|
|
25
|
+
ref: z.ZodString;
|
|
26
|
+
deploymentId: z.ZodString;
|
|
27
|
+
stageId: z.ZodString;
|
|
28
|
+
runId: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export declare const FabricDeployPlan: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
31
|
+
branch?: string | undefined;
|
|
32
|
+
production?: boolean | undefined;
|
|
33
|
+
ref?: string | undefined;
|
|
34
|
+
message?: string | undefined;
|
|
35
|
+
autoApply?: boolean | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
projectId: string;
|
|
38
|
+
branch: string;
|
|
39
|
+
ref: string;
|
|
40
|
+
requestedRef?: string | undefined;
|
|
41
|
+
}, "rpc" | "session", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
42
|
+
branch?: string | undefined;
|
|
43
|
+
production?: boolean | undefined;
|
|
44
|
+
ref?: string | undefined;
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
autoApply?: boolean | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
projectId: string;
|
|
49
|
+
branch: string;
|
|
50
|
+
ref: string;
|
|
51
|
+
requestedRef?: string | undefined;
|
|
52
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
53
|
+
branch?: string | undefined;
|
|
54
|
+
production?: boolean | undefined;
|
|
55
|
+
ref?: string | undefined;
|
|
56
|
+
message?: string | undefined;
|
|
57
|
+
autoApply?: boolean | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
projectId: string;
|
|
60
|
+
branch: string;
|
|
61
|
+
ref: string;
|
|
62
|
+
requestedRef?: string | undefined;
|
|
63
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
64
|
+
export declare const FabricDeployApply: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
65
|
+
branch?: string | undefined;
|
|
66
|
+
production?: boolean | undefined;
|
|
67
|
+
ref?: string | undefined;
|
|
68
|
+
message?: string | undefined;
|
|
69
|
+
autoApply?: boolean | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
projectId: string;
|
|
72
|
+
branch: string;
|
|
73
|
+
ref: string;
|
|
74
|
+
deploymentId: string;
|
|
75
|
+
stageId: string;
|
|
76
|
+
runId: string;
|
|
77
|
+
}, "rpc" | "session", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
78
|
+
branch?: string | undefined;
|
|
79
|
+
production?: boolean | undefined;
|
|
80
|
+
ref?: string | undefined;
|
|
81
|
+
message?: string | undefined;
|
|
82
|
+
autoApply?: boolean | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
projectId: string;
|
|
85
|
+
branch: string;
|
|
86
|
+
ref: string;
|
|
87
|
+
deploymentId: string;
|
|
88
|
+
stageId: string;
|
|
89
|
+
runId: string;
|
|
90
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
91
|
+
branch?: string | undefined;
|
|
92
|
+
production?: boolean | undefined;
|
|
93
|
+
ref?: string | undefined;
|
|
94
|
+
message?: string | undefined;
|
|
95
|
+
autoApply?: boolean | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
projectId: string;
|
|
98
|
+
branch: string;
|
|
99
|
+
ref: string;
|
|
100
|
+
deploymentId: string;
|
|
101
|
+
stageId: string;
|
|
102
|
+
runId: string;
|
|
103
|
+
}, "rpc" | "session", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
104
|
+
export declare const renderDeployPlan: (_s: unknown, { projectId, branch, ref, requestedRef, }: z.infer<typeof FabricDeployPlanOutput>) => void;
|
|
105
|
+
export declare const renderDeployApply: (_s: unknown, { branch, ref, deploymentId }: z.infer<typeof FabricDeployApplyOutput>) => void;
|