@vercel/sandbox 0.0.10 → 0.0.11

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.10 build /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
2
+ > @vercel/sandbox@0.0.11 build /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
3
3
  > tsc
4
4
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @vercel/sandbox@0.0.10 typecheck /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
2
+ > @vercel/sandbox@0.0.11 typecheck /home/runner/work/sandbox-sdk/sandbox-sdk/packages/sandbox
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vercel/sandbox
2
2
 
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Rename `stream` to `content` when writing files ([#60](https://github.com/vercel/sandbox-sdk/pull/60))
8
+
3
9
  ## 0.0.10
4
10
 
5
11
  ### Patch Changes
@@ -119,7 +119,7 @@ export declare class APIClient extends BaseClient {
119
119
  sandboxId: string;
120
120
  files: {
121
121
  path: string;
122
- stream: Buffer;
122
+ content: Buffer;
123
123
  }[];
124
124
  }): Promise<void>;
125
125
  readFile(params: {
@@ -98,7 +98,7 @@ class APIClient extends base_client_1.BaseClient {
98
98
  sandboxId: params.sandboxId,
99
99
  });
100
100
  for (const file of params.files) {
101
- await writer.addFile({ name: file.path, content: file.stream });
101
+ await writer.addFile({ name: file.path, content: file.content });
102
102
  }
103
103
  writer.end();
104
104
  await (0, base_client_1.parseOrThrow)(validators_1.EmptyResponse, await response);
package/dist/sandbox.d.ts CHANGED
@@ -201,7 +201,7 @@ export declare class Sandbox {
201
201
  */
202
202
  writeFiles(files: {
203
203
  path: string;
204
- stream: Buffer;
204
+ content: Buffer;
205
205
  }[]): Promise<void>;
206
206
  /**
207
207
  * Get the public domain of a port of this sandbox.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.10";
1
+ export declare const VERSION = "0.0.11";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Autogenerated by inject-version.ts
5
- exports.VERSION = "0.0.10";
5
+ exports.VERSION = "0.0.11";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/sandbox",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -174,14 +174,14 @@ export class APIClient extends BaseClient {
174
174
 
175
175
  async writeFiles(params: {
176
176
  sandboxId: string;
177
- files: { path: string; stream: Buffer }[];
177
+ files: { path: string; content: Buffer }[];
178
178
  }) {
179
179
  const { writer, response } = this.getFileWriter({
180
180
  sandboxId: params.sandboxId,
181
181
  });
182
182
 
183
183
  for (const file of params.files) {
184
- await writer.addFile({ name: file.path, content: file.stream });
184
+ await writer.addFile({ name: file.path, content: file.content });
185
185
  }
186
186
 
187
187
  writer.end();
package/src/sandbox.ts CHANGED
@@ -323,7 +323,7 @@ export class Sandbox {
323
323
  * @param files - Array of files with path and stream/buffer contents
324
324
  * @returns A promise that resolves when the files are written
325
325
  */
326
- async writeFiles(files: { path: string; stream: Buffer }[]) {
326
+ async writeFiles(files: { path: string; content: Buffer }[]) {
327
327
  return this.client.writeFiles({
328
328
  sandboxId: this.sandbox.id,
329
329
  files: files,
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Autogenerated by inject-version.ts
2
- export const VERSION = "0.0.10";
2
+ export const VERSION = "0.0.11";