@drawcall/run 0.1.1 → 0.1.2
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { JobStatus, RunResult, RunRequest, JobCreatedResponse, JobResponse, RunOptions, RunFinalResult, Event, ConsoleEvent, ScreenshotEvent, SystemEvent, InterceptEvent, ErrorEvent, } from './types.js';
|
|
1
|
+
export type { JobStatus, RunOutput as RunResult, RunRequest, JobCreatedResponse, JobResponse, RunOptions, RunFinalResult, Event, ConsoleEvent, ScreenshotEvent, SystemEvent, InterceptEvent, ErrorEvent, } from './types.js';
|
|
2
2
|
import type { RunOptions, RunFinalResult } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Error thrown when run fails
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,SAAS,EACT,SAAS,IAAI,SAAS,EACtB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,cAAc,EAEd,KAAK,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAA+C,UAAU,EAAE,cAAc,EAAS,MAAM,YAAY,CAAA;AAEhH;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;aACY,KAAK,CAAC,EAAE,MAAM;aAAkB,KAAK,CAAC,EAAE,OAAO;gBAAhF,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,MAAM,YAAA,EAAkB,KAAK,CAAC,EAAE,OAAO,YAAA;CAI7F;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,QAAQ;gBAC5B,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAI7C;AAOD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAyEtE"}
|
package/dist/index.js
CHANGED
|
@@ -89,13 +89,13 @@ export async function run(options) {
|
|
|
89
89
|
const job = (await statusResponse.json());
|
|
90
90
|
switch (job.status) {
|
|
91
91
|
case 'completed':
|
|
92
|
-
if (!job.
|
|
92
|
+
if (!job.output) {
|
|
93
93
|
throw new RunError('Job completed but no result', jobId);
|
|
94
94
|
}
|
|
95
95
|
return {
|
|
96
96
|
jobId,
|
|
97
|
-
events: job.
|
|
98
|
-
stopCause: job.
|
|
97
|
+
events: job.output.events,
|
|
98
|
+
stopCause: job.output.stopCause,
|
|
99
99
|
};
|
|
100
100
|
case 'failed':
|
|
101
101
|
throw new RunError('Job failed', jobId);
|
package/dist/types.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export type Event = ConsoleEvent | ScreenshotEvent | SystemEvent | InterceptEven
|
|
|
62
62
|
/**
|
|
63
63
|
* Result of a successful run
|
|
64
64
|
*/
|
|
65
|
-
export interface
|
|
65
|
+
export interface RunOutput {
|
|
66
66
|
readonly events: readonly Event[];
|
|
67
67
|
readonly stopCause: 'signal_complete' | 'max_duration_reached' | string;
|
|
68
68
|
}
|
|
@@ -78,7 +78,7 @@ export interface JobCreatedResponse {
|
|
|
78
78
|
export interface JobResponse {
|
|
79
79
|
readonly jobId: string;
|
|
80
80
|
readonly status: JobStatus;
|
|
81
|
-
readonly
|
|
81
|
+
readonly output?: RunOutput;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Options for the run function
|