@tailor-platform/sdk 2.36.0 → 2.38.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 +132 -0
- package/dist/{application-DaJbleMi.mjs → application-Bz80INH4.mjs} +1 -1
- package/dist/application-CeqD1OK-.mjs +207 -0
- package/dist/application-CeqD1OK-.mjs.map +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +7 -1
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +3 -0
- package/dist/cli/commands/executor/jobs.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
- package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
- package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
- package/dist/cli/commands/workspace/create.d.mts +1 -1
- package/dist/cli/lib.d.mts +3 -3
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +65 -58
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +14 -5
- package/dist/cli/shared/client.d.mts +40 -3
- package/dist/cli/shared/error-json.d.mts +12 -26
- package/dist/cli/shared/function-execution.d.mts +2 -0
- package/dist/cli/shared/prompt.d.mts +9 -4
- package/dist/client-CHXix4LD.mjs +1 -0
- package/dist/client-DOQv-BP8.mjs +2 -0
- package/dist/client-DOQv-BP8.mjs.map +1 -0
- package/dist/completion/zsh-worker.zsh +151 -79
- package/dist/configure/config/index.d.mts +2 -0
- package/dist/configure/config/types.d.mts +2 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/operation.d.mts +5 -4
- package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
- package/dist/configure/services/index.d.mts +0 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -0
- package/dist/configure/services/tailordb/types.d.mts +12 -0
- package/dist/context-DSi5kfqr.mjs +23 -0
- package/dist/context-DSi5kfqr.mjs.map +1 -0
- package/dist/context-OOASEQLA.mjs +1 -0
- package/dist/{crashreport-DGU6lwiX.mjs → crashreport-CQTAlnbA.mjs} +4 -4
- package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
- package/dist/crashreport-GRnWyDnF.mjs +1 -0
- package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
- package/dist/{errors-BXmGBX-7.mjs → errors-9OOL3xOM.mjs} +6 -5
- package/dist/errors-9OOL3xOM.mjs.map +1 -0
- package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
- package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
- package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
- package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
- package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
- package/dist/plugin/get-generated-table.d.mts +4 -0
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +55 -3
- package/dist/plugin/with-context.d.mts +16 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs +1094 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs.map +1 -0
- package/dist/repl-editor-Bposemei.mjs +2 -0
- package/dist/repl-editor-Bposemei.mjs.map +1 -0
- package/dist/resource_pb-elY668ZB.mjs +2 -0
- package/dist/resource_pb-elY668ZB.mjs.map +1 -0
- package/dist/schema-BU1aIQ63.mjs.map +1 -1
- package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-CSXzcg4c.mjs} +2 -2
- package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
- package/dist/{service-CaGmqg0r.mjs → service-B2vx6CGM.mjs} +2 -2
- package/dist/{service-CaGmqg0r.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
- package/dist/service-DB-RHn25.mjs +9 -0
- package/dist/service-DB-RHn25.mjs.map +1 -0
- package/dist/service-DsAWXbVX.mjs +1 -0
- package/dist/service_pb-Bethc2NW.mjs +1 -0
- package/dist/service_pb-CfpSriCy.mjs +2 -0
- package/dist/service_pb-CfpSriCy.mjs.map +1 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
- package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
- package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
- package/dist/types/app-config.generated.d.mts +1 -1
- package/dist/types/auth-connection.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +13 -13
- package/dist/types/executor.generated.d.mts +25 -25
- package/dist/types/field.generated.d.mts +2 -2
- package/dist/types/http-adapter.generated.d.mts +4 -4
- package/dist/types/idp.generated.d.mts +272 -272
- package/dist/types/resolver.generated.d.mts +10 -10
- package/dist/types/tailordb.generated.d.mts +84 -80
- package/dist/types/workflow.generated.d.mts +2 -2
- package/dist/validation-errors-DqCeUW4L.mjs +3 -0
- package/dist/validation-errors-DqCeUW4L.mjs.map +1 -0
- package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
- package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
- package/dist/vendor/graphql/language/ast.d.mts +784 -0
- package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
- package/dist/vendor/graphql/language/source.d.mts +46 -0
- package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
- package/dist/vitest/date-representation.d.mts +2 -0
- package/dist/vitest/environment.d.mts +1 -0
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/migration-steps.d.mts +13 -2
- package/dist/vitest/mock-kysely.d.mts +12 -2
- package/dist/vitest/mocks/aigateway.d.mts +7 -1
- package/dist/vitest/mocks/authconnection.d.mts +7 -1
- package/dist/vitest/mocks/file.d.mts +8 -2
- package/dist/vitest/mocks/iconv.d.mts +7 -1
- package/dist/vitest/mocks/idp.d.mts +7 -1
- package/dist/vitest/mocks/logger.d.mts +7 -1
- package/dist/vitest/mocks/secretmanager.d.mts +7 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
- package/dist/vitest/mocks/tailordb.d.mts +22 -4
- package/dist/vitest/mocks/workflow.d.mts +2 -1
- package/dist/vitest/pglite-kysely.d.mts +18 -2
- package/dist/vitest/pglite-temporal.d.mts +5 -1
- package/dist/vitest/workflow-local.d.mts +7 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
- package/docs/cli/application.md +63 -29
- package/docs/cli/executor.md +2 -0
- package/docs/cli/function.md +3 -1
- package/docs/cli/notification.md +128 -0
- package/docs/cli/tailordb.md +45 -68
- package/docs/cli/workflow.md +2 -0
- package/docs/cli/workspace.md +20 -18
- package/docs/cli-reference.md +231 -50
- package/docs/configuration.md +2 -2
- package/docs/data-clone.md +1 -1
- package/docs/github-actions.md +266 -41
- package/docs/plugin/custom.md +4 -4
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +2 -0
- package/docs/services/idp.md +2 -0
- package/docs/services/tailordb/index.md +13 -4
- package/docs/services/tailordb/migration.md +109 -71
- package/docs/services/workflow.md +1 -1
- package/docs/testing.md +9 -10
- package/package.json +23 -19
- package/dist/application-BbORWCj-.mjs +0 -207
- package/dist/application-BbORWCj-.mjs.map +0 -1
- package/dist/configure/services/http-adapter/index.d.mts +0 -2
- package/dist/crashreport-WsYAWARW.mjs +0 -1
- package/dist/errors-BXmGBX-7.mjs.map +0 -1
- package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
- package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
- package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
- package/dist/repl-editor-DkrCZmmg.mjs +0 -2
- package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
- package/dist/service-DTrVVaDJ.mjs +0 -1
- package/dist/service-hIarp2Gl.mjs +0 -8
- package/dist/service-hIarp2Gl.mjs.map +0 -1
- package/dist/service_pb-6EkMfdOb.mjs +0 -2
- package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
- package/dist/service_pb-CsJKokDl.mjs +0 -1
- package/dist/workspace_resource_pb-C4CkoYww.mjs +0 -2
- package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
package/docs/cli/workspace.md
CHANGED
|
@@ -104,18 +104,18 @@ tailor workspace create [options]
|
|
|
104
104
|
|
|
105
105
|
**Options**
|
|
106
106
|
|
|
107
|
-
| Option | Alias | Description
|
|
108
|
-
| ------------------------------------- | ----- |
|
|
109
|
-
| `--name <NAME>` | `-n` | Workspace name
|
|
110
|
-
| `--region <REGION>` | `-r` | Workspace region (asia-northeast, us-west, europe-west)
|
|
111
|
-
| `--delete-protection` | `-d` | Enable delete protection
|
|
112
|
-
| `--organization-id <ORGANIZATION_ID>` | `-o` | Organization ID to workspace associate with
|
|
113
|
-
| `--folder-id <FOLDER_ID>` | `-f` | Folder ID to workspace associate with
|
|
114
|
-
| `--ttl <TTL>` | - | Record on the workspace itself when it becomes prunable, such as 30m, 24h, or 7d. `workspace prune --expired` deletes it once that has passed | No | - | - |
|
|
115
|
-
| `--profile-name <PROFILE_NAME>` | `-p` | Profile name to create
|
|
116
|
-
| `--profile <PROFILE>` | - | Workspace profile used for authentication and Platform selection
|
|
117
|
-
| `--profile-user <PROFILE_USER>` | - | User email address or machine user client ID for the profile (defaults to current user)
|
|
118
|
-
| `--permission <PERMISSION>` | - | Profile permission (requires --profile-name). 'read' blocks all write commands while the profile is active.
|
|
107
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
108
|
+
| ------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- | --------------------------------- |
|
|
109
|
+
| `--name <NAME>` | `-n` | Workspace name | Yes | - | - |
|
|
110
|
+
| `--region <REGION>` | `-r` | Workspace region (asia-northeast, us-west, europe-west) | Yes | - | - |
|
|
111
|
+
| `--delete-protection` | `-d` | Enable delete protection | No | `false` | - |
|
|
112
|
+
| `--organization-id <ORGANIZATION_ID>` | `-o` | Organization ID to workspace associate with | No | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
|
|
113
|
+
| `--folder-id <FOLDER_ID>` | `-f` | Folder ID to workspace associate with | No | - | `TAILOR_PLATFORM_FOLDER_ID` |
|
|
114
|
+
| `--ttl <TTL>` | - | Record on the workspace itself when it becomes prunable, such as 30m, 24h, or 7d (less than 50,000,000 days). `workspace prune --expired` deletes it once that has passed | No | - | - |
|
|
115
|
+
| `--profile-name <PROFILE_NAME>` | `-p` | Profile name to create | No | - | - |
|
|
116
|
+
| `--profile <PROFILE>` | - | Workspace profile used for authentication and Platform selection | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
117
|
+
| `--profile-user <PROFILE_USER>` | - | User email address or machine user client ID for the profile (defaults to current user) | No | - | - |
|
|
118
|
+
| `--permission <PERMISSION>` | - | Profile permission (requires --profile-name). 'read' blocks all write commands while the profile is active. | No | `"write"` | - |
|
|
119
119
|
|
|
120
120
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
121
121
|
|
|
@@ -123,7 +123,9 @@ See [Global Options](../cli-reference.md#global-options) for options available t
|
|
|
123
123
|
|
|
124
124
|
Every workspace belongs to an organization. Without --organization-id and --folder-id, on the command line or through TAILOR_PLATFORM_ORGANIZATION_ID / TAILOR_PLATFORM_FOLDER_ID, the workspace is created in the default organization and folder that the logged-in user set with `user update`, unless TAILOR_PLATFORM_TOKEN is set. When none of these gives an organization, the command fails. Giving either option replaces both defaults, and --folder-id requires --organization-id.
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Command-line options take precedence over TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file. An empty value of either variable is treated as not given.
|
|
127
|
+
|
|
128
|
+
When --ttl is given but the expiry cannot be confirmed, the command still prints the created workspace, then fails with WORKSPACE_TTL_WRITE_FAILED. With --json, the printed `ttl.state` is then `unconfirmed` instead of `written`, so a script can read the workspace ID and record the expiry again with `workspace ttl set`.
|
|
127
129
|
|
|
128
130
|
### workspace delete
|
|
129
131
|
|
|
@@ -300,11 +302,11 @@ tailor workspace ttl set [options]
|
|
|
300
302
|
|
|
301
303
|
**Options**
|
|
302
304
|
|
|
303
|
-
| Option | Alias | Description
|
|
304
|
-
| ------------------------------- | ----- |
|
|
305
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID
|
|
306
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile
|
|
307
|
-
| `--ttl <TTL>` | - | Time from now until the workspace becomes prunable, such as 30m, 24h, or 7d | Yes | - | - |
|
|
305
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
306
|
+
| ------------------------------- | ----- | ------------------------------------------------------------------------------------------------------- | -------- | ------- | ------------------------------ |
|
|
307
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
308
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
309
|
+
| `--ttl <TTL>` | - | Time from now until the workspace becomes prunable, such as 30m, 24h, or 7d (less than 50,000,000 days) | Yes | - | - |
|
|
308
310
|
|
|
309
311
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
310
312
|
|
package/docs/cli-reference.md
CHANGED
|
@@ -16,12 +16,12 @@ tailor <command> [options]
|
|
|
16
16
|
|
|
17
17
|
<a id="global-options"></a>
|
|
18
18
|
|
|
19
|
-
| Option | Alias | Description
|
|
20
|
-
| ------------------------------------------- | ----- |
|
|
21
|
-
| `--env-file <ENV_FILE>` | `-e` | Path to
|
|
22
|
-
| `--env-file-if-exists <ENV_FILE_IF_EXISTS>` | - | Path to
|
|
23
|
-
| `--verbose` / `--no-verbose` | - | Enable verbose logging
|
|
24
|
-
| `--json` / `--no-json` | `-j` | Output as JSON
|
|
19
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
20
|
+
| ------------------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | -------------------- |
|
|
21
|
+
| `--env-file <ENV_FILE>` | `-e` | Path to an environment file, repeatable (error if not found) | No | - | - |
|
|
22
|
+
| `--env-file-if-exists <ENV_FILE_IF_EXISTS>` | - | Path to an environment file, repeatable (ignored if not found) | No | - | - |
|
|
23
|
+
| `--verbose` / `--no-verbose` | - | Enable verbose logging | No | `false` | - |
|
|
24
|
+
| `--json` / `--no-json` | `-j` | Output as JSON | No | `false` | `TAILOR_JSON_OUTPUT` |
|
|
25
25
|
|
|
26
26
|
### Progress and Detailed Logs
|
|
27
27
|
|
|
@@ -52,7 +52,8 @@ flag always wins, so `--json=false` forces table output even when the variable i
|
|
|
52
52
|
`true`, `True`, `TRUE`, `t`, `T`, and `1` enable JSON; `false`, `False`, `FALSE`, `f`, `F`, and `0`
|
|
53
53
|
keep table output. Other values are rejected. JSON mode also disables interactive prompts, so set the
|
|
54
54
|
variable per invocation or per job rather than exporting it from a shell profile; a command that
|
|
55
|
-
needed a prompt names what selected JSON when it refuses.
|
|
55
|
+
needed a prompt names what selected JSON when it refuses. In JSON mode, pass `--yes` to commands that
|
|
56
|
+
ask for confirmation, and pass the options that a command would otherwise prompt for.
|
|
56
57
|
|
|
57
58
|
When an AI coding agent such as Claude Code, Codex, Cursor, or Gemini CLI runs the CLI, every
|
|
58
59
|
command defaults to JSON as if `TAILOR_JSON_OUTPUT=true` were set, and `--help` starts with a short
|
|
@@ -60,16 +61,17 @@ guide for the agent. The CLI recognizes an agent by the environment variables it
|
|
|
60
61
|
commands it runs; a non-blank `AI_AGENT` also counts as one. An explicit `--json` or
|
|
61
62
|
`TAILOR_JSON_OUTPUT` still wins, so `--json=false` or `TAILOR_JSON_OUTPUT=false` keeps table output
|
|
62
63
|
under an agent, and setting `POLITTY_NO_AGENT` to any non-empty value, such as `1`, turns agent
|
|
63
|
-
detection off. Set
|
|
64
|
-
change
|
|
65
|
-
`TAILOR_JSON_OUTPUT`, and their `--help` does not include the guide.
|
|
64
|
+
detection off. Set `AI_AGENT` and `POLITTY_NO_AGENT` in the environment itself: values loaded with
|
|
65
|
+
`--env-file` do not change agent detection. CLI plugins keep table output under an agent unless they
|
|
66
|
+
receive `--json` or `TAILOR_JSON_OUTPUT`, and their `--help` does not include the guide.
|
|
66
67
|
|
|
67
68
|
Errors, warnings, progress, and diagnostic messages are written to stderr. A command failure under
|
|
68
69
|
`--json` or `TAILOR_JSON_OUTPUT` emits a JSON error envelope to stderr, including a failure while
|
|
69
70
|
parsing arguments: an unknown option or subcommand, or an option value that fails validation, is
|
|
70
71
|
reported as `INVALID_ARGUMENTS`. Failures you can act on — an invalid or missing option, a resource
|
|
71
72
|
that does not exist, an invalid configuration, or an unmet precondition — carry a stable `error.code`
|
|
72
|
-
such as `PROFILE_NOT_FOUND`, `TAILORDB_NAMESPACE_NOT_FOUND`, or `MIGRATION_SCRIPT_REQUIRED
|
|
73
|
+
such as `PROFILE_NOT_FOUND`, `TAILORDB_NAMESPACE_NOT_FOUND`, or `MIGRATION_SCRIPT_REQUIRED`
|
|
74
|
+
([Migration Error Codes](#migration-error-codes-beta) lists the codes for migrations). Where a
|
|
73
75
|
remediation exists, the envelope also includes
|
|
74
76
|
`error.suggestion`, `error.help` (the `--help` invocation for the failing command), `error.next` (a
|
|
75
77
|
runnable command), or `error.context`. `UNEXPECTED_ERROR` marks failures without a dedicated code,
|
|
@@ -102,6 +104,172 @@ Generation hook failures use `PLUGIN_GENERATION_FAILED`. The error includes the
|
|
|
102
104
|
and each failing plugin's ID and error in `error.context.failures`; successful plugins are
|
|
103
105
|
excluded from that list.
|
|
104
106
|
|
|
107
|
+
#### Migration Error Codes (Beta)
|
|
108
|
+
|
|
109
|
+
`tailor deploy` and the `tailor tailordb migration` commands report these codes when migration
|
|
110
|
+
files, the migration state of a namespace, or a migration run stops them. Each entry says what
|
|
111
|
+
happened; the next step, where one exists, is in `error.suggestion` and `error.next`. `tailor
|
|
112
|
+
tailordb migration test` deploys the pending migrations to a test workspace, so it can also report
|
|
113
|
+
the `tailor deploy` codes. See [TailorDB Migrations](./services/tailordb/migration.md) for the terms
|
|
114
|
+
used here.
|
|
115
|
+
|
|
116
|
+
Migration files, reported by `tailor deploy` and by the `tailor tailordb migration` commands that
|
|
117
|
+
read them:
|
|
118
|
+
|
|
119
|
+
- `MIGRATION_DIRECTORY_CONFLICT`: two or more namespaces use the same migrations directory.
|
|
120
|
+
- `MIGRATION_FILES_INVALID`: a migrations directory has no `0000/schema.json`, a gap or a duplicate
|
|
121
|
+
in its numbering, or a migration without `diff.json`.
|
|
122
|
+
- `MIGRATION_FILE_INVALID`: a `schema.json` or `diff.json` is not valid JSON or does not have the
|
|
123
|
+
expected structure.
|
|
124
|
+
- `MIGRATION_FILE_VERSION_UNSUPPORTED`: a migration file uses a format version that this SDK version
|
|
125
|
+
does not support.
|
|
126
|
+
|
|
127
|
+
`tailor deploy`, checked while planning, so `--dry-run` reports them too:
|
|
128
|
+
|
|
129
|
+
- `MIGRATION_SCHEMA_CHECK_FAILED`: the local table definitions have changes that no migration file
|
|
130
|
+
records.
|
|
131
|
+
- `MIGRATION_REMOTE_DRIFT`: the workspace's tables differ from the schema of the migration that its
|
|
132
|
+
checkpoint records.
|
|
133
|
+
- `MIGRATION_CHECKPOINT_UNKNOWN`: the workspace's checkpoint is not in the local migration history:
|
|
134
|
+
it is past the latest local migration, or it belongs to another migration history.
|
|
135
|
+
- `MIGRATION_SCRIPT_REQUIRED`: a pending migration requires a `migrate.ts`, and it has neither one
|
|
136
|
+
nor a recorded `--no-script` acknowledgment.
|
|
137
|
+
- `MIGRATION_SCRIPT_SKIP_CONFLICT`: a pending migration has both a `migrate.ts` and a recorded
|
|
138
|
+
`--no-script` acknowledgment.
|
|
139
|
+
- `MIGRATION_SCRIPT_REVIEW_REQUIRED`: a pending migration's `migrate.ts` still has a `TODO()` call
|
|
140
|
+
or review marker that the generated script left.
|
|
141
|
+
- `MIGRATION_SCRIPT_INVALID`: a pending migration's `migrate.ts` cannot be parsed, or its exports or
|
|
142
|
+
`steps` are not valid.
|
|
143
|
+
- `MIGRATION_SCRIPT_BUNDLE_FAILED`: a pending migration's `migrate.ts` could not be bundled.
|
|
144
|
+
- `AUTH_CONFIG_REQUIRED`: a pending migration has a `migrate.ts`, but the config defines no auth to
|
|
145
|
+
run it.
|
|
146
|
+
- `MACHINE_USER_REQUIRED`: a pending migration has a `migrate.ts`, but no machine user is selected
|
|
147
|
+
to run the scripts of its namespace.
|
|
148
|
+
- `MACHINE_USER_NOT_FOUND`: the machine user selected to run a pending migration's `migrate.ts` is
|
|
149
|
+
not defined in auth.
|
|
150
|
+
- `MIGRATION_OUTCOME_UNSETTLED`: an earlier deploy could not confirm whether a migration's script
|
|
151
|
+
ran, and the migration has not been settled since.
|
|
152
|
+
- `MIGRATION_IN_PROGRESS_INVALID`: the migration recorded as in progress cannot be read, is not the
|
|
153
|
+
next pending migration, or no longer exports `steps` although some of its steps ran.
|
|
154
|
+
- `MIGRATION_IN_PROGRESS_CONFLICT`: a namespace whose checkpoint the deploy would reset to `0000`
|
|
155
|
+
has a migration in progress.
|
|
156
|
+
- `MIGRATION_SKIP_STEPS_FORMAT_INVALID`: a `--migration-skip-steps` entry is not in the form
|
|
157
|
+
`<namespace>/<step>`.
|
|
158
|
+
- `MIGRATION_SKIP_STEPS_INVALID`: a `--migration-skip-steps` entry names a namespace that no
|
|
159
|
+
deployed config defines or that has no partially applied migration, or a step that is not in the
|
|
160
|
+
migration, that has no earlier run, or that did not succeed in the earlier run.
|
|
161
|
+
- `MIGRATION_SKIP_STEPS_UNVERIFIED`: the step results of the earlier run could not be read, so the
|
|
162
|
+
steps passed to `--migration-skip-steps` could not be checked.
|
|
163
|
+
|
|
164
|
+
`tailor deploy`, while applying:
|
|
165
|
+
|
|
166
|
+
- `DEPLOY_PLAN_STALE`: the migration files, a checkpoint reset, or the tables to delete changed
|
|
167
|
+
after the deploy was planned. `tailor tailordb migration test` reports it when the migration
|
|
168
|
+
files changed after it planned its deploy.
|
|
169
|
+
- `MIGRATION_HISTORY_INVALID`: the schema before a pending migration could not be rebuilt from the
|
|
170
|
+
migration files.
|
|
171
|
+
- `MIGRATION_CHECKPOINT_CONFLICT`: a namespace's checkpoint or migration history changed while the
|
|
172
|
+
deploy ran, for example because another deploy moved it.
|
|
173
|
+
- `MIGRATION_CHECKPOINT_UNVERIFIED`: the deploy could not read a namespace's checkpoint to confirm
|
|
174
|
+
that it had not changed.
|
|
175
|
+
- `MIGRATION_FAILED`: a migration's script failed, and the deploy rolled the migration back to the
|
|
176
|
+
previous checkpoint.
|
|
177
|
+
- `MIGRATION_ROLLED_BACK`: a migration whose `migrate.ts` exports `steps` and
|
|
178
|
+
`onFailure = "rollback"` failed, and the deploy rolled it back to the previous checkpoint.
|
|
179
|
+
- `MIGRATION_PARTIALLY_APPLIED`: a migration stopped partway and stays in progress: a `steps`
|
|
180
|
+
migration failed after some of its steps may have been applied, or the deploy could not clear
|
|
181
|
+
the in-progress record of a failed migration, so its schema was not rolled back.
|
|
182
|
+
- `MIGRATION_OUTCOME_UNKNOWN`: the deploy could not confirm whether a migration's script started or
|
|
183
|
+
finished, or whether an earlier run of the script is still running.
|
|
184
|
+
- `MIGRATION_LOCAL_DEFINITIONS_FAILED`: with `--no-schema-check`, a local table definition that the
|
|
185
|
+
pending migrations do not include could not be applied after the migrations completed.
|
|
186
|
+
- `MIGRATION_RESTORE_FAILED`: the settings of some tables, such as their maintenance mode, could not
|
|
187
|
+
be restored after the migrations. When a migration had already failed, the deploy reports that
|
|
188
|
+
failure instead and puts this error in its `error.context.restoration`.
|
|
189
|
+
|
|
190
|
+
`tailor tailordb migration` commands:
|
|
191
|
+
|
|
192
|
+
- `MIGRATION_CONFIG_NOT_FOUND`: no TailorDB namespace in the config has `migration` configured.
|
|
193
|
+
- `MIGRATION_VALIDATION_FAILED`: `validate` found a problem in at least one namespace. Its result
|
|
194
|
+
lists the problems of each namespace, including the migration file and deploy checks above.
|
|
195
|
+
- `MIGRATION_STATUS_FAILED`: `status` could not report at least one namespace, for example because
|
|
196
|
+
its migration files are invalid, its migration history differs from the workspace's, or its
|
|
197
|
+
checkpoint is past the latest local migration.
|
|
198
|
+
- `MIGRATION_IN_PROGRESS`: `rebaseline`, `sync`, or `test` found a migration in progress in the
|
|
199
|
+
namespace: partially applied steps, a script run that is not settled, or an in-progress record
|
|
200
|
+
that cannot be read.
|
|
201
|
+
- `MIGRATION_HISTORY_MISMATCH`: replaying the local migration files does not reproduce the current
|
|
202
|
+
local table definitions (`rebaseline`, `sync`, `resolve`).
|
|
203
|
+
- `MIGRATION_BASELINE_NOT_FOUND`: the namespace has no `0000` migration to rebuild its schema from.
|
|
204
|
+
- `MIGRATION_HISTORY_NOT_FOUND`: `rebaseline` found no migrations for the namespace.
|
|
205
|
+
- `MIGRATION_NAMESPACE_NOT_DEPLOYED`: the namespace does not exist in the workspace (`sync`,
|
|
206
|
+
`resolve`).
|
|
207
|
+
- `MIGRATION_NOT_FOUND`: the migration that `sync` was given, or that `resolve` would return the
|
|
208
|
+
namespace to, is not in the local migration files.
|
|
209
|
+
- `MIGRATION_SYNC_HISTORY_MISMATCH`: the namespace records a different migration history ID, or one
|
|
210
|
+
that cannot be read, and `sync` was run without `--force`.
|
|
211
|
+
- `MIGRATION_SYNC_CANCELLED`: the `sync` confirmation was declined.
|
|
212
|
+
- `MIGRATION_RESOLVE_DIRECTION_REQUIRED`: `resolve` was given neither or both of `--rollback` and
|
|
213
|
+
`--complete`.
|
|
214
|
+
- `MIGRATION_RESOLVE_NO_IN_PROGRESS`: `resolve` found nothing to settle: no migration is in
|
|
215
|
+
progress in the namespace, and with `--rollback`, no interrupted deploy left the pre-migration
|
|
216
|
+
schema of a migration either.
|
|
217
|
+
- `MIGRATION_RESOLVE_RECORD_UNREADABLE`: the namespace's in-progress record cannot be read.
|
|
218
|
+
- `MIGRATION_RESOLVE_RECORD_INVALID`: the migration recorded as in progress is not the one after
|
|
219
|
+
the checkpoint.
|
|
220
|
+
- `MIGRATION_RESOLVE_HISTORY_MISMATCH`: the namespace records a different migration history ID from
|
|
221
|
+
the local migration files.
|
|
222
|
+
- `MIGRATION_EXECUTION_ACTIVE`: the script run of the migration that `resolve` would settle is still
|
|
223
|
+
running.
|
|
224
|
+
- `MIGRATION_RESOLVE_STATE_CHANGED`: the namespace's checkpoint, migration history, or in-progress
|
|
225
|
+
record changed while `resolve` was running.
|
|
226
|
+
- `MIGRATION_RESOLVE_CANCELLED`: the `resolve` confirmation was declined.
|
|
227
|
+
- `REBASELINE_CHECKPOINT_BEHIND`: the workspace's checkpoint is not the latest local migration.
|
|
228
|
+
- `REBASELINE_REMOTE_HISTORY_INVALID`: the workspace's migration history ID cannot be read.
|
|
229
|
+
- `REBASELINE_REMOTE_HISTORY_MISMATCH`: the workspace records a different migration history ID from
|
|
230
|
+
the local migration files.
|
|
231
|
+
- `REBASELINE_REMOTE_SCHEMA_MISMATCH`: the workspace's tables do not match the latest migration.
|
|
232
|
+
- `REBASELINE_STATE_CHANGED`: the workspace's migration history ID, the migration files, or the
|
|
233
|
+
local table or config files changed while `rebaseline` waited for confirmation.
|
|
234
|
+
- `REBASELINE_CANCELLED`: the `rebaseline` confirmation was declined.
|
|
235
|
+
- `REBASELINE_CHECKPOINT_UPDATE_FAILED`: the local migration history was replaced, but resetting
|
|
236
|
+
the workspace's checkpoint to `0000` failed.
|
|
237
|
+
- `MIGRATION_TEST_OPTIONS_INVALID`: the options of `test` conflict, for example `--keep-ttl`
|
|
238
|
+
without `--keep`, or `--organization-id` or `--folder-id` does not match the target workspace.
|
|
239
|
+
- `MIGRATION_TEST_TARGET_INVALID`: the target workspace is the source workspace.
|
|
240
|
+
- `MIGRATION_TEST_REGION_MISMATCH`: with `--data clone`, the target workspace is in a different
|
|
241
|
+
region from the source.
|
|
242
|
+
- `MIGRATION_TEST_ASSERT_NAMESPACE_REQUIRED`: `--assert` was given, the pending migrations span
|
|
243
|
+
several namespaces, and `--assert-namespace` was not given.
|
|
244
|
+
- `MIGRATION_TEST_NO_PENDING_MIGRATIONS`: the source workspace has no pending migration, or the
|
|
245
|
+
`--assert-namespace` has none.
|
|
246
|
+
- `MIGRATION_TEST_SOURCE_CHECKPOINT_MISSING`: a namespace has not been deployed to the source
|
|
247
|
+
workspace.
|
|
248
|
+
- `MIGRATION_TEST_SOURCE_INVALID`: a source namespace's tables do not match its checkpoint, or,
|
|
249
|
+
without a checkpoint, do not match `0000`.
|
|
250
|
+
- `MIGRATION_TEST_SOURCE_AHEAD`: a source namespace's checkpoint is past the latest local migration.
|
|
251
|
+
- `MIGRATION_TEST_SOURCE_REPAIR_PENDING`: a source namespace's checkpoint is waiting for the reset
|
|
252
|
+
to `0000` that a deploy applies after a re-baseline.
|
|
253
|
+
- `MIGRATION_TEST_SOURCE_CLEANUP_PENDING`: a source namespace still has tables that the migration
|
|
254
|
+
at its checkpoint removed.
|
|
255
|
+
- `MIGRATION_TEST_SOURCE_CHANGED`: with `--data clone`, the source workspace changed between
|
|
256
|
+
preparing the test and cloning its data.
|
|
257
|
+
- `MIGRATION_TEST_SNAPSHOT_NOT_FOUND`: the schema of the latest migration could not be rebuilt from
|
|
258
|
+
the migration files.
|
|
259
|
+
- `MIGRATION_TEST_SNAPSHOT_INVALID`: the migration schemas to deploy to the target name a namespace
|
|
260
|
+
that is not in the config, or define the same table name in two namespaces.
|
|
261
|
+
- `MIGRATION_TEST_CLONE_UNAVAILABLE`: data cloning is not enabled on the Platform.
|
|
262
|
+
- `MIGRATION_TEST_CLONE_FAILED`: cloning the source data failed.
|
|
263
|
+
- `MIGRATION_TEST_CLONE_TIMEOUT`: cloning the source data did not finish within `--clone-timeout`.
|
|
264
|
+
- `MIGRATION_TEST_SEED_FAILED`: the seed script failed.
|
|
265
|
+
- `MIGRATION_TEST_ASSERTION_FAILED`: the assertion script failed.
|
|
266
|
+
- `MIGRATION_TEST_WORKSPACE_CLEANUP_FAILED`: the test passed, but deleting its temporary workspace
|
|
267
|
+
failed.
|
|
268
|
+
|
|
269
|
+
Codes of `tailor tailordb migration generate` and `tailor tailordb migration script`, and other
|
|
270
|
+
codes for options or arguments that cannot be used, such as a namespace or migration number that
|
|
271
|
+
does not exist, are not listed; their messages name the cause.
|
|
272
|
+
|
|
105
273
|
### Verbose Output
|
|
106
274
|
|
|
107
275
|
Use `--verbose` to include debug diagnostics and error stack traces. `DEBUG=true` or
|
|
@@ -173,6 +341,7 @@ Both `--env-file` and `--env-file-if-exists` can be specified multiple times and
|
|
|
173
341
|
- Variables already set in the environment are **not** overwritten
|
|
174
342
|
- Later files override earlier files
|
|
175
343
|
- `--env-file` files are loaded first, then `--env-file-if-exists` files
|
|
344
|
+
- Loaded values fill options backed by an environment variable, such as `--config` from `TAILOR_CONFIG_PATH`
|
|
176
345
|
|
|
177
346
|
```bash
|
|
178
347
|
# Load .env (required) and .env.local (optional, if exists)
|
|
@@ -186,27 +355,28 @@ tailor deploy --env-file .env --env-file .env.production
|
|
|
186
355
|
|
|
187
356
|
You can use environment variables to configure workspace and authentication:
|
|
188
357
|
|
|
189
|
-
| Variable | Description
|
|
190
|
-
| -------------------------------------------- |
|
|
191
|
-
| `TAILOR_PLATFORM_WORKSPACE_ID` | Workspace ID for deployment commands
|
|
192
|
-
| `TAILOR_PLATFORM_ORGANIZATION_ID` | Organization ID for organization commands
|
|
193
|
-
| `TAILOR_PLATFORM_FOLDER_ID` | Folder ID for folder commands
|
|
194
|
-
| `TAILOR_PLATFORM_TOKEN` | Authentication token (alternative to `login`)
|
|
195
|
-
| `TAILOR_PLATFORM_PROFILE` | Workspace profile name
|
|
196
|
-
| `TAILOR_CONFIG_PATH` | Path to Tailor config file
|
|
197
|
-
| `TAILOR_DTS_PATH` | Output path for generated `tailor.d.ts` type definition file
|
|
198
|
-
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID` | Client ID for `login --machine-user`
|
|
199
|
-
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET` | Client secret for `login --machine-user`
|
|
200
|
-
| `TAILOR_PLATFORM_MACHINE_USER_NAME` | Default machine user name for `query`, `workflow start`, `function run`, `machineuser token`
|
|
201
|
-
| `TAILOR_PLATFORM_URL` | Platform API base URL. Saved into profiles created with `profile create --platform-url`
|
|
202
|
-
| `TAILOR_PLATFORM_OAUTH2_CLIENT_ID` | OAuth2 client ID for user login. Saved into profiles created with `profile create --oauth2-client-id`
|
|
203
|
-
| `TAILOR_PLATFORM_CONSOLE_URL` | Console base URL. Saved into profiles created with `profile create --console-url`
|
|
204
|
-
| `TAILOR_BUNDLE_CONCURRENCY` | Max concurrent bundle workers for `deploy` (resolvers/executors/workflows). Defaults to CPU count
|
|
205
|
-
| `TAILOR_APPLY_CONCURRENCY` | Max concurrent platform RPCs during `apply`/`deploy`. Defaults to 16
|
|
206
|
-
| `VISUAL` / `EDITOR` | Preferred editor for commands that open files (e.g., `vim`, `code`, `nano`)
|
|
207
|
-
| `TAILOR_GITHUB_ACTIONS_ANNOTATIONS` | GitHub Actions failure annotations: `on` (default) or `off`
|
|
208
|
-
| `TAILOR_CRASH_REPORTS_LOCAL` | Local crash log writing: `on` (default) or `off`
|
|
209
|
-
| `TAILOR_CRASH_REPORTS_REMOTE` | Automatic crash report submission: `off` (default) or `on`
|
|
358
|
+
| Variable | Description |
|
|
359
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
360
|
+
| `TAILOR_PLATFORM_WORKSPACE_ID` | Workspace ID for deployment commands |
|
|
361
|
+
| `TAILOR_PLATFORM_ORGANIZATION_ID` | Organization ID for organization commands |
|
|
362
|
+
| `TAILOR_PLATFORM_FOLDER_ID` | Folder ID for folder commands |
|
|
363
|
+
| `TAILOR_PLATFORM_TOKEN` | Authentication token (alternative to `login`) |
|
|
364
|
+
| `TAILOR_PLATFORM_PROFILE` | Workspace profile name |
|
|
365
|
+
| `TAILOR_CONFIG_PATH` | Path to Tailor config file |
|
|
366
|
+
| `TAILOR_DTS_PATH` | Output path for generated `tailor.d.ts` type definition file |
|
|
367
|
+
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID` | Client ID for `login --machine-user` |
|
|
368
|
+
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET` | Client secret for `login --machine-user` |
|
|
369
|
+
| `TAILOR_PLATFORM_MACHINE_USER_NAME` | Default machine user name for `query`, `workflow start`, `function run`, `machineuser token` |
|
|
370
|
+
| `TAILOR_PLATFORM_URL` | Platform API base URL. Saved into profiles created with `profile create --platform-url` |
|
|
371
|
+
| `TAILOR_PLATFORM_OAUTH2_CLIENT_ID` | OAuth2 client ID for user login. Saved into profiles created with `profile create --oauth2-client-id` |
|
|
372
|
+
| `TAILOR_PLATFORM_CONSOLE_URL` | Console base URL. Saved into profiles created with `profile create --console-url` |
|
|
373
|
+
| `TAILOR_BUNDLE_CONCURRENCY` | Max concurrent bundle workers for `deploy` (resolvers/executors/workflows). Defaults to CPU count |
|
|
374
|
+
| `TAILOR_APPLY_CONCURRENCY` | Max concurrent platform RPCs during `apply`/`deploy`. Defaults to 16 |
|
|
375
|
+
| `VISUAL` / `EDITOR` | Preferred editor for commands that open files (e.g., `vim`, `code`, `nano`) |
|
|
376
|
+
| `TAILOR_GITHUB_ACTIONS_ANNOTATIONS` | GitHub Actions failure annotations: `on` (default) or `off` |
|
|
377
|
+
| `TAILOR_CRASH_REPORTS_LOCAL` | Local crash log writing: `on` (default) or `off` |
|
|
378
|
+
| `TAILOR_CRASH_REPORTS_REMOTE` | Automatic crash report submission: `off` (default) or `on` |
|
|
379
|
+
| `TAILOR_NOTIFICATION_BANNER` | Unread WARNING/CRITICAL notifications listed after a command in an interactive terminal: `on` (default) or `off` |
|
|
210
380
|
|
|
211
381
|
### Authentication Token Priority
|
|
212
382
|
|
|
@@ -226,7 +396,7 @@ Workspace ID resolution follows this priority order:
|
|
|
226
396
|
2. `TAILOR_PLATFORM_WORKSPACE_ID` environment variable
|
|
227
397
|
3. Profile specified via `--profile` option or `TAILOR_PLATFORM_PROFILE`
|
|
228
398
|
|
|
229
|
-
## CLI Plugins
|
|
399
|
+
## CLI Plugins (Beta)
|
|
230
400
|
|
|
231
401
|
> [!WARNING]
|
|
232
402
|
> CLI plugins are a **beta** feature. The dispatch behavior and the set of injected environment
|
|
@@ -270,9 +440,10 @@ Resolution rules:
|
|
|
270
440
|
- **Global flags reach the plugin from either side.** `tailor --json tailordb erd export` and
|
|
271
441
|
`tailor tailordb erd export --json` both forward `--json`, and likewise `--verbose` and the
|
|
272
442
|
`--env-file` options. A flag typed before the plugin name is consumed by the host CLI first and
|
|
273
|
-
then forwarded, so when the same flag appears on both sides the later one wins
|
|
274
|
-
|
|
275
|
-
|
|
443
|
+
then forwarded, so when the same flag appears on both sides the later one wins; every
|
|
444
|
+
`--env-file` and `--env-file-if-exists` still loads. A flag the host does not define — including
|
|
445
|
+
one only some commands declare, such as `--profile` — still has to be typed after the plugin's own
|
|
446
|
+
subcommand. `--help` and `--version` are answered by the host CLI and
|
|
276
447
|
never dispatch a plugin. Setting `TAILOR_JSON_OUTPUT=true` also works, which plugins inherit from
|
|
277
448
|
the environment.
|
|
278
449
|
|
|
@@ -327,20 +498,19 @@ Commands for managing Tailor Platform applications (work with `tailor.config.ts`
|
|
|
327
498
|
|
|
328
499
|
Commands for managing TailorDB tables, data, and schema migrations.
|
|
329
500
|
|
|
330
|
-
| Command | Description
|
|
331
|
-
| -------------------------------------------------------------------------------- |
|
|
332
|
-
| [tailordb](./cli/tailordb.md#tailordb) | Manage TailorDB tables and data.
|
|
333
|
-
| [tailordb truncate](./cli/tailordb.md#tailordb-truncate) | Truncate (delete all records from) TailorDB tables.
|
|
334
|
-
| [tailordb migration](./cli/tailordb.md#tailordb-migration) | Manage TailorDB schema migrations.
|
|
335
|
-
| [tailordb migration generate](./cli/tailordb.md#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot.
|
|
336
|
-
| [tailordb migration rebaseline](./cli/tailordb.md#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline.
|
|
337
|
-
| [tailordb migration resolve](./cli/tailordb.md#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm.
|
|
338
|
-
| [tailordb migration script](./cli/tailordb.md#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none.
|
|
339
|
-
| [tailordb migration
|
|
340
|
-
| [tailordb migration
|
|
341
|
-
| [tailordb migration
|
|
342
|
-
| [tailordb migration
|
|
343
|
-
| [tailordb migration validate](./cli/tailordb.md#tailordb-migration-validate) | Validate the full migration history, unreviewed generated migration scripts, and schema drift (local tables vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found. |
|
|
501
|
+
| Command | Description |
|
|
502
|
+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
503
|
+
| [tailordb](./cli/tailordb.md#tailordb) | Manage TailorDB tables and data. |
|
|
504
|
+
| [tailordb truncate](./cli/tailordb.md#tailordb-truncate) | Truncate (delete all records from) TailorDB tables. |
|
|
505
|
+
| [tailordb migration](./cli/tailordb.md#tailordb-migration) | Manage TailorDB schema migrations (beta). |
|
|
506
|
+
| [tailordb migration generate](./cli/tailordb.md#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot. |
|
|
507
|
+
| [tailordb migration rebaseline](./cli/tailordb.md#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline. |
|
|
508
|
+
| [tailordb migration resolve](./cli/tailordb.md#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm. |
|
|
509
|
+
| [tailordb migration script](./cli/tailordb.md#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none. |
|
|
510
|
+
| [tailordb migration status](./cli/tailordb.md#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
|
|
511
|
+
| [tailordb migration sync](./cli/tailordb.md#tailordb-migration-sync) | Sync remote TailorDB schema and checkpoint to a local migration snapshot to recover from schema drift or a checkpoint outside the local history. |
|
|
512
|
+
| [tailordb migration test](./cli/tailordb.md#tailordb-migration-test) | Test pending migrations with seed fixtures or cloned data in a temporary workspace. |
|
|
513
|
+
| [tailordb migration validate](./cli/tailordb.md#tailordb-migration-validate) | Run the migration and schema-drift checks that 'deploy' runs before changing anything, without deploying, and exit with a non-zero code when issues are found. |
|
|
344
514
|
|
|
345
515
|
### [Data Commands](./cli/data.md)
|
|
346
516
|
|
|
@@ -531,6 +701,17 @@ Commands for managing crash reports.
|
|
|
531
701
|
| [crashreport list](./cli/crashreport.md#crashreport-list) | List local crash report files. |
|
|
532
702
|
| [crashreport send](./cli/crashreport.md#crashreport-send) | Submit a crash report to help improve the SDK. |
|
|
533
703
|
|
|
704
|
+
### [Notification Commands](./cli/notification.md)
|
|
705
|
+
|
|
706
|
+
Commands for reading platform notifications.
|
|
707
|
+
|
|
708
|
+
| Command | Description |
|
|
709
|
+
| ------------------------------------------------------------------ | -------------------------------------------- |
|
|
710
|
+
| [notification](./cli/notification.md#notification) | Read the platform notifications sent to you. |
|
|
711
|
+
| [notification dismiss](./cli/notification.md#notification-dismiss) | Remove a notification from your inbox. |
|
|
712
|
+
| [notification list](./cli/notification.md#notification-list) | List the notifications in your inbox. |
|
|
713
|
+
| [notification read](./cli/notification.md#notification-read) | Show a notification and mark it as read. |
|
|
714
|
+
|
|
534
715
|
### [Upgrade Commands](./cli/upgrade.md)
|
|
535
716
|
|
|
536
717
|
Commands for upgrading SDK versions with automated code migration.
|
package/docs/configuration.md
CHANGED
|
@@ -118,7 +118,7 @@ The default applies wherever the SDK parses or serializes `t` fields on your beh
|
|
|
118
118
|
|
|
119
119
|
The setting is per `tailor.config.ts`, but the field types are declared through `tailor.d.ts`, which TypeScript merges across every file in a program. If one `tsconfig.json` includes the `tailor.d.ts` of several applications, they must agree on `defaultDateRepresentation`. When they differ, `t.date()`, `t.datetime()`, and `t.time()` called without `as` fail to type-check in that program until the configs are aligned or each application gets its own `tsconfig.json`.
|
|
120
120
|
|
|
121
|
-
**Maintenance Mode** (`maintenanceMode
|
|
121
|
+
**Maintenance Mode** (`maintenanceMode`, Beta): Whether `deploy` restricts the TailorDB namespaces it migrates while it applies pending migrations: `"migration"` (the default) restricts them until the migrations complete, `"deploy"` until the whole deploy completes, and `false` does not restrict them. See [Maintenance mode](./services/tailordb/migration.md#maintenance-mode) for what is restricted and what concurrent requests can observe without it.
|
|
122
122
|
|
|
123
123
|
```typescript
|
|
124
124
|
export default defineConfig({
|
|
@@ -516,7 +516,7 @@ export default defineConfig({
|
|
|
516
516
|
});
|
|
517
517
|
```
|
|
518
518
|
|
|
519
|
-
### Plugins
|
|
519
|
+
### Plugins (Beta)
|
|
520
520
|
|
|
521
521
|
Configure plugins using `definePlugins()`, exported as `export const plugins`.
|
|
522
522
|
|
package/docs/data-clone.md
CHANGED
|
@@ -70,6 +70,6 @@ tailor data operation get --from <source-workspace-id> --to <target-workspace-id
|
|
|
70
70
|
|
|
71
71
|
With `--json`, `data clone` reports `status: "completed"` once the clone has finished, or `status: "started"` with `--no-wait`.
|
|
72
72
|
|
|
73
|
-
## Rehearsing migrations with cloned data
|
|
73
|
+
## Rehearsing migrations with cloned data (Beta)
|
|
74
74
|
|
|
75
75
|
To test pending TailorDB migrations against a copy of real records, use `tailor tailordb migration test --data clone` instead of cloning by hand. It creates a temporary workspace, deploys the pre-migration schema, clones the records, and runs the pending migrations. That command copies TailorDB records only; see [Clone mode](./services/tailordb/migration.md#clone-mode).
|