@tailor-platform/sdk 2.32.0 → 2.34.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 (356) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/ai/index.d.mts +1 -3
  3. package/dist/application-CwpOIOTt.mjs +1 -0
  4. package/dist/application-Nce5z46R.mjs +207 -0
  5. package/dist/application-Nce5z46R.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 +2 -0
  23. package/dist/cli/commands/deploy/tailordb/plan.d.mts +1 -0
  24. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +2 -1
  25. package/dist/cli/commands/deploy/workflow.d.mts +1 -0
  26. package/dist/cli/commands/executor/get.d.mts +0 -2
  27. package/dist/cli/commands/executor/jobs.d.mts +0 -2
  28. package/dist/cli/commands/executor/list.d.mts +1 -3
  29. package/dist/cli/commands/executor/transform.d.mts +1 -3
  30. package/dist/cli/commands/executor/trigger.d.mts +0 -2
  31. package/dist/cli/commands/executor/webhook.d.mts +1 -3
  32. package/dist/cli/commands/function/get.d.mts +0 -2
  33. package/dist/cli/commands/function/list.d.mts +0 -2
  34. package/dist/cli/commands/function/transform.d.mts +1 -3
  35. package/dist/cli/commands/generate/options.d.mts +1 -3
  36. package/dist/cli/commands/generate/seed/bundler.d.mts +1 -3
  37. package/dist/cli/commands/generate/service.d.mts +1 -3
  38. package/dist/cli/commands/machineuser/list.d.mts +1 -3
  39. package/dist/cli/commands/machineuser/token.d.mts +1 -3
  40. package/dist/cli/commands/oauth2client/get.d.mts +1 -3
  41. package/dist/cli/commands/oauth2client/list.d.mts +1 -3
  42. package/dist/cli/commands/oauth2client/transform.d.mts +1 -3
  43. package/dist/cli/commands/organization/folder/create.d.mts +0 -2
  44. package/dist/cli/commands/organization/folder/delete.d.mts +0 -2
  45. package/dist/cli/commands/organization/folder/get.d.mts +0 -2
  46. package/dist/cli/commands/organization/folder/list.d.mts +0 -2
  47. package/dist/cli/commands/organization/folder/update.d.mts +0 -2
  48. package/dist/cli/commands/organization/get.d.mts +0 -2
  49. package/dist/cli/commands/organization/list.d.mts +1 -3
  50. package/dist/cli/commands/organization/transform.d.mts +1 -3
  51. package/dist/cli/commands/organization/tree.d.mts +0 -2
  52. package/dist/cli/commands/organization/update.d.mts +0 -2
  53. package/dist/cli/commands/remove.d.mts +1 -3
  54. package/dist/cli/commands/show.d.mts +0 -2
  55. package/dist/cli/commands/staticwebsite/deploy.d.mts +1 -3
  56. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +1 -3
  57. package/dist/cli/commands/tailordb/migrate/config.d.mts +1 -3
  58. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +0 -2
  59. package/dist/cli/commands/tailordb/migrate/generate.d.mts +1 -3
  60. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +1 -3
  61. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +1 -3
  62. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +1 -3
  63. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +1 -3
  64. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +1 -3
  65. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +0 -2
  66. package/dist/cli/commands/tailordb/migrate/types.d.mts +1 -3
  67. package/dist/cli/commands/tailordb/truncate.d.mts +1 -3
  68. package/dist/cli/commands/workflow/executions.d.mts +0 -2
  69. package/dist/cli/commands/workflow/get.d.mts +0 -2
  70. package/dist/cli/commands/workflow/list.d.mts +1 -3
  71. package/dist/cli/commands/workflow/resume.d.mts +1 -3
  72. package/dist/cli/commands/workflow/start.d.mts +0 -2
  73. package/dist/cli/commands/workflow/status.d.mts +1 -3
  74. package/dist/cli/commands/workflow/transform.d.mts +1 -3
  75. package/dist/cli/commands/workflow/wait.d.mts +1 -3
  76. package/dist/cli/commands/workflow/waiter.d.mts +1 -3
  77. package/dist/cli/commands/workspace/app/health.d.mts +0 -2
  78. package/dist/cli/commands/workspace/app/list.d.mts +0 -2
  79. package/dist/cli/commands/workspace/app/transform.d.mts +1 -3
  80. package/dist/cli/commands/workspace/create.d.mts +0 -2
  81. package/dist/cli/commands/workspace/delete.d.mts +0 -2
  82. package/dist/cli/commands/workspace/expiry.d.mts +1 -3
  83. package/dist/cli/commands/workspace/get.d.mts +0 -2
  84. package/dist/cli/commands/workspace/list.d.mts +1 -3
  85. package/dist/cli/commands/workspace/restore.d.mts +0 -2
  86. package/dist/cli/commands/workspace/transform.d.mts +1 -3
  87. package/dist/cli/commands/workspace/user/invite.d.mts +0 -2
  88. package/dist/cli/commands/workspace/user/list.d.mts +0 -2
  89. package/dist/cli/commands/workspace/user/remove.d.mts +0 -2
  90. package/dist/cli/commands/workspace/user/transform.d.mts +1 -3
  91. package/dist/cli/commands/workspace/user/update.d.mts +0 -2
  92. package/dist/cli/lib.d.mts +1 -1
  93. package/dist/cli/lib.mjs +1 -1
  94. package/dist/cli/lib.mjs.map +1 -1
  95. package/dist/cli/main.d.mts +1 -3
  96. package/dist/cli/main.mjs +65 -50
  97. package/dist/cli/main.mjs.map +1 -1
  98. package/dist/cli/query/index.d.mts +0 -2
  99. package/dist/cli/services/application.d.mts +5 -4
  100. package/dist/cli/services/executor/service.d.mts +2 -2
  101. package/dist/cli/services/function-bundle.d.mts +7 -0
  102. package/dist/cli/services/http-adapter/bundler.d.mts +7 -1
  103. package/dist/cli/services/resolver/service.d.mts +2 -1
  104. package/dist/cli/services/workflow/bundler.d.mts +2 -3
  105. package/dist/cli/shared/args.d.mts +0 -2
  106. package/dist/cli/shared/beta.d.mts +1 -3
  107. package/dist/cli/shared/client.d.mts +56 -4
  108. package/dist/cli/shared/command.d.mts +2 -4
  109. package/dist/cli/shared/config-loader.d.mts +2 -4
  110. package/dist/cli/shared/config.d.mts +1 -3
  111. package/dist/cli/shared/context.d.mts +0 -2
  112. package/dist/cli/shared/error-diagnostics.d.mts +1 -3
  113. package/dist/cli/shared/error-json.d.mts +1 -3
  114. package/dist/cli/shared/function-execution.d.mts +1 -3
  115. package/dist/cli/shared/github-actions.d.mts +1 -3
  116. package/dist/cli/shared/logger.d.mts +7 -4
  117. package/dist/cli/shared/platform-bundle-plugin.d.mts +1 -0
  118. package/dist/cli/shared/prompt.d.mts +1 -3
  119. package/dist/cli/shared/readonly-guard.d.mts +0 -2
  120. package/dist/cli/shared/script-executor.d.mts +1 -3
  121. package/dist/cli/shared/seed-chunker.d.mts +1 -3
  122. package/dist/cli/shared/seed-context.d.mts +0 -2
  123. package/dist/cli/shared/sourcemap-sources.d.mts +1 -0
  124. package/dist/cli/shared/tailordb-namespaces.d.mts +1 -3
  125. package/dist/cli/shared/type-generator.d.mts +0 -2
  126. package/dist/cli/shared/workspace-name.d.mts +1 -3
  127. package/dist/cli/ts-hook.d.mts +0 -2
  128. package/dist/cli/ts-hook.mjs +0 -113
  129. package/dist/completion/zsh-worker.zsh +26 -6
  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 +6 -3
  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-CBwsdx16.mjs → kysely-type-DxyIWXc6.mjs} +3 -3
  185. package/dist/kysely-type-DxyIWXc6.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/enum-constants/index.mjs +2 -2
  193. package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
  194. package/dist/plugin/builtin/file-utils/index.d.mts +0 -2
  195. package/dist/plugin/builtin/kysely-type/index.d.mts +0 -2
  196. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  197. package/dist/plugin/builtin/seed/index.d.mts +0 -2
  198. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +1 -3
  199. package/dist/plugin/get-generated-table.d.mts +1 -3
  200. package/dist/plugin/index.mjs +1 -1
  201. package/dist/plugin/types.d.mts +3 -2
  202. package/dist/plugin/with-context.d.mts +1 -3
  203. package/dist/register-ts-hook-CtWJL3EO.mjs +1054 -0
  204. package/dist/register-ts-hook-CtWJL3EO.mjs.map +1 -0
  205. package/dist/repl-editor-DkrCZmmg.mjs +2 -0
  206. package/dist/repl-editor-DkrCZmmg.mjs.map +1 -0
  207. package/dist/runtime/aigateway.d.mts +1 -3
  208. package/dist/runtime/authconnection.d.mts +1 -3
  209. package/dist/runtime/context.d.mts +0 -2
  210. package/dist/runtime/date.d.mts +0 -2
  211. package/dist/runtime/field-parse.d.mts +0 -2
  212. package/dist/runtime/file.d.mts +0 -2
  213. package/dist/runtime/globals.d.mts +0 -2
  214. package/dist/runtime/iconv.d.mts +1 -3
  215. package/dist/runtime/idp.d.mts +1 -3
  216. package/dist/runtime/index.d.mts +1 -3
  217. package/dist/runtime/index.mjs +1 -1
  218. package/dist/runtime/logger.d.mts +1 -3
  219. package/dist/runtime/secretmanager.d.mts +1 -3
  220. package/dist/runtime/temporal.d.mts +0 -2
  221. package/dist/runtime/types.d.mts +0 -2
  222. package/dist/runtime/workflow.d.mts +0 -2
  223. package/dist/{schema-B6hJQWp6.mjs → schema-BU1aIQ63.mjs} +2 -2
  224. package/dist/{schema-B6hJQWp6.mjs.map → schema-BU1aIQ63.mjs.map} +1 -1
  225. package/dist/secret-file-BxZ-J_Nz.mjs +2 -0
  226. package/dist/secret-file-BxZ-J_Nz.mjs.map +1 -0
  227. package/dist/seed/idp-user-password.d.mts +0 -2
  228. package/dist/seed/index.d.mts +0 -2
  229. package/dist/service-CaGmqg0r.mjs +2 -0
  230. package/dist/{service-9rwi_I4d.mjs.map → service-CaGmqg0r.mjs.map} +1 -1
  231. package/dist/service-DEq_hdht.mjs +1 -0
  232. package/dist/{service-9SBPNpK8.mjs → service-eeXdVrDK.mjs} +4 -4
  233. package/dist/service-eeXdVrDK.mjs.map +1 -0
  234. package/dist/service_pb-6EkMfdOb.mjs +2 -0
  235. package/dist/service_pb-6EkMfdOb.mjs.map +1 -0
  236. package/dist/service_pb-CsJKokDl.mjs +1 -0
  237. package/dist/shared/src/color.d.mts +1 -3
  238. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +1 -3
  239. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +1 -3
  240. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +1 -3
  241. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +1 -3
  242. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +1 -3
  243. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +1 -3
  244. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +1 -3
  245. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +1 -3
  246. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +1 -3
  247. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +1 -3
  248. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +1 -3
  249. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +1 -3
  250. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +1 -3
  251. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +1 -3
  252. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +1 -3
  253. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +1 -3
  254. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +6 -5
  255. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +1 -3
  256. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +1 -3
  257. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +1 -3
  258. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +1 -3
  259. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +1 -3
  260. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +1 -3
  261. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +1 -3
  262. package/dist/tailor-proto/src/tailor/v1/security_pb.d.mts +211 -0
  263. package/dist/tailor-proto/src/tailor/v1/security_resource_pb.d.mts +299 -0
  264. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +201 -11
  265. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +1 -3
  266. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +1 -3
  267. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +201 -3
  268. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +88 -3
  269. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +1 -3
  270. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +1 -3
  271. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +1 -3
  272. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +1 -3
  273. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +1 -3
  274. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +1 -3
  275. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +1 -3
  276. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +1 -3
  277. package/dist/types/aigateway.generated.d.mts +1 -3
  278. package/dist/types/app-config.generated.d.mts +1 -3
  279. package/dist/types/auth-connection.generated.d.mts +1 -3
  280. package/dist/types/auth.generated.d.mts +1 -3
  281. package/dist/types/executor.generated.d.mts +1 -3
  282. package/dist/types/field.generated.d.mts +1 -3
  283. package/dist/types/helpers.d.mts +1 -3
  284. package/dist/types/http-adapter.generated.d.mts +1 -3
  285. package/dist/types/idp.generated.d.mts +1 -3
  286. package/dist/types/resolver.generated.d.mts +1 -3
  287. package/dist/types/secrets.generated.d.mts +1 -3
  288. package/dist/types/staticwebsite.generated.d.mts +10 -4
  289. package/dist/types/tailordb.generated.d.mts +1 -3
  290. package/dist/types/workflow.generated.d.mts +1 -3
  291. package/dist/utils/test/index.d.mts +1 -3
  292. package/dist/utils/test/index.mjs +1 -1
  293. package/dist/vitest/date-representation.d.mts +1 -3
  294. package/dist/vitest/environment.d.mts +0 -2
  295. package/dist/vitest/index.d.mts +2 -4
  296. package/dist/vitest/index.mjs +1 -1
  297. package/dist/vitest/index.mjs.map +1 -1
  298. package/dist/vitest/migration-steps.d.mts +1 -3
  299. package/dist/vitest/mock-kysely.d.mts +0 -2
  300. package/dist/vitest/mocks/aigateway.d.mts +0 -2
  301. package/dist/vitest/mocks/authconnection.d.mts +0 -2
  302. package/dist/vitest/mocks/file.d.mts +0 -2
  303. package/dist/vitest/mocks/iconv.d.mts +0 -2
  304. package/dist/vitest/mocks/idp.d.mts +0 -2
  305. package/dist/vitest/mocks/logger.d.mts +0 -2
  306. package/dist/vitest/mocks/secretmanager.d.mts +0 -2
  307. package/dist/vitest/mocks/tailordb-pglite.d.mts +0 -2
  308. package/dist/vitest/mocks/tailordb.d.mts +0 -2
  309. package/dist/vitest/mocks/workflow.d.mts +0 -2
  310. package/dist/vitest/pglite-kysely.d.mts +19 -2
  311. package/dist/vitest/pglite-temporal.d.mts +1 -3
  312. package/dist/vitest/setup.d.mts +0 -2
  313. package/dist/vitest/workflow-local.d.mts +0 -2
  314. package/dist/{workspace_resource_pb-CaoM2npP.mjs → workspace_resource_pb-C4CkoYww.mjs} +2 -2
  315. package/dist/workspace_resource_pb-C4CkoYww.mjs.map +1 -0
  316. package/docs/cli/application.md +2 -1
  317. package/docs/cli/tailordb.md +1 -1
  318. package/docs/cli/user.md +5 -5
  319. package/docs/cli/workspace.md +1 -1
  320. package/docs/cli-reference.md +26 -25
  321. package/docs/configuration.md +13 -2
  322. package/docs/github-actions.md +33 -10
  323. package/docs/plugin/custom.md +34 -0
  324. package/docs/plugin/index.md +1 -0
  325. package/docs/services/secret.md +6 -0
  326. package/docs/services/staticwebsite.md +31 -1
  327. package/docs/services/tailordb/index.md +19 -0
  328. package/docs/services/tailordb/migration.md +35 -12
  329. package/docs/testing.md +2 -2
  330. package/package.json +16 -16
  331. package/dist/application-C2bPmmbh.mjs +0 -1
  332. package/dist/application-D0xNJbag.mjs +0 -199
  333. package/dist/application-D0xNJbag.mjs.map +0 -1
  334. package/dist/crashreport-IN6H7GX3.mjs +0 -1
  335. package/dist/errors-BOF68LJ5.mjs +0 -5
  336. package/dist/errors-BOF68LJ5.mjs.map +0 -1
  337. package/dist/field-parse-C41e3UAF.mjs +0 -2
  338. package/dist/guards-yDXyKC9F.mjs +0 -2
  339. package/dist/guards-yDXyKC9F.mjs.map +0 -1
  340. package/dist/kysely-type-CBwsdx16.mjs.map +0 -1
  341. package/dist/logger-RgtbhJ83.mjs.map +0 -1
  342. package/dist/manager-Bk-7vkwd.mjs +0 -2
  343. package/dist/manager-Bk-7vkwd.mjs.map +0 -1
  344. package/dist/register-ts-hook-_dHIREtU.mjs +0 -1050
  345. package/dist/register-ts-hook-_dHIREtU.mjs.map +0 -1
  346. package/dist/repl-editor-DGJBfIt1.mjs +0 -2
  347. package/dist/repl-editor-DGJBfIt1.mjs.map +0 -1
  348. package/dist/secret-file-C9wp_FCX.mjs +0 -2
  349. package/dist/secret-file-C9wp_FCX.mjs.map +0 -1
  350. package/dist/service-9SBPNpK8.mjs.map +0 -1
  351. package/dist/service-9rwi_I4d.mjs +0 -2
  352. package/dist/service-Ca1WwyIt.mjs +0 -1
  353. package/dist/service_pb-Bbu2QSIr.mjs +0 -2
  354. package/dist/service_pb-Bbu2QSIr.mjs.map +0 -1
  355. package/dist/service_pb-urxAIYHT.mjs +0 -1
  356. package/dist/workspace_resource_pb-CaoM2npP.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./assert-WeXvmG4j.mjs";import{GraphQLError as t,Lexer as n,Source as r,TokenKind as i}from"graphql";import{getSegments as a}from"sql-highlight";const o=`\x1B[0m`,s=`\x1B[34m`,c=`\x1B[35m`,l=`\x1B[33m`,u=`\x1B[36m`,d=`\x1B[1;35m`,f=`\x1B[32m`,p=`\x1B[90m`,m=`\x1B[2;33m`,h={keyword:s,function:c,identifier:l,string:`\x1B[92m`,number:u,bracket:m,special:p,comment:p};function createPieceBuffer(){let e=[],t=``,flushCode=()=>{t&&e.push({text:t,literal:!1}),t=``};return{addCode(e){t+=e},addLiteral(t,n){flushCode(),e.push({text:t,literal:!0,comment:n})},finish(){return flushCode(),e}}}const g=/^\$(?:[A-Za-z_][A-Za-z0-9_]*)?\$/;function splitSqlLine(e,t){let n=t,r=createPieceBuffer(),i=0,takeBlockComment=t=>{let a=t;for(;a<e.length&&n>0;)e.startsWith(`/*`,a)?(n++,a+=2):e.startsWith(`*/`,a)?(n--,a+=2):a++;r.addLiteral(e.slice(i,a)),i=a};for(;i<e.length;){let t=e[i]===`$`?e.slice(i).match(g)?.[0]:void 0;if(n>0)takeBlockComment(i);else if(e.startsWith(`/*`,i))n=1,takeBlockComment(i+2);else if(e.startsWith(`--`,i))r.addLiteral(e.slice(i)),i=e.length;else if(t){let n=e.indexOf(t,i+t.length),a=n===-1?e.length:n+t.length;r.addCode(e.slice(i,a)),i=a}else if(e[i]===`'`||e[i]===`"`){let t=e[i],n=i+1;for(;n<e.length&&e[n]!==t;)n++;r.addCode(e.slice(i,n+1)),i=n+1}else r.addCode(e.charAt(i)),i++}return{pieces:r.finish(),depth:n}}function highlightSqlLines(e){let t=0;return e.map(e=>{let n=splitSqlLine(e,t);return t=n.depth,n.pieces.map(e=>e.literal?`${p}${e.text}${o}`:highlightSqlCode(e.text)).join(``)})}function highlightSqlCode(e){let t=a(e),n=``;for(let e of t){let t=h[e.name];n+=t?t+e.content+o:e.content}return n}const _=/* @__PURE__ */ new Set([`query`,`mutation`,`subscription`,`fragment`,`on`,`type`,`input`,`enum`,`interface`,`union`,`scalar`,`extend`,`schema`,`directive`,`implements`]),v=/* @__PURE__ */ new Set([`query`,`mutation`,`subscription`,`fragment`]),y=/* @__PURE__ */ new Set([`true`,`false`,`null`]);function splitGraphqlLine(e,t){let n=t,r=createPieceBuffer(),i=0,takeBlockString=t=>{let a=t;for(;a<e.length;)if(e.startsWith(`\\"""`,a))a+=4;else if(e.startsWith(`"""`,a))break;else a++;let o=a<e.length,s=o?a+3:e.length;r.addLiteral(e.slice(i,s)),i=s,n=!o};for(;i<e.length;)if(n)takeBlockString(i);else if(e.startsWith(`"""`,i))takeBlockString(i+3);else if(e[i]===`"`){let t=i+1;for(;t<e.length&&e[t]!==`"`;)t+=e[t]===`\\`?2:1;r.addCode(e.slice(i,t+1)),i=t+1}else e[i]===`#`?(r.addLiteral(e.slice(i),!0),i=e.length):(r.addCode(e.charAt(i)),i++);return{pieces:r.finish(),inBlockString:n}}function highlightGraphqlLines(e){let t=!1;return e.map(e=>{let n=splitGraphqlLine(e,t);t=n.inBlockString;let r={parenDepth:0,prevKind:``,prevText:``,afterColon:!1};return n.pieces.map(e=>e.literal?(e.comment||(r.prevKind=i.BLOCK_STRING,r.prevText=e.text,r.afterColon=!1),`${e.comment?p:f}${e.text}${o}`):highlightGraphqlCode(e.text,r)).join(``)})}function highlightGraphqlCode(e,a){try{let t=new r(e),h=new n(t),g=``,b=0,x=h.advance();for(;x.kind!==i.EOF;){x.start>b&&(g+=e.slice(b,x.start));let t=e.slice(x.start,x.end);switch(x.kind){case i.NAME:a.prevKind===i.DOLLAR?g+=`${c}${t}${o}`:a.prevKind===i.AT?g+=`${d}${t}${o}`:y.has(t)||_.has(t)?g+=`${s}${t}${o}`:v.has(a.prevText)?g+=`${t}${o}`:a.afterColon?g+=`${u}${t}${o}`:a.parenDepth>0?g+=`${t}${o}`:g+=`${t}${o}`,a.afterColon=!1;break;case i.INT:case i.FLOAT:g+=`${s}${t}${o}`,a.afterColon=!1;break;case i.STRING:case i.BLOCK_STRING:g+=`${f}${t}${o}`,a.afterColon=!1;break;case i.DOLLAR:g+=`${c}${t}${o}`,a.afterColon=!1;break;case i.AT:g+=`${d}${t}${o}`,a.afterColon=!1;break;case i.BRACE_L:case i.BRACE_R:g+=`${l}${t}${o}`,a.afterColon=!1;break;case i.PAREN_L:a.parenDepth+=1,g+=`${m}${t}${o}`,a.afterColon=!1;break;case i.PAREN_R:a.parenDepth=Math.max(0,a.parenDepth-1),g+=`${m}${t}${o}`,a.afterColon=!1;break;case i.BRACKET_L:case i.BRACKET_R:g+=`${m}${t}${o}`,a.afterColon=!1;break;case i.COLON:g+=`${p}${t}${o}`,a.afterColon=!0;break;case i.BANG:case i.EQUALS:case i.PIPE:case i.AMP:case i.SPREAD:g+=`${p}${t}${o}`,a.afterColon=!1;break;default:g+=t,a.afterColon=!1}a.prevKind=x.kind,a.prevText=t,b=x.end,x=h.advance()}return b<e.length&&(g+=e.slice(b)),g}catch(n){if(n instanceof t)return e;throw n}}const b={"(":`)`,"[":`]`,"{":`}`},x=new Set(Object.values(b));function replTransform(t,n){let{lines:r,row:i,col:a}=t;if(n.type===`insert`&&n.char in b){let t=b[n.char],o=e(r[i],`line at row ${i} missing`),s=o.slice(0,a)+t+o.slice(a);return{lines:r.with(i,s),row:i,col:a}}if(n.type===`insert`&&x.has(n.char)){let t=e(r[i],`line at row ${i} missing`);if(t[a]===n.char){let e=t.slice(0,a)+t.slice(a+1);return{lines:r.with(i,e),row:i,col:a}}}if(n.type===`backspace`){let t=e(r[i],`line at row ${i} missing`),n=t.slice(0,a);if(n.length>=1&&/^ +$/.test(n)){let e=n.slice(0,-1),o=e+t.slice(a);return{lines:r.with(i,o),row:i,col:e.length}}}if(n.type===`newline`&&i>0){let t=e(r[i-1],`line at row ${i-1} missing`),n=t.match(/^(\s*)/)?.[1]??``,o=/[{([]$/.test(t.trimEnd()),s=e(r[i],`line at row ${i} missing`),c=/^[}\])]/.test(s.trimStart());if(o&&c){let e=n+` `;return{lines:r.with(i,e).toSpliced(i+1,0,n+s.trimStart()),row:i,col:e.length}}if(o){let e=t.trimEnd().slice(-1),a=b[e]??`}`,o=n+` `;return{lines:r.with(i,o+s).toSpliced(i+1,0,n+a),row:i,col:o.length}}if(n&&a===0)return{lines:r.with(i,n+s),row:i,col:n.length}}}export{highlightGraphqlLines,highlightSqlLines,replTransform};
2
+ //# sourceMappingURL=repl-editor-DkrCZmmg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repl-editor-DkrCZmmg.mjs","names":["assertDefined","RESET","BLUE","MAGENTA","YELLOW","CYAN","BOLD_MAGENTA","GREEN","DIM","DIM_YELLOW","SQL_STYLE_MAP","pieces","code","text","DOLLAR_QUOTE_TAG","depth","startDepth","buffer","j","from","line","dollarTag","close","stop","quote","lines","split","piece","segments","getSegments","result","seg","style","GQL_KEYWORDS","GQL_DEF_KEYWORDS","GQL_BUILTINS","inBlockString","startsInBlockString","closed","context","TokenKind","source","Source","lexer","Lexer","pos","token","error","GraphQLError","BRACKET_PAIRS","CLOSE_BRACKETS","state","event","row","newLine","col","beforeCursor","newIndent","prevLine","baseIndent","endsWithOpen","currentLine","startsWithClose","innerIndent","openChar","closeChar","indent"],"sources":["../src/cli/query/repl-editor.ts"],"sourcesContent":["import { GraphQLError, Lexer, Source, TokenKind } from \"graphql\";\nimport { getSegments } from \"sql-highlight\";\nimport { assertDefined } from \"#/utils/assert\";\nimport type { TransformEvent, TransformState } from \"@toiroakr/read-multiline\";\n\n// ANSI colour sequences. Kept inline (rather than going through `node:util`\n// styleText) so that tests running outside a TTY still produce deterministic\n// escape sequences regardless of detected colour support.\nconst RESET = \"\\x1b[0m\";\nconst BLUE = \"\\x1b[34m\";\nconst MAGENTA = \"\\x1b[35m\";\nconst YELLOW = \"\\x1b[33m\";\nconst BRIGHT_GREEN = \"\\x1b[92m\";\nconst CYAN = \"\\x1b[36m\";\nconst BRIGHT_BLUE = \"\\x1b[94m\";\nconst BOLD_CYAN = \"\\x1b[1;36m\";\nconst BOLD_MAGENTA = \"\\x1b[1;35m\";\nconst ITALIC_YELLOW = \"\\x1b[3;33m\";\nconst GREEN = \"\\x1b[32m\";\nconst DIM = \"\\x1b[90m\";\nconst DIM_YELLOW = \"\\x1b[2;33m\";\n\nconst SQL_STYLE_MAP: Record<string, string> = {\n keyword: BLUE,\n function: MAGENTA,\n identifier: YELLOW,\n string: BRIGHT_GREEN,\n number: CYAN,\n bracket: DIM_YELLOW,\n special: DIM,\n comment: DIM,\n};\n\ntype Piece = { text: string; literal: boolean; comment?: boolean };\n\nfunction createPieceBuffer() {\n const pieces: Piece[] = [];\n let code = \"\";\n const flushCode = () => {\n if (code) pieces.push({ text: code, literal: false });\n code = \"\";\n };\n return {\n addCode(text: string) {\n code += text;\n },\n addLiteral(text: string, comment?: boolean) {\n flushCode();\n pieces.push({ text, literal: true, comment });\n },\n finish() {\n flushCode();\n return pieces;\n },\n };\n}\n\nconst DOLLAR_QUOTE_TAG = /^\\$(?:[A-Za-z_][A-Za-z0-9_]*)?\\$/;\n\nfunction splitSqlLine(line: string, startDepth: number) {\n let depth = startDepth;\n const buffer = createPieceBuffer();\n let i = 0;\n const takeBlockComment = (from: number) => {\n let j = from;\n while (j < line.length && depth > 0) {\n if (line.startsWith(\"/*\", j)) {\n depth++;\n j += 2;\n } else if (line.startsWith(\"*/\", j)) {\n depth--;\n j += 2;\n } else {\n j++;\n }\n }\n buffer.addLiteral(line.slice(i, j));\n i = j;\n };\n while (i < line.length) {\n const dollarTag = line[i] === \"$\" ? line.slice(i).match(DOLLAR_QUOTE_TAG)?.[0] : undefined;\n if (depth > 0) {\n takeBlockComment(i);\n } else if (line.startsWith(\"/*\", i)) {\n depth = 1;\n takeBlockComment(i + 2);\n } else if (line.startsWith(\"--\", i)) {\n buffer.addLiteral(line.slice(i));\n i = line.length;\n } else if (dollarTag) {\n const close = line.indexOf(dollarTag, i + dollarTag.length);\n const stop = close === -1 ? line.length : close + dollarTag.length;\n buffer.addCode(line.slice(i, stop));\n i = stop;\n } else if (line[i] === \"'\" || line[i] === '\"') {\n const quote = line[i];\n let j = i + 1;\n while (j < line.length && line[j] !== quote) j++;\n buffer.addCode(line.slice(i, j + 1));\n i = j + 1;\n } else {\n buffer.addCode(line.charAt(i));\n i++;\n }\n }\n return { pieces: buffer.finish(), depth };\n}\n\n/**\n * Highlight SQL lines, tracking block comments that span lines.\n * @param lines - SQL text split into editor lines\n * @returns ANSI-decorated lines, one per input line\n */\nexport function highlightSqlLines(lines: readonly string[]): string[] {\n let depth = 0;\n return lines.map((line) => {\n const split = splitSqlLine(line, depth);\n depth = split.depth;\n return split.pieces\n .map((piece) =>\n piece.literal ? `${DIM}${piece.text}${RESET}` : highlightSqlCode(piece.text),\n )\n .join(\"\");\n });\n}\n\nfunction highlightSqlCode(line: string): string {\n const segments = getSegments(line);\n let result = \"\";\n for (const seg of segments) {\n const style = SQL_STYLE_MAP[seg.name];\n result += style ? style + seg.content + RESET : seg.content;\n }\n return result;\n}\n\nconst GQL_KEYWORDS = new Set([\n \"query\",\n \"mutation\",\n \"subscription\",\n \"fragment\",\n \"on\",\n \"type\",\n \"input\",\n \"enum\",\n \"interface\",\n \"union\",\n \"scalar\",\n \"extend\",\n \"schema\",\n \"directive\",\n \"implements\",\n]);\n\n// Keywords that introduce a definition name (next NAME token is the def).\nconst GQL_DEF_KEYWORDS = new Set([\"query\", \"mutation\", \"subscription\", \"fragment\"]);\n\nconst GQL_BUILTINS = new Set([\"true\", \"false\", \"null\"]);\n\nfunction splitGraphqlLine(line: string, startsInBlockString: boolean) {\n let inBlockString = startsInBlockString;\n const buffer = createPieceBuffer();\n let i = 0;\n const takeBlockString = (from: number) => {\n let j = from;\n while (j < line.length) {\n if (line.startsWith('\\\\\"\"\"', j)) j += 4;\n else if (line.startsWith('\"\"\"', j)) break;\n else j++;\n }\n const closed = j < line.length;\n const stop = closed ? j + 3 : line.length;\n buffer.addLiteral(line.slice(i, stop));\n i = stop;\n inBlockString = !closed;\n };\n while (i < line.length) {\n if (inBlockString) {\n takeBlockString(i);\n } else if (line.startsWith('\"\"\"', i)) {\n takeBlockString(i + 3);\n } else if (line[i] === '\"') {\n let j = i + 1;\n while (j < line.length && line[j] !== '\"') j += line[j] === \"\\\\\" ? 2 : 1;\n buffer.addCode(line.slice(i, j + 1));\n i = j + 1;\n } else if (line[i] === \"#\") {\n buffer.addLiteral(line.slice(i), true);\n i = line.length;\n } else {\n buffer.addCode(line.charAt(i));\n i++;\n }\n }\n return { pieces: buffer.finish(), inBlockString };\n}\n\n/**\n * Highlight GraphQL lines, tracking block strings that span lines.\n * @param lines - GraphQL text split into editor lines\n * @returns ANSI-decorated lines, one per input line\n */\nexport function highlightGraphqlLines(lines: readonly string[]): string[] {\n let inBlockString = false;\n return lines.map((line) => {\n const split = splitGraphqlLine(line, inBlockString);\n inBlockString = split.inBlockString;\n const context: GraphqlContext = {\n parenDepth: 0,\n prevKind: \"\",\n prevText: \"\",\n afterColon: false,\n };\n return split.pieces\n .map((piece) => {\n if (!piece.literal) return highlightGraphqlCode(piece.text, context);\n if (!piece.comment) {\n context.prevKind = TokenKind.BLOCK_STRING;\n context.prevText = piece.text;\n context.afterColon = false;\n }\n return `${piece.comment ? DIM : GREEN}${piece.text}${RESET}`;\n })\n .join(\"\");\n });\n}\n\ntype GraphqlContext = {\n parenDepth: number;\n prevKind: string;\n prevText: string;\n afterColon: boolean;\n};\n\n/**\n * Highlight a single GraphQL code fragment using the official `graphql` Lexer.\n * Tracks paren depth and the previous token to provide semantic-level colouring\n * (field names vs argument names vs types).\n * @param line - GraphQL text without comments or block strings\n * @param context - Lexer state shared by the fragments of one editor line; updated in place\n * @returns ANSI-decorated line, or the input unchanged when the lexer rejects it\n */\nfunction highlightGraphqlCode(line: string, context: GraphqlContext): string {\n try {\n const source = new Source(line);\n const lexer = new Lexer(source);\n let result = \"\";\n let pos = 0;\n\n let token = lexer.advance();\n while (token.kind !== TokenKind.EOF) {\n if (token.start > pos) {\n result += line.slice(pos, token.start);\n }\n\n const text = line.slice(token.start, token.end);\n switch (token.kind) {\n case TokenKind.NAME: {\n if (context.prevKind === TokenKind.DOLLAR) {\n result += `${MAGENTA}${text}${RESET}`;\n } else if (context.prevKind === TokenKind.AT) {\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n } else if (GQL_BUILTINS.has(text) || GQL_KEYWORDS.has(text)) {\n result += `${BLUE}${text}${RESET}`;\n } else if (GQL_DEF_KEYWORDS.has(context.prevText)) {\n result += `${BOLD_CYAN}${text}${RESET}`;\n } else if (context.afterColon) {\n result += `${CYAN}${text}${RESET}`;\n } else if (context.parenDepth > 0) {\n result += `${ITALIC_YELLOW}${text}${RESET}`;\n } else {\n result += `${BRIGHT_BLUE}${text}${RESET}`;\n }\n context.afterColon = false;\n break;\n }\n case TokenKind.INT:\n case TokenKind.FLOAT:\n result += `${BLUE}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n result += `${GREEN}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.DOLLAR:\n result += `${MAGENTA}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.AT:\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.BRACE_L:\n case TokenKind.BRACE_R:\n result += `${YELLOW}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.PAREN_L:\n context.parenDepth += 1;\n result += `${DIM_YELLOW}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.PAREN_R:\n context.parenDepth = Math.max(0, context.parenDepth - 1);\n result += `${DIM_YELLOW}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.BRACKET_L:\n case TokenKind.BRACKET_R:\n result += `${DIM_YELLOW}${text}${RESET}`;\n context.afterColon = false;\n break;\n case TokenKind.COLON:\n result += `${DIM}${text}${RESET}`;\n context.afterColon = true;\n break;\n case TokenKind.BANG:\n case TokenKind.EQUALS:\n case TokenKind.PIPE:\n case TokenKind.AMP:\n case TokenKind.SPREAD:\n result += `${DIM}${text}${RESET}`;\n context.afterColon = false;\n break;\n default:\n result += text;\n context.afterColon = false;\n }\n\n context.prevKind = token.kind;\n context.prevText = text;\n pos = token.end;\n token = lexer.advance();\n }\n\n if (pos < line.length) {\n result += line.slice(pos);\n }\n return result;\n } catch (error) {\n // The lexer throws GraphQLError on partial or invalid input (e.g. an\n // unterminated string while the user is still typing). Fall back to the\n // raw line so the editor keeps rendering without colour until the input\n // is valid. Any other error is a real bug and should surface.\n if (error instanceof GraphQLError) {\n return line;\n }\n throw error;\n }\n}\n\nconst BRACKET_PAIRS: Record<string, string> = { \"(\": \")\", \"[\": \"]\", \"{\": \"}\" };\nconst CLOSE_BRACKETS = new Set(Object.values(BRACKET_PAIRS));\n\n/**\n * Apply auto-close brackets and auto-indent on newline. Works for both SQL\n * and GraphQL because both languages share the `()`, `[]`, `{}` bracket set.\n * @param state - Editor state after the last edit\n * @param event - Event describing the edit that just occurred\n * @returns A new editor state to apply, or `undefined` to leave the state unchanged\n */\nexport function replTransform(\n state: TransformState,\n event: TransformEvent,\n): TransformState | undefined {\n const { lines, row, col } = state;\n\n if (event.type === \"insert\" && event.char in BRACKET_PAIRS) {\n const close = BRACKET_PAIRS[event.char];\n const line = assertDefined(lines[row], `line at row ${row} missing`);\n const newLine = line.slice(0, col) + close + line.slice(col);\n return { lines: lines.with(row, newLine), row, col };\n }\n\n if (event.type === \"insert\" && CLOSE_BRACKETS.has(event.char)) {\n const line = assertDefined(lines[row], `line at row ${row} missing`);\n if (line[col] === event.char) {\n const newLine = line.slice(0, col) + line.slice(col + 1);\n return { lines: lines.with(row, newLine), row, col };\n }\n }\n\n if (event.type === \"backspace\") {\n const line = assertDefined(lines[row], `line at row ${row} missing`);\n const beforeCursor = line.slice(0, col);\n if (beforeCursor.length >= 1 && /^ +$/.test(beforeCursor)) {\n const newIndent = beforeCursor.slice(0, -1);\n const newLine = newIndent + line.slice(col);\n return { lines: lines.with(row, newLine), row, col: newIndent.length };\n }\n }\n\n if (event.type === \"newline\" && row > 0) {\n const prevLine = assertDefined(lines[row - 1], `line at row ${row - 1} missing`);\n const baseIndent = prevLine.match(/^(\\s*)/)?.[1] ?? \"\";\n const endsWithOpen = /[{([]$/.test(prevLine.trimEnd());\n const currentLine = assertDefined(lines[row], `line at row ${row} missing`);\n const startsWithClose = /^[}\\])]/.test(currentLine.trimStart());\n\n if (endsWithOpen && startsWithClose) {\n // Bracket expansion: the cursor sits between a matching open/close\n // pair (e.g. `{|}`). Expand into a three-line block with the cursor\n // on an indented middle line.\n const innerIndent = baseIndent + \" \";\n const newLines = lines\n .with(row, innerIndent)\n .toSpliced(row + 1, 0, baseIndent + currentLine.trimStart());\n return { lines: newLines, row, col: innerIndent.length };\n }\n if (endsWithOpen) {\n // A lone open bracket on the previous line: drop an extra indent for\n // the new line and auto-insert the matching closing bracket below.\n const openChar = prevLine.trimEnd().slice(-1);\n const closeChar = BRACKET_PAIRS[openChar] ?? \"}\";\n const indent = baseIndent + \" \";\n const newLines = lines\n .with(row, indent + currentLine)\n .toSpliced(row + 1, 0, baseIndent + closeChar);\n return { lines: newLines, row, col: indent.length };\n }\n if (baseIndent && col === 0) {\n return {\n lines: lines.with(row, baseIndent + currentLine),\n row,\n col: baseIndent.length,\n };\n }\n }\n\n return undefined;\n}\n"],"mappings":"A,mKAQA,MAAMC,EAAQ,UACRC,EAAO,WACPC,EAAU,WACVC,EAAS,WAETC,EAAO,WAGPC,EAAe,aAEfC,EAAQ,WACRC,EAAM,WACNC,EAAa,aAEbC,EAAwC,CAC5C,QAASR,EACT,SAAUC,EACV,WAAYC,EACZ,OAAQ,WACR,OAAQC,EACR,QAASI,EACT,QAASD,EACT,QAASA,CACX,EAIA,SAAS,mBAAoB,CAC3B,IAAMG,EAAkB,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cyB,EAAM4B,GAAM,eAAeA,EAAI,SAAS,EACpES,EAAkB,UAAU,KAAKD,EAAY,UAAU,CAAC,EAE9D,GAAID,GAAgBE,EAAiB,CAInC,IAAMC,EAAcJ,EAAa,KAIjC,MAAO,CAAE,MAHQlC,EACd,KAAK4B,EAAKU,CAAW,CAAC,CACtB,UAAUV,EAAM,EAAG,EAAGM,EAAaE,EAAY,UAAU,CACrC,EAAG,MAAK,IAAKE,EAAY,MAAO,CACzD,CACA,GAAIH,EAAc,CAGhB,IAAMI,EAAWN,EAAS,QAAQ,CAAC,CAAC,MAAM,EAAE,EACtCO,EAAYhB,EAAce,IAAa,IACvCE,EAASP,EAAa,KAI5B,MAAO,CAAE,MAHQlC,EACd,KAAK4B,EAAKa,EAASL,CAAW,CAAC,CAC/B,UAAUR,EAAM,EAAG,EAAGM,EAAaM,CACf,EAAG,MAAK,IAAKC,EAAO,MAAO,CACpD,CACA,GAAIP,GAAcJ,IAAQ,EACxB,MAAO,CACL,MAAO9B,EAAM,KAAK4B,EAAKM,EAAaE,CAAW,EAC/C,MACA,IAAKF,EAAW,MAClB,CAEJ,CAGF,C"}
@@ -1,5 +1,4 @@
1
1
  import { AIGatewayName } from "@tailor-platform/sdk";
2
- //#region src/runtime/aigateway.d.ts
3
2
  /** Result of {@link TailorAigatewayAPI.get}. */
4
3
  export interface GetAIGatewayResult {
5
4
  /** The platform-assigned URL of the AI Gateway. */
@@ -20,5 +19,4 @@ export interface TailorAigatewayAPI {
20
19
  /** Runtime wrapper namespace for `tailor.aigateway`. */
21
20
  export declare const aigateway: {
22
21
  readonly get: (name: AIGatewayName) => Promise<GetAIGatewayResult>;
23
- };
24
- //#endregion
22
+ };
@@ -1,6 +1,5 @@
1
1
  import { AuthConnectionTokenResult as AuthConnectionTokenResult$1 } from "../configure/services/auth/types.mjs";
2
2
  import { ConnectionName } from "@tailor-platform/sdk";
3
- //#region src/runtime/authconnection.d.ts
4
3
  /**
5
4
  * Platform API surface for `tailor.authconnection`. Describes the shape the
6
5
  * platform runtime injects on `globalThis.tailor.authconnection`.
@@ -16,5 +15,4 @@ export interface TailorAuthconnectionAPI {
16
15
  /** Runtime wrapper namespace for `tailor.authconnection`. */
17
16
  export declare const authconnection: {
18
17
  readonly getConnectionToken: (connectionName: ConnectionName) => Promise<AuthConnectionTokenResult$1>;
19
- };
20
- //#endregion
18
+ };
@@ -1,5 +1,4 @@
1
1
  import { TailorPrincipal } from "./types.mjs";
2
- //#region src/runtime/context.d.ts
3
2
  /**
4
3
  * Information about the invoker of the current function execution.
5
4
  *
@@ -50,5 +49,4 @@ declare function getInvoker(): Invoker | null;
50
49
  export declare const context: {
51
50
  readonly getInvoker: typeof getInvoker;
52
51
  };
53
- //#endregion
54
52
  export {};
@@ -1,5 +1,4 @@
1
1
  import { FieldMetadata, TailorFieldType } from "../configure/types/field.types.mjs";
2
- //#region src/runtime/date.d.ts
3
2
  type DateField = {
4
3
  readonly type: TailorFieldType;
5
4
  readonly metadata: FieldMetadata;
@@ -13,5 +12,4 @@ type DateField = {
13
12
  * @internal
14
13
  */
15
14
  export declare function serializeDateFields(field: DateField, value: unknown): unknown;
16
- //#endregion
17
15
  export {};
@@ -1,7 +1,6 @@
1
1
  import { FieldMetadata, TailorFieldType } from "../configure/types/field.types.mjs";
2
2
  import { TailorPrincipal } from "./types.mjs";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
- //#region src/runtime/field-parse.d.ts
5
4
  export type FieldParseArgs = {
6
5
  value: unknown;
7
6
  data: unknown;
@@ -23,5 +22,4 @@ type ParsableField<Output> = FieldRuntime & {
23
22
  * @returns Validation result with Date and Temporal fields converted
24
23
  */
25
24
  export declare function parseDateFields<Output>(field: ParsableField<Output>, args: FieldParseArgs): StandardSchemaV1.Result<Output>;
26
- //#endregion
27
25
  export {};
@@ -1,4 +1,3 @@
1
- //#region src/runtime/file.d.ts
2
1
  /**
3
2
  * TailorDB file (BLOB) utilities.
4
3
  *
@@ -210,5 +209,4 @@ export declare const file: {
210
209
  readonly downloadStream: (namespace: string, tableName: string, fieldName: string, recordId: string) => Promise<FileDownloadStreamResponse>;
211
210
  readonly uploadStream: (namespace: string, tableName: string, fieldName: string, recordId: string, readableStream: ReadableStream<Uint8Array | ArrayBuffer>, options?: FileUploadStreamOptions) => Promise<FileUploadResponse>;
212
211
  };
213
- //#endregion
214
212
  export {};
@@ -5,7 +5,6 @@ import { IconvInstance } from "./iconv.mjs";
5
5
  import { ClientConfig, CreateUserInput, IdpClientInstance, ListUsersOptions, ListUsersResponse, SendPasswordResetEmailInput, UnenrollMfaInput, UpdateUserInput, User, UserQuery } from "./idp.mjs";
6
6
  import { LogAttributeValue, LogAttributes } from "./logger.mjs";
7
7
  import { TailorRuntime, TailordbClientInstance, TailordbCommandType, TailordbQueryResult, TailordbRuntime } from "./index.mjs";
8
- //#region src/runtime/globals.d.ts
9
8
  type TailorIdpClientConfig = ClientConfig;
10
9
  type TailorIdpCreateUserInput = CreateUserInput;
11
10
  type TailorIdpClientInstance = IdpClientInstance;
@@ -79,5 +78,4 @@ declare global {
79
78
  errors: TailorErrorItem[];
80
79
  }
81
80
  }
82
- //#endregion
83
81
  export {};
@@ -1,4 +1,3 @@
1
- //#region src/runtime/iconv.d.ts
2
1
  /**
3
2
  * Character encoding conversion utilities.
4
3
  *
@@ -68,5 +67,4 @@ export interface TailorIconvAPI {
68
67
  Iconv: IconvConstructor;
69
68
  }
70
69
  /** Runtime API for `tailor.iconv`. */
71
- export declare const iconv: TailorIconvAPI;
72
- //#endregion
70
+ export declare const iconv: TailorIconvAPI;
@@ -1,4 +1,3 @@
1
- //#region src/runtime/idp.d.ts
2
1
  /**
3
2
  * IDP (Identity Provider) utilities.
4
3
  *
@@ -130,5 +129,4 @@ export interface TailorIdpAPI {
130
129
  Client: IdpClientConstructor;
131
130
  }
132
131
  /** Runtime API for `tailor.idp`. */
133
- export declare const idp: TailorIdpAPI;
134
- //#endregion
132
+ export declare const idp: TailorIdpAPI;
@@ -1,5 +1,5 @@
1
- import { parseDateFields } from "./field-parse.mjs";
2
1
  import { PlatformWorkflowAPI, workflow } from "./workflow.mjs";
2
+ import { parseDateFields } from "./field-parse.mjs";
3
3
  import { TailorAigatewayAPI, aigateway } from "./aigateway.mjs";
4
4
  import { TailorAuthconnectionAPI, authconnection } from "./authconnection.mjs";
5
5
  import { PlatformContextAPI, context } from "./context.mjs";
@@ -10,7 +10,6 @@ import { TailorLoggerAPI, logger } from "./logger.mjs";
10
10
  import { TailorSecretmanagerAPI, secretmanager } from "./secretmanager.mjs";
11
11
  import { Temporal } from "./temporal.mjs";
12
12
  import { serializeDateFields } from "./date.mjs";
13
- //#region src/runtime/index.d.ts
14
13
  /** SQL command type recorded on a {@link TailordbQueryResult}. */
15
14
  export type TailordbCommandType = "INSERT" | "DELETE" | "UPDATE" | "SELECT" | "MOVE" | "FETCH" | "COPY" | "CREATE";
16
15
  /** Result of a single `queryObject` call against the TailorDB driver. */
@@ -55,5 +54,4 @@ export interface TailordbRuntime {
55
54
  Client: TailordbClientConstructor;
56
55
  file: TailorDBFileAPI;
57
56
  }
58
- //#endregion
59
57
  export { Temporal, aigateway, authconnection, context, file, iconv, idp, logger, parseDateFields, secretmanager, serializeDateFields, workflow };
@@ -1 +1 @@
1
- import{a as e,i as t}from"../date-CgP7gMG_.mjs";import{n}from"../field-parse-C41e3UAF.mjs";import{t as r}from"../iconv-DlFMt2gW.mjs";import{t as i}from"../secretmanager-vHQoXdQz.mjs";import{t as a}from"../authconnection-CynFBIv8.mjs";import{t as o}from"../idp-G_ojPBB5.mjs";import{t as s}from"../workflow-Cs9ISw6j.mjs";import{t as c}from"../context-D0QjfxzD.mjs";import{t as l}from"../file-DKBOj5q4.mjs";import{t as u}from"../aigateway-DsWDjzk4.mjs";import{i as d}from"../logger-DP2BjQ93.mjs";export{e as Temporal,u as aigateway,a as authconnection,c as context,l as file,r as iconv,o as idp,d as logger,n as parseDateFields,i as secretmanager,t as serializeDateFields,s as workflow};
1
+ import{a as e,i as t}from"../date-CgP7gMG_.mjs";import{n}from"../field-parse-BQhUAbpM.mjs";import{t as r}from"../iconv-DlFMt2gW.mjs";import{t as i}from"../secretmanager-vHQoXdQz.mjs";import{t as a}from"../authconnection-CynFBIv8.mjs";import{t as o}from"../idp-G_ojPBB5.mjs";import{t as s}from"../workflow-Cs9ISw6j.mjs";import{t as c}from"../context-D0QjfxzD.mjs";import{t as l}from"../file-DKBOj5q4.mjs";import{t as u}from"../aigateway-DsWDjzk4.mjs";import{i as d}from"../logger-DP2BjQ93.mjs";export{e as Temporal,u as aigateway,a as authconnection,c as context,l as file,r as iconv,o as idp,d as logger,n as parseDateFields,i as secretmanager,t as serializeDateFields,s as workflow};
@@ -1,4 +1,3 @@
1
- //#region src/runtime/logger.d.ts
2
1
  /**
3
2
  * Structured logging utilities.
4
3
  *
@@ -93,5 +92,4 @@ export declare const error: TailorLoggerAPI["error"];
93
92
  */
94
93
  export declare const setAttributes: TailorLoggerAPI["setAttributes"];
95
94
  /** `tailor.logger` API object. See {@link TailorLoggerAPI} for method docs. */
96
- export declare const logger: TailorLoggerAPI;
97
- //#endregion
95
+ export declare const logger: TailorLoggerAPI;
@@ -1,5 +1,4 @@
1
1
  import { SecretNameFor, SecretVaultName } from "@tailor-platform/sdk";
2
- //#region src/runtime/secretmanager.d.ts
3
2
  /**
4
3
  * Platform API surface for `tailor.secretmanager`. Describes the shape the
5
4
  * platform runtime injects on `globalThis.tailor.secretmanager`.
@@ -24,5 +23,4 @@ export interface TailorSecretmanagerAPI {
24
23
  export declare const secretmanager: {
25
24
  readonly getSecrets: <const V extends SecretVaultName, const T extends readonly SecretNameFor<V>[]>(vault: V, names: T) => Promise<Partial<Record<T[number], string>>>;
26
25
  readonly getSecret: <V extends SecretVaultName>(vault: V, name: SecretNameFor<V>) => Promise<string | undefined>;
27
- };
28
- //#endregion
26
+ };
@@ -1,5 +1,4 @@
1
1
  import { Temporal } from "temporal-spec";
2
- //#region src/runtime/temporal.d.ts
3
2
  /**
4
3
  * Typed access to the runtime's Temporal API, without installing a polyfill.
5
4
  * Constructors are resolved on access so configuration files can load in Node.js.
@@ -27,5 +26,4 @@ declare namespace Temporal$1 {
27
26
  /** The runtime Temporal.Instant instance. */
28
27
  type Instant = Temporal.Instant;
29
28
  }
30
- //#endregion
31
29
  export { Temporal$1 as Temporal };
@@ -1,4 +1,3 @@
1
- //#region src/runtime/types.d.ts
2
1
  export interface Attributes {}
3
2
  export interface AttributeList {
4
3
  __tuple?: [];
@@ -26,5 +25,4 @@ export type TailorEnv = keyof Env extends never ? Record<string, string | number
26
25
  * `defaultDateRepresentation` has been resolved. `"legacy"` keeps string values.
27
26
  */
28
27
  export type EffectiveDateDefault = "legacy" | "temporal" | "date";
29
- //#endregion
30
28
  export {};
@@ -1,4 +1,3 @@
1
- //#region src/runtime/workflow.d.ts
2
1
  /**
3
2
  * Workflow utilities.
4
3
  *
@@ -97,5 +96,4 @@ export declare const workflow: {
97
96
  readonly wait: (key: string, payload?: any) => any;
98
97
  readonly resolve: (executionId: string, key: string, callback: (waitPayload: any) => any) => Promise<void>;
99
98
  };
100
- //#endregion
101
99
  export {};
@@ -1,2 +1,2 @@
1
- import{i as e}from"./field-parse-C41e3UAF.mjs";import{t}from"./brand-C8nMKhJC.mjs";import{cloneDeep as n}from"es-toolkit";function mapAllowedValues(e){return e.map(e=>typeof e==`string`?{value:e,description:``}:{...e,description:e.description??``})}function createTailorDBField(e,t,n,r){return createTailorDBFieldRuntime(e,t,n,r)}function createTailorDBFieldRuntime(t,r,i,a){let o={required:!0},s;r&&(r.optional===!0&&(o.required=!1),r.array===!0&&(o.array=!0)),a&&(o.allowedValues=mapAllowedValues(a));function parseInternal$1(t){return e({...t,field:c})}function cloneWith(e){let t=c.clone();return Object.assign(t._metadata,e),t}let c={type:t,fields:i??{},_defined:void 0,_output:void 0,_metadata:o,get metadata(){return{...this._metadata}},get rawRelation(){return s?{...s,toward:{...s.toward}}:void 0},description(e){return cloneWith({description:e})},typeName(e){return cloneWith({typeName:e})},validate(...e){return cloneWith({validate:e})},parse(e){return parseInternal$1({value:e.value,data:e.data,invoker:e.invoker,pathArray:[]})},relation(e){let t=c.clone(),n=e.toward,r=`table`in n?n.table:n.type,i=r===`self`?`self`:r.name;return t._setRawRelation({type:e.type,toward:{table:i,as:e.toward.as,key:e.toward.key},backward:e.backward}),t},index(){return cloneWith({index:!0})},unique(){return cloneWith({unique:!0,index:!0})},vector(){return cloneWith({vector:!0})},default(e){return cloneWith({default:e})},hooks(e){return cloneWith({hooks:e})},serial(e){return cloneWith({serial:e})},clone(e){if(this._metadata.validate?.length&&e?.array!==void 0&&e.array!==(this._metadata.array===!0))throw Error(`Cannot change the array option on a field with custom validation`);let o=i;if(i){let e={};for(let[t,n]of Object.entries(i))e[t]=n.clone();o=e}let c=createTailorDBFieldRuntime(t,r,o,a);return Object.assign(c._metadata,n(this._metadata)),e&&(e.optional!==void 0&&(c._metadata.required=!e.optional),e.array!==void 0&&(c._metadata.array=e.array)),s&&c._setRawRelation(n(s)),c},_setRawRelation(e){s=e}};return c}const r=createTailorDBField;function uuid(e){return r(`uuid`,e)}function string(e){return r(`string`,e)}function bool(e){return r(`boolean`,e)}function int(e){return r(`integer`,e)}function float(e){return r(`float`,e)}function decimal(e){if(e?.scale!==void 0&&(!Number.isInteger(e.scale)||e.scale<0||e.scale>12))throw Error(`scale must be an integer between 0 and 12`);let t=r(`decimal`,e);return e?.scale!==void 0&&(t._metadata.scale=e.scale),t}function date(e){return r(`date`,e)}function datetime(e){return r(`datetime`,e)}function time(e){return r(`time`,e)}function _enum(e,t){return r(`enum`,t,void 0,e)}function object(e,t){return r(`nested`,t,e)}function createTailorDBType(e,n,r){let i=r.description,a={},o=[],s={},c={},l=[],u,d,f=/* @__PURE__ */ new Set;r.description!==void 0&&f.add(`description`);function runMethodOnce(e,t){if(f.has(e))throw Error(`.${e}() has already been set`);let n=t();return f.add(e),n}if(r.pluralForm){if(e===r.pluralForm)throw Error(`The name and the plural form must be different. name=${e}`);a.pluralForm=r.pluralForm}let p={name:e,fields:{...n},_output:null,_description:i,get metadata(){let e={};return o.length>0&&o.forEach(t=>{let n=t.fields.map(e=>String(e)),r=t.name||`idx_${n.join(`_`)}`;e[r]={fields:n,unique:t.unique}}),{name:this.name,description:i,settings:a,permissions:s,files:c,...Object.keys(e).length>0&&{indexes:e},...u&&{typeHook:u},...d&&{typeValidate:d}}},hooks(e){return runMethodOnce(`hooks`,()=>(u=e,this))},validate(e){return runMethodOnce(`validate`,()=>(d=e,this))},features(e){return runMethodOnce(`features`,()=>(a={...a,...e},this))},indexes(...e){return runMethodOnce(`indexes`,()=>(o=e,this))},files(e){return runMethodOnce(`files`,()=>(c=e,this))},permission(e){return runMethodOnce(`permission`,()=>{let t=this;return s.record=e,t})},gqlPermission(e){return runMethodOnce(`gqlPermission`,()=>{let t=this;return s.gql=e,t})},description(e){return runMethodOnce(`description`,()=>(i=e,this._description=e,this))},pickFields(e,t){let n={};for(let r of e){let e=this.fields[r];if(!e)throw Error(`pickFields(): field "${String(r)}" does not exist on this table yet. If it comes from a plugin's .plugin() call, it is only added to the table after \`tailor generate\` runs.`);n[r]=t?e.clone(t):e}return n},omitFields(e){let t=new Set(e),n={};for(let e in this.fields)Object.hasOwn(this.fields,e)&&!t.has(e)&&(n[e]=this.fields[e]);return n},get plugins(){return l},plugin(e){for(let[t,n]of Object.entries(e))l.push({pluginId:t,config:n});return this}};return t(p,`tailordb-type`)}function createIdField(){return uuid()}let i;function dbTable(e,t,n){let r=Array.isArray(e)?e[0]:e,a=Array.isArray(e)?e[1]:void 0,o,s;return typeof t==`string`?(o=t,s=n):s=t,createTailorDBType(r,{id:i??=createIdField(),...s},{pluralForm:a,description:o})}const a={"hooks.update":`(({ input, now }) => input ?? now)({ input: _value, oldValue: _oldValue, invoker: _principal, now: _now })`};let o;function getTimestampsUpdatedAtHook(){return o??=Object.assign(({input:e,now:t})=>e??t,{[Symbol.for(`tailor-platform/sdk:precompiled-script-expr`)]:a})}const s={table:dbTable,uuid,string,bool,int,float,decimal,date,datetime,time,enum:_enum,object,fields:{timestamps:()=>({createdAt:datetime().default(`now`).description(`Record creation timestamp`),updatedAt:datetime().default(`now`).hooks({update:getTimestampsUpdatedAtHook()}).description(`Record update timestamp`)})}};export{mapAllowedValues as n,s as t};
2
- //# sourceMappingURL=schema-B6hJQWp6.mjs.map
1
+ import{i as e}from"./field-parse-BQhUAbpM.mjs";import{t}from"./brand-C8nMKhJC.mjs";import{cloneDeep as n}from"es-toolkit";function mapAllowedValues(e){return e.map(e=>typeof e==`string`?{value:e,description:``}:{...e,description:e.description??``})}function createTailorDBField(e,t,n,r){return createTailorDBFieldRuntime(e,t,n,r)}function createTailorDBFieldRuntime(t,r,i,a){let o={required:!0},s;r&&(r.optional===!0&&(o.required=!1),r.array===!0&&(o.array=!0)),a&&(o.allowedValues=mapAllowedValues(a));function parseInternal$1(t){return e({...t,field:c})}function cloneWith(e){let t=c.clone();return Object.assign(t._metadata,e),t}let c={type:t,fields:i??{},_defined:void 0,_output:void 0,_metadata:o,get metadata(){return{...this._metadata}},get rawRelation(){return s?{...s,toward:{...s.toward}}:void 0},description(e){return cloneWith({description:e})},typeName(e){return cloneWith({typeName:e})},validate(...e){return cloneWith({validate:e})},parse(e){return parseInternal$1({value:e.value,data:e.data,invoker:e.invoker,pathArray:[]})},relation(e){let t=c.clone(),n=e.toward,r=`table`in n?n.table:n.type,i=r===`self`?`self`:r.name;return t._setRawRelation({type:e.type,toward:{table:i,as:e.toward.as,key:e.toward.key},backward:e.backward}),t},index(){return cloneWith({index:!0})},unique(){return cloneWith({unique:!0,index:!0})},vector(){return cloneWith({vector:!0})},default(e){return cloneWith({default:e})},hooks(e){return cloneWith({hooks:e})},serial(e){return cloneWith({serial:e})},clone(e){if(this._metadata.validate?.length&&e?.array!==void 0&&e.array!==(this._metadata.array===!0))throw Error(`Cannot change the array option on a field with custom validation`);let o=i;if(i){let e={};for(let[t,n]of Object.entries(i))e[t]=n.clone();o=e}let c=createTailorDBFieldRuntime(t,r,o,a);return Object.assign(c._metadata,n(this._metadata)),e&&(e.optional!==void 0&&(c._metadata.required=!e.optional),e.array!==void 0&&(c._metadata.array=e.array)),s&&c._setRawRelation(n(s)),c},_setRawRelation(e){s=e}};return c}const r=createTailorDBField;function uuid(e){return r(`uuid`,e)}function string(e){return r(`string`,e)}function bool(e){return r(`boolean`,e)}function int(e){return r(`integer`,e)}function float(e){return r(`float`,e)}function decimal(e){if(e?.scale!==void 0&&(!Number.isInteger(e.scale)||e.scale<0||e.scale>12))throw Error(`scale must be an integer between 0 and 12`);let t=r(`decimal`,e);return e?.scale!==void 0&&(t._metadata.scale=e.scale),t}function date(e){return r(`date`,e)}function datetime(e){return r(`datetime`,e)}function time(e){return r(`time`,e)}function _enum(e,t){return r(`enum`,t,void 0,e)}function object(e,t){return r(`nested`,t,e)}function createTailorDBType(e,n,r){let i=r.description,a={},o=[],s={},c={},l=[],u,d,f=/* @__PURE__ */ new Set;r.description!==void 0&&f.add(`description`);function runMethodOnce(e,t){if(f.has(e))throw Error(`.${e}() has already been set`);let n=t();return f.add(e),n}if(r.pluralForm){if(e===r.pluralForm)throw Error(`The name and the plural form must be different. name=${e}`);a.pluralForm=r.pluralForm}let p={name:e,fields:{...n},_output:null,_description:i,get metadata(){let e={};return o.length>0&&o.forEach(t=>{let n=t.fields.map(e=>String(e)),r=t.name||`idx_${n.join(`_`)}`;e[r]={fields:n,unique:t.unique}}),{name:this.name,description:i,settings:a,permissions:s,files:c,...Object.keys(e).length>0&&{indexes:e},...u&&{typeHook:u},...d&&{typeValidate:d}}},hooks(e){return runMethodOnce(`hooks`,()=>(u=e,this))},validate(e){return runMethodOnce(`validate`,()=>(d=e,this))},features(e){return runMethodOnce(`features`,()=>(a={...a,...e},this))},indexes(...e){return runMethodOnce(`indexes`,()=>(o=e,this))},files(e){return runMethodOnce(`files`,()=>(c=e,this))},permission(e){return runMethodOnce(`permission`,()=>{let t=this;return s.record=e,t})},gqlPermission(e){return runMethodOnce(`gqlPermission`,()=>{let t=this;return s.gql=e,t})},description(e){return runMethodOnce(`description`,()=>(i=e,this._description=e,this))},pickFields(e,t){let n={};for(let r of e){let e=this.fields[r];if(!e)throw Error(`pickFields(): field "${String(r)}" does not exist on this table yet. If it comes from a plugin's .plugin() call, it is only added to the table after \`tailor generate\` runs.`);n[r]=t?e.clone(t):e}return n},omitFields(e){let t=new Set(e),n={};for(let e in this.fields)Object.hasOwn(this.fields,e)&&!t.has(e)&&(n[e]=this.fields[e]);return n},get plugins(){return l},plugin(e){for(let[t,n]of Object.entries(e))l.push({pluginId:t,config:n});return this}};return t(p,`tailordb-type`)}function createIdField(){return uuid()}let i;function dbTable(e,t,n){let r=Array.isArray(e)?e[0]:e,a=Array.isArray(e)?e[1]:void 0,o,s;return typeof t==`string`?(o=t,s=n):s=t,createTailorDBType(r,{id:i??=createIdField(),...s},{pluralForm:a,description:o})}const a={"hooks.update":`(({ input, now }) => input ?? now)({ input: _value, oldValue: _oldValue, invoker: _principal, now: _now })`};let o;function getTimestampsUpdatedAtHook(){return o??=Object.assign(({input:e,now:t})=>e??t,{[Symbol.for(`tailor-platform/sdk:precompiled-script-expr`)]:a})}const s={table:dbTable,uuid,string,bool,int,float,decimal,date,datetime,time,enum:_enum,object,fields:{timestamps:()=>({createdAt:datetime().default(`now`).description(`Record creation timestamp`),updatedAt:datetime().default(`now`).hooks({update:getTimestampsUpdatedAtHook()}).description(`Record update timestamp`)})}};export{mapAllowedValues as n,s as t};
2
+ //# sourceMappingURL=schema-BU1aIQ63.mjs.map