sandbox 3.4.0 → 3.4.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.
@@ -2994,9 +2994,9 @@ var require_cjs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cmd-ts@
2994
2994
 
2995
2995
  //#endregion
2996
2996
  //#region src/args/runtime.ts
2997
- var import_cjs$30 = /* @__PURE__ */ __toESM(require_cjs());
2997
+ var import_cjs$31 = /* @__PURE__ */ __toESM(require_cjs());
2998
2998
  const runtimeType = {
2999
- ...import_cjs$30.oneOf([
2999
+ ...import_cjs$31.oneOf([
3000
3000
  "node22",
3001
3001
  "node24",
3002
3002
  "node26",
@@ -3004,9 +3004,9 @@ const runtimeType = {
3004
3004
  ]),
3005
3005
  displayName: "runtime"
3006
3006
  };
3007
- const runtime = import_cjs$30.option({
3007
+ const runtime = import_cjs$31.option({
3008
3008
  long: "runtime",
3009
- type: import_cjs$30.optional(runtimeType)
3009
+ type: import_cjs$31.optional(runtimeType)
3010
3010
  });
3011
3011
 
3012
3012
  //#endregion
@@ -3130,9 +3130,9 @@ var require_ms = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ms@2.1.3
3130
3130
 
3131
3131
  //#endregion
3132
3132
  //#region src/types/duration.ts
3133
- var import_cjs$29 = require_cjs();
3133
+ var import_cjs$30 = require_cjs();
3134
3134
  init_source();
3135
- const Duration = (0, import_cjs$29.extendType)(import_cjs$29.string, {
3135
+ const Duration = (0, import_cjs$30.extendType)(import_cjs$30.string, {
3136
3136
  displayName: "num UNIT",
3137
3137
  description: "A duration, e.g. 5m, 10s, 1h",
3138
3138
  async from(string$2) {
@@ -3148,8 +3148,8 @@ const Duration = (0, import_cjs$29.extendType)(import_cjs$29.string, {
3148
3148
 
3149
3149
  //#endregion
3150
3150
  //#region src/args/timeout.ts
3151
- var import_cjs$28 = /* @__PURE__ */ __toESM(require_cjs());
3152
- const timeout = import_cjs$28.option({
3151
+ var import_cjs$29 = /* @__PURE__ */ __toESM(require_cjs());
3152
+ const timeout = import_cjs$29.option({
3153
3153
  long: "timeout",
3154
3154
  type: Duration,
3155
3155
  description: "The maximum duration a sandbox can run for. Example: 5m, 30m",
@@ -3159,17 +3159,17 @@ const timeout = import_cjs$28.option({
3159
3159
 
3160
3160
  //#endregion
3161
3161
  //#region src/args/vcpus.ts
3162
- var import_cjs$27 = /* @__PURE__ */ __toESM(require_cjs());
3163
- const vcpusType = import_cjs$27.extendType(import_cjs$27.number, {
3162
+ var import_cjs$28 = /* @__PURE__ */ __toESM(require_cjs());
3163
+ const vcpusType = import_cjs$28.extendType(import_cjs$28.number, {
3164
3164
  displayName: "COUNT",
3165
3165
  async from(n) {
3166
3166
  if (!Number.isInteger(n) || n < 1) throw new Error(`Invalid vCPU count: ${n}. Must be a positive integer.`);
3167
3167
  return n;
3168
3168
  }
3169
3169
  });
3170
- const vcpus = import_cjs$27.option({
3170
+ const vcpus = import_cjs$28.option({
3171
3171
  long: "vcpus",
3172
- type: import_cjs$27.optional(vcpusType),
3172
+ type: import_cjs$28.optional(vcpusType),
3173
3173
  description: "Number of vCPUs to allocate (each vCPU includes 2048 MB of memory)"
3174
3174
  });
3175
3175
 
@@ -6748,10 +6748,10 @@ function _usingCtx() {
6748
6748
 
6749
6749
  //#endregion
6750
6750
  //#region src/commands/login.ts
6751
- var import_cjs$26 = /* @__PURE__ */ __toESM(require_cjs());
6751
+ var import_cjs$27 = /* @__PURE__ */ __toESM(require_cjs());
6752
6752
  init_source();
6753
6753
  const debug$8 = createDebugger("sandbox:login");
6754
- const login = import_cjs$26.command({
6754
+ const login = import_cjs$27.command({
6755
6755
  name: "login",
6756
6756
  description: "Log in to the Sandbox CLI",
6757
6757
  args: {},
@@ -6969,7 +6969,7 @@ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@verce
6969
6969
 
6970
6970
  //#endregion
6971
6971
  //#region src/args/auth.ts
6972
- var import_cjs$25 = /* @__PURE__ */ __toESM(require_cjs());
6972
+ var import_cjs$26 = /* @__PURE__ */ __toESM(require_cjs());
6973
6973
  init_source();
6974
6974
  var import_dist = require_dist();
6975
6975
  const debug$7 = createDebugger("sandbox:args:auth");
@@ -6986,11 +6986,11 @@ function isTokenFresh() {
6986
6986
  function markTokenAsFresh() {
6987
6987
  freshTokenAcquiredAt = Date.now();
6988
6988
  }
6989
- const token = import_cjs$25.option({
6989
+ const token = import_cjs$26.option({
6990
6990
  long: "token",
6991
6991
  description: "A Vercel authentication token. If not provided, will use the token stored in your system from `VERCEL_AUTH_TOKEN` or will start a log in process.",
6992
6992
  type: {
6993
- ...import_cjs$25.string,
6993
+ ...import_cjs$26.string,
6994
6994
  displayName: "pat_or_oidc",
6995
6995
  defaultValueIsSerializable: false,
6996
6996
  onMissing: async () => {
@@ -7173,30 +7173,30 @@ function getAuthFailureStatus(error) {
7173
7173
 
7174
7174
  //#endregion
7175
7175
  //#region src/args/scope.ts
7176
- var import_cjs$24 = /* @__PURE__ */ __toESM(require_cjs());
7176
+ var import_cjs$25 = /* @__PURE__ */ __toESM(require_cjs());
7177
7177
  init_source();
7178
7178
  const debug$4 = createDebugger("sandbox:scope");
7179
- const project = import_cjs$24.option({
7179
+ const project = import_cjs$25.option({
7180
7180
  long: "project",
7181
7181
  type: {
7182
- ...import_cjs$24.optional(import_cjs$24.string),
7182
+ ...import_cjs$25.optional(import_cjs$25.string),
7183
7183
  displayName: "my-project"
7184
7184
  },
7185
7185
  description: "The project name or ID to associate with the command. Can be inferred from VERCEL_OIDC_TOKEN."
7186
7186
  });
7187
7187
  /** Parser for the `--team` option. */
7188
- const teamParser = import_cjs$24.option({
7188
+ const teamParser = import_cjs$25.option({
7189
7189
  long: "team",
7190
7190
  type: {
7191
- ...import_cjs$24.optional(import_cjs$24.string),
7191
+ ...import_cjs$25.optional(import_cjs$25.string),
7192
7192
  displayName: "my-team"
7193
7193
  }
7194
7194
  });
7195
7195
  /** Parser for the `--scope` option. */
7196
- const scopeParser = import_cjs$24.option({
7196
+ const scopeParser = import_cjs$25.option({
7197
7197
  long: "scope",
7198
7198
  type: {
7199
- ...import_cjs$24.optional(import_cjs$24.string),
7199
+ ...import_cjs$25.optional(import_cjs$25.string),
7200
7200
  displayName: "my-team"
7201
7201
  },
7202
7202
  description: "The scope/team to associate with the command. Can be inferred from VERCEL_OIDC_TOKEN. [alias: --team]"
@@ -7286,7 +7286,7 @@ const scope = {
7286
7286
 
7287
7287
  //#endregion
7288
7288
  //#region package.json
7289
- var version = "3.4.0";
7289
+ var version = "3.4.2";
7290
7290
 
7291
7291
  //#endregion
7292
7292
  //#region src/error.ts
@@ -7438,9 +7438,9 @@ async function withErrorHandling(factory) {
7438
7438
 
7439
7439
  //#endregion
7440
7440
  //#region src/args/snapshot-id.ts
7441
- var import_cjs$23 = /* @__PURE__ */ __toESM(require_cjs());
7441
+ var import_cjs$24 = /* @__PURE__ */ __toESM(require_cjs());
7442
7442
  init_source();
7443
- const snapshotId = import_cjs$23.extendType(import_cjs$23.string, {
7443
+ const snapshotId = import_cjs$24.extendType(import_cjs$24.string, {
7444
7444
  displayName: "snapshot_id",
7445
7445
  description: "The ID of the snapshot",
7446
7446
  async from(s$1) {
@@ -7451,13 +7451,13 @@ const snapshotId = import_cjs$23.extendType(import_cjs$23.string, {
7451
7451
 
7452
7452
  //#endregion
7453
7453
  //#region src/args/ports.ts
7454
- var import_cjs$22 = /* @__PURE__ */ __toESM(require_cjs());
7454
+ var import_cjs$23 = /* @__PURE__ */ __toESM(require_cjs());
7455
7455
  init_source();
7456
- const publishPorts = import_cjs$22.multioption({
7456
+ const publishPorts = import_cjs$23.multioption({
7457
7457
  long: "publish-port",
7458
7458
  short: "p",
7459
7459
  description: "Publish sandbox port(s) to DOMAIN.vercel.run",
7460
- type: import_cjs$22.array(import_cjs$22.extendType(import_cjs$22.number, {
7460
+ type: import_cjs$23.array(import_cjs$23.extendType(import_cjs$23.number, {
7461
7461
  displayName: "PORT",
7462
7462
  async from(number) {
7463
7463
  if (!Number.isInteger(number) || number < 1024 || number > 65535) throw new Error([
@@ -7472,8 +7472,8 @@ const publishPorts = import_cjs$22.multioption({
7472
7472
 
7473
7473
  //#endregion
7474
7474
  //#region src/types/snapshot-expiration.ts
7475
- var import_cjs$21 = require_cjs();
7476
- const SnapshotExpiration = (0, import_cjs$21.extendType)(import_cjs$21.string, {
7475
+ var import_cjs$22 = require_cjs();
7476
+ const SnapshotExpiration = (0, import_cjs$22.extendType)(import_cjs$22.string, {
7477
7477
  displayName: "DURATION|none",
7478
7478
  description: "A duration (e.g. 7d, 30d) or \"none\" for no expiration",
7479
7479
  async from(value) {
@@ -7484,15 +7484,15 @@ const SnapshotExpiration = (0, import_cjs$21.extendType)(import_cjs$21.string, {
7484
7484
 
7485
7485
  //#endregion
7486
7486
  //#region src/args/snapshot-retention.ts
7487
- var import_cjs$20 = /* @__PURE__ */ __toESM(require_cjs());
7488
- const snapshotExpiration = import_cjs$20.option({
7487
+ var import_cjs$21 = /* @__PURE__ */ __toESM(require_cjs());
7488
+ const snapshotExpiration = import_cjs$21.option({
7489
7489
  long: "snapshot-expiration",
7490
- type: import_cjs$20.optional(SnapshotExpiration),
7490
+ type: import_cjs$21.optional(SnapshotExpiration),
7491
7491
  description: "Default snapshot expiration. Use \"none\" or 0 for no expiration. Example: 7d, 30d"
7492
7492
  });
7493
- const keepLastSnapshots = import_cjs$20.option({
7493
+ const keepLastSnapshots = import_cjs$21.option({
7494
7494
  long: "keep-last-snapshots",
7495
- type: import_cjs$20.optional(import_cjs$20.extendType(import_cjs$20.number, {
7495
+ type: import_cjs$21.optional(import_cjs$21.extendType(import_cjs$21.number, {
7496
7496
  displayName: "COUNT",
7497
7497
  async from(n) {
7498
7498
  if (!Number.isInteger(n) || n < 1 || n > 10) throw new Error(`Invalid --keep-last-snapshots value: ${n}. Must be an integer between 1 and 10.`);
@@ -7501,15 +7501,15 @@ const keepLastSnapshots = import_cjs$20.option({
7501
7501
  })),
7502
7502
  description: "Keep only the N most recent snapshots of this sandbox (1-10)."
7503
7503
  });
7504
- const keepLastSnapshotsFor = import_cjs$20.option({
7504
+ const keepLastSnapshotsFor = import_cjs$21.option({
7505
7505
  long: "keep-last-snapshots-for",
7506
- type: import_cjs$20.optional(SnapshotExpiration),
7506
+ type: import_cjs$21.optional(SnapshotExpiration),
7507
7507
  description: "Expiration applied to kept snapshots. Use \"none\" or 0 for no expiration. Example: 7d, 30d"
7508
7508
  });
7509
- const deleteEvictedSnapshots = import_cjs$20.option({
7509
+ const deleteEvictedSnapshots = import_cjs$21.option({
7510
7510
  long: "delete-evicted-snapshots",
7511
- type: import_cjs$20.optional({
7512
- ...import_cjs$20.oneOf(["true", "false"]),
7511
+ type: import_cjs$21.optional({
7512
+ ...import_cjs$21.oneOf(["true", "false"]),
7513
7513
  displayName: "true|false"
7514
7514
  }),
7515
7515
  description: "When \"true\" (the default), evicted snapshots are deleted immediately; when \"false\", they keep the default expiration."
@@ -7523,9 +7523,9 @@ const snapshotRetentionArgs = {
7523
7523
 
7524
7524
  //#endregion
7525
7525
  //#region src/args/sandbox-name.ts
7526
- var import_cjs$19 = /* @__PURE__ */ __toESM(require_cjs());
7526
+ var import_cjs$20 = /* @__PURE__ */ __toESM(require_cjs());
7527
7527
  init_source();
7528
- const sandboxName = import_cjs$19.extendType(import_cjs$19.string, {
7528
+ const sandboxName = import_cjs$20.extendType(import_cjs$20.string, {
7529
7529
  displayName: "name",
7530
7530
  description: "The name of the sandbox",
7531
7531
  async from(s$1) {
@@ -7702,9 +7702,9 @@ function toEnvArray(env$2) {
7702
7702
 
7703
7703
  //#endregion
7704
7704
  //#region src/args/key-value-pair.ts
7705
- var import_cjs$18 = /* @__PURE__ */ __toESM(require_cjs());
7705
+ var import_cjs$19 = /* @__PURE__ */ __toESM(require_cjs());
7706
7706
  init_source();
7707
- const KeyValuePair = import_cjs$18.extendType(import_cjs$18.string, {
7707
+ const KeyValuePair = import_cjs$19.extendType(import_cjs$19.string, {
7708
7708
  displayName: "key=value",
7709
7709
  async from(input) {
7710
7710
  if (!input.includes("=")) return {
@@ -7718,7 +7718,7 @@ const KeyValuePair = import_cjs$18.extendType(import_cjs$18.string, {
7718
7718
  };
7719
7719
  }
7720
7720
  });
7721
- const ObjectFromKeyValue = import_cjs$18.extendType(import_cjs$18.array(KeyValuePair), { async from(input) {
7721
+ const ObjectFromKeyValue = import_cjs$19.extendType(import_cjs$19.array(KeyValuePair), { async from(input) {
7722
7722
  const obj = Object.create(null);
7723
7723
  const missingVars = [];
7724
7724
  for (const { key, value } of input) if (value === void 0) missingVars.push(key);
@@ -7732,28 +7732,28 @@ const ObjectFromKeyValue = import_cjs$18.extendType(import_cjs$18.array(KeyValue
7732
7732
 
7733
7733
  //#endregion
7734
7734
  //#region src/commands/exec.ts
7735
- var import_cjs$17 = /* @__PURE__ */ __toESM(require_cjs());
7735
+ var import_cjs$18 = /* @__PURE__ */ __toESM(require_cjs());
7736
7736
  var import_ms$5 = /* @__PURE__ */ __toESM(require_ms());
7737
7737
  init_source();
7738
7738
  const args$4 = {
7739
- sandbox: import_cjs$17.positional({ type: sandboxName }),
7740
- command: import_cjs$17.positional({
7739
+ sandbox: import_cjs$18.positional({ type: sandboxName }),
7740
+ command: import_cjs$18.positional({
7741
7741
  displayName: "command",
7742
7742
  description: "The executable to invoke"
7743
7743
  }),
7744
- args: import_cjs$17.rest({
7744
+ args: import_cjs$18.rest({
7745
7745
  displayName: "args",
7746
7746
  description: "arguments to pass to the command"
7747
7747
  }),
7748
- asSudo: import_cjs$17.flag({
7748
+ asSudo: import_cjs$18.flag({
7749
7749
  long: "sudo",
7750
7750
  description: "Give extended privileges to the command."
7751
7751
  }),
7752
- interactive: import_cjs$17.flag({
7752
+ interactive: import_cjs$18.flag({
7753
7753
  long: "interactive",
7754
7754
  short: "i",
7755
7755
  description: "Run the command in a secure interactive shell",
7756
- type: import_cjs$17.extendType(import_cjs$17.boolean, {
7756
+ type: import_cjs$18.extendType(import_cjs$18.boolean, {
7757
7757
  defaultValue() {
7758
7758
  return false;
7759
7759
  },
@@ -7763,35 +7763,35 @@ const args$4 = {
7763
7763
  }
7764
7764
  })
7765
7765
  }),
7766
- skipExtendingTimeout: import_cjs$17.flag({
7766
+ skipExtendingTimeout: import_cjs$18.flag({
7767
7767
  long: "no-extend-timeout",
7768
7768
  description: "Do not extend the sandbox timeout while running an interactive command. Only affects interactive executions."
7769
7769
  }),
7770
- tty: import_cjs$17.flag({
7770
+ tty: import_cjs$18.flag({
7771
7771
  long: "tty",
7772
7772
  short: "t",
7773
7773
  description: "Allocate a tty for an interactive command. This is a no-op."
7774
7774
  }),
7775
- cwd: import_cjs$17.option({
7775
+ cwd: import_cjs$18.option({
7776
7776
  long: "workdir",
7777
7777
  short: "w",
7778
7778
  description: "The working directory to run the command in",
7779
- type: import_cjs$17.optional(import_cjs$17.string)
7779
+ type: import_cjs$18.optional(import_cjs$18.string)
7780
7780
  }),
7781
- envVars: import_cjs$17.multioption({
7781
+ envVars: import_cjs$18.multioption({
7782
7782
  long: "env",
7783
7783
  short: "e",
7784
7784
  type: ObjectFromKeyValue,
7785
7785
  description: "Environment variables to set for the command"
7786
7786
  }),
7787
- timeout: import_cjs$17.option({
7787
+ timeout: import_cjs$18.option({
7788
7788
  long: "timeout",
7789
- type: import_cjs$17.optional(Duration),
7789
+ type: import_cjs$18.optional(Duration),
7790
7790
  description: "Maximum duration to wait for the command (e.g. 30s, 5m). On expiry the process is killed with SIGKILL. Cannot be combined with --interactive."
7791
7791
  }),
7792
7792
  scope
7793
7793
  };
7794
- const exec = import_cjs$17.command({
7794
+ const exec = import_cjs$18.command({
7795
7795
  name: "exec",
7796
7796
  description: "Execute a command in an existing sandbox",
7797
7797
  args: args$4,
@@ -7832,9 +7832,9 @@ const exec = import_cjs$17.command({
7832
7832
 
7833
7833
  //#endregion
7834
7834
  //#region src/args/network-policy.ts
7835
- var import_cjs$16 = /* @__PURE__ */ __toESM(require_cjs());
7835
+ var import_cjs$17 = /* @__PURE__ */ __toESM(require_cjs());
7836
7836
  init_source();
7837
- const networkPolicyMode = import_cjs$16.extendType(import_cjs$16.string, {
7837
+ const networkPolicyMode = import_cjs$17.extendType(import_cjs$17.string, {
7838
7838
  displayName: "MODE",
7839
7839
  async from(value) {
7840
7840
  const validModes = ["allow-all", "deny-all"];
@@ -7842,28 +7842,28 @@ const networkPolicyMode = import_cjs$16.extendType(import_cjs$16.string, {
7842
7842
  return value;
7843
7843
  }
7844
7844
  });
7845
- const networkPolicy = import_cjs$16.option({
7845
+ const networkPolicy = import_cjs$17.option({
7846
7846
  long: "network-policy",
7847
7847
  description: `Network policy mode: "allow-all" or "deny-all"
7848
7848
  - allow-all: sandbox can access any website/domain
7849
7849
  - deny-all: sandbox has no network access
7850
7850
  Omit this option and use --allowed-domain / --allowed-cidr / --denied-cidr for custom policies.`,
7851
- type: import_cjs$16.optional(networkPolicyMode)
7851
+ type: import_cjs$17.optional(networkPolicyMode)
7852
7852
  });
7853
- const allowedDomains = import_cjs$16.multioption({
7853
+ const allowedDomains = import_cjs$17.multioption({
7854
7854
  long: "allowed-domain",
7855
7855
  description: `Domain to allow traffic to (creates a custom network policy). Supports "*" for wildcards for a segment (e.g. '*.vercel.com', 'www.*.com'). If used as the first segment, will match any subdomain.`,
7856
- type: import_cjs$16.array(import_cjs$16.string)
7856
+ type: import_cjs$17.array(import_cjs$17.string)
7857
7857
  });
7858
- const allowedCIDRs = import_cjs$16.multioption({
7858
+ const allowedCIDRs = import_cjs$17.multioption({
7859
7859
  long: "allowed-cidr",
7860
7860
  description: `CIDR to allow traffic to (creates a custom network policy). Takes precedence over 'allowed-domain'.`,
7861
- type: import_cjs$16.array(import_cjs$16.string)
7861
+ type: import_cjs$17.array(import_cjs$17.string)
7862
7862
  });
7863
- const deniedCIDRs = import_cjs$16.multioption({
7863
+ const deniedCIDRs = import_cjs$17.multioption({
7864
7864
  long: "denied-cidr",
7865
7865
  description: `CIDR to deny traffic to (creates a custom network policy). Takes precedence over allowed domains/CIDRs.`,
7866
- type: import_cjs$16.array(import_cjs$16.string)
7866
+ type: import_cjs$17.array(import_cjs$17.string)
7867
7867
  });
7868
7868
  const networkPolicyArgs = {
7869
7869
  networkPolicy,
@@ -7959,49 +7959,49 @@ function printSandboxSummary(opts) {
7959
7959
 
7960
7960
  //#endregion
7961
7961
  //#region src/commands/create.ts
7962
- var import_cjs$15 = /* @__PURE__ */ __toESM(require_cjs());
7962
+ var import_cjs$16 = /* @__PURE__ */ __toESM(require_cjs());
7963
7963
  var import_ms$3 = /* @__PURE__ */ __toESM(require_ms());
7964
7964
  init_source();
7965
7965
  const args$3 = {
7966
- name: import_cjs$15.option({
7966
+ name: import_cjs$16.option({
7967
7967
  long: "name",
7968
7968
  description: "A user-chosen name for the sandbox. It must be unique per project.",
7969
- type: import_cjs$15.optional(import_cjs$15.string)
7969
+ type: import_cjs$16.optional(import_cjs$16.string)
7970
7970
  }),
7971
- nonPersistent: import_cjs$15.flag({
7971
+ nonPersistent: import_cjs$16.flag({
7972
7972
  long: "non-persistent",
7973
7973
  description: "Disable automatic restore of the filesystem between sessions."
7974
7974
  }),
7975
7975
  runtime,
7976
- image: import_cjs$15.option({
7976
+ image: import_cjs$16.option({
7977
7977
  long: "image",
7978
7978
  description: "A Vercel Container Registry (VCR) image name and optional tag or sha to start the sandbox from (e.g. my-repo, my-repo:v1).",
7979
- type: import_cjs$15.optional(import_cjs$15.string)
7979
+ type: import_cjs$16.optional(import_cjs$16.string)
7980
7980
  }),
7981
7981
  timeout,
7982
7982
  vcpus,
7983
7983
  ports: publishPorts,
7984
- silent: import_cjs$15.flag({
7984
+ silent: import_cjs$16.flag({
7985
7985
  long: "silent",
7986
7986
  description: "Don't write sandbox name to stdout"
7987
7987
  }),
7988
- snapshot: import_cjs$15.option({
7988
+ snapshot: import_cjs$16.option({
7989
7989
  long: "snapshot",
7990
7990
  short: "s",
7991
7991
  description: "Start the sandbox from a snapshot ID",
7992
- type: import_cjs$15.optional(snapshotId)
7992
+ type: import_cjs$16.optional(snapshotId)
7993
7993
  }),
7994
- connect: import_cjs$15.flag({
7994
+ connect: import_cjs$16.flag({
7995
7995
  long: "connect",
7996
7996
  description: "Start an interactive shell session after creating the sandbox"
7997
7997
  }),
7998
- envVars: import_cjs$15.multioption({
7998
+ envVars: import_cjs$16.multioption({
7999
7999
  long: "env",
8000
8000
  short: "e",
8001
8001
  type: ObjectFromKeyValue,
8002
8002
  description: "Default environment variables for sandbox commands"
8003
8003
  }),
8004
- tags: import_cjs$15.multioption({
8004
+ tags: import_cjs$16.multioption({
8005
8005
  long: "tag",
8006
8006
  short: "t",
8007
8007
  type: ObjectFromKeyValue,
@@ -8011,7 +8011,7 @@ const args$3 = {
8011
8011
  ...networkPolicyArgs,
8012
8012
  scope
8013
8013
  };
8014
- const create = import_cjs$15.command({
8014
+ const create = import_cjs$16.command({
8015
8015
  name: "create",
8016
8016
  description: "Create a sandbox in the specified account and project.",
8017
8017
  args: args$3,
@@ -8100,6 +8100,29 @@ const create = import_cjs$15.command({
8100
8100
  }
8101
8101
  });
8102
8102
 
8103
+ //#endregion
8104
+ //#region src/util/omit.ts
8105
+ function omit(obj, ...keys) {
8106
+ const result = { ...obj };
8107
+ for (const key of keys) delete result[key];
8108
+ return result;
8109
+ }
8110
+
8111
+ //#endregion
8112
+ //#region src/commands/sh.ts
8113
+ var import_cjs$15 = /* @__PURE__ */ __toESM(require_cjs());
8114
+ const sh = import_cjs$15.command({
8115
+ name: "sh",
8116
+ description: "Create a sandbox and start an interactive shell",
8117
+ args: omit(args$3, "connect"),
8118
+ async handler(args$5) {
8119
+ return create.handler({
8120
+ ...args$5,
8121
+ connect: true
8122
+ });
8123
+ }
8124
+ });
8125
+
8103
8126
  //#endregion
8104
8127
  //#region src/commands/fork.ts
8105
8128
  var import_cjs$14 = /* @__PURE__ */ __toESM(require_cjs());
@@ -8222,14 +8245,6 @@ const fork = import_cjs$14.command({
8222
8245
  }
8223
8246
  });
8224
8247
 
8225
- //#endregion
8226
- //#region src/util/omit.ts
8227
- function omit(obj, ...keys) {
8228
- const result = { ...obj };
8229
- for (const key of keys) delete result[key];
8230
- return result;
8231
- }
8232
-
8233
8248
  //#endregion
8234
8249
  //#region src/commands/run.ts
8235
8250
  var import_cjs$13 = /* @__PURE__ */ __toESM(require_cjs());
@@ -12037,6 +12052,7 @@ const app = (opts) => (0, import_cjs.subcommands)({
12037
12052
  cmds: {
12038
12053
  list,
12039
12054
  create,
12055
+ sh,
12040
12056
  fork,
12041
12057
  config,
12042
12058
  copy: cp,
@@ -12056,7 +12072,7 @@ const app = (opts) => (0, import_cjs.subcommands)({
12056
12072
  examples: [
12057
12073
  {
12058
12074
  description: "Create a sandbox and start a shell",
12059
- command: "sandbox create --connect"
12075
+ command: "sandbox sh"
12060
12076
  },
12061
12077
  {
12062
12078
  description: "Run a command in a new sandbox",
@@ -12071,4 +12087,4 @@ const app = (opts) => (0, import_cjs.subcommands)({
12071
12087
 
12072
12088
  //#endregion
12073
12089
  export { source_exports as a, init_source as i, printTopLevelError as n, require_cjs as r, app as t };
12074
- //# sourceMappingURL=app-CsBNEDNb.mjs.map
12090
+ //# sourceMappingURL=app-CBTroEEt.mjs.map