@tailor-platform/sdk 1.67.0 → 1.68.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.
@@ -179,6 +179,7 @@ tailor-sdk executor jobs [options] <executor-name> [job-id]
179
179
  | `--attempts` | - | Show job attempts (only with job ID) (detail mode only) | No | `false` | - |
180
180
  | `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable (detail mode only) | No | `false` | - |
181
181
  | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
182
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait when using --wait (e.g., '30s', '5m') | No | `"5m"` | - |
182
183
  | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
183
184
  | `--limit <LIMIT>` | - | Maximum number of jobs to list (0: unlimited, default: 50) (list mode only) | No | `50` | - |
184
185
  | `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - |
@@ -283,6 +284,7 @@ tailor-sdk executor trigger [options] <executor-name>
283
284
  | `--header <HEADER>` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | No | - | - |
284
285
  | `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | No | `false` | - |
285
286
  | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
287
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait when using --wait (e.g., '30s', '5m') | No | `"5m"` | - |
286
288
  | `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - |
287
289
 
288
290
  <!-- politty:command:executor trigger:options:end -->
@@ -323,6 +325,57 @@ $ tailor-sdk executor trigger my-executor -W -l
323
325
 
324
326
  <!-- politty:command:executor trigger:examples:end -->
325
327
 
328
+ **Shell automation**
329
+
330
+ Trigger an executor and wait for the executor job plus any downstream workflow or
331
+ function execution:
332
+
333
+ ```bash
334
+ tailor-sdk executor trigger daily-workflow \
335
+ --wait \
336
+ --timeout 5m \
337
+ --interval 5s \
338
+ --json
339
+ ```
340
+
341
+ Wait for an existing job when another process already captured the job ID:
342
+
343
+ ```bash
344
+ tailor-sdk executor jobs daily-workflow "$job_id" \
345
+ --wait \
346
+ --timeout 5m \
347
+ --logs \
348
+ --json
349
+ ```
350
+
351
+ **Programmatic API**
352
+
353
+ Import your executor definition and pass it to the typed API:
354
+
355
+ ```ts
356
+ import { triggerExecutor, watchExecutorJob } from "@tailor-platform/sdk/cli";
357
+ import dailyWorkflow from "../executors/dailyWorkflow";
358
+
359
+ const { jobId } = await triggerExecutor({
360
+ executor: dailyWorkflow,
361
+ });
362
+
363
+ if (!jobId) {
364
+ throw new Error("Executor trigger did not return a job ID");
365
+ }
366
+
367
+ const result = await watchExecutorJob({
368
+ executor: dailyWorkflow,
369
+ jobId,
370
+ timeout: 5 * 60 * 1000,
371
+ interval: 5000,
372
+ });
373
+
374
+ if (result.timedOut) {
375
+ throw new Error(`Executor job ${result.job.id} timed out at ${result.job.status}`);
376
+ }
377
+ ```
378
+
326
379
  <!-- politty:command:executor trigger:notes:start -->
327
380
 
328
381
  **Notes**
package/docs/cli/setup.md CHANGED
@@ -10,7 +10,7 @@ Commands for setting up project infrastructure.
10
10
 
11
11
  <!-- politty:command:setup:description:start -->
12
12
 
13
- Set up project infrastructure.
13
+ Generate a CI deploy workflow for your project. (beta)
14
14
 
15
15
  <!-- politty:command:setup:description:end -->
16
16
 
@@ -19,18 +19,36 @@ Set up project infrastructure.
19
19
  **Usage**
20
20
 
21
21
  ```
22
- tailor-sdk setup [command]
22
+ tailor-sdk setup [options] [command]
23
23
  ```
24
24
 
25
25
  <!-- politty:command:setup:usage:end -->
26
26
 
27
+ <!-- politty:command:setup:options:start -->
28
+
29
+ **Options**
30
+
31
+ | Option | Alias | Description | Required | Default |
32
+ | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------- |
33
+ | `--provider <PROVIDER>` | `-p` | CI provider to generate for (only 'github' is supported) | No | `"github"` |
34
+ | `--workspace-name <WORKSPACE_NAME>` | `-n` | Workspace name (defaults to the config 'name') | No | - |
35
+ | `--branch <BRANCH>` | - | Branch target: deploy trigger branch (defaults to the detected default branch). Tag target: tag-reachability guard branch (no guard when omitted) | No | - |
36
+ | `--tag` | - | Generate a tag target (deploy on tag push) | No | `false` |
37
+ | `--tag-pattern <TAG_PATTERN>` | - | Tag glob to match (requires --tag; defaults to v\*) | No | - |
38
+ | `--environment <ENVIRONMENT>` | - | GitHub Environment for the plan/deploy jobs (defaults to the workspace name) | No | - |
39
+ | `--no-plan` | - | Disable the plan job for a branch target (cannot be combined with --tag) | No | `false` |
40
+ | `--dir <DIR>` | `-d` | App directory (for monorepo setups) | No | `"."` |
41
+ | `--force` | - | Discard hand edits / take over unmanaged files and regenerate | No | `false` |
42
+
43
+ <!-- politty:command:setup:options:end -->
44
+
27
45
  <!-- politty:command:setup:subcommands:start -->
28
46
 
29
47
  **Commands**
30
48
 
31
- | Command | Description |
32
- | ------------------------------- | ------------------------------------------------- |
33
- | [`setup github`](#setup-github) | Generate a GitHub Actions deploy workflow. (beta) |
49
+ | Command | Description |
50
+ | ----------------------------- | -------------------------------------------------------------------------------- |
51
+ | [`setup check`](#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
34
52
 
35
53
  <!-- politty:command:setup:subcommands:end -->
36
54
 
@@ -39,50 +57,34 @@ tailor-sdk setup [command]
39
57
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
40
58
 
41
59
  <!-- politty:command:setup:global-options-link:end -->
42
- <!-- politty:command:setup github:heading:start -->
43
60
 
44
- ### setup github
61
+ <!-- politty:command:setup check:heading:start -->
62
+
63
+ ### setup check
45
64
 
46
- <!-- politty:command:setup github:heading:end -->
65
+ <!-- politty:command:setup check:heading:end -->
47
66
 
48
- <!-- politty:command:setup github:description:start -->
67
+ <!-- politty:command:setup check:description:start -->
49
68
 
50
- Generate a GitHub Actions deploy workflow. (beta)
69
+ Audit generated workflows for drift against the current config/repo (read-only).
51
70
 
52
- <!-- politty:command:setup github:description:end -->
71
+ <!-- politty:command:setup check:description:end -->
53
72
 
54
- <!-- politty:command:setup github:usage:start -->
73
+ <!-- politty:command:setup check:usage:start -->
55
74
 
56
75
  **Usage**
57
76
 
58
77
  ```
59
- tailor-sdk setup github [options]
78
+ tailor-sdk setup check
60
79
  ```
61
80
 
62
- <!-- politty:command:setup github:usage:end -->
63
-
64
- <!-- politty:command:setup github:options:start -->
65
-
66
- **Options**
67
-
68
- | Option | Alias | Description | Required | Default |
69
- | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
70
- | `--workspace-name <WORKSPACE_NAME>` | `-n` | Workspace name (defaults to the config 'name') | No | - |
71
- | `--branch <BRANCH>` | - | Branch target: deploy trigger branch (defaults to the detected default branch). Tag target: tag-reachability guard branch (no guard when omitted) | No | - |
72
- | `--tag` | - | Generate a tag target (deploy on tag push) | No | `false` |
73
- | `--tag-pattern <TAG_PATTERN>` | - | Tag glob to match (requires --tag; defaults to v\*) | No | - |
74
- | `--environment <ENVIRONMENT>` | - | GitHub Environment for the plan/deploy jobs (defaults to the workspace name) | No | - |
75
- | `--no-plan` | - | Disable the plan job for a branch target (cannot be combined with --tag) | No | `false` |
76
- | `--dir <DIR>` | `-d` | App directory (for monorepo setups) | No | `"."` |
77
- | `--force` | - | Discard hand edits / take over unmanaged files and regenerate | No | `false` |
78
-
79
- <!-- politty:command:setup github:options:end -->
81
+ <!-- politty:command:setup check:usage:end -->
80
82
 
81
- <!-- politty:command:setup github:global-options-link:start -->
83
+ <!-- politty:command:setup check:global-options-link:start -->
82
84
 
83
85
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
84
86
 
85
- <!-- politty:command:setup github:global-options-link:end -->
87
+ <!-- politty:command:setup check:global-options-link:end -->
86
88
 
87
89
  ## Further reading
88
90
 
@@ -33,6 +33,7 @@ tailor-sdk workflow [command]
33
33
  | [`workflow list`](#workflow-list) | List all workflows in the workspace. |
34
34
  | [`workflow get`](#workflow-get) | Get workflow details. |
35
35
  | [`workflow start`](#workflow-start) | Start a workflow execution. |
36
+ | [`workflow wait`](#workflow-wait) | Wait for a workflow execution. |
36
37
  | [`workflow executions`](#workflow-executions) | List or get workflow executions. |
37
38
  | [`workflow resume`](#workflow-resume) | Resume a failed or pending workflow execution. |
38
39
 
@@ -175,8 +176,10 @@ tailor-sdk workflow start [options] <name>
175
176
  | `--machine-user <MACHINE_USER>` | `-m` | Machine user name. Falls back to the active profile's default machine user. | No | - | `TAILOR_PLATFORM_MACHINE_USER_NAME` |
176
177
  | `--arg <ARG>` | `-a` | Workflow argument (JSON string) | No | - | - |
177
178
  | `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
178
- | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
179
- | `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | - |
179
+ | `--interval <INTERVAL>` | `-i` | Polling interval when waiting (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
180
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait (e.g., '30s', '10m') | No | `"10m"` | - |
181
+ | `--until <UNTIL>` | `-u` | Wait target (success, suspended, terminal) | No | `"terminal"` | - |
182
+ | `--logs` | `-l` | Display job execution logs after completion | No | `false` | - |
180
183
 
181
184
  <!-- politty:command:workflow start:options:end -->
182
185
 
@@ -185,6 +188,136 @@ tailor-sdk workflow start [options] <name>
185
188
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
186
189
 
187
190
  <!-- politty:command:workflow start:global-options-link:end -->
191
+ <!-- politty:command:workflow wait:heading:start -->
192
+
193
+ ### workflow wait
194
+
195
+ <!-- politty:command:workflow wait:heading:end -->
196
+
197
+ <!-- politty:command:workflow wait:description:start -->
198
+
199
+ Wait for a workflow execution.
200
+
201
+ <!-- politty:command:workflow wait:description:end -->
202
+
203
+ <!-- politty:command:workflow wait:usage:start -->
204
+
205
+ **Usage**
206
+
207
+ ```
208
+ tailor-sdk workflow wait [options] <execution-id>
209
+ ```
210
+
211
+ <!-- politty:command:workflow wait:usage:end -->
212
+
213
+ <!-- politty:command:workflow wait:arguments:start -->
214
+
215
+ **Arguments**
216
+
217
+ | Argument | Description | Required |
218
+ | -------------- | ------------ | -------- |
219
+ | `execution-id` | Execution ID | Yes |
220
+
221
+ <!-- politty:command:workflow wait:arguments:end -->
222
+
223
+ <!-- politty:command:workflow wait:options:start -->
224
+
225
+ **Options**
226
+
227
+ | Option | Alias | Description | Required | Default | Env |
228
+ | ------------------------------- | ----- | --------------------------------------------------------- | -------- | ------------ | ------------------------------ |
229
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
230
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
231
+ | `--interval <INTERVAL>` | `-i` | Polling interval when waiting (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
232
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait (e.g., '30s', '10m') | No | `"10m"` | - |
233
+ | `--until <UNTIL>` | `-u` | Wait target (success, suspended, terminal) | No | `"terminal"` | - |
234
+ | `--logs` | `-l` | Display job execution logs after completion | No | `false` | - |
235
+
236
+ <!-- politty:command:workflow wait:options:end -->
237
+
238
+ <!-- politty:command:workflow wait:global-options-link:start -->
239
+
240
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
241
+
242
+ <!-- politty:command:workflow wait:global-options-link:end -->
243
+
244
+ <!-- politty:command:workflow wait:examples:start -->
245
+
246
+ **Examples**
247
+
248
+ **Wait for workflow success**
249
+
250
+ ```bash
251
+ $ tailor-sdk workflow wait execution-id --until success --timeout 10m --json
252
+ ```
253
+
254
+ **Wait for a workflow wait point**
255
+
256
+ ```bash
257
+ $ tailor-sdk workflow wait execution-id --until suspended --timeout 6m --logs --json
258
+ ```
259
+
260
+ **Wait for success, failure, or suspension**
261
+
262
+ ```bash
263
+ $ tailor-sdk workflow wait execution-id --until terminal
264
+ ```
265
+
266
+ <!-- politty:command:workflow wait:examples:end -->
267
+
268
+ **Shell automation**
269
+
270
+ Capture the execution ID from `workflow start` and wait for the same run from a
271
+ separate command:
272
+
273
+ ```bash
274
+ execution_id="$(
275
+ tailor-sdk workflow start order-workflow --json | jq -r '.executionId'
276
+ )"
277
+
278
+ tailor-sdk workflow wait "$execution_id" \
279
+ --until success \
280
+ --timeout 10m \
281
+ --interval 5s \
282
+ --json
283
+ ```
284
+
285
+ Wait until a workflow reaches a wait point, such as an approval step:
286
+
287
+ ```bash
288
+ tailor-sdk workflow wait "$execution_id" \
289
+ --until suspended \
290
+ --timeout 6m \
291
+ --logs \
292
+ --json
293
+ ```
294
+
295
+ **Programmatic API**
296
+
297
+ Use `waitWorkflowExecution` when a script already has an execution ID and needs
298
+ the same waiter behavior as the CLI:
299
+
300
+ ```ts
301
+ import { waitWorkflowExecution } from "@tailor-platform/sdk/cli";
302
+
303
+ const executionId = process.env.EXECUTION_ID;
304
+
305
+ if (!executionId) {
306
+ throw new Error("EXECUTION_ID is required");
307
+ }
308
+
309
+ const result = await waitWorkflowExecution({
310
+ executionId,
311
+ until: "success",
312
+ timeout: 10 * 60 * 1000,
313
+ interval: 5000,
314
+ });
315
+
316
+ if (result.timedOut) {
317
+ throw new Error(`Workflow ${result.id} timed out at ${result.status}`);
318
+ }
319
+ ```
320
+
188
321
  <!-- politty:command:workflow executions:heading:start -->
189
322
 
190
323
  ### workflow executions
@@ -221,17 +354,19 @@ tailor-sdk workflow executions [options] [execution-id]
221
354
 
222
355
  **Options**
223
356
 
224
- | Option | Alias | Description | Required | Default | Env |
225
- | --------------------------------- | ----- | -------------------------------------------------------------- | -------- | -------- | ------------------------------ |
226
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
227
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
228
- | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
229
- | `--limit <LIMIT>` | `-l` | Maximum number of items to return (0: unlimited) | No | `50` | - |
230
- | `--workflow-name <WORKFLOW_NAME>` | `-n` | Filter by workflow name (list mode only) | No | - | - |
231
- | `--status <STATUS>` | `-s` | Filter by status (list mode only) | No | - | - |
232
- | `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
233
- | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
234
- | `--logs` | - | Display job execution logs (detail mode only) | No | `false` | - |
357
+ | Option | Alias | Description | Required | Default | Env |
358
+ | --------------------------------- | ----- | --------------------------------------------------------- | -------- | ------------ | ------------------------------ |
359
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
360
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
361
+ | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
362
+ | `--limit <LIMIT>` | `-l` | Maximum number of items to return (0: unlimited) | No | `50` | - |
363
+ | `--workflow-name <WORKFLOW_NAME>` | `-n` | Filter by workflow name (list mode only) | No | - | - |
364
+ | `--status <STATUS>` | `-s` | Filter by status (list mode only) | No | - | - |
365
+ | `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
366
+ | `--interval <INTERVAL>` | `-i` | Polling interval when waiting (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
367
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait (e.g., '30s', '10m') | No | `"10m"` | - |
368
+ | `--until <UNTIL>` | `-u` | Wait target (success, suspended, terminal) | No | `"terminal"` | - |
369
+ | `--logs` | - | Display job execution logs (detail mode only) | No | `false` | - |
235
370
 
236
371
  <!-- politty:command:workflow executions:options:end -->
237
372
 
@@ -276,13 +411,15 @@ tailor-sdk workflow resume [options] <execution-id>
276
411
 
277
412
  **Options**
278
413
 
279
- | Option | Alias | Description | Required | Default | Env |
280
- | ------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | ------------------------------ |
281
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
282
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
283
- | `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
284
- | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
285
- | `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | - |
414
+ | Option | Alias | Description | Required | Default | Env |
415
+ | ------------------------------- | ----- | --------------------------------------------------------- | -------- | ------------ | ------------------------------ |
416
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
417
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
418
+ | `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
419
+ | `--interval <INTERVAL>` | `-i` | Polling interval when waiting (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
420
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait (e.g., '30s', '10m') | No | `"10m"` | - |
421
+ | `--until <UNTIL>` | `-u` | Wait target (success, suspended, terminal) | No | `"terminal"` | - |
422
+ | `--logs` | `-l` | Display job execution logs after completion | No | `false` | - |
286
423
 
287
424
  <!-- politty:command:workflow resume:options:end -->
288
425
 
@@ -223,6 +223,7 @@ Commands for managing workflows and executions.
223
223
  | [workflow list](./cli/workflow.md#workflow-list) | List all workflows in the workspace. |
224
224
  | [workflow get](./cli/workflow.md#workflow-get) | Get workflow details. |
225
225
  | [workflow start](./cli/workflow.md#workflow-start) | Start a workflow execution. |
226
+ | [workflow wait](./cli/workflow.md#workflow-wait) | Wait for a workflow execution. |
226
227
  | [workflow executions](./cli/workflow.md#workflow-executions) | List or get workflow executions. |
227
228
  | [workflow resume](./cli/workflow.md#workflow-resume) | Resume a failed or pending workflow execution. |
228
229
 
@@ -288,9 +289,9 @@ Commands for managing crash reports.
288
289
 
289
290
  Commands for setting up project infrastructure.
290
291
 
291
- | Command | Description |
292
- | ------------------------------------------- | ------------------------------------------------- |
293
- | [setup github](./cli/setup.md#setup-github) | Generate a GitHub Actions deploy workflow. (beta) |
292
+ | Command | Description |
293
+ | ----------------------------------------- | -------------------------------------------------------------------------------- |
294
+ | [setup check](./cli/setup.md#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
294
295
 
295
296
  ### [Upgrade Commands](./cli/upgrade.md)
296
297
 
@@ -1,6 +1,6 @@
1
1
  # GitHub Actions Integration
2
2
 
3
- `tailor-sdk setup github` generates a GitHub Actions workflow that deploys your
3
+ `tailor-sdk setup` generates a GitHub Actions workflow that deploys your
4
4
  Tailor Platform application automatically on push or tag.
5
5
 
6
6
  > **Beta:** This command is under active development. CLI flags, the generated
@@ -14,13 +14,16 @@ lives):
14
14
 
15
15
  ```bash
16
16
  # Branch target: deploy to stg on every push to main
17
- tailor-sdk setup github -n my-app-stg
17
+ tailor-sdk setup -n my-app-stg
18
18
 
19
19
  # Tag target: deploy to production when a tag is pushed, with an approval gate
20
- tailor-sdk setup github -n my-app-prod \
20
+ tailor-sdk setup -n my-app-prod \
21
21
  --tag --branch main --environment production
22
22
  ```
23
23
 
24
+ `setup` defaults to the GitHub provider; `--provider github` (`-p github`) is
25
+ accepted but optional, and other providers are not yet supported.
26
+
24
27
  After running the command, follow the **Next steps** printed to the terminal to
25
28
  set the required secrets, set the `TAILOR_PLATFORM_WORKSPACE_ID` variable, and
26
29
  commit the generated files.
@@ -33,7 +36,7 @@ before the first deploy (see [Targeting a workspace](#targeting-a-workspace)).
33
36
  ## Targets
34
37
 
35
38
  A _target_ is one workflow file that handles one deployment destination.
36
- Run `setup github` once per target.
39
+ Run `setup` once per target.
37
40
 
38
41
  ### Branch target (recommended for staging)
39
42
 
@@ -41,9 +44,9 @@ The branch target fires on pull requests and pushes to the branch you specify
41
44
  (defaulting to the repository's default branch when `--branch` is omitted):
42
45
 
43
46
  ```bash
44
- tailor-sdk setup github -n my-app-stg
47
+ tailor-sdk setup -n my-app-stg
45
48
  # Equivalent to:
46
- tailor-sdk setup github -n my-app-stg --branch main
49
+ tailor-sdk setup -n my-app-stg --branch main
47
50
  ```
48
51
 
49
52
  What it does:
@@ -66,7 +69,7 @@ The tag target fires when a tag matching `--tag-pattern` (default `v*`) is
66
69
  pushed:
67
70
 
68
71
  ```bash
69
- tailor-sdk setup github -n my-app-prod \
72
+ tailor-sdk setup -n my-app-prod \
70
73
  --tag --tag-pattern "v*" --branch main --environment production
71
74
  ```
72
75
 
@@ -136,7 +139,7 @@ environment is planned.)
136
139
 
137
140
  ## Generated files
138
141
 
139
- Running `setup github` creates or updates:
142
+ Running `setup` creates or updates:
140
143
 
141
144
  ### `.github/workflows/tailor-<workspace-name>.yml`
142
145
 
@@ -151,7 +154,7 @@ project-specific setup (such as private registry authentication or a system
151
154
  dependency), add a step _before_ the managed `tailor-setup` step. For
152
155
  post-install extras (such as `playwright install`), add a step _after_ it.
153
156
 
154
- Note that re-running `setup github` currently regenerates the whole file: if
157
+ Note that re-running `setup` currently regenerates the whole file: if
155
158
  the file differs from what the SDK last wrote — whether you edited a managed
156
159
  step or added your own — the command stops and reports the conflict. Pass
157
160
  `--force` to discard your edits and regenerate from the current template, then
@@ -167,7 +170,7 @@ detect hand edits.
167
170
 
168
171
  ### `tailor.config.ts` (id injection)
169
172
 
170
- If your config does not already have an `id` field, `setup github` injects one.
173
+ If your config does not already have an `id` field, `setup` injects one.
171
174
  This `id` must be committed alongside the workflow file. In CI, `tailor-sdk
172
175
  deploy` refuses to inject a new id — if the id were assigned fresh on each CI
173
176
  run, every deploy would create a brand-new application and lose ownership of
@@ -238,7 +241,7 @@ you can deploy any commit regardless of branch membership.
238
241
  For a monorepo where your SDK app lives in a subdirectory, pass `--dir`:
239
242
 
240
243
  ```bash
241
- tailor-sdk setup github -n my-app --dir apps/backend
244
+ tailor-sdk setup -n my-app --dir apps/backend
242
245
  ```
243
246
 
244
247
  The generated workflow adds a `paths` filter on `apps/backend/**` so the
@@ -303,10 +306,10 @@ A typical setup with staging and production:
303
306
 
304
307
  ```bash
305
308
  # Staging: main → stg (deploy on every push to main)
306
- tailor-sdk setup github -n my-app-stg
309
+ tailor-sdk setup -n my-app-stg
307
310
 
308
311
  # Production: tagged commits → prod, with approval gate and branch guard
309
- tailor-sdk setup github -n my-app-prod \
312
+ tailor-sdk setup -n my-app-prod \
310
313
  --tag --branch main --environment production
311
314
  ```
312
315
 
@@ -326,9 +329,19 @@ gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET --env production
326
329
 
327
330
  Commit both workflow files and `.github/tailor-sdk.lock`.
328
331
 
332
+ ## Checking for drift
333
+
334
+ `tailor-sdk setup check` audits the workflows recorded in
335
+ `.github/tailor-sdk.lock` against your current config and repository, without
336
+ writing anything. It reports when a workflow file is missing or hand-edited, a
337
+ newer template is available, `tailor.config.ts` is no longer under the recorded
338
+ `--dir`, or the repository default branch no longer matches a branch target's
339
+ trigger. It exits non-zero when it finds drift, so you can run it in CI. Each
340
+ finding names a stable rule key for future suppression.
341
+
329
342
  ## Updating the generated workflow
330
343
 
331
- When you upgrade the SDK, re-run `setup github` with the same flags to pick up
344
+ When you upgrade the SDK, re-run `setup` with the same flags to pick up
332
345
  template improvements. If the SDK detects that you have hand-edited a managed
333
346
  section, it stops and asks you to use `--force` to overwrite your edits, or to
334
347
  move your customizations into your own steps before regenerating.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.67.0",
3
+ "version": "1.68.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -193,14 +193,14 @@
193
193
  "@types/mime-types": "3.0.1",
194
194
  "@types/node": "24.13.2",
195
195
  "@types/semver": "7.7.1",
196
- "@typescript/native-preview": "7.0.0-dev.20260613.1",
196
+ "@typescript/native-preview": "7.0.0-dev.20260614.1",
197
197
  "@vitest/coverage-v8": "4.1.8",
198
198
  "oxfmt": "0.54.0",
199
199
  "oxlint": "1.69.0",
200
200
  "oxlint-tsgolint": "0.23.0",
201
201
  "sonda": "0.13.0",
202
202
  "tsdown": "0.22.2",
203
- "typescript": "5.9.3",
203
+ "typescript": "6.0.3",
204
204
  "vitest": "4.1.8",
205
205
  "zinfer": "0.1.8"
206
206
  },