@lizard-build/sdk 0.1.46 → 0.1.47

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
@@ -38,6 +38,14 @@ try {
38
38
 
39
39
  The package includes TypeScript declarations and ESM and CommonJS builds. For CommonJS, use `const { Lizard } = require('@lizard-build/sdk')` inside a program with an async entry point.
40
40
 
41
+ ## Machine size
42
+
43
+ Sandboxes come in three sizes: `small` (2 vCPU / 4 GB, $0.009/h), `medium` (4 vCPU / 8 GB, $0.018/h, the default) and `large` (8 vCPU / 16 GB, $0.036/h). Billing is flat by size, per second while the sandbox runs; measured CPU/RAM are not charged, egress is free, and volumes bill separately.
44
+
45
+ ```ts
46
+ const sandbox = await lizard.create('base', { size: 'large' })
47
+ ```
48
+
41
49
  ## Stream command output
42
50
 
43
51
  Inside the `try` block above:
package/dist/index.d.mts CHANGED
@@ -651,7 +651,9 @@ interface SandboxInfo {
651
651
  region?: string;
652
652
  status?: string;
653
653
  pauseError?: string | null;
654
+ /** Machine size (`'small' | 'medium' | 'large'`); may be `null` for a sandbox created from a private snapshot. */
654
655
  size?: 'small' | 'medium' | 'large' | null;
656
+ /** Flat hourly price in USD for `size`, billed per second while running; may be `null` when billed by measured usage (private snapshot). */
655
657
  pricePerHour?: number | null;
656
658
  cpus?: number;
657
659
  memoryMb?: number;
@@ -660,15 +662,28 @@ interface SandboxInfo {
660
662
  interface SandboxOpts extends ConnectionOpts {
661
663
  /**
662
664
  * The project this sandbox belongs to — its ID, slug, or name. Required:
663
- * a sandbox must be attributed to a project so its CPU, RAM, egress, and
664
- * storage are billed. Prefer the {@link Lizard} client, which pins a project
665
+ * a sandbox must be attributed to a project so its usage is billed there —
666
+ * a flat hourly price per {@link SandboxOpts.size}, charged per second while
667
+ * it runs (attached volumes bill separately). Prefer the {@link Lizard} client, which pins a project
665
668
  * for you. Ignored when {@link SandboxOpts.projectId} is set.
666
669
  */
667
670
  project?: string;
668
671
  /** Exact project ID — skips resolving {@link SandboxOpts.project}. */
669
672
  projectId?: string;
670
673
  template?: string;
674
+ /**
675
+ * Create from a private saved snapshot. The sandbox runs on the machine the
676
+ * snapshot was captured on and is billed by measured usage; `size` is ignored.
677
+ */
671
678
  snapshotId?: string;
679
+ /**
680
+ * Machine size, billed flat per hour (per second of running time):
681
+ * - `'small'` — 2 vCPU / 4 GB, $0.009/h
682
+ * - `'medium'` — 4 vCPU / 8 GB, $0.018/h (default)
683
+ * - `'large'` — 8 vCPU / 16 GB, $0.036/h
684
+ *
685
+ * Measured CPU/RAM are not charged and egress is free. Ignored with {@link SandboxOpts.snapshotId}.
686
+ */
672
687
  size?: 'small' | 'medium' | 'large';
673
688
  metadata?: Record<string, string>;
674
689
  envs?: Record<string, string>;
package/dist/index.d.ts CHANGED
@@ -651,7 +651,9 @@ interface SandboxInfo {
651
651
  region?: string;
652
652
  status?: string;
653
653
  pauseError?: string | null;
654
+ /** Machine size (`'small' | 'medium' | 'large'`); may be `null` for a sandbox created from a private snapshot. */
654
655
  size?: 'small' | 'medium' | 'large' | null;
656
+ /** Flat hourly price in USD for `size`, billed per second while running; may be `null` when billed by measured usage (private snapshot). */
655
657
  pricePerHour?: number | null;
656
658
  cpus?: number;
657
659
  memoryMb?: number;
@@ -660,15 +662,28 @@ interface SandboxInfo {
660
662
  interface SandboxOpts extends ConnectionOpts {
661
663
  /**
662
664
  * The project this sandbox belongs to — its ID, slug, or name. Required:
663
- * a sandbox must be attributed to a project so its CPU, RAM, egress, and
664
- * storage are billed. Prefer the {@link Lizard} client, which pins a project
665
+ * a sandbox must be attributed to a project so its usage is billed there —
666
+ * a flat hourly price per {@link SandboxOpts.size}, charged per second while
667
+ * it runs (attached volumes bill separately). Prefer the {@link Lizard} client, which pins a project
665
668
  * for you. Ignored when {@link SandboxOpts.projectId} is set.
666
669
  */
667
670
  project?: string;
668
671
  /** Exact project ID — skips resolving {@link SandboxOpts.project}. */
669
672
  projectId?: string;
670
673
  template?: string;
674
+ /**
675
+ * Create from a private saved snapshot. The sandbox runs on the machine the
676
+ * snapshot was captured on and is billed by measured usage; `size` is ignored.
677
+ */
671
678
  snapshotId?: string;
679
+ /**
680
+ * Machine size, billed flat per hour (per second of running time):
681
+ * - `'small'` — 2 vCPU / 4 GB, $0.009/h
682
+ * - `'medium'` — 4 vCPU / 8 GB, $0.018/h (default)
683
+ * - `'large'` — 8 vCPU / 16 GB, $0.036/h
684
+ *
685
+ * Measured CPU/RAM are not charged and egress is free. Ignored with {@link SandboxOpts.snapshotId}.
686
+ */
672
687
  size?: 'small' | 'medium' | 'large';
673
688
  metadata?: Record<string, string>;
674
689
  envs?: Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lizard-build/sdk",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "TypeScript SDK for Lizard: Kubernetes sandboxes, code execution and cloud apps.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",