trigger.dev 0.0.0-prerelease-20240926084729 → 0.0.0-realtime-20240930190059

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.
@@ -22,37 +22,46 @@ export declare class CliApiClient {
22
22
  externals: string[];
23
23
  }>>;
24
24
  getProject(projectRef: string): Promise<ApiResult<{
25
- name: string;
26
25
  id: string;
27
- createdAt: Date;
26
+ externalRef: string;
27
+ name: string;
28
28
  slug: string;
29
+ createdAt: Date;
29
30
  organization: {
30
31
  id: string;
31
- createdAt: Date;
32
32
  slug: string;
33
+ createdAt: Date;
33
34
  title: string;
34
35
  };
35
- externalRef: string;
36
36
  }>>;
37
37
  getProjects(): Promise<ApiResult<{
38
- name: string;
39
38
  id: string;
40
- createdAt: Date;
39
+ externalRef: string;
40
+ name: string;
41
41
  slug: string;
42
+ createdAt: Date;
42
43
  organization: {
43
44
  id: string;
44
- createdAt: Date;
45
45
  slug: string;
46
+ createdAt: Date;
46
47
  title: string;
47
48
  };
48
- externalRef: string;
49
49
  }[]>>;
50
50
  createBackgroundWorker(projectRef: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
51
51
  id: string;
52
- version: string;
53
52
  contentHash: string;
53
+ version: string;
54
54
  }>>;
55
55
  createTaskRunAttempt(runFriendlyId: string): Promise<ApiResult<{
56
+ organization: {
57
+ id: string;
58
+ name: string;
59
+ slug: string;
60
+ };
61
+ queue: {
62
+ id: string;
63
+ name: string;
64
+ };
56
65
  task: {
57
66
  id: string;
58
67
  filePath: string;
@@ -68,38 +77,29 @@ export declare class CliApiClient {
68
77
  };
69
78
  run: {
70
79
  id: string;
80
+ createdAt: Date;
71
81
  payload: string;
72
82
  payloadType: string;
73
83
  tags: string[];
74
84
  isTest: boolean;
75
- createdAt: Date;
76
85
  startedAt: Date;
77
- durationMs: number;
78
86
  costInCents: number;
79
87
  baseCostInCents: number;
88
+ durationMs: number;
80
89
  context?: any;
81
90
  idempotencyKey?: string | undefined;
82
91
  maxAttempts?: number | undefined;
83
92
  version?: string | undefined;
84
93
  metadata?: Record<string, import("@trigger.dev/core/schemas").DeserializedJson> | undefined;
85
94
  };
86
- queue: {
87
- name: string;
88
- id: string;
89
- };
90
95
  environment: {
91
96
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
92
97
  id: string;
93
98
  slug: string;
94
99
  };
95
- organization: {
96
- name: string;
97
- id: string;
98
- slug: string;
99
- };
100
100
  project: {
101
- name: string;
102
101
  id: string;
102
+ name: string;
103
103
  slug: string;
104
104
  ref: string;
105
105
  };
@@ -107,9 +107,9 @@ export declare class CliApiClient {
107
107
  id: string;
108
108
  } | undefined;
109
109
  machine?: {
110
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
110
111
  cpu: number;
111
112
  memory: number;
112
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
113
113
  centsPerMs: number;
114
114
  } | undefined;
115
115
  }>>;
@@ -130,8 +130,8 @@ export declare class CliApiClient {
130
130
  }>>;
131
131
  initializeDeployment(body: InitializeDeploymentRequestBody): Promise<ApiResult<{
132
132
  id: string;
133
- version: string;
134
133
  contentHash: string;
134
+ version: string;
135
135
  shortCode: string;
136
136
  imageTag: string;
137
137
  externalBuildData?: {
@@ -143,8 +143,8 @@ export declare class CliApiClient {
143
143
  }>>;
144
144
  createDeploymentBackgroundWorker(deploymentId: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
145
145
  id: string;
146
- version: string;
147
146
  contentHash: string;
147
+ version: string;
148
148
  }>>;
149
149
  failDeployment(id: string, body: FailDeploymentRequestBody): Promise<ApiResult<{
150
150
  id: string;
@@ -159,8 +159,8 @@ export declare class CliApiClient {
159
159
  getDeployment(deploymentId: string): Promise<ApiResult<{
160
160
  status: "PENDING" | "CANCELED" | "FAILED" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "TIMED_OUT";
161
161
  id: string;
162
- version: string;
163
162
  contentHash: string;
163
+ version: string;
164
164
  shortCode: string;
165
165
  imageReference?: string | null | undefined;
166
166
  errorData?: {
@@ -171,13 +171,13 @@ export declare class CliApiClient {
171
171
  } | null | undefined;
172
172
  worker?: {
173
173
  id: string;
174
- version: string;
175
174
  tasks: {
176
175
  id: string;
176
+ slug: string;
177
177
  filePath: string;
178
178
  exportName: string;
179
- slug: string;
180
179
  }[];
180
+ version: string;
181
181
  } | undefined;
182
182
  }>>;
183
183
  }
@@ -16,6 +16,11 @@ export type BuildWorkerOptions = {
16
16
  forcedExternals?: string[];
17
17
  };
18
18
  export declare function buildWorker(options: BuildWorkerOptions): Promise<{
19
+ packageVersion: string;
20
+ contentHash: string;
21
+ cliPackageVersion: string;
22
+ runtime: "node" | "bun";
23
+ environment: string;
19
24
  deploy: {
20
25
  env?: Record<string, string> | undefined;
21
26
  sync?: {
@@ -23,11 +28,6 @@ export declare function buildWorker(options: BuildWorkerOptions): Promise<{
23
28
  } | undefined;
24
29
  };
25
30
  target: "dev" | "deploy";
26
- packageVersion: string;
27
- cliPackageVersion: string;
28
- contentHash: string;
29
- runtime: "node" | "bun";
30
- environment: string;
31
31
  config: {
32
32
  project: string;
33
33
  dirs: string[];
@@ -1,8 +1,8 @@
1
1
  import { Command } from "commander";
2
2
  import { z } from "zod";
3
3
  declare const DevCommandOptions: z.ZodObject<{
4
- logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "log", "warn", "error", "none"]>>;
5
4
  apiUrl: z.ZodOptional<z.ZodString>;
5
+ logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "log", "warn", "error", "none"]>>;
6
6
  skipTelemetry: z.ZodDefault<z.ZodBoolean>;
7
7
  profile: z.ZodDefault<z.ZodString>;
8
8
  debugOtel: z.ZodDefault<z.ZodBoolean>;
@@ -11,7 +11,7 @@ declare const DevCommandOptions: z.ZodObject<{
11
11
  skipUpdateCheck: z.ZodDefault<z.ZodBoolean>;
12
12
  envFile: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
- logLevel: "error" | "none" | "warn" | "info" | "log" | "debug";
14
+ logLevel: "error" | "none" | "warn" | "info" | "debug" | "log";
15
15
  skipTelemetry: boolean;
16
16
  profile: string;
17
17
  debugOtel: boolean;
@@ -21,8 +21,8 @@ declare const DevCommandOptions: z.ZodObject<{
21
21
  projectRef?: string | undefined;
22
22
  envFile?: string | undefined;
23
23
  }, {
24
- logLevel?: "error" | "none" | "warn" | "info" | "log" | "debug" | undefined;
25
24
  apiUrl?: string | undefined;
25
+ logLevel?: "error" | "none" | "warn" | "info" | "debug" | "log" | undefined;
26
26
  skipTelemetry?: boolean | undefined;
27
27
  profile?: string | undefined;
28
28
  debugOtel?: boolean | undefined;
@@ -47,6 +47,15 @@ export declare class BackgroundWorkerCoordinator {
47
47
  registerWorker(worker: BackgroundWorker): Promise<void>;
48
48
  close(): void;
49
49
  executeTaskRun(id: string, payload: TaskRunExecutionPayload, messageId: string): Promise<{
50
+ id: string;
51
+ outputType: string;
52
+ ok: true;
53
+ output?: string | undefined;
54
+ usage?: {
55
+ durationMs: number;
56
+ } | undefined;
57
+ } | {
58
+ id: string;
50
59
  error: {
51
60
  message: string;
52
61
  type: "BUILT_IN_ERROR";
@@ -59,30 +68,21 @@ export declare class BackgroundWorkerCoordinator {
59
68
  type: "STRING_ERROR";
60
69
  raw: string;
61
70
  } | {
62
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_CRASHED" | "TASK_RUN_HEARTBEAT_TIMEOUT";
71
+ code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED";
63
72
  type: "INTERNAL_ERROR";
64
73
  message?: string | undefined;
65
74
  stackTrace?: string | undefined;
66
75
  };
67
- id: string;
68
76
  ok: false;
69
77
  retry?: {
70
- timestamp: number;
71
78
  delay: number;
79
+ timestamp: number;
72
80
  error?: unknown;
73
81
  } | undefined;
74
82
  skippedRetrying?: boolean | undefined;
75
83
  usage?: {
76
84
  durationMs: number;
77
85
  } | undefined;
78
- } | {
79
- id: string;
80
- ok: true;
81
- outputType: string;
82
- output?: string | undefined;
83
- usage?: {
84
- durationMs: number;
85
- } | undefined;
86
86
  } | undefined>;
87
87
  }
88
88
  export type BackgroundWorkerOptions = {
@@ -43,6 +43,15 @@ export declare class TaskRunProcess {
43
43
  get isTest(): boolean;
44
44
  get payload(): {
45
45
  execution: {
46
+ organization: {
47
+ id: string;
48
+ name: string;
49
+ slug: string;
50
+ };
51
+ queue: {
52
+ id: string;
53
+ name: string;
54
+ };
46
55
  task: {
47
56
  id: string;
48
57
  filePath: string;
@@ -58,38 +67,29 @@ export declare class TaskRunProcess {
58
67
  };
59
68
  run: {
60
69
  id: string;
70
+ createdAt: Date;
61
71
  payload: string;
62
72
  payloadType: string;
63
73
  tags: string[];
64
74
  isTest: boolean;
65
- createdAt: Date;
66
75
  startedAt: Date;
67
- durationMs: number;
68
76
  costInCents: number;
69
77
  baseCostInCents: number;
78
+ durationMs: number;
70
79
  context?: any;
71
80
  idempotencyKey?: string | undefined;
72
81
  maxAttempts?: number | undefined;
73
82
  version?: string | undefined;
74
83
  metadata?: Record<string, import("@trigger.dev/core/schemas").DeserializedJson> | undefined;
75
84
  };
76
- queue: {
77
- name: string;
78
- id: string;
79
- };
80
85
  environment: {
81
86
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
82
87
  id: string;
83
88
  slug: string;
84
89
  };
85
- organization: {
86
- name: string;
87
- id: string;
88
- slug: string;
89
- };
90
90
  project: {
91
- name: string;
92
91
  id: string;
92
+ name: string;
93
93
  slug: string;
94
94
  ref: string;
95
95
  };
@@ -97,9 +97,9 @@ export declare class TaskRunProcess {
97
97
  id: string;
98
98
  } | undefined;
99
99
  machine?: {
100
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
100
101
  cpu: number;
101
102
  memory: number;
102
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
103
103
  centsPerMs: number;
104
104
  } | undefined;
105
105
  };
@@ -62,8 +62,8 @@ export declare function indexWorkerManifest({ runtime, indexWorkerPath, buildMan
62
62
  randomize?: boolean | undefined;
63
63
  } | undefined;
64
64
  machine?: {
65
- cpu?: 2 | 1 | 0.25 | 0.5 | 4 | undefined;
66
- memory?: 2 | 1 | 0.25 | 0.5 | 4 | 8 | undefined;
65
+ cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
66
+ memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
67
67
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
68
68
  } | undefined;
69
69
  triggerSource?: string | undefined;
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.0.0-prerelease-20240926084729";
1
+ export const VERSION = "0.0.0-realtime-20240930190059";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trigger.dev",
3
- "version": "0.0.0-prerelease-20240926084729",
3
+ "version": "0.0.0-realtime-20240930190059",
4
4
  "description": "A Command-Line Interface for Trigger.dev (v3) projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -80,8 +80,8 @@
80
80
  "@opentelemetry/sdk-trace-base": "1.25.1",
81
81
  "@opentelemetry/sdk-trace-node": "1.25.1",
82
82
  "@opentelemetry/semantic-conventions": "1.25.1",
83
- "@trigger.dev/build": "0.0.0-prerelease-20240926084729",
84
- "@trigger.dev/core": "0.0.0-prerelease-20240926084729",
83
+ "@trigger.dev/build": "0.0.0-realtime-20240930190059",
84
+ "@trigger.dev/core": "0.0.0-realtime-20240930190059",
85
85
  "c12": "^1.11.1",
86
86
  "chalk": "^5.2.0",
87
87
  "cli-table3": "^0.6.3",