@tailor-platform/sdk 2.32.0 → 2.33.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 (61) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/{application-D0xNJbag.mjs → application-B9_NHiUC.mjs} +40 -32
  3. package/dist/application-B9_NHiUC.mjs.map +1 -0
  4. package/dist/application-Bet1K5C4.mjs +1 -0
  5. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
  6. package/dist/cli/lib.mjs +1 -1
  7. package/dist/cli/main.mjs +44 -33
  8. package/dist/cli/main.mjs.map +1 -1
  9. package/dist/cli/services/resolver/service.d.mts +1 -0
  10. package/dist/cli/shared/client.d.mts +52 -1
  11. package/dist/cli/ts-hook.d.mts +0 -2
  12. package/dist/cli/ts-hook.mjs +0 -113
  13. package/dist/completion/zsh-worker.zsh +25 -5
  14. package/dist/configure/services/staticwebsite/index.d.mts +6 -1
  15. package/dist/{kysely-type-CBwsdx16.mjs → kysely-type-DxyIWXc6.mjs} +3 -3
  16. package/dist/kysely-type-DxyIWXc6.mjs.map +1 -0
  17. package/dist/manager-DTRhIupk.mjs +2 -0
  18. package/dist/manager-DTRhIupk.mjs.map +1 -0
  19. package/dist/plugin/builtin/enum-constants/index.mjs +2 -2
  20. package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
  21. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  22. package/dist/plugin/index.mjs +1 -1
  23. package/dist/plugin/types.d.mts +3 -0
  24. package/dist/register-ts-hook-Dp9reSRG.mjs +1053 -0
  25. package/dist/register-ts-hook-Dp9reSRG.mjs.map +1 -0
  26. package/dist/repl-editor-DkrCZmmg.mjs +2 -0
  27. package/dist/repl-editor-DkrCZmmg.mjs.map +1 -0
  28. package/dist/service_pb-6EkMfdOb.mjs +2 -0
  29. package/dist/service_pb-6EkMfdOb.mjs.map +1 -0
  30. package/dist/service_pb-CsJKokDl.mjs +1 -0
  31. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +5 -2
  32. package/dist/tailor-proto/src/tailor/v1/security_pb.d.mts +213 -0
  33. package/dist/tailor-proto/src/tailor/v1/security_resource_pb.d.mts +301 -0
  34. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +200 -8
  35. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +201 -1
  36. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +88 -1
  37. package/dist/types/staticwebsite.generated.d.mts +9 -1
  38. package/dist/vitest/index.d.mts +2 -2
  39. package/dist/vitest/index.mjs +1 -1
  40. package/dist/vitest/index.mjs.map +1 -1
  41. package/dist/vitest/pglite-kysely.d.mts +19 -0
  42. package/dist/{workspace_resource_pb-CaoM2npP.mjs → workspace_resource_pb-C4CkoYww.mjs} +2 -2
  43. package/dist/workspace_resource_pb-C4CkoYww.mjs.map +1 -0
  44. package/docs/plugin/custom.md +34 -0
  45. package/docs/plugin/index.md +1 -0
  46. package/docs/services/staticwebsite.md +31 -1
  47. package/docs/services/tailordb/migration.md +33 -10
  48. package/package.json +5 -5
  49. package/dist/application-C2bPmmbh.mjs +0 -1
  50. package/dist/application-D0xNJbag.mjs.map +0 -1
  51. package/dist/kysely-type-CBwsdx16.mjs.map +0 -1
  52. package/dist/manager-Bk-7vkwd.mjs +0 -2
  53. package/dist/manager-Bk-7vkwd.mjs.map +0 -1
  54. package/dist/register-ts-hook-_dHIREtU.mjs +0 -1050
  55. package/dist/register-ts-hook-_dHIREtU.mjs.map +0 -1
  56. package/dist/repl-editor-DGJBfIt1.mjs +0 -2
  57. package/dist/repl-editor-DGJBfIt1.mjs.map +0 -1
  58. package/dist/service_pb-Bbu2QSIr.mjs +0 -2
  59. package/dist/service_pb-Bbu2QSIr.mjs.map +0 -1
  60. package/dist/service_pb-urxAIYHT.mjs +0 -1
  61. package/dist/workspace_resource_pb-CaoM2npP.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2742](https://github.com/tailor-platform/sdk/pull/2742) [`4f3f30c`](https://github.com/tailor-platform/sdk/commit/4f3f30c4b7a305d654a1b8ad9cb709f7effe75ec) Thanks [@mocchira](https://github.com/mocchira)! - `customDomains` entries can now name a destination, moving a domain to another static website — in the same workspace or a different one — without downtime, a new certificate, or a DNS change:
8
+
9
+ ```typescript
10
+ defineStaticWebSite("my-website", {
11
+ customDomains: [{ domain: "app.example.com", transferTo: { workspaceId: "..." } }],
12
+ });
13
+ ```
14
+
15
+ Deploying opens the offer; the receiving side accepts it by listing the domain normally and deploying. `tailor deploy` reports an open offer and says when the domain has moved and the entry can be deleted.
16
+
17
+ While an offer is open, `tailor deploy` and `tailor remove` refuse to remove the domain or the static website holding it, at plan time and before anything is applied. A plan also fails, rather than quietly doing nothing, when an entry names a domain the site does not hold and no transfer from this workspace accounts for it, or when the domain is still being removed.
18
+
19
+ `tailor deploy` also now takes ownership of a custom domain that already exists but carries no SDK labels, instead of trying to add it again — the recovery path when a previous deploy lost the response, or when the domain was added through the API or console.
20
+
21
+ - [#2591](https://github.com/tailor-platform/sdk/pull/2591) [`59fcb9a`](https://github.com/tailor-platform/sdk/commit/59fcb9a356455494bdbc0068d59ae4daa4de1582) Thanks [@toiroakr](https://github.com/toiroakr)! - Let a TailorDB migration script that exports `steps` roll back instead of staying in progress when a step fails. Export `onFailure = "rollback"` next to `steps` and `tailor deploy` restores the pre-migration schema, clears the in-progress record, and takes the tables out of maintenance mode. The deploy then fails with the step's error under the code `MIGRATION_ROLLED_BACK`, and the next deploy runs every step again from the beginning. Nothing is rolled back while the run may still be executing, or when the in-progress record cannot be cleared. If some tables cannot be rolled back, the deploy warns which tables need manual repair. Without `onFailure`, or with `"resume"`, a failed run stays in progress as before
22
+
23
+ - [#2700](https://github.com/tailor-platform/sdk/pull/2700) [`6eb2033`](https://github.com/tailor-platform/sdk/commit/6eb203365aa0aedf6619b63f192aac948e2e0876) Thanks [@toiroakr](https://github.com/toiroakr)! - The `db.pglite.ts` that `tailor tailordb migration generate` writes now enforces relations: a row pointing at a parent that does not exist is rejected, as on the platform. Migration tests that stage a row whose parent is missing must create the parent first or stage the row with `prepareFixtures`. A relation the pre-migration schema cannot satisfy is left unenforced: one whose pending type change leaves the field a different type from its target, or one the migration retargets.
24
+
25
+ `prepareFixtures` from `@tailor-platform/sdk/vitest` writes a test's starting records with relations unchecked, so a migration test can stage rows that predate a relation, and checks them again before the script runs. The migration PGlite test scaffold uses it.
26
+
27
+ ### Patch Changes
28
+
29
+ - [#2741](https://github.com/tailor-platform/sdk/pull/2741) [`6f6ca9f`](https://github.com/tailor-platform/sdk/commit/6f6ca9fb72255f4124c04933af012ef6d7170380) Thanks [@mocchira](https://github.com/mocchira)! - `tailor staticwebsite domain list` and `domain get` now report a domain being removed as `removing` instead of `unknown`, and `tailor api` can inspect and call the custom domain transfer endpoints (`RequestCustomDomainTransfer`, `CancelCustomDomainTransfer`, `AcceptCustomDomainTransfer`, `GetCustomDomainTransfer`, `ListCustomDomainTransfers`).
30
+
31
+ - [#2736](https://github.com/tailor-platform/sdk/pull/2736) [`8595d14`](https://github.com/tailor-platform/sdk/commit/8595d14c76d8ce364448f321ad430c01582d910f) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor login` now shows an HTML page in the browser after authentication instead of raw JSON, telling you to close the tab and return to the terminal. The page follows the system light/dark theme. A failed login shows the reason in the page as well, and `tailor authconnection authorize` shows the same pages on success and failure.
32
+
33
+ - [#2740](https://github.com/tailor-platform/sdk/pull/2740) [`ef844ff`](https://github.com/tailor-platform/sdk/commit/ef844ffc39a84a39e02818eec9f6a08188ce2ccb) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​napi-rs/keyring to v2.1.2
34
+
35
+ - [#2760](https://github.com/tailor-platform/sdk/pull/2760) [`a7d1cb8`](https://github.com/tailor-platform/sdk/commit/a7d1cb8ce6dbc324f57ff2704f5ffe92af5bf963) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @​inquirer
36
+
37
+ - [#2766](https://github.com/tailor-platform/sdk/pull/2766) [`15b6f4a`](https://github.com/tailor-platform/sdk/commit/15b6f4a7a9b6c0c2dd6514c6a5a7ca73a4870000) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency pkg-types to v2.4.0
38
+
39
+ - [#2718](https://github.com/tailor-platform/sdk/pull/2718) [`8927563`](https://github.com/tailor-platform/sdk/commit/89275638f7732fd69015e4b70ad8101b55b22649) Thanks [@toiroakr](https://github.com/toiroakr)! - The `tailor query` REPL now highlights SQL block comments (`/* ... */`) and GraphQL block strings (`"""..."""`) that span multiple lines, and also colours SQL `--` comments and trailing GraphQL `#` comments.
40
+
41
+ - [#2731](https://github.com/tailor-platform/sdk/pull/2731) [`bbfb9b1`](https://github.com/tailor-platform/sdk/commit/bbfb9b1e9918cb59fdbc6865c6eb81bc3136aecd) Thanks [@dqn](https://github.com/dqn)! - Fix plugin-generated resolvers being silently ignored. Resolver output from table and namespace hooks is now loaded, bundled, and deployed to the resolver namespace with the same name as the hook's TailorDB namespace. The two are separate namespaces that only share the name; the resolver namespace is created automatically when it is not configured, and its settings apply when it is. Resolvers that your existing plugins already return are deployed on the next `deploy`; without `defaultPermission` on their resolver namespace, anonymous callers can reach them.
42
+
43
+ - [#2747](https://github.com/tailor-platform/sdk/pull/2747) [`d52ec40`](https://github.com/tailor-platform/sdk/commit/d52ec402c9cc295eb94e69ee45b6f87e888badfa) Thanks [@dqn](https://github.com/dqn)! - Internal refactoring: remove the unused asynchronous variants of the SDK's internal TypeScript loader hooks. Loading `.ts` config and resource files is unchanged.
44
+
45
+ - [#2744](https://github.com/tailor-platform/sdk/pull/2744) [`559d442`](https://github.com/tailor-platform/sdk/commit/559d442b7ab19d900ccfd5b84694b88490ae62e2) Thanks [@dqn](https://github.com/dqn)! - Reject duplicate generated enum constant names instead of silently overwriting definitions. Duplicates with identical values, which previously generated successfully, now fail too. Rename conflicting tables or fields to give their enum constants unique names.
46
+
3
47
  ## 2.32.0
4
48
 
5
49
  ### Minor Changes