@tailor-platform/sdk 2.6.0 → 2.8.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 (78) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/{application-CmXOqTaK.mjs → application-D2E3FDfF.mjs} +27 -25
  3. package/dist/application-D2E3FDfF.mjs.map +1 -0
  4. package/dist/application-rySTKrFa.mjs +1 -0
  5. package/dist/cli/commands/deploy/config-id-injector.d.mts +16 -0
  6. package/dist/cli/commands/workspace/create.d.mts +1 -1
  7. package/dist/cli/lib.d.mts +7 -2
  8. package/dist/cli/lib.mjs +1 -1
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/cli/main.mjs +50 -1145
  11. package/dist/cli/main.mjs.map +1 -1
  12. package/dist/cli/shared/args.d.mts +7 -1
  13. package/dist/cli/shared/beta.d.mts +8 -0
  14. package/dist/cli/shared/client.d.mts +11 -1
  15. package/dist/cli/shared/config.d.mts +13 -0
  16. package/dist/cli/shared/prompt.d.mts +53 -0
  17. package/dist/cli/shared/script-executor.d.mts +1 -1
  18. package/dist/cli/shared/workspace-name.d.mts +10 -1
  19. package/dist/completion/zsh-worker.zsh +10 -206
  20. package/dist/errors-BlX4gUw5.mjs +4 -0
  21. package/dist/errors-BlX4gUw5.mjs.map +1 -0
  22. package/dist/es-builtins-BHCXINQp.mjs +2 -0
  23. package/dist/es-builtins-BHCXINQp.mjs.map +1 -0
  24. package/dist/field-column-type-QMtF6lUp.mjs +2 -0
  25. package/dist/field-column-type-QMtF6lUp.mjs.map +1 -0
  26. package/dist/{kysely-type-BTi3BMtL.mjs → kysely-type-CmvAz1Xj.mjs} +4 -4
  27. package/dist/kysely-type-CmvAz1Xj.mjs.map +1 -0
  28. package/dist/node-builtins-TQHhwNzG.mjs +2 -0
  29. package/dist/node-builtins-TQHhwNzG.mjs.map +1 -0
  30. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  31. package/dist/register-ts-hook-CQuJ7h5G.mjs +642 -0
  32. package/dist/register-ts-hook-CQuJ7h5G.mjs.map +1 -0
  33. package/dist/service-COC9whur.mjs +1 -0
  34. package/dist/{service-CLPMoj9n.mjs → service-CqbQXFDp.mjs} +2 -2
  35. package/dist/{service-CLPMoj9n.mjs.map → service-CqbQXFDp.mjs.map} +1 -1
  36. package/dist/{service-YqDsHmlK.mjs → service-DDon86tM.mjs} +2 -2
  37. package/dist/service-DDon86tM.mjs.map +1 -0
  38. package/dist/service_pb-BNxUPfP3.mjs +2 -0
  39. package/dist/service_pb-BNxUPfP3.mjs.map +1 -0
  40. package/dist/service_pb-D-xFu9Ub.mjs +1 -0
  41. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +12 -0
  42. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +18 -1
  43. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +130 -1
  44. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +43 -4
  45. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +9 -0
  46. package/dist/vitest/environment.mjs +1 -1
  47. package/dist/vitest/index.mjs +1 -1
  48. package/dist/vitest/mocks/file.d.mts +1 -1
  49. package/dist/workspace_resource_pb-B7S-zx4Z.mjs +2 -0
  50. package/dist/workspace_resource_pb-B7S-zx4Z.mjs.map +1 -0
  51. package/docs/cli-reference.md +0 -16
  52. package/docs/github-actions.md +12 -0
  53. package/docs/services/executor.md +17 -0
  54. package/docs/services/idp.md +1 -1
  55. package/docs/services/resolver.md +1 -1
  56. package/docs/services/tailordb-migration.md +12 -0
  57. package/docs/services/tailordb.md +6 -2
  58. package/docs/services/workflow.md +1 -1
  59. package/package.json +15 -17
  60. package/dist/application-CNeOcaLc.mjs +0 -1
  61. package/dist/application-CmXOqTaK.mjs.map +0 -1
  62. package/dist/errors-DLsQ_-ol.mjs +0 -2
  63. package/dist/errors-DLsQ_-ol.mjs.map +0 -1
  64. package/dist/es-builtins-n3wBv4Sv.mjs +0 -2
  65. package/dist/es-builtins-n3wBv4Sv.mjs.map +0 -1
  66. package/dist/kysely-type-BTi3BMtL.mjs.map +0 -1
  67. package/dist/node-builtins-oBl7EbyV.mjs +0 -2
  68. package/dist/node-builtins-oBl7EbyV.mjs.map +0 -1
  69. package/dist/register-ts-hook-oDA2JLp2.mjs +0 -640
  70. package/dist/register-ts-hook-oDA2JLp2.mjs.map +0 -1
  71. package/dist/service-D7iXk0BT.mjs +0 -1
  72. package/dist/service-YqDsHmlK.mjs.map +0 -1
  73. package/dist/service_pb-DGKCLuAs.mjs +0 -2
  74. package/dist/service_pb-DGKCLuAs.mjs.map +0 -1
  75. package/dist/service_pb-_aeFE-Nv.mjs +0 -1
  76. package/dist/workspace_resource_pb--GeYQPXu.mjs +0 -2
  77. package/dist/workspace_resource_pb--GeYQPXu.mjs.map +0 -1
  78. package/docs/cli/setup.md +0 -210
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2192](https://github.com/tailor-platform/sdk/pull/2192) [`28cc1a4`](https://github.com/tailor-platform/sdk/commit/28cc1a43098fb2fc6ad8cec7b7b4ba2b75e1fcaf) Thanks [@toiroakr](https://github.com/toiroakr)! - Add `TAILOR_CONSOLE_NEXT` environment variable to open the new Tailor Platform Console UI from `tailor open` and `tailor auth-connection open`. Setting `TAILOR_CONSOLE_NEXT=1` alone is enough: it redirects the console host from `console.` to `console-next.` and switches to the new UI's URL paths (`/workspaces/{workspaceId}/services/applications/{applicationName}` instead of `/workspaces/{workspaceId}/applications/{applicationName}/overview`, and `/workspaces/{workspaceId}/services/auth-connections` instead of `/workspaces/{workspaceId}/settings/connections`). An explicitly configured console URL (`TAILOR_PLATFORM_CONSOLE_URL` or a profile's `console_url`) is never rewritten.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2178](https://github.com/tailor-platform/sdk/pull/2178) [`42e0265`](https://github.com/tailor-platform/sdk/commit/42e026556c870db41f504d1b961feeda66ca5cc5) Thanks [@dqn](https://github.com/dqn)! - Stop counting an executor declared with `disabled: true` as a subscriber when `deploy` resolves `publishEvents`. Such an executor never runs, so it no longer keeps event publishing enabled on the TailorDB table, resolver, IdP, or workflow its trigger names, and no longer rejects an explicit `publishEvents: false` on that resource. Its trigger is still deployed, so the resource it names still has to be declared by the deploy.
12
+
13
+ - [#2185](https://github.com/tailor-platform/sdk/pull/2185) [`df35aba`](https://github.com/tailor-platform/sdk/commit/df35aba48d5730b265858fad21235c3d319b66ab) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @electric-sql/pglite to v0.5.7
14
+
15
+ - [#2194](https://github.com/tailor-platform/sdk/pull/2194) [`3298c69`](https://github.com/tailor-platform/sdk/commit/3298c69cd0a3eb2ed6df2b33bcf0bf79175cb759) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update oxc
16
+
17
+ - [#2183](https://github.com/tailor-platform/sdk/pull/2183) [`3f68a09`](https://github.com/tailor-platform/sdk/commit/3f68a09681e4c8a166cb8d7262dd991d4342eb1b) Thanks [@dqn](https://github.com/dqn)! - Lock migrating TailorDB namespaces and stop publishing their record events while migrations run. `deploy` disables every GraphQL operation — create, update, delete, read, and bulk upsert — on the affected tables. A successful migration applies the configured settings. If a later migration fails, settings from the last confirmed checkpoint are restored; an uncommitted migration restores existing tables' prior settings and leaves its newly created tables restricted until a successful retry. Restoration rechecks the checkpoint number and history so it does not overwrite a concurrent deployment; if ownership cannot be verified, or a committed table deletion fails, the affected tables remain locked for manual recovery.
18
+
19
+ ## 2.7.0
20
+
21
+ ### Minor Changes
22
+
23
+ - [#2181](https://github.com/tailor-platform/sdk/pull/2181) [`8f48d23`](https://github.com/tailor-platform/sdk/commit/8f48d2349b4e618aaad88691ff6b1540d6a09228) Thanks [@dqn](https://github.com/dqn)! - Trace each service's apply step and each TailorDB migration phase when OTLP tracing is enabled. `deploy` now emits `apply.<service>.createUpdate` spans under `apply.createUpdateServices` and `apply.createUpdateDependentServices`, plus `apply.tailorDB.migration.prePhase` and `.postPhase` per pending migration and `.script` for each migration that carries a `migrate.ts`, so a slow deploy can be attributed to a service or to a migration script rather than to a whole phase.
24
+
25
+ - [#2168](https://github.com/tailor-platform/sdk/pull/2168) [`aef699b`](https://github.com/tailor-platform/sdk/commit/aef699b36f5b0957747f34a327b0e19f1e47ba3a) Thanks [@dqn](https://github.com/dqn)! - Move the `tailor setup` commands into the optional `@tailor-platform/sdk-plugin-setup` CLI plugin.
26
+
27
+ `setup` generates GitHub repository automation, which not every project uses, but its workflow templates and its `@croct/json5-parser` / `json5` dependencies shipped with the SDK for everyone. Splitting it out follows the same CLI plugin mechanism as `tailor tailordb erd`.
28
+
29
+ To keep using `tailor setup <command>`, install the plugin next to the SDK:
30
+
31
+ ```bash
32
+ npm install -D @tailor-platform/sdk-plugin-setup
33
+ ```
34
+
35
+ The commands, options, generated files, and the `.github/tailor.lock` format are unchanged.
36
+
37
+ - [#2167](https://github.com/tailor-platform/sdk/pull/2167) [`4c74e1b`](https://github.com/tailor-platform/sdk/commit/4c74e1b00df35316779a02ab3ed8fd0c3bf63e69) Thanks [@dqn](https://github.com/dqn)! - Run TailorDB migration scripts as workflow jobs so they are no longer bound by the 60-second script execution limit.
38
+
39
+ A data migration that previously failed with `deadline_exceeded` — losing its logs along with any record of how far it got — now runs to completion. `tailor deploy` waits for it and reports its logs as before. This applies to every migration; no flag or migration-file change is required.
40
+
41
+ ### Patch Changes
42
+
43
+ - [#2170](https://github.com/tailor-platform/sdk/pull/2170) [`2f79d38`](https://github.com/tailor-platform/sdk/commit/2f79d38b55f47dd4b0854ebff6c86bc7b33c01ad) Thanks [@dqn](https://github.com/dqn)! - Keep the generated Kysely table types and migration types in agreement on which array columns need `ArrayColumnType`, so a future column type cannot pick up an array form that Kysely can read through in one and not the other.
44
+
45
+ - [#2145](https://github.com/tailor-platform/sdk/pull/2145) [`293a0c3`](https://github.com/tailor-platform/sdk/commit/293a0c35b10b40b9d61f781fcc5d8bc96f54301e) Thanks [@dqn](https://github.com/dqn)! - Generate `Date`-based migration types for `date` columns, matching the values returned by the function runtime and the existing generated table types. Reading a `date` column in `migrate.ts` now yields a `Date` instead of a `string`, while writes accept either. Migration scripts can also read and write `date` and `datetime` array columns. Existing migration scripts that treat selected `date` values as strings must be updated.
46
+
47
+ - [#2163](https://github.com/tailor-platform/sdk/pull/2163) [`58bfd7f`](https://github.com/tailor-platform/sdk/commit/58bfd7f165ef3fb57faa76f2813cb7d903db5b2b) Thanks [@toiroakr](https://github.com/toiroakr)! - Fail `deploy` with a clear error when a resolver, executor, or workflow job references a Node-only global (`process`, `Buffer`, `require`, etc.) that the Tailor Platform runtime never defines, instead of deploying successfully and only failing with a `ReferenceError` at runtime. Use `defineConfig({ env })` and the `env` argument passed into the body function to read configuration values.
48
+
49
+ - [#2156](https://github.com/tailor-platform/sdk/pull/2156) [`e36bc5d`](https://github.com/tailor-platform/sdk/commit/e36bc5de9e3d08e1ea291896a6937a4c0bb34118) Thanks [@dqn](https://github.com/dqn)! - - Speed up deployments by reducing metadata API calls.
50
+ - Stop CLI wait commands when a function execution is canceled and report the cancellation as a failure.
51
+
52
+ - [#2162](https://github.com/tailor-platform/sdk/pull/2162) [`1c1b989`](https://github.com/tailor-platform/sdk/commit/1c1b9899cb8bf99525b27c8b53dd99b0972d7648) Thanks [@dqn](https://github.com/dqn)! - Reduce the chance that deploy metadata writes overwrite labels changed by another client.
53
+
54
+ - [#2177](https://github.com/tailor-platform/sdk/pull/2177) [`dd5bf5a`](https://github.com/tailor-platform/sdk/commit/dd5bf5a2fe6599364d9e25de39dd1e1763b47f3a) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove unused internal `.brand()` calls from config schemas. This is invisible to users: the generated public types were already unaffected by these calls.
55
+
56
+ - [#2152](https://github.com/tailor-platform/sdk/pull/2152) [`fa17d16`](https://github.com/tailor-platform/sdk/commit/fa17d1675c38047e3f700cb66851588bab27f74f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.2.5
57
+
58
+ - [#2153](https://github.com/tailor-platform/sdk/pull/2153) [`07ac5d0`](https://github.com/tailor-platform/sdk/commit/07ac5d019a14143438bf1072fe2bf7a7e9f6980c) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @inquirer/prompts to v8.6.0
59
+
60
+ - [#2006](https://github.com/tailor-platform/sdk/pull/2006) [`1aca9f2`](https://github.com/tailor-platform/sdk/commit/1aca9f283b19f6ca392c8f53d725d7375e580dc4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update oxc
61
+
62
+ - [#2155](https://github.com/tailor-platform/sdk/pull/2155) [`3535006`](https://github.com/tailor-platform/sdk/commit/35350069b4055ce5996b92b0a0a5d153be5ad0d9) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @inquirer/core to v12
63
+
64
+ - [#2165](https://github.com/tailor-platform/sdk/pull/2165) [`f9bb880`](https://github.com/tailor-platform/sdk/commit/f9bb880eb8d7eb218c3d44cf2874f928cb4b1c2e) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @0no-co/graphql.web to v1.3.4
65
+
66
+ - [#2173](https://github.com/tailor-platform/sdk/pull/2173) [`4090591`](https://github.com/tailor-platform/sdk/commit/409059124a4dda81312e1982ae17f0b6430238c5) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @electric-sql/pglite to v0.5.6
67
+
3
68
  ## 2.6.0
4
69
 
5
70
  ### Minor Changes