@codize/sdk 0.1.0 → 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/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @codize/sdk
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/@codize/sdk)](https://www.npmjs.com/package/@codize/sdk)
4
- [![GitHub License](https://img.shields.io/github/license/codize-dev/sdk)](./LICENSE)
4
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/codize-dev/sdk/ci-typescript.yml)](https://github.com/codize-dev/sdk/actions/workflows/ci-typescript.yml)
5
+ [![GitHub License](https://img.shields.io/github/license/codize-dev/sdk)](../LICENSE)
5
6
 
6
7
  Official TypeScript SDK for the Codize API.
7
8
 
package/dist/index.d.mts CHANGED
@@ -58,7 +58,7 @@ type SandboxExecuteResponse = {
58
58
  /**
59
59
  * Run-stage output.
60
60
  */
61
- run: SandboxStageResult;
61
+ run: SandboxStageResult | null;
62
62
  };
63
63
  };
64
64
  /**
package/dist/index.mjs CHANGED
@@ -57,6 +57,17 @@ var CodizeApiError = class extends Error {
57
57
  //#endregion
58
58
  //#region src/client.ts
59
59
  /**
60
+ * Maps a raw API stage result to the SDK's camelCase format.
61
+ */
62
+ function mapStageResult(raw) {
63
+ return {
64
+ stdout: raw.stdout,
65
+ stderr: raw.stderr,
66
+ output: raw.output,
67
+ exitCode: raw.exit_code
68
+ };
69
+ }
70
+ /**
60
71
  * API client for Codize.
61
72
  */
62
73
  var CodizeClient = class {
@@ -97,8 +108,8 @@ var CodizeClient = class {
97
108
  return {
98
109
  headers: response.headers,
99
110
  data: {
100
- compile: data.compile,
101
- run: data.run
111
+ compile: data.compile ? mapStageResult(data.compile) : null,
112
+ run: data.run ? mapStageResult(data.run) : null
102
113
  }
103
114
  };
104
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codize/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official TypeScript SDK for the Codize API",
5
5
  "homepage": "https://github.com/codize-dev/sdk",
6
6
  "repository": {
@@ -22,12 +22,14 @@
22
22
  ],
23
23
  "scripts": {
24
24
  "build": "tsdown",
25
- "prepublishOnly": "bun run build"
25
+ "prepublishOnly": "bun run build",
26
+ "test": "vitest run"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@types/bun": "1.3.9",
29
30
  "tsdown": "0.21.0-beta.2",
30
- "typescript": "5.9.3"
31
+ "typescript": "5.9.3",
32
+ "vitest": "4.0.18"
31
33
  },
32
34
  "dependencies": {
33
35
  "valibot": "1.2.0"