@tailor-platform/sdk 1.6.2 → 1.7.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 +27 -0
- package/dist/{application-4cO5Zvfo.mjs → application-Ba2B5A-w.mjs} +71 -36
- package/dist/application-Ba2B5A-w.mjs.map +1 -0
- package/dist/application-C_MQabII.mjs +5 -0
- package/dist/{auth-0Zh4xp4z.mjs → auth-Co6vu1MY.mjs} +9 -2
- package/dist/{auth-0Zh4xp4z.mjs.map → auth-Co6vu1MY.mjs.map} +1 -1
- package/dist/cli/index.mjs +23 -10
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +128 -20
- package/dist/cli/lib.mjs +4 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +2 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-DjdAxcQn.d.mts → index-BSrVjiPg.d.mts} +27 -3
- package/dist/{index-Dg8SBgrV.d.mts → index-DraFftyF.d.mts} +47 -49
- package/dist/{list-Cgj8IR2N.mjs → list-DArHhlnw.mjs} +3015 -2340
- package/dist/list-DArHhlnw.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/docs/cli/executor.md +117 -0
- package/docs/cli-reference.md +9 -0
- package/package.json +1 -1
- package/dist/application-3rIUD7cq.mjs +0 -5
- package/dist/application-4cO5Zvfo.mjs.map +0 -1
- package/dist/list-Cgj8IR2N.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./../../user-defined.d.ts" />
|
|
2
|
-
import {
|
|
3
|
-
import { U as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-
|
|
2
|
+
import { ht as TailorField, nt as TailorDBType } from "../../index-DraFftyF.mjs";
|
|
3
|
+
import { U as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-BSrVjiPg.mjs";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/test/index.d.ts
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Executor Commands
|
|
2
|
+
|
|
3
|
+
Commands for managing executors and executor jobs.
|
|
4
|
+
|
|
5
|
+
## executor
|
|
6
|
+
|
|
7
|
+
Manage executors and executor jobs.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
tailor-sdk executor <subcommand> [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### executor trigger
|
|
14
|
+
|
|
15
|
+
Trigger an executor manually.
|
|
16
|
+
|
|
17
|
+
Only executors with `incomingWebhook` or `schedule` trigger types can be triggered manually. Executors with `event` trigger types (such as `recordCreated`, `recordUpdated`, `recordDeleted`) cannot be triggered manually.
|
|
18
|
+
|
|
19
|
+
The `--data` and `--header` options are only available for `incomingWebhook` trigger type.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
tailor-sdk executor trigger <executorName> [options]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Arguments:**
|
|
26
|
+
|
|
27
|
+
- `executorName` - Executor name (required)
|
|
28
|
+
|
|
29
|
+
**Options:**
|
|
30
|
+
|
|
31
|
+
- `-d, --data` - Request body (JSON string)
|
|
32
|
+
- `-H, --header` - Request header (format: `Key: Value`, can be specified multiple times)
|
|
33
|
+
- `-W, --wait` - Wait for job completion and downstream execution (workflow/function) if applicable
|
|
34
|
+
- `-i, --interval` - Polling interval when using --wait (default: `3s`)
|
|
35
|
+
- `-l, --logs` - Display function execution logs after completion (requires --wait)
|
|
36
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
37
|
+
- `-p, --profile` - Workspace profile to use
|
|
38
|
+
- `-j, --json` - Output as JSON
|
|
39
|
+
|
|
40
|
+
**Usage Examples:**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Trigger an executor
|
|
44
|
+
tailor-sdk executor trigger my-executor
|
|
45
|
+
|
|
46
|
+
# Trigger with data
|
|
47
|
+
tailor-sdk executor trigger my-executor -d '{"message": "hello"}'
|
|
48
|
+
|
|
49
|
+
# Trigger with data and headers
|
|
50
|
+
tailor-sdk executor trigger my-executor -d '{"message": "hello"}' -H "X-Custom: value" -H "X-Another: value2"
|
|
51
|
+
|
|
52
|
+
# Trigger and wait for completion
|
|
53
|
+
tailor-sdk executor trigger my-executor -W
|
|
54
|
+
|
|
55
|
+
# Trigger, wait, and show logs
|
|
56
|
+
tailor-sdk executor trigger my-executor -W -l
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### executor jobs
|
|
60
|
+
|
|
61
|
+
List or get executor jobs.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
tailor-sdk executor jobs <executorName> [jobId] [options]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Arguments:**
|
|
68
|
+
|
|
69
|
+
- `executorName` - Executor name (required)
|
|
70
|
+
- `jobId` - Job ID (optional, if provided shows job details)
|
|
71
|
+
|
|
72
|
+
**Options:**
|
|
73
|
+
|
|
74
|
+
- `-s, --status` - Filter by status: `PENDING`, `RUNNING`, `SUCCESS`, `FAILED`, `CANCELED` (list mode only)
|
|
75
|
+
- `--limit` - Maximum number of jobs to list (default: `50`, max: `1000`) (list mode only)
|
|
76
|
+
- `--attempts` - Show job attempts (detail mode only)
|
|
77
|
+
- `-W, --wait` - Wait for job completion and downstream execution (detail mode only)
|
|
78
|
+
- `-i, --interval` - Polling interval when using --wait (default: `3s`)
|
|
79
|
+
- `-l, --logs` - Display function execution logs after completion (requires --wait)
|
|
80
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
81
|
+
- `-p, --profile` - Workspace profile to use
|
|
82
|
+
- `-j, --json` - Output as JSON
|
|
83
|
+
|
|
84
|
+
**Usage Examples:**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# List jobs for an executor (default: 50 jobs)
|
|
88
|
+
tailor-sdk executor jobs my-executor
|
|
89
|
+
|
|
90
|
+
# Limit the number of jobs
|
|
91
|
+
tailor-sdk executor jobs my-executor --limit 10
|
|
92
|
+
|
|
93
|
+
# Filter by status
|
|
94
|
+
tailor-sdk executor jobs my-executor -s RUNNING
|
|
95
|
+
|
|
96
|
+
# Get job details
|
|
97
|
+
tailor-sdk executor jobs my-executor <job-id>
|
|
98
|
+
|
|
99
|
+
# Get job details with attempts
|
|
100
|
+
tailor-sdk executor jobs my-executor <job-id> --attempts
|
|
101
|
+
|
|
102
|
+
# Wait for job to complete
|
|
103
|
+
tailor-sdk executor jobs my-executor <job-id> -W
|
|
104
|
+
|
|
105
|
+
# Wait for job with logs
|
|
106
|
+
tailor-sdk executor jobs my-executor <job-id> -W -l
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Downstream Execution Tracking
|
|
110
|
+
|
|
111
|
+
When using `--wait`, the CLI tracks not only the executor job but also any downstream executions:
|
|
112
|
+
|
|
113
|
+
- **Workflow targets**: Waits for the workflow execution to complete (SUCCESS, FAILED, or PENDING_RESUME). Shows real-time status changes and currently running job names during execution (same output as `workflow start --wait`).
|
|
114
|
+
- **Function targets**: Waits for the function execution to complete
|
|
115
|
+
- **Webhook/GraphQL targets**: Only waits for the executor job itself
|
|
116
|
+
|
|
117
|
+
The `--logs` option displays logs from the downstream execution when available.
|
package/docs/cli-reference.md
CHANGED
|
@@ -152,6 +152,15 @@ Commands for managing workflows and executions.
|
|
|
152
152
|
| [workflow executions](./cli/workflow.md#workflow-executions) | List or get executions |
|
|
153
153
|
| [workflow resume](./cli/workflow.md#workflow-resume) | Resume a failed execution |
|
|
154
154
|
|
|
155
|
+
### [Executor Commands](./cli/executor.md)
|
|
156
|
+
|
|
157
|
+
Commands for managing executors and executor jobs.
|
|
158
|
+
|
|
159
|
+
| Command | Description |
|
|
160
|
+
| ------------------------------------------------------ | ---------------------------- |
|
|
161
|
+
| [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually |
|
|
162
|
+
| [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs |
|
|
163
|
+
|
|
155
164
|
### [Secret Commands](./cli/secret.md)
|
|
156
165
|
|
|
157
166
|
Commands for managing secrets and vaults.
|
package/package.json
CHANGED