@tailor-platform/sdk 1.4.2 → 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.
- package/CHANGELOG.md +104 -0
- package/dist/application-D5kzHyuG.mjs +5 -0
- package/dist/{list-QT92XcP3.mjs → application-D9mwb5eH.mjs} +2349 -11656
- package/dist/application-D9mwb5eH.mjs.map +1 -0
- package/dist/auth-0Zh4xp4z.mjs +772 -0
- package/dist/auth-0Zh4xp4z.mjs.map +1 -0
- package/dist/cli/index.mjs +247 -26
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +292 -20
- package/dist/cli/lib.mjs +4 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs +40 -5
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-lDsl6VDv.d.mts → index-C_yeYBC8.d.mts} +45 -10
- package/dist/{types-BWzDv7TK.d.mts → index-k5hWCs5L.d.mts} +885 -861
- package/dist/{jiti-31_Wx1yz.mjs → jiti-SMSW3TA0.mjs} +1 -1
- package/dist/{jiti-31_Wx1yz.mjs.map → jiti-SMSW3TA0.mjs.map} +1 -1
- package/dist/job-8XfvLyxH.mjs +21 -0
- package/dist/job-8XfvLyxH.mjs.map +1 -0
- package/dist/list-C_lrs5OC.mjs +11935 -0
- package/dist/list-C_lrs5OC.mjs.map +1 -0
- package/dist/{src-Bhwd-tei.mjs → src-qLXX6nub.mjs} +1 -1
- package/dist/{src-Bhwd-tei.mjs.map → src-qLXX6nub.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +4 -3
- package/dist/utils/test/index.mjs +3 -1
- package/dist/utils/test/index.mjs.map +1 -1
- package/docs/cli/application.md +23 -187
- package/docs/cli/tailordb.md +621 -0
- package/docs/cli-reference.md +31 -15
- package/docs/services/auth.md +35 -1
- package/docs/testing.md +81 -0
- package/package.json +11 -1
- package/dist/config-CBpYlVa-.mjs +0 -664
- package/dist/config-CBpYlVa-.mjs.map +0 -1
- package/dist/list-QT92XcP3.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
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
|
+
|
|
73
|
+
## 1.5.0
|
|
74
|
+
|
|
75
|
+
### Minor Changes
|
|
76
|
+
|
|
77
|
+
- [#479](https://github.com/tailor-platform/sdk/pull/479) [`bb984f5`](https://github.com/tailor-platform/sdk/commit/bb984f59421999709be389febc23bbadfc5d91e5) Thanks [@r253hmdryou](https://github.com/r253hmdryou)! - Support machine users without userProfile via new machineUserAttributes field
|
|
78
|
+
|
|
79
|
+
Adds machineUserAttributes configuration option for defining type-safe machine-user-only authentication without requiring a userProfile.
|
|
80
|
+
|
|
81
|
+
- [#478](https://github.com/tailor-platform/sdk/pull/478) [`dce0040`](https://github.com/tailor-platform/sdk/commit/dce0040f0477c2603b604ab3aac17383ec03f3e7) Thanks [@toiroakr](https://github.com/toiroakr)! - Add local testing support for workflows
|
|
82
|
+
|
|
83
|
+
- `createWorkflowJob`: `.trigger()` now executes body directly for local testing
|
|
84
|
+
- `createWorkflow`: `.trigger()` now calls `mainJob.trigger()` for local testing
|
|
85
|
+
- Export `WORKFLOW_TEST_ENV_KEY` from `@tailor-platform/sdk/test` for env configuration
|
|
86
|
+
- Add workflow trigger test examples to testing template
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- [#474](https://github.com/tailor-platform/sdk/pull/474) [`a41a320`](https://github.com/tailor-platform/sdk/commit/a41a3205d093a5ae6e864d96687fe87f1af81bf4) Thanks [@riku99](https://github.com/riku99)! - Moved AppConfig into packages/sdk/src/parser/\*\* and imports in cli'
|
|
91
|
+
|
|
92
|
+
- [#482](https://github.com/tailor-platform/sdk/pull/482) [`43afdae`](https://github.com/tailor-platform/sdk/commit/43afdaeccd6a68500721cfe17e27149fe6a44c43) Thanks [@k1LoW](https://github.com/k1LoW)! - Add `publishUserEvents` option for IdP configuration
|
|
93
|
+
|
|
94
|
+
When enabled, user lifecycle events (created, updated, deleted) are published to the dataplane event topic.
|
|
95
|
+
|
|
96
|
+
- [#471](https://github.com/tailor-platform/sdk/pull/471) [`e2c5e83`](https://github.com/tailor-platform/sdk/commit/e2c5e83b85fb835652e06d78290a41a9fc06fb3e) Thanks [@dqn](https://github.com/dqn)! - Refactor class-based implementations to factory functions
|
|
97
|
+
|
|
98
|
+
- Convert service classes (AuthService, ExecutorService, ResolverService, TailorDBService) to factory functions
|
|
99
|
+
- Convert Application class to factory function
|
|
100
|
+
- Convert generator classes to factory functions
|
|
101
|
+
- Convert TailorField, TailorDBField, TailorDBType classes to interfaces with factory functions
|
|
102
|
+
- Introduce Symbol branding for reliable type identification
|
|
103
|
+
- Normalize undefined to null for optional fields
|
|
104
|
+
|
|
105
|
+
- [#483](https://github.com/tailor-platform/sdk/pull/483) [`fe8d1c5`](https://github.com/tailor-platform/sdk/commit/fe8d1c5a940855be935bac4d02115317ce0edf88) Thanks [@riku99](https://github.com/riku99)! - Moved getDistDir to cli utils and updated imports
|
|
106
|
+
|
|
3
107
|
## 1.4.2
|
|
4
108
|
|
|
5
109
|
### Patch Changes
|