@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 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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,SAAS,EACT,SAAS,EACT,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"}
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.result) {
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.result.events,
98
- stopCause: job.result.stopCause,
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 RunResult {
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 result?: RunResult;
81
+ readonly output?: RunOutput;
82
82
  }
83
83
  /**
84
84
  * Options for the run function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawcall/run",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [