@tailor-platform/sdk 2.33.0 → 2.35.0

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 (336) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/dist/ai/index.d.mts +1 -3
  3. package/dist/{application-Bet1K5C4.mjs → application-Bj2MtL-d.mjs} +1 -1
  4. package/dist/application-DIsQSnj3.mjs +207 -0
  5. package/dist/application-DIsQSnj3.mjs.map +1 -0
  6. package/dist/cli/cache/bundle-cache.d.mts +1 -0
  7. package/dist/cli/commands/api/api-call.d.mts +1 -3
  8. package/dist/cli/commands/deploy/aigateway.d.mts +1 -0
  9. package/dist/cli/commands/deploy/app-id-lock.d.mts +1 -3
  10. package/dist/cli/commands/deploy/application.d.mts +1 -0
  11. package/dist/cli/commands/deploy/auth.d.mts +1 -0
  12. package/dist/cli/commands/deploy/config-id-injector.d.mts +1 -3
  13. package/dist/cli/commands/deploy/confirm.d.mts +1 -0
  14. package/dist/cli/commands/deploy/deploy.d.mts +4 -3
  15. package/dist/cli/commands/deploy/executor.d.mts +1 -0
  16. package/dist/cli/commands/deploy/function-registry-types.d.mts +1 -3
  17. package/dist/cli/commands/deploy/function-registry.d.mts +1 -0
  18. package/dist/cli/commands/deploy/idp.d.mts +1 -0
  19. package/dist/cli/commands/deploy/owned-resource.d.mts +3 -0
  20. package/dist/cli/commands/deploy/resolver.d.mts +1 -0
  21. package/dist/cli/commands/deploy/secret-manager.d.mts +1 -0
  22. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
  23. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +1 -2
  24. package/dist/cli/commands/deploy/tailordb/plan.d.mts +1 -0
  25. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +2 -1
  26. package/dist/cli/commands/deploy/workflow.d.mts +1 -0
  27. package/dist/cli/commands/executor/get.d.mts +0 -2
  28. package/dist/cli/commands/executor/jobs.d.mts +0 -2
  29. package/dist/cli/commands/executor/list.d.mts +1 -3
  30. package/dist/cli/commands/executor/transform.d.mts +1 -3
  31. package/dist/cli/commands/executor/trigger.d.mts +0 -2
  32. package/dist/cli/commands/executor/webhook.d.mts +1 -3
  33. package/dist/cli/commands/function/get.d.mts +0 -2
  34. package/dist/cli/commands/function/list.d.mts +0 -2
  35. package/dist/cli/commands/function/transform.d.mts +1 -3
  36. package/dist/cli/commands/generate/options.d.mts +1 -3
  37. package/dist/cli/commands/generate/seed/bundler.d.mts +1 -3
  38. package/dist/cli/commands/generate/service.d.mts +1 -3
  39. package/dist/cli/commands/machineuser/list.d.mts +1 -3
  40. package/dist/cli/commands/machineuser/token.d.mts +1 -3
  41. package/dist/cli/commands/oauth2client/get.d.mts +1 -3
  42. package/dist/cli/commands/oauth2client/list.d.mts +1 -3
  43. package/dist/cli/commands/oauth2client/transform.d.mts +1 -3
  44. package/dist/cli/commands/organization/folder/create.d.mts +0 -2
  45. package/dist/cli/commands/organization/folder/delete.d.mts +0 -2
  46. package/dist/cli/commands/organization/folder/get.d.mts +0 -2
  47. package/dist/cli/commands/organization/folder/list.d.mts +0 -2
  48. package/dist/cli/commands/organization/folder/update.d.mts +0 -2
  49. package/dist/cli/commands/organization/get.d.mts +0 -2
  50. package/dist/cli/commands/organization/list.d.mts +1 -3
  51. package/dist/cli/commands/organization/transform.d.mts +1 -3
  52. package/dist/cli/commands/organization/tree.d.mts +0 -2
  53. package/dist/cli/commands/organization/update.d.mts +0 -2
  54. package/dist/cli/commands/remove.d.mts +1 -3
  55. package/dist/cli/commands/show.d.mts +0 -2
  56. package/dist/cli/commands/staticwebsite/deploy.d.mts +1 -3
  57. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +1 -3
  58. package/dist/cli/commands/tailordb/migrate/config.d.mts +1 -3
  59. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +0 -2
  60. package/dist/cli/commands/tailordb/migrate/generate.d.mts +2 -4
  61. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +1 -3
  62. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +1 -3
  63. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +1 -3
  64. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +1 -3
  65. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +1 -3
  66. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +0 -2
  67. package/dist/cli/commands/tailordb/migrate/types.d.mts +1 -3
  68. package/dist/cli/commands/tailordb/truncate.d.mts +1 -3
  69. package/dist/cli/commands/workflow/executions.d.mts +0 -2
  70. package/dist/cli/commands/workflow/get.d.mts +0 -2
  71. package/dist/cli/commands/workflow/list.d.mts +1 -3
  72. package/dist/cli/commands/workflow/resume.d.mts +1 -3
  73. package/dist/cli/commands/workflow/start.d.mts +0 -2
  74. package/dist/cli/commands/workflow/status.d.mts +1 -3
  75. package/dist/cli/commands/workflow/transform.d.mts +1 -3
  76. package/dist/cli/commands/workflow/wait.d.mts +1 -3
  77. package/dist/cli/commands/workflow/waiter.d.mts +1 -3
  78. package/dist/cli/commands/workspace/app/health.d.mts +0 -2
  79. package/dist/cli/commands/workspace/app/list.d.mts +0 -2
  80. package/dist/cli/commands/workspace/app/transform.d.mts +1 -3
  81. package/dist/cli/commands/workspace/create.d.mts +0 -2
  82. package/dist/cli/commands/workspace/delete.d.mts +0 -2
  83. package/dist/cli/commands/workspace/expiry.d.mts +1 -3
  84. package/dist/cli/commands/workspace/get.d.mts +0 -2
  85. package/dist/cli/commands/workspace/list.d.mts +1 -3
  86. package/dist/cli/commands/workspace/restore.d.mts +0 -2
  87. package/dist/cli/commands/workspace/transform.d.mts +1 -3
  88. package/dist/cli/commands/workspace/user/invite.d.mts +0 -2
  89. package/dist/cli/commands/workspace/user/list.d.mts +0 -2
  90. package/dist/cli/commands/workspace/user/remove.d.mts +0 -2
  91. package/dist/cli/commands/workspace/user/transform.d.mts +1 -3
  92. package/dist/cli/commands/workspace/user/update.d.mts +0 -2
  93. package/dist/cli/lib.d.mts +1 -1
  94. package/dist/cli/lib.mjs +1 -1
  95. package/dist/cli/lib.mjs.map +1 -1
  96. package/dist/cli/main.d.mts +1 -3
  97. package/dist/cli/main.mjs +55 -51
  98. package/dist/cli/main.mjs.map +1 -1
  99. package/dist/cli/query/index.d.mts +0 -2
  100. package/dist/cli/services/application.d.mts +6 -4
  101. package/dist/cli/services/executor/service.d.mts +2 -2
  102. package/dist/cli/services/function-bundle.d.mts +8 -0
  103. package/dist/cli/services/http-adapter/bundler.d.mts +7 -1
  104. package/dist/cli/services/resolver/service.d.mts +2 -2
  105. package/dist/cli/services/workflow/bundler.d.mts +2 -3
  106. package/dist/cli/shared/args.d.mts +0 -2
  107. package/dist/cli/shared/beta.d.mts +1 -3
  108. package/dist/cli/shared/client.d.mts +4 -3
  109. package/dist/cli/shared/command.d.mts +2 -4
  110. package/dist/cli/shared/config-loader.d.mts +2 -4
  111. package/dist/cli/shared/config.d.mts +1 -3
  112. package/dist/cli/shared/context.d.mts +0 -2
  113. package/dist/cli/shared/error-diagnostics.d.mts +1 -3
  114. package/dist/cli/shared/error-json.d.mts +1 -3
  115. package/dist/cli/shared/function-execution.d.mts +1 -3
  116. package/dist/cli/shared/github-actions.d.mts +1 -3
  117. package/dist/cli/shared/logger.d.mts +7 -4
  118. package/dist/cli/shared/platform-bundle-plugin.d.mts +1 -0
  119. package/dist/cli/shared/prompt.d.mts +1 -3
  120. package/dist/cli/shared/readonly-guard.d.mts +0 -2
  121. package/dist/cli/shared/script-executor.d.mts +1 -3
  122. package/dist/cli/shared/sdk-builder-pure-plugin.d.mts +1 -0
  123. package/dist/cli/shared/seed-chunker.d.mts +1 -3
  124. package/dist/cli/shared/seed-context.d.mts +0 -2
  125. package/dist/cli/shared/sourcemap-sources.d.mts +1 -0
  126. package/dist/cli/shared/tailordb-namespaces.d.mts +1 -3
  127. package/dist/cli/shared/type-generator.d.mts +0 -2
  128. package/dist/cli/shared/workspace-name.d.mts +1 -3
  129. package/dist/completion/zsh-worker.zsh +5 -5
  130. package/dist/configure/config/index.d.mts +2 -4
  131. package/dist/configure/config/types.d.mts +27 -4
  132. package/dist/configure/index.d.mts +7 -9
  133. package/dist/configure/index.mjs +1 -1
  134. package/dist/configure/services/aigateway/index.d.mts +0 -2
  135. package/dist/configure/services/aigateway/types.d.mts +0 -2
  136. package/dist/configure/services/auth/index.d.mts +0 -2
  137. package/dist/configure/services/auth/types.d.mts +0 -2
  138. package/dist/configure/services/executor/executor.d.mts +0 -2
  139. package/dist/configure/services/executor/operation.d.mts +0 -2
  140. package/dist/configure/services/executor/trigger/event.d.mts +0 -2
  141. package/dist/configure/services/executor/trigger/index.d.mts +0 -2
  142. package/dist/configure/services/executor/trigger/schedule.d.mts +0 -2
  143. package/dist/configure/services/executor/trigger/webhook.d.mts +1 -3
  144. package/dist/configure/services/http-adapter/http-adapter.d.mts +0 -2
  145. package/dist/configure/services/idp/index.d.mts +0 -2
  146. package/dist/configure/services/idp/permission.d.mts +0 -2
  147. package/dist/configure/services/idp/types.d.mts +0 -2
  148. package/dist/configure/services/index.d.mts +5 -5
  149. package/dist/configure/services/resolver/index.d.mts +1 -1
  150. package/dist/configure/services/resolver/permission.d.mts +0 -2
  151. package/dist/configure/services/resolver/resolver.d.mts +1 -3
  152. package/dist/configure/services/resolver/types.d.mts +1 -3
  153. package/dist/configure/services/secrets/index.d.mts +0 -2
  154. package/dist/configure/services/secrets/types.d.mts +0 -2
  155. package/dist/configure/services/staticwebsite/index.d.mts +0 -2
  156. package/dist/configure/services/staticwebsite/types.d.mts +0 -2
  157. package/dist/configure/services/tailordb/permission.d.mts +0 -2
  158. package/dist/configure/services/tailordb/schema.d.mts +0 -2
  159. package/dist/configure/services/tailordb/types.d.mts +0 -2
  160. package/dist/configure/services/workflow/execution-policy.d.mts +0 -2
  161. package/dist/configure/services/workflow/execution-policy.types.d.mts +0 -2
  162. package/dist/configure/services/workflow/job.d.mts +0 -2
  163. package/dist/configure/services/workflow/wait-point.d.mts +0 -2
  164. package/dist/configure/services/workflow/workflow.d.mts +0 -2
  165. package/dist/configure/types/aigateway-name.d.mts +1 -3
  166. package/dist/configure/types/auth-namespace-name.d.mts +1 -3
  167. package/dist/configure/types/connection-name.d.mts +1 -3
  168. package/dist/configure/types/field.d.mts +1 -3
  169. package/dist/configure/types/field.types.d.mts +0 -2
  170. package/dist/configure/types/idp-name.d.mts +1 -3
  171. package/dist/configure/types/permission-operand.types.d.mts +0 -2
  172. package/dist/configure/types/secret-vault-name.d.mts +1 -3
  173. package/dist/configure/types/type.d.mts +0 -2
  174. package/dist/{crashreport-BCIy33Cz.mjs → crashreport-DGU6lwiX.mjs} +2 -2
  175. package/dist/{crashreport-BCIy33Cz.mjs.map → crashreport-DGU6lwiX.mjs.map} +1 -1
  176. package/dist/crashreport-WsYAWARW.mjs +1 -0
  177. package/dist/{logger-RgtbhJ83.mjs → errors-BXmGBX-7.mjs} +6 -3
  178. package/dist/errors-BXmGBX-7.mjs.map +1 -0
  179. package/dist/field-parse-BQhUAbpM.mjs +2 -0
  180. package/dist/{field-parse-C41e3UAF.mjs.map → field-parse-BQhUAbpM.mjs.map} +1 -1
  181. package/dist/guards-CiFVxoXR.mjs +2 -0
  182. package/dist/guards-CiFVxoXR.mjs.map +1 -0
  183. package/dist/kysely/index.d.mts +0 -2
  184. package/dist/{kysely-type-DxyIWXc6.mjs → kysely-type-B0ri1-Xs.mjs} +9 -7
  185. package/dist/kysely-type-B0ri1-Xs.mjs.map +1 -0
  186. package/dist/manager-B813m43t.mjs +2 -0
  187. package/dist/manager-B813m43t.mjs.map +1 -0
  188. package/dist/parser/service/idp/types.d.mts +1 -3
  189. package/dist/parser/service/tailordb/type-source.d.mts +1 -3
  190. package/dist/parser/service/tailordb/types.d.mts +0 -2
  191. package/dist/plugin/builtin/enum-constants/index.d.mts +0 -2
  192. package/dist/plugin/builtin/file-utils/index.d.mts +0 -2
  193. package/dist/plugin/builtin/kysely-type/index.d.mts +0 -2
  194. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  195. package/dist/plugin/builtin/seed/index.d.mts +0 -2
  196. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +1 -3
  197. package/dist/plugin/get-generated-table.d.mts +1 -3
  198. package/dist/plugin/index.mjs +1 -1
  199. package/dist/plugin/types.d.mts +0 -2
  200. package/dist/plugin/with-context.d.mts +1 -3
  201. package/dist/register-ts-hook-CQ7shKO5.mjs +1055 -0
  202. package/dist/register-ts-hook-CQ7shKO5.mjs.map +1 -0
  203. package/dist/runtime/aigateway.d.mts +1 -3
  204. package/dist/runtime/authconnection.d.mts +1 -3
  205. package/dist/runtime/context.d.mts +0 -2
  206. package/dist/runtime/date.d.mts +0 -2
  207. package/dist/runtime/field-parse.d.mts +0 -2
  208. package/dist/runtime/file.d.mts +0 -2
  209. package/dist/runtime/globals.d.mts +0 -2
  210. package/dist/runtime/iconv.d.mts +1 -3
  211. package/dist/runtime/idp.d.mts +1 -3
  212. package/dist/runtime/index.d.mts +1 -3
  213. package/dist/runtime/index.mjs +1 -1
  214. package/dist/runtime/logger.d.mts +1 -3
  215. package/dist/runtime/secretmanager.d.mts +1 -3
  216. package/dist/runtime/temporal.d.mts +0 -2
  217. package/dist/runtime/types.d.mts +0 -2
  218. package/dist/runtime/workflow.d.mts +0 -2
  219. package/dist/{schema-B6hJQWp6.mjs → schema-BU1aIQ63.mjs} +2 -2
  220. package/dist/{schema-B6hJQWp6.mjs.map → schema-BU1aIQ63.mjs.map} +1 -1
  221. package/dist/secret-file-BxZ-J_Nz.mjs +2 -0
  222. package/dist/secret-file-BxZ-J_Nz.mjs.map +1 -0
  223. package/dist/seed/idp-user-password.d.mts +0 -2
  224. package/dist/seed/index.d.mts +0 -2
  225. package/dist/service-CaGmqg0r.mjs +2 -0
  226. package/dist/{service-9rwi_I4d.mjs.map → service-CaGmqg0r.mjs.map} +1 -1
  227. package/dist/service-DEq_hdht.mjs +1 -0
  228. package/dist/{service-9SBPNpK8.mjs → service-eeXdVrDK.mjs} +4 -4
  229. package/dist/service-eeXdVrDK.mjs.map +1 -0
  230. package/dist/shared/src/color.d.mts +1 -3
  231. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +1 -3
  232. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +1 -3
  233. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +1 -3
  234. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +1 -3
  235. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +1 -3
  236. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +1 -3
  237. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +1 -3
  238. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +1 -3
  239. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +1 -3
  240. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +1 -3
  241. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +1 -3
  242. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +1 -3
  243. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +1 -3
  244. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +1 -3
  245. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +1 -3
  246. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +1 -3
  247. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +1 -3
  248. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +1 -3
  249. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +1 -3
  250. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +1 -3
  251. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +1 -3
  252. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +1 -3
  253. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +1 -3
  254. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +1 -3
  255. package/dist/tailor-proto/src/tailor/v1/security_pb.d.mts +1 -3
  256. package/dist/tailor-proto/src/tailor/v1/security_resource_pb.d.mts +1 -3
  257. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +1 -3
  258. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +1 -3
  259. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +1 -3
  260. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +1 -3
  261. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +1 -3
  262. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +1 -3
  263. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +1 -3
  264. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +1 -3
  265. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +1 -3
  266. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +1 -3
  267. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +1 -3
  268. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +1 -3
  269. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +1 -3
  270. package/dist/types/aigateway.generated.d.mts +1 -3
  271. package/dist/types/app-config.generated.d.mts +1 -3
  272. package/dist/types/auth-connection.generated.d.mts +1 -3
  273. package/dist/types/auth.generated.d.mts +1 -3
  274. package/dist/types/executor.generated.d.mts +1 -3
  275. package/dist/types/field.generated.d.mts +1 -3
  276. package/dist/types/helpers.d.mts +1 -3
  277. package/dist/types/http-adapter.generated.d.mts +1 -3
  278. package/dist/types/idp.generated.d.mts +1 -3
  279. package/dist/types/resolver.generated.d.mts +1 -3
  280. package/dist/types/secrets.generated.d.mts +1 -3
  281. package/dist/types/staticwebsite.generated.d.mts +1 -3
  282. package/dist/types/tailordb.generated.d.mts +1 -3
  283. package/dist/types/workflow.generated.d.mts +1 -3
  284. package/dist/utils/test/index.d.mts +1 -3
  285. package/dist/utils/test/index.mjs +1 -1
  286. package/dist/vitest/date-representation.d.mts +1 -3
  287. package/dist/vitest/environment.d.mts +0 -2
  288. package/dist/vitest/index.d.mts +0 -2
  289. package/dist/vitest/migration-steps.d.mts +1 -3
  290. package/dist/vitest/mock-kysely.d.mts +0 -2
  291. package/dist/vitest/mocks/aigateway.d.mts +0 -2
  292. package/dist/vitest/mocks/authconnection.d.mts +0 -2
  293. package/dist/vitest/mocks/file.d.mts +0 -2
  294. package/dist/vitest/mocks/iconv.d.mts +0 -2
  295. package/dist/vitest/mocks/idp.d.mts +0 -2
  296. package/dist/vitest/mocks/logger.d.mts +0 -2
  297. package/dist/vitest/mocks/secretmanager.d.mts +0 -2
  298. package/dist/vitest/mocks/tailordb-pglite.d.mts +0 -2
  299. package/dist/vitest/mocks/tailordb.d.mts +0 -2
  300. package/dist/vitest/mocks/workflow.d.mts +0 -2
  301. package/dist/vitest/pglite-kysely.d.mts +0 -2
  302. package/dist/vitest/pglite-temporal.d.mts +1 -3
  303. package/dist/vitest/setup.d.mts +0 -2
  304. package/dist/vitest/workflow-local.d.mts +0 -2
  305. package/docs/cli/application.md +2 -1
  306. package/docs/cli/tailordb.md +9 -7
  307. package/docs/cli/user.md +5 -5
  308. package/docs/cli/workspace.md +1 -1
  309. package/docs/cli-reference.md +27 -26
  310. package/docs/configuration.md +15 -2
  311. package/docs/github-actions.md +33 -10
  312. package/docs/services/secret.md +6 -0
  313. package/docs/services/tailordb/index.md +23 -0
  314. package/docs/services/tailordb/migration.md +14 -9
  315. package/docs/testing.md +2 -2
  316. package/package.json +12 -12
  317. package/dist/application-B9_NHiUC.mjs +0 -207
  318. package/dist/application-B9_NHiUC.mjs.map +0 -1
  319. package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +0 -1
  320. package/dist/crashreport-IN6H7GX3.mjs +0 -1
  321. package/dist/errors-BOF68LJ5.mjs +0 -5
  322. package/dist/errors-BOF68LJ5.mjs.map +0 -1
  323. package/dist/field-parse-C41e3UAF.mjs +0 -2
  324. package/dist/guards-yDXyKC9F.mjs +0 -2
  325. package/dist/guards-yDXyKC9F.mjs.map +0 -1
  326. package/dist/kysely-type-DxyIWXc6.mjs.map +0 -1
  327. package/dist/logger-RgtbhJ83.mjs.map +0 -1
  328. package/dist/manager-DTRhIupk.mjs +0 -2
  329. package/dist/manager-DTRhIupk.mjs.map +0 -1
  330. package/dist/register-ts-hook-Dp9reSRG.mjs +0 -1053
  331. package/dist/register-ts-hook-Dp9reSRG.mjs.map +0 -1
  332. package/dist/secret-file-C9wp_FCX.mjs +0 -2
  333. package/dist/secret-file-C9wp_FCX.mjs.map +0 -1
  334. package/dist/service-9SBPNpK8.mjs.map +0 -1
  335. package/dist/service-9rwi_I4d.mjs +0 -2
  336. package/dist/service-Ca1WwyIt.mjs +0 -1
@@ -249,6 +249,29 @@ For a preview target, the name can be at most 50 characters: each pull request
249
249
  gets its own workspace named `<name>-pr-<number>`, which must fit in 63
250
250
  characters.
251
251
 
252
+ ### Preview target (per-pull-request workspace)
253
+
254
+ The preview target deploys each pull request to its own workspace and deletes
255
+ that workspace when the pull request is closed:
256
+
257
+ ```bash
258
+ tailor setup ci preview --name my-app --region asia-northeast
259
+ ```
260
+
261
+ Fork pull requests are skipped. Every other pull request gets a preview, draft
262
+ pull requests included. `--require` narrows that to one of:
263
+
264
+ - `--require ready` skips draft pull requests. The preview is deployed when the
265
+ draft is marked ready for review.
266
+ - `--require label` deploys only pull requests labeled `tailor:preview`. A
267
+ labeled draft deploys too, because the label asks for the preview.
268
+
269
+ When `tailor setup update` regenerates a preview target generated before
270
+ `--require` existed, it reads the target as `--require ready`, or as
271
+ `--require label` if it required the label. The first keeps skipping drafts; the
272
+ second now also deploys a labeled draft. To deploy drafts as well, run
273
+ `tailor setup ci preview` again without `--require`.
274
+
252
275
  ## Targeting a workspace
253
276
 
254
277
  The generated `plan` and `deploy` jobs target a workspace by **id**, read from
@@ -385,8 +408,8 @@ A job that runs `tailor` against the workspace needs the machine-user
385
408
  that only uses `app-url`, such as end-to-end tests, does not.
386
409
 
387
410
  The job is skipped whenever `tailor-preview-deploy` is skipped: when a pull
388
- request is closed, for draft and fork pull requests, and for unlabeled ones with
389
- `--require-preview-label`.
411
+ request is closed, for fork pull requests, for draft pull requests with
412
+ `--require ready`, and for unlabeled ones with `--require label`.
390
413
 
391
414
  A preview workspace expires 7 days (`ttl: 7d` on `tailor-preview-deploy`) after
392
415
  the last push to its pull request. When a pull request is closed,
@@ -476,11 +499,11 @@ failed also counts as passing, so list every job of yours whose failure should
476
499
  block merging, not only the last one: above, `seed` is listed because `e2e`
477
500
  needs it.
478
501
 
479
- With `--require-preview-label`, the preview workflow does not start when a pull
480
- request is opened, so its check is not reported until the pull request is
481
- labeled, reopened, or pushed to. A draft pull request skips the preview deploy,
482
- and marking it ready for review does not start the workflow, so the check that
483
- passed while it was a draft stays until the next push. Tag workflows have no
502
+ With `--require label`, the preview workflow does not start when a pull request
503
+ is opened, so its check is not reported until the pull request is labeled,
504
+ reopened, or pushed to. With `--require ready`, a draft pull request skips the
505
+ preview deploy and its check passes; marking it ready for review starts the
506
+ workflow, so the deploy and its check follow right away. Tag workflows have no
484
507
  such job: they run on tags, not on pull requests.
485
508
 
486
509
  ### `.github/tailor.lock`
@@ -758,7 +781,7 @@ Before enabling it, note that:
758
781
  and validation run, `updatedAt` changes, and executors with
759
782
  `recordUpdatedTrigger` fire once per seeded row on every deploy.
760
783
  - Every preview deploy deletes the data reviewers added to the preview
761
- workspace. That is every push, and with `--require-preview-label` also every
784
+ workspace. That is every push, and with `--require label` also every
762
785
  label added to the pull request, since each one redeploys the preview.
763
786
  - A seed failure fails the deploy job and its notification, although the deploy
764
787
  itself went through.
@@ -1016,8 +1039,8 @@ targets it reports.
1016
1039
  Workflows generated by `setup ci branch`, `setup ci tag`, and `setup ci preview`
1017
1040
  self-audit: each contains a `tailor-drift-check` step that
1018
1041
  runs the check in CI. Preview workflows run it alongside each preview deploy,
1019
- so pull requests that deploy no preview (drafts, fork PRs, and unlabeled PRs
1020
- in label-triggered mode) skip the check. A single run audits every target
1042
+ so pull requests that deploy no preview (drafts with `--require ready`, fork
1043
+ PRs, and unlabeled PRs with `--require label`) skip the check. A single run audits every target
1021
1044
  recorded in `.github/tailor.lock`.
1022
1045
 
1023
1046
  Drift findings are advisory by default. Set the repository variable
@@ -32,6 +32,12 @@ workspace/
32
32
  └── analytics-connection-string
33
33
  ```
34
34
 
35
+ ### Reserved Vault Names
36
+
37
+ Vault names that start with `tailor--` (two hyphens) are reserved in advance for the platform and have no use today. Declaring such a vault in `defineSecretManager()` prints a warning on `tailor deploy` and will become an error in v3. A name that starts with a single `tailor-`, such as `tailor-reports`, is not reserved.
38
+
39
+ `tailor deploy` also creates a vault named `idp-<namespace>-<client>` for each IdP client of your application. A declared vault with exactly that name is an error, because both would write to the same vault.
40
+
35
41
  ### Secrets
36
42
 
37
43
  Secrets are key-value pairs stored within a vault. Secret values are encrypted at rest and only accessible at runtime by authorized services.
@@ -175,6 +175,10 @@ db.string().index();
175
175
  db.string().unique();
176
176
  ```
177
177
 
178
+ `.unique()` and `.index()` also work on a field inside a `db.object()` that is not an array: with `.unique()` the value must be unique across rows, while `.index()` only indexes it and still allows duplicates. Inside an array of objects (`db.object(..., { array: true })`) the platform does not reject duplicate values, so both are rejected there with an error, as on an array field.
179
+
180
+ A project whose `db.object()` field already uses `.unique()` or `.index()` was deployed with the setting stored as off, so its next `tailor deploy` stops with `MIGRATION_REMOTE_DRIFT`, and `tailor tailordb migration validate` fails the same way. `tailor tailordb migration generate` reports no differences. Run `tailor deploy --no-schema-check` once to apply the setting. If stored rows already hold duplicate values for a field that gains `.unique()`, that deploy fails and the schema stays unchanged until the duplicates are resolved.
181
+
178
182
  ### Relations
179
183
 
180
184
  Add a relation to field with automatic index and foreign key constraint:
@@ -218,6 +222,25 @@ const user = db.table("User", {
218
222
  });
219
223
  ```
220
224
 
225
+ A relation can also be set on a field inside `db.object()`. The inner field gets the foreign key constraint only: no index, no unique constraint, and no forward or backward relationship, as with `type: "keyOnly"`.
226
+
227
+ ```typescript
228
+ const order = db.table("Order", {
229
+ items: db.object(
230
+ {
231
+ productId: db.uuid().relation({
232
+ type: "keyOnly",
233
+ toward: { table: product },
234
+ }),
235
+ quantity: db.int(),
236
+ },
237
+ { array: true },
238
+ ),
239
+ });
240
+ ```
241
+
242
+ A relation inside `db.object()` that points at its own table is not yet handled by `tailor seed apply` or by the data copy a table rename generates. Both write rows in batches, and the platform rejects a row whose parent is in the same or a later batch.
243
+
221
244
  Create relations against different fields using `toward.key`:
222
245
 
223
246
  ```typescript
@@ -64,7 +64,7 @@ If your local tables and remote schema have **diverged**, reconcile them before
64
64
 
65
65
  ### Resetting
66
66
 
67
- `tailor tailordb migration generate --init` deletes the existing `migrations/` directory and creates `0000` from the current local tables. Use it only before the project is deployed. For a deployed migration history, use [`migration rebaseline`](#re-baselining-a-deployed-migration-history), which verifies the history and connected workspace before replacing any files.
67
+ `tailor tailordb migration generate --init` deletes the existing `migrations/` directory of every namespace with migrations configured and creates `0000` from the current local tables. Add `--namespace <name>` to reset only that namespace and leave the others untouched. Use it only before the project is deployed. For a deployed migration history, use [`migration rebaseline`](#re-baselining-a-deployed-migration-history), which verifies the history and connected workspace before replacing any files.
68
68
 
69
69
  ## Migration Workflow
70
70
 
@@ -96,7 +96,7 @@ A typical change cycle:
96
96
  DB types: ./migrations/0001/db.ts
97
97
  ```
98
98
 
99
- If `EDITOR` or `VISUAL` is set, `migrate.ts` opens automatically unless JSON output is enabled.
99
+ If `EDITOR` or `VISUAL` is set, `migrate.ts` opens automatically when the command runs in an interactive terminal outside CI without JSON output. `tailordb migration script` opens the file it scaffolds the same way.
100
100
 
101
101
  3. **Edit `migrate.ts`** to populate data for the new required field:
102
102
 
@@ -426,7 +426,7 @@ export const steps = {
426
426
  - Each step runs as a separate job, so steps cannot hand data to each other through module-level variables; read what a step needs from the database.
427
427
  - `MigrationSteps` is declared by `db.ts` files generated by this SDK version. With an older `db.ts`, annotate each `run` parameter with `Transaction` instead.
428
428
 
429
- A script with a single step runs like a `main` script: one job and one transaction, and a failure inside the transaction rolls its data changes back. Nothing is recorded as in progress. If the post-migration schema changes fail after the transaction committed, the schema is restored to its state before the migration but the data changes stay, so the next deploy runs the step again and the step must tolerate rows it already migrated. The rules below apply once the script has two or more steps. A migration that an earlier deploy already left in progress keeps running step by step until it completes, even if the script has since been reduced to one step.
429
+ A script with a single step runs like a `main` script: one job and one transaction, and a failure inside the transaction rolls its data changes back. The migration is recorded as in progress from the start of the script until its checkpoint is committed or its failure is rolled back, so that a deploy that loses track of the run leaves it for you to settle rather than running it again (see [Failure Recovery](#failure-recovery)). If the post-migration schema changes fail after the transaction committed, the schema is restored to its state before the migration but the data changes stay, so the next deploy runs the step again and the step must tolerate rows it already migrated. The rules below apply once the script has two or more steps. A migration that an earlier deploy already left in progress keeps running step by step until it completes, even if the script has since been reduced to one step.
430
430
 
431
431
  Because steps commit separately, a failure does not undo the steps that already completed:
432
432
 
@@ -437,7 +437,7 @@ Because steps commit separately, a failure does not undo the steps that already
437
437
  - If the steps changed since the earlier run, or that run is no longer available, every step runs again from the beginning. See [Editing steps of a migration in progress](#editing-steps-of-a-migration-in-progress).
438
438
  - If every step completed but the post-migration schema changes fail (for example, a field the migration makes required still has empty values), the migration also stays in progress with its pre-migration schema, and the next deploy retries those schema changes without running the steps again.
439
439
  - To run a completed step again (because it had a bug, or to fix rows the post-migration schema changes reject), change the steps: rename that step and update the `dependsOn` lists that name it, or add a step that fixes the rows. Every step then runs again from the beginning, so this relies on every step being safe to run again; to keep the other completed steps from running again, skip them as described below.
440
- - While a migration is in progress, `migration set`, `migration sync`, and `migration rebaseline` refuse to run, and `migration test` refuses to use that workspace as its source. Finish the migration with `tailor deploy` first, or settle it with `migration resolve` (see [Settling a migration that stays in progress](#settling-a-migration-that-stays-in-progress)). The one exception is `migration set <N>` with the in-progress migration's own number: it marks that migration as completed and clears its in-progress record. Use it only when the migration's schema changes are already applied, for example after the deploy reported that the checkpoint write could not be confirmed.
440
+ - While a migration is in progress, `migration set`, `migration sync`, and `migration rebaseline` refuse to run, and `migration test` refuses to use that workspace as its source. Finish a multi-step migration left in progress with `tailor deploy` first, or settle it with `migration resolve`. A migration whose script run a deploy could not confirm is not finished by a later deploy, so settle that one with `migration resolve` (see [Settling a migration that stays in progress](#settling-a-migration-that-stays-in-progress)). The one exception to these refusals is `migration set <N>` with the in-progress migration's own number: it marks that migration as completed and clears its in-progress record. Use it only when the migration's schema changes are already applied, for example after the deploy reported that the checkpoint write could not be confirmed.
441
441
 
442
442
  #### Editing steps of a migration in progress
443
443
 
@@ -483,13 +483,15 @@ export const steps = {
483
483
 
484
484
  ### Settling a migration that stays in progress
485
485
 
486
- When you do not want to resume the migration with another deploy — you abandoned it, or you repaired the data by hand — settle it with `tailor tailordb migration resolve`. Pass exactly one of two options:
486
+ A deploy resumes a multi-step migration left in progress. When you do not want it to — you abandoned the migration, or you repaired the data by hand — settle the migration with `tailor tailordb migration resolve`. Pass exactly one of two options:
487
487
 
488
488
  - `--rollback` sends the schema of the migration before the failed one, clears the in-progress record, and leaves the checkpoint where it was. The next `tailor deploy` runs the failed migration again from its first step, so every step must be safe to run again. Data changes made by steps that already completed are not undone, and tables that exist only in the failed migration's schema are deleted with their data.
489
489
  - `--complete` sends the schema of the failed migration itself, clears the in-progress record, and moves the checkpoint to that migration, without running its `migrate.ts` again. Repair the data first, for example with `tailor query`, and make sure no record lacks a value for a field the migration makes required: the update is rejected while such a record exists, and the migration stays in progress.
490
490
 
491
491
  Tables that the failed migration removes are deleted with their data under `--complete`. The command refuses to run while an execution of the failed migration is still running; wait for it to finish first. Both options take the namespace's tables out of [maintenance mode](#maintenance-mode) and remove the temporary resources of the failed run. The command shows what it will change and asks for confirmation (`--yes` skips it). As with `migration sync`, the local migration history must reproduce the current table definitions, so settle the migration before you change the tables. If sending the schema stops partway, run the same command again.
492
492
 
493
+ The same command settles a migration whose script run a deploy could not confirm (see [Failure Recovery](#failure-recovery)). A deploy does not resume such a migration; it stops until this command settles it. The command reads how that run ended and shows it before asking for confirmation. Pass `--complete` when the run succeeded, and `--rollback` when it failed, was canceled, or did not start; `--rollback` deletes the tables and fields the migration introduced together with the data the script wrote to them, and the next deploy runs the script again. The command warns when the option you passed does not fit how the run ended, or when it cannot read the run.
494
+
493
495
  ## Supported Schema Changes
494
496
 
495
497
  | Change Type | Breaking? | Migration Script? | Notes |
@@ -754,8 +756,9 @@ Maintenance mode restricts GraphQL writes and record events only. Resolvers, exe
754
756
 
755
757
  - If a migration fails, the tables leave maintenance mode before the error is reported: they return to the settings of the last checkpoint that completed. A migration that did not reach its checkpoint returns existing tables to their previous settings and keeps the tables it created in maintenance mode until a later deploy applies it. The settings are not restored if the checkpoint number or migration history changed concurrently, or if checkpoint ownership cannot be verified. A table left behind by a failed post-checkpoint deletion also stays in maintenance mode for manual recovery.
756
758
  - A [multi-step migration](#splitting-a-migration-into-steps) left in progress keeps its tables in maintenance mode until a deploy completes it.
759
+ - A migration whose script run a deploy could not confirm keeps its tables in maintenance mode until you settle it with `tailor tailordb migration resolve` (see [Failure Recovery](#failure-recovery)).
757
760
  - With `"deploy"`, if a later part of the deploy fails, the tables leave maintenance mode before the error is reported. When the deploy ends maintenance mode, it leaves the tables of a namespace unchanged if that namespace's checkpoint number or migration history changed concurrently, or if checkpoint ownership cannot be verified, and reports it.
758
- - If the deploy process is interrupted after a namespace's migrations completed but before maintenance mode ended, that namespace's tables stay in maintenance mode until a later `tailor deploy` releases them when it applies its TailorDB changes, before it replaces resolvers and executors. A namespace whose migrations had not all completed is not released this way: the next deploy resumes a multi-step migration left in progress, and otherwise reports remote schema drift (see [Failure Recovery](#failure-recovery)).
761
+ - If the deploy process is interrupted after a namespace's migrations completed but before maintenance mode ended, that namespace's tables stay in maintenance mode until a later `tailor deploy` releases them when it applies its TailorDB changes, before it replaces resolvers and executors. A namespace whose migrations had not all completed is not released this way: the next deploy resumes a multi-step migration left in progress, stops at a migration whose script was running until you settle it, and otherwise reports remote schema drift (see [Failure Recovery](#failure-recovery)).
759
762
 
760
763
  #### Keeping maintenance mode short
761
764
 
@@ -915,7 +918,7 @@ When your branch and main each generated the same number, merging or rebasing st
915
918
 
916
919
  - For non-interactive environments, pass `--yes` to `migration generate` and `--yes` to `apply`. `apply` runs migrations automatically when the `migrations/` directory is configured.
917
920
  - Run `tailor tailordb migration validate` in CI to catch uncommitted migrations, broken migration files, unreviewed generated normalization logic, and remote schema drift before deploying. It exits with a non-zero code when validation fails and supports `--json`. Add `--strict` to also require an explicit acknowledgment (a `migrate.ts` or a recorded `--no-script` reason) for every pending migration that can drop data, so destructive changes cannot merge unnoticed.
918
- - `tailor tailordb migration status` validates file-format compatibility across the full local history, compares its history ID with the deployed namespace, and shows applied and pending migrations for a human-readable comparison. Its exit code is non-zero on incompatible files, migration history mismatches, and remote read errors, so check the output.
921
+ - `tailor tailordb migration status` validates the layout and file-format compatibility of the full local history, compares its history ID with the deployed namespace, and shows applied and pending migrations for a human-readable comparison. Its exit code is non-zero on invalid or incompatible files, migration history mismatches, and remote read errors, so check the output.
919
922
  - Avoid running migrations in parallel against the same workspace — there is no locking. Serialize deploys per environment.
920
923
 
921
924
  ### Resetting a deployed project
@@ -932,7 +935,9 @@ A script that exports `steps` follows different rules once one of its steps has
932
935
 
933
936
  The rollback is best-effort per table; if reverting a table fails, a warning is logged and the original migration error is still reported. The next deploy then stops with remote schema drift on that table. Run `tailor tailordb migration validate` to see which tables differ, return the namespace to its checkpoint with `tailor tailordb migration sync <N>`, where `<N>` is the checkpoint `tailor tailordb migration status` reports, and deploy again. `sync` deletes the tables and fields that are not in that migration's snapshot, together with any rows the failed migration wrote to them; the next deploy runs the failed migration again.
934
937
 
935
- If `tailor deploy` cannot tell whether a `main` script ran, for example because the connection dropped while it started or waited for the script, it does not roll anything back: the pre-migration schema changes stay, the namespace's tables stay in [maintenance mode](#maintenance-mode) if it is on, and the deploy reports that it could not confirm the outcome. A later deploy refuses to run the migration while that run is still executing. Run `tailor workflow executions --workflow-name <name>` with the workflow name the error reports until the execution has finished or none is listed. If it succeeded, run `tailor tailordb migration sync <N>` with the migration's own number; otherwise run `tailor tailordb migration sync <N-1>`. Then deploy again. Do not deploy before running sync, even with `--no-schema-check` to skip the drift check: the deploy may run the `main` script again even if the execution succeeded.
938
+ If `tailor deploy` cannot tell whether a `main` script ran, for example because the connection dropped while it started or waited for the script, it does not roll anything back: the pre-migration schema changes stay, the namespace's tables stay in [maintenance mode](#maintenance-mode) if it is on, the migration stays recorded as in progress, and the deploy reports that it could not confirm the outcome. The same holds when the deploy process stops while the script runs. Until you settle the migration, `tailor deploy` stops before changing anything, including the other namespaces and resources of the application, and reports how the run stands, even with `--no-schema-check`; `migration sync` and `migration rebaseline` refuse to run, and `tailor tailordb migration status` reports the migration as in progress. Run `tailor workflow executions --workflow-name <name>` with the workflow name the error reports until the execution has finished. If it succeeded, run `tailor tailordb migration resolve --complete`, which applies the migration's schema without running the script again; otherwise run `tailor tailordb migration resolve --rollback`, and the next deploy runs the script again. See [Settling a migration that stays in progress](#settling-a-migration-that-stays-in-progress). `migration set <N>` with the migration's own number also marks it as completed, but it does not check the run or apply the schema, so use it only when the run succeeded and the post-migration schema is already in place.
939
+
940
+ If the post-migration schema changes fail after a `main` script succeeded and the deploy cannot clear the in-progress record, it keeps the pre-migration schema instead of rolling it back, so the data the script wrote stays. Settle the migration as above: `--complete` once the data meets the migration's schema, or `--rollback`.
936
941
 
937
942
  `migration sync` refuses to run while a migration is in progress. When a steps migration's post-migration schema changes fail and the deploy cannot return its tables to the pre-migration schema, it logs a warning, and the next deploy stops with remote schema drift on those tables. Run `tailor tailordb migration validate` from a checkout of the deployed migration history. If the only issue it reports is that drift, run `tailor deploy --no-schema-check`: the deploy applies the pre-migration schema again, skips the completed steps unless the steps changed, and retries the post-migration schema changes. `--no-schema-check` skips the schema checks of every namespace, so do not use it while `validate` reports any other issue.
938
943
 
@@ -1056,7 +1061,7 @@ npm install -D @electric-sql/pglite
1056
1061
 
1057
1062
  The generated `db.pglite.ts` exports the `CREATE TABLE` script for the same schema `db.ts` types — the tables as the pre-migration phase leaves them while `migrate.ts` runs, including relaxed constraints, renamed fields under both names, and retained removed fields. Run it once on the PGlite instance, stage rows, then run the script in a transaction. `tailor tailordb migration script <N> --with-test` scaffolds this test too when `@electric-sql/pglite` is installed. Type the instance with `Unmigrated<Database>` rather than `Database`: `db.ts` types a column the migration makes required as `T | null` on read but `T` on write (and an enum it narrows as the old values on read but the new ones on write), so that `migrate.ts` cannot write what the migration is removing — which would also stop the test from staging the rows the script has to convert. `Unmigrated` lets every column be written with whatever it can still be read as; `main` still receives a `Transaction<Database>`.
1058
1063
 
1059
- Relations are enforced as on the platform: a row that points at a parent that does not exist is rejected. Write the records the test starts from inside `prepareFixtures`, which leaves relations unchecked while it runs, so you can stage rows that predate a relation, such as rows whose parent does not exist that the script repairs. Relations are checked again when it returns, so the script itself still cannot write a missing parent. NOT NULL, UNIQUE, and CHECK constraints stay enforced. A relation is left unenforced while the pre-migration schema cannot satisfy it: when a pending type change leaves the field a different type from its target, when the migration retargets the relation to another table, or when the target field's unique constraint is still withheld. How relations on array fields and inside nested objects behave is described under [Real SQL execution with PGlite](../../testing.md#real-sql-execution-with-pglite-mocktailordbwithpglite).
1064
+ Relations are enforced as on the platform: a row that points at a parent that does not exist is rejected. Write the records the test starts from inside `prepareFixtures`, which leaves relations unchecked while it runs, so you can stage rows that predate a relation, such as rows whose parent does not exist that the script repairs. Relations are checked again when it returns, so the script itself still cannot write a missing parent. The same holds in reverse: the script cannot delete a parent that a row still points at, or change the key a row points at, so delete rows in the opposite order of staging them. NOT NULL, UNIQUE, and CHECK constraints stay enforced. A relation is left unenforced while the pre-migration schema cannot satisfy it: when a pending type change leaves the field a different type from its target, when the migration retargets the relation to another table, or when the target field's unique constraint is still withheld. How relations on array fields and inside nested objects behave is described under [Real SQL execution with PGlite](../../testing.md#real-sql-execution-with-pglite-mocktailordbwithpglite).
1060
1065
 
1061
1066
  ```typescript
1062
1067
  // migrations/0005/migrate.pglite.test.ts
package/docs/testing.md CHANGED
@@ -209,15 +209,15 @@ test("upserts against real rows", async () => {
209
209
  });
210
210
  ```
211
211
 
212
- The generated columns follow the Kysely types, not TailorDB's storage: `text` for string and enum fields, `timestamptz` for datetime, `date` and `time` for date and time, `numeric` for decimal, rounded to the configured scale and read back with exactly that many fractional digits, `jsonb` for nested objects (and arrays of them), Postgres arrays for other array fields. `id` is a generated `uuid` primary key, `.unique()` fields and unique `.indexes()` are enforced, so `ON CONFLICT` upserts behave, and `.default()` values become column defaults (`"now"` becomes the current time). `.serial()` fields are assigned by the database from the configured `start`, `maxValue`, and format. Relations are enforced as the platform does: a row that points at a parent that does not exist is rejected with an error containing `violates foreign key constraint`, so create parent rows before their children. This includes relations on array fields. A relation declared on a field inside a nested object is not enforced, as on the platform.
212
+ The generated columns follow the Kysely types, not TailorDB's storage: `text` for string and enum fields, `timestamptz` for datetime, `date` and `time` for date and time, `numeric` for decimal, rounded to the configured scale and read back with exactly that many fractional digits, `jsonb` for nested objects (and arrays of them), Postgres arrays for other array fields. `id` is a generated `uuid` primary key, `.unique()` fields, `.unique()` fields inside `db.object()`, and unique `.indexes()` are enforced, so `ON CONFLICT` upserts behave, and `.default()` values become column defaults (`"now"` becomes the current time). `.serial()` fields are assigned by the database from the configured `start`, `maxValue`, and format. Relations are enforced as the platform does: a row that points at a parent that does not exist is rejected with an error containing `violates foreign key constraint`, so create parent rows before their children. This includes relations on array fields and on fields inside nested objects. The reverse holds too: deleting a parent that a row still points at, or changing the key a row points at, is rejected with an error containing `violates foreign key constraint`, so delete child rows before their parents.
213
213
 
214
214
  What the script cannot reproduce:
215
215
 
216
216
  - Hooks, validations, and permissions do not run. A required field whose value only its own field-level create hook supplies is created nullable, so inserts that omit it succeed; give it a `.default()` if the test reads it back. A field filled by a table-level hook stays `NOT NULL`, as its Kysely type still requires it on insert.
217
- - Relations on array fields, and relations from a field whose type differs from the field it points at (such as a `string` field related to `id`), are checked only when a row is written. Deleting a parent that such a row still points at is rejected by the platform but not by PGlite, and changing the parent's `id` is not checked either, so a test must not expect PGlite to reject them.
218
217
  - Serial formats are reproduced for a single `%d`, `%x`, or `%X` specifier with an optional zero-padded width; an octal `%o` format fails generation with an error naming the field.
219
218
  - `gapless` is not reproduced: the numbers come from a sequence, so an insert that fails still uses up its number.
220
219
  - A date or datetime inside a nested object reads back as a string from `jsonb`, not a `Date`, or a `Temporal.PlainDate` or `Temporal.Instant` under `kyselyTypePlugin({ temporal: true })`, although the platform returns those types.
220
+ - A `.unique()` date, datetime, or time inside a nested object compares the stored text, so two spellings of the same instant (`2026-01-01T00:00:00Z` and `2026-01-01T01:00:00+01:00`) are both accepted, although the platform rejects the second. Use one spelling in tests.
221
221
  - On a persistent PGlite (`dataDir`), tables created by an earlier run are kept as they were; drop them or start from an empty directory after changing a table definition.
222
222
 
223
223
  To hand-write DDL instead — for a table not in the schema, or to add a constraint — run your own statements after the script, or without it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "2.33.0",
3
+ "version": "2.35.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -170,15 +170,15 @@
170
170
  "@opentelemetry/resources": "2.12.0",
171
171
  "@opentelemetry/sdk-trace": "2.12.0",
172
172
  "@opentelemetry/semantic-conventions": "1.43.0",
173
- "@oxc-project/types": "0.154.0",
174
- "@politty/zod": "0.5.2",
173
+ "@oxc-project/types": "0.155.0",
174
+ "@politty/zod": "0.6.1",
175
175
  "@secretlint/core": "13.0.7",
176
176
  "@secretlint/secretlint-rule-preset-recommend": "13.0.7",
177
177
  "@standard-schema/spec": "1.1.0",
178
178
  "@tailor-platform/function-kysely-tailordb": "0.1.3",
179
179
  "@toiroakr/read-multiline": "0.4.3",
180
180
  "@urql/core": "6.0.3",
181
- "amaro": "1.2.1",
181
+ "amaro": "1.2.2",
182
182
  "confbox": "0.3.1",
183
183
  "date-fns": "4.4.0",
184
184
  "es-toolkit": "1.52.0",
@@ -192,12 +192,12 @@
192
192
  "lines-db": "0.18.0",
193
193
  "mime-types": "3.0.2",
194
194
  "open": "11.0.4",
195
- "oxc-parser": "0.154.0",
195
+ "oxc-parser": "0.155.0",
196
196
  "p-limit": "7.3.3",
197
197
  "pathe": "2.0.3",
198
198
  "pgsql-ast-parser": "12.0.2",
199
199
  "pkg-types": "2.4.0",
200
- "rolldown": "1.2.14",
200
+ "rolldown": "1.2.15",
201
201
  "semver": "7.8.5",
202
202
  "sql-highlight": "6.1.0",
203
203
  "std-env": "4.3.0",
@@ -209,18 +209,18 @@
209
209
  "zod": "4.6.7"
210
210
  },
211
211
  "devDependencies": {
212
- "@ark/attest": "0.57.0",
213
- "@electric-sql/pglite": "0.5.10",
212
+ "@ark/attest": "0.58.0",
213
+ "@electric-sql/pglite": "0.5.11",
214
214
  "@tailor-platform/shared": "^0.0.0",
215
215
  "@tailor-platform/tailor-proto": "^0.0.1",
216
216
  "@types/mime-types": "3.0.1",
217
217
  "@types/node": "24.19.2",
218
218
  "@types/semver": "7.8.0",
219
219
  "@vitest/coverage-v8": "5.0.5",
220
- "eslint-plugin-zod": "5.2.0",
221
- "oxfmt": "0.73.0",
222
- "oxlint": "1.88.0",
223
- "oxlint-tsgolint": "7.0.2004",
220
+ "eslint-plugin-zod": "5.2.1",
221
+ "oxfmt": "0.74.0",
222
+ "oxlint": "1.89.0",
223
+ "oxlint-tsgolint": "7.0.2005",
224
224
  "sonda": "0.14.0",
225
225
  "tsdown": "0.23.1",
226
226
  "tsrs": "0.16.0-ts7.1.0-dev.20260929",