@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/application.md
CHANGED
|
@@ -60,29 +60,29 @@ tailor deploy [options]
|
|
|
60
60
|
|
|
61
61
|
**Options**
|
|
62
62
|
|
|
63
|
-
| Option | Alias | Description
|
|
64
|
-
| ----------------------------------------------- | ----- |
|
|
65
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID
|
|
66
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile
|
|
67
|
-
| `--config <CONFIG>` | `-c` | Path to SDK config file. Use comma-separated paths to deploy multiple apps together.
|
|
68
|
-
| `--yes` | `-y` | Skip confirmation prompts
|
|
69
|
-
| `--create-workspace` | - | Create a workspace when the account has none
|
|
70
|
-
| `--workspace-name <WORKSPACE_NAME>` | - | Name for a workspace created during deploy
|
|
71
|
-
| `--workspace-region <WORKSPACE_REGION>` | - | Region for a workspace created during deploy
|
|
72
|
-
| `--organization-id <ORGANIZATION_ID>` | - | Organization ID for a workspace created during deploy
|
|
73
|
-
| `--folder-id <FOLDER_ID>` | - | Folder ID for a workspace created during deploy
|
|
74
|
-
| `--dry-run` | `-d` | Run the command without making any changes
|
|
75
|
-
| `--no-schema-check` | - | Skip schema diff check against migration snapshots
|
|
76
|
-
| `--migration-skip-steps <MIGRATION_SKIP_STEPS>` | - | Skip steps of a partially applied multi-step migration that already succeeded
|
|
77
|
-
| `--no-validate` | - | Skip client-side validation against platform resource constraints
|
|
78
|
-
| `--no-cache` | - | Disable bundle caching for this run
|
|
79
|
-
| `--clean-cache` | - | Clean the bundle cache before building
|
|
63
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
64
|
+
| ----------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------- | --------------------------------- |
|
|
65
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
66
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
67
|
+
| `--config <CONFIG>` | `-c` | Path to SDK config file. Use comma-separated paths to deploy multiple apps together. | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
|
|
68
|
+
| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
|
|
69
|
+
| `--create-workspace` | - | Create a workspace when the account has none | No | - | - |
|
|
70
|
+
| `--workspace-name <WORKSPACE_NAME>` | - | Name for a workspace created during deploy | No | - | - |
|
|
71
|
+
| `--workspace-region <WORKSPACE_REGION>` | - | Region for a workspace created during deploy | No | - | - |
|
|
72
|
+
| `--organization-id <ORGANIZATION_ID>` | - | Organization ID for a workspace created during deploy | No | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
|
|
73
|
+
| `--folder-id <FOLDER_ID>` | - | Folder ID for a workspace created during deploy | No | - | `TAILOR_PLATFORM_FOLDER_ID` |
|
|
74
|
+
| `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
|
|
75
|
+
| `--no-schema-check` | - | Skip schema diff check against migration snapshots (beta) | No | - | - |
|
|
76
|
+
| `--migration-skip-steps <MIGRATION_SKIP_STEPS>` | - | Skip steps of a partially applied multi-step migration that already succeeded, as comma-separated namespace/step entries (beta) | No | - | - |
|
|
77
|
+
| `--no-validate` | - | Skip client-side validation against platform resource constraints | No | - | - |
|
|
78
|
+
| `--no-cache` | - | Disable bundle caching for this run | No | - | - |
|
|
79
|
+
| `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
|
|
80
80
|
|
|
81
81
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
82
82
|
|
|
83
83
|
**Notes**
|
|
84
84
|
|
|
85
|
-
Every workspace belongs to an organization; when none is given or set as a default, interactive runs ask for one and non-interactive runs fail. Workspace creation uses the selected user's default organization and folder set by `user update` when neither location is given and TAILOR_PLATFORM_TOKEN is not set. Giving --organization-id or --folder-id replaces both defaults.
|
|
85
|
+
Every workspace belongs to an organization; when none is given or set as a default, interactive runs ask for one and non-interactive runs fail. Workspace creation uses the selected user's default organization and folder set by `user update` when neither location is given and TAILOR_PLATFORM_TOKEN is not set. Giving --organization-id or --folder-id replaces both defaults. TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file, also replace the defaults; command-line options take precedence, and an empty value of either variable is ignored. With --create-workspace, an existing workspace must match the resolved name, region, organization, and folder to be reused.
|
|
86
86
|
|
|
87
87
|
**JSON result:**
|
|
88
88
|
|
|
@@ -154,7 +154,8 @@ tailor deploy \
|
|
|
154
154
|
`--create-workspace` only creates when the account has no workspace. If the existing workspace
|
|
155
155
|
matches the requested name, region, organization, and folder, `deploy` reuses it so the same command
|
|
156
156
|
is safe to rerun. If multiple workspaces exist, the flag never creates another one or guesses which
|
|
157
|
-
workspace to use. `--yes`
|
|
157
|
+
workspace to use. `--yes` accepts the deployment confirmations described under Confirmation below
|
|
158
|
+
but does not authorize workspace creation.
|
|
158
159
|
|
|
159
160
|
If a saved workspace has been deleted or is no longer accessible, interactive terminals return to
|
|
160
161
|
workspace selection. Non-interactive environments stop with `WORKSPACE_CONTEXT_STALE` instead of
|
|
@@ -182,20 +183,24 @@ Names that identify a resource across the whole workspace, such as application,
|
|
|
182
183
|
|
|
183
184
|
Each config's `files` and `ignores` patterns (see [Service Configuration](../configuration.md#service-configuration)) resolve relative to that config's own directory, not the directory you ran `deploy` from. For example, `apps/buyer/tailor.config.ts` declaring `files: ["db/**/*.ts"]` loads files from `apps/buyer/db/`, independent of where `apps/supplier/tailor.config.ts`'s patterns resolve. If a config's relative patterns match nothing under its own directory, the SDK falls back to the invocation directory and logs a warning (see [Service Configuration](../configuration.md#service-configuration) for details).
|
|
184
185
|
|
|
185
|
-
**Migration Handling:**
|
|
186
|
+
**Migration Handling (Beta):**
|
|
186
187
|
|
|
187
|
-
When migrations are configured (`db
|
|
188
|
+
When migrations are configured (`db.<namespace>.migration` in config), the `deploy` command:
|
|
188
189
|
|
|
189
|
-
1.
|
|
190
|
-
2.
|
|
191
|
-
3.
|
|
192
|
-
4.
|
|
190
|
+
1. Checks the migration files and the migration state of each namespace (see Schema Check below) three times: while planning, so `--dry-run` reports a failure too; before it applies anything for any config; and again when it applies each config's TailorDB changes. If the migration files, a checkpoint reset, or the tables to delete changed after planning, the deploy stops with `DEPLOY_PLAN_STALE`.
|
|
191
|
+
2. Resets the checkpoints that the plan showed would be reset to `0000` after a re-baseline, clears an in-progress record that an earlier deploy left on a migration it had already committed, and deletes the tables that a committed migration removed but an earlier deploy did not delete.
|
|
192
|
+
3. Applies the changes of namespaces without pending migrations, except deletions. This also takes their tables out of a maintenance mode that an interrupted deploy left.
|
|
193
|
+
4. Puts every namespace with pending migrations into maintenance mode, unless `maintenanceMode` is `false`.
|
|
194
|
+
5. Runs the pending migrations one namespace at a time, in alphabetical order of the namespace names, and in number order within a namespace. Each migration applies its pre-migration schema, runs its `migrate.ts`, applies its post-migration schema, advances the checkpoint, and then deletes the tables and GraphQL permissions it removed.
|
|
195
|
+
6. With `--no-schema-check`, applies the local table definitions that the pending migrations do not include (see [Schema verification](../services/tailordb/migration.md#schema-verification)).
|
|
196
|
+
7. Takes the tables out of maintenance mode, or with `maintenanceMode: "deploy"`, leaves that to the end of the deploy.
|
|
197
|
+
8. Deletes the remaining tables and GraphQL permissions that are no longer in the config.
|
|
193
198
|
|
|
194
|
-
See [Automatic Migration Execution](../services/tailordb/migration.md#automatic-migration-execution) for details on automatic migration execution.
|
|
199
|
+
See [Automatic Migration Execution](../services/tailordb/migration.md#automatic-migration-execution) for details on automatic migration execution, and [Several configs in one deploy](../services/tailordb/migration.md#several-configs-in-one-deploy) for the state a failed migration leaves the other configs in.
|
|
195
200
|
|
|
196
201
|
**Concurrent Deploys:**
|
|
197
202
|
|
|
198
|
-
Deploys that target the same workspace and application from the same project directory are serialized while secrets and auth connections are updated: one deploy proceeds and the other waits for it to finish. A deploy that cannot proceed within 5 minutes fails with an error, which normally means another deploy is still running. If a previous deploy was interrupted, the next deploy recovers automatically within about a minute. Deploys to different workspaces or applications are not affected.
|
|
203
|
+
Deploys that target the same workspace and application from the same project directory are serialized while secrets and auth connections are updated: one deploy proceeds and the other waits for it to finish. A deploy that cannot proceed within 5 minutes fails with an error, which normally means another deploy is still running. If a previous deploy was interrupted, the next deploy recovers automatically within about a minute. If the error persists, stop any `tailor deploy` still running from the project directory, then delete the lock directory that the error names and retry. Deploys to different workspaces or applications are not affected.
|
|
199
204
|
|
|
200
205
|
**Schema Check:**
|
|
201
206
|
|
|
@@ -206,7 +211,7 @@ By default, `deploy` performs two verification steps:
|
|
|
206
211
|
|
|
207
212
|
If remote schema drift is detected, the deploy will fail with an error showing the differences. This helps prevent applying migrations to an inconsistent state.
|
|
208
213
|
|
|
209
|
-
Use `--no-schema-check` to skip both verifications (not recommended for production).
|
|
214
|
+
Use `--no-schema-check` to skip both verifications (not recommended for production). It does not skip the check that the remote migration checkpoint is in the local migration history: when the deployed checkpoint is ahead of the local migration files or belongs to another migration history, the deploy stops before changing anything. Pull the latest migration files, or move the checkpoint on purpose with `tailor tailordb migration sync`, adding `--force` when the checkpoint belongs to another migration history or has a history label that cannot be read, then deploy again.
|
|
210
215
|
|
|
211
216
|
**Plan Output:**
|
|
212
217
|
|
|
@@ -239,6 +244,22 @@ tailor deploy --dry-run > plan.txt
|
|
|
239
244
|
|
|
240
245
|
In apply mode, the plan is printed to stderr so it does not interfere with piped output.
|
|
241
246
|
|
|
247
|
+
**Confirmation:**
|
|
248
|
+
|
|
249
|
+
After printing the plan, `deploy` asks for confirmation before applying when the plan includes any of the following:
|
|
250
|
+
|
|
251
|
+
- TailorDB migration checkpoints that must be reset before deploying (Beta)
|
|
252
|
+
- Applications recorded as depending on this deploy that are missing from it
|
|
253
|
+
- Resources owned by another application, or tagged with a different application id
|
|
254
|
+
- Existing resources that `tailor` does not manage yet
|
|
255
|
+
- Deletion of TailorDB tables, static websites, AI gateways, OAuth2 clients (including a client type change), Auth connections, Secret Manager vaults, or Secret Manager secrets
|
|
256
|
+
|
|
257
|
+
Declining cancels the deploy. When the plan includes none of these, `deploy` applies it without asking.
|
|
258
|
+
|
|
259
|
+
`--yes` accepts these confirmations without asking. In a non-interactive environment or with `--json`, a deploy that needs one of them fails unless `--yes` is passed. `--dry-run` lists them as warnings without asking.
|
|
260
|
+
|
|
261
|
+
When [`env`](../configuration.md#environment-variables) references the URL of a static website that the same deploy creates, `deploy` first applies static websites and the other resources that cannot reference that URL, then plans the rest again with the real URL and prints that plan as well. It asks again only about what the new plan adds; declining at that point leaves the resources applied first in place.
|
|
262
|
+
|
|
242
263
|
**JSON Output:**
|
|
243
264
|
|
|
244
265
|
Pass the global `--json` / `-j` flag to get machine-readable output.
|
|
@@ -280,10 +301,23 @@ Pass the global `--json` / `-j` flag to get machine-readable output.
|
|
|
280
301
|
```json
|
|
281
302
|
{
|
|
282
303
|
"summary": { "create": 1, "update": 2, "delete": 0, "replace": 0, "forcedBySdkVersion": 0 },
|
|
283
|
-
"status": "applied"
|
|
304
|
+
"status": "applied",
|
|
305
|
+
"workspaceId": "ws_abc123",
|
|
306
|
+
"applications": [
|
|
307
|
+
{
|
|
308
|
+
"name": "my-app",
|
|
309
|
+
"configPath": "/path/to/my-app/tailor.config.ts",
|
|
310
|
+
"url": "https://my-app.example.com",
|
|
311
|
+
"domain": "my-app.example.com",
|
|
312
|
+
"aiGateways": [],
|
|
313
|
+
"staticWebsites": {}
|
|
314
|
+
}
|
|
315
|
+
]
|
|
284
316
|
}
|
|
285
317
|
```
|
|
286
318
|
|
|
319
|
+
Some deploys also add `tailordbMaintenance` or `deployedHooks`, as described under **JSON result** above.
|
|
320
|
+
|
|
287
321
|
## remove
|
|
288
322
|
|
|
289
323
|
Remove all resources managed by the application from the workspace.
|
package/docs/cli/executor.md
CHANGED
|
@@ -6,6 +6,8 @@ description: "List and inspect executors, view executor jobs, and trigger execut
|
|
|
6
6
|
|
|
7
7
|
Commands for managing executors and executor jobs.
|
|
8
8
|
|
|
9
|
+
In the human-readable output of `executor jobs --logs` and `executor trigger --logs`, `[PLATFORM]` marks log lines the Platform added. See [`function logs`](./function.md#function-logs) for the `source` that `--json` reports for each log entry.
|
|
10
|
+
|
|
9
11
|
## executor
|
|
10
12
|
|
|
11
13
|
Manage executors
|
package/docs/cli/function.md
CHANGED
|
@@ -135,7 +135,9 @@ $ tailor function logs <execution-id> --follow
|
|
|
135
135
|
|
|
136
136
|
Each execution includes `errorKind`, which tells you where a failure came from: `USER_RUNTIME` (your code threw while running, or exceeded its time, memory, or CPU limit), `USER_NON_RUNTIME` (your script failed while loading, before your function was called, such as when its top-level code threw), `PLATFORM` (a failure on the Platform side, or the Platform aborting the run because of its own deadline or cancellation), `NONE` (no error), or `UNSPECIFIED` (not recorded, or a kind this CLI version does not recognize). A workflow job waiting on another job also reports `USER_NON_RUNTIME` when that job fails or is canceled. `errorName` and `errorMessage` hold the error's name and message, or `null` when none was recorded. The list table omits `errorMessage`; use `--json` or the execution details to read it.
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
Each execution also includes `hasPlatformLogs`, which is `true` when the Platform added log lines of its own to the execution. The flag is best-effort: `false` does not guarantee there are none, so read the `logEntries` of the execution details to be sure. The list table shows a `hasPlatformLogs` column, marking flagged executions with `yes`, only when at least one listed execution is flagged.
|
|
139
|
+
|
|
140
|
+
Execution details include `logEntries`, the structured log lines (message, severity, timestamp, source) recorded while the function ran. They are available while the execution is still running. `source` is `USER` for your function's own output, `PLATFORM` for a line the Platform added, or `UNSPECIFIED` (not recorded, or a source this CLI version does not recognize); the human-readable output marks Platform lines with `[PLATFORM]`. The `logs` string joins their messages with newlines.
|
|
139
141
|
|
|
140
142
|
Use `--follow` to keep polling a running execution and print new log entries as they arrive until it completes. Polling continues while the execution is suspended at a wait point, and indefinitely unless `--timeout` is set. With `--json`, `--follow` waits for completion and then emits the final execution details once.
|
|
141
143
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "List, read and dismiss the platform notifications sent to you from the tailor CLI."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Notification Commands
|
|
6
|
+
|
|
7
|
+
Commands for reading the platform notifications addressed to you: alerts you must act on,
|
|
8
|
+
incidents, maintenance notices and announcements. The inbox is per user, so these commands take a
|
|
9
|
+
profile (for its login) but no workspace. Marking a notification read or dismissing it in the CLI
|
|
10
|
+
also changes it in the Console, which shows the same inbox.
|
|
11
|
+
|
|
12
|
+
When no subcommand is provided, defaults to `list`.
|
|
13
|
+
|
|
14
|
+
## notification
|
|
15
|
+
|
|
16
|
+
Read the platform notifications sent to you.
|
|
17
|
+
|
|
18
|
+
**Usage**
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
tailor notification [command]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
25
|
+
|
|
26
|
+
**Commands**
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
| ----------------------------------------------- | ---------------------------------------- |
|
|
30
|
+
| [`notification list`](#notification-list) | List the notifications in your inbox. |
|
|
31
|
+
| [`notification read`](#notification-read) | Show a notification and mark it as read. |
|
|
32
|
+
| [`notification dismiss`](#notification-dismiss) | Remove a notification from your inbox. |
|
|
33
|
+
|
|
34
|
+
### notification dismiss
|
|
35
|
+
|
|
36
|
+
Remove a notification from your inbox.
|
|
37
|
+
|
|
38
|
+
**Usage**
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
tailor notification dismiss [options] <id>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Arguments**
|
|
45
|
+
|
|
46
|
+
| Argument | Description | Required |
|
|
47
|
+
| -------- | --------------- | -------- |
|
|
48
|
+
| `id` | Notification ID | Yes |
|
|
49
|
+
|
|
50
|
+
**Options**
|
|
51
|
+
|
|
52
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
53
|
+
| --------------------- | ----- | ----------------- | -------- | ------- | ------------------------- |
|
|
54
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
55
|
+
|
|
56
|
+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
57
|
+
|
|
58
|
+
### notification list
|
|
59
|
+
|
|
60
|
+
List the notifications in your inbox.
|
|
61
|
+
|
|
62
|
+
**Usage**
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
tailor notification list [options]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Options**
|
|
69
|
+
|
|
70
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
71
|
+
| ------------------------------------------- | ----- | --------------------------------------------------------------- | -------- | -------- | ------------------------- |
|
|
72
|
+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
|
|
73
|
+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0: unlimited) | No | `50` | - |
|
|
74
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
75
|
+
| `--category <CATEGORY>` | - | Only this category (alert, incident, maintenance, announcement) | No | - | - |
|
|
76
|
+
| `--severity <SEVERITY>` | - | Only this severity or higher (info, warning, critical) | No | - | - |
|
|
77
|
+
| `--unread` | - | Only unread notifications | No | `false` | - |
|
|
78
|
+
| `--scope-workspace <SCOPE_WORKSPACE>` | - | Only notifications about this workspace ID | No | - | - |
|
|
79
|
+
| `--scope-organization <SCOPE_ORGANIZATION>` | - | Only notifications about this organization ID | No | - | - |
|
|
80
|
+
|
|
81
|
+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
82
|
+
|
|
83
|
+
### notification read
|
|
84
|
+
|
|
85
|
+
Show a notification and mark it as read.
|
|
86
|
+
|
|
87
|
+
**Usage**
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
tailor notification read [options] <id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Arguments**
|
|
94
|
+
|
|
95
|
+
| Argument | Description | Required |
|
|
96
|
+
| -------- | ---------------------------- | -------- |
|
|
97
|
+
| `id` | Notification ID (repeatable) | Yes |
|
|
98
|
+
|
|
99
|
+
**Options**
|
|
100
|
+
|
|
101
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
102
|
+
| --------------------- | ----- | ------------------------------------------------ | -------- | ------- | ------------------------- |
|
|
103
|
+
| `--no-mark-read` | - | Show the notification without marking it as read | No | `false` | - |
|
|
104
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
105
|
+
|
|
106
|
+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
107
|
+
|
|
108
|
+
**Output (default):**
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
┌──────────────────────────────────────┬──────────┬──────────────┬─────────────────────────────────┬─────────────┬────────────┐
|
|
112
|
+
│ id │ severity │ category │ title │ arrivedAt │ readAt │
|
|
113
|
+
├──────────────────────────────────────┼──────────┼──────────────┼─────────────────────────────────┼─────────────┼────────────┤
|
|
114
|
+
│ 0d2c0f1e-5c2b-4e3a-9c1d-2f6a7b8c9d0e │ warning │ maintenance │ Scheduled maintenance on Nov 3 │ 2 hours ago │ unread │
|
|
115
|
+
│ 1d2c0f1e-5c2b-4e3a-9c1d-2f6a7b8c9d0e │ info │ announcement │ Platform notifications are live │ 3 days ago │ 2 days ago │
|
|
116
|
+
└──────────────────────────────────────┴──────────┴──────────────┴─────────────────────────────────┴─────────────┴────────────┘
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`tailor notification read <id>` prints the title, the metadata, the body as plain text (it is
|
|
120
|
+
Markdown, shown as written) and the action links, then marks the notification read. Pass
|
|
121
|
+
`--no-mark-read` to only display it. Several IDs can be given at once. If some of them are not
|
|
122
|
+
found, the others are still shown and marked read, and the command then fails naming the missing
|
|
123
|
+
IDs. With a read-only login, the notifications are shown but not marked read, and a warning says
|
|
124
|
+
so.
|
|
125
|
+
|
|
126
|
+
`tailor notification dismiss <id>` removes a notification from your inbox. This cannot be undone:
|
|
127
|
+
`read` and `list` no longer show it. It needs a profile that is not read-only. Notifications you
|
|
128
|
+
do not dismiss stay until the platform expires or revokes them.
|
package/docs/cli/tailordb.md
CHANGED
|
@@ -23,7 +23,7 @@ See [Global Options](../cli-reference.md#global-options) for options available t
|
|
|
23
23
|
| Command | Description |
|
|
24
24
|
| ------------------------------------------- | --------------------------------------------------- |
|
|
25
25
|
| [`tailordb truncate`](#tailordb-truncate) | Truncate (delete all records from) TailorDB tables. |
|
|
26
|
-
| [`tailordb migration`](#tailordb-migration) | Manage TailorDB schema migrations.
|
|
26
|
+
| [`tailordb migration`](#tailordb-migration) | Manage TailorDB schema migrations (beta). |
|
|
27
27
|
|
|
28
28
|
### tailordb truncate
|
|
29
29
|
|
|
@@ -86,7 +86,7 @@ tailor tailordb truncate User Post --yes
|
|
|
86
86
|
|
|
87
87
|
### tailordb migration
|
|
88
88
|
|
|
89
|
-
Manage TailorDB schema migrations.
|
|
89
|
+
Manage TailorDB schema migrations (beta).
|
|
90
90
|
|
|
91
91
|
Note: Migration scripts are automatically executed during `tailor deploy`. See [Automatic Migration Execution](../services/tailordb/migration.md#automatic-migration-execution) for details.
|
|
92
92
|
|
|
@@ -98,17 +98,16 @@ tailor tailordb migration <command>
|
|
|
98
98
|
|
|
99
99
|
**Commands**
|
|
100
100
|
|
|
101
|
-
| Command | Description
|
|
102
|
-
| ----------------------------------------------------------------- |
|
|
103
|
-
| [`tailordb migration generate`](#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot.
|
|
104
|
-
| [`tailordb migration rebaseline`](#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline.
|
|
105
|
-
| [`tailordb migration resolve`](#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm.
|
|
106
|
-
| [`tailordb migration script`](#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.
|
|
107
|
-
| [`tailordb migration
|
|
108
|
-
| [`tailordb migration
|
|
109
|
-
| [`tailordb migration
|
|
110
|
-
| [`tailordb migration
|
|
111
|
-
| [`tailordb migration validate`](#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. |
|
|
101
|
+
| Command | Description |
|
|
102
|
+
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
|
+
| [`tailordb migration generate`](#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot. |
|
|
104
|
+
| [`tailordb migration rebaseline`](#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline. |
|
|
105
|
+
| [`tailordb migration resolve`](#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm. |
|
|
106
|
+
| [`tailordb migration script`](#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. |
|
|
107
|
+
| [`tailordb migration status`](#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
|
|
108
|
+
| [`tailordb migration sync`](#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. |
|
|
109
|
+
| [`tailordb migration test`](#tailordb-migration-test) | Test pending migrations with seed fixtures or cloned data in a temporary workspace. |
|
|
110
|
+
| [`tailordb migration validate`](#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. |
|
|
112
111
|
|
|
113
112
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
114
113
|
|
|
@@ -190,13 +189,15 @@ See [Global Options](../cli-reference.md#global-options) for options available t
|
|
|
190
189
|
|
|
191
190
|
**Notes**
|
|
192
191
|
|
|
193
|
-
Use this after a deploy failed partway through a migration whose `migrate.ts` exports `steps`, or after a deploy could not confirm whether the script of a migration ran (`MIGRATION_OUTCOME_UNKNOWN`). The migration stays in progress: when `maintenanceMode` is on in your config, the tables of its namespace stay in maintenance mode, and
|
|
192
|
+
Use this after a deploy failed partway through a migration whose `migrate.ts` exports `steps`, or after a deploy could not confirm whether the script of a migration ran (`MIGRATION_OUTCOME_UNKNOWN`). The migration stays in progress: when `maintenanceMode` is on in your config, the tables of its namespace stay in maintenance mode, and the other migration commands that move the checkpoint are refused. A deploy stops before changing anything while a run it could not confirm is not settled.
|
|
194
193
|
|
|
195
194
|
- `--rollback` sends the schema of the migration before the failed one. The next deploy runs the failed migration again, from its first step for a script that exports `steps`. Data changes the script already made are not undone.
|
|
196
195
|
- `--complete` sends the schema of the failed migration itself and records it as completed, without running its `migrate.ts` again. Fix the data first (for example with `tailor query`), and make sure no record lacks a value for a field that becomes required.
|
|
197
196
|
|
|
198
197
|
For a run that a deploy could not confirm, the command reads how the run ended and shows it before asking for confirmation: use `--complete` when it succeeded, and `--rollback` when it failed, was canceled, or did not start. It refuses while the run is still running, and warns when the option you chose does not fit how the run ended.
|
|
199
198
|
|
|
199
|
+
`--rollback` also settles a migration that no deploy recorded as in progress, but whose pre-migration schema or maintenance mode a deploy left in place, for example because the deploy stopped before recording it. See "Settling a migration that stays in progress" in the TailorDB Migrations guide for when it runs.
|
|
200
|
+
|
|
200
201
|
Both options remove the in-progress record, take the tables out of maintenance mode, and remove the temporary resources of the failed run, so `deploy` and the other migration commands work again. As with `tailordb migration sync`, the local migration history must reproduce the current table definitions. If sending the schema stops partway, run the command again.
|
|
201
202
|
|
|
202
203
|
#### tailordb migration script
|
|
@@ -231,40 +232,6 @@ See [Global Options](../cli-reference.md#global-options) for options available t
|
|
|
231
232
|
|
|
232
233
|
When `migrate.ts` already exists, running the command clears a previously recorded `--no-script` acknowledgment, and `--with-test` adds only the tests that do not exist yet (writing `db.pglite.ts` if it is missing). `migrate.pglite.test.ts` is scaffolded only when `@electric-sql/pglite` is installed in the project.
|
|
233
234
|
|
|
234
|
-
#### tailordb migration set
|
|
235
|
-
|
|
236
|
-
Set migration checkpoint to a specific number.
|
|
237
|
-
|
|
238
|
-
**Usage**
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
tailor tailordb migration set [options] <number>
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**Arguments**
|
|
245
|
-
|
|
246
|
-
| Argument | Description | Required |
|
|
247
|
-
| -------- | ----------------------------------------- | -------- |
|
|
248
|
-
| `number` | Migration number to set (e.g., 0001 or 1) | Yes |
|
|
249
|
-
|
|
250
|
-
**Options**
|
|
251
|
-
|
|
252
|
-
| Option | Alias | Description | Required | Default | Env |
|
|
253
|
-
| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
|
|
254
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
255
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
256
|
-
| `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
|
|
257
|
-
| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
|
|
258
|
-
| `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (required if multiple namespaces exist) | No | - | - |
|
|
259
|
-
|
|
260
|
-
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
261
|
-
|
|
262
|
-
**Notes**
|
|
263
|
-
|
|
264
|
-
The migration number must be a 4-digit value (e.g. `0001`) or a bare integer (e.g. `1`) within 0–9999, and must exist in the local migration history; `0` is always accepted as the baseline, provided the local history passes validation. A gapped history is rejected.
|
|
265
|
-
|
|
266
|
-
Metadata lookup failures (authentication, permission, or network errors) are reported as errors; only a not-yet-deployed namespace is treated as having no checkpoint.
|
|
267
|
-
|
|
268
235
|
#### tailordb migration status
|
|
269
236
|
|
|
270
237
|
Show the current migration status for TailorDB namespaces, including applied and pending migrations.
|
|
@@ -292,7 +259,7 @@ Local migration files are checked for a valid layout (numbering and required fil
|
|
|
292
259
|
|
|
293
260
|
#### tailordb migration sync
|
|
294
261
|
|
|
295
|
-
Sync remote TailorDB schema to a
|
|
262
|
+
Sync remote TailorDB schema and checkpoint to a local migration snapshot to recover from schema drift or a checkpoint outside the local history.
|
|
296
263
|
|
|
297
264
|
**Usage**
|
|
298
265
|
|
|
@@ -308,16 +275,21 @@ tailor tailordb migration sync [options] <number>
|
|
|
308
275
|
|
|
309
276
|
**Options**
|
|
310
277
|
|
|
311
|
-
| Option | Alias | Description
|
|
312
|
-
| ------------------------------- | ----- |
|
|
313
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID
|
|
314
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile
|
|
315
|
-
| `--config <CONFIG>` | `-c` | Path to Tailor config file
|
|
316
|
-
| `--yes` | `-y` | Skip confirmation prompts
|
|
317
|
-
| `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (required if multiple namespaces exist)
|
|
278
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
279
|
+
| ------------------------------- | ----- | --------------------------------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
|
|
280
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
281
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
282
|
+
| `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
|
|
283
|
+
| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
|
|
284
|
+
| `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (required if multiple namespaces exist) | No | - | - |
|
|
285
|
+
| `--force` | - | Proceed even when the namespace records a migration history ID other than the local one | No | `false` | - |
|
|
318
286
|
|
|
319
287
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
320
288
|
|
|
289
|
+
**Notes**
|
|
290
|
+
|
|
291
|
+
The command refuses to run when the namespace records a migration history ID other than the local one, or one that cannot be read, unless the namespace has neither a checkpoint nor a history ID yet. `--force` overwrites the tables and that history ID with those of the local history, and still asks for confirmation unless `--yes` is given.
|
|
292
|
+
|
|
321
293
|
#### tailordb migration test
|
|
322
294
|
|
|
323
295
|
Test pending migrations with seed fixtures or cloned data in a temporary workspace.
|
|
@@ -343,19 +315,19 @@ tailor tailordb migration test [options]
|
|
|
343
315
|
| `--folder-id <FOLDER_ID>` | - | Folder to create the temporary workspace in (default: the source workspace's folder). Requires --organization-id when the source workspace is not in an organization. With --target-workspace-id, must match the target's folder | No | - | `TAILOR_PLATFORM_FOLDER_ID` |
|
|
344
316
|
| `--assert <ASSERT>` | - | Path to a TypeScript assertion script to run after migrations | No | - | - |
|
|
345
317
|
| `--assert-namespace <ASSERT_NAMESPACE>` | - | TailorDB namespace exposed to the assertion script | No | - | - |
|
|
346
|
-
| `--keep-ttl <KEEP_TTL>` | - | Record an expiry on the kept workspace, e.g. 24h or 7d, so workspace prune --expired can delete it (requires --keep)
|
|
318
|
+
| `--keep-ttl <KEEP_TTL>` | - | Record an expiry on the kept workspace, e.g. 24h or 7d (less than 50,000,000 days), so workspace prune --expired can delete it (requires --keep) | No | - | - |
|
|
347
319
|
| `--clone-timeout <CLONE_TIMEOUT>` | - | How long to wait for the clone to finish with --data clone, e.g. 30s or 10m (default: 30m) | No | - | - |
|
|
348
|
-
| `--machine-user <MACHINE_USER>` | - | Machine user for seed and assertion script execution
|
|
320
|
+
| `--machine-user <MACHINE_USER>` | - | Machine user for seed, migration, and assertion script execution | No | - | - |
|
|
349
321
|
|
|
350
322
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
351
323
|
|
|
352
324
|
**Notes**
|
|
353
325
|
|
|
354
|
-
The source workspace is read-only. Without --target-workspace-id, the command creates a workspace in the source workspace's region and deletes it after success or failure; pass --keep to retain it for inspection. Right after creating the workspace it records a 24h expiry (unless --keep is given without --keep-ttl), so if the run is interrupted before the command can delete the workspace, workspace prune --expired removes it later. A designated target is retained and requires --yes. Clone mode copies TailorDB records only; it does not copy IdP users or file blobs. With --keep-ttl, the kept workspace records an expiry; it is not deleted automatically, but workspace prune --expired removes it once the expiry has passed.
|
|
326
|
+
The source workspace is read-only. Without --target-workspace-id, the command creates a workspace in the source workspace's region and deletes it after success or failure; pass --keep to retain it for inspection. Right after creating the workspace it records a 24h expiry (unless --keep is given without --keep-ttl), so if the run is interrupted before the command can delete the workspace, workspace prune --expired removes it later. A designated target is retained and requires --yes. Clone mode copies TailorDB records only; it does not copy IdP users or file blobs. With --keep-ttl, the kept workspace records an expiry; it is not deleted automatically, but workspace prune --expired removes it once the expiry has passed. Command-line options take precedence over TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file, and an empty value of either variable is ignored.
|
|
355
327
|
|
|
356
328
|
#### tailordb migration validate
|
|
357
329
|
|
|
358
|
-
|
|
330
|
+
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.
|
|
359
331
|
|
|
360
332
|
**Usage**
|
|
361
333
|
|
|
@@ -365,19 +337,24 @@ tailor tailordb migration validate [options]
|
|
|
365
337
|
|
|
366
338
|
**Options**
|
|
367
339
|
|
|
368
|
-
| Option
|
|
369
|
-
|
|
|
370
|
-
| `--workspace-id <WORKSPACE_ID>`
|
|
371
|
-
| `--profile <PROFILE>`
|
|
372
|
-
| `--config <CONFIG>`
|
|
373
|
-
| `--namespace <NAMESPACE>`
|
|
374
|
-
| `--strict`
|
|
340
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
341
|
+
| ----------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
|
|
342
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
343
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
344
|
+
| `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
|
|
345
|
+
| `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (validates all namespaces if not specified) | No | - | - |
|
|
346
|
+
| `--strict` | - | Also fail when a pending migration can drop data without an acknowledgment | No | `false` | - |
|
|
347
|
+
| `--migration-skip-steps <MIGRATION_SKIP_STEPS>` | - | Also check that 'deploy --migration-skip-steps' can skip these steps of a partially applied multi-step migration, as comma-separated namespace/step entries | No | - | - |
|
|
375
348
|
|
|
376
349
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
377
350
|
|
|
351
|
+
**Notes**
|
|
352
|
+
|
|
353
|
+
Migration scripts are checked across the full migration history, not only the pending migrations that `deploy` checks. Like `deploy`, the command bundles only the pending scripts and checks the machine user that runs them.
|
|
354
|
+
|
|
378
355
|
**See also:** For migration concepts, configuration, workflow, and troubleshooting, see the [TailorDB Migrations guide](../services/tailordb/migration.md).
|
|
379
356
|
|
|
380
|
-
### tailordb erd
|
|
357
|
+
### tailordb erd (Beta)
|
|
381
358
|
|
|
382
359
|
The `tailordb erd` commands (export, diff, serve, deploy) are provided by the `@tailor-platform/sdk-plugin-tailordb-erd` CLI plugin. Install it next to the SDK and keep running `tailor tailordb erd <command>` as before:
|
|
383
360
|
|
package/docs/cli/workflow.md
CHANGED
|
@@ -6,6 +6,8 @@ description: "List and inspect workflows, start and wait for workflow runs, and
|
|
|
6
6
|
|
|
7
7
|
Commands for managing workflows and workflow executions.
|
|
8
8
|
|
|
9
|
+
In the human-readable output of `--logs` on `workflow start`, `workflow wait`, `workflow executions`, and `workflow resume`, `[PLATFORM]` marks log lines the Platform added. See [`function logs`](./function.md#function-logs) for the `source` that `--json` reports for each log entry.
|
|
10
|
+
|
|
9
11
|
## workflow
|
|
10
12
|
|
|
11
13
|
Manage workflows and workflow executions.
|