@pikku/cli 0.12.86 → 0.12.88

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.
Files changed (76) hide show
  1. package/console-app/assets/{index-Cr3_cO3Z.js → index-C3FPwdl7.js} +149 -149
  2. package/console-app/index.html +1 -1
  3. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  4. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  5. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  6. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  7. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  8. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  9. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  10. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  11. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  12. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  13. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  14. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  16. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  17. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  18. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  19. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  20. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  21. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  22. package/dist/.pikku/function/pikku-functions-meta.gen.json +2 -2
  23. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  24. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  25. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  26. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  27. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  28. package/dist/.pikku/pikku-bootstrap.gen.d.ts +3 -1
  29. package/dist/.pikku/pikku-bootstrap.gen.js +3 -1
  30. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  31. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  32. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  33. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  34. package/dist/.pikku/pikku-types.gen.js +1 -1
  35. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  36. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  37. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +1 -0
  38. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +6 -0
  39. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +6 -0
  40. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +4 -0
  41. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +5 -0
  42. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  43. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  44. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  45. package/dist/.pikku/schemas/register.gen.js +1 -1
  46. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  47. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  48. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  49. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  50. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  51. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  52. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  53. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  54. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  55. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  56. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  57. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  58. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  59. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  60. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  61. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  62. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  63. package/dist/bin/pikku-bin.mjs +2 -2
  64. package/dist/bin/pikku.js +22 -0
  65. package/dist/src/fabric/functions/deploy.function.js +6 -0
  66. package/dist/src/fabric/functions/init.function.js +2 -2
  67. package/dist/src/fabric/functions/validate.function.js +12 -2
  68. package/dist/src/fabric/lib/config.d.ts +8 -0
  69. package/dist/src/fabric/lib/config.js +15 -1
  70. package/dist/src/fabric/lib/git.js +2 -2
  71. package/dist/src/functions/wirings/queue/pikku-command-queue.js +10 -2
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +6 -6
  74. package/skills/pikku-concepts/SKILL.md +16 -0
  75. package/skills/pikku-fabric/SKILL.md +92 -19
  76. package/skills/pikku-permissions/SKILL.md +21 -5
@@ -605,8 +605,12 @@ export async function runValidate(startDir = process.cwd()) {
605
605
  const pikkuGenDir = join(fnDir, '.pikku');
606
606
  const typesGenTs = join(pikkuGenDir, 'pikku-types.gen.ts');
607
607
  const typesGenJs = join(pikkuGenDir, 'pikku-types.gen.js');
608
+ // A warning, not an error: the wrapper is gitignored and recreated by
609
+ // the sandbox entrypoint and `fabric smoke`, so a freshly cloned or
610
+ // freshly scaffolded project never has it. As an error, "validate must
611
+ // pass clean" was unachievable from a clean checkout.
608
612
  if (existsSync(typesGenTs) && !existsSync(typesGenJs)) {
609
- e('pikku-types-js-wrapper-missing', 'packages/functions/.pikku/pikku-types.gen.js is missing — the sandbox runs pikku dev via bare Node.js, which cannot load .ts files; without the .js wrapper it crashes with "Cannot find module \'#pikku/pikku-types.gen.js\'" on every restart', typesGenTs, lines('Create packages/functions/.pikku/pikku-types.gen.js:', " import './pikku-types.gen.ts';", " export * from './pikku-types.gen.ts';", 'Or run `pikku fabric smoke` to test the full boot locally (it creates the wrappers).', 'This file is gitignored — it must be recreated after every `pikku all` run.'));
613
+ w('pikku-types-js-wrapper-missing', 'packages/functions/.pikku/pikku-types.gen.js is missing — the sandbox runs pikku dev via bare Node.js, which cannot load .ts files; without the .js wrapper it crashes with "Cannot find module \'#pikku/pikku-types.gen.js\'" on every restart', typesGenTs, lines('Create packages/functions/.pikku/pikku-types.gen.js:', " import './pikku-types.gen.ts';", " export * from './pikku-types.gen.ts';", 'Or run `pikku fabric smoke` to test the full boot locally (it creates the wrappers).', 'This file is gitignored — it must be recreated after every `pikku all` run.'));
610
614
  }
611
615
  }
612
616
  const fnAllDeps = {
@@ -655,7 +659,13 @@ export async function runValidate(startDir = process.cwd()) {
655
659
  const usesLibsql = servicesText.includes('@pikku/kysely-sqlite') ||
656
660
  servicesText.includes('LibsqlWebDialect');
657
661
  const usesProcessEnv = /\bprocess\.env\.[A-Z_]/.test(servicesText);
658
- if (dbEngine !== 'postgres' && usesKysely && !usesLibsql) {
662
+ // Only a services.ts that BUILDS its own client can pick the wrong
663
+ // dialect. The starter template takes kysely from injection (pikku dev
664
+ // supplies node:sqlite, the Worker supplies libsql) and constructs
665
+ // nothing — flagging it told every fresh scaffold to import a dialect it
666
+ // must not use.
667
+ const constructsKysely = /new\s+Kysely\s*[<(]/.test(servicesText);
668
+ if (dbEngine !== 'postgres' && usesKysely && constructsKysely && !usesLibsql) {
659
669
  e('services-wrong-db-adapter', 'services.ts uses Kysely but not LibsqlWebDialect — Fabric injects a Turso/libSQL DATABASE_URL at runtime, not a PostgreSQL URL', servicesPath, 'Import LibsqlWebDialect from @pikku/kysely-sqlite and replace the dialect: new Kysely({ dialect: new LibsqlWebDialect({ url: databaseUrl }) })');
660
670
  }
661
671
  if (usesProcessEnv) {
@@ -42,6 +42,14 @@ export declare function findProjectConfig(startDir?: string): Promise<{
42
42
  path: string;
43
43
  config: ProjectConfig;
44
44
  } | null>;
45
+ /**
46
+ * Templates ship `pikkufabric.config.json` with a `__PROJECT_ID__` placeholder
47
+ * so the file's shape is visible before the repo is linked. A placeholder is
48
+ * not a link: without this, `fabric init` on a fresh scaffold reports
49
+ * "Already linked: __PROJECT_ID__" and every other command sends the
50
+ * placeholder to the API as if it were a real id.
51
+ */
52
+ export declare function isLinkedProjectId(projectId?: string | null): boolean;
45
53
  export declare function writeProjectConfig(cwd: string, config: ProjectConfig): Promise<string>;
46
54
  export declare function readAuthFile(): Promise<AuthFile>;
47
55
  export declare function writeAuthFile(file: AuthFile): Promise<void>;
@@ -19,6 +19,18 @@ export async function findProjectConfig(startDir = process.cwd()) {
19
19
  dir = parent;
20
20
  }
21
21
  }
22
+ /**
23
+ * Templates ship `pikkufabric.config.json` with a `__PROJECT_ID__` placeholder
24
+ * so the file's shape is visible before the repo is linked. A placeholder is
25
+ * not a link: without this, `fabric init` on a fresh scaffold reports
26
+ * "Already linked: __PROJECT_ID__" and every other command sends the
27
+ * placeholder to the API as if it were a real id.
28
+ */
29
+ export function isLinkedProjectId(projectId) {
30
+ if (!projectId)
31
+ return false;
32
+ return !/^__.*__$/.test(projectId);
33
+ }
22
34
  export async function writeProjectConfig(cwd, config) {
23
35
  const path = join(cwd, projectConfigName);
24
36
  await mkdir(dirname(path), { recursive: true });
@@ -57,6 +69,8 @@ export async function resolveApiContext(opts = {}) {
57
69
  return {
58
70
  apiUrl,
59
71
  token: auth.tokens[apiUrl] ?? null,
60
- projectId: projectFile?.config.projectId ?? null,
72
+ projectId: isLinkedProjectId(projectFile?.config.projectId)
73
+ ? projectFile.config.projectId
74
+ : null,
61
75
  };
62
76
  }
@@ -136,8 +136,8 @@ export async function assertNamedBranchDeploySafety(branch, cwd) {
136
136
  try {
137
137
  head = await localBranchHeadSha(branch, cwd);
138
138
  }
139
- catch {
140
- throw new Error(`Deployment blocked: local branch ${branch} does not exist.\nFetch or create it before deploying.`);
139
+ catch (error) {
140
+ throw new Error(`Deployment blocked: local branch ${branch} does not exist (${error.message}).\nFetch or create it before deploying.`);
141
141
  }
142
142
  const upstream = await upstreamForBranch(branch, cwd);
143
143
  if (!upstream) {
@@ -10,8 +10,16 @@ export const pikkuCommandQueue = pikkuSessionlessFunc({
10
10
  const visitState = await getInspectorState();
11
11
  const { queueWorkersWiringFile, queueWorkersWiringMetaFile, queueWorkersWiringMetaJsonFile, packageMappings, schema, } = config;
12
12
  const { queueWorkers } = visitState;
13
- if (queueWorkers.files.size === 0 ||
14
- Object.keys(queueWorkers.meta).length === 0) {
13
+ // Gate on the meta alone, never on `files`. Workflows synthesise their own
14
+ // `wf-orchestrator-*` / `wf-step-*` queue meta during post-processing, and
15
+ // those entries have no declaring source file — so a project that uses
16
+ // workflows but hand-declares no `wireQueueWorker` has a full `meta` and an
17
+ // empty `files`. Bailing on `files.size === 0` there skipped writing the
18
+ // queue meta entirely, which left `pikkuState(queue,meta)` empty at runtime:
19
+ // `getOrchestratorQueueName()` then never found a per-workflow queue and
20
+ // EVERY workflow fell back to the single shared `pikku-workflow-orchestrator`,
21
+ // where one slow job head-of-line-blocks everything queued behind it.
22
+ if (Object.keys(queueWorkers.meta).length === 0) {
15
23
  return undefined;
16
24
  }
17
25
  const fullMeta = serializeQueueMeta(queueWorkers.meta);
@@ -1 +1 @@
1
- {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bun-bundler.ts","../src/deploy/bundler/bundler.interface.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/node-bundler.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/add.function.ts","../src/fabric/functions/addon-verify.function.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/publish.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/audit.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/bun-coverage-loader.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev-ai-runner.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/import-n8n.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/scenario.ts","../src/functions/commands/scopes-audit.ts","../src/functions/commands/scopes-prune.ts","../src/functions/commands/scopes-shared.ts","../src/functions/commands/serve-console.ts","../src/functions/commands/serve.ts","../src/functions/commands/skills.ts","../src/functions/commands/start-coverage.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-refs.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/gateway/serialize-gateway-meta.ts","../src/functions/wirings/graph/pikku-command-graph-wirings.ts","../src/functions/wirings/graph/serialize-graph-wirings.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scenarios/pikku-command-scenario-functions.ts","../src/functions/wirings/scenarios/serialize-scenario-functions.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/scopes/pikku-command-scopes.ts","../src/functions/wirings/scopes/serialize-scopes-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/user-admin/pikku-command-user-admin-functions.ts","../src/functions/wirings/user-admin/serialize-user-admin-functions.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/webhook/pikku-command-webhook.ts","../src/functions/wirings/webhook/serialize-webhook.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-scenario-actors.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/server/bun-server-runner.ts","../src/server/dev-server-runner.interface.ts","../src/server/node-server-runner.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/assert-single-core-version.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/detect-better-auth.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/meta-diff.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/precise-coverage-map.ts","../src/utils/remove-legacy-scaffold-file.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../src/utils/tsc-check.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/auth/auth.types.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-contracts-meta.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/scopes/pikku-scope-types.gen.ts","../.pikku/scopes/pikku-scopes.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"6.0.3"}
1
+ {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bun-bundler.ts","../src/deploy/bundler/bundler.interface.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/node-bundler.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/add.function.ts","../src/fabric/functions/addon-verify.function.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/publish.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/audit.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/bun-coverage-loader.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev-ai-runner.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/import-n8n.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/scenario.ts","../src/functions/commands/scopes-audit.ts","../src/functions/commands/scopes-prune.ts","../src/functions/commands/scopes-shared.ts","../src/functions/commands/serve-console.ts","../src/functions/commands/serve.ts","../src/functions/commands/skills.ts","../src/functions/commands/start-coverage.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-refs.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/gateway/serialize-gateway-meta.ts","../src/functions/wirings/graph/pikku-command-graph-wirings.ts","../src/functions/wirings/graph/serialize-graph-wirings.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scenarios/pikku-command-scenario-functions.ts","../src/functions/wirings/scenarios/serialize-scenario-functions.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/scopes/pikku-command-scopes.ts","../src/functions/wirings/scopes/serialize-scopes-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/user-admin/pikku-command-user-admin-functions.ts","../src/functions/wirings/user-admin/serialize-user-admin-functions.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/webhook/pikku-command-webhook.ts","../src/functions/wirings/webhook/serialize-webhook.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-scenario-actors.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/server/bun-server-runner.ts","../src/server/dev-server-runner.interface.ts","../src/server/node-server-runner.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/assert-single-core-version.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/detect-better-auth.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/meta-diff.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/precise-coverage-map.ts","../src/utils/remove-legacy-scaffold-file.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../src/utils/tsc-check.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/auth/auth.types.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-contracts-meta.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/scopes/pikku-scope-types.gen.ts","../.pikku/scopes/pikku-scopes.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"6.0.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.86",
3
+ "version": "0.12.88",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -32,10 +32,10 @@
32
32
  "@pikku/bun-server": "^0.12.4",
33
33
  "@pikku/deploy-cloudflare": "^0.12.8",
34
34
  "@pikku/fetch": "^0.12.8",
35
- "@pikku/inspector": "^0.12.45",
36
- "@pikku/kysely": "^0.13.2",
35
+ "@pikku/inspector": "^0.12.46",
36
+ "@pikku/kysely": "^0.13.3",
37
37
  "@pikku/kysely-node-sqlite": "^0.12.3",
38
- "@pikku/n8n-import": "^0.0.2",
38
+ "@pikku/n8n-import": "^0.0.3",
39
39
  "@pikku/node-http-server": "^0.12.6",
40
40
  "@pikku/openapi-parser": "^0.12.16",
41
41
  "@pikku/schedule": "^0.12.4",
@@ -60,10 +60,10 @@
60
60
  "zod-to-ts": "^2.1.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@pikku/core": "^0.12.67"
63
+ "@pikku/core": "^0.12.69"
64
64
  },
65
65
  "devDependencies": {
66
- "@pikku/core": "^0.12.67",
66
+ "@pikku/core": "^0.12.69",
67
67
  "@types/istanbul-lib-instrument": "^1.7.7",
68
68
  "@types/node": "^24.11.0",
69
69
  "@types/pg": "^8.11.0",
@@ -111,6 +111,22 @@ pikkuFunc({
111
111
  })
112
112
  ```
113
113
 
114
+ **Generics XOR `input`/`output` — never both.** A function's data and return
115
+ types come from *one* source: either the `input`/`output` schemas (preferred —
116
+ they double as runtime validation and OpenAPI) or type generics
117
+ (`pikkuFunc<In, Out>({ ... })`). Passing both makes the two disagree and forces
118
+ `as any` casts. Do not annotate the `func` return type inline either — let the
119
+ `output` schema (or the generic) be the single source of truth for the type.
120
+
121
+ ```typescript
122
+ // Correct — schema-based (no generics, no inline return type)
123
+ pikkuFunc({ input: MyInput, output: MyOutput, func: async (s, d) => { ... } })
124
+ // Correct — generic-based (no input/output)
125
+ pikkuFunc<MyIn, MyOut>({ func: async (s, d) => { ... } })
126
+ // WRONG — mixing the two
127
+ pikkuFunc<MyIn, MyOut>({ input: MyInput as any, func: async (s, d) => { ... } })
128
+ ```
129
+
114
130
  ## Schemas (Validation)
115
131
 
116
132
  Pikku uses Standard Schema — works with Zod, Valibot, ArkType:
@@ -55,7 +55,7 @@ Fabric apps use SQLite, accessed via Kysely with the libSQL HTTP adapter. NOT Po
55
55
  ```typescript
56
56
  import { Kysely, CamelCasePlugin } from 'kysely'
57
57
  import { LibsqlWebDialect } from '@pikku/kysely-sqlite'
58
- import type { DB } from './types/db.types.js'
58
+ import type { DB } from '#pikku/db/schema.gen.js'
59
59
 
60
60
  const databaseUrl = await variables.get('DATABASE_URL')
61
61
  let kysely: Kysely<DB>
@@ -75,18 +75,31 @@ Fabric injects `DATABASE_URL` as a variable binding when the stage starts. In lo
75
75
 
76
76
  ### Migrations
77
77
 
78
- Migrations are plain `.sql` files in `packages/functions/db/migrations/`, numbered sequentially:
78
+ Migrations are plain `.sql` files at the **project root**, in a directory named
79
+ for the engine — `db/sqlite/` for SQLite/libSQL stages, `db/postgres/` for
80
+ Postgres ones. Never `db/migrations/`, and never under `packages/functions/`:
81
+ the deploy pipeline stages `db/<engine>/*.sql` from the root and applies them
82
+ after upload, so a migration anywhere else is silently never run.
79
83
 
80
84
  ```
81
- db/migrations/
85
+ db/sqlite/
82
86
  0001-init.sql
83
87
  0002-add-users.sql
84
88
  ```
85
89
 
86
- Run migrations: `pikku db migrate`
87
- Generate Kysely types after migrations: `yarn db:types` (uses kysely-codegen)
90
+ Numbers must be consecutive and gap-free, and an applied migration is frozen —
91
+ correct a mistake with a new forward migration, never by editing or renaming one
92
+ that has already run (the recorded hash will no longer match).
88
93
 
89
- **NEVER hand-edit `src/types/db.types.ts`** it is generated by kysely-codegen.
94
+ Run migrations: `pikku db migrate`. It also regenerates `.pikku/db/schema.gen.ts`
95
+ (Kysely types) and `.pikku/db/zod.gen.ts` — there is no separate types step.
96
+
97
+ **NEVER hand-edit the generated schema** — write a migration and re-run.
98
+
99
+ A Better Auth app has a second constraint: the plugins you enable (`admin()`,
100
+ `actor()`, …) each declare columns, and `pikku db migrate` refuses to run while
101
+ the applied schema is missing any of them. `pikku db generate` writes the
102
+ migration that closes the gap.
90
103
 
91
104
  ### Column conventions
92
105
 
@@ -135,28 +148,27 @@ packages/functions/
135
148
  services.ts # pikkuServices factory (singleton)
136
149
  middleware.ts # Shared middleware
137
150
  permissions.ts # Shared permissions
138
- types/
139
- db.types.ts # Generated by kysely-codegen — NEVER hand-edit
140
- db/
141
- migrations/ # Plain .sql files, numbered sequentially
142
- .pikku/ # Generated by pikku all — gitignored
151
+ .pikku/
152
+ db/schema.gen.ts # Kysely types, written by `pikku db migrate` — NEVER hand-edit
153
+ apps/app/ # Frontend(s)
154
+ db/sqlite/ # Plain .sql migrations, numbered, gap-free (project root)
143
155
  pikku.config.json # Pikku + deploy config (project root)
144
- fabric.config.json # Fabric environment + frontend config (project root)
156
+ pikkufabric.config.json # Fabric project link + frontends (project root)
145
157
  ```
146
158
 
147
- ## `fabric.config.json`
159
+ ## `pikkufabric.config.json`
148
160
 
149
- Declares environments and frontend dev servers:
161
+ Links the repo to a Fabric project and declares its frontends:
150
162
 
151
163
  ```json
152
164
  {
153
165
  "projectId": "my-project-id",
154
166
  "production": {
155
- "branch": "main"
167
+ "domain": "example.com"
156
168
  },
157
169
  "frontends": {
158
170
  "app": {
159
- "cwd": "apps/next-app",
171
+ "cwd": "apps/app",
160
172
  "primary": true,
161
173
  "deploy": true,
162
174
  "kind": "ssr",
@@ -170,7 +182,11 @@ Declares environments and frontend dev servers:
170
182
  }
171
183
  ```
172
184
 
173
- - `production.branch`: the git branch that maps to the production stage
185
+ - `projectId`: written by `pikku fabric init` / `link`. Templates ship the
186
+ `__PROJECT_ID__` placeholder — that is *not* a link, and the CLI treats it as
187
+ unlinked.
188
+ - `production.domain`: optional custom domain. Production always maps to `main`;
189
+ without a domain it lives on the platform `*.pikkufabric.app` hostnames.
174
190
  - `frontends`: each entry declares a frontend app with its dev command and port
175
191
 
176
192
  ## RPC is the default transport
@@ -198,6 +214,63 @@ Add `wireHTTP` only when you need a specific REST shape (webhooks, third-party c
198
214
  - Every new or changed function must have a real description.
199
215
  - If function metadata would show `missing description`, the work is not finished yet.
200
216
 
217
+ ## Run it locally
218
+
219
+ A Fabric app is two processes: the pikku API server (`:3000`) and the frontend
220
+ (vite). The starter template's `bun run dev` starts **both** and takes the whole
221
+ session down if either dies — a frontend running against a dead API looks like an
222
+ app bug and is the single most common way to waste an hour here.
223
+
224
+ ```bash
225
+ bun run prebuild # pikku all — codegen must be current before the server boots
226
+ bun run dev
227
+ ```
228
+
229
+ Then open the app, sign up as a real user, and click through what you built.
230
+ **HTTP 200 is not evidence.** These are client-rendered pages: the server returns
231
+ 200 with an empty shell, so a page whose component throws still looks fine to
232
+ curl. Either open it in a browser or drive it headlessly and assert on rendered
233
+ text.
234
+
235
+ Secrets come from `process.env`, which the CLI populates from a `.env` in the
236
+ working directory. `BETTER_AUTH_SECRET` is required — without it the first
237
+ sign-up fails with `Requested secret not found`, which names no key and points at
238
+ no file. The starter template generates one on first `bun run dev`.
239
+
240
+ If you are running the two processes yourself rather than through the template's
241
+ script, run `pikku dev` from the **project root** (it resolves `srcDirectories`
242
+ relative to the config, so a nested cwd yields a doubled watch path and no hot
243
+ reload).
244
+
245
+ ## Deploy
246
+
247
+ ```bash
248
+ pikku fabric login # opens a browser; needs a human, wait for it
249
+ pikku fabric init https://github.com/<owner>/<repo>
250
+ pikku fabric validate # must pass clean
251
+ pikku fabric deploy plan --production
252
+ pikku fabric deploy apply --production --auto-apply
253
+ ```
254
+
255
+ `apply` confirms before deploying, and with no TTY to ask — CI, an agent shell —
256
+ it refuses rather than hangs. `--auto-apply` supplies that confirmation; drop it
257
+ only when a human is at a real terminal.
258
+
259
+ `init` adopts a **GitHub** repo, and adoption goes through the Pikku Fabric
260
+ GitHub App — the app has to be installed on the account or org that owns the
261
+ repo, and if it is installed with "selected repositories" this one must be in
262
+ the selection. There is no CLI flag that works around a missing installation:
263
+ `init` returns "Connect the GitHub account '<owner>'". Send the user to install
264
+ it, or create the project in the console instead (which provisions a Fabric-hosted
265
+ git repo you push to) and write the returned `projectId` into
266
+ `pikkufabric.config.json` yourself.
267
+
268
+ Deploy refuses to run unless the target branch equals its upstream — the guard
269
+ compares `main` against `main@{upstream}`. So the remote you pushed to must be
270
+ the one the branch tracks; a stale `origin` left over from scaffolding blocks
271
+ the deploy with "local HEAD … ≠ remote …" even though your code is pushed.
272
+ `git branch --set-upstream-to=<remote>/main main` before deploying.
273
+
201
274
  ## Versioning
202
275
 
203
276
  Functions with `expose: true` are versioned via `versions.pikku.json`. When you change a function's input or output schema, you must bump its version number — otherwise `pikku all` will report a breaking change and callers' generated clients become stale.
@@ -221,7 +294,7 @@ These apply in every Fabric app:
221
294
  - **No `as any`** — fix types properly.
222
295
  - **No generic `Error`** — throw `NotFoundError`, `ConflictError`, `BadRequestError`, `UnauthorizedError` from `@pikku/core/errors`.
223
296
  - **No auth checks in function bodies** — use `permissions:` field on the function config with a `pikkuPermission` factory.
224
- - **No hand-editing `db.types.ts`** — always regenerate with `yarn db:types` after migrations.
297
+ - **No hand-editing `.pikku/db/schema.gen.ts`** — write a migration and re-run `pikku db migrate`.
225
298
  - **One runtime unit per file** — never define multiple functions/workflows in a single source file.
226
299
  - **Workflow steps don't need manual wiring** — `pikkuSessionlessFunc` step functions in `*.steps.ts` files are auto-discovered by codegen.
227
300
 
@@ -235,7 +308,7 @@ pikku fabric validate --json
235
308
 
236
309
  Fix every `error` and `warn` in the output before continuing. Then:
237
310
 
238
- 1. **Replace the database layer**: swap PostgreSQL/MySQL queries for Kysely + libSQL. Convert schema to SQLite-compatible SQL migrations in `db/migrations/`.
311
+ 1. **Replace the database layer**: swap PostgreSQL/MySQL queries for Kysely + libSQL. Convert schema to SQLite-compatible SQL migrations in `db/sqlite/`.
239
312
  2. **Replace route handlers with pikkuFuncs**: extract business logic into `pikkuFunc`/`pikkuSessionlessFunc`, add `wireHTTP` or `expose: true` for transport.
240
313
  3. **Replace DI/IoC with pikkuServices**: move service construction to `createSingletonServices` in `services.ts`.
241
314
  4. **Replace `process.env` calls** with `wireVariable`/`wireSecret` + `variables.get()`.
@@ -49,20 +49,36 @@ export const deleteBook = pikkuFunc({
49
49
 
50
50
  ### `pikkuAuth(fn)` — Session-Only Checks
51
51
 
52
- Use for checks that only need the session no request data required.
52
+ Use for checks that read the session but need no request data — and that assert
53
+ something **beyond** merely having a session (a flag, a tier, a claim).
53
54
 
54
55
  ```typescript
55
56
  import { pikkuAuth } from '#pikku'
56
57
 
57
- export const isAuthenticated = pikkuAuth(
58
- async (_services, session) => !!session
59
- )
60
-
58
+ // Good: a real gate on the session's contents, not just its existence.
61
59
  export const isVerified = pikkuAuth(
62
60
  async (_services, session) => !!session?.emailVerified
63
61
  )
64
62
  ```
65
63
 
64
+ **Do NOT write an "is signed in" permission.** A checker that just returns
65
+ `!!session` is not authorization — it re-checks authentication, which the
66
+ function already enforces. A function that needs a signed-in user sets
67
+ `auth: true` (the default for `pikkuFunc`); it does not also carry a
68
+ `permissions: { signedIn }`.
69
+
70
+ ```typescript
71
+ // WRONG — redundant with auth: true; adds a permission that gates nothing.
72
+ export const isSignedIn = pikkuAuth(async (_s, session) => !!session)
73
+ pikkuFunc({ auth: true, permissions: { signedIn: isSignedIn }, /* ... */ })
74
+
75
+ // RIGHT — auth: true already requires the session; permissions are for capability.
76
+ pikkuFunc({ auth: true, /* ... */ })
77
+ ```
78
+
79
+ A permission answers "*may this user do this?*" (role, ownership, tier) — never
80
+ "*is there a session?*".
81
+
66
82
  ### `pikkuPermission(fn)` — Data-Aware Checks
67
83
 
68
84
  Use when authorization depends on the actual request data (e.g., resource ownership).