@tailor-platform/sdk 2.14.2 → 2.15.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 +38 -0
- package/bin/tailor.mjs +2 -2
- package/dist/{application-BAqZFMWP.mjs → application-BpoMu4Af.mjs} +18 -18
- package/dist/application-BpoMu4Af.mjs.map +1 -0
- package/dist/application-fIhVKX78.mjs +1 -0
- package/dist/cli/commands/deploy/app-id-lock.d.mts +97 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +15 -1
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +5 -2
- package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +13 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +7 -1
- package/dist/cli/commands/workflow/executions.d.mts +2 -0
- package/dist/cli/lib.d.mts +4 -2
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +8 -8
- package/dist/cli/main.mjs +42 -44
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/command.d.mts +1 -1
- package/dist/cli/shared/function-execution.d.mts +14 -0
- package/dist/completion/zsh-worker.zsh +8 -3
- package/dist/configure/config/types.d.mts +23 -6
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/trigger/event.d.mts +5 -2
- package/dist/date-CGBZbMW5.mjs +2 -0
- package/dist/date-CGBZbMW5.mjs.map +1 -0
- package/dist/file-DKBOj5q4.mjs +2 -0
- package/dist/file-DKBOj5q4.mjs.map +1 -0
- package/dist/plugin/builtin/file-utils/index.mjs +27 -1
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
- package/dist/register-ts-hook-CAUcxCt4.mjs +711 -0
- package/dist/register-ts-hook-CAUcxCt4.mjs.map +1 -0
- package/dist/runtime/file.d.mts +46 -2
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/index.mjs +1 -1
- package/dist/{schema-DMlLMsWA.mjs → schema-BTioi2dP.mjs} +2 -2
- package/dist/{schema-DMlLMsWA.mjs.map → schema-BTioi2dP.mjs.map} +1 -1
- package/dist/service_pb-DKrsO1_u.mjs +1 -0
- package/dist/service_pb-DprmLNsq.mjs +2 -0
- package/dist/{service_pb-BdzjiHfC.mjs.map → service_pb-DprmLNsq.mjs.map} +1 -1
- package/dist/types/auth.generated.d.mts +1 -19
- package/dist/types/executor.generated.d.mts +5 -3
- package/dist/types/field.generated.d.mts +40 -0
- package/dist/types/helpers.d.mts +9 -1
- package/dist/types/resolver.generated.d.mts +5 -40
- package/dist/vitest/index.d.mts +2 -3
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +2 -2
- package/dist/vitest/setup.d.mts +0 -37
- package/dist/vitest/setup.mjs +1 -1
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/{workspace_resource_pb-C4EY-Gns.mjs → workspace_resource_pb-BOoRts_z.mjs} +2 -2
- package/dist/{workspace_resource_pb-C4EY-Gns.mjs.map → workspace_resource_pb-BOoRts_z.mjs.map} +1 -1
- package/docs/cli/application.md +1 -1
- package/docs/cli/function.md +19 -6
- package/docs/cli/tailordb.md +11 -11
- package/docs/configuration.md +20 -3
- package/docs/github-actions.md +45 -13
- package/docs/migration/v3.md +38 -0
- package/docs/runtime.md +39 -0
- package/docs/services/resolver.md +3 -1
- package/docs/services/tailordb-migration.md +25 -5
- package/docs/testing.md +3 -7
- package/package.json +7 -7
- package/dist/application-BAqZFMWP.mjs.map +0 -1
- package/dist/application-BKlOiD1x.mjs +0 -1
- package/dist/date-DrUO8rOJ.mjs +0 -2
- package/dist/date-DrUO8rOJ.mjs.map +0 -1
- package/dist/file-COPYfju_.mjs +0 -2
- package/dist/file-COPYfju_.mjs.map +0 -1
- package/dist/register-ts-hook-Cphn4r8s.mjs +0 -642
- package/dist/register-ts-hook-Cphn4r8s.mjs.map +0 -1
- package/dist/service_pb-BdzjiHfC.mjs +0 -2
- package/dist/service_pb-p68oLtp9.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 2.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2283](https://github.com/tailor-platform/sdk/pull/2283) [`c3c028d`](https://github.com/tailor-platform/sdk/commit/c3c028de654a4a6dbf9153404c083a79f89d2391) Thanks [@dqn](https://github.com/dqn)! - Record the app id in `.github/tailor.lock` instead of `tailor.config.ts` for projects that use `tailor setup`. `deploy` and `remove` read the id from the lock's new `appIds` section, keyed by the config file path, so renaming the app or copying a config inside the repo no longer risks claiming another app's resources. A local `tailor deploy` moves an existing config `id` into the lock and removes it from `tailor.config.ts`; in CI a config without a recorded id fails at plan time with instructions. Projects without the lock keep the current behavior.
|
|
8
|
+
|
|
9
|
+
- [#2282](https://github.com/tailor-platform/sdk/pull/2282) [`9b23234`](https://github.com/tailor-platform/sdk/commit/9b23234315b1bd6a42bb5e816bfcda255daefbeb) Thanks [@dqn](https://github.com/dqn)! - Add `metadata` to `defineConfig()` for writing extra labels to the deployed application's metadata
|
|
10
|
+
|
|
11
|
+
- [#2274](https://github.com/tailor-platform/sdk/pull/2274) [`5168d35`](https://github.com/tailor-platform/sdk/commit/5168d35b49e9e3d691c0f2f79041b333f327ce43) Thanks [@toiroakr](https://github.com/toiroakr)! - Add explicit `utf8` and `base64` encoding options to `file.upload` and generated `uploadFile` helpers. String uploads without encoding retain their existing text behavior but are deprecated ahead of v3; byte uploads remain unchanged and are not deprecated. Include migration guidance for existing string uploads.
|
|
12
|
+
|
|
13
|
+
- [#2285](https://github.com/tailor-platform/sdk/pull/2285) [`6f7282d`](https://github.com/tailor-platform/sdk/commit/6f7282d46f717547b769c46a0b43c027db9b52e6) Thanks [@dqn](https://github.com/dqn)! - Show structured log entries (message, severity, timestamp) in `tailor function logs <execution-id>` and in the per-job details of `tailor workflow start/wait/executions/resume --logs`. Entries are available while an execution is still running. Add `tailor function logs <execution-id> --follow` to stream new log entries until the execution completes, with an optional `--timeout`.
|
|
14
|
+
|
|
15
|
+
- [#2265](https://github.com/tailor-platform/sdk/pull/2265) [`e174343`](https://github.com/tailor-platform/sdk/commit/e1743434890d3ebb6ddf10f4972d0a86a584d1b1) Thanks [@dqn](https://github.com/dqn)! - Detect renames of members inside nested fields in `tailordb migration generate`: a removed member with a compatible added sibling is confirmed interactively or with `--rename "Table.field.oldMember:newMember"` (`--drop "Table.field.member"` confirms a removal), recorded as a breaking `memberRenames` entry on the field's change, and given a generated copy script; the pre-migration phase keeps the old member readable and adds the new member as optional. Non-interactive runs (`--yes`, CI) now fail while such a candidate is unresolved, as they already do for top-level fields. Migration files now use format version 6, which older SDK versions refuse to read.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Clarify the errors thrown when a resolver returns a value that cannot be serialized for `t.date({ as: "date" })`: the type-mismatch error now describes the actual value received, and the invalid-date error now states the reason (e.g. an out-of-range year) inline instead of only in the error's `cause`.
|
|
20
|
+
|
|
21
|
+
- [#2287](https://github.com/tailor-platform/sdk/pull/2287) [`7ad456b`](https://github.com/tailor-platform/sdk/commit/7ad456b0be1e0681f5e05aaea24b63ff5f25724d) Thanks [@toiroakr](https://github.com/toiroakr)! - Harden `deploy`'s TailorDB migration restore step so it always sends complete GraphQL operation restriction settings for a table when restoring them.
|
|
22
|
+
|
|
23
|
+
- [#2293](https://github.com/tailor-platform/sdk/pull/2293) [`41b72f2`](https://github.com/tailor-platform/sdk/commit/41b72f2ec9cf59fe5c5c3ae7f54ac56a31e55b4f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency confbox to v0.3.1
|
|
24
|
+
|
|
25
|
+
- [#2294](https://github.com/tailor-platform/sdk/pull/2294) [`809307c`](https://github.com/tailor-platform/sdk/commit/809307cc38f47d4733c0f25fe2d93271a43a0a99) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency globals to v17.12.0
|
|
26
|
+
|
|
27
|
+
- [#2295](https://github.com/tailor-platform/sdk/pull/2295) [`e9ca76d`](https://github.com/tailor-platform/sdk/commit/e9ca76d8e18670ae71d1203cb930cf14f8c6e816) Thanks [@renovate](https://github.com/apps/renovate)! - Depend on `@politty/zod` directly instead of the `politty` wrapper package. `politty` re-exported everything from `@politty/zod` unchanged, so this is an internal dependency swap with no effect on CLI behavior.
|
|
28
|
+
|
|
29
|
+
- [#2303](https://github.com/tailor-platform/sdk/pull/2303) [`c986c33`](https://github.com/tailor-platform/sdk/commit/c986c33ee854198da6fb4de30276a146f14d8ddb) Thanks [@dqn](https://github.com/dqn)! - Fix `resolverExecutedTrigger` typing date fields as `Date`. The executor receives the event as JSON, so a `t.date({ as: "date" })` field arrives as its `YYYY-MM-DD` string and `t.datetime()` as an ISO string; `result` now reports both as `string` instead of allowing `Date` methods that threw at runtime.
|
|
30
|
+
|
|
31
|
+
- [#2301](https://github.com/tailor-platform/sdk/pull/2301) [`0abc437`](https://github.com/tailor-platform/sdk/commit/0abc4373c2171bca15816e96eb6fee6d178ef659) Thanks [@toiroakr](https://github.com/toiroakr)! - Retry `deploy` requests that fail with a raw transport-level disconnect (`ERR_STREAM_PREMATURE_CLOSE`, `ECONNRESET`, `ETIMEDOUT`, `EPIPE`) for no-side-effect/idempotent operations, matching the existing retry behavior for equivalent server-side errors. Previously such disconnects surfaced immediately as a fatal `deploy` failure with no retry.
|
|
32
|
+
|
|
33
|
+
- [#2302](https://github.com/tailor-platform/sdk/pull/2302) [`5a06755`](https://github.com/tailor-platform/sdk/commit/5a067550c27fc9b4bcaeac49dd70ca794085f395) Thanks [@toiroakr](https://github.com/toiroakr)! - Spread `deploy`'s function/script/static website uploads (client-streaming RPCs) across a small pool of HTTP/2 connections instead of multiplexing them all on one, queueing uploads beyond the pool's capacity rather than sharing a connection. Since Node 24.2.0 (backported to the 22.x LTS line as of Node 22.23.0), nghttp2 dropped its legacy priority-tree stream scheduler. In our measurements this changed how Node's http2 client schedules concurrent outbound DATA streams: uploads sharing one connection can finish 12x+ apart in wall-clock time even though aggregate throughput is unchanged, making individual uploads more likely to exceed the platform's per-upload timeout, and there is currently no request header or API that opts a stream into different client-side scheduling. Tested directly across Node versions: this behavior is confirmed independent of server implementation. The pool size is a conservative internal constant, not derived from `TAILOR_APPLY_CONCURRENCY` (which bounds unrelated RPC concurrency and is user-configurable to arbitrary values) or from production connection-limit data.
|
|
34
|
+
|
|
35
|
+
- [#2310](https://github.com/tailor-platform/sdk/pull/2310) [`6aecb59`](https://github.com/tailor-platform/sdk/commit/6aecb59f6bab9dead327792ef7ea8bd93e463ea8) Thanks [@toiroakr](https://github.com/toiroakr)! - Honor cancellation and requested timeouts while uploads wait for an available connection.
|
|
36
|
+
|
|
37
|
+
- [#2275](https://github.com/tailor-platform/sdk/pull/2275) [`c2c0d93`](https://github.com/tailor-platform/sdk/commit/c2c0d932d52759d9b7a3db3cfa3679b7ff44df80) Thanks [@dqn](https://github.com/dqn)! - Support Vitest 5 in `@tailor-platform/sdk/vitest` and scaffold new projects with Vitest 5. `tailorRuntime({ config })` now seeds each project's secrets from that project's own root, so a run combining projects with different roots no longer loads one project's config for all of them. Projects keep resolving the same environment they did on Vitest 4: a project that omits `extends` inherits the root `tailor-runtime` environment only on Vitest 5, where that is Vitest's own default. The `tailor-runtime` environment no longer removes the `performance` global during tests: Vitest 5's module loader reads it while resolving `import()` calls, and the deploy-time free-variable check already treats `performance` as a runtime global.
|
|
38
|
+
|
|
39
|
+
- [#2308](https://github.com/tailor-platform/sdk/pull/2308) [`ceca9f1`](https://github.com/tailor-platform/sdk/commit/ceca9f15c79d2e19ae205543703009db4ae80236) Thanks [@renovate](https://github.com/apps/renovate)! - Upgraded the internal `zinfer` tool used to generate this package's TypeScript types from Zod schemas, fixing a case where a type reached only through another file's generated declaration (e.g. `Resolver.output`, `Resolver.input`) collapsed to `any` in the generated output instead of resolving to the real type (e.g. `TailorField`). Structurally identical `*Input` types are now aliased to their base type instead of duplicating the same fields, with no change to runtime behavior.
|
|
40
|
+
|
|
3
41
|
## 2.14.2
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/bin/tailor.mjs
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// CLI module graph is compiled, so warm starts skip recompilation
|
|
6
6
|
// (Node >= 22.8.0; silent no-op otherwise).
|
|
7
7
|
try {
|
|
8
|
-
const { enableCompileCache } = await import("politty/compile-cache");
|
|
8
|
+
const { enableCompileCache } = await import("@politty/zod/compile-cache");
|
|
9
9
|
enableCompileCache("tailor");
|
|
10
10
|
} catch {
|
|
11
|
-
// politty/compile-cache is not resolvable from here (e.g. a fully
|
|
11
|
+
// @politty/zod/compile-cache is not resolvable from here (e.g. a fully
|
|
12
12
|
// bundled CLI) — start without the compile cache rather than failing
|
|
13
13
|
// the CLI.
|
|
14
14
|
}
|