@tailor-platform/sdk 2.8.0 → 2.11.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 +46 -0
- package/dist/application-B4tCGHiQ.mjs +1 -0
- package/dist/{application-D2E3FDfF.mjs → application-CcrP-v7z.mjs} +32 -31
- package/dist/application-CcrP-v7z.mjs.map +1 -0
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/main.mjs +18 -18
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/seed-context.d.mts +3 -1
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/index.d.mts +2 -1
- package/dist/configure/index.d.mts +14 -14
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +1 -3
- package/dist/configure/services/idp/index.d.mts +1 -1
- package/dist/configure/services/resolver/resolver.d.mts +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +22 -13
- package/dist/configure/types/index.d.mts +1 -1
- package/dist/idp-G_ojPBB5.mjs.map +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/types.d.mts +17 -7
- package/dist/{register-ts-hook-CQuJ7h5G.mjs → register-ts-hook-YqgUg8P7.mjs} +63 -63
- package/dist/register-ts-hook-YqgUg8P7.mjs.map +1 -0
- package/dist/{schema-AYG4OhXY.mjs → schema-6d_OHyZf.mjs} +2 -2
- package/dist/schema-6d_OHyZf.mjs.map +1 -0
- package/dist/{seed-DwqRFdqP.mjs → seed-CMkupmX8.mjs} +41 -17
- package/dist/seed-CMkupmX8.mjs.map +1 -0
- package/dist/service-BzsSm2f6.mjs +7 -0
- package/dist/service-BzsSm2f6.mjs.map +1 -0
- package/dist/service-CmwD9bwv.mjs +1 -0
- package/dist/types/helpers.d.mts +3 -1
- package/dist/vitest/index.d.mts +3 -2
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +88 -0
- package/dist/vitest/pglite-kysely.d.mts +41 -11
- package/docs/plugin/custom.md +95 -0
- package/docs/plugin/index.md +5 -0
- package/docs/services/tailordb-migration.md +14 -8
- package/docs/testing.md +78 -2
- package/package.json +9 -9
- package/dist/application-D2E3FDfF.mjs.map +0 -1
- package/dist/application-rySTKrFa.mjs +0 -1
- package/dist/register-ts-hook-CQuJ7h5G.mjs.map +0 -1
- package/dist/schema-AYG4OhXY.mjs.map +0 -1
- package/dist/seed-DwqRFdqP.mjs.map +0 -1
- package/dist/service-COC9whur.mjs +0 -1
- package/dist/service-DDon86tM.mjs +0 -7
- package/dist/service-DDon86tM.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2213](https://github.com/tailor-platform/sdk/pull/2213) [`1bb2fc5`](https://github.com/tailor-platform/sdk/commit/1bb2fc576cd9e3d939d1d98097f571bdd6f829fc) Thanks [@dqn](https://github.com/dqn)! - Add `mockTailordbWithPGlite` to `@tailor-platform/sdk/vitest`: back `getDB(namespace)` with an in-memory PostgreSQL (`@electric-sql/pglite`), so resolver/executor/workflow tests execute their queries against real data instead of staged responses
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#2219](https://github.com/tailor-platform/sdk/pull/2219) [`40e5368`](https://github.com/tailor-platform/sdk/commit/40e5368224dfa7027a2728b4a0dc832d25c123b2) Thanks [@dqn](https://github.com/dqn)! - Fix `tailordb migration generate` emitting invalid TypeScript in `db.ts` when a migration removes every allowed value from an enum field; the write slots are now typed as `never`.
|
|
12
|
+
|
|
13
|
+
- [#2215](https://github.com/tailor-platform/sdk/pull/2215) [`74ff2c6`](https://github.com/tailor-platform/sdk/commit/74ff2c60c704bb60a7c3f251c1e961888e3be9f8) Thanks [@dqn](https://github.com/dqn)! - Fix deploy planning dropping plugin-generated executors when the project defines no executor files of its own, which could omit them from deployment or delete an already-deployed one
|
|
14
|
+
|
|
15
|
+
- [#2220](https://github.com/tailor-platform/sdk/pull/2220) [`dd98efe`](https://github.com/tailor-platform/sdk/commit/dd98efeaeb3e25d8188be227b4282cc23b7b9c68) Thanks [@dqn](https://github.com/dqn)! - Validate plugin-generated and plugin-extended TailorDB tables against the table schema. A malformed table emitted by a plugin now fails the build with an error naming the plugin and table instead of crashing or passing through unvalidated.
|
|
16
|
+
|
|
17
|
+
- [#2206](https://github.com/tailor-platform/sdk/pull/2206) [`77f8960`](https://github.com/tailor-platform/sdk/commit/77f8960c2f7797fd1e0fc322f29df735111d5fea) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @toiroakr/lines-db to v0.12.5
|
|
18
|
+
|
|
19
|
+
- [#2207](https://github.com/tailor-platform/sdk/pull/2207) [`4308d19`](https://github.com/tailor-platform/sdk/commit/4308d19ae4e5d5c14ade295f4b170831bc4e7a38) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.2.6
|
|
20
|
+
|
|
21
|
+
- [#2228](https://github.com/tailor-platform/sdk/pull/2228) [`ea43882`](https://github.com/tailor-platform/sdk/commit/ea43882f4838b779ea177615208f1a578a1618c3) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency es-toolkit to v1.52.0
|
|
22
|
+
|
|
23
|
+
## 2.10.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- [#2169](https://github.com/tailor-platform/sdk/pull/2169) [`e7fa784`](https://github.com/tailor-platform/sdk/commit/e7fa784f82d3bac09322789a6aadc56deaf24ba6) Thanks [@toiroakr](https://github.com/toiroakr)! - Add `PluginFieldExtensions`, a new interface exported from `@tailor-platform/sdk` alongside `PluginConfigs`. A TailorDB plugin author declares it via the same `declare module "@tailor-platform/sdk"` declaration merging used for `PluginConfigs` (see the plugin docs), keyed by the plugin's `id`, to make the fields it injects at generation time show up on the attached table's own static type immediately — computed from the literal per-table config passed to `.plugin()`, without a separate hand-written declaration. `Plugin` gains an optional third type parameter so `onTableLoaded`'s `extends.fields` return type can be checked against the declared field extension. `.plugin()` now reports a type error at the call site when an injected field name collides with an existing field or with a field injected by another plugin attached in the same call — including previously-unregistered plugin ids passed to `.plugin()`, an unknown property on a registered plugin's config, or a config value that is itself a union (e.g. from a ternary), all of which used to be silently accepted or silently produce a wrong inferred type. The custom plugin API is still beta, so this tightening ships as part of the minor release rather than a major one; register the plugin id via `PluginConfigs` (see `docs/plugin/custom.md`) if it starts failing to type-check. `TailorDBType` also gains a fourth, defaulted type parameter tracking the literal keys declared via `.files()`, so `.plugin()` now reports a type error at the call site when an injected field name collides with a file key regardless of whether `.files()` or `.plugin()` was called first — previously only one call order was caught. `tailor generate` also throws on the same collision at runtime as a backstop.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#2209](https://github.com/tailor-platform/sdk/pull/2209) [`3ca6d5e`](https://github.com/tailor-platform/sdk/commit/3ca6d5e2c6e4550f6b3cd0e93e86c6a33695c197) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update secretlint monorepo to v13.0.5
|
|
32
|
+
|
|
33
|
+
## 2.9.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- [#2198](https://github.com/tailor-platform/sdk/pull/2198) [`6bd5286`](https://github.com/tailor-platform/sdk/commit/6bd5286aa3ea1d3dc3b56c7eac3a17f7a64ba7df) Thanks [@dqn](https://github.com/dqn)! - Add `Unmigrated<Database>` to `@tailor-platform/sdk/vitest` for staging pre-migration rows in a PGlite test. Typing `createKyselyPGlite<Unmigrated<Database>>(...)` lets `insertInto` and `updateTable` write whatever a column can still be read as — `null` into a column the migration makes required, a removed value into an enum it narrows — so the rows the script has to convert can be staged through the typed API, while `main` still runs against the strict `Database` from `db.ts`.
|
|
38
|
+
|
|
39
|
+
- [#2197](https://github.com/tailor-platform/sdk/pull/2197) [`ee2bd7d`](https://github.com/tailor-platform/sdk/commit/ee2bd7dcc9cf88be47c1a5bcbe3dca0d5122c13a) Thanks [@dqn](https://github.com/dqn)! - Fix `tailor seed apply --truncate` failing to delete IdP `_User` records. Deletion now runs in chunks of 25 users per request so large user counts no longer hit `deadline_exceeded`, and a user that is listed but already gone by the time it is deleted counts as deleted instead of failing every run.
|
|
40
|
+
|
|
41
|
+
`SeedIdpUserContext` from `@tailor-platform/sdk/cli` gains a required `listScriptCode` field carrying the server-side script that lists the `_User` records to delete; `truncateScriptCode` now deletes the chunk of users passed as input, and keeps listing and deleting every user when called without input.
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- [#2203](https://github.com/tailor-platform/sdk/pull/2203) [`bfb06bf`](https://github.com/tailor-platform/sdk/commit/bfb06bfda619f9312e33092d2dadfb5ca88594cd) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @electric-sql/pglite to v0.5.8
|
|
46
|
+
|
|
47
|
+
- [#2205](https://github.com/tailor-platform/sdk/pull/2205) [`1cff028`](https://github.com/tailor-platform/sdk/commit/1cff028c263be7b42e58e3dbc5278f444df802aa) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @inquirer
|
|
48
|
+
|
|
3
49
|
## 2.8.0
|
|
4
50
|
|
|
5
51
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./application-CcrP-v7z.mjs";export{t as defineApplication,e as generatePluginFilesIfNeeded};
|