@tailor-platform/sdk 2.16.0 → 2.18.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 +61 -0
- package/dist/{application-wYQ-ivDg.mjs → application-DEkgf2w1.mjs} +18 -18
- package/dist/application-DEkgf2w1.mjs.map +1 -0
- package/dist/application-Dl94fzpm.mjs +1 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +5 -1
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +2 -2
- package/dist/cli/lib.d.mts +4 -3
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +43 -43
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/error-diagnostics.d.mts +10 -0
- package/dist/cli/shared/error-json.d.mts +19 -0
- package/dist/cli/shared/github-actions.d.mts +11 -0
- package/dist/cli/shared/logger.d.mts +18 -0
- package/dist/completion/zsh-worker.zsh +2 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/crashreport-CgymxQDu.mjs +1 -0
- package/dist/crashreport-Cyuz1qiu.mjs +42 -0
- package/dist/crashreport-Cyuz1qiu.mjs.map +1 -0
- package/dist/{errors-BtTxkzgy.mjs → errors-BjJnpXkK.mjs} +2 -2
- package/dist/{errors-BtTxkzgy.mjs.map → errors-BjJnpXkK.mjs.map} +1 -1
- package/dist/field-parse-CzlKC4b7.mjs +2 -0
- package/dist/field-parse-CzlKC4b7.mjs.map +1 -0
- package/dist/kysely-type-B_oA8D1k.mjs +43 -0
- package/dist/kysely-type-B_oA8D1k.mjs.map +1 -0
- package/dist/{logger-CEAxByN5.mjs → logger-72hM4JWZ.mjs} +4 -4
- package/dist/logger-72hM4JWZ.mjs.map +1 -0
- package/dist/{manager-E3ffRcCt.mjs → manager-C26Gi1bX.mjs} +2 -2
- package/dist/{manager-E3ffRcCt.mjs.map → manager-C26Gi1bX.mjs.map} +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/index.mjs +1 -1
- package/dist/{register-ts-hook-DrHS-J1k.mjs → register-ts-hook-BD3ArLqY.mjs} +111 -72
- package/dist/register-ts-hook-BD3ArLqY.mjs.map +1 -0
- package/dist/schema-DRyQEabV.mjs +2 -0
- package/dist/schema-DRyQEabV.mjs.map +1 -0
- package/dist/seed/index.d.mts +5 -0
- package/dist/seed/index.mjs +3 -2
- package/dist/seed/index.mjs.map +1 -1
- package/dist/service-B3OiWCYg.mjs +1 -0
- package/dist/{service-Cw7hb5HK.mjs → service-B4Gh_bbL.mjs} +2 -2
- package/dist/{service-Cw7hb5HK.mjs.map → service-B4Gh_bbL.mjs.map} +1 -1
- package/dist/{service-DaoW0kzo.mjs → service-eM7Fd8zS.mjs} +3 -3
- package/dist/{service-DaoW0kzo.mjs.map → service-eM7Fd8zS.mjs.map} +1 -1
- package/dist/tailordb-ddl-Fgm2cNvT.mjs +7 -0
- package/dist/tailordb-ddl-Fgm2cNvT.mjs.map +1 -0
- package/dist/utils/test/index.mjs +1 -1
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +5 -4
- package/docs/cli/tailordb.md +8 -8
- package/docs/cli-reference.md +18 -5
- package/docs/services/tailordb-migration.md +29 -24
- package/docs/testing.md +23 -21
- package/package.json +16 -15
- package/dist/application-Dw3t9p2f.mjs +0 -1
- package/dist/application-wYQ-ivDg.mjs.map +0 -1
- package/dist/crashreport-DF8YMIE5.mjs +0 -1
- package/dist/crashreport-Doz2Kuuq.mjs +0 -42
- package/dist/crashreport-Doz2Kuuq.mjs.map +0 -1
- package/dist/field-column-type-QMtF6lUp.mjs +0 -2
- package/dist/field-column-type-QMtF6lUp.mjs.map +0 -1
- package/dist/kysely-type-B-BOlXH7.mjs +0 -43
- package/dist/kysely-type-B-BOlXH7.mjs.map +0 -1
- package/dist/logger-CEAxByN5.mjs.map +0 -1
- package/dist/register-ts-hook-DrHS-J1k.mjs.map +0 -1
- package/dist/schema-BTioi2dP.mjs +0 -2
- package/dist/schema-BTioi2dP.mjs.map +0 -1
- package/dist/service-dn9jxC8c.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 2.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2363](https://github.com/tailor-platform/sdk/pull/2363) [`9917232`](https://github.com/tailor-platform/sdk/commit/9917232ce05ca1dc79c7c7a3cd6bfa00ecd1d040) Thanks [@dqn](https://github.com/dqn)! - Point GitHub Actions annotations at the file that failed. `tailor seed validate` reports the offending JSONL file and line, and a rejected config reports its file, so the annotation links straight to the source. Source the CLI cannot parse now reports the file it was found in and the line it failed on, which is the imported module rather than the config when the config imports it; such a failure previously surfaced as `Unknown error: [object Object]`, and under `--json` its `code` is now `UNEXPECTED_ERROR` rather than `UNKNOWN_ERROR`. The annotation's line counts blank lines; the line printed in the report text still skips them, so the two differ on a file that contains one.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#2375](https://github.com/tailor-platform/sdk/pull/2375) [`e54b854`](https://github.com/tailor-platform/sdk/commit/e54b85445c64ba30cb19731d1122488d6826e1b5) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix a bug where the CLI could unnecessarily require a full `tailor login` sooner than expected. When a token refresh succeeded but the server did not issue a new refresh token, the CLI was overwriting the still-valid saved refresh token with nothing, so the very next time the access token expired there was no refresh token left to try and the CLI forced a fresh login instead of attempting one more refresh.
|
|
12
|
+
|
|
13
|
+
- [#2318](https://github.com/tailor-platform/sdk/pull/2318) [`b8f397a`](https://github.com/tailor-platform/sdk/commit/b8f397a08941f78bf670cb806287b20427fe1f10) Thanks [@toiroakr](https://github.com/toiroakr)! - Preserve field hooks and boolean validator behavior when replaying migration snapshots and diffs generated by older SDKs, including existing field values during partial updates, nested fields, and the first validation error. Nested hooks retain omitted parents and respect explicit nulls and replacement objects or arrays, and nested validators read sibling fields from their own containing object or array element rather than the top-level record. Avoid false script-drift errors when deploying existing histories and preserve validation metadata when rebaselining.
|
|
14
|
+
|
|
15
|
+
- [#2354](https://github.com/tailor-platform/sdk/pull/2354) [`4096ad5`](https://github.com/tailor-platform/sdk/commit/4096ad5aad03a2dd9aef6fd334334bfcb60aaff4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency open to v11.0.3
|
|
16
|
+
|
|
17
|
+
- [#2355](https://github.com/tailor-platform/sdk/pull/2355) [`aa99ee5`](https://github.com/tailor-platform/sdk/commit/aa99ee5af9c94fe7bfaa8c8c13c42f67db517763) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.2.8
|
|
18
|
+
|
|
19
|
+
- [#2361](https://github.com/tailor-platform/sdk/pull/2361) [`7361bbf`](https://github.com/tailor-platform/sdk/commit/7361bbf1aa0dd608548d637213a9bcf7286aeb94) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @bufbuild/protobuf to v2.15.0
|
|
20
|
+
|
|
21
|
+
- [#2362](https://github.com/tailor-platform/sdk/pull/2362) [`08ff50b`](https://github.com/tailor-platform/sdk/commit/08ff50b50a31c6a27ccb8f6ca409365032d13e0d) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency zod to v4.6.4
|
|
22
|
+
|
|
23
|
+
- [#2367](https://github.com/tailor-platform/sdk/pull/2367) [`a7b581f`](https://github.com/tailor-platform/sdk/commit/a7b581f1909d85eb61e06b783a6a2abd8658b0a2) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update oxc
|
|
24
|
+
|
|
25
|
+
## 2.17.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [#2330](https://github.com/tailor-platform/sdk/pull/2330) [`3e8dc24`](https://github.com/tailor-platform/sdk/commit/3e8dc24bf2a5b55c811e28570dffb763baf9030e) Thanks [@toiroakr](https://github.com/toiroakr)! - Add `logger.registerSecret(value)` to the CLI logger (`@tailor-platform/sdk/cli`). Values registered this way are automatically replaced with `<redacted>` in diagnostic log output (`info`/`success`/`warn`/`error`/`log`/`debug`), as a technical safety net on top of the existing convention of not passing secret values to the logger. `logger.out()` is unaffected, so commands that intentionally print a secret as their primary result (machine user tokens, OAuth2 client secrets) are unchanged. The CLI itself now registers access tokens, refresh tokens, OAuth2/IdP client secrets, and Secret Manager values as soon as they enter the process. Crash reports (written locally, and optionally sent remotely, when an unexpected error occurs) also redact registered secrets, in addition to their existing pattern-based sanitization of UUIDs, hex tokens, emails, and paths.
|
|
30
|
+
|
|
31
|
+
Fix: `tailor user pat create` / `tailor user pat update` now print their human-readable "token created/updated" message (including the new token value) to stdout instead of stderr. The new token is this command's primary output — the thing a script actually wants to capture — so printing it to stderr instead of stdout was inconsistent with every other command that returns a value (`--json` mode was unaffected and already used stdout). If a script was working around this by reading the token from stderr, switch it to stdout.
|
|
32
|
+
|
|
33
|
+
- [#2337](https://github.com/tailor-platform/sdk/pull/2337) [`f3289dd`](https://github.com/tailor-platform/sdk/commit/f3289dd9e373e479de8a1e0a9da8b026422d6fca) Thanks [@dqn](https://github.com/dqn)! - Write `db.pglite.ts` next to every generated migration `db.ts` with the `CREATE TABLE` script of the schema `migrate.ts` runs against, and let `tailordb migration script --with-test` also scaffold `migrate.pglite.test.ts` when `@electric-sql/pglite` is installed
|
|
34
|
+
|
|
35
|
+
Generate migration types that accept nested objects and object arrays instead of JSON strings.
|
|
36
|
+
|
|
37
|
+
- [#2335](https://github.com/tailor-platform/sdk/pull/2335) [`39f32f6`](https://github.com/tailor-platform/sdk/commit/39f32f64f3292e57691d6469fd81cecda5f45ee7) Thanks [@dqn](https://github.com/dqn)! - Add `pgliteSchemaPath` to `kyselyTypePlugin` to generate the PGlite `CREATE TABLE` script for every TailorDB table alongside the Kysely types, so tests using `mockTailordbWithPGlite` or `createKyselyPGlite` no longer hand-write DDL
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- [#2348](https://github.com/tailor-platform/sdk/pull/2348) [`18ac373`](https://github.com/tailor-platform/sdk/commit/18ac373d1d5eb863c9dabfc0f1a8c19c5a3a9422) Thanks [@toiroakr](https://github.com/toiroakr)! - Bump the pinned `tailor-platform/actions` version to v2.3.3 in workflows generated by `tailor setup` (branch, coordinate, preview, and tag workflows, and the `tailor-setup` composite action).
|
|
42
|
+
|
|
43
|
+
- [#2368](https://github.com/tailor-platform/sdk/pull/2368) [`4a03de8`](https://github.com/tailor-platform/sdk/commit/4a03de85d81f29fed5023b6ae6dab206521d0e90) Thanks [@dqn](https://github.com/dqn)! - Forward global flags typed before a CLI plugin command to the plugin.
|
|
44
|
+
|
|
45
|
+
`tailor --json tailordb erd export` now runs the plugin in JSON mode, the same as
|
|
46
|
+
`tailor tailordb erd export --json`. Previously only the arguments following the plugin name were
|
|
47
|
+
forwarded, so a global flag placed before it was consumed by the host CLI and never reached the
|
|
48
|
+
plugin. The same applies to `--verbose`, `--env-file`, and `--env-file-if-exists`, and the forwarded
|
|
49
|
+
flags now also feed the plugin's platform-context injection.
|
|
50
|
+
|
|
51
|
+
When the same flag appears on both sides of the plugin name, the later one wins. A flag the plugin
|
|
52
|
+
itself does not declare still has to be typed after the plugin's own subcommand.
|
|
53
|
+
|
|
54
|
+
- [#2328](https://github.com/tailor-platform/sdk/pull/2328) [`bbb817b`](https://github.com/tailor-platform/sdk/commit/bbb817b87b66963bf5840430665712db15cc4495) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @inquirer
|
|
55
|
+
|
|
56
|
+
- [#2331](https://github.com/tailor-platform/sdk/pull/2331) [`73cb3fa`](https://github.com/tailor-platform/sdk/commit/73cb3fab10ee9f24d5ade55b1b497d610d8b99e6) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency pkg-types to v2.3.3
|
|
57
|
+
|
|
58
|
+
- [#2338](https://github.com/tailor-platform/sdk/pull/2338) [`98a9615`](https://github.com/tailor-platform/sdk/commit/98a96153bda73cbbb72f8b6090c948eef6ed0c13) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): lock file maintenance
|
|
59
|
+
|
|
60
|
+
- [#2350](https://github.com/tailor-platform/sdk/pull/2350) [`4537014`](https://github.com/tailor-platform/sdk/commit/4537014882c2ff0115e09753158dc7eda0bcc767) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @types/node to v24.13.4
|
|
61
|
+
|
|
62
|
+
- [#2342](https://github.com/tailor-platform/sdk/pull/2342) [`54eafd9`](https://github.com/tailor-platform/sdk/commit/54eafd96ff0d860ca39674acc36e26839e338850) Thanks [@dqn](https://github.com/dqn)! - Stop seed validation from reporting missing required fields inside a nested object that a row leaves out or gives a non-object value, and report the wrong shape against the field itself instead. Applies to both single nested objects and elements of a nested array.
|
|
63
|
+
|
|
3
64
|
## 2.16.0
|
|
4
65
|
|
|
5
66
|
### Minor Changes
|