@trigger.dev/sdk 4.6.0 → 4.6.1
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/dist/commonjs/version.js
CHANGED
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "4.6.
|
|
1
|
+
export const VERSION = "4.6.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CLI env commands"
|
|
3
|
+
sidebarTitle: "env"
|
|
4
|
+
description: "List, get, set, and pull environment variables for a Trigger.dev project."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommonOptions from "/snippets/cli-options-common.mdx";
|
|
8
|
+
import ConfigFileOptions from "/snippets/cli-options-config-file.mdx";
|
|
9
|
+
import ProjectRefOptions from "/snippets/cli-options-project-ref.mdx";
|
|
10
|
+
import BranchOptions from "/snippets/cli-options-branch.mdx";
|
|
11
|
+
|
|
12
|
+
These commands manage environment variables on a project environment. They default to `prod`. Use `--env staging` or `--env preview` (with `--branch`) for the other environments. There is no `dev` target: local `trigger dev` reads your local `.env`.
|
|
13
|
+
|
|
14
|
+
<CodeGroup>
|
|
15
|
+
|
|
16
|
+
```bash npm
|
|
17
|
+
npx trigger.dev@latest env list
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```bash pnpm
|
|
21
|
+
pnpm dlx trigger.dev@latest env list
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash yarn
|
|
25
|
+
yarn dlx trigger.dev@latest env list
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
</CodeGroup>
|
|
29
|
+
|
|
30
|
+
## env list
|
|
31
|
+
|
|
32
|
+
Lists user-set environment variables. `TRIGGER_` system variables are omitted. Values are hidden unless you pass `--show-values`.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx trigger.dev@latest env list
|
|
36
|
+
npx trigger.dev@latest env list --show-values
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
<ParamField body="Show values" type="--show-values">
|
|
40
|
+
Print the actual values, including secrets.
|
|
41
|
+
</ParamField>
|
|
42
|
+
|
|
43
|
+
## env get
|
|
44
|
+
|
|
45
|
+
Prints one variable. `--raw` prints only the value, with no banner or extra text, so you can capture it in a script.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx trigger.dev@latest env get MY_VAR
|
|
49
|
+
npx trigger.dev@latest env get MY_VAR --raw
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
<ParamField body="Name" type="<name>">
|
|
53
|
+
The name of the environment variable.
|
|
54
|
+
</ParamField>
|
|
55
|
+
|
|
56
|
+
<ParamField body="Raw" type="--raw">
|
|
57
|
+
Print only the value.
|
|
58
|
+
</ParamField>
|
|
59
|
+
|
|
60
|
+
## env set
|
|
61
|
+
|
|
62
|
+
Creates the variable if it does not exist, and overwrites the value if it does. Empty or whitespace-only values are rejected.
|
|
63
|
+
|
|
64
|
+
Updating an existing secret without `--secret` changes the value and leaves it secret. Pass `--secret` when you first create a secret, or when you want a non-secret variable to become one.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx trigger.dev@latest env set MY_VAR my-value
|
|
68
|
+
npx trigger.dev@latest env set STRIPE_KEY sk_live_abc --secret
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<ParamField body="Name" type="<name>">
|
|
72
|
+
The name of the environment variable.
|
|
73
|
+
</ParamField>
|
|
74
|
+
|
|
75
|
+
<ParamField body="Value" type="<value>">
|
|
76
|
+
The value to set. Cannot be empty.
|
|
77
|
+
</ParamField>
|
|
78
|
+
|
|
79
|
+
<ParamField body="Secret" type="--secret">
|
|
80
|
+
Store the value as a secret, so it cannot be read back.
|
|
81
|
+
</ParamField>
|
|
82
|
+
|
|
83
|
+
## env pull
|
|
84
|
+
|
|
85
|
+
Writes the project's environment variables to a local file. Defaults to `.env.local`. Fails if the file already exists unless you pass `--force`.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx trigger.dev@latest env pull
|
|
89
|
+
npx trigger.dev@latest env pull --output .env.trigger --force
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
<ParamField body="Output" type="-o, --output <file>">
|
|
93
|
+
The file to write. Defaults to `.env.local`.
|
|
94
|
+
</ParamField>
|
|
95
|
+
|
|
96
|
+
<ParamField body="Force" type="--force">
|
|
97
|
+
Overwrite the output file if it exists.
|
|
98
|
+
</ParamField>
|
|
99
|
+
|
|
100
|
+
## Options
|
|
101
|
+
|
|
102
|
+
<ParamField body="Environment" type="--env | -e">
|
|
103
|
+
The environment to use: `prod`, `staging` or `preview`. Defaults to `prod`.
|
|
104
|
+
</ParamField>
|
|
105
|
+
|
|
106
|
+
<ConfigFileOptions />
|
|
107
|
+
<ProjectRefOptions />
|
|
108
|
+
<BranchOptions />
|
|
109
|
+
|
|
110
|
+
### Common options
|
|
111
|
+
|
|
112
|
+
These options are available on most commands.
|
|
113
|
+
|
|
114
|
+
<CommonOptions />
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CLI projects commands"
|
|
3
|
+
sidebarTitle: "projects"
|
|
4
|
+
description: "Create, inspect, and rename Trigger.dev projects from the terminal."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommonOptions from "/snippets/cli-options-common.mdx";
|
|
8
|
+
|
|
9
|
+
These commands act on the organizations and projects your account can access, so run
|
|
10
|
+
[`login`](/cli-login-commands) first.
|
|
11
|
+
|
|
12
|
+
## projects create
|
|
13
|
+
|
|
14
|
+
Creates a project. You are prompted for the organization and name when the options are omitted.
|
|
15
|
+
|
|
16
|
+
<CodeGroup>
|
|
17
|
+
|
|
18
|
+
```bash npm
|
|
19
|
+
npx trigger.dev@latest projects create
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash pnpm
|
|
23
|
+
pnpm dlx trigger.dev@latest projects create
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash yarn
|
|
27
|
+
yarn dlx trigger.dev@latest projects create
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
</CodeGroup>
|
|
31
|
+
|
|
32
|
+
<ParamField body="Organization" type="--org | -o">
|
|
33
|
+
The organization slug or ID to create the project in.
|
|
34
|
+
</ParamField>
|
|
35
|
+
|
|
36
|
+
<ParamField body="Name" type="--name | -n">
|
|
37
|
+
The name of the new project.
|
|
38
|
+
</ParamField>
|
|
39
|
+
|
|
40
|
+
## projects get
|
|
41
|
+
|
|
42
|
+
Prints the name, ref, slug, organization, default runtime and region of a project.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx trigger.dev@latest projects get proj_abc123
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## projects rename
|
|
49
|
+
|
|
50
|
+
Renames a project. The project ref does not change.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx trigger.dev@latest projects rename proj_abc123 "My new name"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Options
|
|
57
|
+
|
|
58
|
+
### Common options
|
|
59
|
+
|
|
60
|
+
These options are available on most commands.
|
|
61
|
+
|
|
62
|
+
<CommonOptions />
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CLI runs commands"
|
|
3
|
+
sidebarTitle: "runs"
|
|
4
|
+
description: "Use these commands to list, inspect, replay and cancel runs from your terminal."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommonOptions from "/snippets/cli-options-common.mdx";
|
|
8
|
+
import ConfigFileOptions from "/snippets/cli-options-config-file.mdx";
|
|
9
|
+
import ProjectRefOptions from "/snippets/cli-options-project-ref.mdx";
|
|
10
|
+
import BranchOptions from "/snippets/cli-options-branch.mdx";
|
|
11
|
+
|
|
12
|
+
## runs list
|
|
13
|
+
|
|
14
|
+
Lists runs, newest first, in a table of ID, task, status, version, created time and duration.
|
|
15
|
+
|
|
16
|
+
<CodeGroup>
|
|
17
|
+
|
|
18
|
+
```bash npm
|
|
19
|
+
npx trigger.dev@latest runs list
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash pnpm
|
|
23
|
+
pnpm dlx trigger.dev@latest runs list
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash yarn
|
|
27
|
+
yarn dlx trigger.dev@latest runs list
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
</CodeGroup>
|
|
31
|
+
|
|
32
|
+
<ParamField body="Limit" type="--limit">
|
|
33
|
+
The number of runs to list, up to 100. Defaults to 20.
|
|
34
|
+
</ParamField>
|
|
35
|
+
|
|
36
|
+
<ParamField body="Status" type="--status">
|
|
37
|
+
Only show runs with this status, e.g. `FAILED`.
|
|
38
|
+
</ParamField>
|
|
39
|
+
|
|
40
|
+
<ParamField body="Task" type="--task">
|
|
41
|
+
Only show runs for this task identifier.
|
|
42
|
+
</ParamField>
|
|
43
|
+
|
|
44
|
+
<ParamField body="Tag" type="--tag">
|
|
45
|
+
Only show runs with this tag.
|
|
46
|
+
</ParamField>
|
|
47
|
+
|
|
48
|
+
<ParamField body="Cursor" type="--cursor">
|
|
49
|
+
The pagination cursor printed at the end of the previous page.
|
|
50
|
+
</ParamField>
|
|
51
|
+
|
|
52
|
+
## runs get
|
|
53
|
+
|
|
54
|
+
Prints the status, version, tags, timings, duration, cost and error of a single run.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx trigger.dev@latest runs get run_abc123
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## runs replay
|
|
61
|
+
|
|
62
|
+
Triggers a new run with the same payload as an existing one, using the latest version of the task.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx trigger.dev@latest runs replay run_abc123
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## runs cancel
|
|
69
|
+
|
|
70
|
+
Cancels a run that has not finished yet. You are asked to confirm first.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx trigger.dev@latest runs cancel run_abc123
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
<ParamField body="Skip confirmation" type="--yes | -y">
|
|
77
|
+
Cancel without the confirmation prompt. Required in non-interactive environments such as CI.
|
|
78
|
+
</ParamField>
|
|
79
|
+
|
|
80
|
+
## Options
|
|
81
|
+
|
|
82
|
+
<ParamField body="Environment" type="--env | -e">
|
|
83
|
+
The environment to use: `dev`, `prod`, `staging` or `preview`. Defaults to `prod`.
|
|
84
|
+
</ParamField>
|
|
85
|
+
|
|
86
|
+
<ConfigFileOptions />
|
|
87
|
+
<ProjectRefOptions />
|
|
88
|
+
<BranchOptions />
|
|
89
|
+
|
|
90
|
+
### Common options
|
|
91
|
+
|
|
92
|
+
These options are available on most commands.
|
|
93
|
+
|
|
94
|
+
<CommonOptions />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigger.dev/sdk",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.1",
|
|
4
4
|
"description": "trigger.dev Node.JS SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@opentelemetry/api": "1.9.1",
|
|
71
71
|
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
72
|
-
"@trigger.dev/core": "4.6.
|
|
72
|
+
"@trigger.dev/core": "4.6.1",
|
|
73
73
|
"uncrypto": "^0.1.3"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|