@pikku/cli 0.12.48 → 0.12.50

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 (81) hide show
  1. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  2. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  3. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  4. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  5. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  6. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  7. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  8. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  9. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  10. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  11. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  12. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  13. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  14. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  16. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  17. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  18. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  19. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  20. package/dist/.pikku/function/pikku-functions-meta.gen.json +165 -165
  21. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  22. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  23. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  24. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  25. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  26. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  27. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  28. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  29. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  30. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  31. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  32. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  33. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  34. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  35. package/dist/.pikku/pikku-types.gen.js +1 -1
  36. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  37. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  38. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  39. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  40. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  41. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  42. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -2
  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 +11 -11
  46. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  47. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  48. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  49. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  50. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  51. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  52. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  53. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  54. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  55. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  56. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  57. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  58. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  59. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  60. package/dist/bin/pikku-bin.mjs +2 -2
  61. package/dist/src/deploy/server-entry.d.ts +1 -1
  62. package/dist/src/deploy/server-entry.js +3 -1
  63. package/dist/src/fabric/functions/validate.function.js +102 -0
  64. package/dist/src/fabric/lib/config.js +1 -1
  65. package/dist/src/functions/commands/dev-ai-runner.d.ts +19 -0
  66. package/dist/src/functions/commands/dev-ai-runner.js +70 -0
  67. package/dist/src/functions/commands/dev.js +16 -0
  68. package/dist/src/functions/commands/tests-coverage.js +6 -0
  69. package/dist/src/functions/db/db-codegen.d.ts +9 -6
  70. package/dist/src/functions/db/db-codegen.js +62 -5
  71. package/dist/src/functions/db/db-introspector.d.ts +6 -0
  72. package/dist/src/functions/db/local-db.d.ts +1 -0
  73. package/dist/src/functions/db/local-db.js +3 -0
  74. package/dist/src/functions/db/sqlite/sqlite-introspector.d.ts +8 -0
  75. package/dist/src/functions/db/sqlite/sqlite-introspector.js +27 -0
  76. package/dist/src/scaffold/rpc-remote.gen.js +1 -1
  77. package/dist/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +2 -2
  79. package/skills/pikku-paraglide/SKILL.md +117 -0
  80. package/dist/src/fabric/functions/validate-core.d.ts +0 -20
  81. package/dist/src/fabric/functions/validate-core.js +0 -287
@@ -7,6 +7,13 @@ export interface CodegenOptions {
7
7
  manifestFile?: string;
8
8
  classificationMapFile?: string;
9
9
  schemaJsonFile?: string;
10
+ /**
11
+ * When set, emit a standalone module of bare enum unions (one
12
+ * `export type <Table><Column>` per enum column) — independent of the wrapped
13
+ * DB interface, so callers import a clean union instead of unwrapping
14
+ * `ColumnType<Private<…>>`.
15
+ */
16
+ enumsFile?: string;
10
17
  camelCase?: boolean;
11
18
  rootDir?: string;
12
19
  /** DB dialect — drives real-type-aware date typing. Defaults to 'sqlite'. */
@@ -17,10 +24,12 @@ export interface CodegenResult {
17
24
  coercionFile: string;
18
25
  manifestFile?: string;
19
26
  classificationMapFile?: string;
27
+ enumsFile?: string;
20
28
  written: boolean;
21
29
  coercionWritten: boolean;
22
30
  manifestWritten: boolean;
23
31
  classificationMapWritten: boolean;
32
+ enumsWritten: boolean;
24
33
  tables: string[];
25
34
  /** Non-fatal codegen warnings (e.g. name looks like a date but unannotated). */
26
35
  warnings: string[];
@@ -31,11 +40,5 @@ export interface CodegenResult {
31
40
  */
32
41
  zodFormats: Record<string, Record<string, ZodFormat>>;
33
42
  }
34
- /**
35
- * Introspect `introspector` and emit:
36
- * - `schema.d.ts` Kysely DB type with classification brands
37
- * - `coercion.gen.ts` Runtime CoercionMap for date/bool/json coercion
38
- * - `classification.gen.ts` Data-classification manifest (when manifestFile set)
39
- */
40
43
  export declare function generateSchemaTypes(introspector: DbIntrospector, options: CodegenOptions): Promise<CodegenResult>;
41
44
  export {};
@@ -177,11 +177,13 @@ function emitInterface(table, camelCase, explicitAnnotations, dialect, enumByNam
177
177
  `is ${col.type} (${real}). If intentional, set its kind in db/annotations.ts.`);
178
178
  }
179
179
  }
180
- // A Postgres enum column reports `type` as 'USER-DEFINED'; its real values
181
- // come from `udtName`. Type it as a union of string literals — only when
182
- // no explicit `tsType`/`kind` overrides it. This reuses the `tsType`
183
- // plumbing, so it flows through both the public and classified branches.
184
- const enumValues = col.udtName ? enumByName.get(col.udtName) : undefined;
180
+ // Enum columns are typed as a union of string literals — only when no
181
+ // explicit `tsType`/`kind` overrides it. This reuses the `tsType` plumbing,
182
+ // so it flows through both the public and classified branches. Values come
183
+ // from a Postgres enum (`type` is 'USER-DEFINED', real values via `udtName`)
184
+ // or, on SQLite, from a `CHECK (col IN ())` constraint the introspector
185
+ // parsed onto `col.enumValues`.
186
+ const enumValues = col.enumValues ?? (col.udtName ? enumByName.get(col.udtName) : undefined);
185
187
  const enumUnion = enumValues && enumValues.length > 0
186
188
  ? enumValues.map((v) => `'${escapeTsString(v)}'`).join(' | ')
187
189
  : null;
@@ -322,6 +324,41 @@ function emitClassificationMap(tables) {
322
324
  * - `coercion.gen.ts` Runtime CoercionMap for date/bool/json coercion
323
325
  * - `classification.gen.ts` Data-classification manifest (when manifestFile set)
324
326
  */
327
+ /**
328
+ * Bare string-literal enum types, independent of the wrapped DB interface. One
329
+ * `export type <Table><Column>` per enum column — Postgres native enums (values
330
+ * via `udtName`/`enumByName`) and SQLite `CHECK (col IN (…))` (values on
331
+ * `col.enumValues`) alike. Lets app code and i18n reconciliation import a clean
332
+ * union instead of unwrapping `ColumnType<Private<…>>` from the DB interface.
333
+ */
334
+ function emitEnumsModule(tables, enumByName) {
335
+ const pascal = (s) => s.charAt(0).toUpperCase() + s.slice(1);
336
+ const seen = new Set();
337
+ const lines = [];
338
+ for (const t of tables) {
339
+ const tablePart = pascal(snakeToCamel(bareTableName(t.name)));
340
+ for (const col of t.columns) {
341
+ const values = col.enumValues ?? (col.udtName ? enumByName.get(col.udtName) : undefined);
342
+ if (!values || values.length === 0)
343
+ continue;
344
+ const name = `${tablePart}${pascal(snakeToCamel(col.name))}`;
345
+ if (seen.has(name))
346
+ continue;
347
+ seen.add(name);
348
+ const union = values.map((v) => `'${escapeTsString(v)}'`).join(' | ');
349
+ lines.push(`export type ${name} = ${union}`);
350
+ }
351
+ }
352
+ return [
353
+ `// Generated by @pikku/cli — do not edit by hand.`,
354
+ `// Run \`pikku db migrate\` to refresh.`,
355
+ `//`,
356
+ `// Bare enum unions from Postgres enums and SQLite CHECK (col IN (…)) constraints.`,
357
+ ``,
358
+ ...(lines.length ? lines : ['export {}']),
359
+ ``,
360
+ ].join('\n');
361
+ }
325
362
  export async function generateSchemaTypes(introspector, options) {
326
363
  const camelCase = options.camelCase ?? true;
327
364
  const dialect = options.dialect ?? 'sqlite';
@@ -456,6 +493,10 @@ export async function generateSchemaTypes(introspector, options) {
456
493
  schemaJsonBody =
457
494
  JSON.stringify({ tables: jsonTables, enums }, null, 2) + '\n';
458
495
  }
496
+ // ── enums.gen.ts ─────────────────────────────────────────────────────────────
497
+ const enumsBody = options.enumsFile
498
+ ? emitEnumsModule(tables, enumByName)
499
+ : null;
459
500
  // ── write files ───────────────────────────────────────────────────────────────
460
501
  let existingSchema = null;
461
502
  let existingCoercion = null;
@@ -498,12 +539,22 @@ export async function generateSchemaTypes(introspector, options) {
498
539
  /* ok */
499
540
  }
500
541
  }
542
+ let existingEnums = null;
543
+ if (options.enumsFile) {
544
+ try {
545
+ existingEnums = readFileSync(options.enumsFile, 'utf8');
546
+ }
547
+ catch {
548
+ /* ok */
549
+ }
550
+ }
501
551
  const schemaChanged = existingSchema !== schemaBody;
502
552
  const coercionChanged = existingCoercion !== coercionBody;
503
553
  const manifestChanged = manifestBody !== null && existingManifest !== manifestBody;
504
554
  const classificationMapChanged = classificationMapBody !== null &&
505
555
  existingClassificationMap !== classificationMapBody;
506
556
  const schemaJsonChanged = schemaJsonBody !== null && existingSchemaJson !== schemaJsonBody;
557
+ const enumsChanged = enumsBody !== null && existingEnums !== enumsBody;
507
558
  if (schemaChanged) {
508
559
  mkdirSync(dirname(options.outFile), { recursive: true });
509
560
  writeFileSync(options.outFile, schemaBody, 'utf8');
@@ -526,15 +577,21 @@ export async function generateSchemaTypes(introspector, options) {
526
577
  mkdirSync(dirname(options.schemaJsonFile), { recursive: true });
527
578
  writeFileSync(options.schemaJsonFile, schemaJsonBody, 'utf8');
528
579
  }
580
+ if (enumsChanged && options.enumsFile && enumsBody) {
581
+ mkdirSync(dirname(options.enumsFile), { recursive: true });
582
+ writeFileSync(options.enumsFile, enumsBody, 'utf8');
583
+ }
529
584
  return {
530
585
  outFile: options.outFile,
531
586
  coercionFile: options.coercionFile,
532
587
  manifestFile: options.manifestFile,
533
588
  classificationMapFile: options.classificationMapFile,
589
+ enumsFile: options.enumsFile,
534
590
  written: schemaChanged,
535
591
  coercionWritten: coercionChanged,
536
592
  manifestWritten: manifestChanged,
537
593
  classificationMapWritten: classificationMapChanged,
594
+ enumsWritten: enumsChanged,
538
595
  tables: tables.map((t) => t.name),
539
596
  warnings,
540
597
  zodFormats,
@@ -13,6 +13,12 @@ export interface ColumnInfo {
13
13
  * name used to resolve its values. Undefined on SQLite (no native enums).
14
14
  */
15
15
  udtName?: string;
16
+ /**
17
+ * String-literal enum values for this column, when known. On SQLite (no native
18
+ * enums) these come from a `CHECK (col IN ('a','b',…))` constraint — the CHECK
19
+ * *is* the enum definition. Typed as a union, mirroring a Postgres enum column.
20
+ */
21
+ enumValues?: string[];
16
22
  }
17
23
  export interface ForeignKeyInfo {
18
24
  column: string;
@@ -14,6 +14,7 @@ interface ResolvedDbBase {
14
14
  schemaJsonFile: string;
15
15
  classificationsFile: string;
16
16
  classificationsGenJsonFile: string;
17
+ enumsFile: string;
17
18
  zodFile: string;
18
19
  camelCase: boolean;
19
20
  }
@@ -47,6 +47,7 @@ export function resolveDb(userConfig, rootDir, outDir, runtimeDir) {
47
47
  manifestFile: join(outDir, 'db', 'classification.gen.ts'),
48
48
  classificationMapFile: join(outDir, 'db', 'classification-map.gen.d.ts'),
49
49
  schemaJsonFile: join(outDir, 'db', 'pikku-db-schema.gen.json'),
50
+ enumsFile: join(outDir, 'db', 'enums.gen.ts'),
50
51
  classificationsFile: join(rootDir, 'db', 'annotations.ts'),
51
52
  // Compiled sidecar lives beside the authored annotations.ts in db/ — this is
52
53
  // where both consumers read it: the codegen's loadAnnotations() and the
@@ -182,6 +183,7 @@ export async function migrateAndCodegen(resolved) {
182
183
  manifestFile: resolved.manifestFile,
183
184
  classificationMapFile: resolved.classificationMapFile,
184
185
  schemaJsonFile: resolved.schemaJsonFile,
186
+ enumsFile: resolved.enumsFile,
185
187
  camelCase: resolved.camelCase,
186
188
  rootDir: resolved.rootDir,
187
189
  dialect: 'sqlite',
@@ -204,6 +206,7 @@ export async function migrateAndCodegen(resolved) {
204
206
  manifestFile: resolved.manifestFile,
205
207
  classificationMapFile: resolved.classificationMapFile,
206
208
  schemaJsonFile: resolved.schemaJsonFile,
209
+ enumsFile: resolved.enumsFile,
207
210
  camelCase: resolved.camelCase,
208
211
  rootDir: resolved.rootDir,
209
212
  dialect: 'postgres',
@@ -5,6 +5,14 @@ export declare class SqliteIntrospector implements DbIntrospector {
5
5
  constructor(db: SyncSqliteDatabase);
6
6
  listTables(): Promise<string[]>;
7
7
  getColumns(table: string): Promise<ColumnInfo[]>;
8
+ /**
9
+ * SQLite has no native enums, but a `CHECK (col IN ('a','b',…))` constraint is
10
+ * an enum by another name. Parse the table's stored `CREATE TABLE` DDL and map
11
+ * each constrained column to its allowed values so codegen can type it as a
12
+ * union. Only the positive `col IN (…)` form is recognised (the convention);
13
+ * `NOT IN`, ranges, and boolean expressions are left as plain `string`.
14
+ */
15
+ private parseCheckEnums;
8
16
  getForeignKeys(table: string): Promise<ForeignKeyInfo[]>;
9
17
  listEnums(): Promise<EnumInfo[]>;
10
18
  close(): Promise<void>;
@@ -18,6 +18,7 @@ export class SqliteIntrospector {
18
18
  const rows = this.db
19
19
  .prepare(`PRAGMA table_xinfo(${escaped})`)
20
20
  .all();
21
+ const enumsByColumn = this.parseCheckEnums(table);
21
22
  return rows
22
23
  .filter((c) => c.hidden !== 1)
23
24
  .map((c) => ({
@@ -27,8 +28,34 @@ export class SqliteIntrospector {
27
28
  pk: c.pk > 0,
28
29
  defaultValue: c.dflt_value != null ? String(c.dflt_value) : null,
29
30
  generated: c.hidden === 2 || c.hidden === 3,
31
+ enumValues: enumsByColumn.get(c.name),
30
32
  }));
31
33
  }
34
+ /**
35
+ * SQLite has no native enums, but a `CHECK (col IN ('a','b',…))` constraint is
36
+ * an enum by another name. Parse the table's stored `CREATE TABLE` DDL and map
37
+ * each constrained column to its allowed values so codegen can type it as a
38
+ * union. Only the positive `col IN (…)` form is recognised (the convention);
39
+ * `NOT IN`, ranges, and boolean expressions are left as plain `string`.
40
+ */
41
+ parseCheckEnums(table) {
42
+ const out = new Map();
43
+ const row = this.db
44
+ .prepare(`SELECT sql FROM sqlite_master WHERE type = 'table' AND name = ?`)
45
+ .get(table);
46
+ const ddl = row?.sql;
47
+ if (!ddl)
48
+ return out;
49
+ const checkIn = /CHECK\s*\(\s*"?(\w+)"?\s+IN\s*\(([^)]*)\)/gi;
50
+ let m;
51
+ while ((m = checkIn.exec(ddl))) {
52
+ const column = m[1];
53
+ const values = [...m[2].matchAll(/'((?:[^']|'')*)'/g)].map((q) => q[1].replace(/''/g, "'"));
54
+ if (values.length > 0)
55
+ out.set(column, values);
56
+ }
57
+ return out;
58
+ }
32
59
  async getForeignKeys(table) {
33
60
  const escaped = `"${table.replace(/"/g, '""')}"`;
34
61
  const rows = this.db
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.48
2
+ * This file was generated by @pikku/cli@0.12.50
3
3
  */
4
4
  /**
5
5
  * Auto-generated remote internal RPC queue worker and HTTP endpoint
@@ -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/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.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/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-core.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/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.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.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.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/skills.ts","../src/functions/commands/tests-coverage.ts","../src/functions/commands/tests-init.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/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/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/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/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.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/scaffold/rpc-remote.gen.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.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/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.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/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/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.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-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.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":"5.9.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/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.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/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/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.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/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/skills.ts","../src/functions/commands/tests-coverage.ts","../src/functions/commands/tests-init.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/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/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/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/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.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/scaffold/rpc-remote.gen.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.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/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.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/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/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.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-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.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":"5.9.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.48",
3
+ "version": "0.12.50",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@electric-sql/pglite": "^0.5.1",
29
29
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
30
- "@pikku/better-auth": "^0.12.10",
30
+ "@pikku/better-auth": "^0.12.11",
31
31
  "@pikku/core": "^0.12.37",
32
32
  "@pikku/deploy-cloudflare": "^0.12.4",
33
33
  "@pikku/fetch": "^0.12.4",
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: pikku-paraglide
3
+ description: 'Generate typed, static enum-label maps for a Paraglide i18n frontend with `@pikku/paraglide`, and reconcile them against the database enum columns so a label can never silently drift from a DB value. Enum-valued labels live under a reserved `enum__<group>__<member>` message namespace; the generator emits `i18n-enum.gen.ts` typed `satisfies EnumLabel<DbEnum>`. TRIGGER when: labelling an enum/status/kind/role value in a Paraglide app, replacing a dynamic `mKey(...)`/`m[...]` lookup with a static map, wiring `@pikku/paraglide` into Vite, or reconciling i18n against `CHECK (col IN (...))` / Postgres enum columns. DO NOT TRIGGER for plain free-text UI copy (that is a normal `m.some_key()` message), backend errors, or logs.'
4
+ installGroups: [core]
5
+ ---
6
+
7
+ # Pikku Paraglide enum labels
8
+
9
+ ## Agent Operating Procedure
10
+
11
+ Use this as an execution checklist, not reference material.
12
+
13
+ 1. **Is the value an enum (a closed set — a status/kind/role/tag from a DB column or a fixed union)?** Then its label is a static map entry, never a dynamic lookup. Add `enum__<group>__<member>` keys to the catalog (`messages/en.json`) and read the value through the generated map: `group[value]()`.
14
+ 2. **Is the value free text or a one-off literal** (a heading, a button, a never-indexed label)? Then it is a normal Paraglide message — call `m.<key>()` directly. Do **not** invent an enum group for something that is always a literal.
15
+ 3. **Wire the generator** (`@pikku/paraglide/vite` or the CLI) so `i18n-enum.gen.ts` is regenerated from the catalog, and point it at the DB enums module (`enums.gen.ts`) so the maps are typed against the database.
16
+ 4. **Validate with the app's own `tsc`.** Reconciliation is enforced purely by types: a missing key or a dropped DB member is a compile error, and the deploy gate runs `tsc` before building. A clean `vite build` alone does not type-check.
17
+
18
+ ## The rules that don't change
19
+
20
+ - **Never resolve an enum key dynamically.** No `mKey('status.' + value)`, no `m['enum__status__' + value]()`, no `mExists`/`mList` helpers. Dynamic keys can't be type-checked or tree-shaken. Everything is a static `m.<literal>()` reference, generated into the map.
21
+ - **The `enum__<group>__<member>` namespace.** `__` separates the prefix / group / member segments; a single `_` joins words *within* a segment (`enum__booking_status__form_received`). The prefix (`enum`) and separator (`__`) are configurable but leave them at the defaults.
22
+ - **Members must be valid JS identifiers.** Spell out leading digits — `two_guests`, not `2_guests`. The generator quotes an invalid member as a fallback but warns you to rename it.
23
+ - **`asI18n(...)` is only for opaque server data** (names, slugs, ids returned from the API). Never `asI18n()` a hardcoded English string or an enum value — an enum value goes through its label map.
24
+
25
+ ## The generated module
26
+
27
+ `i18n-enum.gen.ts` is **AUTO-GENERATED — do not edit.** It exports, per enum group:
28
+
29
+ ```ts
30
+ import { m } from './messages.js'
31
+ import type { I18nString } from '@pikku/react'
32
+ import type { BookingStatus } from '#pikku/db/enums.gen' // when reconciled
33
+
34
+ export type I18nMessage = () => I18nString
35
+ export type EnumLabel<E extends string> = Record<E, I18nMessage>
36
+
37
+ export const bookingStatus = {
38
+ enquiry: m.enum__booking_status__enquiry,
39
+ reserved: m.enum__booking_status__reserved,
40
+ confirmed: m.enum__booking_status__confirmed,
41
+ } satisfies EnumLabel<BookingStatus>
42
+ export type BookingStatusKey = keyof typeof bookingStatus
43
+ ```
44
+
45
+ - Each value is an `I18nMessage` — a `() => I18nString` accessor. **Call it at render time** so the label tracks the active locale.
46
+ - App code: `import { bookingStatus } from './i18n/i18n-enum.gen'` then `bookingStatus[value]()`.
47
+ - For an open server value, gate it: `value in bookingStatus ? bookingStatus[value as BookingStatusKey]() : asI18n(value)`.
48
+
49
+ ### Module-scope hazard — store the accessor, don't call it
50
+
51
+ A label used in a config built at module load (nav items, column defs) must hold the **accessor**, not the result — calling `m.foo()` at module scope freezes the label to the locale that was active at import:
52
+
53
+ ```ts
54
+ // nav.config.ts
55
+ const items = [{ label: m.common__nav__items__dashboard /* ← reference */ }]
56
+ // at render: <span>{item.label()}</span> // ← call here
57
+ ```
58
+
59
+ ## Reconciliation against the database
60
+
61
+ The DB column is the real source of truth for what an enum can be. The pikku CLI's db codegen emits a bare unions module — `.pikku/db/enums.gen.ts` — covering **both** Postgres native enums and SQLite `CHECK (col IN ('a','b',…))` constraints:
62
+
63
+ ```ts
64
+ export type BookingStatus = 'enquiry' | 'reserved' | 'confirmed' | 'ended' | 'cancelled'
65
+ ```
66
+
67
+ Point `@pikku/paraglide` at that file (`enumsFile`) and each catalog group whose member set **exactly matches** a DB enum is typed `satisfies EnumLabel<DbEnum>`. The label map then **is** the reconciliation — no separate assertion:
68
+
69
+ - catalog drops a DB member, or `en.json` is missing the key → `m.enum__…` doesn't exist / `Record<DbEnum,…>` isn't exhaustive → **`tsc` error naming the gap**.
70
+ - a DB enum with **no** catalog group → `unmatchedDbEnums: 'emit'` (default) generates a label map referencing `enum__<table>_<column>__<member>` keys, so `tsc` tells you exactly which keys to add; `'warn'` only reports it.
71
+ - a group with a member the DB lacks (a *derived* UI state, e.g. a `waitlisted` view of a `pending` row) → a drift warning. Make that a **standalone `m.<key>()` message**, not an enum member — the enum group must mirror the DB column exactly.
72
+
73
+ Labelling an enum that's never rendered costs nothing: Paraglide compiles only the messages actually referenced, so unused labels are tree-shaken away. So label every DB enum; don't add an opt-out.
74
+
75
+ **To make a column an enum**, give it a closed domain in the migration so codegen can see it:
76
+ - SQLite: `status TEXT NOT NULL CHECK (status IN ('enquiry','reserved','confirmed'))`
77
+ - Postgres: a native `CREATE TYPE … AS ENUM (…)` column.
78
+
79
+ ## Wiring
80
+
81
+ ### Vite (dev + build)
82
+
83
+ Place `paraglideEnums` **after** `paraglideVitePlugin` (the generated file imports the compiled `m`). It regenerates on catalog/enums edits and only writes on change, so it never loops HMR.
84
+
85
+ ```ts
86
+ import { paraglideVitePlugin } from '@inlang/paraglide-js'
87
+ import { paraglideEnums } from '@pikku/paraglide/vite'
88
+
89
+ export default defineConfig({
90
+ plugins: [
91
+ paraglideVitePlugin({ project: './project.inlang', outdir: './src/paraglide' }),
92
+ paraglideEnums({
93
+ catalog: './messages/en.json',
94
+ outFile: './src/i18n/i18n-enum.gen.ts',
95
+ enumsFile: './packages/functions/.pikku/db/enums.gen.ts', // reconcile against the DB
96
+ // enumsImport: '#pikku/db/enums.gen', // explicit specifier; defaults to a relative path
97
+ }),
98
+ ],
99
+ })
100
+ ```
101
+
102
+ ### CLI (CI / non-Vite), run right after `paraglide-js compile`
103
+
104
+ ```sh
105
+ # paraglide-enums <catalog.json> <out.gen.ts> [messagesImport] [enums.gen.ts]
106
+ paraglide-enums ./messages/en.json ./src/i18n/i18n-enum.gen.ts ./messages.js ./packages/functions/.pikku/db/enums.gen.ts
107
+ ```
108
+
109
+ `i18n-enum.gen.ts` is generated — gitignore it once the plugin/CLI runs in the build.
110
+
111
+ ## What NOT to do
112
+
113
+ - Don't write `mKey`/`mList`/`mExists` or any `m[expr]()` dynamic lookup — every enum label is a static generated reference.
114
+ - Don't introduce a literal-key indirection helper (`k('approve_enquiry')`); a literal is `m.approve_enquiry()` directly.
115
+ - Don't call `m.foo()` at module scope for config built at import time — store `m.foo` and call it at render.
116
+ - Don't put an extra UI-only member into an enum group to match a derived state — make it a standalone message and keep the group an exact mirror of the DB column.
117
+ - Don't hand-edit `i18n-enum.gen.ts` or `enums.gen.ts` — fix the catalog / the migration and regenerate.
@@ -1,20 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const FabricValidateInput: z.ZodObject<{}, z.core.$strip>;
3
- export declare const FabricValidateOutput: z.ZodObject<{
4
- ok: z.ZodBoolean;
5
- root: z.ZodString;
6
- findings: z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- severity: z.ZodEnum<{
9
- warn: "warn";
10
- error: "error";
11
- info: "info";
12
- }>;
13
- message: z.ZodString;
14
- path: z.ZodString;
15
- fixHint: z.ZodString;
16
- }, z.core.$strip>>;
17
- }, z.core.$strip>;
18
- export declare function runFabricValidate(startDir?: string): Promise<z.infer<typeof FabricValidateOutput>>;
19
- export declare const runValidate: typeof runFabricValidate;
20
- export declare const renderValidate: (_s: unknown, { ok, root, findings }: z.infer<typeof FabricValidateOutput>) => void;