@pikku/cli 0.12.82 → 0.12.85
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-ChcXIEhS.js → index-CEv-kj3J.js} +154 -147
- package/console-app/assets/index-CSzCJzBb.css +1 -0
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +4 -2
- package/dist/.pikku/auth/auth.types.d.ts +4 -0
- package/dist/.pikku/auth/auth.types.js +5 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +4 -4
- package/dist/.pikku/cli/pikku-cli-channel.js +21 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +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 +60 -3
- 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 +29 -25
- package/dist/.pikku/function/pikku-function-types.gen.js +3 -12
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +195 -32
- package/dist/.pikku/function/pikku-functions.gen.js +15 -3
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
- package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
- 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 +1 -5
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -5
- 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 +4 -1
- package/dist/.pikku/pikku-services.gen.js +3 -0
- package/dist/.pikku/pikku-types.gen.d.ts +2 -1
- package/dist/.pikku/pikku-types.gen.js +3 -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/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +10 -2
- 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 +13 -7
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuGraphWiringsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuImportN8nInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuScopesInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuWebhookOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ScopesAuditInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ScopesPruneInput.schema.json +1 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +5 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +4 -0
- package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +35 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.js +27 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -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-meta.gen.json +1 -0
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +13 -3
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +49 -7
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +11 -2
- 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 +2 -2
- package/dist/src/cli.wiring.js +47 -4
- package/dist/src/deploy/analyzer/analyzer.js +6 -0
- package/dist/src/fabric/fabric-commands.d.ts +53 -53
- package/dist/src/fabric/functions/add.function.d.ts +2 -2
- package/dist/src/fabric/functions/addon-verify.function.d.ts +2 -2
- package/dist/src/fabric/functions/db-schema.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy-units.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-add.function.d.ts +2 -2
- package/dist/src/fabric/functions/domains-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/domains-remove.function.d.ts +2 -2
- package/dist/src/fabric/functions/errors.function.d.ts +2 -2
- package/dist/src/fabric/functions/init.function.d.ts +2 -2
- package/dist/src/fabric/functions/link.function.d.ts +2 -2
- package/dist/src/fabric/functions/llm-key.function.d.ts +6 -6
- package/dist/src/fabric/functions/login.function.d.ts +2 -2
- package/dist/src/fabric/functions/logs.function.d.ts +2 -2
- package/dist/src/fabric/functions/metrics.function.d.ts +2 -2
- package/dist/src/fabric/functions/publish.function.d.ts +2 -2
- package/dist/src/fabric/functions/rollback.function.d.ts +2 -2
- package/dist/src/fabric/functions/secrets-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/secrets-set.function.d.ts +2 -2
- package/dist/src/fabric/functions/smoke.function.d.ts +2 -2
- package/dist/src/fabric/functions/status.function.d.ts +2 -2
- package/dist/src/fabric/functions/trace.function.d.ts +2 -2
- package/dist/src/fabric/functions/validate.function.d.ts +2 -2
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/audit.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +2 -2
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +3 -0
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +1 -1
- package/dist/src/functions/commands/db-seed.d.ts +1 -1
- package/dist/src/functions/commands/deploy-apply.d.ts +2 -2
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +2 -2
- package/dist/src/functions/commands/dev.d.ts +2 -2
- package/dist/src/functions/commands/dev.js +14 -3
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/enable.d.ts +8 -7
- package/dist/src/functions/commands/enable.js +10 -5
- package/dist/src/functions/commands/import-n8n.d.ts +10 -0
- package/dist/src/functions/commands/import-n8n.js +130 -0
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/info.js +0 -13
- package/dist/src/functions/commands/login.d.ts +5 -5
- package/dist/src/functions/commands/meta.d.ts +25 -25
- package/dist/src/functions/commands/new-addon.d.ts +13 -2
- package/dist/src/functions/commands/new-addon.js +71 -39
- package/dist/src/functions/commands/new-function.d.ts +2 -2
- package/dist/src/functions/commands/new-middleware.d.ts +2 -2
- package/dist/src/functions/commands/new-permission.d.ts +2 -2
- package/dist/src/functions/commands/new-wiring.d.ts +2 -2
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-bootstrap.js +6 -0
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/scenario.d.ts +3 -3
- package/dist/src/functions/commands/scopes-audit.d.ts +1 -0
- package/dist/src/functions/commands/scopes-audit.js +37 -0
- package/dist/src/functions/commands/scopes-prune.d.ts +14 -0
- package/dist/src/functions/commands/scopes-prune.js +50 -0
- package/dist/src/functions/commands/scopes-shared.d.ts +39 -0
- package/dist/src/functions/commands/scopes-shared.js +83 -0
- package/dist/src/functions/commands/serve.d.ts +2 -2
- package/dist/src/functions/commands/serve.js +4 -2
- package/dist/src/functions/commands/skills.d.ts +4 -4
- package/dist/src/functions/commands/skills.js +18 -10
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +2 -2
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +2 -2
- package/dist/src/functions/commands/workspace-validate.d.ts +2 -2
- 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/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- 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-types.js +3 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +4 -2
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +55 -16
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +2 -2
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +6 -0
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +22 -0
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +2 -2
- 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 +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +37 -28
- 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 +6 -2
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -0
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +21 -0
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.d.ts +5 -0
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.js +14 -0
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/serialize-http-types.js +2 -30
- 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 +3 -2
- package/dist/src/functions/wirings/package/pikku-command-package-types.js +14 -1
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/serialize-package-types.d.ts +1 -0
- package/dist/src/functions/wirings/package/serialize-package-types.js +5 -0
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +1 -3
- package/dist/src/functions/wirings/permissions/serialize-permissions-imports.d.ts +6 -1
- package/dist/src/functions/wirings/permissions/serialize-permissions-imports.js +7 -64
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +7 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +20 -0
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.d.ts +1 -0
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +8 -3
- package/dist/src/functions/wirings/scenarios/pikku-command-scenario-functions.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +7 -0
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +34 -0
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +15 -0
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +86 -0
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +13 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +2 -2
- 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/variables/serialize-variables-types.js +15 -2
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -0
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +25 -0
- package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +14 -0
- package/dist/src/functions/wirings/webhook/serialize-webhook.js +34 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +2 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +29 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +11 -2
- package/dist/src/functions/workflows/all.workflow.js +23 -3
- package/dist/src/services.d.ts +1 -0
- package/dist/src/services.js +1 -0
- package/dist/src/utils/pikku-cli-config.js +20 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/skills/pikku-addon/SKILL.md +7 -3
- package/skills/pikku-ai-agent/SKILL.md +9 -6
- package/skills/pikku-ai-vercel/SKILL.md +6 -3
- package/skills/pikku-ai-voice/SKILL.md +6 -3
- package/skills/pikku-audit/SKILL.md +10 -3
- package/skills/pikku-aws/SKILL.md +9 -5
- package/skills/pikku-backblaze/SKILL.md +4 -3
- package/skills/pikku-better-auth/SKILL.md +10 -5
- package/skills/pikku-cli/SKILL.md +6 -3
- package/skills/pikku-concepts/SKILL.md +9 -4
- package/skills/pikku-concepts/references/concept-mapping.md +12 -10
- package/skills/pikku-config/SKILL.md +9 -5
- package/skills/pikku-cron/SKILL.md +6 -3
- package/skills/pikku-deploy-azure/SKILL.md +5 -3
- package/skills/pikku-deploy-cloudflare/SKILL.md +5 -3
- package/skills/pikku-deploy-express/SKILL.md +6 -3
- package/skills/pikku-deploy-fastify/SKILL.md +6 -3
- package/skills/pikku-deploy-lambda/SKILL.md +6 -3
- package/skills/pikku-deploy-nextjs/SKILL.md +5 -3
- package/skills/pikku-deploy-uws/SKILL.md +7 -4
- package/skills/pikku-deps/SKILL.md +13 -6
- package/skills/pikku-emails/SKILL.md +10 -5
- package/skills/pikku-feature/SKILL.md +1 -1
- package/skills/pikku-gateway-slack/SKILL.md +6 -3
- package/skills/pikku-http/SKILL.md +15 -21
- package/skills/pikku-http/references/http-options.md +0 -2
- package/skills/pikku-info/SKILL.md +9 -4
- package/skills/pikku-jose/SKILL.md +6 -3
- package/skills/pikku-kysely/SKILL.md +13 -5
- package/skills/pikku-machine-auth/SKILL.md +9 -3
- package/skills/pikku-mcp/SKILL.md +7 -3
- package/skills/pikku-middleware/SKILL.md +11 -6
- package/skills/pikku-mongodb/SKILL.md +8 -5
- package/skills/pikku-n8n-import/SKILL.md +109 -0
- package/skills/pikku-n8n-import/SPEC.md +84 -0
- package/skills/pikku-n8n-import/references/addon-mapping.md +121 -0
- package/skills/pikku-n8n-import/references/code-translation.md +121 -0
- package/skills/pikku-n8n-import/references/loops-and-control.md +87 -0
- package/skills/pikku-permissions/SKILL.md +26 -15
- package/skills/pikku-pino/SKILL.md +5 -3
- package/skills/pikku-product-second-opinion/README.md +43 -0
- package/skills/pikku-product-second-opinion/SKILL.md +158 -0
- package/skills/pikku-product-second-opinion/example/sample-report.md +90 -0
- package/skills/pikku-product-second-opinion/references/report-template.md +73 -0
- package/skills/pikku-queue/SKILL.md +7 -4
- package/skills/pikku-redis/SKILL.md +9 -6
- package/skills/pikku-rpc/SKILL.md +7 -4
- package/skills/pikku-rtl/SKILL.md +1 -1
- package/skills/pikku-scenario/SKILL.md +215 -0
- package/skills/pikku-schedule/SKILL.md +6 -3
- package/skills/pikku-schema-ajv/SKILL.md +5 -3
- package/skills/pikku-schema-cfworker/SKILL.md +6 -3
- package/skills/pikku-security/SKILL.md +8 -4
- package/skills/pikku-services/SKILL.md +42 -4
- package/skills/pikku-software-archaeology/README.md +70 -0
- package/skills/pikku-software-archaeology/SKILL.md +186 -0
- package/skills/pikku-software-archaeology/references/blueprint.schema.json +625 -0
- package/skills/pikku-software-archaeology/references/pikku-mapping.md +49 -0
- package/skills/pikku-software-archaeology/scripts/validate.mjs +173 -0
- package/skills/pikku-template-clone/SKILL.md +1 -1
- package/skills/pikku-trigger/SKILL.md +7 -3
- package/skills/pikku-versioning/SKILL.md +7 -3
- package/skills/pikku-websocket/SKILL.md +8 -4
- package/skills/pikku-workflow/SKILL.md +7 -3
- package/skills/pikku-ws/SKILL.md +5 -3
- package/console-app/assets/index-DwyRdRuZ.css +0 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.d.ts +0 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +0 -6
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +0 -26
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +0 -4
- package/dist/.pikku/http/pikku-http-wirings.gen.js +0 -5
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +0 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +0 -6
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +0 -10
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +0 -4
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +0 -5
- package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +0 -1
- package/dist/src/scaffold/rpc-remote.gen.d.ts +0 -10
- package/dist/src/scaffold/rpc-remote.gen.js +0 -27
- package/skills/pikku-n8n-addon-map/SKILL.md +0 -178
- package/skills/pikku-n8n-code-translate/SKILL.md +0 -166
- package/skills/pikku-testing/SKILL.md +0 -328
- package/skills/pikku-testing/references/cucumber-bdd-testing.md +0 -176
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuChannels: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuChannels: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuChannelTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuChannelTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuChannelsMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuChannelsMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCommandChannels: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuCommandChannels: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCLIEntry: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuCLIEntry: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type CLITypesCommandInput = {
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
};
|
|
4
|
-
export declare const pikkuCLITypes: import("#pikku").PikkuFunctionConfig<CLITypesCommandInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<CLITypesCommandInput, void, "rpc" | "session", import("#pikku").
|
|
4
|
+
export declare const pikkuCLITypes: import("#pikku").PikkuFunctionConfig<CLITypesCommandInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<CLITypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<CLITypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
5
5
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCLI: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuCLI: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuConsoleFunctions: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuConsoleFunctions: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuNodeTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuNodeTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuNodesMeta: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuNodesMeta: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -98,6 +98,12 @@ export const consoleRoutes = defineHTTPRoutes({
|
|
|
98
98
|
},
|
|
99
99
|
})
|
|
100
100
|
|
|
101
|
+
// The console addon's functions have no authorization of their own. An app
|
|
102
|
+
// gates the whole privileged surface (credential read/write, source editing,
|
|
103
|
+
// package install) with a single package-scoped global permission —
|
|
104
|
+
// addGlobalPermission([isAdmin], '@pikku/addon-console') — which is resolved in
|
|
105
|
+
// the addon's package namespace, so it applies to every one of its functions at
|
|
106
|
+
// once. Apps that don't register one are unaffected (no globals => allow).
|
|
101
107
|
wireAddon({ name: 'console', package: '@pikku/addon-console' })
|
|
102
108
|
wireHTTPRoutes({ basePath: '${globalHTTPPrefix}', routes: { console: consoleRoutes } })
|
|
103
109
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCredentials: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuCredentials: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -7,6 +7,7 @@ export const serializeCredentialsTypes = ({ definitions, schemaLookup, credentia
|
|
|
7
7
|
let needsZod = false;
|
|
8
8
|
const mapEntries = [];
|
|
9
9
|
const metaEntries = [];
|
|
10
|
+
const oauth2Entries = [];
|
|
10
11
|
for (const [name, meta] of credentialEntries) {
|
|
11
12
|
if (meta.schema && typeof meta.schema === 'string') {
|
|
12
13
|
const schemaRef = schemaLookup.get(meta.schema);
|
|
@@ -26,12 +27,19 @@ export const serializeCredentialsTypes = ({ definitions, schemaLookup, credentia
|
|
|
26
27
|
];
|
|
27
28
|
if (meta.oauth2) {
|
|
28
29
|
metaParts.push(`oauth2: true`);
|
|
30
|
+
// `type` rides along so consumers can tell a platform-wide credential from
|
|
31
|
+
// a per-user one without a second lookup — they own different accounts.
|
|
32
|
+
const config = JSON.stringify({ ...meta.oauth2, type: meta.type }, null, 2).replace(/\n/g, '\n ');
|
|
33
|
+
oauth2Entries.push(` '${name}': ${config}`);
|
|
29
34
|
}
|
|
30
35
|
metaEntries.push(` '${name}': { ${metaParts.join(', ')} }`);
|
|
31
36
|
}
|
|
32
37
|
const imports = [];
|
|
33
38
|
imports.push(`import { TypedCredentialService as CoreTypedCredentialService, type CredentialMetaInfo } from '@pikku/core/services'`);
|
|
34
39
|
imports.push(`import type { CredentialService } from '@pikku/core/services'`);
|
|
40
|
+
if (oauth2Entries.length > 0) {
|
|
41
|
+
imports.push(`import type { OAuth2CredentialConfig } from '@pikku/core/secret'`);
|
|
42
|
+
}
|
|
35
43
|
if (needsZod) {
|
|
36
44
|
imports.push(`import type { z } from 'zod'`);
|
|
37
45
|
}
|
|
@@ -40,6 +48,19 @@ export const serializeCredentialsTypes = ({ definitions, schemaLookup, credentia
|
|
|
40
48
|
const vars = Array.from(variableNames).join(', ');
|
|
41
49
|
imports.push(`import { ${vars} } from '${importPath}'`);
|
|
42
50
|
}
|
|
51
|
+
const oauth2Configs = oauth2Entries.length > 0
|
|
52
|
+
? `
|
|
53
|
+
export const CREDENTIAL_OAUTH2_CONFIGS = {
|
|
54
|
+
${oauth2Entries.join(',\n')}
|
|
55
|
+
} satisfies Record<
|
|
56
|
+
string,
|
|
57
|
+
OAuth2CredentialConfig & {
|
|
58
|
+
appCredentialSecretId: string
|
|
59
|
+
type: 'singleton' | 'wire'
|
|
60
|
+
}
|
|
61
|
+
>
|
|
62
|
+
`
|
|
63
|
+
: '';
|
|
43
64
|
return `${imports.join('\n')}
|
|
44
65
|
|
|
45
66
|
export interface CredentialsMap {
|
|
@@ -51,6 +72,7 @@ export type CredentialName = keyof CredentialsMap
|
|
|
51
72
|
const CREDENTIALS_META: Record<string, CredentialMetaInfo> = {
|
|
52
73
|
${metaEntries.join(',\n')}
|
|
53
74
|
}
|
|
75
|
+
${oauth2Configs}
|
|
54
76
|
|
|
55
77
|
export class TypedCredentialService extends CoreTypedCredentialService<CredentialsMap> {
|
|
56
78
|
constructor(credentials: CredentialService) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PikkuCLIConfig } from '../../../../types/config.js';
|
|
2
2
|
import type { CLILogger } from '../../../services/cli-logger.service.js';
|
|
3
|
-
export declare const pikkuEmails: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
3
|
+
export declare const pikkuEmails: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
4
4
|
export declare function generateEmailsArtifacts(logger: CLILogger, config: Pick<PikkuCLIConfig, 'outDir'> & {
|
|
5
5
|
emailTemplatesDir?: string;
|
|
6
6
|
}): Promise<true | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type AddonTypesCommandInput = {
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
};
|
|
4
|
-
export declare const pikkuAddonTypes: import("#pikku").PikkuFunctionConfig<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").
|
|
4
|
+
export declare const pikkuAddonTypes: import("#pikku").PikkuFunctionConfig<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<AddonTypesCommandInput, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
5
5
|
export {};
|
|
@@ -2,6 +2,6 @@ export declare const pikkuFunctionTypesSplit: import("#pikku").PikkuFunctionConf
|
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
bootstrap?: boolean;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
6
6
|
bootstrap?: boolean;
|
|
7
|
-
}, void, "rpc" | "session", import("#pikku").
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -22,7 +22,7 @@ export const pikkuFunctionTypesSplit = pikkuSessionlessFunc({
|
|
|
22
22
|
const configTypeImport = pikkuConfigType
|
|
23
23
|
? `import type { ${pikkuConfigType.type} } from '${getFileImportRelativePath(functionTypesFile, pikkuConfigType.typePath, packageMappings)}'`
|
|
24
24
|
: '// Config type not found, will use fallback';
|
|
25
|
-
const content = serializeFunctionTypes(`import type { ${userSessionType.type} } from '${getFileImportRelativePath(functionTypesFile, userSessionType.typePath, packageMappings)}'`, userSessionType.type, `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, singletonServicesType.typePath, packageMappings)}'`, singletonServicesType.type, `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, wireServicesType.typePath, packageMappings)}'`, wireServicesType.type, `import type { TypedPikkuRPC, FlattenedRPCMap } from '${getFileImportRelativePath(functionTypesFile, rpcInternalMapDeclarationFile, packageMappings)}'`, `import type { RequiredSingletonServices, RequiredWireServices } from '${getFileImportRelativePath(functionTypesFile, servicesFile, packageMappings)}'`, configTypeImport, config.addonName, undefined, typeof config.addon === 'object' ? config.addon?.categories : undefined);
|
|
25
|
+
const content = serializeFunctionTypes(`import type { ${userSessionType.type} } from '${getFileImportRelativePath(functionTypesFile, userSessionType.typePath, packageMappings)}'`, userSessionType.type, `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, singletonServicesType.typePath, packageMappings)}'`, singletonServicesType.type, `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(functionTypesFile, wireServicesType.typePath, packageMappings)}'`, wireServicesType.type, `import type { TypedPikkuRPC, FlattenedRPCMap } from '${getFileImportRelativePath(functionTypesFile, rpcInternalMapDeclarationFile, packageMappings)}'`, `import type { RequiredSingletonServices, RequiredWireServices } from '${getFileImportRelativePath(functionTypesFile, servicesFile, packageMappings)}'`, configTypeImport, config.addonName, undefined, typeof config.addon === 'object' ? config.addon?.categories : undefined, `import type { ScopeId } from '${getFileImportRelativePath(functionTypesFile, config.scopesFile, packageMappings)}'`);
|
|
26
26
|
const addonRefs = serializeAddonRefs({
|
|
27
27
|
addonHttp: visitState.exportedContracts.addonHttp,
|
|
28
28
|
addonChannel: visitState.exportedContracts.addonChannel,
|
|
@@ -2,6 +2,6 @@ export declare const pikkuFunctionTypes: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
bootstrap?: boolean;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
6
6
|
bootstrap?: boolean;
|
|
7
|
-
}, void, "rpc" | "session", import("#pikku").
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -6,7 +6,7 @@ import { serializePikkuTypesHub } from './serialize-pikku-types-hub.js';
|
|
|
6
6
|
import { projectDeclaresBetterAuth } from '../../../utils/detect-better-auth.js';
|
|
7
7
|
export const pikkuFunctionTypes = pikkuSessionlessFunc({
|
|
8
8
|
func: async ({ logger, config, getInspectorState }, data) => {
|
|
9
|
-
const { typesDeclarationFile: typesFile, packageMappings, functionTypesFile, httpTypesFile, channelsTypesFile, triggersTypesFile, schedulersTypesFile, queueTypesFile, mcpTypesFile, cliTypesFile, nodeTypesFile, secretTypesFile, addonTypesFile, authTypesFile, } = config;
|
|
9
|
+
const { typesDeclarationFile: typesFile, packageMappings, functionTypesFile, httpTypesFile, channelsTypesFile, triggersTypesFile, schedulersTypesFile, queueTypesFile, mcpTypesFile, cliTypesFile, nodeTypesFile, secretTypesFile, scopeTypesFile, addonTypesFile, authTypesFile, } = config;
|
|
10
10
|
const getImportPath = (file) => config.addon
|
|
11
11
|
? null
|
|
12
12
|
: getFileImportRelativePath(typesFile, file, packageMappings);
|
|
@@ -31,7 +31,7 @@ export const pikkuFunctionTypes = pikkuSessionlessFunc({
|
|
|
31
31
|
const authTypesImportPath = authTypesFile && hasAuth
|
|
32
32
|
? getFileImportRelativePath(typesFile, authTypesFile, packageMappings)
|
|
33
33
|
: null;
|
|
34
|
-
const content = serializePikkuTypesHub(getFileImportRelativePath(typesFile, functionTypesFile, packageMappings), getImportPath(httpTypesFile), getImportPath(channelsTypesFile), getAlwaysImportPath(triggersTypesFile), getImportPath(schedulersTypesFile), getImportPath(queueTypesFile), getImportPath(mcpTypesFile), getImportPath(cliTypesFile), getAlwaysImportPath(nodeTypesFile), getAlwaysImportPath(secretTypesFile), config.addon ? getAlwaysImportPath(addonTypesFile) : null, authTypesImportPath);
|
|
34
|
+
const content = serializePikkuTypesHub(getFileImportRelativePath(typesFile, functionTypesFile, packageMappings), getImportPath(httpTypesFile), getImportPath(channelsTypesFile), getAlwaysImportPath(triggersTypesFile), getImportPath(schedulersTypesFile), getImportPath(queueTypesFile), getImportPath(mcpTypesFile), getImportPath(cliTypesFile), getAlwaysImportPath(nodeTypesFile), getAlwaysImportPath(secretTypesFile), config.addon ? getAlwaysImportPath(addonTypesFile) : null, authTypesImportPath, getAlwaysImportPath(scopeTypesFile));
|
|
35
35
|
await writeFileInDir(logger, typesFile, content);
|
|
36
36
|
},
|
|
37
37
|
middleware: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuFunctions: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuFunctions: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const serializeServicesMap: (allSingletonServices: string[], allWireServices: string[], requiredServices: Set<string>, forceRequiredServices: string[] | undefined, servicesImport: string, wireServicesImport: string, addonRequiredParentServices?: string[], authInjected?: boolean) => string;
|
|
2
|
-
export declare const pikkuServices: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const serializeServicesMap: (allSingletonServices: string[], allWireServices: string[], requiredServices: Set<string>, forceRequiredServices: string[] | undefined, servicesImport: string, wireServicesImport: string, addonRequiredParentServices?: string[], authInjected?: boolean, agentScaffoldEnabled?: boolean) => string;
|
|
2
|
+
export declare const pikkuServices: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -3,7 +3,7 @@ import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
|
3
3
|
import { checkRequiredTypes } from '../../../utils/check-required-types.js';
|
|
4
4
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
5
5
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
6
|
-
export const serializeServicesMap = (allSingletonServices, allWireServices, requiredServices, forceRequiredServices = [], servicesImport, wireServicesImport, addonRequiredParentServices = [], authInjected = false) => {
|
|
6
|
+
export const serializeServicesMap = (allSingletonServices, allWireServices, requiredServices, forceRequiredServices = [], servicesImport, wireServicesImport, addonRequiredParentServices = [], authInjected = false, agentScaffoldEnabled = false) => {
|
|
7
7
|
// Use pre-aggregated services from inspector state
|
|
8
8
|
// This includes services from:
|
|
9
9
|
// - Wired functions (HTTP, channels, queues, schedulers, MCP, CLI, RPC)
|
|
@@ -40,6 +40,13 @@ export const serializeServicesMap = (allSingletonServices, allWireServices, requ
|
|
|
40
40
|
if (authInjected) {
|
|
41
41
|
usedServices.add('auth');
|
|
42
42
|
}
|
|
43
|
+
// The generated public-agent permission (isThreadOwner) always destructures
|
|
44
|
+
// agentRunService, but agent.gen.ts is written after requiredServices is
|
|
45
|
+
// computed from inspecting hand-written sources, so the inspector never
|
|
46
|
+
// sees that usage — force it required whenever the agent scaffold runs.
|
|
47
|
+
if (agentScaffoldEnabled) {
|
|
48
|
+
usedServices.add('agentRunService');
|
|
49
|
+
}
|
|
43
50
|
// Create singleton services map: all singleton services with true/false based on usage
|
|
44
51
|
const singletonServicesMap = {};
|
|
45
52
|
allSingletonServices.forEach((service) => {
|
|
@@ -111,7 +118,7 @@ export const pikkuServices = pikkuSessionlessFunc({
|
|
|
111
118
|
}
|
|
112
119
|
const servicesImport = `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(config.typesDeclarationFile, singletonServicesType.typePath, config.packageMappings)}'`;
|
|
113
120
|
const wireServicesImport = `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(config.typesDeclarationFile, wireServicesType.typePath, config.packageMappings)}'`;
|
|
114
|
-
const servicesCode = serializeServicesMap(visitState.serviceAggregation.allSingletonServices, visitState.serviceAggregation.allWireServices, visitState.serviceAggregation.requiredServices, config.forceRequiredServices, servicesImport, wireServicesImport, config.addonName ? visitState.addonRequiredParentServices : [], Boolean(visitState.auth?.definition));
|
|
121
|
+
const servicesCode = serializeServicesMap(visitState.serviceAggregation.allSingletonServices, visitState.serviceAggregation.allWireServices, visitState.serviceAggregation.requiredServices, config.forceRequiredServices, servicesImport, wireServicesImport, config.addonName ? visitState.addonRequiredParentServices : [], Boolean(visitState.auth?.definition), Boolean(config.scaffold?.agent));
|
|
115
122
|
await writeFileInDir(logger, config.servicesFile, servicesCode);
|
|
116
123
|
},
|
|
117
124
|
middleware: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuSchemas: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuSchemas: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates core function, middleware, and permission type definitions
|
|
3
3
|
*/
|
|
4
|
-
export declare const serializeFunctionTypes: (userSessionTypeImport: string, userSessionTypeName: string, singletonServicesTypeImport: string, singletonServicesTypeName: string, wireServicesTypeImport: string, wireServicesTypeName: string, rpcMapTypeImport: string, requiredServicesTypeImport: string, configTypeImport: string, packageName?: string, workflowTypesImport?: string, nodeCategories?: string[]) => string;
|
|
4
|
+
export declare const serializeFunctionTypes: (userSessionTypeImport: string, userSessionTypeName: string, singletonServicesTypeImport: string, singletonServicesTypeName: string, wireServicesTypeImport: string, wireServicesTypeName: string, rpcMapTypeImport: string, requiredServicesTypeImport: string, configTypeImport: string, packageName?: string, workflowTypesImport?: string, nodeCategories?: string[], scopesTypeImport?: string) => string;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates core function, middleware, and permission type definitions
|
|
3
3
|
*/
|
|
4
|
-
export const serializeFunctionTypes = (userSessionTypeImport, userSessionTypeName, singletonServicesTypeImport, singletonServicesTypeName, wireServicesTypeImport, wireServicesTypeName, rpcMapTypeImport, requiredServicesTypeImport, configTypeImport, packageName, workflowTypesImport, nodeCategories) => {
|
|
4
|
+
export const serializeFunctionTypes = (userSessionTypeImport, userSessionTypeName, singletonServicesTypeImport, singletonServicesTypeName, wireServicesTypeImport, wireServicesTypeName, rpcMapTypeImport, requiredServicesTypeImport, configTypeImport, packageName, workflowTypesImport, nodeCategories, scopesTypeImport) => {
|
|
5
5
|
const packageNameValue = packageName ? `'${packageName}'` : 'null';
|
|
6
6
|
const nodeCategoryType = nodeCategories?.length
|
|
7
7
|
? nodeCategories.map((c) => `'${c}'`).join(' | ')
|
|
8
8
|
: 'string';
|
|
9
9
|
const workflowImport = workflowTypesImport ||
|
|
10
10
|
`import type { TypedWorkflow, TypedScenario } from '../workflow/pikku-workflow-types.gen.js'`;
|
|
11
|
+
// Falls back to `string` when a project has no scopes codegen, so that
|
|
12
|
+
// `scopes` stays usable rather than resolving to an unbound type name.
|
|
13
|
+
const scopesImport = scopesTypeImport || `type ScopeId = string`;
|
|
11
14
|
return `/**
|
|
12
15
|
* Core function, middleware, and permission types for all wirings
|
|
13
16
|
*/
|
|
@@ -18,11 +21,11 @@ import { pikkuAuth as pikkuAuthCore } from '@pikku/core/function'
|
|
|
18
21
|
import {
|
|
19
22
|
addTagMiddleware as addTagMiddlewareCore,
|
|
20
23
|
addGlobalMiddleware as addGlobalMiddlewareCore,
|
|
21
|
-
addTagPermission as addTagPermissionCore,
|
|
22
24
|
addGlobalPermission as addGlobalPermissionCore,
|
|
23
25
|
} from '@pikku/core/middleware'
|
|
24
26
|
import { pikkuState as __pikkuState, CreateWireServices } from '@pikku/core/internal'
|
|
25
27
|
import type { NodeType } from '@pikku/core/node'
|
|
28
|
+
${scopesImport}
|
|
26
29
|
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
27
30
|
import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function'
|
|
28
31
|
|
|
@@ -39,6 +42,17 @@ ${wireServicesTypeName !== 'Services' ? `export type Services = ${wireServicesTy
|
|
|
39
42
|
${userSessionTypeName !== 'Session' ? `export type Session = ${userSessionTypeName}` : `export type { ${userSessionTypeName} as Session }`}
|
|
40
43
|
${configTypeImport.includes('Config type not found') ? 'export type Config = any' : ''}
|
|
41
44
|
|
|
45
|
+
/**
|
|
46
|
+
* The services a wired function actually receives. The inspector records which
|
|
47
|
+
* services each wired \`func\`, \`permissions\` and \`middleware\` destructures and
|
|
48
|
+
* emits them as \`RequiredSingletonServices\`; intersecting that here makes those
|
|
49
|
+
* services **non-optional** at every call site. A service is optional only when
|
|
50
|
+
* nothing destructures it — in which case it is never created either. This is
|
|
51
|
+
* why an \`if (!service)\` guard inside a function body is always dead code.
|
|
52
|
+
*/
|
|
53
|
+
export type WiredSingletonServices = RequiredSingletonServices & SingletonServices
|
|
54
|
+
export type WiredServices = RequiredSingletonServices & Services
|
|
55
|
+
|
|
42
56
|
/**
|
|
43
57
|
* Inline node configuration for function definitions.
|
|
44
58
|
*/
|
|
@@ -56,7 +70,7 @@ export type NodeConfig = {
|
|
|
56
70
|
* @template In - The input type that the permission check will receive
|
|
57
71
|
* @template RequiredServices - The services required for this permission check
|
|
58
72
|
*/
|
|
59
|
-
export type PikkuPermission<In = unknown, RequiredServices extends Services =
|
|
73
|
+
export type PikkuPermission<In = unknown, RequiredServices extends Services = WiredServices> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>
|
|
60
74
|
|
|
61
75
|
/**
|
|
62
76
|
* Type-safe middleware definition that can access your application's services and session.
|
|
@@ -64,12 +78,12 @@ export type PikkuPermission<In = unknown, RequiredServices extends Services = Se
|
|
|
64
78
|
*
|
|
65
79
|
* @template RequiredServices - The services required for this middleware
|
|
66
80
|
*/
|
|
67
|
-
export type PikkuMiddleware<RequiredServices extends SingletonServices =
|
|
81
|
+
export type PikkuMiddleware<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuMiddleware<RequiredServices>
|
|
68
82
|
|
|
69
83
|
/**
|
|
70
84
|
* Configuration object for creating a permission with metadata
|
|
71
85
|
*/
|
|
72
|
-
export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services =
|
|
86
|
+
export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services = WiredServices> = {
|
|
73
87
|
/** The permission function */
|
|
74
88
|
func: PikkuPermission<In, RequiredServices>
|
|
75
89
|
/** Optional human-readable name for the permission */
|
|
@@ -114,12 +128,12 @@ export const pikkuPermission = <In>(
|
|
|
114
128
|
*
|
|
115
129
|
* @template RequiredServices - The services required for this auth check
|
|
116
130
|
*/
|
|
117
|
-
export type PikkuAuth<RequiredServices extends SingletonServices =
|
|
131
|
+
export type PikkuAuth<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuAuth<RequiredServices, Session>
|
|
118
132
|
|
|
119
133
|
/**
|
|
120
134
|
* Configuration object for creating an auth permission with metadata
|
|
121
135
|
*/
|
|
122
|
-
export type PikkuAuthConfig<RequiredServices extends SingletonServices =
|
|
136
|
+
export type PikkuAuthConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuAuthConfig<RequiredServices, Session>
|
|
123
137
|
|
|
124
138
|
/**
|
|
125
139
|
* Factory function for creating auth-only permissions with tree-shaking support.
|
|
@@ -141,7 +155,7 @@ export type PikkuAuthConfig<RequiredServices extends SingletonServices = Singlet
|
|
|
141
155
|
* })
|
|
142
156
|
* \\\`\\\`\\\`
|
|
143
157
|
*/
|
|
144
|
-
export const pikkuAuth = <RequiredServices extends SingletonServices =
|
|
158
|
+
export const pikkuAuth = <RequiredServices extends SingletonServices = WiredSingletonServices>(
|
|
145
159
|
auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>
|
|
146
160
|
): PikkuPermission<any, any> => {
|
|
147
161
|
return pikkuAuthCore(auth as any) as any
|
|
@@ -150,7 +164,7 @@ export const pikkuAuth = <RequiredServices extends SingletonServices = Singleton
|
|
|
150
164
|
/**
|
|
151
165
|
* Configuration object for creating middleware with metadata
|
|
152
166
|
*/
|
|
153
|
-
export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices =
|
|
167
|
+
export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = {
|
|
154
168
|
/** The middleware function */
|
|
155
169
|
func: PikkuMiddleware<RequiredServices>
|
|
156
170
|
/** Optional human-readable name for the middleware */
|
|
@@ -182,7 +196,7 @@ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = S
|
|
|
182
196
|
* })
|
|
183
197
|
* \`\`\`
|
|
184
198
|
*/
|
|
185
|
-
export const pikkuMiddleware = <RequiredServices extends SingletonServices =
|
|
199
|
+
export const pikkuMiddleware = <RequiredServices extends SingletonServices = WiredSingletonServices>(
|
|
186
200
|
middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>
|
|
187
201
|
): PikkuMiddleware<RequiredServices> => {
|
|
188
202
|
return typeof middleware === 'function' ? middleware : middleware.func
|
|
@@ -243,7 +257,7 @@ export const pikkuPermissionFactory = <In = any>(
|
|
|
243
257
|
* @template In - The input type (same as the function it describes)
|
|
244
258
|
* @template RequiredServices - The services required for this description function
|
|
245
259
|
*/
|
|
246
|
-
export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services =
|
|
260
|
+
export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services = WiredServices> = (
|
|
247
261
|
services: RequiredServices,
|
|
248
262
|
data: In
|
|
249
263
|
) => Promise<string>
|
|
@@ -261,7 +275,7 @@ export type PikkuApprovalDescription<In = unknown, RequiredServices extends Serv
|
|
|
261
275
|
* )
|
|
262
276
|
* \`\`\`
|
|
263
277
|
*/
|
|
264
|
-
export const pikkuApprovalDescription = <In = unknown, RequiredServices extends Services =
|
|
278
|
+
export const pikkuApprovalDescription = <In = unknown, RequiredServices extends Services = WiredServices>(
|
|
265
279
|
fn: PikkuApprovalDescription<In, RequiredServices>
|
|
266
280
|
): PikkuApprovalDescription<In, RequiredServices> => {
|
|
267
281
|
return fn
|
|
@@ -279,7 +293,7 @@ export type PikkuFunctionSessionless<
|
|
|
279
293
|
In = unknown,
|
|
280
294
|
Out = never,
|
|
281
295
|
RequiredWires extends keyof PikkuWire = never,
|
|
282
|
-
RequiredServices extends Services =
|
|
296
|
+
RequiredServices extends Services = WiredServices
|
|
283
297
|
> = CorePikkuFunctionSessionless<
|
|
284
298
|
In,
|
|
285
299
|
Out,
|
|
@@ -300,7 +314,7 @@ export type PikkuFunction<
|
|
|
300
314
|
In = unknown,
|
|
301
315
|
Out = never,
|
|
302
316
|
RequiredWires extends keyof PikkuWire = 'session',
|
|
303
|
-
RequiredServices extends Services =
|
|
317
|
+
RequiredServices extends Services = WiredServices
|
|
304
318
|
> = CorePikkuFunction<
|
|
305
319
|
In,
|
|
306
320
|
Out,
|
|
@@ -329,7 +343,7 @@ export type PikkuFunctionConfig<
|
|
|
329
343
|
PikkuFunc extends PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>,
|
|
330
344
|
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
331
345
|
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
332
|
-
> = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema>
|
|
346
|
+
> = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema, ScopeId>
|
|
333
347
|
|
|
334
348
|
/**
|
|
335
349
|
* Configuration object for Pikku functions with Zod schema validation.
|
|
@@ -351,7 +365,12 @@ export type PikkuFunctionConfigWithSchema<
|
|
|
351
365
|
> = Omit<
|
|
352
366
|
CorePikkuFunctionConfig<
|
|
353
367
|
| PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
|
|
354
|
-
| PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires
|
|
368
|
+
| PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>,
|
|
369
|
+
CorePikkuPermission<any>,
|
|
370
|
+
PikkuMiddleware,
|
|
371
|
+
undefined,
|
|
372
|
+
undefined,
|
|
373
|
+
ScopeId
|
|
355
374
|
>,
|
|
356
375
|
'func' | 'input' | 'output' | 'permissions' | 'approvalDescription'
|
|
357
376
|
> & {
|
|
@@ -681,16 +700,6 @@ export const addGlobalMiddleware = (middleware: PikkuMiddleware[]) => {
|
|
|
681
700
|
addGlobalMiddlewareCore(middleware as any, ${packageNameValue})
|
|
682
701
|
}
|
|
683
702
|
|
|
684
|
-
/**
|
|
685
|
-
* Tag-scoped permissions. Applies to any wiring that carries the matching tag.
|
|
686
|
-
*
|
|
687
|
-
* @example
|
|
688
|
-
* addTagPermission('admin', [adminPermission])
|
|
689
|
-
*/
|
|
690
|
-
export const addTagPermission = <In = unknown>(tag: string, permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => {
|
|
691
|
-
addTagPermissionCore(tag, permissions as any, ${packageNameValue})
|
|
692
|
-
}
|
|
693
|
-
|
|
694
703
|
/**
|
|
695
704
|
* Wire-agnostic global permissions. Runs at the top of every wiring's
|
|
696
705
|
* permission resolution — before wire-, tag-, and function-level entries.
|
|
@@ -704,7 +713,7 @@ export const addGlobalPermission = <In = unknown>(permissions: CorePermissionGro
|
|
|
704
713
|
addGlobalPermissionCore(permissions as any, ${packageNameValue})
|
|
705
714
|
}
|
|
706
715
|
|
|
707
|
-
export { wireAddon } from '@pikku/core/rpc'
|
|
708
|
-
export type { WireAddonConfig } from '@pikku/core/rpc'
|
|
716
|
+
export { wireAddon, wireRemoteAddon } from '@pikku/core/rpc'
|
|
717
|
+
export type { WireAddonConfig, WireRemoteAddonConfig, RemoteAddonAuth } from '@pikku/core/rpc'
|
|
709
718
|
`;
|
|
710
719
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates the main pikku-types.gen.ts file as a re-export hub
|
|
3
3
|
*/
|
|
4
|
-
export declare const serializePikkuTypesHub: (functionTypesImportPath: string, httpTypesImportPath: string | null, channelTypesImportPath: string | null, triggerTypesImportPath: string | null, schedulerTypesImportPath: string | null, queueTypesImportPath: string | null, mcpTypesImportPath: string | null, cliTypesImportPath: string | null, nodeTypesImportPath: string | null, secretTypesImportPath: string | null, addonTypesImportPath: string | null, authTypesImportPath?: string | null) => string;
|
|
4
|
+
export declare const serializePikkuTypesHub: (functionTypesImportPath: string, httpTypesImportPath: string | null, channelTypesImportPath: string | null, triggerTypesImportPath: string | null, schedulerTypesImportPath: string | null, queueTypesImportPath: string | null, mcpTypesImportPath: string | null, cliTypesImportPath: string | null, nodeTypesImportPath: string | null, secretTypesImportPath: string | null, addonTypesImportPath: string | null, authTypesImportPath?: string | null, scopeTypesImportPath?: string | null) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates the main pikku-types.gen.ts file as a re-export hub
|
|
3
3
|
*/
|
|
4
|
-
export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportPath, channelTypesImportPath, triggerTypesImportPath, schedulerTypesImportPath, queueTypesImportPath, mcpTypesImportPath, cliTypesImportPath, nodeTypesImportPath, secretTypesImportPath, addonTypesImportPath, authTypesImportPath = null) => {
|
|
4
|
+
export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportPath, channelTypesImportPath, triggerTypesImportPath, schedulerTypesImportPath, queueTypesImportPath, mcpTypesImportPath, cliTypesImportPath, nodeTypesImportPath, secretTypesImportPath, addonTypesImportPath, authTypesImportPath = null, scopeTypesImportPath = null) => {
|
|
5
5
|
const exports = [
|
|
6
6
|
{
|
|
7
7
|
comment: 'Core function, middleware, and permission types',
|
|
@@ -16,8 +16,12 @@ export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportP
|
|
|
16
16
|
{ comment: 'CLI wiring types', path: cliTypesImportPath },
|
|
17
17
|
{ comment: 'Node wiring types', path: nodeTypesImportPath },
|
|
18
18
|
{ comment: 'Secret definition types', path: secretTypesImportPath },
|
|
19
|
+
{ comment: 'Scope definition types', path: scopeTypesImportPath },
|
|
19
20
|
{ comment: 'Addon types', path: addonTypesImportPath },
|
|
20
|
-
{
|
|
21
|
+
{
|
|
22
|
+
comment: 'Auth types (typed pikkuBetterAuth re-export)',
|
|
23
|
+
path: authTypesImportPath,
|
|
24
|
+
},
|
|
21
25
|
];
|
|
22
26
|
const exportStatements = exports
|
|
23
27
|
.filter((e) => e.path)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuGateway: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuGateway: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pikkuGraphWirings: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
3
|
+
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
|
+
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
|
+
import { serializeGraphWirings } from './serialize-graph-wirings.js';
|
|
6
|
+
export const pikkuGraphWirings = pikkuSessionlessFunc({
|
|
7
|
+
func: async ({ logger, config }) => {
|
|
8
|
+
if (config.scaffold?.graph && config.graphWiringsFile) {
|
|
9
|
+
const pathToPikkuTypes = getFileImportRelativePath(config.graphWiringsFile, config.typesDeclarationFile, config.packageMappings);
|
|
10
|
+
await writeFileInDir(logger, config.graphWiringsFile, serializeGraphWirings(pathToPikkuTypes));
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
},
|
|
15
|
+
middleware: [
|
|
16
|
+
logCommandInfoAndTime({
|
|
17
|
+
commandStart: 'Generating Graph Wirings',
|
|
18
|
+
commandEnd: 'Generated Graph Wirings',
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire @pikku/addon-graph so `pikkuWorkflowGraph` nodes can reference its native
|
|
3
|
+
* transform functions (e.g. `graph:editFields`).
|
|
4
|
+
*/
|
|
5
|
+
export const serializeGraphWirings = (pathToPikkuTypes) => {
|
|
6
|
+
return `/**
|
|
7
|
+
* @pikku/addon-graph wiring
|
|
8
|
+
* Do not edit manually - regenerate with 'npx pikku'
|
|
9
|
+
*/
|
|
10
|
+
import { wireAddon } from '${pathToPikkuTypes}'
|
|
11
|
+
|
|
12
|
+
wireAddon({ name: 'graph', package: '@pikku/addon-graph' })
|
|
13
|
+
`;
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuHTTPMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuHTTPMap: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuCommandHTTP: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuCommandHTTP: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuHTTPTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuHTTPTypes: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuOpenAPI: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuOpenAPI: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuHTTP: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").
|
|
1
|
+
export declare const pikkuHTTP: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|