@pikku/cli 0.12.96 → 0.12.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console-app/assets/abnfDiagram-VRR7QNED-Icjp9hnB.js +1 -0
- package/console-app/assets/arc-BfGls--L.js +1 -0
- package/console-app/assets/architecture-TIHT7OUA-C8l7I5Lm.js +1 -0
- package/console-app/assets/architectureDiagram-ZJ3FMSHR-CpnsLBns.js +36 -0
- package/console-app/assets/array-BifhSqXX.js +1 -0
- package/console-app/assets/blockDiagram-677ZJIJ3-ByKRMGSr.js +132 -0
- package/console-app/assets/c4Diagram-LMCZKHZV-CzJSbsUo.js +10 -0
- package/console-app/assets/channel-BgJ-Z0cx.js +1 -0
- package/console-app/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/console-app/assets/chunk-32BRIVSS-D_tc4HCY.js +1 -0
- package/console-app/assets/chunk-52WLFC77-wkQkuUXG.js +10 -0
- package/console-app/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/console-app/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
- package/console-app/assets/chunk-C7G6YPKG-BFW3xG3R.js +1 -0
- package/console-app/assets/chunk-EX3LRPZG-Car090Sw.js +231 -0
- package/console-app/assets/chunk-FWX5IMBZ-c2ud9kQ-.js +2 -0
- package/console-app/assets/chunk-HOUHSVGY-RYmQka5R.js +1 -0
- package/console-app/assets/chunk-ICXQ74PX-C-dqYC_9.js +2 -0
- package/console-app/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/console-app/assets/chunk-KEIR6QF5-DNzq6p3w.js +161 -0
- package/console-app/assets/chunk-MOJQB5TN-Cu3FUWwl.js +88 -0
- package/console-app/assets/chunk-OGEWGWER-Z7f1yArD.js +1 -0
- package/console-app/assets/chunk-PUDLZKDR-Bp68DuRj.js +156 -0
- package/console-app/assets/chunk-Q4XR5HBZ-CdKSYWZ4.js +70 -0
- package/console-app/assets/chunk-RYQCIY6F-9ISCAKm2.js +1 -0
- package/console-app/assets/chunk-V7JOEXUC-2EOc1nQB.js +206 -0
- package/console-app/assets/chunk-VAUOI2AC-DwKsbf70.js +1 -0
- package/console-app/assets/chunk-VR4S4FIN-BPvN0PUm.js +1 -0
- package/console-app/assets/chunk-WYO6CB5R-DOpurCTP.js +127 -0
- package/console-app/assets/chunk-XXDRQBXY-RuYSFsQb.js +1 -0
- package/console-app/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/console-app/assets/chunk-ZGVPDNZ5-Bu2weVOL.js +62 -0
- package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +32 -0
- package/console-app/assets/classDiagram-OUVF2IWQ-ohoLCI8g.js +1 -0
- package/console-app/assets/classDiagram-v2-EOCWNBFH-ohoLCI8g.js +1 -0
- package/console-app/assets/cose-bilkent-JH36ORCC-nau-QGCX.js +1 -0
- package/console-app/assets/cynefin-VYW2F7L2-BBw-E7lg.js +1 -0
- package/console-app/assets/cynefinDiagram-TSTJHNR4-BvnMvOvH.js +62 -0
- package/console-app/assets/cytoscape.esm-h6BdjjI9.js +321 -0
- package/console-app/assets/dagre-CXRCoUWR.js +1 -0
- package/console-app/assets/dagre-VKFMJZFB-CHEqPR29.js +4 -0
- package/console-app/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/console-app/assets/diagram-FQU43EPY-JijKRWyb.js +3 -0
- package/console-app/assets/diagram-G47NLZAW-G5UsB31f.js +24 -0
- package/console-app/assets/diagram-NH7WQ7WH-BhuJ6fPu.js +24 -0
- package/console-app/assets/diagram-OA4YK3LP-DaUF-8N4.js +30 -0
- package/console-app/assets/diagram-WEI45ONY-wLsJIhoM.js +41 -0
- package/console-app/assets/dist-fbBkbDNG.js +1 -0
- package/console-app/assets/ebnfDiagram-CCIWWBDH-BZCEa3Dz.js +1 -0
- package/console-app/assets/erDiagram-Q63AITRT-4XoEUtEh.js +85 -0
- package/console-app/assets/eventmodeling-45OFAUF4-DZ7z4YJO.js +1 -0
- package/console-app/assets/flowDiagram-23GEKE2U-rd7-NwZT.js +1 -0
- package/console-app/assets/ganttDiagram-NO4QXBWP-BXU7pfq6.js +292 -0
- package/console-app/assets/gitGraph-TEB2WS4Q-BdMAmvpU.js +1 -0
- package/console-app/assets/gitGraphDiagram-IHSO6WYX-3Hn0zwZR.js +106 -0
- package/console-app/assets/graphlib-B8gBHxth.js +1 -0
- package/console-app/assets/{index-CyYHTGWZ.css → index-BXMjqLQ5.css} +1 -1
- package/console-app/assets/{index-CeQodYfg.js → index-Din2vBeb.js} +153 -165
- package/console-app/assets/info-DKCQHKI2-Dc_oQkp5.js +1 -0
- package/console-app/assets/infoDiagram-FWYZ7A6U-B3v4xCUn.js +2 -0
- package/console-app/assets/init-D6jRqBbL.js +1 -0
- package/console-app/assets/ishikawaDiagram-FXEZZL3T-DzWq9Vtp.js +70 -0
- package/console-app/assets/journeyDiagram-5HDEW3XC-C0buWi_a.js +139 -0
- package/console-app/assets/kanban-definition-HUTT4EX6-DRAN9HhV.js +89 -0
- package/console-app/assets/katex-Vhh-h91d.js +257 -0
- package/console-app/assets/line-UqgRNiAC.js +1 -0
- package/console-app/assets/linear-FTAGuk_3.js +1 -0
- package/console-app/assets/map-DsCK-0Cs.js +1 -0
- package/console-app/assets/mermaid-parser.core-DIHI27FL.js +7 -0
- package/console-app/assets/mermaid.core-D4q8kvcu.js +11 -0
- package/console-app/assets/mindmap-definition-LN4V7U3C-DN-_CNLb.js +96 -0
- package/console-app/assets/ordinal-hYBb2elL.js +1 -0
- package/console-app/assets/packet-7NZHBO7P-8a3PoQAb.js +1 -0
- package/console-app/assets/path-BWPyau1x.js +1 -0
- package/console-app/assets/pegDiagram-2B236MQR-Bh2MhzCN.js +1 -0
- package/console-app/assets/pie-RZYD4A2V-Bi6zbJDl.js +1 -0
- package/console-app/assets/pieDiagram-ENE6RG2P-D2Z0W5UU.js +39 -0
- package/console-app/assets/quadrantDiagram-ABIIQ3AL-DNOKka0p.js +7 -0
- package/console-app/assets/radar-I7S5WNFK-CAxa68Sg.js +1 -0
- package/console-app/assets/railroad-3IZDKUUU-CZb1usP7.js +1 -0
- package/console-app/assets/railroad-abnf-AHOZXSZD-DkQZciri.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-CPBeASA9.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-CXEVIZ0g.js +1 -0
- package/console-app/assets/railroadDiagram-RFXS5EU6-B1K2hbTD.js +1 -0
- package/console-app/assets/requirementDiagram-TGXJPOKE-K8wcOO0Q.js +84 -0
- package/console-app/assets/rough.esm-CSKSodPl.js +1 -0
- package/console-app/assets/sankeyDiagram-HTMAVEWB-WBPBkgNx.js +40 -0
- package/console-app/assets/sequenceDiagram-DBY2YBRQ-Dz80qZZv.js +162 -0
- package/console-app/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
- package/console-app/assets/src-CnJCXDL0.js +1 -0
- package/console-app/assets/stateDiagram-2N3HPSRC-DMur7lZf.js +1 -0
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-BDgLCrot.js +1 -0
- package/console-app/assets/swimlanes-5IMT3BWC-BlLdYcPU.js +2 -0
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CZ5rQIcE.js +8 -0
- package/console-app/assets/timeline-definition-FHXFAJF6-CBOit0JY.js +120 -0
- package/console-app/assets/treeView-QDETBFTQ-DM1i1ast.js +1 -0
- package/console-app/assets/treemap-6X3UGDF4-ACrBEfY6.js +1 -0
- package/console-app/assets/vennDiagram-L72KCM5P-BmeFWb5N.js +34 -0
- package/console-app/assets/wardley-OPB4EBWU-BpIbeh58.js +1 -0
- package/console-app/assets/wardleyDiagram-EHGQE667-CxL7Mv7y.js +78 -0
- package/console-app/assets/xychartDiagram-FW5EYKEG-DkV75xT2.js +7 -0
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/auth.types.d.ts +1 -1
- package/dist/.pikku/auth/auth.types.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +11 -2
- package/dist/.pikku/cli/pikku-cli-channel.js +23 -8
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +36 -9
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +7 -8
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +18 -2
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +24 -9
- package/dist/.pikku/function/pikku-function-types.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +48 -39
- package/dist/.pikku/function/pikku-functions.gen.js +3 -3
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +2 -1
- package/dist/.pikku/pikku-services.gen.js +1 -0
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +2 -2
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +2 -2
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +2 -2
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +2 -2
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +3 -3
- package/dist/.pikku/schemas/schemas/DbResetInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/{DbSeedInput.schema.json → PikkuVirtualUserFunctionsOutput.schema.json} +1 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +20 -14
- package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +29 -13
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +8 -7
- package/dist/src/deploy/analyzer/analyzer.js +0 -6
- package/dist/src/deploy/codegen/per-unit-codegen.js +0 -3
- package/dist/src/deploy/server-entry.js +1 -1
- package/dist/src/fabric/fabric-commands.d.ts +26 -26
- package/dist/src/fabric/functions/add.function.d.ts +1 -1
- package/dist/src/fabric/functions/addon-verify.function.d.ts +1 -1
- package/dist/src/fabric/functions/db-schema.function.d.ts +1 -1
- package/dist/src/fabric/functions/deploy-list.function.d.ts +1 -1
- package/dist/src/fabric/functions/deploy-units.function.d.ts +1 -1
- package/dist/src/fabric/functions/deploy.function.d.ts +2 -2
- package/dist/src/fabric/functions/domains-add.function.d.ts +1 -1
- package/dist/src/fabric/functions/domains-list.function.d.ts +1 -1
- package/dist/src/fabric/functions/domains-remove.function.d.ts +1 -1
- package/dist/src/fabric/functions/errors.function.d.ts +1 -1
- package/dist/src/fabric/functions/init.function.d.ts +1 -1
- package/dist/src/fabric/functions/link.function.d.ts +1 -1
- package/dist/src/fabric/functions/llm-key.function.d.ts +1 -1
- package/dist/src/fabric/functions/login.function.d.ts +1 -1
- package/dist/src/fabric/functions/logs.function.d.ts +1 -1
- package/dist/src/fabric/functions/metrics.function.d.ts +1 -1
- package/dist/src/fabric/functions/publish.function.d.ts +1 -1
- package/dist/src/fabric/functions/rollback.function.d.ts +1 -1
- package/dist/src/fabric/functions/secrets-list.function.d.ts +1 -1
- package/dist/src/fabric/functions/secrets-rotate.function.d.ts +1 -1
- package/dist/src/fabric/functions/secrets-set.function.d.ts +1 -1
- package/dist/src/fabric/functions/smoke.function.d.ts +1 -1
- package/dist/src/fabric/functions/status.function.d.ts +1 -1
- package/dist/src/fabric/functions/trace.function.d.ts +1 -1
- package/dist/src/fabric/functions/validate.function.d.ts +1 -1
- package/dist/src/fabric/functions/validate.function.js +76 -176
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/audit.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-audit.js +1 -1
- package/dist/src/functions/commands/db-baseline.d.ts +1 -1
- package/dist/src/functions/commands/db-baseline.js +1 -1
- package/dist/src/functions/commands/db-check.d.ts +1 -1
- package/dist/src/functions/commands/db-check.js +6 -5
- package/dist/src/functions/commands/db-codegen.d.ts +1 -1
- package/dist/src/functions/commands/db-codegen.js +1 -1
- package/dist/src/functions/commands/db-export.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.js +1 -1
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-migrate.js +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +15 -1
- package/dist/src/functions/commands/db-reset.js +18 -6
- package/dist/src/functions/commands/db-shared.d.ts +14 -0
- package/dist/src/functions/commands/deploy-apply.d.ts +1 -1
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +1 -1
- package/dist/src/functions/commands/dev.d.ts +1 -1
- package/dist/src/functions/commands/dev.js +2 -2
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/enable.d.ts +8 -8
- package/dist/src/functions/commands/import-n8n.d.ts +1 -1
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/knowledge-index.d.ts +1 -1
- package/dist/src/functions/commands/knowledge-validate.d.ts +1 -1
- package/dist/src/functions/commands/login.d.ts +3 -3
- package/dist/src/functions/commands/meta.d.ts +19 -19
- package/dist/src/functions/commands/new-addon.d.ts +1 -1
- package/dist/src/functions/commands/new-addon.js +2 -2
- package/dist/src/functions/commands/new-function.d.ts +1 -1
- package/dist/src/functions/commands/new-middleware.d.ts +1 -1
- package/dist/src/functions/commands/new-permission.d.ts +1 -1
- package/dist/src/functions/commands/new-wiring.d.ts +1 -1
- package/dist/src/functions/commands/persona-sync.d.ts +2 -2
- package/dist/src/functions/commands/persona-sync.js +1 -1
- package/dist/src/functions/commands/persona.d.ts +2 -2
- package/dist/src/functions/commands/persona.js +16 -18
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/roles-audit.d.ts +1 -1
- package/dist/src/functions/commands/roles-prune.d.ts +1 -1
- package/dist/src/functions/commands/scenario-ladder.js +1 -1
- package/dist/src/functions/commands/scenario.d.ts +2 -2
- package/dist/src/functions/commands/scenario.js +40 -11
- package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
- package/dist/src/functions/commands/scopes-prune.d.ts +1 -1
- package/dist/src/functions/commands/scopes-shared.d.ts +4 -0
- package/dist/src/functions/commands/scopes-shared.js +1 -1
- package/dist/src/functions/commands/serve.d.ts +1 -1
- package/dist/src/functions/commands/serve.js +2 -2
- package/dist/src/functions/commands/skills.d.ts +2 -2
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-check.js +3 -3
- package/dist/src/functions/commands/versions-init.d.ts +1 -1
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +1 -1
- package/dist/src/functions/commands/workspace-validate.d.ts +1 -1
- package/dist/src/functions/db/annotation-parser.d.ts +14 -0
- package/dist/src/functions/db/annotation-parser.js +50 -2
- package/dist/src/functions/db/better-auth-schema.js +2 -1
- package/dist/src/functions/db/db-codegen.d.ts +12 -0
- package/dist/src/functions/db/db-codegen.js +149 -16
- package/dist/src/functions/db/local-db.d.ts +87 -6
- package/dist/src/functions/db/local-db.js +202 -35
- package/dist/src/functions/db/sqlite/dev-seed.d.ts +12 -0
- package/dist/src/functions/db/sqlite/dev-seed.js +23 -0
- package/dist/src/functions/db/sqlite/sqlite-runtime-bun.js +1 -1
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/validate/bootstrap-checks.d.ts +19 -0
- package/dist/src/functions/validate/bootstrap-checks.js +90 -0
- package/dist/src/functions/validate/persona-checks.d.ts +24 -0
- package/dist/src/functions/validate/persona-checks.js +136 -0
- package/dist/src/functions/validate/scenario-file-checks.d.ts +17 -0
- package/dist/src/functions/validate/scenario-file-checks.js +123 -0
- package/dist/src/functions/validate/shared-checks.d.ts +59 -0
- package/dist/src/functions/validate/shared-checks.js +311 -0
- package/dist/src/functions/validate/workspace-validate.d.ts +1 -2
- package/dist/src/functions/validate/workspace-validate.js +4 -196
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +1 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +16 -1
- package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +3 -1
- package/dist/src/functions/wirings/auth/serialize-auth-types.js +3 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.js +10 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +9 -4
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +32 -10
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +4 -4
- package/dist/src/functions/wirings/cli/serialize-cli-entrypoint-guard.d.ts +12 -0
- package/dist/src/functions/wirings/cli/serialize-cli-entrypoint-guard.js +28 -0
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +4 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +37 -9
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/serialize-package.js +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/personas/personas-secrets-file.d.ts +8 -0
- package/dist/src/functions/wirings/personas/personas-secrets-file.js +9 -0
- package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +1 -1
- package/dist/src/functions/wirings/personas/pikku-command-personas.js +14 -0
- package/dist/src/functions/wirings/personas/serialize-personas-secrets.d.ts +16 -0
- package/dist/src/functions/wirings/personas/serialize-personas-secrets.js +34 -0
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +2 -1
- package/dist/src/functions/wirings/queue/serialize-queue-wrapper.js +2 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +1 -1
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +2 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -0
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +42 -0
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +28 -0
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +439 -0
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.js +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +15 -32
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +36 -23
- package/dist/src/functions/workflows/all.workflow.js +49 -16
- package/dist/src/server/bun-server-runner.d.ts +2 -2
- package/dist/src/server/bun-server-runner.js +5 -1
- package/dist/src/services/cli-logger.service.d.ts +28 -16
- package/dist/src/services/cli-logger.service.js +25 -16
- package/dist/src/services.d.ts +1 -1
- package/dist/src/services.js +8 -0
- package/dist/src/utils/file-import-path.js +9 -0
- package/dist/src/utils/pikku-cli-config.js +7 -0
- package/dist/src/utils/resolve-personas.d.ts +4 -9
- package/dist/src/utils/resolve-personas.js +4 -15
- package/dist/src/utils/serialize-meta-ts.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/dist/.pikku/schemas/schemas/BootstrapInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +0 -1
- package/dist/src/functions/commands/db-seed.d.ts +0 -1
- package/dist/src/functions/commands/db-seed.js +0 -24
- package/dist/src/functions/db/sqlite/seed.d.ts +0 -11
- package/dist/src/functions/db/sqlite/seed.js +0 -22
|
@@ -9,6 +9,6 @@ export declare const scopesPrune: import("#pikku").PikkuFunctionConfig<{
|
|
|
9
9
|
yes?: boolean;
|
|
10
10
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
11
11
|
yes?: boolean;
|
|
12
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
12
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
13
13
|
yes?: boolean;
|
|
14
14
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -33,6 +33,10 @@ export declare const openScopeService: ({ config, logger, }: {
|
|
|
33
33
|
outDir: string;
|
|
34
34
|
runtimeDir?: string;
|
|
35
35
|
srcDirectories: string[];
|
|
36
|
+
db?: {
|
|
37
|
+
schema?: string;
|
|
38
|
+
defaultSchema?: string;
|
|
39
|
+
};
|
|
36
40
|
};
|
|
37
41
|
logger: Logger;
|
|
38
42
|
}, declared: FlatScope[], command: string) => Promise<OpenedScopeService | null>;
|
|
@@ -52,7 +52,7 @@ export const openScopeService = async ({ config, logger, }, declared, command) =
|
|
|
52
52
|
if (!userConfig) {
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
-
const resolved = resolveDb(userConfig, config.rootDir, config.outDir, config.runtimeDir);
|
|
55
|
+
const resolved = resolveDb(userConfig, config.rootDir, config.outDir, config.runtimeDir, config.db);
|
|
56
56
|
if (!resolved) {
|
|
57
57
|
logger.error(`${command}: no database configured — set sqliteDb or postgresUrl in your createConfig.`);
|
|
58
58
|
throw new Error('no database configured');
|
|
@@ -4,7 +4,7 @@ export declare const serve: import("#pikku").PikkuFunctionConfig<{
|
|
|
4
4
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
port?: string;
|
|
6
6
|
console?: boolean;
|
|
7
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
8
8
|
port?: string;
|
|
9
9
|
console?: boolean;
|
|
10
10
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -3,7 +3,7 @@ import { pikkuSessionlessFunc } from '#pikku';
|
|
|
3
3
|
import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, InMemoryAIRunStateService, QueueWebhookService, } from '@pikku/core/services';
|
|
4
4
|
import { KyselyAIStorageService, KyselyAIRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
|
|
5
5
|
import { stopSingletonServices } from '@pikku/core';
|
|
6
|
-
import { pikkuState } from '@pikku/core/
|
|
6
|
+
import { pikkuState } from '@pikku/core/ecosystem';
|
|
7
7
|
import { LocalMetaService } from '@pikku/core/services/local-meta';
|
|
8
8
|
import { LocalContent, } from '@pikku/core/services/local-content';
|
|
9
9
|
import { InMemorySchedulerService } from '@pikku/schedule';
|
|
@@ -38,7 +38,7 @@ export const serve = pikkuSessionlessFunc({
|
|
|
38
38
|
const effectiveDbConfig = envDatabaseUrl
|
|
39
39
|
? parseDatabaseUrl(envDatabaseUrl)
|
|
40
40
|
: userConfig;
|
|
41
|
-
const resolvedDb = resolveDb(effectiveDbConfig, config.rootDir, config.outDir, config.runtimeDir);
|
|
41
|
+
const resolvedDb = resolveDb(effectiveDbConfig, config.rootDir, config.outDir, config.runtimeDir, config.db);
|
|
42
42
|
const resolvedLocalDb = resolvedDb ?? undefined;
|
|
43
43
|
const kysely = resolvedLocalDb
|
|
44
44
|
? await createKysely(resolvedLocalDb)
|
|
@@ -2,7 +2,7 @@ export declare const pikkuSkillsList: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
target?: string;
|
|
3
3
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
target?: string;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
6
6
|
target?: string;
|
|
7
7
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
8
8
|
export declare const pikkuSkillsInstall: import("#pikku").PikkuFunctionConfig<{
|
|
@@ -17,7 +17,7 @@ export declare const pikkuSkillsInstall: import("#pikku").PikkuFunctionConfig<{
|
|
|
17
17
|
core?: boolean;
|
|
18
18
|
fabric?: boolean;
|
|
19
19
|
update?: boolean;
|
|
20
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
20
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
21
21
|
agent?: string;
|
|
22
22
|
only?: string;
|
|
23
23
|
core?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuVersionsCheck: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuVersionsCheck: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -30,7 +30,7 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
30
30
|
if (error.nextVersion !== undefined) {
|
|
31
31
|
logger.info(` Set \`version: ${error.nextVersion}\` on the function, then run:`);
|
|
32
32
|
}
|
|
33
|
-
logger.info(` npx pikku versions
|
|
33
|
+
logger.info(` npx pikku versions update`);
|
|
34
34
|
}
|
|
35
35
|
else if (error.code === ErrorCode.FUNCTION_VERSION_MODIFIED &&
|
|
36
36
|
error.functionKey) {
|
|
@@ -54,7 +54,7 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
54
54
|
logger.info(``);
|
|
55
55
|
logger.info(` This usually means a merge conflict in versions.pikku.json.`);
|
|
56
56
|
logger.info(` Resolve the conflict, then run:`);
|
|
57
|
-
logger.info(` npx pikku versions
|
|
57
|
+
logger.info(` npx pikku versions update`);
|
|
58
58
|
}
|
|
59
59
|
else if (error.code === ErrorCode.VERSION_GAP_NOT_ALLOWED &&
|
|
60
60
|
error.functionKey) {
|
|
@@ -85,7 +85,7 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
85
85
|
}
|
|
86
86
|
logger.info(``);
|
|
87
87
|
logger.info(` The manifest is corrupted. Run:`);
|
|
88
|
-
logger.info(` npx pikku versions
|
|
88
|
+
logger.info(` npx pikku versions update`);
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
logger.info(`[${error.code}] ${error.message}`);
|
|
@@ -2,6 +2,6 @@ export declare const pikkuVersionsInit: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
force?: boolean;
|
|
3
3
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
force?: boolean;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
6
6
|
force?: boolean;
|
|
7
7
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuVersionsUpdate: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuVersionsUpdate: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -2,6 +2,6 @@ export declare const watch: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
hmr?: boolean;
|
|
3
3
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
hmr?: boolean;
|
|
5
|
-
}, void, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
6
6
|
hmr?: boolean;
|
|
7
7
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -19,7 +19,7 @@ export declare const workspaceValidate: import("#pikku").PikkuFunctionConfig<Rec
|
|
|
19
19
|
path: string;
|
|
20
20
|
fixHint: string;
|
|
21
21
|
}[];
|
|
22
|
-
}, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<Record<string, never>, {
|
|
22
|
+
}, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<Record<string, never>, {
|
|
23
23
|
ok: boolean;
|
|
24
24
|
root: string;
|
|
25
25
|
findings: {
|
|
@@ -2,6 +2,8 @@ import type { ColumnKind } from './coercion-plugin.js';
|
|
|
2
2
|
import { type ZodFormat } from './zod-codegen.js';
|
|
3
3
|
type Classification = 'public' | 'private' | 'pii' | 'secret';
|
|
4
4
|
type AnonymizeStrategy = 'fake:email' | 'fake:name' | 'hash' | 'keep' | null;
|
|
5
|
+
type ColumnForm = 'plain' | 'hashed' | 'wrapped' | 'sealed';
|
|
6
|
+
export declare const COLUMN_FORMS: readonly ["plain", "hashed", "wrapped", "sealed"];
|
|
5
7
|
export interface ColAnnotation {
|
|
6
8
|
/** Column kind override: `date`, `bool`, `json`, or `uuid`. */
|
|
7
9
|
kind?: ColumnKind;
|
|
@@ -15,6 +17,11 @@ export interface ColAnnotation {
|
|
|
15
17
|
format?: ZodFormat;
|
|
16
18
|
classification?: Classification;
|
|
17
19
|
anonymize?: AnonymizeStrategy;
|
|
20
|
+
/**
|
|
21
|
+
* At-rest representation, independent of `classification`. Drives the
|
|
22
|
+
* insert/update brand on the generated column type. Absent means `plain`.
|
|
23
|
+
*/
|
|
24
|
+
form?: ColumnForm;
|
|
18
25
|
}
|
|
19
26
|
/** Per-table, per-column annotation map sourced from `db/annotations.ts`. */
|
|
20
27
|
export type AnnotationMap = Record<string, Record<string, ColAnnotation>>;
|
|
@@ -37,6 +44,13 @@ export declare function nameSuggestsKind(colName: string): ColumnKind | null;
|
|
|
37
44
|
* where `security` is the privacy level and `classification` is the anonymize
|
|
38
45
|
* strategy. Returns `{}` if the sidecar doesn't exist yet (first migrate run,
|
|
39
46
|
* before it has been generated).
|
|
47
|
+
*
|
|
48
|
+
* `DbClassificationMap` nests under the schema name whenever the project has
|
|
49
|
+
* one (`{ app: { user: { email: … } } }`), so the sidecar is flattened back to
|
|
50
|
+
* bare table names here — the codegen looks columns up by `bareTableName`.
|
|
51
|
+
* Reading a schema-qualified map as though it were flat silently yields an
|
|
52
|
+
* annotation for every column of every table, which is how a project could
|
|
53
|
+
* classify a column `secret` and still generate it as `private`.
|
|
40
54
|
*/
|
|
41
55
|
export declare function loadAnnotations(rootDir: string): AnnotationMap;
|
|
42
56
|
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { readFileSync, existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { ZOD_FORMATS } from './zod-codegen.js';
|
|
4
|
+
export const COLUMN_FORMS = [
|
|
5
|
+
'plain',
|
|
6
|
+
'hashed',
|
|
7
|
+
'wrapped',
|
|
8
|
+
'sealed',
|
|
9
|
+
];
|
|
4
10
|
/**
|
|
5
11
|
* Warn-only naming heuristic. We no longer *infer* a column's kind from its
|
|
6
12
|
* name (it produced wrong types — e.g. SQLite stores `*_at` as ISO TEXT, not a
|
|
@@ -23,6 +29,17 @@ function parseStrategy(s) {
|
|
|
23
29
|
? s
|
|
24
30
|
: null;
|
|
25
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* A column entry's own values are all primitives; a table's are objects. That
|
|
34
|
+
* is the only structural difference between the two levels, and it is what
|
|
35
|
+
* tells a schema-qualified map (`{ app: { user: { … } } }`) from a bare one
|
|
36
|
+
* (`{ user: { … } }`) without having to be told which shape was authored.
|
|
37
|
+
*/
|
|
38
|
+
function isColumnEntry(value) {
|
|
39
|
+
if (typeof value !== 'object' || value === null)
|
|
40
|
+
return false;
|
|
41
|
+
return Object.values(value).every((v) => typeof v !== 'object' || v === null);
|
|
42
|
+
}
|
|
26
43
|
/**
|
|
27
44
|
* Load annotations from the `db/annotations.gen.json` sidecar, which is
|
|
28
45
|
* compiled from the developer-authored `db/annotations.ts` (`DbClassificationMap`)
|
|
@@ -34,6 +51,13 @@ function parseStrategy(s) {
|
|
|
34
51
|
* where `security` is the privacy level and `classification` is the anonymize
|
|
35
52
|
* strategy. Returns `{}` if the sidecar doesn't exist yet (first migrate run,
|
|
36
53
|
* before it has been generated).
|
|
54
|
+
*
|
|
55
|
+
* `DbClassificationMap` nests under the schema name whenever the project has
|
|
56
|
+
* one (`{ app: { user: { email: … } } }`), so the sidecar is flattened back to
|
|
57
|
+
* bare table names here — the codegen looks columns up by `bareTableName`.
|
|
58
|
+
* Reading a schema-qualified map as though it were flat silently yields an
|
|
59
|
+
* annotation for every column of every table, which is how a project could
|
|
60
|
+
* classify a column `secret` and still generate it as `private`.
|
|
37
61
|
*/
|
|
38
62
|
export function loadAnnotations(rootDir) {
|
|
39
63
|
const jsonPath = join(rootDir, 'db', 'annotations.gen.json');
|
|
@@ -41,8 +65,24 @@ export function loadAnnotations(rootDir) {
|
|
|
41
65
|
return {};
|
|
42
66
|
try {
|
|
43
67
|
const raw = JSON.parse(readFileSync(jsonPath, 'utf8'));
|
|
68
|
+
const tables = [];
|
|
69
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
70
|
+
if (!value || typeof value !== 'object')
|
|
71
|
+
continue;
|
|
72
|
+
const isTable = Object.values(value).every((v) => v === null || isColumnEntry(v));
|
|
73
|
+
if (isTable) {
|
|
74
|
+
tables.push([key, value]);
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
// `key` is a schema; its values are the tables.
|
|
78
|
+
for (const [table, cols] of Object.entries(value)) {
|
|
79
|
+
if (cols && typeof cols === 'object') {
|
|
80
|
+
tables.push([table, cols]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
44
84
|
const result = {};
|
|
45
|
-
for (const [table, cols] of
|
|
85
|
+
for (const [table, cols] of tables) {
|
|
46
86
|
result[table] = {};
|
|
47
87
|
for (const [col, ann] of Object.entries(cols)) {
|
|
48
88
|
if (!ann)
|
|
@@ -57,7 +97,9 @@ export function loadAnnotations(rootDir) {
|
|
|
57
97
|
entry.tsType = ann.tsType;
|
|
58
98
|
if (ann.format && ann.format in ZOD_FORMATS)
|
|
59
99
|
entry.format = ann.format;
|
|
60
|
-
// `security` is the privacy level. `encrypted`
|
|
100
|
+
// `security` is the privacy level. The legacy `encrypted` value
|
|
101
|
+
// predates `form` and conflated the two axes; it still parses, as the
|
|
102
|
+
// pair it always meant.
|
|
61
103
|
switch (ann.security) {
|
|
62
104
|
case 'public':
|
|
63
105
|
case 'private':
|
|
@@ -67,8 +109,14 @@ export function loadAnnotations(rootDir) {
|
|
|
67
109
|
break;
|
|
68
110
|
case 'encrypted':
|
|
69
111
|
entry.classification = 'secret';
|
|
112
|
+
entry.form = 'wrapped';
|
|
70
113
|
break;
|
|
71
114
|
}
|
|
115
|
+
// An explicit `form` wins over the one implied by legacy `encrypted`.
|
|
116
|
+
if (ann.form &&
|
|
117
|
+
COLUMN_FORMS.includes(ann.form)) {
|
|
118
|
+
entry.form = ann.form;
|
|
119
|
+
}
|
|
72
120
|
const strategy = parseStrategy(ann.classification);
|
|
73
121
|
if (strategy !== null)
|
|
74
122
|
entry.anonymize = strategy;
|
|
@@ -3,6 +3,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
3
3
|
import { readdirSync, statSync, readFileSync, existsSync } from 'node:fs';
|
|
4
4
|
import { join, extname, dirname } from 'node:path';
|
|
5
5
|
import { PIKKU_BETTER_AUTH } from '@pikku/better-auth';
|
|
6
|
+
import { createSecretValue } from '@pikku/core';
|
|
6
7
|
import { LocalVariablesService } from '@pikku/core/services';
|
|
7
8
|
import { loadUserModule } from '../commands/load-user-project.js';
|
|
8
9
|
let cachedGetMigrations = null;
|
|
@@ -95,7 +96,7 @@ async function loadAuthFactory(sourceFile) {
|
|
|
95
96
|
function fakeSecretService() {
|
|
96
97
|
const placeholder = 'schema-introspection-only';
|
|
97
98
|
return {
|
|
98
|
-
getSecret: async () => placeholder,
|
|
99
|
+
getSecret: async () => createSecretValue(placeholder),
|
|
99
100
|
hasSecret: async () => true,
|
|
100
101
|
setSecret: async () => { },
|
|
101
102
|
};
|
|
@@ -16,6 +16,18 @@ export interface CodegenOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
enumsFile?: string;
|
|
18
18
|
camelCase?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Schema whose qualifier is dropped from the `DB` keys and the interface
|
|
21
|
+
* names, so `app.user` reads as `user`/`User` rather than `app.user`/
|
|
22
|
+
* `AppUser`. Tables in any other schema stay fully qualified. Omitting it
|
|
23
|
+
* qualifies everything, which is the safe default for a project spanning
|
|
24
|
+
* schemas.
|
|
25
|
+
*
|
|
26
|
+
* The key IS what Kysely puts in the SQL, so only set this for a schema the
|
|
27
|
+
* connection's `search_path` resolves — otherwise every query compiles and
|
|
28
|
+
* then fails to find the table at runtime.
|
|
29
|
+
*/
|
|
30
|
+
defaultSchema?: string;
|
|
19
31
|
rootDir?: string;
|
|
20
32
|
/** DB dialect — drives real-type-aware date typing. Defaults to 'sqlite'. */
|
|
21
33
|
dialect?: Dialect;
|
|
@@ -33,6 +33,16 @@ function snakeToPascal(name) {
|
|
|
33
33
|
.map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase())
|
|
34
34
|
.join('');
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Drop `defaultSchema`'s qualifier from a table name, leaving every other
|
|
38
|
+
* schema qualified. `app.user` → `user` when the default schema is `app`.
|
|
39
|
+
*/
|
|
40
|
+
function stripDefaultSchema(name, defaultSchema) {
|
|
41
|
+
if (!defaultSchema)
|
|
42
|
+
return name;
|
|
43
|
+
const prefix = `${defaultSchema}.`;
|
|
44
|
+
return name.startsWith(prefix) ? name.slice(prefix.length) : name;
|
|
45
|
+
}
|
|
36
46
|
function tableToInterfaceName(name) {
|
|
37
47
|
return name
|
|
38
48
|
.split('.')
|
|
@@ -105,10 +115,54 @@ function insertBase(annotation, col) {
|
|
|
105
115
|
return 'unknown';
|
|
106
116
|
return mapType(col.type);
|
|
107
117
|
}
|
|
108
|
-
|
|
118
|
+
/**
|
|
119
|
+
* The brand a `form` puts on a column's INSERT and UPDATE types.
|
|
120
|
+
*
|
|
121
|
+
* `plain` maps to null rather than to an identity wrapper: an unbranded column
|
|
122
|
+
* is the default every existing project already has, and emitting a wrapper for
|
|
123
|
+
* it would churn every generated file to say nothing.
|
|
124
|
+
*/
|
|
125
|
+
/** The erasable sensitivity brand on a column's SELECT type. */
|
|
126
|
+
function classificationBrand(classification) {
|
|
127
|
+
return classification === 'secret'
|
|
128
|
+
? 'Secret'
|
|
129
|
+
: classification === 'pii'
|
|
130
|
+
? 'Pii'
|
|
131
|
+
: 'Private';
|
|
132
|
+
}
|
|
133
|
+
function formBrand(form) {
|
|
134
|
+
switch (form) {
|
|
135
|
+
case 'wrapped':
|
|
136
|
+
return 'WrappedValue';
|
|
137
|
+
case 'sealed':
|
|
138
|
+
return 'SealedValue';
|
|
139
|
+
case 'hashed':
|
|
140
|
+
return 'HashedValue';
|
|
141
|
+
default:
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function columnTypeExpression(col, annotation, classification, form) {
|
|
109
146
|
const nullable = !col.notNull && !col.pk;
|
|
110
147
|
const isAutoInt = col.pk && mapType(col.type) === 'number';
|
|
111
148
|
const isOptionalInsert = col.defaultValue !== null || isAutoInt || Boolean(col.generated);
|
|
149
|
+
// A declared `form` supersedes both branches below, because it constrains the
|
|
150
|
+
// side neither of them touches: what may be WRITTEN. The caller only reaches
|
|
151
|
+
// here with a form once it has confirmed the column resolves to `string`.
|
|
152
|
+
const brand = formBrand(form);
|
|
153
|
+
if (brand) {
|
|
154
|
+
// The two brands compose — `Secret<WrappedValue>` is still structurally
|
|
155
|
+
// `{ __classification__?: 'secret' }`, so the inspector's PKU910 output
|
|
156
|
+
// check keeps working, while a row read back is already a `WrappedValue`
|
|
157
|
+
// and flows into rewrap/re-seal calls without a cast.
|
|
158
|
+
const selectT = classification === 'public'
|
|
159
|
+
? brand
|
|
160
|
+
: `${classificationBrand(classification)}<${brand}>`;
|
|
161
|
+
const insertT = `${brand}${isOptionalInsert ? ' | undefined' : ''}`;
|
|
162
|
+
return nullable
|
|
163
|
+
? `ColumnType<${selectT} | null, ${insertT} | null, ${brand} | null>`
|
|
164
|
+
: `ColumnType<${selectT}, ${insertT}, ${brand}>`;
|
|
165
|
+
}
|
|
112
166
|
if (classification === 'public') {
|
|
113
167
|
const wrap = (inner) => isOptionalInsert ? `Generated<${inner}>` : inner;
|
|
114
168
|
if (annotation?.kind === 'bool') {
|
|
@@ -139,11 +193,7 @@ function columnTypeExpression(col, annotation, classification) {
|
|
|
139
193
|
return `Generated<${base}${nullable ? ' | null' : ''}>`;
|
|
140
194
|
return nullable ? `${base} | null` : base;
|
|
141
195
|
}
|
|
142
|
-
const B = classification
|
|
143
|
-
? 'Secret'
|
|
144
|
-
: classification === 'pii'
|
|
145
|
-
? 'Pii'
|
|
146
|
-
: 'Private';
|
|
196
|
+
const B = classificationBrand(classification);
|
|
147
197
|
const sBase = selectBase(annotation, col);
|
|
148
198
|
const iBase = insertBase(annotation, col);
|
|
149
199
|
const selectT = nullable ? `${B}<${sBase}> | null` : `${B}<${sBase}>`;
|
|
@@ -159,7 +209,7 @@ function bareTableName(name) {
|
|
|
159
209
|
return dot >= 0 ? name.slice(dot + 1) : name;
|
|
160
210
|
}
|
|
161
211
|
function emitInterface(table, camelCase, explicitAnnotations, dialect, enumByName, formatHints, warnings) {
|
|
162
|
-
const ifaceName = tableToInterfaceName(table.name);
|
|
212
|
+
const ifaceName = tableToInterfaceName(table.displayName ?? table.name);
|
|
163
213
|
const bare = bareTableName(table.name);
|
|
164
214
|
const tableCols = explicitAnnotations[bare] ?? {};
|
|
165
215
|
const fields = table.columns
|
|
@@ -243,7 +293,44 @@ function emitInterface(table, camelCase, explicitAnnotations, dialect, enumByNam
|
|
|
243
293
|
}
|
|
244
294
|
}
|
|
245
295
|
const classification = ann?.classification ?? 'private';
|
|
246
|
-
|
|
296
|
+
// A form brands the column with a nominal string subtype, so it only
|
|
297
|
+
// means anything where the resolved type IS a string. On a bytea/blob or
|
|
298
|
+
// a coerced column the brand would not compile, so skip it and say why —
|
|
299
|
+
// a secret that needs wrapping in a non-text column needs the column
|
|
300
|
+
// migrated to text first, which is a schema decision, not a codegen one.
|
|
301
|
+
let form = ann?.form;
|
|
302
|
+
if (form && form !== 'plain') {
|
|
303
|
+
const base = selectBase(typeAnn, col);
|
|
304
|
+
if (base !== 'string') {
|
|
305
|
+
warnings.push({
|
|
306
|
+
severity: 'warn',
|
|
307
|
+
code: ErrorCode.DB_FORM_ON_NON_STRING,
|
|
308
|
+
message: `Column "${bare}.${col.name}": form '${form}' ignored — its resolved ` +
|
|
309
|
+
`type is ${base}, not string. Ciphertext and digests are text; ` +
|
|
310
|
+
`migrate the column or drop the form.`,
|
|
311
|
+
});
|
|
312
|
+
form = undefined;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// The point of the axis: a credential the application can replay is one
|
|
316
|
+
// that a database read alone hands to whoever has it. Warn rather than
|
|
317
|
+
// fail, because every project predating `form` has such columns and a
|
|
318
|
+
// hard error would break them all on the next migrate — `pikku db
|
|
319
|
+
// --fail-on-warn` is how a project opts into the ratchet.
|
|
320
|
+
// Checks what was DECLARED, not what survived the string test above, so a
|
|
321
|
+
// form rejected for a non-text column reports that one reason rather than
|
|
322
|
+
// two, and an explicit `form: 'plain'` is the acknowledgement that ends it.
|
|
323
|
+
if (classification === 'secret' && ann?.form === undefined) {
|
|
324
|
+
warnings.push({
|
|
325
|
+
severity: 'warn',
|
|
326
|
+
code: ErrorCode.DB_SECRET_COLUMN_STORED_PLAIN,
|
|
327
|
+
message: `Column "${bare}.${col.name}" is classified secret but stored in the clear. ` +
|
|
328
|
+
`Declare how it is held in db/annotations.ts — form: 'hashed' | 'wrapped' | ` +
|
|
329
|
+
`'sealed' — or form: 'plain' to state that reading the row is meant to ` +
|
|
330
|
+
`yield a usable credential.`,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
const type = columnTypeExpression(col, typeAnn, classification, form);
|
|
247
334
|
const safeName = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(fieldName)
|
|
248
335
|
? fieldName
|
|
249
336
|
: JSON.stringify(fieldName);
|
|
@@ -263,8 +350,12 @@ function emitManifest(tables, explicitAnnotations) {
|
|
|
263
350
|
const classification = ann?.classification ?? 'private';
|
|
264
351
|
const strategy = ann?.anonymize ?? null;
|
|
265
352
|
const strategyLiteral = strategy === null ? 'null' : `'${strategy}'`;
|
|
353
|
+
// Emitted only when declared. An audit reading this manifest needs to
|
|
354
|
+
// tell "held in the clear, stated" from "nobody has said yet", and a
|
|
355
|
+
// defaulted 'plain' would erase exactly that difference.
|
|
356
|
+
const formLiteral = ann?.form ? `, form: '${ann.form}'` : '';
|
|
266
357
|
return (` ${JSON.stringify(col.name)}: ` +
|
|
267
|
-
`{ classification: '${classification}', anonymize_strategy: ${strategyLiteral} }`);
|
|
358
|
+
`{ classification: '${classification}', anonymize_strategy: ${strategyLiteral}${formLiteral} }`);
|
|
268
359
|
})
|
|
269
360
|
.join(',\n');
|
|
270
361
|
return ` ${JSON.stringify(table.name)}: {\n${colEntries}\n }`;
|
|
@@ -292,8 +383,14 @@ function emitManifest(tables, explicitAnnotations) {
|
|
|
292
383
|
*/
|
|
293
384
|
function emitClassificationMap(tables) {
|
|
294
385
|
const colEntry = [
|
|
295
|
-
` /** Privacy level
|
|
386
|
+
` /** Privacy level — can the value leave the process? Defaults to 'private'.`,
|
|
387
|
+
` * 'encrypted' is the legacy spelling of \`security: 'secret', form: 'wrapped'\`. */`,
|
|
296
388
|
` security?: 'public' | 'private' | 'pii' | 'secret' | 'encrypted'`,
|
|
389
|
+
` /** How the value is held at rest, independent of \`security\`. A form other`,
|
|
390
|
+
` * than 'plain' makes the column's INSERT/UPDATE type nominal, so only a`,
|
|
391
|
+
` * real encrypt/seal/hash result can be written to it. Defaults to 'plain',`,
|
|
392
|
+
` * which on a \`secret\` column is warned about (PKU483) until stated here. */`,
|
|
393
|
+
` form?: 'plain' | 'hashed' | 'wrapped' | 'sealed'`,
|
|
297
394
|
` /** Anonymize strategy used by \`pikku db anonymize\`. */`,
|
|
298
395
|
` classification?: 'fake:email' | 'fake:name' | 'hash' | 'keep'`,
|
|
299
396
|
` /** Column kind override for codegen coercion + typing. */`,
|
|
@@ -419,24 +516,57 @@ export async function generateSchemaTypes(introspector, options) {
|
|
|
419
516
|
}
|
|
420
517
|
// ── schema.gen.ts ────────────────────────────────────────────────────────────
|
|
421
518
|
const warnings = [];
|
|
519
|
+
// The name each table is known by in the generated types. With a
|
|
520
|
+
// `defaultSchema` that is the unqualified name — unless dropping the
|
|
521
|
+
// qualifier would make two tables share one name, in which case the table
|
|
522
|
+
// keeps its qualifier rather than silently shadowing the other.
|
|
523
|
+
const displayNames = new Map();
|
|
524
|
+
const claimedBy = new Map();
|
|
525
|
+
for (const t of tables) {
|
|
526
|
+
const stripped = stripDefaultSchema(t.name, options.defaultSchema);
|
|
527
|
+
const owner = claimedBy.get(stripped);
|
|
528
|
+
if (owner !== undefined && owner !== t.name) {
|
|
529
|
+
warnings.push({
|
|
530
|
+
severity: 'warn',
|
|
531
|
+
code: ErrorCode.DB_DEFAULT_SCHEMA_NAME_COLLISION,
|
|
532
|
+
message: `Dropping the "${options.defaultSchema}" qualifier would make "${t.name}" and ` +
|
|
533
|
+
`"${owner}" both "${stripped}". "${t.name}" keeps its qualifier.`,
|
|
534
|
+
});
|
|
535
|
+
displayNames.set(t.name, t.name);
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
claimedBy.set(stripped, t.name);
|
|
539
|
+
displayNames.set(t.name, stripped);
|
|
540
|
+
}
|
|
541
|
+
const displayName = (name) => displayNames.get(name) ?? name;
|
|
422
542
|
const zodFormats = {};
|
|
423
543
|
const interfaces = tables
|
|
424
|
-
.map((t) => emitInterface(t, camelCase, explicitAnnotations, dialect, enumByName, zodFormats, warnings))
|
|
544
|
+
.map((t) => emitInterface({ ...t, displayName: displayName(t.name) }, camelCase, explicitAnnotations, dialect, enumByName, zodFormats, warnings))
|
|
425
545
|
.join('\n\n');
|
|
426
546
|
const dbEntries = tables
|
|
427
547
|
.map((t) => {
|
|
428
|
-
const
|
|
548
|
+
const name = displayName(t.name);
|
|
549
|
+
const tableKey = camelCase ? snakeToCamel(name) : name;
|
|
429
550
|
const safe = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(tableKey)
|
|
430
551
|
? tableKey
|
|
431
552
|
: JSON.stringify(tableKey);
|
|
432
|
-
return ` ${safe}: ${tableToInterfaceName(
|
|
553
|
+
return ` ${safe}: ${tableToInterfaceName(name)}`;
|
|
433
554
|
})
|
|
434
555
|
.join('\n');
|
|
556
|
+
// The form brands are nominal (`unique symbol`), so unlike the structural
|
|
557
|
+
// `Private`/`Secret` aliases they CANNOT be re-declared here: a local
|
|
558
|
+
// declaration would be a distinct type, and the ciphertext `@pikku/core`
|
|
559
|
+
// hands back would not be assignable to the column it belongs in. Import the
|
|
560
|
+
// one true declaration, and only when a column actually uses it.
|
|
561
|
+
const usedFormBrands = ['WrappedValue', 'SealedValue', 'HashedValue'].filter((brand) => new RegExp(`\\b${brand}\\b`).test(interfaces));
|
|
435
562
|
const schemaBody = [
|
|
436
563
|
`// Generated by @pikku/cli — do not edit by hand.`,
|
|
437
564
|
`// Run \`pikku db migrate\` to refresh.`,
|
|
438
565
|
``,
|
|
439
566
|
`import type { ColumnType } from 'kysely'`,
|
|
567
|
+
...(usedFormBrands.length > 0
|
|
568
|
+
? [`import type { ${usedFormBrands.join(', ')} } from '@pikku/core'`]
|
|
569
|
+
: []),
|
|
440
570
|
``,
|
|
441
571
|
`export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>`,
|
|
442
572
|
` ? ColumnType<S, I | undefined, U>`,
|
|
@@ -470,9 +600,12 @@ export async function generateSchemaTypes(introspector, options) {
|
|
|
470
600
|
// is a string in both dialects, so it needs no runtime coercion.
|
|
471
601
|
const kind = tableCols[col.name]?.kind;
|
|
472
602
|
if (kind && kind !== 'uuid') {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
603
|
+
// Keyed by the name the query is written against, since that is what
|
|
604
|
+
// the runtime plugin sees on the Kysely node.
|
|
605
|
+
const key = displayName(table.name);
|
|
606
|
+
if (!coercionMap[key])
|
|
607
|
+
coercionMap[key] = {};
|
|
608
|
+
coercionMap[key][col.name] = kind;
|
|
476
609
|
}
|
|
477
610
|
}
|
|
478
611
|
}
|