@tailor-platform/sdk 2.37.0 → 2.39.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 (113) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/{application-83WVdH85.mjs → application-OeNMQzOC.mjs} +1 -1
  3. package/dist/application-mNOJx9Y2.mjs +207 -0
  4. package/dist/application-mNOJx9Y2.mjs.map +1 -0
  5. package/dist/cli/commands/deploy/deploy.d.mts +1 -0
  6. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +2 -0
  7. package/dist/cli/commands/executor/trigger.d.mts +1 -0
  8. package/dist/cli/commands/generate/seed/bundler.d.mts +7 -5
  9. package/dist/cli/commands/workspace/transform.d.mts +1 -2
  10. package/dist/cli/lib.d.mts +5 -3
  11. package/dist/cli/lib.mjs +1 -1
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/cli/main.mjs +67 -61
  14. package/dist/cli/main.mjs.map +1 -1
  15. package/dist/cli/shared/args.d.mts +14 -5
  16. package/dist/cli/shared/build-options.d.mts +13 -0
  17. package/dist/cli/shared/client.d.mts +15 -3
  18. package/dist/cli/shared/error-json.d.mts +12 -26
  19. package/dist/cli/shared/script-workflow.d.mts +65 -0
  20. package/dist/cli/shared/seed-chunker.d.mts +3 -3
  21. package/dist/client-CqiPQgMG.mjs +2 -0
  22. package/dist/client-CqiPQgMG.mjs.map +1 -0
  23. package/dist/client-DO2_Xz_z.mjs +1 -0
  24. package/dist/completion/zsh-worker.zsh +193 -74
  25. package/dist/configure/index.mjs +1 -1
  26. package/dist/configure/index.mjs.map +1 -1
  27. package/dist/configure/services/auth/types.d.mts +20 -3
  28. package/dist/configure/services/executor/operation.d.mts +5 -4
  29. package/dist/configure/services/executor/trigger/webhook.d.mts +8 -1
  30. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
  31. package/dist/configure/services/index.d.mts +0 -1
  32. package/dist/configure/services/tailordb/types.d.mts +9 -0
  33. package/dist/context-CYBcQZyO.mjs +1 -0
  34. package/dist/context-aAgFGDBD.mjs +23 -0
  35. package/dist/context-aAgFGDBD.mjs.map +1 -0
  36. package/dist/{crashreport-D_wf4GZh.mjs → crashreport-CQTAlnbA.mjs} +2 -2
  37. package/dist/{crashreport-D_wf4GZh.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
  38. package/dist/crashreport-GRnWyDnF.mjs +1 -0
  39. package/dist/{errors-Dmdnq0zi.mjs → errors-9OOL3xOM.mjs} +6 -5
  40. package/dist/errors-9OOL3xOM.mjs.map +1 -0
  41. package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
  42. package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
  43. package/dist/{kysely-type-DVL90_oX.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
  44. package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
  45. package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
  46. package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
  47. package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
  48. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  49. package/dist/register-ts-hook-CORbtrSN.mjs +1105 -0
  50. package/dist/register-ts-hook-CORbtrSN.mjs.map +1 -0
  51. package/dist/repl-editor-Bposemei.mjs +2 -0
  52. package/dist/repl-editor-Bposemei.mjs.map +1 -0
  53. package/dist/resource_pb-elY668ZB.mjs +2 -0
  54. package/dist/resource_pb-elY668ZB.mjs.map +1 -0
  55. package/dist/{secret-file-DiuEcLFP.mjs → secret-file-CSXzcg4c.mjs} +2 -2
  56. package/dist/{secret-file-DiuEcLFP.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
  57. package/dist/service-B2vx6CGM.mjs +2 -0
  58. package/dist/{service-DDrbdyd-.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
  59. package/dist/service-Bkz_TB5v.mjs +9 -0
  60. package/dist/service-Bkz_TB5v.mjs.map +1 -0
  61. package/dist/service-Dffd4how.mjs +1 -0
  62. package/dist/service_pb-Bethc2NW.mjs +1 -0
  63. package/dist/service_pb-CfpSriCy.mjs +2 -0
  64. package/dist/service_pb-CfpSriCy.mjs.map +1 -0
  65. package/dist/syntax-diagnostic-BQgOV8Fz.mjs +2 -0
  66. package/dist/syntax-diagnostic-BQgOV8Fz.mjs.map +1 -0
  67. package/dist/validation-errors-ChvCG6wT.mjs +3 -0
  68. package/dist/validation-errors-ChvCG6wT.mjs.map +1 -0
  69. package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
  70. package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
  71. package/dist/vendor/graphql/language/ast.d.mts +784 -0
  72. package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
  73. package/dist/vendor/graphql/language/source.d.mts +46 -0
  74. package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
  75. package/dist/vitest/index.mjs +1 -1
  76. package/dist/vitest/index.mjs.map +1 -1
  77. package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
  78. package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
  79. package/docs/cli/application.md +16 -12
  80. package/docs/cli/executor.md +13 -17
  81. package/docs/cli/function.md +1 -1
  82. package/docs/cli/notification.md +128 -0
  83. package/docs/cli/tailordb.md +26 -57
  84. package/docs/cli/workspace.md +3 -4
  85. package/docs/cli-reference.md +228 -48
  86. package/docs/configuration.md +28 -0
  87. package/docs/github-actions.md +241 -38
  88. package/docs/migration/v2.md +5 -3
  89. package/docs/services/auth.md +5 -0
  90. package/docs/services/executor.md +2 -0
  91. package/docs/services/tailordb/index.md +6 -2
  92. package/docs/services/tailordb/migration.md +54 -57
  93. package/docs/testing.md +0 -1
  94. package/package.json +25 -21
  95. package/dist/application-Cida-j1g.mjs +0 -207
  96. package/dist/application-Cida-j1g.mjs.map +0 -1
  97. package/dist/configure/services/http-adapter/index.d.mts +0 -2
  98. package/dist/crashreport-C2AcQNTe.mjs +0 -1
  99. package/dist/errors-Dmdnq0zi.mjs.map +0 -1
  100. package/dist/kysely-type-DVL90_oX.mjs.map +0 -1
  101. package/dist/register-ts-hook-Ht4zCseV.mjs +0 -1115
  102. package/dist/register-ts-hook-Ht4zCseV.mjs.map +0 -1
  103. package/dist/repl-editor-DkrCZmmg.mjs +0 -2
  104. package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
  105. package/dist/service-CZ0EdD2-.mjs +0 -10
  106. package/dist/service-CZ0EdD2-.mjs.map +0 -1
  107. package/dist/service-DDrbdyd-.mjs +0 -2
  108. package/dist/service-WhSyhaho.mjs +0 -1
  109. package/dist/service_pb-BMHhVot2.mjs +0 -1
  110. package/dist/service_pb-BxMSK0gg.mjs +0 -2
  111. package/dist/service_pb-BxMSK0gg.mjs.map +0 -1
  112. package/dist/workspace_resource_pb-7smKERdZ.mjs +0 -2
  113. package/dist/workspace_resource_pb-7smKERdZ.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,129 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2958](https://github.com/tailor-platform/sdk/pull/2958) [`a955502`](https://github.com/tailor-platform/sdk/commit/a955502ee55cdb231d1a89276c6d3a8d240c58c6) Thanks [@toiroakr](https://github.com/toiroakr)! - `defineAuth` results now have `asExternal()`, which references an Auth service defined in another app of the same repository as an external one: `auth: coreAuth.asExternal()`. It takes over the name and the machine users, so the referencing app follows renames of both and gets the machine user names in its generated `tailor.d.ts`. A misspelled `invoker` there is then a type error, which `{ name: "...", external: true }` could not provide because it leaves the names empty. Hooks, OAuth2 clients, and the rest of the definition are not taken over, so the referencing app does not deploy them again.
8
+
9
+ - [#2952](https://github.com/tailor-platform/sdk/pull/2952) [`93c373f`](https://github.com/tailor-platform/sdk/commit/93c373f539154c65474531579c14391420c374aa) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor deploy` now stops with `INVOKER_MACHINE_USER_NOT_FOUND` when a string `invoker` of a resolver or an executor names a machine user that does not exist in its Auth service. Before, a misspelled name passed `tsc` and `deploy`, and failed with `machine user not found` when the resolver or executor first ran. When a config deployed in the same run defines the Auth service, the machine users it lists are the ones accepted, because deploy removes the ones it no longer lists. When the Auth service is only referenced as `external`, the machine users that exist in the workspace are accepted. An existing config that names a machine user that exists nowhere now fails at deploy; add the machine user to the Auth service or fix the name. If you create the machine user of an externally referenced Auth service after deploying the app that uses it, deploy the Auth service first, or deploy both configs in the same run (`tailor deploy --config a,b`).
10
+
11
+ - [#2975](https://github.com/tailor-platform/sdk/pull/2975) [`5889f05`](https://github.com/tailor-platform/sdk/commit/5889f057fe1fc0e2c0c8cadd3c08bb8674324fb7) Thanks [@jackchuka](https://github.com/jackchuka)! - **Breaking change**: `tailor workspace prune` no longer accepts `--personal`. Every workspace now belongs to an organization, so there are no workspaces outside an organization and folder for it to select. Replace `--personal` with `--organization-root` or `--folder-id` naming the locations to sweep. Do not just delete it: a `--name` or `--older-than` sweep without a location considers every workspace visible to the login, even with `--yes`.
12
+
13
+ - [#2739](https://github.com/tailor-platform/sdk/pull/2739) [`8b69e57`](https://github.com/tailor-platform/sdk/commit/8b69e571df0972a96e0e4c971472aa9ade44d9b3) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor seed apply` now runs the TailorDB seed and the IdP `_User` seed, list and delete scripts as temporary workflows instead of synchronous script executions, so they are no longer cut off by the 60-second execution limit. For each namespace it registers a function, a job function and a workflow named `tailor-seed-<kind>--<namespace>` (`<kind>` is `tailordb`, `idp-seed`, `idp-list` or `idp-truncate`), runs every chunk through them, and removes them afterwards. A namespace too long for the platform's 63-character name limit is cut short and followed by a hash. A run interrupted before cleanup leaves them behind, and the next run of the same script (the TailorDB seed, or the IdP `_User` seed, list or delete) for that namespace removes them first.
14
+
15
+ If `tailor seed apply` finds the workflow of an earlier run still executing (for example, a chunk that keeps running on the platform after Ctrl-C), it stops with an error naming the execution instead of removing it. `tailor seed apply --truncate` runs this check for every seed workflow of the namespaces it touches before it deletes anything, so an interrupted run no longer leaves a truncated table that is not reseeded. Wait for that execution to finish and run the command again. Running `tailor seed apply` for the same namespace in two processes at once is not supported: if one of them fails while registering the function, it removes the resources of the other. If the command loses track of a running chunk (for example, a timeout while starting it), it removes the resources and cannot tell whether the chunk was applied, so check the table, then re-run with `--upsert`.
16
+
17
+ A TailorDB chunk that fails now stops the remaining chunks of that namespace, so later chunks do not fail on foreign keys of the rolled-back chunk or leave a gap in a table split across chunks.
18
+
19
+ The seed and seed dump scripts are now minified and, like other bundled functions, embed an inline sourcemap by default so error stack traces stay readable. Set `buildOptions.inlineSourcemap` to `false` in `defineConfig` to drop the sourcemap.
20
+
21
+ ### Patch Changes
22
+
23
+ - [#2981](https://github.com/tailor-platform/sdk/pull/2981) [`1a4dca2`](https://github.com/tailor-platform/sdk/commit/1a4dca29c783de43b2eec7485e685e9f1d2a3415) Thanks [@dqn](https://github.com/dqn)! - `tailor executor trigger --data` now delivers the JSON to an incoming-webhook executor as its `body`, as a request to the webhook URL does. Since a Platform change, the data had arrived one level deeper, under `body.body`, so reading a field such as `body.email` returned `undefined` without an error. If an executor reads `body.body` to work around this, change it back to `body`. `--header` values are not passed to the executor, which receives empty `headers`, and the command now warns when `--header` is given. `--header` without `--data` no longer sends a body, so the executor receives `body` as `null`, as with no options. To test an executor that reads headers, send the request to its webhook URL, which `tailor executor webhook list` shows. The programmatic `triggerExecutor` passes `payload` to the executor as `body` unchanged, so pass the body itself rather than `{ body, headers }`.
24
+
25
+ - [#2959](https://github.com/tailor-platform/sdk/pull/2959) [`ebb62b6`](https://github.com/tailor-platform/sdk/commit/ebb62b641112a94b3f1880b6fa8eadf3602bf114) Thanks [@dqn](https://github.com/dqn)! - `tailor generate` and `tailor function run` now read the config path from `TAILOR_CONFIG_PATH` when `--config` is not given, like other commands that take a single config file. If `TAILOR_CONFIG_PATH` holds comma-separated paths for `tailor deploy`, pass `--config` to these commands.
26
+
27
+ - [#2960](https://github.com/tailor-platform/sdk/pull/2960) [`61dbc34`](https://github.com/tailor-platform/sdk/commit/61dbc34ade56c14faa3ee9cfce7b15bc59c21ae1) Thanks [@dqn](https://github.com/dqn)! - `tailorRuntime({ config })` now names the file, line, and parse error when `tailor.config.ts` or a file it imports does not parse, instead of reporting `[object Object]` against `tailor.config.ts`.
28
+
29
+ - [#2983](https://github.com/tailor-platform/sdk/pull/2983) [`d4faf97`](https://github.com/tailor-platform/sdk/commit/d4faf97d8886c15d95a25f36b9a4baf2f0e0ab1f) Thanks [@dqn](https://github.com/dqn)! - Document that an executor with an incoming webhook trigger, when triggered manually with `tailor executor trigger` or `triggerExecutor`, receives no `rawBody` and empty `headers`, in the executor guide and in the JSDoc of the webhook `rawBody` and `headers` args. An executor that verifies a signature over `rawBody` rejects such a run, so test it through its webhook URL.
30
+
31
+ - [#2957](https://github.com/tailor-platform/sdk/pull/2957) [`b79b113`](https://github.com/tailor-platform/sdk/commit/b79b1138846318d3a366c28be4aea1c67d36c99f) Thanks [@dqn](https://github.com/dqn)! - Fix `tailor deploy --no-schema-check` leaving a table removed from the local definitions without a migration until the next deploy when its namespace has pending migrations. The table is now deleted in the same deploy, after those migrations complete.
32
+
33
+ - [#2941](https://github.com/tailor-platform/sdk/pull/2941) [`7a5c244`](https://github.com/tailor-platform/sdk/commit/7a5c24497528b197439779ba83813f9d4f490135) Thanks [@dqn](https://github.com/dqn)! - `tailor deploy` now prints the pending-migration summary and the other notices about the migration state (a checkpoint reset, tables left to delete, a migration to run again, a skipped script, ignored `steps`) once, before the plan, instead of repeating them after the confirmation. When the pending migrations change after the plan, for example because another deploy applied one, the deploy now stops with `DEPLOY_PLAN_STALE` instead of applying a different set than the one it showed.
34
+
35
+ - [#2987](https://github.com/tailor-platform/sdk/pull/2987) [`67f8539`](https://github.com/tailor-platform/sdk/commit/67f853968141dcf8806f5e240eff54f0d8e72779) Thanks [@dqn](https://github.com/dqn)! - `tailor query --engine sql` and `query()` from `@tailor-platform/sdk/cli` now report how many rows an `INSERT`, `UPDATE`, or `DELETE` changed. For these statements the result adds `affectedRows` and sets `rowCount` to the same count, which was 0 when the statement had no `RETURNING`. When such a statement returns no rows, the text output prints the count (for example "3 rows affected.") instead of "No rows returned."
36
+
37
+ - [#2988](https://github.com/tailor-platform/sdk/pull/2988) [`818debc`](https://github.com/tailor-platform/sdk/commit/818debc8631fdd093cff6ccad9cc7a2e9f04e26b) Thanks [@dqn](https://github.com/dqn)! - Speed up `tailor seed apply` and `tailor tailordb migration test` for a seed table too large for one chunk: splitting it took tens of seconds for a few MB of small records and now takes milliseconds
38
+
39
+ - [#2961](https://github.com/tailor-platform/sdk/pull/2961) [`f30a654`](https://github.com/tailor-platform/sdk/commit/f30a65440c9c54a932884cf2d4be64c2245ccd1c) Thanks [@dqn](https://github.com/dqn)! - Add `--codemod` to `tailor setup ci autofix`, so the autofix workflow handles the codemods of a pull request that upgrades `@tailor-platform/sdk`, such as one from Renovate. It upgrades each app from the version the base branch's lockfile resolves, or from 2.37.0 when the base branch has no such lockfile, to the version the pull request installs. `warn` reports what `tailor upgrade` would rewrite and the changes it leaves for review, `error` reports them as errors and fails the `tailor-codemod-result` job, which also fails when the autofix job fails or is cancelled, and `deterministic` commits the rewrites with what `tailor generate` changes and reports the rest. `tailor setup update` keeps the `--codemod` value, and without `--codemod` the workflow is the same as before. With `error`, a review that still matches after you finish the migration keeps the check failing until the base branch has the new version. `deterministic` leaves files under `.github/workflows` out of the fix commit and reports them for you to commit, and a bun repository needs `bun.lock` instead of `bun.lockb`.
40
+
41
+ - [#2947](https://github.com/tailor-platform/sdk/pull/2947) [`d372640`](https://github.com/tailor-platform/sdk/commit/d372640551b3540b3afaa3f6f96b2f9d2a7b5185) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency kysely to v0.29.8
42
+
43
+ - [#2951](https://github.com/tailor-platform/sdk/pull/2951) [`ef7e152`](https://github.com/tailor-platform/sdk/commit/ef7e15252e54a27b767cc583b5e77845dd9b3541) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @​connectrpc to v2.3.0
44
+
45
+ - [#2954](https://github.com/tailor-platform/sdk/pull/2954) [`d065035`](https://github.com/tailor-platform/sdk/commit/d065035f6adc3b131bb8bb08d70a458acf20da15) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​opentelemetry/semantic-conventions to v1.44.0
46
+
47
+ - [#2955](https://github.com/tailor-platform/sdk/pull/2955) [`0e86776`](https://github.com/tailor-platform/sdk/commit/0e867766a8b5daa17927f6018c59281457bfebb9) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​politty/zod to v0.7.1
48
+
49
+ - [#2956](https://github.com/tailor-platform/sdk/pull/2956) [`5f2bfc5`](https://github.com/tailor-platform/sdk/commit/5f2bfc50e1770931bad639ba809853bedc7b8b4c) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency globals to v17.14.0
50
+
51
+ - [#2973](https://github.com/tailor-platform/sdk/pull/2973) [`c0ae913`](https://github.com/tailor-platform/sdk/commit/c0ae913259e1b51c7df799f3c023e4dd4ea567c9) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency semver to v7.8.6
52
+
53
+ - [#2978](https://github.com/tailor-platform/sdk/pull/2978) [`4dc187c`](https://github.com/tailor-platform/sdk/commit/4dc187c9d8e86065f7e352e179ebd0809c62f1ff) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update oxc to v0.157.0
54
+
55
+ - [#2997](https://github.com/tailor-platform/sdk/pull/2997) [`d396c09`](https://github.com/tailor-platform/sdk/commit/d396c09b4164c81bc0ecf8f91f487a6cf2fa886b) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): lock file maintenance
56
+
57
+ - [#2739](https://github.com/tailor-platform/sdk/pull/2739) [`8b69e57`](https://github.com/tailor-platform/sdk/commit/8b69e571df0972a96e0e4c971472aa9ade44d9b3) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor seed apply` now runs each seed chunk in a single transaction. If any table fails, every table inserted earlier in that chunk is rolled back instead of being left committed, and Executors triggered by create events no longer run mid-chunk, which could deadlock on self-referencing tables.
58
+
59
+ Seed data is split into chunks of about 3.5 MiB, and the transaction covers one chunk. A table that does not fit in one chunk is split across chunks and is committed chunk by chunk.
60
+
61
+ - [#2984](https://github.com/tailor-platform/sdk/pull/2984) [`eb76277`](https://github.com/tailor-platform/sdk/commit/eb7627714f60f41e3c1833b150a2098dd7fdf58c) Thanks [@dqn](https://github.com/dqn)! - Labeling a closed pull request, such as one already merged, no longer deploys a preview workspace from the preview workflow that `tailor setup ci preview --require label` generates. The cleanup workflow had already run when the pull request closed, so such a workspace stayed until a later cleanup run deleted it after its 7-day `ttl` expired. The `tailor-preview-deploy` job of every preview workflow now skips events on a closed pull request, and your jobs that need it are skipped with it.
62
+
63
+ This release also raises the workflow template version, so `tailor setup check` reports a template-version finding for existing workflows until you run `tailor setup update`. With `TAILOR_PLATFORM_FAIL_ON_DRIFT` set to `true`, the drift check fails until then.
64
+
65
+ - [#2982](https://github.com/tailor-platform/sdk/pull/2982) [`cd33cdb`](https://github.com/tailor-platform/sdk/commit/cd33cdb901bf2eb4ee57e77ba8d62b134c1064d1) Thanks [@dqn](https://github.com/dqn)! - The v2 migration guide and `tailor upgrade` prompt for the programmatic CLI functions no longer say that `triggerExecutor`'s `payload` is typed from the executor definition. `payload` is accepted only for an executor with an incoming webhook trigger, and its shape is not checked; `startWorkflow`'s `arg` is still typed from the workflow definition.
66
+
67
+ ## 2.38.0
68
+
69
+ ### Minor Changes
70
+
71
+ - [#2921](https://github.com/tailor-platform/sdk/pull/2921) [`e1b9d5f`](https://github.com/tailor-platform/sdk/commit/e1b9d5fa974b0f770728c7f04b03706896211bf7) Thanks [@dqn](https://github.com/dqn)! - `tailor tailordb migration validate` now fails, with the error code `tailor deploy` reports, when a migration an earlier deploy left in progress would stop the next deploy, and accepts `--migration-skip-steps` to check the steps to skip the way `tailor deploy` does
72
+
73
+ - [#2869](https://github.com/tailor-platform/sdk/pull/2869) [`8c8ae7d`](https://github.com/tailor-platform/sdk/commit/8c8ae7df02f8c4394988e21d5bda0acc657f1e97) Thanks [@mocchira](https://github.com/mocchira)! - After a command finishes in an interactive terminal, `tailor` now lists your unread WARNING and CRITICAL platform notifications briefly on stderr, with pointers to `tailor notification list` and `tailor notification read <id>`. A CRITICAL notification is listed ahead of newer WARNINGs. It is best effort: the lookup runs alongside the command, and if it has not answered when the command ends, `tailor` waits at most 150 ms more before dropping it. It never changes a command's exit code, and it marks nothing read. It keeps appearing after each command until you read the notifications with `tailor notification read` or dismiss them. After a failed lookup it pauses for 5 minutes, so a platform outage does not cost a request per command. It is never shown in CI, under `--json`, in a pipe, or after help output. It is also skipped after `login`, `logout`, `auth`, `api`, `query` and the `notification` commands themselves, and after commands that only work locally: `init`, `generate`, `show`, `plugin`, `skills`, `completion`, `crashreport`, `upgrade`, `profile`, `open`, and `user` other than `user pat`. Set `TAILOR_NOTIFICATION_BANNER=off` to turn it off.
74
+
75
+ - [#2868](https://github.com/tailor-platform/sdk/pull/2868) [`8369949`](https://github.com/tailor-platform/sdk/commit/8369949dc63974b0174b71cafe85ebe74b1eddb2) Thanks [@mocchira](https://github.com/mocchira)! - New `tailor notification` commands read the platform notifications sent to you (alerts, incidents, maintenance notices and announcements), the same inbox the Console shows:
76
+
77
+ - `tailor notification list` lists your inbox, with `--category`, `--severity`, `--unread`, `--scope-workspace` and `--scope-organization` filters and shows the 50 newest by default (`--limit N` to change it, `--limit 0` for all).
78
+ - `tailor notification read <id...>` prints a notification (title, metadata, body, and action links, with Console paths given as full Console URLs) and marks it read; `--no-mark-read` only displays it. IDs that are not found are reported after the others are shown, and a read-only login shows notifications without marking them read.
79
+ - `tailor notification dismiss <id>` removes a notification from your inbox. This cannot be undone, so it is refused on a read-only profile.
80
+
81
+ All three support `--json`.
82
+
83
+ - [#2895](https://github.com/tailor-platform/sdk/pull/2895) [`0c15750`](https://github.com/tailor-platform/sdk/commit/0c1575093b5aba8dc47296a66513f1c500f72cfb) Thanks [@dqn](https://github.com/dqn)! - The CLI now loads `--env-file` and `--env-file-if-exists` before it reads its options, so values from an env file fill every option backed by an environment variable, the same as shell variables: for example `--config` from `TAILOR_CONFIG_PATH`, `--organization-id` from `TAILOR_PLATFORM_ORGANIZATION_ID` in `organization` commands, and the client ID and secret of `login --machine-user`. Previously these options kept their defaults or failed validation. A repeated `--env-file` now loads every file instead of only the last one; `createCommonArgs()` parses both options as string arrays. CLI plugins can load env files the same way by calling the new `loadEnvFilesFromArgv` export of `@tailor-platform/sdk/cli` from their `setup` hook, passing it the options they give `createCommonArgs()`. `deploy`, `workspace create`, and `tailordb migration test` now also ignore an empty `TAILOR_PLATFORM_ORGANIZATION_ID` or `TAILOR_PLATFORM_FOLDER_ID` set in the shell, as they already did for one loaded from an env file; an organization or folder ID that is not a UUID now fails `tailordb migration test` with `OPTIONS_INVALID` instead of `INVALID_ARGUMENTS`. When a CLI plugin is given an env file, `tailor` also loads it before dispatching, so a `TAILOR_CONFIG_PATH` in the file reaches the plugin instead of the config file found from the current directory.
84
+
85
+ - [#2911](https://github.com/tailor-platform/sdk/pull/2911) [`91311ea`](https://github.com/tailor-platform/sdk/commit/91311ea1b25ca0832bda901e65fcb554d0bc52b1) Thanks [@dqn](https://github.com/dqn)! - **Breaking change (beta)**: Remove `tailor tailordb migration set`. It moved a namespace's migration checkpoint without changing its tables, so the checkpoint could stop matching the tables and the next deploy stopped with `MIGRATION_REMOTE_DRIFT`. Use `tailor tailordb migration sync <N>` instead: when the tables already match migration `<N>`, only the checkpoint changes, and `--force` replaces another migration history ID as `set --force` did. To re-run a failed migration in a development workspace, run `tailor tailordb migration sync <previous>`, which also removes the fields the failed migration added and deletes the tables it added together with their data. Settle a migration that an earlier deploy left in progress with `tailor tailordb migration resolve --complete` or `--rollback`. Errors and documentation that suggested `set` now suggest `sync`.
86
+
87
+ ### Patch Changes
88
+
89
+ - [#2897](https://github.com/tailor-platform/sdk/pull/2897) [`5cb6958`](https://github.com/tailor-platform/sdk/commit/5cb695867cdcd6359c7c0fce2434906af60335f7) Thanks [@dqn](https://github.com/dqn)! - `tailor setup ci preview` now deletes the preview workspace of a pull request closed with merge conflicts, which GitHub never ran the preview workflow's cleanup for. Cleanup moves into a separate workflow, `tailor-<name>-preview-cleanup.yml`, which starts on `pull_request_target` and runs only the default branch's code. Run `tailor setup update` to regenerate existing preview workflows: the `tailor-preview-cleanup` job moves into the new workflow together with the steps and settings you added to it, and `setup update` stops if a job of yours `needs` it. A job of yours in the preview workflow that runs when the pull request is closed no longer runs; `setup` warns about each one whose `if` contains an `== 'closed'` comparison, so you can move it into the cleanup workflow. Commit the new workflow to the default branch, since GitHub runs it from there, and allow the default branch in the target's GitHub Environment if it restricts which branches can deploy.
90
+
91
+ - [#2942](https://github.com/tailor-platform/sdk/pull/2942) [`734bf30`](https://github.com/tailor-platform/sdk/commit/734bf3090744eaaacc9a07872190534a67ed845e) Thanks [@dqn](https://github.com/dqn)! - The CLI now retries a Platform request, such as creating a workspace or applying a resource during `tailor deploy`, when the connection closes before a secure connection is established, instead of failing with `Client network socket disconnected before secure TLS connection was established`
92
+
93
+ - [#2843](https://github.com/tailor-platform/sdk/pull/2843) [`748a0d6`](https://github.com/tailor-platform/sdk/commit/748a0d686bc3863fd3796aa3b984823e1065a7f9) Thanks [@toiroakr](https://github.com/toiroakr)! - Improve SQL and GraphQL syntax highlighting in the `query` REPL and make the REPL start faster.
94
+
95
+ - [#2843](https://github.com/tailor-platform/sdk/pull/2843) [`345da01`](https://github.com/tailor-platform/sdk/commit/345da01d5918578e265013c96d1d7e6e9a4fba74) Thanks [@toiroakr](https://github.com/toiroakr)! - An executor whose GraphQL operation passes a `DocumentNode`, such as the result of `parse()` from `graphql` or a `gql` tagged template, to `query` now deploys it as the printed GraphQL query. It was deployed as the text `[object Object]`, which is not a valid GraphQL query. Passing the query as a string is unchanged.
96
+
97
+ - [#2843](https://github.com/tailor-platform/sdk/pull/2843) [`aca6f28`](https://github.com/tailor-platform/sdk/commit/aca6f28f73294b88549fe1815230435d042b0f01) Thanks [@toiroakr](https://github.com/toiroakr)! - The SDK no longer installs `graphql`, `@urql/core`, or `wonka` as dependencies. The `DocumentNode` type that HTTP adapter `input` handlers and the executor `query` option accept is now included in the SDK's type declarations, so a project without `graphql` still gets `query` type-checked, and documents typed with `graphql` 16 or 17, including `TypedDocumentNode`, keep type-checking. If your project imports `graphql`, `@urql/core`, or `wonka` without declaring it, which only works when your package manager hoists it, add it to your own dependencies. If you use `graphql` 15 with `skipLibCheck: true`, passing a `parse()` result to the executor `query` option is now a type error, as it already was for HTTP adapters.
98
+
99
+ - [#2914](https://github.com/tailor-platform/sdk/pull/2914) [`53c8474`](https://github.com/tailor-platform/sdk/commit/53c84745fcb2b65a1171900c6ec628819364324e) Thanks [@dqn](https://github.com/dqn)! - `tailor deploy` no longer stops with `MIGRATION_REMOTE_DRIFT` when an earlier deploy left a migration's pre-migration schema changes or maintenance mode in place without recording the migration as in progress, for example because it stopped right after those changes or could not roll them back. It runs that migration again from the start. `tailor tailordb migration resolve --rollback` returns such a namespace to its checkpoint without deploying, and `tailor tailordb migration validate` reports it as valid.
100
+
101
+ - [#2925](https://github.com/tailor-platform/sdk/pull/2925) [`77c7bed`](https://github.com/tailor-platform/sdk/commit/77c7bedde797fb49c1633aa0601765b7f51e0d2b) Thanks [@dqn](https://github.com/dqn)! - `tailor tailordb migration validate` now also fails, with the error code `tailor deploy` reports, when a pending migration script has no machine user to run it or cannot be bundled
102
+
103
+ - [#2932](https://github.com/tailor-platform/sdk/pull/2932) [`58eec18`](https://github.com/tailor-platform/sdk/commit/58eec1816ed7483d0d4fec484e0dddd3ff033272) Thanks [@dqn](https://github.com/dqn)! - `errorToJson` from `@tailor-platform/sdk/cli` now returns the envelope that `serializeError` writes, so its result can be embedded in JSON output: string values come without colors and with registered secrets redacted, and a context that cannot be written as JSON is left out along with the stack
104
+
105
+ - [#2940](https://github.com/tailor-platform/sdk/pull/2940) [`70d504e`](https://github.com/tailor-platform/sdk/commit/70d504ec8e05e83bb9ebf0788510c4fbf6279578) Thanks [@dqn](https://github.com/dqn)! - `.serial()` formats with an octal `%o` specifier or a literal `%%` now reproduce in the PGlite schema: `tailor generate` with `kyselyTypePlugin({ pgliteSchemaPath })` no longer fails on them, `tailor tailordb migration generate` writes `db.pglite.ts`, and `tailor tailordb migration script --with-test` also writes `migrate.pglite.test.ts`.
106
+
107
+ - [#2916](https://github.com/tailor-platform/sdk/pull/2916) [`b1f5a4b`](https://github.com/tailor-platform/sdk/commit/b1f5a4b19392bcdd14f7e4cb695a1b6d4d124c7d) Thanks [@dqn](https://github.com/dqn)! - `tailor deploy` now finishes deleting the tables a migration removed when an earlier deploy committed that migration but failed or was interrupted before deleting them, instead of stopping with remote schema drift until you delete them by hand. The deploy lists those tables among its deletions and deletes them with their data after confirmation, and `tailor tailordb migration validate` reports them as tables the next deploy deletes.
108
+
109
+ - [#2882](https://github.com/tailor-platform/sdk/pull/2882) [`9bf90bb`](https://github.com/tailor-platform/sdk/commit/9bf90bb9d1bf818ac3a294b3fe9ed68301b7eb2f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency amaro to v1.3.0
110
+
111
+ - [#2905](https://github.com/tailor-platform/sdk/pull/2905) [`bc3dd45`](https://github.com/tailor-platform/sdk/commit/bc3dd45ccbb67641f9c7636594a4fdcda963dd4e) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @​types/node to v26.6.6
112
+
113
+ - [#2910](https://github.com/tailor-platform/sdk/pull/2910) [`dd0cd4f`](https://github.com/tailor-platform/sdk/commit/dd0cd4fd422909ee99921dbc4b22aed863c901f8) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency confbox to v0.3.2
114
+
115
+ - [#2929](https://github.com/tailor-platform/sdk/pull/2929) [`173d9d2`](https://github.com/tailor-platform/sdk/commit/173d9d2f3830fff04e90d64600f71fa16d3dd221) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency es-toolkit to v1.53.1
116
+
117
+ - [#2924](https://github.com/tailor-platform/sdk/pull/2924) [`0c7fed1`](https://github.com/tailor-platform/sdk/commit/0c7fed120e25fdfea9c71f2035c74870b92fc7b2) Thanks [@dqn](https://github.com/dqn)! - Apply local TailorDB table definitions that the pending migrations do not include in the same `tailor deploy --no-schema-check` run, once the migrations complete, instead of leaving them to the next deploy. The deploy lists those tables, and fails with `MIGRATION_LOCAL_DEFINITIONS_FAILED` after the migrations are applied when one of them cannot be applied.
118
+
119
+ - [#2913](https://github.com/tailor-platform/sdk/pull/2913) [`b7ffa31`](https://github.com/tailor-platform/sdk/commit/b7ffa31245abac1fb97dbfc51768bc55a2ce2dfa) Thanks [@dqn](https://github.com/dqn)! - The `tailor tailordb migration generate` and `tailor deploy` commands that `tailor tailordb migration rebaseline` suggests now pass `--config` the way its other suggested commands do: relative to the current directory, and omitted for the default config. They passed the config file's absolute path before.
120
+
121
+ - [#2920](https://github.com/tailor-platform/sdk/pull/2920) [`a84ad7e`](https://github.com/tailor-platform/sdk/commit/a84ad7eb033dc5d687c1cea8a8fcd9238ebad27a) Thanks [@dqn](https://github.com/dqn)! - Fix `.start()` calls in a workflow, resolver, or executor file that declares its own `tailor` (for example, a workflow job exported as `tailor`), which failed at runtime after deploy.
122
+
123
+ - [#2915](https://github.com/tailor-platform/sdk/pull/2915) [`d385bbb`](https://github.com/tailor-platform/sdk/commit/d385bbbb122eafbdef90f00d8464fc04ee6f58cd) Thanks [@dqn](https://github.com/dqn)! - `tailor deploy` now resumes a multi-step migration whose earlier deploy stopped during or after the post-migration schema changes but before recording the checkpoint, for example because the process was killed or the checkpoint write failed. It used to stop with `MIGRATION_REMOTE_DRIFT` on the tables that already had the post-migration schema, until `tailor tailordb migration resolve --complete` settled the migration or a deploy ran with `--no-schema-check`. Each table may now have either the pre-migration or the post-migration schema of that migration, and `tailor tailordb migration validate` accepts the same. The warning for a checkpoint write that could not be confirmed now says to deploy again for such a migration instead of to repair the checkpoint.
124
+
125
+ - [#2919](https://github.com/tailor-platform/sdk/pull/2919) [`287925a`](https://github.com/tailor-platform/sdk/commit/287925ab6dd1d222ba55ee327bb196d6f761115e) Thanks [@dqn](https://github.com/dqn)! - `.unique()` on a field with a `keyOnly` relation is now kept. Before, the relation silently dropped it, so the field was deployed without a unique constraint, and a relation that used the field as its `toward.key` failed with `which must be unique`. The PGlite schema that `kyselyTypePlugin` and the migration `db.pglite.ts` generate, and the seed schema that `seedPlugin` generates, now declare the constraint too. After upgrading, a deployed table with such a field gains the unique constraint on its next `tailor deploy`; if stored rows hold duplicate values for the field, that deploy fails until the duplicate rows are updated to distinct values or deleted. In a namespace with `migration.directory`, `tailor deploy` stops with `MIGRATION_SCHEMA_CHECK_FAILED` until `tailor tailordb migration generate` creates the migration, and until the `TODO()` in its `migrate.ts`, which sets a new value on each duplicate row, is replaced. The new value must also be a key that exists in the referenced table.
126
+
3
127
  ## 2.37.0
4
128
 
5
129
  ### Minor Changes
@@ -1 +1 @@
1
- export{t as defineApplication,r as generatePluginFilesIfNeeded}from"./application-Cida-j1g.mjs";
1
+ export{t as defineApplication,r as generatePluginFilesIfNeeded}from"./application-mNOJx9Y2.mjs";