matchlock-sdk 0.2.5 → 0.2.7

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/builder.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare class Sandbox {
4
4
  private readonly opts;
5
5
  constructor(image: string);
6
6
  withPrivileged(): Sandbox;
7
+ withKernel(ref: string): Sandbox;
7
8
  withCPUs(cpus: number): Sandbox;
8
9
  withMemory(mb: number): Sandbox;
9
10
  withDiskSize(mb: number): Sandbox;
package/dist/builder.js CHANGED
@@ -75,6 +75,10 @@ class Sandbox {
75
75
  this.opts.privileged = true;
76
76
  return this;
77
77
  }
78
+ withKernel(ref) {
79
+ this.opts.kernelRef = ref;
80
+ return this;
81
+ }
78
82
  withCPUs(cpus) {
79
83
  this.opts.cpus = cpus;
80
84
  return this;
@@ -30,6 +30,9 @@ function buildCreateParams(options, wireVFS, wireNetworkInterception) {
30
30
  image: options.image ?? "",
31
31
  resources,
32
32
  };
33
+ if (options.kernelRef) {
34
+ params.kernel = { ref: options.kernelRef };
35
+ }
33
36
  if (options.privileged) {
34
37
  params.privileged = true;
35
38
  }
package/dist/types.d.ts CHANGED
@@ -161,6 +161,7 @@ export interface NetworkInterceptionConfig {
161
161
  }
162
162
  export interface CreateOptions {
163
163
  image?: string;
164
+ kernelRef?: string;
164
165
  privileged?: boolean;
165
166
  cpus?: number;
166
167
  memoryMb?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matchlock-sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "TypeScript SDK for Matchlock sandboxes",
5
5
  "license": "MIT",
6
6
  "repository": {