@tailor-platform/sdk 2.35.0 → 2.36.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 (35) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{application-DIsQSnj3.mjs → application-BbORWCj-.mjs} +16 -16
  3. package/dist/application-BbORWCj-.mjs.map +1 -0
  4. package/dist/{application-Bj2MtL-d.mjs → application-DaJbleMi.mjs} +1 -1
  5. package/dist/cli/commands/workspace/create.d.mts +4 -2
  6. package/dist/cli/lib.mjs +1 -1
  7. package/dist/cli/main.mjs +47 -47
  8. package/dist/cli/main.mjs.map +1 -1
  9. package/dist/completion/zsh-worker.zsh +1 -1
  10. package/dist/configure/index.mjs.map +1 -1
  11. package/dist/configure/services/executor/trigger/webhook.d.mts +1 -0
  12. package/dist/configure/services/tailordb/schema.d.mts +6 -2
  13. package/dist/{register-ts-hook-CQ7shKO5.mjs → register-ts-hook-iAcG1dfz.mjs} +72 -70
  14. package/dist/register-ts-hook-iAcG1dfz.mjs.map +1 -0
  15. package/dist/schema-BU1aIQ63.mjs.map +1 -1
  16. package/dist/service-DTrVVaDJ.mjs +1 -0
  17. package/dist/{service-eeXdVrDK.mjs → service-hIarp2Gl.mjs} +3 -3
  18. package/dist/service-hIarp2Gl.mjs.map +1 -0
  19. package/dist/vitest/index.mjs +1 -1
  20. package/dist/vitest/index.mjs.map +1 -1
  21. package/dist/vitest/mocks/file.d.mts +1 -1
  22. package/dist/vitest/pglite-kysely.d.mts +5 -0
  23. package/docs/cli/application.md +1 -1
  24. package/docs/cli/tailordb.md +1 -1
  25. package/docs/cli/user.md +1 -1
  26. package/docs/cli/workspace.md +1 -1
  27. package/docs/cli-reference.md +5 -3
  28. package/docs/services/executor.md +12 -5
  29. package/docs/services/tailordb/index.md +5 -1
  30. package/docs/services/tailordb/migration.md +20 -9
  31. package/package.json +10 -10
  32. package/dist/application-DIsQSnj3.mjs.map +0 -1
  33. package/dist/register-ts-hook-CQ7shKO5.mjs.map +0 -1
  34. package/dist/service-DEq_hdht.mjs +0 -1
  35. package/dist/service-eeXdVrDK.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.36.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2829](https://github.com/tailor-platform/sdk/pull/2829) [`6cbf20b`](https://github.com/tailor-platform/sdk/commit/6cbf20b798a5303a21fd99c6b7726bb342ad8d4b) Thanks [@dqn](https://github.com/dqn)! - **Breaking change (beta)**: A query issued on a `createKyselyPGlite` instance while one of its transactions is open now waits for the transaction to finish. Before, the query ran inside the transaction, and when it failed, the commit silently discarded the transaction's writes. A query on the outer instance from inside the transaction now never finishes and the test times out; run it on `trx` instead.
8
+
9
+ - [#2847](https://github.com/tailor-platform/sdk/pull/2847) [`55e9a94`](https://github.com/tailor-platform/sdk/commit/55e9a94a593406e7790f73b73c3714ba96eda8f7) Thanks [@jackchuka](https://github.com/jackchuka)! - **Breaking change**: `workspace create`, workspace creation during `deploy`, and the programmatic `createWorkspace()` now require an organization. Pass `--organization-id` (or set `TAILOR_PLATFORM_ORGANIZATION_ID`), or set a default organization with `tailor user update --default-organization-id` (not read while `TAILOR_PLATFORM_TOKEN` or `TAILOR_TOKEN` is set). Without one, interactive `deploy` asks which organization to create the workspace in; `workspace create`, `createWorkspace()`, and non-interactive `deploy` fail instead of creating a workspace outside any organization.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#2833](https://github.com/tailor-platform/sdk/pull/2833) [`e3e3bac`](https://github.com/tailor-platform/sdk/commit/e3e3bac2e1fdc9b695db38d90e25abe7d40923ce) Thanks [@dqn](https://github.com/dqn)! - Adding a relation to an existing field is now a breaking change in `tailor tailordb migration generate`, and the migration needs a script. It was recorded as non-breaking, so values that point at no record stayed stored, and after deploy the platform rejected any later update of those rows, even one that changes another field. The generated `migrate.ts` finds those values and asks for their new reference with `TODO`, or leaves the elements of an array field to a single `TODO`. The foreign key is applied after the script runs, so the script and the other steps of the migration can update those rows. A relation added to a field inside `db.object()` stays non-breaking. The script generated for a relation retargeted to another table now also works when the relation points at its own table or at a key other than `id`.
14
+
15
+ - [#2831](https://github.com/tailor-platform/sdk/pull/2831) [`2d6217b`](https://github.com/tailor-platform/sdk/commit/2d6217b690bb25c1a825f1c40f8d437bb64d5140) Thanks [@dqn](https://github.com/dqn)! - `.unique()` and `.index()` on a `db.object()` field itself now fail type checking, and `tailor generate` and `tailor deploy` stop with an error naming the field. Before, such a table field failed to deploy with an internal platform error, and such a member of another `db.object()` was deployed without the setting, so in a namespace with `migration.directory` every later deploy stopped with `MIGRATION_REMOTE_DRIFT`. Remove the modifier; for such a member in a namespace with `migration.directory`, then run `tailor tailordb migration generate` and `tailor deploy --no-schema-check` once.
16
+
17
+ - [#2811](https://github.com/tailor-platform/sdk/pull/2811) [`e229992`](https://github.com/tailor-platform/sdk/commit/e229992b0861fe17f306d2e2405104a9cb2c371c) Thanks [@toiroakr](https://github.com/toiroakr)! - TailorDB namespaces that set the same `migration.directory` now fail with `MIGRATION_DIRECTORY_CONFLICT`, naming the namespaces and the shared directory, before any migration command or `tailor deploy` reads or writes migration files. Before, `migration generate` failed with a misleading "Possible rename(s) detected" error, and `migration generate --init` rebuilt the history of every namespace sharing the directory. Give each namespace its own `migration.directory`.
18
+
19
+ - [#2828](https://github.com/tailor-platform/sdk/pull/2828) [`eab9a23`](https://github.com/tailor-platform/sdk/commit/eab9a23368da6b084f0ebc73dd90d38fb3665ca7) Thanks [@dqn](https://github.com/dqn)! - Keep existing migration files when `tailordb migration generate --init` fails to load tables. Previously the migrations were deleted before the tables loaded, so an error such as a syntax error in a table file left the namespace with no migration history. The deletion confirmation now appears after the tables load.
20
+
21
+ - [#2776](https://github.com/tailor-platform/sdk/pull/2776) [`beacc64`](https://github.com/tailor-platform/sdk/commit/beacc643ec0a429736448f9074667106eb09ba1a) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor tailordb migration status` now reports an error for a namespace whose remote checkpoint is ahead of the latest local migration, for example `0009` on the workspace while the local history ends at `0002`. It used to show that namespace as up to date with no pending migrations. With `maintenanceMode` on, `tailor deploy` also records the maintenance mode with every migration checkpoint of a namespace instead of only the last one, so a deploy that stops after the first of several migrations leaves the record that `tailor tailordb migration resolve` and the next deploy use to lift the maintenance mode.
22
+
23
+ - [#2835](https://github.com/tailor-platform/sdk/pull/2835) [`0d4cd79`](https://github.com/tailor-platform/sdk/commit/0d4cd79db4a02b162bf384881668abec264da539) Thanks [@dqn](https://github.com/dqn)! - `tailor remove` now deletes every resource it lists. Before, when the only remaining resources were sub-resources such as TailorDB types, resolvers, IdP clients, auth configs, or auth connections, it listed them without deleting them. It now also lists workflow job functions; before, they were deleted without being listed, and when nothing else remained they were not deleted at all. Deploy plans, including the `Plan:` summary counts and `--dry-run --json` `changes`, now list each workflow job function deletion as its own `jobFunction` entry, so removing a workflow shows and counts its job functions on separate lines.
24
+
25
+ - [#2822](https://github.com/tailor-platform/sdk/pull/2822) [`b433a27`](https://github.com/tailor-platform/sdk/commit/b433a27e06c7aa1e2bc998b8f703aab6c9d8a7ff) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​politty/zod to v0.6.3
26
+
27
+ - [#2823](https://github.com/tailor-platform/sdk/pull/2823) [`8712ec6`](https://github.com/tailor-platform/sdk/commit/8712ec645517d29c129b3da72e32bf0d71319b2c) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency execa to v10.2.1
28
+
29
+ - [#2824](https://github.com/tailor-platform/sdk/pull/2824) [`5bf7e69`](https://github.com/tailor-platform/sdk/commit/5bf7e69611437fcf486b9964a7fc30d606cfa62a) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @​opentelemetry
30
+
31
+ - [#2826](https://github.com/tailor-platform/sdk/pull/2826) [`2a0e726`](https://github.com/tailor-platform/sdk/commit/2a0e726f3646394e36546eef9e56cfba8d043a09) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @​opentelemetry to v3
32
+
33
+ - [#2842](https://github.com/tailor-platform/sdk/pull/2842) [`8d3d70c`](https://github.com/tailor-platform/sdk/commit/8d3d70c78c22ea6cc4a98891bfddab880c83d830) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency es-toolkit to v1.53.0
34
+
35
+ - [#2836](https://github.com/tailor-platform/sdk/pull/2836) [`95ba73c`](https://github.com/tailor-platform/sdk/commit/95ba73cf72500d0e41252112164f212fa189fad7) Thanks [@toiroakr](https://github.com/toiroakr)! - The Stripe example in the incoming webhook docs now shows where to verify the `stripe-signature` header against `rawBody`, and links to Stripe's verification steps. The docs and the `rawBody` type of `IncomingWebhookArgs` now say that `rawBody` is delivered base64-encoded and has to be decoded to the original bytes before computing a signature.
36
+
37
+ - [#2832](https://github.com/tailor-platform/sdk/pull/2832) [`2c6242a`](https://github.com/tailor-platform/sdk/commit/2c6242a73f47cfb4a782449938b2323487aa0046) Thanks [@dqn](https://github.com/dqn)! - When a `.ts` or `.mts` file the CLI loads cannot be parsed, report a `SYNTAX_INVALID` error naming the file, the line, and the syntax error. For a TailorDB type, resolver, executor, workflow, HTTP adapter, or `function run` file, or a file one of them imports, this replaces `[object Object]`. For a config, or a file it imports, it replaces `UNEXPECTED_ERROR`, and the GitHub Actions annotation is titled `SYNTAX_INVALID` instead of `SyntaxError`.
38
+
3
39
  ## 2.35.0
4
40
 
5
41
  ### Minor Changes