@vercel/sandbox 0.0.1 → 0.0.3

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @vercel/sandbox@0.0.1 build /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
2
+ > @vercel/sandbox@0.0.3 build /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
3
3
  > tsc
4
4
 
@@ -0,0 +1,4 @@
1
+
2
+ > @vercel/sandbox@0.0.3 typecheck /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
3
+ > tsc --noEmit
4
+
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vercel/sandbox
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Do not include dev scripts in package output ([#16](https://github.com/vercel/sandbox-sdk/pull/16))
8
+
9
+ ## 0.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Include user-agent HTTP header ([#13](https://github.com/vercel/sandbox-sdk/pull/13))
14
+
3
15
  ## 0.0.1
4
16
 
5
17
  ### Patch Changes
@@ -9,7 +9,9 @@ const base_client_1 = require("./base-client");
9
9
  const validators_1 = require("./validators");
10
10
  const api_error_1 = require("./api-error");
11
11
  const deferred_generator_1 = require("../utils/deferred-generator");
12
+ const version_1 = require("../version");
12
13
  const jsonlines_1 = __importDefault(require("jsonlines"));
14
+ const os_1 = __importDefault(require("os"));
13
15
  class SandboxClient extends base_client_1.APIClient {
14
16
  constructor(params) {
15
17
  super({
@@ -25,6 +27,7 @@ class SandboxClient extends base_client_1.APIClient {
25
27
  query: { teamId: this.teamId, ...params?.query },
26
28
  headers: {
27
29
  "content-type": "application/json",
30
+ "user-agent": `vercel/sandbox/${version_1.VERSION} (Node.js/${process.version}; ${os_1.default.platform()}/${os_1.default.arch()})`,
28
31
  ...params?.headers,
29
32
  },
30
33
  });
@@ -0,0 +1 @@
1
+ export declare const VERSION = "0.0.3";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION = void 0;
4
+ // Autogenerated by inject-version.ts
5
+ exports.VERSION = "0.0.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/sandbox",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,8 +23,10 @@
23
23
  "typescript": "5.8.3"
24
24
  },
25
25
  "scripts": {
26
+ "clean": "rm -rf node_modules dist",
26
27
  "build": "tsc",
27
28
  "typedoc": "typedoc",
28
- "typecheck": "tsc --noEmit"
29
+ "typecheck": "tsc --noEmit",
30
+ "inject-version": "ts-node scripts/inject-version.ts"
29
31
  }
30
32
  }
@@ -0,0 +1,11 @@
1
+ import { version } from "../package.json";
2
+ import { writeFile } from "fs/promises";
3
+ import path from "path";
4
+
5
+ async function main() {
6
+ const outPath = path.resolve(__dirname, "../src/version.ts");
7
+ const content = `// Autogenerated by inject-version.ts\nexport const VERSION = "${version}";\n`;
8
+ await writeFile(outPath, content);
9
+ }
10
+
11
+ main().catch(console.error);
@@ -10,8 +10,10 @@ import {
10
10
  import { Readable } from "stream";
11
11
  import { APIError } from "./api-error";
12
12
  import { createDeferredGenerator } from "../utils/deferred-generator";
13
+ import { VERSION } from "../version";
13
14
  import { z } from "zod";
14
15
  import jsonlines from "jsonlines";
16
+ import os from "os";
15
17
 
16
18
  export class SandboxClient extends APIClient {
17
19
  private teamId: string;
@@ -32,6 +34,7 @@ export class SandboxClient extends APIClient {
32
34
  query: { teamId: this.teamId, ...params?.query },
33
35
  headers: {
34
36
  "content-type": "application/json",
37
+ "user-agent": `vercel/sandbox/${VERSION} (Node.js/${process.version}; ${os.platform()}/${os.arch()})`,
35
38
  ...params?.headers,
36
39
  },
37
40
  });
package/src/version.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Autogenerated by inject-version.ts
2
+ export const VERSION = "0.0.3";
package/tsconfig.json CHANGED
@@ -2,15 +2,12 @@
2
2
  "compilerOptions": {
3
3
  "outDir": "./dist",
4
4
  "esModuleInterop": true,
5
- "lib": [
6
- "ESNext"
7
- ],
5
+ "lib": ["ESNext"],
8
6
  "strict": true,
9
7
  "target": "ES2020",
10
8
  "declaration": true,
11
- "module": "commonjs"
9
+ "module": "commonjs",
10
+ "resolveJsonModule": true
12
11
  },
13
- "include": [
14
- "src/**/*"
15
- ]
12
+ "include": ["src/**/*"]
16
13
  }