@tailor-platform/sdk 1.5.0 → 1.6.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 (33) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/application-D5kzHyuG.mjs +5 -0
  3. package/dist/{list-Dr8070QZ.mjs → application-D9mwb5eH.mjs} +198 -9510
  4. package/dist/application-D9mwb5eH.mjs.map +1 -0
  5. package/dist/{auth-CZPUwA1p.mjs → auth-0Zh4xp4z.mjs} +2 -31
  6. package/dist/auth-0Zh4xp4z.mjs.map +1 -0
  7. package/dist/cli/index.mjs +247 -27
  8. package/dist/cli/index.mjs.map +1 -1
  9. package/dist/cli/lib.d.mts +287 -14
  10. package/dist/cli/lib.mjs +4 -4
  11. package/dist/cli/lib.mjs.map +1 -1
  12. package/dist/configure/index.d.mts +3 -3
  13. package/dist/configure/index.mjs +15 -4
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/{index-bRPODqag.d.mts → index-C_yeYBC8.d.mts} +3 -10
  16. package/dist/{index-D40SiXpf.d.mts → index-k5hWCs5L.d.mts} +22 -30
  17. package/dist/{jiti-BUw4tcVQ.mjs → jiti-SMSW3TA0.mjs} +1 -1
  18. package/dist/{jiti-BUw4tcVQ.mjs.map → jiti-SMSW3TA0.mjs.map} +1 -1
  19. package/dist/{job-CX4l7Myn.mjs → job-8XfvLyxH.mjs} +2 -9
  20. package/dist/job-8XfvLyxH.mjs.map +1 -0
  21. package/dist/list-C_lrs5OC.mjs +11935 -0
  22. package/dist/list-C_lrs5OC.mjs.map +1 -0
  23. package/dist/{src-Bu0051gO.mjs → src-qLXX6nub.mjs} +1 -1
  24. package/dist/{src-Bu0051gO.mjs.map → src-qLXX6nub.mjs.map} +1 -1
  25. package/dist/utils/test/index.d.mts +2 -2
  26. package/dist/utils/test/index.mjs +1 -1
  27. package/docs/cli/application.md +23 -187
  28. package/docs/cli/tailordb.md +621 -0
  29. package/docs/cli-reference.md +31 -15
  30. package/package.json +11 -1
  31. package/dist/auth-CZPUwA1p.mjs.map +0 -1
  32. package/dist/job-CX4l7Myn.mjs.map +0 -1
  33. package/dist/list-Dr8070QZ.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#462](https://github.com/tailor-platform/sdk/pull/462) [`f83a3ed`](https://github.com/tailor-platform/sdk/commit/f83a3ed25a0c3019a97aaada32d5398db12865ba) Thanks [@toiroakr](https://github.com/toiroakr)! - Add TailorDB schema migration feature (beta). Migrations allow you to safely evolve your database schema with type-safe data transformations.
8
+
9
+ > **Note:** This feature is currently in beta. The API and behavior may change in future releases.
10
+
11
+ **Key Features:**
12
+
13
+ - **Local snapshot-based diff detection** - Detects field-level schema differences between current types and previous snapshots
14
+ - **Type-safe migration scripts** - Generates TypeScript migration scripts with Kysely transaction types
15
+ - **Transaction-wrapped execution** - All changes commit or rollback together for atomicity
16
+ - **Automatic execution during apply** - Pending migrations run as part of `tailor-sdk apply`
17
+ - **Migration checkpoint management** - Manually control which migrations have been applied
18
+ - **Migration status tracking** - View current state and pending migrations
19
+
20
+ **Commands:**
21
+
22
+ - `tailordb migration generate` - Generate migration files from schema changes (supports `--name`, `--yes`, `--init`)
23
+ - `tailordb migration set <number>` - Manually set migration checkpoint
24
+ - `tailordb migration status` - Show migration status and pending migrations
25
+
26
+ **Supported Schema Changes:**
27
+
28
+ The migration system automatically handles:
29
+
30
+ - Adding/removing optional fields (non-breaking)
31
+ - Adding required fields (breaking - migration script generated)
32
+ - Changing optional→required (breaking - migration script generated)
33
+ - Adding/removing indexes (non-breaking)
34
+ - Adding unique constraints (breaking - migration script generated)
35
+ - Adding/removing enum values (removing is breaking - migration script generated)
36
+ - Adding/removing types (non-breaking)
37
+
38
+ **Unsupported Changes:**
39
+
40
+ The following changes require a 3-step migration process:
41
+
42
+ - **Field type changes** (e.g., `string` → `integer`) - Add new field, migrate data, remove old field, then re-add with original name
43
+ - **Array to single value changes** - Add new single-value field, migrate data, remove array field, then re-add with original name
44
+
45
+ **Configuration:**
46
+
47
+ Configure migrations in `tailor.config.ts`:
48
+
49
+ ```typescript
50
+ db: {
51
+ tailordb: {
52
+ files: ["./tailordb/*.ts"],
53
+ migration: {
54
+ directory: "./migrations",
55
+ // Optional: specify machine user for migration execution
56
+ // If not specified, the first machine user from auth.machineUsers is used
57
+ machineUser: "admin-machine-user",
58
+ },
59
+ },
60
+ }
61
+ ```
62
+
63
+ ### Patch Changes
64
+
65
+ - [#488](https://github.com/tailor-platform/sdk/pull/488) [`f26a33d`](https://github.com/tailor-platform/sdk/commit/f26a33d1519d444f03e0e40cf43b16b2f5693348) Thanks [@riku99](https://github.com/riku99)! - Moved workflow service config types to the parser layer and updated CLI imports
66
+
67
+ - [#493](https://github.com/tailor-platform/sdk/pull/493) [`8111b0f`](https://github.com/tailor-platform/sdk/commit/8111b0f69bd924db51283b16eb20b650384ad3a1) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: improve ERD command UX
68
+
69
+ - Allow `erd export` and `erd serve` to work without `erdSite` configuration (only `erd deploy` requires it)
70
+ - Suppress verbose liam CLI output during ERD build
71
+ - Improve `erd export` log output with success message for build path
72
+
3
73
  ## 1.5.0
4
74
 
5
75
  ### Minor Changes
@@ -0,0 +1,5 @@
1
+ import "./chunk-CIV_ash9.mjs";
2
+ import "./auth-0Zh4xp4z.mjs";
3
+ import { t as defineApplication } from "./application-D9mwb5eH.mjs";
4
+
5
+ export { defineApplication };