@codize/sdk 0.1.1 → 0.2.0

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.mts CHANGED
@@ -58,9 +58,13 @@ type SandboxExecuteResponse = {
58
58
  /**
59
59
  * Run-stage output.
60
60
  */
61
- run: SandboxStageResult;
61
+ run: SandboxStageResult | null;
62
62
  };
63
63
  };
64
+ /**
65
+ * Execution status of a sandbox stage.
66
+ */
67
+ type SandboxStageStatus = "SUCCESS" | "RUNTIME_ERROR" | "SIGNAL" | "TIMEOUT" | "OUTPUT_LIMIT_EXCEEDED" | "ERROR_LIMIT_EXCEEDED" | (string & {});
64
68
  /**
65
69
  * Output for a single sandbox stage (compile or run).
66
70
  */
@@ -81,6 +85,14 @@ type SandboxStageResult = {
81
85
  * Process exit code.
82
86
  */
83
87
  exitCode: number | null;
88
+ /**
89
+ * Signal name that terminated the process, or null if not terminated by a signal.
90
+ */
91
+ signal: string | null;
92
+ /**
93
+ * Execution status.
94
+ */
95
+ status: SandboxStageStatus;
84
96
  };
85
97
  /**
86
98
  * API client for Codize.
@@ -188,4 +200,4 @@ declare class CodizeApiError extends Error {
188
200
  constructor(status: number, headers: Headers, response: ApiErrorResponse);
189
201
  }
190
202
  //#endregion
191
- export { type ApiErrorCode, type ApiErrorDetails, type ApiErrorResponse, CodizeApiError, CodizeClient, type CodizeClientOptions, type SandboxExecuteRequest, type SandboxExecuteResponse, type SandboxStageResult };
203
+ export { type ApiErrorCode, type ApiErrorDetails, type ApiErrorResponse, CodizeApiError, CodizeClient, type CodizeClientOptions, type SandboxExecuteRequest, type SandboxExecuteResponse, type SandboxStageResult, type SandboxStageStatus };
package/dist/index.mjs CHANGED
@@ -64,7 +64,9 @@ function mapStageResult(raw) {
64
64
  stdout: raw.stdout,
65
65
  stderr: raw.stderr,
66
66
  output: raw.output,
67
- exitCode: raw.exit_code
67
+ exitCode: raw.exit_code,
68
+ signal: raw.signal,
69
+ status: raw.status
68
70
  };
69
71
  }
70
72
  /**
@@ -109,7 +111,7 @@ var CodizeClient = class {
109
111
  headers: response.headers,
110
112
  data: {
111
113
  compile: data.compile ? mapStageResult(data.compile) : null,
112
- run: mapStageResult(data.run)
114
+ run: data.run ? mapStageResult(data.run) : null
113
115
  }
114
116
  };
115
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codize/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Official TypeScript SDK for the Codize API",
5
5
  "homepage": "https://github.com/codize-dev/sdk",
6
6
  "repository": {