@tailor-platform/sdk 1.10.1 → 1.11.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 +10 -0
- package/dist/cli/index.mjs +24 -18
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +60 -2
- package/dist/cli/lib.mjs +2 -2
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +2 -2
- package/dist/{index-BQw6I-mY.d.mts → index-D8zIUsWi.d.mts} +2 -2
- package/dist/{index-CoqePlnt.d.mts → index-DcOTucF6.d.mts} +7 -7
- package/dist/{update-Exhc9AkY.mjs → update-D0muqqOP.mjs} +542 -171
- package/dist/update-D0muqqOP.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/docs/cli/executor.md +183 -52
- package/package.json +1 -1
- package/dist/update-Exhc9AkY.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./../../user-defined.d.ts" />
|
|
2
|
-
import { et as TailorDBType, mt as TailorField } from "../../index-
|
|
3
|
-
import { W as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-
|
|
2
|
+
import { et as TailorDBType, mt as TailorField } from "../../index-DcOTucF6.mjs";
|
|
3
|
+
import { W as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-D8zIUsWi.mjs";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/test/index.d.ts
|
package/docs/cli/executor.md
CHANGED
|
@@ -6,7 +6,7 @@ Commands for managing executors and executor jobs.
|
|
|
6
6
|
|
|
7
7
|
## executor
|
|
8
8
|
|
|
9
|
-
Manage executors
|
|
9
|
+
Manage executors
|
|
10
10
|
|
|
11
11
|
**Usage**
|
|
12
12
|
|
|
@@ -18,65 +18,63 @@ tailor-sdk executor [command]
|
|
|
18
18
|
|
|
19
19
|
| Command | Description |
|
|
20
20
|
| --------------------------------------- | ----------------------------- |
|
|
21
|
+
| [`executor list`](#executor-list) | List all executors |
|
|
22
|
+
| [`executor get`](#executor-get) | Get executor details |
|
|
21
23
|
| [`executor jobs`](#executor-jobs) | List or get executor jobs. |
|
|
22
24
|
| [`executor trigger`](#executor-trigger) | Trigger an executor manually. |
|
|
25
|
+
| [`executor webhook`](#executor-webhook) | Manage executor webhooks |
|
|
23
26
|
|
|
24
27
|
<!-- politty:command:executor:end -->
|
|
25
|
-
<!-- politty:command:executor trigger:start -->
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
<!-- politty:command:executor list:start -->
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
### executor list
|
|
32
|
+
|
|
33
|
+
List all executors
|
|
30
34
|
|
|
31
35
|
**Usage**
|
|
32
36
|
|
|
33
37
|
```
|
|
34
|
-
tailor-sdk executor
|
|
38
|
+
tailor-sdk executor list [options]
|
|
35
39
|
```
|
|
36
40
|
|
|
37
|
-
**
|
|
41
|
+
**Options**
|
|
38
42
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| `
|
|
43
|
+
| Option | Alias | Description | Default |
|
|
44
|
+
| ------------------------------- | ----- | ----------------- | ------- |
|
|
45
|
+
| `--json` | `-j` | Output as JSON | `false` |
|
|
46
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | - |
|
|
47
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | - |
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
<!-- politty:command:executor list:end -->
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
| ------------------------------- | ----- | ---------------------------------------------------------------------------------- | ------- |
|
|
47
|
-
| `--json` | `-j` | Output as JSON | `false` |
|
|
48
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | - |
|
|
49
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile | - |
|
|
50
|
-
| `--data <DATA>` | `-d` | Request body (JSON string) | - |
|
|
51
|
-
| `--header <HEADER>` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | - |
|
|
52
|
-
| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | `false` |
|
|
53
|
-
| `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | `"3s"` |
|
|
54
|
-
| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | `false` |
|
|
51
|
+
<!-- politty:command:executor get:start -->
|
|
55
52
|
|
|
56
|
-
|
|
53
|
+
### executor get
|
|
57
54
|
|
|
58
|
-
|
|
55
|
+
Get executor details
|
|
59
56
|
|
|
60
|
-
|
|
57
|
+
**Usage**
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
```
|
|
60
|
+
tailor-sdk executor get [options] <name>
|
|
61
|
+
```
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
# Trigger an executor
|
|
66
|
-
tailor-sdk executor trigger my-executor
|
|
63
|
+
**Arguments**
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
| Argument | Description | Required |
|
|
66
|
+
| -------- | ------------- | -------- |
|
|
67
|
+
| `name` | Executor name | Yes |
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
tailor-sdk executor trigger my-executor -d '{"message": "hello"}' -H "X-Custom: value" -H "X-Another: value2"
|
|
69
|
+
**Options**
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
| Option | Alias | Description | Default |
|
|
72
|
+
| ------------------------------- | ----- | ----------------- | ------- |
|
|
73
|
+
| `--json` | `-j` | Output as JSON | `false` |
|
|
74
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | - |
|
|
75
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | - |
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
tailor-sdk executor trigger my-executor -W -l
|
|
79
|
-
```
|
|
77
|
+
<!-- politty:command:executor get:end -->
|
|
80
78
|
|
|
81
79
|
<!-- politty:command:executor jobs:start -->
|
|
82
80
|
|
|
@@ -111,34 +109,123 @@ tailor-sdk executor jobs [options] <executorName> [jobId]
|
|
|
111
109
|
| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | `false` |
|
|
112
110
|
| `--limit <LIMIT>` | - | Maximum number of jobs to list (default: 50, max: 1000) (list mode only) | - |
|
|
113
111
|
|
|
112
|
+
**Examples**
|
|
113
|
+
|
|
114
|
+
**List jobs for an executor (default: 50 jobs)**
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
$ tailor-sdk executor jobs my-executor
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Limit the number of jobs**
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
$ tailor-sdk executor jobs my-executor --limit 10
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Filter by status**
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
$ tailor-sdk executor jobs my-executor -s RUNNING
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Get job details**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
$ tailor-sdk executor jobs my-executor <job-id>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Get job details with attempts**
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
$ tailor-sdk executor jobs my-executor <job-id> --attempts
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Wait for job to complete**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
$ tailor-sdk executor jobs my-executor <job-id> -W
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Wait for job with logs**
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
$ tailor-sdk executor jobs my-executor <job-id> -W -l
|
|
154
|
+
```
|
|
155
|
+
|
|
114
156
|
<!-- politty:command:executor jobs:end -->
|
|
115
157
|
|
|
116
|
-
|
|
158
|
+
<!-- politty:command:executor trigger:start -->
|
|
159
|
+
|
|
160
|
+
### executor trigger
|
|
161
|
+
|
|
162
|
+
Trigger an executor manually.
|
|
163
|
+
|
|
164
|
+
**Usage**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
tailor-sdk executor trigger [options] <executorName>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Arguments**
|
|
171
|
+
|
|
172
|
+
| Argument | Description | Required |
|
|
173
|
+
| -------------- | ------------- | -------- |
|
|
174
|
+
| `executorName` | Executor name | Yes |
|
|
175
|
+
|
|
176
|
+
**Options**
|
|
177
|
+
|
|
178
|
+
| Option | Alias | Description | Default |
|
|
179
|
+
| ------------------------------- | ----- | ---------------------------------------------------------------------------------- | ------- |
|
|
180
|
+
| `--json` | `-j` | Output as JSON | `false` |
|
|
181
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | - |
|
|
182
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | - |
|
|
183
|
+
| `--data <DATA>` | `-d` | Request body (JSON string) | - |
|
|
184
|
+
| `--header <HEADER>` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | - |
|
|
185
|
+
| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | `false` |
|
|
186
|
+
| `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | `"3s"` |
|
|
187
|
+
| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | `false` |
|
|
188
|
+
|
|
189
|
+
**Examples**
|
|
190
|
+
|
|
191
|
+
**Trigger an executor**
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
$ tailor-sdk executor trigger my-executor
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Trigger with data**
|
|
117
198
|
|
|
118
199
|
```bash
|
|
119
|
-
|
|
120
|
-
|
|
200
|
+
$ tailor-sdk executor trigger my-executor -d '{"message": "hello"}'
|
|
201
|
+
```
|
|
121
202
|
|
|
122
|
-
|
|
123
|
-
tailor-sdk executor jobs my-executor --limit 10
|
|
203
|
+
**Trigger with data and headers**
|
|
124
204
|
|
|
125
|
-
|
|
126
|
-
tailor-sdk executor
|
|
205
|
+
```bash
|
|
206
|
+
$ tailor-sdk executor trigger my-executor -d '{"message": "hello"}' -H "X-Custom: value" -H "X-Another: value2"
|
|
207
|
+
```
|
|
127
208
|
|
|
128
|
-
|
|
129
|
-
tailor-sdk executor jobs my-executor <job-id>
|
|
209
|
+
**Trigger and wait for completion**
|
|
130
210
|
|
|
131
|
-
|
|
132
|
-
tailor-sdk executor
|
|
211
|
+
```bash
|
|
212
|
+
$ tailor-sdk executor trigger my-executor -W
|
|
213
|
+
```
|
|
133
214
|
|
|
134
|
-
|
|
135
|
-
tailor-sdk executor jobs my-executor <job-id> -W
|
|
215
|
+
**Trigger, wait, and show logs**
|
|
136
216
|
|
|
137
|
-
|
|
138
|
-
tailor-sdk executor
|
|
217
|
+
```bash
|
|
218
|
+
$ tailor-sdk executor trigger my-executor -W -l
|
|
139
219
|
```
|
|
140
220
|
|
|
141
|
-
|
|
221
|
+
**Notes**
|
|
222
|
+
|
|
223
|
+
Only executors with `INCOMING_WEBHOOK` or `SCHEDULE` trigger types can be triggered manually.
|
|
224
|
+
Executors with `EVENT` trigger types (such as `recordCreated`, `recordUpdated`, `recordDeleted`) cannot be triggered manually.
|
|
225
|
+
|
|
226
|
+
The `--data` and `--header` options are only available for `INCOMING_WEBHOOK` trigger type.
|
|
227
|
+
|
|
228
|
+
**Downstream Execution Tracking**
|
|
142
229
|
|
|
143
230
|
When using `--wait`, the CLI tracks not only the executor job but also any downstream executions:
|
|
144
231
|
|
|
@@ -147,3 +234,47 @@ When using `--wait`, the CLI tracks not only the executor job but also any downs
|
|
|
147
234
|
- **Webhook/GraphQL targets**: Only waits for the executor job itself
|
|
148
235
|
|
|
149
236
|
The `--logs` option displays logs from the downstream execution when available.
|
|
237
|
+
|
|
238
|
+
<!-- politty:command:executor trigger:end -->
|
|
239
|
+
|
|
240
|
+
<!-- politty:command:executor webhook:start -->
|
|
241
|
+
|
|
242
|
+
### executor webhook
|
|
243
|
+
|
|
244
|
+
Manage executor webhooks
|
|
245
|
+
|
|
246
|
+
**Usage**
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
tailor-sdk executor webhook [command]
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Commands**
|
|
253
|
+
|
|
254
|
+
| Command | Description |
|
|
255
|
+
| ------------------------------------------------- | --------------------------------------------- |
|
|
256
|
+
| [`executor webhook list`](#executor-webhook-list) | List executors with incoming webhook triggers |
|
|
257
|
+
|
|
258
|
+
<!-- politty:command:executor webhook:end -->
|
|
259
|
+
|
|
260
|
+
<!-- politty:command:executor webhook list:start -->
|
|
261
|
+
|
|
262
|
+
#### executor webhook list
|
|
263
|
+
|
|
264
|
+
List executors with incoming webhook triggers
|
|
265
|
+
|
|
266
|
+
**Usage**
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
tailor-sdk executor webhook list [options]
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Options**
|
|
273
|
+
|
|
274
|
+
| Option | Alias | Description | Default |
|
|
275
|
+
| ------------------------------- | ----- | ----------------- | ------- |
|
|
276
|
+
| `--json` | `-j` | Output as JSON | `false` |
|
|
277
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | - |
|
|
278
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | - |
|
|
279
|
+
|
|
280
|
+
<!-- politty:command:executor webhook list:end -->
|