trigger.dev 0.0.0-v3-prerelease-20250108142426 → 0.0.0-v4-prerelease-20250916125920
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/README.md +28 -1
- package/dist/esm/apiClient.d.ts +158 -74
- package/dist/esm/apiClient.js +341 -76
- package/dist/esm/apiClient.js.map +1 -1
- package/dist/esm/build/buildWorker.d.ts +10 -6
- package/dist/esm/build/buildWorker.js +22 -38
- package/dist/esm/build/buildWorker.js.map +1 -1
- package/dist/esm/build/bundle.d.ts +18 -1
- package/dist/esm/build/bundle.js +142 -52
- package/dist/esm/build/bundle.js.map +1 -1
- package/dist/esm/build/entryPoints.d.ts +12 -0
- package/dist/esm/build/entryPoints.js +127 -0
- package/dist/esm/build/entryPoints.js.map +1 -0
- package/dist/esm/build/extensions.js +17 -0
- package/dist/esm/build/extensions.js.map +1 -1
- package/dist/esm/build/externals.js +184 -2
- package/dist/esm/build/externals.js.map +1 -1
- package/dist/esm/build/packageModules.d.ts +15 -5
- package/dist/esm/build/packageModules.js +154 -36
- package/dist/esm/build/packageModules.js.map +1 -1
- package/dist/esm/cli/common.d.ts +1 -1
- package/dist/esm/cli/common.js +38 -45
- package/dist/esm/cli/common.js.map +1 -1
- package/dist/esm/cli/index.js +19 -3
- package/dist/esm/cli/index.js.map +1 -1
- package/dist/esm/commands/analyze.d.ts +23 -0
- package/dist/esm/commands/analyze.js +122 -0
- package/dist/esm/commands/analyze.js.map +1 -0
- package/dist/esm/commands/deploy.d.ts +5 -2
- package/dist/esm/commands/deploy.js +271 -160
- package/dist/esm/commands/deploy.js.map +1 -1
- package/dist/esm/commands/dev.d.ts +36 -6
- package/dist/esm/commands/dev.js +71 -2
- package/dist/esm/commands/dev.js.map +1 -1
- package/dist/esm/commands/env.d.ts +2 -0
- package/dist/esm/commands/env.js +298 -0
- package/dist/esm/commands/env.js.map +1 -0
- package/dist/esm/commands/init.d.ts +9 -1
- package/dist/esm/commands/init.js +132 -65
- package/dist/esm/commands/init.js.map +1 -1
- package/dist/esm/commands/install-mcp.d.ts +50 -0
- package/dist/esm/commands/install-mcp.js +497 -0
- package/dist/esm/commands/install-mcp.js.map +1 -0
- package/dist/esm/commands/install-rules.d.ts +11 -0
- package/dist/esm/commands/install-rules.js +381 -0
- package/dist/esm/commands/install-rules.js.map +1 -0
- package/dist/esm/commands/list-profiles.d.ts +3 -7
- package/dist/esm/commands/list-profiles.js +7 -4
- package/dist/esm/commands/list-profiles.js.map +1 -1
- package/dist/esm/commands/login.d.ts +9 -5
- package/dist/esm/commands/login.js +40 -7
- package/dist/esm/commands/login.js.map +1 -1
- package/dist/esm/commands/logout.d.ts +1 -1
- package/dist/esm/commands/mcp.d.ts +38 -0
- package/dist/esm/commands/mcp.js +82 -0
- package/dist/esm/commands/mcp.js.map +1 -0
- package/dist/esm/commands/preview.d.ts +5 -0
- package/dist/esm/commands/preview.js +93 -0
- package/dist/esm/commands/preview.js.map +1 -0
- package/dist/esm/commands/promote.d.ts +3 -0
- package/dist/esm/commands/promote.js +86 -0
- package/dist/esm/commands/promote.js.map +1 -0
- package/dist/esm/commands/switch.d.ts +19 -0
- package/dist/esm/commands/switch.js +93 -0
- package/dist/esm/commands/switch.js.map +1 -0
- package/dist/esm/commands/trigger.d.ts +33 -0
- package/dist/esm/commands/trigger.js +88 -0
- package/dist/esm/commands/trigger.js.map +1 -0
- package/dist/esm/commands/update.d.ts +3 -2
- package/dist/esm/commands/update.js +23 -9
- package/dist/esm/commands/update.js.map +1 -1
- package/dist/esm/commands/whoami.d.ts +12 -1
- package/dist/esm/commands/whoami.js +36 -6
- package/dist/esm/commands/whoami.js.map +1 -1
- package/dist/esm/commands/workers/build.d.ts +4 -0
- package/dist/esm/commands/workers/build.js +345 -0
- package/dist/esm/commands/workers/build.js.map +1 -0
- package/dist/esm/commands/workers/create.d.ts +2 -0
- package/dist/esm/commands/workers/create.js +91 -0
- package/dist/esm/commands/workers/create.js.map +1 -0
- package/dist/esm/commands/workers/index.d.ts +2 -0
- package/dist/esm/commands/workers/index.js +13 -0
- package/dist/esm/commands/workers/index.js.map +1 -0
- package/dist/esm/commands/workers/list.d.ts +2 -0
- package/dist/esm/commands/workers/list.js +80 -0
- package/dist/esm/commands/workers/list.js.map +1 -0
- package/dist/esm/commands/workers/run.d.ts +2 -0
- package/dist/esm/commands/workers/run.js +105 -0
- package/dist/esm/commands/workers/run.js.map +1 -0
- package/dist/esm/config.d.ts +2 -1
- package/dist/esm/config.js +35 -8
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/deploy/buildImage.d.ts +12 -11
- package/dist/esm/deploy/buildImage.js +360 -115
- package/dist/esm/deploy/buildImage.js.map +1 -1
- package/dist/esm/dev/backgroundWorker.d.ts +6 -245
- package/dist/esm/dev/backgroundWorker.js +11 -320
- package/dist/esm/dev/backgroundWorker.js.map +1 -1
- package/dist/esm/dev/devOutput.js +48 -9
- package/dist/esm/dev/devOutput.js.map +1 -1
- package/dist/esm/dev/devSession.d.ts +2 -1
- package/dist/esm/dev/devSession.js +68 -65
- package/dist/esm/dev/devSession.js.map +1 -1
- package/dist/esm/dev/devSupervisor.d.ts +12 -0
- package/dist/esm/dev/devSupervisor.js +568 -0
- package/dist/esm/dev/devSupervisor.js.map +1 -0
- package/dist/esm/dev/lock.d.ts +1 -0
- package/dist/esm/dev/lock.js +80 -0
- package/dist/esm/dev/lock.js.map +1 -0
- package/dist/esm/dev/mcpServer.d.ts +10 -0
- package/dist/esm/dev/mcpServer.js +201 -0
- package/dist/esm/dev/mcpServer.js.map +1 -0
- package/dist/esm/dev/taskRunProcessPool.d.ts +39 -0
- package/dist/esm/dev/taskRunProcessPool.js +220 -0
- package/dist/esm/dev/taskRunProcessPool.js.map +1 -0
- package/dist/esm/dev/workerRuntime.d.ts +2 -2
- package/dist/esm/dev/workerRuntime.js +1 -265
- package/dist/esm/dev/workerRuntime.js.map +1 -1
- package/dist/esm/entryPoints/dev-index-worker.js +45 -8
- package/dist/esm/entryPoints/dev-index-worker.js.map +1 -1
- package/dist/esm/entryPoints/dev-run-controller.d.ts +58 -0
- package/dist/esm/entryPoints/dev-run-controller.js +652 -0
- package/dist/esm/entryPoints/dev-run-controller.js.map +1 -0
- package/dist/esm/entryPoints/dev-run-worker.js +394 -199
- package/dist/esm/entryPoints/dev-run-worker.js.map +1 -1
- package/dist/esm/entryPoints/managed/controller.d.ts +63 -0
- package/dist/esm/entryPoints/managed/controller.js +482 -0
- package/dist/esm/entryPoints/managed/controller.js.map +1 -0
- package/dist/esm/entryPoints/managed/env.d.ts +170 -0
- package/dist/esm/entryPoints/managed/env.js +199 -0
- package/dist/esm/entryPoints/managed/env.js.map +1 -0
- package/dist/esm/entryPoints/managed/execution.d.ts +141 -0
- package/dist/esm/entryPoints/managed/execution.js +869 -0
- package/dist/esm/entryPoints/managed/execution.js.map +1 -0
- package/dist/esm/entryPoints/managed/logger.d.ts +30 -0
- package/dist/esm/entryPoints/managed/logger.js +47 -0
- package/dist/esm/entryPoints/managed/logger.js.map +1 -0
- package/dist/esm/entryPoints/managed/notifier.d.ts +30 -0
- package/dist/esm/entryPoints/managed/notifier.js +63 -0
- package/dist/esm/entryPoints/managed/notifier.js.map +1 -0
- package/dist/esm/entryPoints/managed/overrides.d.ts +18 -0
- package/dist/esm/entryPoints/managed/overrides.js +19 -0
- package/dist/esm/entryPoints/managed/overrides.js.map +1 -0
- package/dist/esm/entryPoints/managed/poller.d.ts +31 -0
- package/dist/esm/entryPoints/managed/poller.js +89 -0
- package/dist/esm/entryPoints/managed/poller.js.map +1 -0
- package/dist/esm/entryPoints/managed/snapshot.d.ts +54 -0
- package/dist/esm/entryPoints/managed/snapshot.js +293 -0
- package/dist/esm/entryPoints/managed/snapshot.js.map +1 -0
- package/dist/esm/entryPoints/managed/taskRunProcessProvider.d.ts +62 -0
- package/dist/esm/entryPoints/managed/taskRunProcessProvider.js +252 -0
- package/dist/esm/entryPoints/managed/taskRunProcessProvider.js.map +1 -0
- package/dist/esm/entryPoints/{deploy-index-controller.js → managed-index-controller.js} +27 -3
- package/dist/esm/entryPoints/managed-index-controller.js.map +1 -0
- package/dist/esm/entryPoints/{deploy-index-worker.js → managed-index-worker.js} +50 -21
- package/dist/esm/entryPoints/managed-index-worker.js.map +1 -0
- package/dist/esm/entryPoints/managed-run-controller.js +13 -0
- package/dist/esm/entryPoints/managed-run-controller.js.map +1 -0
- package/dist/esm/entryPoints/managed-run-worker.js +512 -0
- package/dist/esm/entryPoints/managed-run-worker.js.map +1 -0
- package/dist/esm/executions/taskRunProcess.d.ts +28 -82
- package/dist/esm/executions/taskRunProcess.js +130 -74
- package/dist/esm/executions/taskRunProcess.js.map +1 -1
- package/dist/esm/indexing/indexWorkerManifest.d.ts +21 -5
- package/dist/esm/indexing/indexWorkerManifest.js +4 -4
- package/dist/esm/indexing/indexWorkerManifest.js.map +1 -1
- package/dist/esm/indexing/registerResources.d.ts +5 -0
- package/dist/esm/indexing/registerResources.js +44 -0
- package/dist/esm/indexing/registerResources.js.map +1 -0
- package/dist/esm/mcp/auth.d.ts +12 -0
- package/dist/esm/mcp/auth.js +152 -0
- package/dist/esm/mcp/auth.js.map +1 -0
- package/dist/esm/mcp/capabilities.d.ts +4 -0
- package/dist/esm/mcp/capabilities.js +22 -0
- package/dist/esm/mcp/capabilities.js.map +1 -0
- package/dist/esm/mcp/config.d.ts +82 -0
- package/dist/esm/mcp/config.js +87 -0
- package/dist/esm/mcp/config.js.map +1 -0
- package/dist/esm/mcp/context.d.ts +45 -0
- package/dist/esm/mcp/context.js +129 -0
- package/dist/esm/mcp/context.js.map +1 -0
- package/dist/esm/mcp/formatters.d.ts +7 -0
- package/dist/esm/mcp/formatters.js +330 -0
- package/dist/esm/mcp/formatters.js.map +1 -0
- package/dist/esm/mcp/logger.d.ts +11 -0
- package/dist/esm/mcp/logger.js +34 -0
- package/dist/esm/mcp/logger.js.map +1 -0
- package/dist/esm/mcp/mintlifyClient.d.ts +1 -0
- package/dist/esm/mcp/mintlifyClient.js +65 -0
- package/dist/esm/mcp/mintlifyClient.js.map +1 -0
- package/dist/esm/mcp/schemas.d.ts +324 -0
- package/dist/esm/mcp/schemas.js +144 -0
- package/dist/esm/mcp/schemas.js.map +1 -0
- package/dist/esm/mcp/tools/deploys.d.ts +174 -0
- package/dist/esm/mcp/tools/deploys.js +161 -0
- package/dist/esm/mcp/tools/deploys.js.map +1 -0
- package/dist/esm/mcp/tools/docs.d.ts +77 -0
- package/dist/esm/mcp/tools/docs.js +18 -0
- package/dist/esm/mcp/tools/docs.js.map +1 -0
- package/dist/esm/mcp/tools/orgs.d.ts +172 -0
- package/dist/esm/mcp/tools/orgs.js +172 -0
- package/dist/esm/mcp/tools/orgs.js.map +1 -0
- package/dist/esm/mcp/tools/previewBranches.d.ts +78 -0
- package/dist/esm/mcp/tools/previewBranches.js +28 -0
- package/dist/esm/mcp/tools/previewBranches.js.map +1 -0
- package/dist/esm/mcp/tools/runs.d.ts +335 -0
- package/dist/esm/mcp/tools/runs.js +160 -0
- package/dist/esm/mcp/tools/runs.js.map +1 -0
- package/dist/esm/mcp/tools/tasks.d.ts +200 -0
- package/dist/esm/mcp/tools/tasks.js +117 -0
- package/dist/esm/mcp/tools/tasks.js.map +1 -0
- package/dist/esm/mcp/tools.d.ts +2 -0
- package/dist/esm/mcp/tools.js +40 -0
- package/dist/esm/mcp/tools.js.map +1 -0
- package/dist/esm/mcp/types.d.ts +6 -0
- package/dist/esm/mcp/types.js +2 -0
- package/dist/esm/mcp/types.js.map +1 -0
- package/dist/esm/mcp/utils.d.ts +89 -0
- package/dist/esm/mcp/utils.js +95 -0
- package/dist/esm/mcp/utils.js.map +1 -0
- package/dist/esm/rules/install.d.ts +1 -0
- package/dist/esm/rules/install.js +2 -0
- package/dist/esm/rules/install.js.map +1 -0
- package/dist/esm/rules/manifest.d.ts +145 -0
- package/dist/esm/rules/manifest.js +110 -0
- package/dist/esm/rules/manifest.js.map +1 -0
- package/dist/esm/rules/types.d.ts +3 -0
- package/dist/esm/rules/types.js +3 -0
- package/dist/esm/rules/types.js.map +1 -0
- package/dist/esm/utilities/accessTokens.d.ts +12 -0
- package/dist/esm/utilities/accessTokens.js +30 -0
- package/dist/esm/utilities/accessTokens.js.map +1 -0
- package/dist/esm/utilities/analyze.d.ts +13 -0
- package/dist/esm/utilities/analyze.js +463 -0
- package/dist/esm/utilities/analyze.js.map +1 -0
- package/dist/esm/utilities/cliOutput.d.ts +6 -1
- package/dist/esm/utilities/cliOutput.js +11 -2
- package/dist/esm/utilities/cliOutput.js.map +1 -1
- package/dist/esm/utilities/configFiles.d.ts +65 -15
- package/dist/esm/utilities/configFiles.js +124 -26
- package/dist/esm/utilities/configFiles.js.map +1 -1
- package/dist/esm/utilities/eventBus.d.ts +7 -3
- package/dist/esm/utilities/eventBus.js.map +1 -1
- package/dist/esm/utilities/fileSystem.d.ts +7 -1
- package/dist/esm/utilities/fileSystem.js +42 -4
- package/dist/esm/utilities/fileSystem.js.map +1 -1
- package/dist/esm/utilities/gitMeta.d.ts +2 -0
- package/dist/esm/utilities/gitMeta.js +220 -0
- package/dist/esm/utilities/gitMeta.js.map +1 -0
- package/dist/esm/utilities/githubActions.d.ts +4 -0
- package/dist/esm/utilities/githubActions.js +18 -0
- package/dist/esm/utilities/githubActions.js.map +1 -0
- package/dist/esm/utilities/initialBanner.js +18 -6
- package/dist/esm/utilities/initialBanner.js.map +1 -1
- package/dist/esm/utilities/localEnvVars.d.ts +3 -0
- package/dist/esm/utilities/localEnvVars.js +19 -0
- package/dist/esm/utilities/localEnvVars.js.map +1 -0
- package/dist/esm/utilities/sanitizeEnvVars.d.ts +16 -3
- package/dist/esm/utilities/sanitizeEnvVars.js +15 -0
- package/dist/esm/utilities/sanitizeEnvVars.js.map +1 -1
- package/dist/esm/utilities/session.d.ts +14 -0
- package/dist/esm/utilities/session.js +44 -47
- package/dist/esm/utilities/session.js.map +1 -1
- package/dist/esm/utilities/supportsHyperlinks.d.ts +15 -0
- package/dist/esm/utilities/supportsHyperlinks.js +122 -0
- package/dist/esm/utilities/supportsHyperlinks.js.map +1 -0
- package/dist/esm/utilities/tempDirectories.d.ts +1 -0
- package/dist/esm/utilities/tempDirectories.js +19 -2
- package/dist/esm/utilities/tempDirectories.js.map +1 -1
- package/dist/esm/utilities/terminalLink.d.ts +56 -0
- package/dist/esm/utilities/terminalLink.js +76 -0
- package/dist/esm/utilities/terminalLink.js.map +1 -0
- package/dist/esm/utilities/windows.js +51 -1
- package/dist/esm/utilities/windows.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +44 -25
- package/dist/esm/entryPoints/deploy-index-controller.js.map +0 -1
- package/dist/esm/entryPoints/deploy-index-worker.js.map +0 -1
- package/dist/esm/entryPoints/deploy-run-controller.js +0 -1099
- package/dist/esm/entryPoints/deploy-run-controller.js.map +0 -1
- package/dist/esm/entryPoints/deploy-run-worker.js +0 -366
- package/dist/esm/entryPoints/deploy-run-worker.js.map +0 -1
- package/dist/esm/indexing/registerTasks.d.ts +0 -2
- package/dist/esm/indexing/registerTasks.js +0 -62
- package/dist/esm/indexing/registerTasks.js.map +0 -1
- package/dist/esm/telemetry/tracing.d.ts +0 -3
- package/dist/esm/telemetry/tracing.js +0 -58
- package/dist/esm/telemetry/tracing.js.map +0 -1
- /package/dist/esm/entryPoints/{deploy-index-controller.d.ts → managed-index-controller.d.ts} +0 -0
- /package/dist/esm/entryPoints/{deploy-index-worker.d.ts → managed-index-worker.d.ts} +0 -0
- /package/dist/esm/entryPoints/{deploy-run-controller.d.ts → managed-run-controller.d.ts} +0 -0
- /package/dist/esm/entryPoints/{deploy-run-worker.d.ts → managed-run-worker.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/3f5ad4c1-c4c8-4277-b622-290e7f37bd00/public">
|
|
5
|
+
<img alt="Trigger.dev logo" src="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/trigger.dev)
|
|
9
|
+
[](https://www.npmjs.com/package/trigger.dev)
|
|
10
|
+
[](https://github.com/triggerdotdev/trigger.dev)
|
|
11
|
+
[](https://www.typescriptlang.org/)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
[](https://github.com/triggerdotdev/trigger.dev)
|
|
14
|
+
|
|
15
|
+
[Discord](https://trigger.dev/discord) | [Website](https://trigger.dev) | [Issues](https://github.com/triggerdotdev/trigger.dev/issues) | [Docs](https://trigger.dev/docs) | [Examples](https://trigger.dev/docs/examples)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
1
19
|
# Trigger.dev CLI
|
|
2
20
|
|
|
3
21
|
A CLI that allows you to create, run locally and deploy Trigger.dev background tasks.
|
|
4
22
|
|
|
5
23
|
Note: this only works with Trigger.dev v3 projects and later. For older projects use the [@trigger.dev/cli](https://www.npmjs.com/package/@trigger.dev/cli) package.
|
|
6
24
|
|
|
7
|
-
Trigger.dev
|
|
25
|
+
## About Trigger.dev
|
|
26
|
+
|
|
27
|
+
Trigger.dev is an open source platform for building and deploying fully-managed AI agents and workflows. Write workflows in normal async TypeScript for everything from simple tasks to long-running AI agents, heavy media processing, complex real-time systems and more. Complete with full observability, managed queues, and elastic infrastructure which handles the horizontal scaling.
|
|
8
28
|
|
|
9
29
|
## Commands
|
|
10
30
|
|
|
@@ -17,8 +37,15 @@ Trigger.dev is an open source platform that makes it easy to create event-driven
|
|
|
17
37
|
| [whoami](https://trigger.dev/docs/cli-whoami-commands) | Display the current logged in user and project details. |
|
|
18
38
|
| [logout](https://trigger.dev/docs/cli-logout-commands) | Logout of Trigger.dev. |
|
|
19
39
|
| [list-profiles](https://trigger.dev/docs/cli-list-profiles-commands) | List all of your CLI profiles. |
|
|
40
|
+
| [preview archive](https://trigger.dev/docs/cli-preview-archive) | Archive a preview branch. |
|
|
41
|
+
| [promote](https://trigger.dev/docs/cli-promote-commands) | Promote a previously deployed version to the current version. |
|
|
42
|
+
| [switch](https://trigger.dev/docs/cli-switch) | Switch between CLI profiles. |
|
|
20
43
|
| [update](https://trigger.dev/docs/cli-update-commands) | Updates all `@trigger.dev/*` packages to match the CLI version. |
|
|
21
44
|
|
|
45
|
+
## CLI documentation
|
|
46
|
+
|
|
47
|
+
For more information on the CLI, please refer to our [docs](https://trigger.dev/docs/cli-introduction).
|
|
48
|
+
|
|
22
49
|
## Support
|
|
23
50
|
|
|
24
51
|
If you have any questions, please reach out to us on [Discord](https://trigger.dev/discord) and we'll be happy to help.
|
package/dist/esm/apiClient.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { CreateBackgroundWorkerRequestBody,
|
|
1
|
+
import { CreateBackgroundWorkerRequestBody, DevConfigResponseBody, DevDequeueRequestBody, DevDequeueResponseBody, FailDeploymentRequestBody, FailDeploymentResponseBody, FinalizeDeploymentRequestBody, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, StartDeploymentIndexingRequestBody, TriggerTaskRequestBody, UpsertBranchRequestBody, WorkersCreateRequestBody, CreateProjectRequestBody, GetJWTRequestBody } from "@trigger.dev/core/v3";
|
|
2
|
+
import { WorkloadDebugLogRequestBody, WorkloadHeartbeatRequestBody, WorkloadHeartbeatResponseBody, WorkloadRunAttemptCompleteRequestBody, WorkloadRunAttemptCompleteResponseBody, WorkloadRunAttemptStartResponseBody, WorkloadRunLatestSnapshotResponseBody } from "@trigger.dev/core/v3/workers";
|
|
3
|
+
import { ApiResult } from "@trigger.dev/core/v3/zodfetch";
|
|
4
|
+
import { EventSource } from "eventsource";
|
|
2
5
|
export declare class CliApiClient {
|
|
3
6
|
readonly apiURL: string;
|
|
4
7
|
readonly accessToken?: string | undefined;
|
|
5
|
-
|
|
8
|
+
readonly branch?: string | undefined;
|
|
9
|
+
private engineURL;
|
|
10
|
+
constructor(apiURL: string, accessToken?: string | undefined, branch?: string | undefined);
|
|
6
11
|
createAuthorizationCode(): Promise<ApiResult<{
|
|
7
12
|
url: string;
|
|
8
13
|
authorizationCode: string;
|
|
@@ -13,10 +18,15 @@ export declare class CliApiClient {
|
|
|
13
18
|
obfuscatedToken: string;
|
|
14
19
|
} | null;
|
|
15
20
|
}>>;
|
|
16
|
-
whoAmI(): Promise<ApiResult<{
|
|
21
|
+
whoAmI(projectRef?: string): Promise<ApiResult<{
|
|
17
22
|
userId: string;
|
|
18
23
|
email: string;
|
|
19
24
|
dashboardUrl: string;
|
|
25
|
+
project?: {
|
|
26
|
+
url: string;
|
|
27
|
+
name: string;
|
|
28
|
+
orgTitle: string;
|
|
29
|
+
} | undefined;
|
|
20
30
|
}>>;
|
|
21
31
|
retrieveExternals(): Promise<ApiResult<{
|
|
22
32
|
externals: string[];
|
|
@@ -47,72 +57,55 @@ export declare class CliApiClient {
|
|
|
47
57
|
};
|
|
48
58
|
externalRef: string;
|
|
49
59
|
}[]>>;
|
|
50
|
-
|
|
60
|
+
getOrgs(): Promise<ApiResult<{
|
|
51
61
|
id: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
number: number;
|
|
63
|
-
status: string;
|
|
64
|
-
id: string;
|
|
65
|
-
startedAt: Date;
|
|
66
|
-
backgroundWorkerId: string;
|
|
67
|
-
backgroundWorkerTaskId: string;
|
|
68
|
-
};
|
|
69
|
-
run: {
|
|
70
|
-
payload: string;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
slug: string;
|
|
64
|
+
title: string;
|
|
65
|
+
}[]>>;
|
|
66
|
+
createProject(orgParam: string, body: CreateProjectRequestBody): Promise<ApiResult<{
|
|
67
|
+
name: string;
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
slug: string;
|
|
71
|
+
organization: {
|
|
71
72
|
id: string;
|
|
72
|
-
payloadType: string;
|
|
73
|
-
tags: string[];
|
|
74
|
-
isTest: boolean;
|
|
75
73
|
createdAt: Date;
|
|
76
|
-
startedAt: Date;
|
|
77
|
-
durationMs: number;
|
|
78
|
-
costInCents: number;
|
|
79
|
-
baseCostInCents: number;
|
|
80
|
-
metadata?: Record<string, import("@trigger.dev/core/schemas").DeserializedJson> | undefined;
|
|
81
|
-
context?: any;
|
|
82
|
-
idempotencyKey?: string | undefined;
|
|
83
|
-
maxAttempts?: number | undefined;
|
|
84
|
-
version?: string | undefined;
|
|
85
|
-
maxDuration?: number | undefined;
|
|
86
|
-
};
|
|
87
|
-
queue: {
|
|
88
|
-
name: string;
|
|
89
|
-
id: string;
|
|
90
|
-
};
|
|
91
|
-
environment: {
|
|
92
|
-
type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
|
|
93
|
-
id: string;
|
|
94
74
|
slug: string;
|
|
75
|
+
title: string;
|
|
95
76
|
};
|
|
96
|
-
|
|
97
|
-
|
|
77
|
+
externalRef: string;
|
|
78
|
+
}>>;
|
|
79
|
+
getWorkerByTag(projectRef: string, envName: string, tagName?: string): Promise<ApiResult<{
|
|
80
|
+
worker: {
|
|
98
81
|
id: string;
|
|
99
|
-
|
|
82
|
+
version: string;
|
|
83
|
+
tasks: {
|
|
84
|
+
id: string;
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
filePath: string;
|
|
87
|
+
slug: string;
|
|
88
|
+
triggerSource: string;
|
|
89
|
+
payloadSchema?: any;
|
|
90
|
+
}[];
|
|
91
|
+
engine?: string | null | undefined;
|
|
92
|
+
sdkVersion?: string | null | undefined;
|
|
93
|
+
cliVersion?: string | null | undefined;
|
|
100
94
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
id: string;
|
|
104
|
-
slug: string;
|
|
105
|
-
ref: string;
|
|
95
|
+
urls: {
|
|
96
|
+
runs: string;
|
|
106
97
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
98
|
+
}>>;
|
|
99
|
+
getJWT(projectRef: string, envName: string, body: GetJWTRequestBody): Promise<ApiResult<{
|
|
100
|
+
token: string;
|
|
101
|
+
}>>;
|
|
102
|
+
getDevStatus(projectRef: string): Promise<ApiResult<{
|
|
103
|
+
isConnected: boolean;
|
|
104
|
+
}>>;
|
|
105
|
+
createBackgroundWorker(projectRef: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
|
|
106
|
+
id: string;
|
|
107
|
+
version: string;
|
|
108
|
+
contentHash: string;
|
|
116
109
|
}>>;
|
|
117
110
|
getProjectEnv({ projectRef, env }: {
|
|
118
111
|
projectRef: string;
|
|
@@ -123,6 +116,24 @@ export declare class CliApiClient {
|
|
|
123
116
|
apiUrl: string;
|
|
124
117
|
projectId: string;
|
|
125
118
|
}>>;
|
|
119
|
+
upsertBranch(projectRef: string, body: UpsertBranchRequestBody): Promise<ApiResult<{
|
|
120
|
+
id: string;
|
|
121
|
+
}>>;
|
|
122
|
+
archiveBranch(projectRef: string, branch: string): Promise<ApiResult<{
|
|
123
|
+
branch: {
|
|
124
|
+
id: string;
|
|
125
|
+
};
|
|
126
|
+
}>>;
|
|
127
|
+
listBranches(projectRef: string): Promise<ApiResult<{
|
|
128
|
+
branches: {
|
|
129
|
+
name: string;
|
|
130
|
+
id: string;
|
|
131
|
+
createdAt: Date;
|
|
132
|
+
updatedAt: Date;
|
|
133
|
+
isPaused: boolean;
|
|
134
|
+
git?: Record<string, any> | undefined;
|
|
135
|
+
}[];
|
|
136
|
+
}>>;
|
|
126
137
|
getEnvironmentVariables(projectRef: string): Promise<ApiResult<{
|
|
127
138
|
variables: Record<string, string>;
|
|
128
139
|
}>>;
|
|
@@ -132,15 +143,15 @@ export declare class CliApiClient {
|
|
|
132
143
|
initializeDeployment(body: InitializeDeploymentRequestBody): Promise<ApiResult<{
|
|
133
144
|
id: string;
|
|
134
145
|
version: string;
|
|
146
|
+
shortCode: string;
|
|
135
147
|
contentHash: string;
|
|
136
148
|
imageTag: string;
|
|
137
|
-
|
|
149
|
+
imagePlatform: string;
|
|
138
150
|
externalBuildData?: {
|
|
139
151
|
projectId: string;
|
|
140
152
|
buildId: string;
|
|
141
153
|
buildToken: string;
|
|
142
154
|
} | null | undefined;
|
|
143
|
-
registryHost?: string | undefined;
|
|
144
155
|
}>>;
|
|
145
156
|
createDeploymentBackgroundWorker(deploymentId: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
|
|
146
157
|
id: string;
|
|
@@ -150,8 +161,11 @@ export declare class CliApiClient {
|
|
|
150
161
|
failDeployment(id: string, body: FailDeploymentRequestBody): Promise<ApiResult<{
|
|
151
162
|
id: string;
|
|
152
163
|
}>>;
|
|
153
|
-
finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody): Promise<ApiResult<
|
|
164
|
+
finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody, onLog?: (message: string) => void): Promise<ApiResult<FailDeploymentResponseBody>>;
|
|
165
|
+
promoteDeployment(version: string): Promise<ApiResult<{
|
|
154
166
|
id: string;
|
|
167
|
+
version: string;
|
|
168
|
+
shortCode: string;
|
|
155
169
|
}>>;
|
|
156
170
|
startDeploymentIndexing(deploymentId: string, body: StartDeploymentIndexingRequestBody): Promise<ApiResult<{
|
|
157
171
|
id: string;
|
|
@@ -161,19 +175,25 @@ export declare class CliApiClient {
|
|
|
161
175
|
status: "CANCELED" | "FAILED" | "TIMED_OUT" | "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED";
|
|
162
176
|
id: string;
|
|
163
177
|
version: string;
|
|
164
|
-
contentHash: string;
|
|
165
178
|
shortCode: string;
|
|
179
|
+
contentHash: string;
|
|
180
|
+
imagePlatform: string;
|
|
166
181
|
worker?: {
|
|
167
182
|
id: string;
|
|
168
183
|
version: string;
|
|
169
184
|
tasks: {
|
|
170
185
|
id: string;
|
|
171
186
|
filePath: string;
|
|
172
|
-
exportName: string;
|
|
173
187
|
slug: string;
|
|
188
|
+
exportName?: string | undefined;
|
|
174
189
|
}[];
|
|
175
190
|
} | undefined;
|
|
176
191
|
imageReference?: string | null | undefined;
|
|
192
|
+
externalBuildData?: {
|
|
193
|
+
projectId: string;
|
|
194
|
+
buildId: string;
|
|
195
|
+
buildToken: string;
|
|
196
|
+
} | null | undefined;
|
|
177
197
|
errorData?: {
|
|
178
198
|
message: string;
|
|
179
199
|
name: string;
|
|
@@ -181,12 +201,76 @@ export declare class CliApiClient {
|
|
|
181
201
|
stderr?: string | undefined;
|
|
182
202
|
} | null | undefined;
|
|
183
203
|
}>>;
|
|
204
|
+
triggerTaskRun(taskId: string, body?: TriggerTaskRequestBody): Promise<ApiResult<{
|
|
205
|
+
id: string;
|
|
206
|
+
isCached?: boolean | undefined;
|
|
207
|
+
}>>;
|
|
208
|
+
get dev(): {
|
|
209
|
+
readonly config: () => Promise<ApiResult<DevConfigResponseBody>>;
|
|
210
|
+
readonly presenceConnection: () => EventSource;
|
|
211
|
+
readonly dequeue: (body: DevDequeueRequestBody) => Promise<ApiResult<DevDequeueResponseBody>>;
|
|
212
|
+
readonly sendDebugLog: (runId: string, body: WorkloadDebugLogRequestBody) => Promise<ApiResult<unknown>>;
|
|
213
|
+
readonly getRunExecutionData: (runId: string) => Promise<ApiResult<WorkloadRunLatestSnapshotResponseBody>>;
|
|
214
|
+
readonly heartbeatRun: (runId: string, snapshotId: string, body: WorkloadHeartbeatRequestBody) => Promise<ApiResult<WorkloadHeartbeatResponseBody>>;
|
|
215
|
+
readonly startRunAttempt: (runId: string, snapshotId: string) => Promise<ApiResult<WorkloadRunAttemptStartResponseBody>>;
|
|
216
|
+
readonly completeRunAttempt: (runId: string, snapshotId: string, body: WorkloadRunAttemptCompleteRequestBody) => Promise<ApiResult<WorkloadRunAttemptCompleteResponseBody>>;
|
|
217
|
+
readonly setEngineURL: (engineURL: string) => void;
|
|
218
|
+
};
|
|
219
|
+
get workers(): {
|
|
220
|
+
list: () => Promise<ApiResult<{
|
|
221
|
+
type: string;
|
|
222
|
+
name: string;
|
|
223
|
+
updatedAt: Date;
|
|
224
|
+
isDefault: boolean;
|
|
225
|
+
description?: string | null | undefined;
|
|
226
|
+
latestVersion?: string | null | undefined;
|
|
227
|
+
lastHeartbeatAt?: string | null | undefined;
|
|
228
|
+
}[]>>;
|
|
229
|
+
create: (options: WorkersCreateRequestBody) => Promise<ApiResult<{
|
|
230
|
+
token: {
|
|
231
|
+
plaintext: string;
|
|
232
|
+
};
|
|
233
|
+
workerGroup: {
|
|
234
|
+
name: string;
|
|
235
|
+
description?: string | null | undefined;
|
|
236
|
+
};
|
|
237
|
+
}>>;
|
|
238
|
+
};
|
|
239
|
+
get deployments(): {
|
|
240
|
+
unmanaged: {
|
|
241
|
+
latest: () => Promise<ApiResult<{
|
|
242
|
+
status: "CANCELED" | "FAILED" | "TIMED_OUT" | "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED";
|
|
243
|
+
id: string;
|
|
244
|
+
version: string;
|
|
245
|
+
shortCode: string;
|
|
246
|
+
contentHash: string;
|
|
247
|
+
imagePlatform: string;
|
|
248
|
+
imageReference?: string | null | undefined;
|
|
249
|
+
externalBuildData?: {
|
|
250
|
+
projectId: string;
|
|
251
|
+
buildId: string;
|
|
252
|
+
buildToken: string;
|
|
253
|
+
} | null | undefined;
|
|
254
|
+
errorData?: {
|
|
255
|
+
message: string;
|
|
256
|
+
name: string;
|
|
257
|
+
stack?: string | undefined;
|
|
258
|
+
stderr?: string | undefined;
|
|
259
|
+
} | null | undefined;
|
|
260
|
+
}>>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
private getLatestUnmanagedDeployment;
|
|
264
|
+
private listWorkers;
|
|
265
|
+
private createWorker;
|
|
266
|
+
private devConfig;
|
|
267
|
+
private devPresenceConnection;
|
|
268
|
+
private devDequeue;
|
|
269
|
+
private devSendDebugLog;
|
|
270
|
+
private devGetRunExecutionData;
|
|
271
|
+
private devHeartbeatRun;
|
|
272
|
+
private devStartRunAttempt;
|
|
273
|
+
private devCompleteRunAttempt;
|
|
274
|
+
private setEngineURL;
|
|
275
|
+
private getHeaders;
|
|
184
276
|
}
|
|
185
|
-
type ApiResult<TSuccessResult> = {
|
|
186
|
-
success: true;
|
|
187
|
-
data: TSuccessResult;
|
|
188
|
-
} | {
|
|
189
|
-
success: false;
|
|
190
|
-
error: string;
|
|
191
|
-
};
|
|
192
|
-
export {};
|