@sanity/cli 5.0.0-next-major.14 → 5.0.0-next-major.20251210134624

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.
@@ -3771,7 +3771,7 @@ const BlueprintsAddExampleUsed = telemetry.defineEvent({
3771
3771
  version: 1,
3772
3772
  name: "Blueprints Add Example Used",
3773
3773
  description: "User used --example flag with blueprints add command"
3774
- }), helpText$s = `
3774
+ }), helpText$t = `
3775
3775
  Arguments
3776
3776
  <type> Type of Resource to add (currently only 'function' is supported)
3777
3777
 
@@ -3807,13 +3807,13 @@ Examples:
3807
3807
 
3808
3808
  # Add a document-publish .js Function with helpers and install with npm
3809
3809
  sanity blueprints add function -n roboto --fn-type document-publish --js -i
3810
- `, defaultFlags$d = {
3810
+ `, defaultFlags$e = {
3811
3811
  "fn-language": "ts"
3812
3812
  // 'fn-helpers': true, // ask, for now
3813
3813
  }, addBlueprintsCommand = {
3814
3814
  name: "add",
3815
3815
  group: "blueprints",
3816
- helpText: helpText$s,
3816
+ helpText: helpText$t,
3817
3817
  signature: "<type> [--name <name>] [--fn-type <document-create|document-delete|document-update|document-publish>] [--fn-lang <ts|js>] [--javascript]",
3818
3818
  description: "Add a Resource to a Blueprint",
3819
3819
  async action(args, context) {
@@ -3839,7 +3839,7 @@ Examples:
3839
3839
  example: extOptions.example
3840
3840
  });
3841
3841
  }
3842
- const flags = { ...defaultFlags$d, ...extOptions }, client2 = apiClient({
3842
+ const flags = { ...defaultFlags$e, ...extOptions }, client2 = apiClient({
3843
3843
  requireUser: !0,
3844
3844
  requireProject: !1
3845
3845
  }), { token: token2 } = client2.config();
@@ -3876,11 +3876,12 @@ Examples:
3876
3876
  signature: "[COMMAND]",
3877
3877
  isGroupRoot: !0,
3878
3878
  description: "Deploy and manage Sanity Blueprints and Stacks (IaC)"
3879
- }, helpText$r = `
3879
+ }, helpText$s = `
3880
3880
  Options
3881
- --edit, -e Edit the configuration
3882
- --test, -t Test the configuration
3883
- --project-id <id> Project ID to use
3881
+ --edit, -e Modify the configuration interactively, or directly when combined with ID flags.
3882
+ --project-id <id> Directly set the Project ID in the configuration. Requires --edit flag
3883
+ --stack-id <id> Directly set the Stack ID in the configuration. Requires --edit flag
3884
+ --verbose Output verbose logs
3884
3885
 
3885
3886
  Examples:
3886
3887
  # View current configuration
@@ -3888,22 +3889,16 @@ Examples:
3888
3889
 
3889
3890
  # Edit configuration
3890
3891
  sanity blueprints config --edit
3891
-
3892
- # Test configuration
3893
- sanity blueprints config --test
3894
-
3895
- # Edit and test configuration
3896
- sanity blueprints config -et
3897
- `, defaultFlags$c = {
3892
+ `, defaultFlags$d = {
3898
3893
  //
3899
3894
  }, configBlueprintsCommand = {
3900
3895
  name: "config",
3901
3896
  group: "blueprints",
3902
- helpText: helpText$r,
3903
- signature: "[--edit] [-e] [--test] [-t] [--project-id <id>]",
3897
+ helpText: helpText$s,
3898
+ signature: "[--edit] [--project-id <id>] [--stack-id <id>] [--verbose]",
3904
3899
  description: "View or edit local Blueprints configuration",
3905
3900
  async action(args, context) {
3906
- const { apiClient, output } = context, flags = { ...defaultFlags$c, ...args.extOptions }, client2 = apiClient({
3901
+ const { apiClient, output } = context, flags = { ...defaultFlags$d, ...args.extOptions }, client2 = apiClient({
3907
3902
  requireUser: !0,
3908
3903
  requireProject: !1
3909
3904
  }), { token: token2 } = client2.config();
@@ -3920,15 +3915,15 @@ Examples:
3920
3915
  flags: {
3921
3916
  "project-id": flags["project-id"] ?? flags.projectId ?? flags.project,
3922
3917
  "stack-id": flags["stack-id"] ?? flags.stackId ?? flags.stack,
3923
- "test-config": flags["test-config"] ?? flags.test ?? flags.t,
3924
- edit: flags.edit ?? flags.e
3918
+ edit: flags.edit ?? flags.e,
3919
+ verbose: flags.verbose
3925
3920
  }
3926
3921
  });
3927
3922
  if (!success) throw new Error(error2);
3928
3923
  }
3929
- }, helpText$q = `
3924
+ }, helpText$r = `
3930
3925
  Options
3931
- --no-wait Do not wait for deployment to complete
3926
+ --no-wait Do not wait for Stack deployment to complete
3932
3927
 
3933
3928
  Examples:
3934
3929
  # Deploy the current blueprint
@@ -3936,16 +3931,16 @@ Examples:
3936
3931
 
3937
3932
  # Deploy the current blueprint without waiting for completion
3938
3933
  sanity blueprints deploy --no-wait
3939
- `, defaultFlags$b = {
3934
+ `, defaultFlags$c = {
3940
3935
  //
3941
3936
  }, deployBlueprintsCommand = {
3942
3937
  name: "deploy",
3943
3938
  group: "blueprints",
3944
- helpText: helpText$q,
3939
+ helpText: helpText$r,
3945
3940
  signature: "[--no-wait]",
3946
- description: "Deploy a Blueprint to create or update a Stack",
3941
+ description: "Deploy a Blueprint",
3947
3942
  async action(args, context) {
3948
- const { apiClient, output } = context, flags = { ...defaultFlags$b, ...args.extOptions }, client2 = apiClient({
3943
+ const { apiClient, output } = context, flags = { ...defaultFlags$c, ...args.extOptions }, client2 = apiClient({
3949
3944
  requireUser: !0,
3950
3945
  requireProject: !1
3951
3946
  }), { token: token2 } = client2.config();
@@ -3964,8 +3959,10 @@ Examples:
3964
3959
  });
3965
3960
  if (!success) throw new Error(error2);
3966
3961
  }
3967
- }, helpText$p = `
3962
+ }, helpText$q = `
3968
3963
  Options
3964
+ --project-id Project associated with the Stack
3965
+ --stack-id Stack ID to destroy (defaults to current Stack)
3969
3966
  --force, -f Force destroy without confirmation
3970
3967
  --no-wait Do not wait for destroy to complete
3971
3968
 
@@ -3978,16 +3975,16 @@ Examples:
3978
3975
 
3979
3976
  # Destroy without waiting for completion
3980
3977
  sanity blueprints destroy --no-wait
3981
- `, defaultFlags$a = {
3978
+ `, defaultFlags$b = {
3982
3979
  //
3983
3980
  }, destroyBlueprintsCommand = {
3984
3981
  name: "destroy",
3985
3982
  group: "blueprints",
3986
- helpText: helpText$p,
3987
- signature: "[--force] [-f] [--no-wait]",
3988
- description: "Destroy a Blueprint deployment",
3983
+ helpText: helpText$q,
3984
+ signature: "[--project-id <value> --stack-id <value> --force] [--no-wait]",
3985
+ description: "Destroy a Blueprint Stack deployment and its resources (will not delete local files)",
3989
3986
  async action(args, context) {
3990
- const { apiClient, output } = context, flags = { ...defaultFlags$a, ...args.extOptions }, client2 = apiClient({
3987
+ const { apiClient, output } = context, flags = { ...defaultFlags$b, ...args.extOptions }, client2 = apiClient({
3991
3988
  requireUser: !0,
3992
3989
  requireProject: !1
3993
3990
  }), { token: token2 } = client2.config();
@@ -4009,50 +4006,49 @@ Examples:
4009
4006
  });
4010
4007
  if (!success) throw new Error(error2);
4011
4008
  }
4012
- }, helpText$o = `
4009
+ }, helpText$p = `
4010
+ Options
4011
+ --verbose Provide detailed information about issues
4012
+
4013
4013
  Examples:
4014
4014
  # Check the health of the current Blueprint project
4015
4015
  sanity blueprints doctor --verbose
4016
- `, defaultFlags$9 = {
4016
+ `, defaultFlags$a = {
4017
4017
  verbose: !1
4018
4018
  }, doctorBlueprintsCommand = {
4019
4019
  name: "doctor",
4020
4020
  group: "blueprints",
4021
- helpText: helpText$o,
4021
+ helpText: helpText$p,
4022
4022
  signature: "[--verbose]",
4023
- description: "Check the health of a Blueprint project",
4023
+ description: "Diagnose potential issues with Blueprint configuration",
4024
4024
  async action(args, context) {
4025
- const { apiClient, output } = context, flags = { ...defaultFlags$9, ...args.extOptions }, client2 = apiClient({
4025
+ const { apiClient, output } = context, flags = { ...defaultFlags$a, ...args.extOptions }, client2 = apiClient({
4026
4026
  requireUser: !0,
4027
4027
  requireProject: !1
4028
4028
  }), { token: token2 } = client2.config();
4029
4029
  if (!token2) throw new Error("No API token found. Please run `sanity login`.");
4030
- const { initDeployedBlueprintConfig } = await import("@sanity/runtime-cli/cores"), { blueprintDoctorCore } = await import("@sanity/runtime-cli/cores/blueprints"), cmdConfig = await initDeployedBlueprintConfig({
4030
+ const { blueprintDoctorCore } = await import("@sanity/runtime-cli/cores/blueprints"), { success, error: error2 } = await blueprintDoctorCore({
4031
4031
  bin: "sanity",
4032
4032
  log: (message) => output.print(message),
4033
- token: token2
4034
- });
4035
- if (!cmdConfig.ok) throw new Error(cmdConfig.error);
4036
- const { success, error: error2 } = await blueprintDoctorCore({
4037
- ...cmdConfig.value,
4033
+ token: token2,
4038
4034
  flags
4039
4035
  });
4040
4036
  if (!success) throw new Error(error2);
4041
4037
  }
4042
- }, helpText$n = `
4038
+ }, helpText$o = `
4043
4039
  Examples:
4044
4040
  # Retrieve information about the current Stack
4045
4041
  sanity blueprints info
4046
- `, defaultFlags$8 = {
4042
+ `, defaultFlags$9 = {
4047
4043
  //
4048
4044
  }, infoBlueprintsCommand = {
4049
4045
  name: "info",
4050
4046
  group: "blueprints",
4051
- helpText: helpText$n,
4047
+ helpText: helpText$o,
4052
4048
  signature: "",
4053
- description: "Retrieve information about a Blueprint Stack",
4049
+ description: "Show information about a Blueprint Stack deployment",
4054
4050
  async action(args, context) {
4055
- const { apiClient, output } = context, flags = { ...defaultFlags$8, ...args.extOptions }, client2 = apiClient({
4051
+ const { apiClient, output } = context, flags = { ...defaultFlags$9, ...args.extOptions }, client2 = apiClient({
4056
4052
  requireUser: !0,
4057
4053
  requireProject: !1
4058
4054
  }), { token: token2 } = client2.config();
@@ -4069,13 +4065,16 @@ Examples:
4069
4065
  });
4070
4066
  if (!success) throw new Error(error2);
4071
4067
  }
4072
- }, helpText$m = `
4068
+ }, helpText$n = `
4073
4069
  Arguments
4074
4070
  [dir] Path to initialize the Blueprint in
4075
4071
 
4076
4072
  Options
4077
- --blueprint-type, --type <json> Type of Blueprint to create
4078
- --project-id <id> Project ID to use
4073
+ --blueprint-type, --type <json> Blueprint manifest type to use for the Blueprint (json|js|ts)
4074
+ --project-id <id> Sanity Project ID to use for the Blueprint
4075
+ --stack-id <id> Existing Stack ID to use for the Blueprint
4076
+ --stack-name <id> Name to use for a NEW Stack
4077
+ --verbose Verbose output
4079
4078
 
4080
4079
  Examples:
4081
4080
  # Create a new Blueprint project in the current directory
@@ -4086,16 +4085,16 @@ Examples:
4086
4085
 
4087
4086
  # Create a new Blueprint project in a specific directory with an example
4088
4087
  sanity blueprints init --example example-name
4089
- `, defaultFlags$7 = {
4088
+ `, defaultFlags$8 = {
4090
4089
  //
4091
4090
  }, initBlueprintsCommand = {
4092
4091
  name: "init",
4093
4092
  group: "blueprints",
4094
- helpText: helpText$m,
4093
+ helpText: helpText$n,
4095
4094
  signature: "[dir] [--blueprint-type <type>] [--project-id <id>]",
4096
- description: "Initialize a new Blueprint manifest file",
4095
+ description: "Initialize a new Blueprint",
4097
4096
  async action(args, context) {
4098
- const { apiClient, output } = context, flags = { ...defaultFlags$7, ...args.extOptions }, [dir] = args.argsWithoutOptions, client2 = apiClient({
4097
+ const { apiClient, output } = context, flags = { ...defaultFlags$8, ...args.extOptions }, [dir] = args.argsWithoutOptions, client2 = apiClient({
4099
4098
  requireUser: !0,
4100
4099
  requireProject: !1
4101
4100
  }), { token: token2 } = client2.config();
@@ -4126,14 +4125,15 @@ Examples:
4126
4125
  "blueprint-type": flags["blueprint-type"] ?? flags.type,
4127
4126
  "project-id": flags["project-id"] ?? flags.projectId ?? flags.project,
4128
4127
  "stack-id": flags["stack-id"] ?? flags.stackId ?? flags.stack,
4129
- "stack-name": flags["stack-name"] ?? flags.name
4128
+ "stack-name": flags["stack-name"] ?? flags.name,
4129
+ verbose: flags.verbose
4130
4130
  }
4131
4131
  });
4132
4132
  if (!success) throw new Error(error2);
4133
4133
  }
4134
- }, helpText$l = `
4134
+ }, helpText$m = `
4135
4135
  Options
4136
- --watch, -w Watch for new logs (streaming mode)
4136
+ --watch, -w Watch for new Stack logs (streaming mode)
4137
4137
 
4138
4138
  Examples:
4139
4139
  # Show logs for the current Stack
@@ -4141,16 +4141,16 @@ Examples:
4141
4141
 
4142
4142
  # Watch for new logs (streaming mode)
4143
4143
  sanity blueprints logs --watch
4144
- `, defaultFlags$6 = {
4144
+ `, defaultFlags$7 = {
4145
4145
  //
4146
4146
  }, logsBlueprintsCommand = {
4147
4147
  name: "logs",
4148
4148
  group: "blueprints",
4149
- helpText: helpText$l,
4149
+ helpText: helpText$m,
4150
4150
  signature: "[--watch] [-w]",
4151
- description: "Display logs for the current Blueprint Stack",
4151
+ description: "Display logs for a Blueprint Stack deployment",
4152
4152
  async action(args, context) {
4153
- const { apiClient, output } = context, flags = { ...defaultFlags$6, ...args.extOptions }, client2 = apiClient({
4153
+ const { apiClient, output } = context, flags = { ...defaultFlags$7, ...args.extOptions }, client2 = apiClient({
4154
4154
  requireUser: !0,
4155
4155
  requireProject: !1
4156
4156
  }), { token: token2 } = client2.config();
@@ -4169,20 +4169,25 @@ Examples:
4169
4169
  });
4170
4170
  if (streaming && await streaming, !success) throw new Error(error2);
4171
4171
  }
4172
- }, helpText$k = `
4172
+ }, helpText$l = `
4173
4173
  Safe to run at any time. Will not modify any Resources.
4174
4174
 
4175
+ Options
4176
+ --version Verbose output
4177
+
4175
4178
  Examples:
4176
4179
  # Show deployment plan for the current Blueprint
4177
4180
  sanity blueprints plan
4178
- `, planBlueprintsCommand = {
4181
+ `, defaultFlags$6 = {
4182
+ //
4183
+ }, planBlueprintsCommand = {
4179
4184
  name: "plan",
4180
4185
  group: "blueprints",
4181
- helpText: helpText$k,
4186
+ helpText: helpText$l,
4182
4187
  signature: "",
4183
- description: "Enumerate Resources to be deployed",
4188
+ description: "Enumerate resources to be deployed - will not modify any resources",
4184
4189
  async action(args, context) {
4185
- const { apiClient, output } = context, client2 = apiClient({
4190
+ const { apiClient, output } = context, flags = { ...defaultFlags$6, ...args.extOptions }, client2 = apiClient({
4186
4191
  requireUser: !0,
4187
4192
  requireProject: !1
4188
4193
  }), { token: token2 } = client2.config();
@@ -4194,13 +4199,16 @@ Examples:
4194
4199
  });
4195
4200
  if (!cmdConfig.ok) throw new Error(cmdConfig.error);
4196
4201
  const { success, error: error2 } = await blueprintPlanCore({
4197
- ...cmdConfig.value
4202
+ ...cmdConfig.value,
4203
+ flags: {
4204
+ verbose: flags.verbose
4205
+ }
4198
4206
  });
4199
4207
  if (!success) throw new Error(error2);
4200
4208
  }
4201
- }, helpText$j = `
4209
+ }, helpText$k = `
4202
4210
  Options
4203
- --project-id <id> Project ID to use
4211
+ --project-id <id> Project ID to use
4204
4212
 
4205
4213
  Examples:
4206
4214
  # List all Stacks for the current Project
@@ -4213,10 +4221,10 @@ Examples:
4213
4221
  }, stacksBlueprintsCommand = {
4214
4222
  name: "stacks",
4215
4223
  group: "blueprints",
4216
- helpText: helpText$j,
4217
- signature: "[--project-id <id>]",
4218
- description: "List all Blueprint Stacks for the current Project",
4219
- hideFromHelp: !0,
4224
+ helpText: helpText$k,
4225
+ signature: "[--project-id <value>]",
4226
+ description: "List all Blueprint Stacks",
4227
+ hideFromHelp: !1,
4220
4228
  async action(args, context) {
4221
4229
  const { apiClient, output } = context, flags = { ...defaultFlags$5, ...args.extOptions }, client2 = apiClient({
4222
4230
  requireUser: !0,
@@ -4232,7 +4240,8 @@ Examples:
4232
4240
  const { success, error: error2 } = await blueprintStacksCore({
4233
4241
  ...cmdConfig.value,
4234
4242
  flags: {
4235
- "project-id": flags["project-id"] ?? flags.projectId ?? flags.project
4243
+ "project-id": flags["project-id"] ?? flags.projectId ?? flags.project,
4244
+ verbose: flags.verbose
4236
4245
  }
4237
4246
  });
4238
4247
  if (!success) throw new Error(error2);
@@ -4381,7 +4390,7 @@ function ensureNpx() {
4381
4390
  );
4382
4391
  }
4383
4392
  }
4384
- const helpText$i = `
4393
+ const helpText$j = `
4385
4394
  Runs a given code modification script on the current studio folder.
4386
4395
  Running the command without a specified codemod name will list available transformations.
4387
4396
 
@@ -4403,7 +4412,7 @@ Examples
4403
4412
  name: "codemod",
4404
4413
  signature: "[CODEMOD_NAME]",
4405
4414
  description: "Updates Sanity Studio codebase with a code modification script",
4406
- helpText: helpText$i,
4415
+ helpText: helpText$j,
4407
4416
  action: codemodAction
4408
4417
  };
4409
4418
  var lodash_isplainobject, hasRequiredLodash_isplainobject;
@@ -4586,7 +4595,7 @@ function isPinnedVersion(version2) {
4586
4595
  function trimHash(version2) {
4587
4596
  return version2.replace(/\+[a-z0-9]{8,}$/, "");
4588
4597
  }
4589
- const BASE_URL = "https://docs.sanity.io/help/";
4598
+ const BASE_URL = "https://www.sanity.io/docs/help/";
4590
4599
  function generateHelpUrl(slug) {
4591
4600
  return BASE_URL + slug;
4592
4601
  }
@@ -4871,7 +4880,7 @@ function requireGracefulFs() {
4871
4880
  if (hasRequiredGracefulFs) return gracefulFs;
4872
4881
  hasRequiredGracefulFs = 1;
4873
4882
  var fs2 = require$$0__default.default, polyfills2 = requirePolyfills(), legacy = requireLegacyStreams(), clone = requireClone(), util2 = require$$0__default$5.default, gracefulQueue, previousSymbol;
4874
- typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = Symbol.for("graceful-fs.queue"), previousSymbol = Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
4883
+ typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
4875
4884
  function noop2() {
4876
4885
  }
4877
4886
  function publishQueue(context, queue3) {
@@ -6096,7 +6105,7 @@ function normalizePath(input2) {
6096
6105
  const sanityDocsPrefix = "https://www.sanity.io";
6097
6106
  return input2.startsWith(sanityDocsPrefix) ? input2.replace(sanityDocsPrefix, "") : input2;
6098
6107
  }
6099
- const helpText$h = `
6108
+ const helpText$i = `
6100
6109
  Arguments
6101
6110
  <path> Path or URL to article, found in search results and docs content as links
6102
6111
 
@@ -6114,13 +6123,13 @@ Examples
6114
6123
  `, readCommand = {
6115
6124
  name: "read",
6116
6125
  group: "docs",
6117
- helpText: helpText$h,
6126
+ helpText: helpText$i,
6118
6127
  signature: "<path|url> [-w, --web]",
6119
6128
  description: "Read an article in terminal",
6120
6129
  async action(args, context) {
6121
6130
  const { output } = context, flags = args.extOptions, input2 = args.argsWithoutOptions[0];
6122
6131
  if (!input2 || typeof input2 != "string") {
6123
- output.error("Please provide an article path or URL"), output.print(""), output.print(helpText$h), process.exit(1);
6132
+ output.error("Please provide an article path or URL"), output.print(""), output.print(helpText$i), process.exit(1);
6124
6133
  return;
6125
6134
  }
6126
6135
  const path2 = normalizePath(input2);
@@ -6150,7 +6159,7 @@ async function searchDocs(options2, context) {
6150
6159
  const results = await response.json();
6151
6160
  return Array.isArray(results) ? results.slice(0, limit) : [];
6152
6161
  }
6153
- const isInteractive$1 = process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env), helpText$g = `
6162
+ const isInteractive$1 = process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env), helpText$h = `
6154
6163
  Arguments
6155
6164
  <query> Search query for documentation
6156
6165
 
@@ -6171,7 +6180,7 @@ Examples
6171
6180
  }, searchCommand = {
6172
6181
  name: "search",
6173
6182
  group: "docs",
6174
- helpText: helpText$g,
6183
+ helpText: helpText$h,
6175
6184
  signature: "<query> [--limit <limit>]",
6176
6185
  description: "Search Sanity docs",
6177
6186
  async action(args, context) {
@@ -6225,7 +6234,7 @@ Found ${results.length} result(s):
6225
6234
  }
6226
6235
  }
6227
6236
  }
6228
- }, helpText$f = `
6237
+ }, helpText$g = `
6229
6238
  Options
6230
6239
  --port <port> Port to start emulator on
6231
6240
  --open Open dev server in a new browser tab
@@ -6249,7 +6258,7 @@ Examples
6249
6258
  }, devFunctionsCommand = {
6250
6259
  name: "dev",
6251
6260
  group: "functions",
6252
- helpText: helpText$f,
6261
+ helpText: helpText$g,
6253
6262
  signature: "[--host <host> --port <port> --open]",
6254
6263
  description: "Start the Sanity Function emulator",
6255
6264
  async action(args, context) {
@@ -6271,7 +6280,7 @@ Examples
6271
6280
  if (!success) throw new Error(error2);
6272
6281
  shouldOpen && await open(`http://${flags.host}:${flags.port}`);
6273
6282
  }
6274
- }, helpText$e = `
6283
+ }, helpText$f = `
6275
6284
  Commands
6276
6285
  add Add or update an environment variable
6277
6286
  list List the environment variables
@@ -6294,7 +6303,7 @@ Examples
6294
6303
  `, envFunctionsCommand = {
6295
6304
  name: "env",
6296
6305
  group: "functions",
6297
- helpText: helpText$e,
6306
+ helpText: helpText$f,
6298
6307
  signature: "<add|list|remove> <name> [key] [value]",
6299
6308
  description: "Add or remove an environment variable or list environment variables for a Sanity function",
6300
6309
  async action(args, context) {
@@ -6350,7 +6359,7 @@ Examples
6350
6359
  signature: "[COMMAND]",
6351
6360
  isGroupRoot: !0,
6352
6361
  description: "Manage, test, and observe Sanity Functions"
6353
- }, helpText$d = `
6362
+ }, helpText$e = `
6354
6363
  Arguments
6355
6364
  <name> The name of the Function to retrieve logs for
6356
6365
 
@@ -6387,7 +6396,7 @@ Examples
6387
6396
  }, logsFunctionsCommand = {
6388
6397
  name: "logs",
6389
6398
  group: "functions",
6390
- helpText: helpText$d,
6399
+ helpText: helpText$e,
6391
6400
  signature: "<name> [--limit <number>] [--json] [--utc] [--delete [--force]] [--watch]",
6392
6401
  description: "Retrieve or delete logs for a Sanity Function",
6393
6402
  async action(args, context) {
@@ -6412,7 +6421,7 @@ Examples
6412
6421
  });
6413
6422
  if (!success) throw new Error(error2);
6414
6423
  }
6415
- }, helpText$c = `
6424
+ }, helpText$d = `
6416
6425
  Arguments
6417
6426
  <name> The name of the Sanity Function
6418
6427
 
@@ -6454,7 +6463,7 @@ Examples
6454
6463
  }, testFunctionsCommand = {
6455
6464
  name: "test",
6456
6465
  group: "functions",
6457
- helpText: helpText$c,
6466
+ helpText: helpText$d,
6458
6467
  signature: "<name> [--event create|update|delete] [--data <json>] [--data-before <json>] [--data-after <json>] [--file <filename>] [--file-before <filename>] [--file-after <filename>] [--document-id <id>] [--document-id-before <id>] [--document-id-before <id>] [--timeout <seconds>] [--api <version>] [--dataset <name>] [--project-id <id>] [--media-library-id <id>] [--with-user-token]",
6459
6468
  description: "Invoke a local Sanity Function",
6460
6469
  async action(args, context) {
@@ -6561,11 +6570,11 @@ const commonMistakes = { get: "list" }, levenThreshold = 3, coreCommands = [
6561
6570
  "undeploy",
6562
6571
  "uninstall",
6563
6572
  "users"
6564
- ], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$b = `
6573
+ ], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$c = `
6565
6574
  Run the command again within a Sanity project directory, where "sanity"
6566
6575
  is installed as a dependency.`;
6567
6576
  function getNoSuchCommandText(cmdName, parentGroupName, groups) {
6568
- return parentGroupName && groups && groups[parentGroupName] ? suggestCommand(cmdName, groups[parentGroupName], parentGroupName) : coreCommands.includes(cmdName) ? `Command "${cmdName}" is not available outside of a Sanity project context.${helpText$b}` : suggestCommand(cmdName, groups ? groups.default : []);
6577
+ return parentGroupName && groups && groups[parentGroupName] ? suggestCommand(cmdName, groups[parentGroupName], parentGroupName) : coreCommands.includes(cmdName) ? `Command "${cmdName}" is not available outside of a Sanity project context.${helpText$c}` : suggestCommand(cmdName, groups ? groups.default : []);
6569
6578
  }
6570
6579
  function suggestCommand(cmdName, group, parentGroupName = null) {
6571
6580
  const closest = group.filter((command2) => !discouragedCommands.includes(command2.name)).map((command2) => leven(command2.name, cmdName)).reduce(
@@ -8333,11 +8342,11 @@ function requireTomlParser() {
8333
8342
  function isAlphaNumHyphen(cp) {
8334
8343
  return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN;
8335
8344
  }
8336
- const _type = Symbol("type"), _declared = Symbol("declared"), hasOwnProperty = Object.prototype.hasOwnProperty, defineProperty = Object.defineProperty, descriptor = { configurable: !0, enumerable: !0, writable: !0, value: void 0 };
8345
+ const _type = /* @__PURE__ */ Symbol("type"), _declared = /* @__PURE__ */ Symbol("declared"), hasOwnProperty = Object.prototype.hasOwnProperty, defineProperty = Object.defineProperty, descriptor = { configurable: !0, enumerable: !0, writable: !0, value: void 0 };
8337
8346
  function hasKey(obj, key2) {
8338
8347
  return hasOwnProperty.call(obj, key2) ? !0 : (key2 === "__proto__" && defineProperty(obj, "__proto__", descriptor), !1);
8339
8348
  }
8340
- const INLINE_TABLE = Symbol("inline-table");
8349
+ const INLINE_TABLE = /* @__PURE__ */ Symbol("inline-table");
8341
8350
  function InlineTable() {
8342
8351
  return Object.defineProperties({}, {
8343
8352
  [_type]: { value: INLINE_TABLE }
@@ -8346,7 +8355,7 @@ function requireTomlParser() {
8346
8355
  function isInlineTable(obj) {
8347
8356
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INLINE_TABLE;
8348
8357
  }
8349
- const TABLE = Symbol("table");
8358
+ const TABLE = /* @__PURE__ */ Symbol("table");
8350
8359
  function Table() {
8351
8360
  return Object.defineProperties({}, {
8352
8361
  [_type]: { value: TABLE },
@@ -8356,7 +8365,7 @@ function requireTomlParser() {
8356
8365
  function isTable(obj) {
8357
8366
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === TABLE;
8358
8367
  }
8359
- const _contentType = Symbol("content-type"), INLINE_LIST = Symbol("inline-list");
8368
+ const _contentType = /* @__PURE__ */ Symbol("content-type"), INLINE_LIST = /* @__PURE__ */ Symbol("inline-list");
8360
8369
  function InlineList(type2) {
8361
8370
  return Object.defineProperties([], {
8362
8371
  [_type]: { value: INLINE_LIST },
@@ -8366,7 +8375,7 @@ function requireTomlParser() {
8366
8375
  function isInlineList(obj) {
8367
8376
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INLINE_LIST;
8368
8377
  }
8369
- const LIST = Symbol("list");
8378
+ const LIST = /* @__PURE__ */ Symbol("list");
8370
8379
  function List() {
8371
8380
  return Object.defineProperties([], {
8372
8381
  [_type]: { value: LIST }
@@ -8406,7 +8415,7 @@ function requireTomlParser() {
8406
8415
  return this.value;
8407
8416
  }
8408
8417
  }
8409
- const INTEGER = Symbol("integer");
8418
+ const INTEGER = /* @__PURE__ */ Symbol("integer");
8410
8419
  function Integer(value) {
8411
8420
  let num = Number(value);
8412
8421
  return Object.is(num, -0) && (num = 0), loadEnv.commonjsGlobal.BigInt && !Number.isSafeInteger(num) ? new BoxedBigInt(value) : Object.defineProperties(new Number(num), {
@@ -8420,7 +8429,7 @@ function requireTomlParser() {
8420
8429
  function isInteger(obj) {
8421
8430
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INTEGER;
8422
8431
  }
8423
- const FLOAT = Symbol("float");
8432
+ const FLOAT = /* @__PURE__ */ Symbol("float");
8424
8433
  function Float(value) {
8425
8434
  return Object.defineProperties(new Number(value), {
8426
8435
  [_type]: { value: FLOAT },
@@ -14667,7 +14676,7 @@ function requireMinimatch() {
14667
14676
  minimatch_1 = minimatch2;
14668
14677
  const path2 = requirePath$1();
14669
14678
  minimatch2.sep = path2.sep;
14670
- const GLOBSTAR2 = Symbol("globstar **");
14679
+ const GLOBSTAR2 = /* @__PURE__ */ Symbol("globstar **");
14671
14680
  minimatch2.GLOBSTAR = GLOBSTAR2;
14672
14681
  const expand2 = requireBraceExpansion(), plTypes = {
14673
14682
  "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
@@ -14696,7 +14705,7 @@ function requireMinimatch() {
14696
14705
  throw new TypeError("invalid pattern");
14697
14706
  if (pattern.length > MAX_PATTERN_LENGTH2)
14698
14707
  throw new TypeError("pattern is too long");
14699
- }, SUBPARSE = Symbol("subparse");
14708
+ }, SUBPARSE = /* @__PURE__ */ Symbol("subparse");
14700
14709
  minimatch2.makeRe = (pattern, options2) => new Minimatch2(pattern, options2 || {}).makeRe(), minimatch2.match = (list2, pattern, options2 = {}) => {
14701
14710
  const mm = new Minimatch2(pattern, options2);
14702
14711
  return list2 = list2.filter((f) => mm.match(f)), mm.options.nonull && !list2.length && list2.push(pattern), list2;
@@ -22223,7 +22232,7 @@ function requireMinipass$1() {
22223
22232
  const proc2 = typeof process == "object" && process ? process : {
22224
22233
  stdout: null,
22225
22234
  stderr: null
22226
- }, EE = require$$0__default$7.default, Stream2 = require$$0__default$4.default, SD = require$$2__default.default.StringDecoder, EOF2 = Symbol("EOF"), MAYBE_EMIT_END2 = Symbol("maybeEmitEnd"), EMITTED_END2 = Symbol("emittedEnd"), EMITTING_END2 = Symbol("emittingEnd"), EMITTED_ERROR2 = Symbol("emittedError"), CLOSED2 = Symbol("closed"), READ2 = Symbol("read"), FLUSH2 = Symbol("flush"), FLUSHCHUNK2 = Symbol("flushChunk"), ENCODING2 = Symbol("encoding"), DECODER2 = Symbol("decoder"), FLOWING2 = Symbol("flowing"), PAUSED2 = Symbol("paused"), RESUME2 = Symbol("resume"), BUFFER2 = Symbol("buffer"), PIPES2 = Symbol("pipes"), BUFFERLENGTH2 = Symbol("bufferLength"), BUFFERPUSH2 = Symbol("bufferPush"), BUFFERSHIFT2 = Symbol("bufferShift"), OBJECTMODE2 = Symbol("objectMode"), DESTROYED2 = Symbol("destroyed"), ERROR2 = Symbol("error"), EMITDATA2 = Symbol("emitData"), EMITEND3 = Symbol("emitEnd"), EMITEND22 = Symbol("emitEnd2"), ASYNC2 = Symbol("async"), ABORT2 = Symbol("abort"), ABORTED2 = Symbol("aborted"), SIGNAL2 = Symbol("signal"), defer2 = (fn) => Promise.resolve().then(fn), doIter = loadEnv.commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), ITERATOR = doIter && Symbol.iterator || Symbol("iterator not implemented"), isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView2 = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
22235
+ }, EE = require$$0__default$7.default, Stream2 = require$$0__default$4.default, SD = require$$2__default.default.StringDecoder, EOF2 = /* @__PURE__ */ Symbol("EOF"), MAYBE_EMIT_END2 = /* @__PURE__ */ Symbol("maybeEmitEnd"), EMITTED_END2 = /* @__PURE__ */ Symbol("emittedEnd"), EMITTING_END2 = /* @__PURE__ */ Symbol("emittingEnd"), EMITTED_ERROR2 = /* @__PURE__ */ Symbol("emittedError"), CLOSED2 = /* @__PURE__ */ Symbol("closed"), READ2 = /* @__PURE__ */ Symbol("read"), FLUSH2 = /* @__PURE__ */ Symbol("flush"), FLUSHCHUNK2 = /* @__PURE__ */ Symbol("flushChunk"), ENCODING2 = /* @__PURE__ */ Symbol("encoding"), DECODER2 = /* @__PURE__ */ Symbol("decoder"), FLOWING2 = /* @__PURE__ */ Symbol("flowing"), PAUSED2 = /* @__PURE__ */ Symbol("paused"), RESUME2 = /* @__PURE__ */ Symbol("resume"), BUFFER2 = /* @__PURE__ */ Symbol("buffer"), PIPES2 = /* @__PURE__ */ Symbol("pipes"), BUFFERLENGTH2 = /* @__PURE__ */ Symbol("bufferLength"), BUFFERPUSH2 = /* @__PURE__ */ Symbol("bufferPush"), BUFFERSHIFT2 = /* @__PURE__ */ Symbol("bufferShift"), OBJECTMODE2 = /* @__PURE__ */ Symbol("objectMode"), DESTROYED2 = /* @__PURE__ */ Symbol("destroyed"), ERROR2 = /* @__PURE__ */ Symbol("error"), EMITDATA2 = /* @__PURE__ */ Symbol("emitData"), EMITEND3 = /* @__PURE__ */ Symbol("emitEnd"), EMITEND22 = /* @__PURE__ */ Symbol("emitEnd2"), ASYNC2 = /* @__PURE__ */ Symbol("async"), ABORT2 = /* @__PURE__ */ Symbol("abort"), ABORTED2 = /* @__PURE__ */ Symbol("aborted"), SIGNAL2 = /* @__PURE__ */ Symbol("signal"), defer2 = (fn) => Promise.resolve().then(fn), doIter = loadEnv.commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", ASYNCITERATOR = doIter && Symbol.asyncIterator || /* @__PURE__ */ Symbol("asyncIterator not implemented"), ITERATOR = doIter && Symbol.iterator || /* @__PURE__ */ Symbol("iterator not implemented"), isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView2 = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
22227
22236
  class Pipe2 {
22228
22237
  constructor(src, dest, opts) {
22229
22238
  this.src = src, this.dest = dest, this.opts = opts, this.ondrain = () => src[RESUME2](), dest.on("drain", this.ondrain);
@@ -22622,7 +22631,7 @@ function requireMinipass() {
22622
22631
  const proc2 = typeof process == "object" && process ? process : {
22623
22632
  stdout: null,
22624
22633
  stderr: null
22625
- }, EE = require$$0__default$7.default, Stream2 = require$$0__default$4.default, SD = require$$2__default.default.StringDecoder, EOF2 = Symbol("EOF"), MAYBE_EMIT_END2 = Symbol("maybeEmitEnd"), EMITTED_END2 = Symbol("emittedEnd"), EMITTING_END2 = Symbol("emittingEnd"), EMITTED_ERROR2 = Symbol("emittedError"), CLOSED2 = Symbol("closed"), READ2 = Symbol("read"), FLUSH2 = Symbol("flush"), FLUSHCHUNK2 = Symbol("flushChunk"), ENCODING2 = Symbol("encoding"), DECODER2 = Symbol("decoder"), FLOWING2 = Symbol("flowing"), PAUSED2 = Symbol("paused"), RESUME2 = Symbol("resume"), BUFFERLENGTH2 = Symbol("bufferLength"), BUFFERPUSH2 = Symbol("bufferPush"), BUFFERSHIFT2 = Symbol("bufferShift"), OBJECTMODE2 = Symbol("objectMode"), DESTROYED2 = Symbol("destroyed"), EMITDATA2 = Symbol("emitData"), EMITEND3 = Symbol("emitEnd"), EMITEND22 = Symbol("emitEnd2"), ASYNC2 = Symbol("async"), defer2 = (fn) => Promise.resolve().then(fn), doIter = loadEnv.commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), ITERATOR = doIter && Symbol.iterator || Symbol("iterator not implemented"), isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView2 = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
22634
+ }, EE = require$$0__default$7.default, Stream2 = require$$0__default$4.default, SD = require$$2__default.default.StringDecoder, EOF2 = /* @__PURE__ */ Symbol("EOF"), MAYBE_EMIT_END2 = /* @__PURE__ */ Symbol("maybeEmitEnd"), EMITTED_END2 = /* @__PURE__ */ Symbol("emittedEnd"), EMITTING_END2 = /* @__PURE__ */ Symbol("emittingEnd"), EMITTED_ERROR2 = /* @__PURE__ */ Symbol("emittedError"), CLOSED2 = /* @__PURE__ */ Symbol("closed"), READ2 = /* @__PURE__ */ Symbol("read"), FLUSH2 = /* @__PURE__ */ Symbol("flush"), FLUSHCHUNK2 = /* @__PURE__ */ Symbol("flushChunk"), ENCODING2 = /* @__PURE__ */ Symbol("encoding"), DECODER2 = /* @__PURE__ */ Symbol("decoder"), FLOWING2 = /* @__PURE__ */ Symbol("flowing"), PAUSED2 = /* @__PURE__ */ Symbol("paused"), RESUME2 = /* @__PURE__ */ Symbol("resume"), BUFFERLENGTH2 = /* @__PURE__ */ Symbol("bufferLength"), BUFFERPUSH2 = /* @__PURE__ */ Symbol("bufferPush"), BUFFERSHIFT2 = /* @__PURE__ */ Symbol("bufferShift"), OBJECTMODE2 = /* @__PURE__ */ Symbol("objectMode"), DESTROYED2 = /* @__PURE__ */ Symbol("destroyed"), EMITDATA2 = /* @__PURE__ */ Symbol("emitData"), EMITEND3 = /* @__PURE__ */ Symbol("emitEnd"), EMITEND22 = /* @__PURE__ */ Symbol("emitEnd2"), ASYNC2 = /* @__PURE__ */ Symbol("async"), defer2 = (fn) => Promise.resolve().then(fn), doIter = loadEnv.commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", ASYNCITERATOR = doIter && Symbol.asyncIterator || /* @__PURE__ */ Symbol("asyncIterator not implemented"), ITERATOR = doIter && Symbol.iterator || /* @__PURE__ */ Symbol("iterator not implemented"), isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView2 = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
22626
22635
  class Pipe2 {
22627
22636
  constructor(src, dest, opts) {
22628
22637
  this.src = src, this.dest = dest, this.opts = opts, this.ondrain = () => src[RESUME2](), dest.on("drain", this.ondrain);
@@ -22871,7 +22880,7 @@ var hasRequiredMinizlib;
22871
22880
  function requireMinizlib() {
22872
22881
  if (hasRequiredMinizlib) return minizlib;
22873
22882
  hasRequiredMinizlib = 1;
22874
- const assert = require$$0__default$6.default, Buffer2 = require$$0__default$9.default.Buffer, realZlib = require$$0__default$a.default, constants2 = minizlib.constants = requireConstants(), Minipass2 = requireMinipass(), OriginalBufferConcat = Buffer2.concat, _superWrite = Symbol("_superWrite");
22883
+ const assert = require$$0__default$6.default, Buffer2 = require$$0__default$9.default.Buffer, realZlib = require$$0__default$a.default, constants2 = minizlib.constants = requireConstants(), Minipass2 = requireMinipass(), OriginalBufferConcat = Buffer2.concat, _superWrite = /* @__PURE__ */ Symbol("_superWrite");
22875
22884
  class ZlibError extends Error {
22876
22885
  constructor(err) {
22877
22886
  super("zlib: " + err.message), this.code = err.code, this.errno = err.errno, this.code || (this.code = "ZLIB_ERROR"), this.message = "zlib: " + err.message, Error.captureStackTrace(this, this.constructor);
@@ -22880,7 +22889,7 @@ function requireMinizlib() {
22880
22889
  return "ZlibError";
22881
22890
  }
22882
22891
  }
22883
- const _opts = Symbol("opts"), _flushFlag = Symbol("flushFlag"), _finishFlushFlag = Symbol("finishFlushFlag"), _fullFlushFlag = Symbol("fullFlushFlag"), _handle = Symbol("handle"), _onError = Symbol("onError"), _sawError = Symbol("sawError"), _level = Symbol("level"), _strategy = Symbol("strategy"), _ended = Symbol("ended");
22892
+ const _opts = /* @__PURE__ */ Symbol("opts"), _flushFlag = /* @__PURE__ */ Symbol("flushFlag"), _finishFlushFlag = /* @__PURE__ */ Symbol("finishFlushFlag"), _fullFlushFlag = /* @__PURE__ */ Symbol("fullFlushFlag"), _handle = /* @__PURE__ */ Symbol("handle"), _onError = /* @__PURE__ */ Symbol("onError"), _sawError = /* @__PURE__ */ Symbol("sawError"), _level = /* @__PURE__ */ Symbol("level"), _strategy = /* @__PURE__ */ Symbol("strategy"), _ended = /* @__PURE__ */ Symbol("ended");
22884
22893
  class ZlibBase extends Minipass2 {
22885
22894
  constructor(opts, mode2) {
22886
22895
  if (!opts || typeof opts != "object")
@@ -22981,7 +22990,7 @@ function requireMinizlib() {
22981
22990
  super(opts, "Inflate");
22982
22991
  }
22983
22992
  }
22984
- const _portable = Symbol("_portable");
22993
+ const _portable = /* @__PURE__ */ Symbol("_portable");
22985
22994
  class Gzip extends Zlib {
22986
22995
  constructor(opts) {
22987
22996
  super(opts, "Gzip"), this[_portable] = opts && !!opts.portable;
@@ -23039,7 +23048,7 @@ var readEntry, hasRequiredReadEntry;
23039
23048
  function requireReadEntry() {
23040
23049
  if (hasRequiredReadEntry) return readEntry;
23041
23050
  hasRequiredReadEntry = 1;
23042
- const { Minipass: Minipass2 } = requireMinipass$1(), normPath = requireNormalizeWindowsPath(), SLURP = Symbol("slurp");
23051
+ const { Minipass: Minipass2 } = requireMinipass$1(), normPath = requireNormalizeWindowsPath(), SLURP = /* @__PURE__ */ Symbol("slurp");
23043
23052
  return readEntry = class extends Minipass2 {
23044
23053
  constructor(header2, ex, gex) {
23045
23054
  switch (super(), this.pause(), this.extended = ex, this.globalExtended = gex, this.header = header2, this.startBlockSize = 512 * Math.ceil(header2.size / 512), this.blockRemain = this.startBlockSize, this.remain = header2.size, this.type = header2.type, this.meta = !1, this.ignore = !1, this.type) {
@@ -23176,7 +23185,7 @@ var header, hasRequiredHeader;
23176
23185
  function requireHeader() {
23177
23186
  if (hasRequiredHeader) return header;
23178
23187
  hasRequiredHeader = 1;
23179
- const types2 = requireTypes$1(), pathModule = require$$0__default$1.default.posix, large = requireLargeNumbers(), SLURP = Symbol("slurp"), TYPE = Symbol("type");
23188
+ const types2 = requireTypes$1(), pathModule = require$$0__default$1.default.posix, large = requireLargeNumbers(), SLURP = /* @__PURE__ */ Symbol("slurp"), TYPE = /* @__PURE__ */ Symbol("type");
23180
23189
  class Header {
23181
23190
  constructor(data, off, ex, gex) {
23182
23191
  this.cksumValid = !1, this.needPax = !1, this.nullBlock = !1, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[TYPE] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(data) ? this.decode(data, off || 0, ex, gex) : data && this.set(data);
@@ -23372,7 +23381,7 @@ var writeEntry, hasRequiredWriteEntry;
23372
23381
  function requireWriteEntry() {
23373
23382
  if (hasRequiredWriteEntry) return writeEntry;
23374
23383
  hasRequiredWriteEntry = 1;
23375
- const { Minipass: Minipass2 } = requireMinipass$1(), Pax = requirePax(), Header = requireHeader(), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), prefixPath = (path3, prefix) => prefix ? (path3 = normPath(path3).replace(/^\.(\/|$)/, ""), stripSlash(prefix) + "/" + path3) : normPath(path3), maxReadSize = 16 * 1024 * 1024, PROCESS2 = Symbol("process"), FILE = Symbol("file"), DIRECTORY = Symbol("directory"), SYMLINK = Symbol("symlink"), HARDLINK = Symbol("hardlink"), HEADER = Symbol("header"), READ2 = Symbol("read"), LSTAT = Symbol("lstat"), ONLSTAT = Symbol("onlstat"), ONREAD = Symbol("onread"), ONREADLINK = Symbol("onreadlink"), OPENFILE = Symbol("openfile"), ONOPENFILE = Symbol("onopenfile"), CLOSE = Symbol("close"), MODE = Symbol("mode"), AWAITDRAIN = Symbol("awaitDrain"), ONDRAIN = Symbol("ondrain"), PREFIX = Symbol("prefix"), HAD_ERROR = Symbol("hadError"), warner = requireWarnMixin(), winchars2 = requireWinchars(), stripAbsolutePath2 = requireStripAbsolutePath(), modeFix2 = requireModeFix(), WriteEntry = warner(class extends Minipass2 {
23384
+ const { Minipass: Minipass2 } = requireMinipass$1(), Pax = requirePax(), Header = requireHeader(), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), prefixPath = (path3, prefix) => prefix ? (path3 = normPath(path3).replace(/^\.(\/|$)/, ""), stripSlash(prefix) + "/" + path3) : normPath(path3), maxReadSize = 16 * 1024 * 1024, PROCESS2 = /* @__PURE__ */ Symbol("process"), FILE = /* @__PURE__ */ Symbol("file"), DIRECTORY = /* @__PURE__ */ Symbol("directory"), SYMLINK = /* @__PURE__ */ Symbol("symlink"), HARDLINK = /* @__PURE__ */ Symbol("hardlink"), HEADER = /* @__PURE__ */ Symbol("header"), READ2 = /* @__PURE__ */ Symbol("read"), LSTAT = /* @__PURE__ */ Symbol("lstat"), ONLSTAT = /* @__PURE__ */ Symbol("onlstat"), ONREAD = /* @__PURE__ */ Symbol("onread"), ONREADLINK = /* @__PURE__ */ Symbol("onreadlink"), OPENFILE = /* @__PURE__ */ Symbol("openfile"), ONOPENFILE = /* @__PURE__ */ Symbol("onopenfile"), CLOSE = /* @__PURE__ */ Symbol("close"), MODE = /* @__PURE__ */ Symbol("mode"), AWAITDRAIN = /* @__PURE__ */ Symbol("awaitDrain"), ONDRAIN = /* @__PURE__ */ Symbol("ondrain"), PREFIX = /* @__PURE__ */ Symbol("prefix"), HAD_ERROR = /* @__PURE__ */ Symbol("hadError"), warner = requireWarnMixin(), winchars2 = requireWinchars(), stripAbsolutePath2 = requireStripAbsolutePath(), modeFix2 = requireModeFix(), WriteEntry = warner(class extends Minipass2 {
23376
23385
  constructor(p, opt) {
23377
23386
  if (opt = opt || {}, super(opt), typeof p != "string")
23378
23387
  throw new TypeError("path is required");
@@ -23813,7 +23822,7 @@ function requirePack() {
23813
23822
  this.path = path3 || "./", this.absolute = absolute, this.entry = null, this.stat = null, this.readdir = null, this.pending = !1, this.ignore = !1, this.piped = !1;
23814
23823
  }
23815
23824
  }
23816
- const { Minipass: Minipass2 } = requireMinipass$1(), zlib = requireMinizlib(), ReadEntry = requireReadEntry(), WriteEntry = requireWriteEntry(), WriteEntrySync = WriteEntry.Sync, WriteEntryTar = WriteEntry.Tar, Yallist = requireYallist(), EOF2 = Buffer.alloc(1024), ONSTAT = Symbol("onStat"), ENDED = Symbol("ended"), QUEUE = Symbol("queue"), CURRENT = Symbol("current"), PROCESS2 = Symbol("process"), PROCESSING = Symbol("processing"), PROCESSJOB = Symbol("processJob"), JOBS = Symbol("jobs"), JOBDONE = Symbol("jobDone"), ADDFSENTRY = Symbol("addFSEntry"), ADDTARENTRY = Symbol("addTarEntry"), STAT = Symbol("stat"), READDIR = Symbol("readdir"), ONREADDIR = Symbol("onreaddir"), PIPE = Symbol("pipe"), ENTRY = Symbol("entry"), ENTRYOPT = Symbol("entryOpt"), WRITEENTRYCLASS = Symbol("writeEntryClass"), WRITE = Symbol("write"), ONDRAIN = Symbol("ondrain"), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, warner = requireWarnMixin(), normPath = requireNormalizeWindowsPath(), Pack = warner(class extends Minipass2 {
23825
+ const { Minipass: Minipass2 } = requireMinipass$1(), zlib = requireMinizlib(), ReadEntry = requireReadEntry(), WriteEntry = requireWriteEntry(), WriteEntrySync = WriteEntry.Sync, WriteEntryTar = WriteEntry.Tar, Yallist = requireYallist(), EOF2 = Buffer.alloc(1024), ONSTAT = /* @__PURE__ */ Symbol("onStat"), ENDED = /* @__PURE__ */ Symbol("ended"), QUEUE = /* @__PURE__ */ Symbol("queue"), CURRENT = /* @__PURE__ */ Symbol("current"), PROCESS2 = /* @__PURE__ */ Symbol("process"), PROCESSING = /* @__PURE__ */ Symbol("processing"), PROCESSJOB = /* @__PURE__ */ Symbol("processJob"), JOBS = /* @__PURE__ */ Symbol("jobs"), JOBDONE = /* @__PURE__ */ Symbol("jobDone"), ADDFSENTRY = /* @__PURE__ */ Symbol("addFSEntry"), ADDTARENTRY = /* @__PURE__ */ Symbol("addTarEntry"), STAT = /* @__PURE__ */ Symbol("stat"), READDIR = /* @__PURE__ */ Symbol("readdir"), ONREADDIR = /* @__PURE__ */ Symbol("onreaddir"), PIPE = /* @__PURE__ */ Symbol("pipe"), ENTRY = /* @__PURE__ */ Symbol("entry"), ENTRYOPT = /* @__PURE__ */ Symbol("entryOpt"), WRITEENTRYCLASS = /* @__PURE__ */ Symbol("writeEntryClass"), WRITE = /* @__PURE__ */ Symbol("write"), ONDRAIN = /* @__PURE__ */ Symbol("ondrain"), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, warner = requireWarnMixin(), normPath = requireNormalizeWindowsPath(), Pack = warner(class extends Minipass2 {
23817
23826
  constructor(opt) {
23818
23827
  if (super(opt), opt = opt || /* @__PURE__ */ Object.create(null), this.opt = opt, this.file = opt.file || "", this.cwd = opt.cwd || process.cwd(), this.maxReadSize = opt.maxReadSize, this.preservePaths = !!opt.preservePaths, this.strict = !!opt.strict, this.noPax = !!opt.noPax, this.prefix = normPath(opt.prefix || ""), this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(), this.statCache = opt.statCache || /* @__PURE__ */ new Map(), this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map(), this[WRITEENTRYCLASS] = WriteEntry, typeof opt.onwarn == "function" && this.on("warn", opt.onwarn), this.portable = !!opt.portable, this.zip = null, opt.gzip || opt.brotli) {
23819
23828
  if (opt.gzip && opt.brotli)
@@ -23992,7 +24001,7 @@ function requireFsMinipass() {
23992
24001
  req.oncomplete = done, binding.writeBuffers(fd, iovec, pos2, req);
23993
24002
  };
23994
24003
  }
23995
- const _autoClose = Symbol("_autoClose"), _close = Symbol("_close"), _ended = Symbol("_ended"), _fd = Symbol("_fd"), _finished = Symbol("_finished"), _flags = Symbol("_flags"), _flush = Symbol("_flush"), _handleChunk = Symbol("_handleChunk"), _makeBuf = Symbol("_makeBuf"), _mode = Symbol("_mode"), _needDrain = Symbol("_needDrain"), _onerror = Symbol("_onerror"), _onopen = Symbol("_onopen"), _onread = Symbol("_onread"), _onwrite = Symbol("_onwrite"), _open = Symbol("_open"), _path = Symbol("_path"), _pos = Symbol("_pos"), _queue = Symbol("_queue"), _read = Symbol("_read"), _readSize = Symbol("_readSize"), _reading = Symbol("_reading"), _remain = Symbol("_remain"), _size = Symbol("_size"), _write = Symbol("_write"), _writing = Symbol("_writing"), _defaultFlag = Symbol("_defaultFlag"), _errored = Symbol("_errored");
24004
+ const _autoClose = /* @__PURE__ */ Symbol("_autoClose"), _close = /* @__PURE__ */ Symbol("_close"), _ended = /* @__PURE__ */ Symbol("_ended"), _fd = /* @__PURE__ */ Symbol("_fd"), _finished = /* @__PURE__ */ Symbol("_finished"), _flags = /* @__PURE__ */ Symbol("_flags"), _flush = /* @__PURE__ */ Symbol("_flush"), _handleChunk = /* @__PURE__ */ Symbol("_handleChunk"), _makeBuf = /* @__PURE__ */ Symbol("_makeBuf"), _mode = /* @__PURE__ */ Symbol("_mode"), _needDrain = /* @__PURE__ */ Symbol("_needDrain"), _onerror = /* @__PURE__ */ Symbol("_onerror"), _onopen = /* @__PURE__ */ Symbol("_onopen"), _onread = /* @__PURE__ */ Symbol("_onread"), _onwrite = /* @__PURE__ */ Symbol("_onwrite"), _open = /* @__PURE__ */ Symbol("_open"), _path = /* @__PURE__ */ Symbol("_path"), _pos = /* @__PURE__ */ Symbol("_pos"), _queue = /* @__PURE__ */ Symbol("_queue"), _read = /* @__PURE__ */ Symbol("_read"), _readSize = /* @__PURE__ */ Symbol("_readSize"), _reading = /* @__PURE__ */ Symbol("_reading"), _remain = /* @__PURE__ */ Symbol("_remain"), _size = /* @__PURE__ */ Symbol("_size"), _write = /* @__PURE__ */ Symbol("_write"), _writing = /* @__PURE__ */ Symbol("_writing"), _defaultFlag = /* @__PURE__ */ Symbol("_defaultFlag"), _errored = /* @__PURE__ */ Symbol("_errored");
23996
24005
  class ReadStream extends MiniPass {
23997
24006
  constructor(path2, opt) {
23998
24007
  if (opt = opt || {}, super(opt), this.readable = !0, this.writable = !1, typeof path2 != "string")
@@ -24204,7 +24213,7 @@ var parse, hasRequiredParse;
24204
24213
  function requireParse() {
24205
24214
  if (hasRequiredParse) return parse;
24206
24215
  hasRequiredParse = 1;
24207
- const warner = requireWarnMixin(), Header = requireHeader(), EE = require$$0__default$7.default, Yallist = requireYallist(), maxMetaEntrySize = 1024 * 1024, Entry = requireReadEntry(), Pax = requirePax(), zlib = requireMinizlib(), { nextTick } = require$$7__default.default, gzipHeader = Buffer.from([31, 139]), STATE = Symbol("state"), WRITEENTRY = Symbol("writeEntry"), READENTRY = Symbol("readEntry"), NEXTENTRY = Symbol("nextEntry"), PROCESSENTRY = Symbol("processEntry"), EX = Symbol("extendedHeader"), GEX = Symbol("globalExtendedHeader"), META = Symbol("meta"), EMITMETA = Symbol("emitMeta"), BUFFER2 = Symbol("buffer"), QUEUE = Symbol("queue"), ENDED = Symbol("ended"), EMITTEDEND = Symbol("emittedEnd"), EMIT = Symbol("emit"), UNZIP = Symbol("unzip"), CONSUMECHUNK = Symbol("consumeChunk"), CONSUMECHUNKSUB = Symbol("consumeChunkSub"), CONSUMEBODY = Symbol("consumeBody"), CONSUMEMETA = Symbol("consumeMeta"), CONSUMEHEADER = Symbol("consumeHeader"), CONSUMING = Symbol("consuming"), BUFFERCONCAT = Symbol("bufferConcat"), MAYBEEND = Symbol("maybeEnd"), WRITING = Symbol("writing"), ABORTED2 = Symbol("aborted"), DONE = Symbol("onDone"), SAW_VALID_ENTRY = Symbol("sawValidEntry"), SAW_NULL_BLOCK = Symbol("sawNullBlock"), SAW_EOF = Symbol("sawEOF"), CLOSESTREAM = Symbol("closeStream"), noop2 = (_) => !0;
24216
+ const warner = requireWarnMixin(), Header = requireHeader(), EE = require$$0__default$7.default, Yallist = requireYallist(), maxMetaEntrySize = 1024 * 1024, Entry = requireReadEntry(), Pax = requirePax(), zlib = requireMinizlib(), { nextTick } = require$$7__default.default, gzipHeader = Buffer.from([31, 139]), STATE = /* @__PURE__ */ Symbol("state"), WRITEENTRY = /* @__PURE__ */ Symbol("writeEntry"), READENTRY = /* @__PURE__ */ Symbol("readEntry"), NEXTENTRY = /* @__PURE__ */ Symbol("nextEntry"), PROCESSENTRY = /* @__PURE__ */ Symbol("processEntry"), EX = /* @__PURE__ */ Symbol("extendedHeader"), GEX = /* @__PURE__ */ Symbol("globalExtendedHeader"), META = /* @__PURE__ */ Symbol("meta"), EMITMETA = /* @__PURE__ */ Symbol("emitMeta"), BUFFER2 = /* @__PURE__ */ Symbol("buffer"), QUEUE = /* @__PURE__ */ Symbol("queue"), ENDED = /* @__PURE__ */ Symbol("ended"), EMITTEDEND = /* @__PURE__ */ Symbol("emittedEnd"), EMIT = /* @__PURE__ */ Symbol("emit"), UNZIP = /* @__PURE__ */ Symbol("unzip"), CONSUMECHUNK = /* @__PURE__ */ Symbol("consumeChunk"), CONSUMECHUNKSUB = /* @__PURE__ */ Symbol("consumeChunkSub"), CONSUMEBODY = /* @__PURE__ */ Symbol("consumeBody"), CONSUMEMETA = /* @__PURE__ */ Symbol("consumeMeta"), CONSUMEHEADER = /* @__PURE__ */ Symbol("consumeHeader"), CONSUMING = /* @__PURE__ */ Symbol("consuming"), BUFFERCONCAT = /* @__PURE__ */ Symbol("bufferConcat"), MAYBEEND = /* @__PURE__ */ Symbol("maybeEnd"), WRITING = /* @__PURE__ */ Symbol("writing"), ABORTED2 = /* @__PURE__ */ Symbol("aborted"), DONE = /* @__PURE__ */ Symbol("onDone"), SAW_VALID_ENTRY = /* @__PURE__ */ Symbol("sawValidEntry"), SAW_NULL_BLOCK = /* @__PURE__ */ Symbol("sawNullBlock"), SAW_EOF = /* @__PURE__ */ Symbol("sawEOF"), CLOSESTREAM = /* @__PURE__ */ Symbol("closeStream"), noop2 = (_) => !0;
24208
24217
  return parse = warner(class extends EE {
24209
24218
  constructor(opt) {
24210
24219
  opt = opt || {}, super(opt), this.file = opt.file || "", this[SAW_VALID_ENTRY] = null, this.on(DONE, (_) => {
@@ -25107,7 +25116,7 @@ var unpack, hasRequiredUnpack;
25107
25116
  function requireUnpack() {
25108
25117
  if (hasRequiredUnpack) return unpack;
25109
25118
  hasRequiredUnpack = 1;
25110
- const assert = require$$0__default$6.default, Parser = requireParse(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), path2 = require$$0__default$1.default, mkdir2 = requireMkdir(), wc = requireWinchars(), pathReservations2 = requirePathReservations(), stripAbsolutePath2 = requireStripAbsolutePath(), normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), normalize2 = requireNormalizeUnicode(), ONENTRY = Symbol("onEntry"), CHECKFS = Symbol("checkFs"), CHECKFS2 = Symbol("checkFs2"), PRUNECACHE = Symbol("pruneCache"), ISREUSABLE = Symbol("isReusable"), MAKEFS = Symbol("makeFs"), FILE = Symbol("file"), DIRECTORY = Symbol("directory"), LINK = Symbol("link"), SYMLINK = Symbol("symlink"), HARDLINK = Symbol("hardlink"), UNSUPPORTED = Symbol("unsupported"), CHECKPATH = Symbol("checkPath"), MKDIR = Symbol("mkdir"), ONERROR = Symbol("onError"), PENDING = Symbol("pending"), PEND = Symbol("pend"), UNPEND = Symbol("unpend"), ENDED = Symbol("ended"), MAYBECLOSE = Symbol("maybeClose"), SKIP = Symbol("skip"), DOCHOWN = Symbol("doChown"), UID = Symbol("uid"), GID = Symbol("gid"), CHECKED_CWD = Symbol("checkedCwd"), crypto = require$$3__default.default, getFlag = requireGetWriteFlag(), isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", DEFAULT_MAX_DEPTH = 1024, unlinkFile = (path3, cb) => {
25119
+ const assert = require$$0__default$6.default, Parser = requireParse(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), path2 = require$$0__default$1.default, mkdir2 = requireMkdir(), wc = requireWinchars(), pathReservations2 = requirePathReservations(), stripAbsolutePath2 = requireStripAbsolutePath(), normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), normalize2 = requireNormalizeUnicode(), ONENTRY = /* @__PURE__ */ Symbol("onEntry"), CHECKFS = /* @__PURE__ */ Symbol("checkFs"), CHECKFS2 = /* @__PURE__ */ Symbol("checkFs2"), PRUNECACHE = /* @__PURE__ */ Symbol("pruneCache"), ISREUSABLE = /* @__PURE__ */ Symbol("isReusable"), MAKEFS = /* @__PURE__ */ Symbol("makeFs"), FILE = /* @__PURE__ */ Symbol("file"), DIRECTORY = /* @__PURE__ */ Symbol("directory"), LINK = /* @__PURE__ */ Symbol("link"), SYMLINK = /* @__PURE__ */ Symbol("symlink"), HARDLINK = /* @__PURE__ */ Symbol("hardlink"), UNSUPPORTED = /* @__PURE__ */ Symbol("unsupported"), CHECKPATH = /* @__PURE__ */ Symbol("checkPath"), MKDIR = /* @__PURE__ */ Symbol("mkdir"), ONERROR = /* @__PURE__ */ Symbol("onError"), PENDING = /* @__PURE__ */ Symbol("pending"), PEND = /* @__PURE__ */ Symbol("pend"), UNPEND = /* @__PURE__ */ Symbol("unpend"), ENDED = /* @__PURE__ */ Symbol("ended"), MAYBECLOSE = /* @__PURE__ */ Symbol("maybeClose"), SKIP = /* @__PURE__ */ Symbol("skip"), DOCHOWN = /* @__PURE__ */ Symbol("doChown"), UID = /* @__PURE__ */ Symbol("uid"), GID = /* @__PURE__ */ Symbol("gid"), CHECKED_CWD = /* @__PURE__ */ Symbol("checkedCwd"), crypto = require$$3__default.default, getFlag = requireGetWriteFlag(), isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", DEFAULT_MAX_DEPTH = 1024, unlinkFile = (path3, cb) => {
25111
25120
  if (!isWindows)
25112
25121
  return fs2.unlink(path3, cb);
25113
25122
  const name = path3 + ".DELETE." + crypto.randomBytes(16).toString("hex");
@@ -37398,7 +37407,7 @@ const escape = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ?
37398
37407
  posix: { sep: "/" }
37399
37408
  }, sep = defaultPlatform$2 === "win32" ? path.win32.sep : path.posix.sep;
37400
37409
  minimatch.sep = sep;
37401
- const GLOBSTAR = Symbol("globstar **");
37410
+ const GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
37402
37411
  minimatch.GLOBSTAR = GLOBSTAR;
37403
37412
  const qmark = "[^/]", star$1 = qmark + "*?", twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?", filter$1 = (pattern, options2 = {}) => (p) => minimatch(p, pattern, options2);
37404
37413
  minimatch.filter = filter$1;
@@ -38718,7 +38727,7 @@ const proc = typeof process == "object" && process ? process : {
38718
38727
  stdout: null,
38719
38728
  stderr: null
38720
38729
  }, isStream = (s) => !!s && typeof s == "object" && (s instanceof Minipass || s instanceof Stream__default.default || isReadable(s) || isWritable(s)), isReadable = (s) => !!s && typeof s == "object" && s instanceof node_events.EventEmitter && typeof s.pipe == "function" && // node core Writable streams have a pipe() method, but it throws
38721
- s.pipe !== Stream__default.default.Writable.prototype.pipe, isWritable = (s) => !!s && typeof s == "object" && s instanceof node_events.EventEmitter && typeof s.write == "function" && typeof s.end == "function", EOF = Symbol("EOF"), MAYBE_EMIT_END = Symbol("maybeEmitEnd"), EMITTED_END = Symbol("emittedEnd"), EMITTING_END = Symbol("emittingEnd"), EMITTED_ERROR = Symbol("emittedError"), CLOSED = Symbol("closed"), READ = Symbol("read"), FLUSH = Symbol("flush"), FLUSHCHUNK = Symbol("flushChunk"), ENCODING = Symbol("encoding"), DECODER = Symbol("decoder"), FLOWING = Symbol("flowing"), PAUSED = Symbol("paused"), RESUME = Symbol("resume"), BUFFER = Symbol("buffer"), PIPES = Symbol("pipes"), BUFFERLENGTH = Symbol("bufferLength"), BUFFERPUSH = Symbol("bufferPush"), BUFFERSHIFT = Symbol("bufferShift"), OBJECTMODE = Symbol("objectMode"), DESTROYED = Symbol("destroyed"), ERROR = Symbol("error"), EMITDATA = Symbol("emitData"), EMITEND = Symbol("emitEnd"), EMITEND2 = Symbol("emitEnd2"), ASYNC = Symbol("async"), ABORT = Symbol("abort"), ABORTED = Symbol("aborted"), SIGNAL = Symbol("signal"), DATALISTENERS = Symbol("dataListeners"), DISCARDED = Symbol("discarded"), defer$1 = (fn) => Promise.resolve().then(fn), nodefer = (fn) => fn(), isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
38730
+ s.pipe !== Stream__default.default.Writable.prototype.pipe, isWritable = (s) => !!s && typeof s == "object" && s instanceof node_events.EventEmitter && typeof s.write == "function" && typeof s.end == "function", EOF = /* @__PURE__ */ Symbol("EOF"), MAYBE_EMIT_END = /* @__PURE__ */ Symbol("maybeEmitEnd"), EMITTED_END = /* @__PURE__ */ Symbol("emittedEnd"), EMITTING_END = /* @__PURE__ */ Symbol("emittingEnd"), EMITTED_ERROR = /* @__PURE__ */ Symbol("emittedError"), CLOSED = /* @__PURE__ */ Symbol("closed"), READ = /* @__PURE__ */ Symbol("read"), FLUSH = /* @__PURE__ */ Symbol("flush"), FLUSHCHUNK = /* @__PURE__ */ Symbol("flushChunk"), ENCODING = /* @__PURE__ */ Symbol("encoding"), DECODER = /* @__PURE__ */ Symbol("decoder"), FLOWING = /* @__PURE__ */ Symbol("flowing"), PAUSED = /* @__PURE__ */ Symbol("paused"), RESUME = /* @__PURE__ */ Symbol("resume"), BUFFER = /* @__PURE__ */ Symbol("buffer"), PIPES = /* @__PURE__ */ Symbol("pipes"), BUFFERLENGTH = /* @__PURE__ */ Symbol("bufferLength"), BUFFERPUSH = /* @__PURE__ */ Symbol("bufferPush"), BUFFERSHIFT = /* @__PURE__ */ Symbol("bufferShift"), OBJECTMODE = /* @__PURE__ */ Symbol("objectMode"), DESTROYED = /* @__PURE__ */ Symbol("destroyed"), ERROR = /* @__PURE__ */ Symbol("error"), EMITDATA = /* @__PURE__ */ Symbol("emitData"), EMITEND = /* @__PURE__ */ Symbol("emitEnd"), EMITEND2 = /* @__PURE__ */ Symbol("emitEnd2"), ASYNC = /* @__PURE__ */ Symbol("async"), ABORT = /* @__PURE__ */ Symbol("abort"), ABORTED = /* @__PURE__ */ Symbol("aborted"), SIGNAL = /* @__PURE__ */ Symbol("signal"), DATALISTENERS = /* @__PURE__ */ Symbol("dataListeners"), DISCARDED = /* @__PURE__ */ Symbol("discarded"), defer$1 = (fn) => Promise.resolve().then(fn), nodefer = (fn) => fn(), isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
38722
38731
  class Pipe {
38723
38732
  src;
38724
38733
  dest;
@@ -39321,7 +39330,7 @@ class ChildrenCache extends LRUCache {
39321
39330
  });
39322
39331
  }
39323
39332
  }
39324
- const setAsCwd = Symbol("PathScurry setAsCwd");
39333
+ const setAsCwd = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
39325
39334
  class PathBase {
39326
39335
  /**
39327
39336
  * the basename of this path
@@ -41692,7 +41701,7 @@ const pathArg = (path2, opt = {}) => {
41692
41701
  return rimrafMoveRemoveSync(path2, options2);
41693
41702
  throw er;
41694
41703
  }
41695
- }, START = Symbol("start"), CHILD = Symbol("child"), FINISH = Symbol("finish"), rimrafWindows = async (path2, opt) => {
41704
+ }, START = /* @__PURE__ */ Symbol("start"), CHILD = /* @__PURE__ */ Symbol("child"), FINISH = /* @__PURE__ */ Symbol("finish"), rimrafWindows = async (path2, opt) => {
41696
41705
  if (opt?.signal?.aborted)
41697
41706
  throw opt.signal.reason;
41698
41707
  try {
@@ -41996,6 +42005,126 @@ function readPackageJson(filePath) {
41996
42005
  return;
41997
42006
  }
41998
42007
  }
42008
+ const MCP_SERVER_URL = "https://mcp.sanity.io";
42009
+ async function detectAvailableEditors() {
42010
+ const editors = [], homeDir = os__default.default.homedir(), cursorDir = path__default.default.join(homeDir, ".cursor");
42011
+ fs$1.existsSync(cursorDir) && editors.push({
42012
+ name: "Cursor",
42013
+ configPath: path__default.default.join(cursorDir, "mcp.json"),
42014
+ configKey: "mcpServers"
42015
+ });
42016
+ let vscodeConfigDir = null;
42017
+ switch (process.platform) {
42018
+ case "darwin":
42019
+ vscodeConfigDir = path__default.default.join(homeDir, "Library/Application Support/Code/User");
42020
+ break;
42021
+ case "win32":
42022
+ process.env.APPDATA && (vscodeConfigDir = path__default.default.join(process.env.APPDATA, "Code/User"));
42023
+ break;
42024
+ default:
42025
+ vscodeConfigDir = path__default.default.join(homeDir, ".config/Code/User");
42026
+ }
42027
+ vscodeConfigDir && fs$1.existsSync(vscodeConfigDir) && editors.push({
42028
+ name: "VS Code",
42029
+ configPath: path__default.default.join(vscodeConfigDir, "mcp.json"),
42030
+ configKey: "servers"
42031
+ });
42032
+ try {
42033
+ await execa("claude", ["--version"], { stdio: "pipe", timeout: 5e3 }), editors.push({
42034
+ name: "Claude Code",
42035
+ configPath: path__default.default.join(homeDir, ".claude.json"),
42036
+ configKey: "mcpServers"
42037
+ });
42038
+ } catch {
42039
+ }
42040
+ return editors;
42041
+ }
42042
+ async function promptForMCPSetup(prompt2, detectedEditors, editorsWithExisting) {
42043
+ const editorChoices = detectedEditors.map((e) => {
42044
+ const isConfigured = editorsWithExisting.some((existing) => existing.name === e.name);
42045
+ return {
42046
+ name: isConfigured ? `${e.name} (already installed)` : e.name,
42047
+ value: e.name,
42048
+ checked: !isConfigured
42049
+ // Only pre-select if NOT already configured
42050
+ };
42051
+ }), selectedNames = (await prompt2([
42052
+ {
42053
+ type: "checkbox",
42054
+ name: "selectedEditors",
42055
+ message: "Configure Sanity MCP server",
42056
+ choices: editorChoices
42057
+ }
42058
+ ])).selectedEditors;
42059
+ return !selectedNames || selectedNames.length === 0 ? null : detectedEditors.filter((e) => selectedNames.includes(e.name));
42060
+ }
42061
+ async function createMCPToken(apiClient) {
42062
+ if (!getCliToken())
42063
+ throw new Error("Not authenticated. Please run `sanity login` first.");
42064
+ const client2 = apiClient({ requireUser: !0, requireProject: !1 }).clone().config({ apiVersion: "2025-12-09" }), sessionResponse = await client2.request({
42065
+ method: "POST",
42066
+ uri: "/auth/session/create",
42067
+ body: {
42068
+ sourceId: "sanity-mcp",
42069
+ withStamp: !1
42070
+ }
42071
+ });
42072
+ return (await client2.request({
42073
+ method: "GET",
42074
+ uri: "/auth/fetch",
42075
+ query: { sid: sessionResponse.sid }
42076
+ })).token;
42077
+ }
42078
+ async function getEditorsWithExistingConfig(editors) {
42079
+ const configured = [];
42080
+ for (const editor2 of editors)
42081
+ if (fs$1.existsSync(editor2.configPath))
42082
+ try {
42083
+ const content = await fs__default.default.readFile(editor2.configPath, "utf-8");
42084
+ JSON.parse(content)[editor2.configKey]?.Sanity && configured.push(editor2);
42085
+ } catch (err) {
42086
+ getCliConfig.debug("Could not read MCP config for %s: %s", editor2.name, err);
42087
+ }
42088
+ return configured;
42089
+ }
42090
+ async function writeMCPConfig(editor2, token2) {
42091
+ const configPath = editor2.configPath;
42092
+ let existingConfig = {};
42093
+ if (fs$1.existsSync(configPath))
42094
+ try {
42095
+ const content = await fs__default.default.readFile(configPath, "utf-8");
42096
+ existingConfig = JSON.parse(content);
42097
+ } catch {
42098
+ getCliConfig.debug(`Warning: Could not parse ${configPath}. Creating new config.`);
42099
+ }
42100
+ const serverKey = editor2.configKey;
42101
+ existingConfig[serverKey] || (existingConfig[serverKey] = {}), existingConfig[serverKey].Sanity = {
42102
+ type: "http",
42103
+ url: MCP_SERVER_URL,
42104
+ headers: {
42105
+ Authorization: `Bearer ${token2}`
42106
+ }
42107
+ }, await fs__default.default.mkdir(path__default.default.dirname(configPath), { recursive: !0 }), await fs__default.default.writeFile(configPath, JSON.stringify(existingConfig, null, 2), "utf-8");
42108
+ }
42109
+ async function setupMCP(context, options2) {
42110
+ const { output, prompt: prompt2 } = context;
42111
+ try {
42112
+ if (options2.mcp === !1)
42113
+ return output.warn("Skipping MCP configuration due to --no-mcp flag"), null;
42114
+ const detected = await detectAvailableEditors();
42115
+ if (detected.length === 0)
42116
+ return output.warn("No supported AI editors detected (Cursor, VS Code, Claude Code)"), null;
42117
+ const editorsWithExisting = await getEditorsWithExistingConfig(detected), selected = await promptForMCPSetup(prompt2, detected, editorsWithExisting);
42118
+ if (!selected || selected.length === 0)
42119
+ return null;
42120
+ const token2 = await createMCPToken(context.apiClient);
42121
+ for (const editor2 of selected)
42122
+ await writeMCPConfig(editor2, token2), output.success(`MCP configured for ${editor2.name}`);
42123
+ return selected;
42124
+ } catch (error2) {
42125
+ return output.warn(`Could not configure MCP: ${error2 instanceof Error ? error2.message : `${error2}`}`), output.warn("You can set up MCP manually later using https://mcp.sanity.io"), null;
42126
+ }
42127
+ }
41999
42128
  const authorType = `import {UserIcon} from '@sanity/icons'
42000
42129
  import {defineArrayMember, defineField, defineType} from 'sanity'
42001
42130
 
@@ -42561,7 +42690,7 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42561
42690
  semver__default.default.coerce(detectedFramework?.detectedVersion)?.major === 15 && isUsingReact19 && (warn("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"), warn("\u2502 \u2502"), warn("\u2502 It looks like you are using Next.js 15 and React 19 \u2502"), warn("\u2502 Please read our compatibility guide. \u2502"), warn("\u2502 https://www.sanity.io/help/react-19 \u2502"), warn("\u2502 \u2502"), warn("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
42562
42691
  }
42563
42692
  }
42564
- let useTypeScript = flagOrDefault("typescript", !0);
42693
+ let useTypeScript = flagOrDefault("typescript", !0), mcpConfigured = null;
42565
42694
  if (initNext) {
42566
42695
  shouldPromptFor("typescript") && (useTypeScript = await promptForTypeScript(prompt2)), trace.log({ step: "useTypeScript", selectedOption: useTypeScript ? "yes" : "no" });
42567
42696
  const fileExtension = useTypeScript ? "ts" : "js";
@@ -42636,6 +42765,7 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42636
42765
  print(`Failed to add ${nextjsLocalDevOrigin} to CORS origins`, error2);
42637
42766
  });
42638
42767
  }
42768
+ mcpConfigured = await setupMCP(context, { mcp: cliFlags.mcp });
42639
42769
  const chosen = await resolvePackageManager(workDir);
42640
42770
  trace.log({ step: "selectPackageManager", selectedOption: chosen });
42641
42771
  const packages = ["@sanity/vision@4", "sanity@4", "@sanity/image-url@1", "styled-components@6"];
@@ -42655,10 +42785,16 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42655
42785
  cwd: workDir,
42656
42786
  stdio: "inherit"
42657
42787
  };
42658
- chosen === "npm" ? await execa("npm", ["install", "--legacy-peer-deps", "next-sanity@11"], execOptions) : chosen === "yarn" ? await execa("npx", ["install-peerdeps", "--yarn", "next-sanity@11"], execOptions) : chosen === "pnpm" && await execa("pnpm", ["install", "next-sanity@11"], execOptions), print(
42788
+ if (chosen === "npm" ? await execa("npm", ["install", "--legacy-peer-deps", "next-sanity@11"], execOptions) : chosen === "yarn" ? await execa("npx", ["install-peerdeps", "--yarn", "next-sanity@11"], execOptions) : chosen === "pnpm" && await execa("pnpm", ["install", "next-sanity@11"], execOptions), print(
42659
42789
  `
42660
42790
  ${chalk2.green("Success!")} Your Sanity configuration files has been added to this project`
42661
- );
42791
+ ), mcpConfigured && mcpConfigured.length > 0) {
42792
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42793
+ print(
42794
+ `
42795
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42796
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42797
+ }
42662
42798
  return;
42663
42799
  }
42664
42800
  function countNestedFolders(path2) {
@@ -42691,7 +42827,7 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
42691
42827
  const template = templates[templateName];
42692
42828
  if (!remoteTemplateInfo && !template)
42693
42829
  throw new Error(`Template "${templateName}" not found`);
42694
- !remoteTemplateInfo && template && (template.typescriptOnly === !0 ? useTypeScript = !0 : shouldPromptFor("typescript") && (useTypeScript = await promptForTypeScript(prompt2), trace.log({ step: "useTypeScript", selectedOption: useTypeScript ? "yes" : "no" })));
42830
+ !remoteTemplateInfo && template && (template.typescriptOnly === !0 ? useTypeScript = !0 : shouldPromptFor("typescript") && (useTypeScript = await promptForTypeScript(prompt2), trace.log({ step: "useTypeScript", selectedOption: useTypeScript ? "yes" : "no" }))), mcpConfigured = await setupMCP(context, { mcp: cliFlags.mcp });
42695
42831
  let autoUpdates = !0;
42696
42832
  typeof cliFlags["auto-updates"] == "boolean" && (autoUpdates = cliFlags["auto-updates"]);
42697
42833
  const shouldImport = !unattended && template?.datasetUrl && await promptForDatasetImport(template.importPrompt);
@@ -42722,14 +42858,33 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
42722
42858
  bun: "bun dev",
42723
42859
  manual: "npm run dev"
42724
42860
  }[pkgManager], isCurrentDir = outputPath === process.cwd(), goToProjectDir = `(${chalk2.cyan(`cd ${outputPath}`)} to navigate to your new project directory)`;
42725
- isAppTemplate ? (print(`\u2705 ${chalk2.green.bold("Success!")} Your custom app has been scaffolded.`), isCurrentDir || print(goToProjectDir), print(
42726
- `
42861
+ if (isAppTemplate) {
42862
+ if (print(`\u2705 ${chalk2.green.bold("Success!")} Your custom app has been scaffolded.`), isCurrentDir || print(goToProjectDir), print(
42863
+ `
42727
42864
  ${chalk2.bold("Next")}, configure the project(s) and dataset(s) your app should work with.`
42728
- ), print("\nGet started in `src/App.tsx`, or refer to our documentation for a walkthrough:"), print(chalk2.blue.underline("https://www.sanity.io/docs/app-sdk/sdk-configuration")), print(`
42729
- `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity dev to start the development server for your app"), print("npx sanity deploy to deploy your app")) : (print(`\u2705 ${chalk2.green.bold("Success!")} Your Studio has been created.`), isCurrentDir || print(goToProjectDir), print(
42730
- `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
42731
- ), print(`
42732
- `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity manage to open the project settings in a browser"), print("npx sanity help to explore the CLI manual")), isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
42865
+ ), print("\nGet started in `src/App.tsx`, or refer to our documentation for a walkthrough:"), print(chalk2.blue.underline("https://www.sanity.io/docs/app-sdk/sdk-configuration")), mcpConfigured && mcpConfigured.length > 0) {
42866
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42867
+ print(
42868
+ `
42869
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42870
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42871
+ }
42872
+ print(`
42873
+ `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity dev to start the development server for your app"), print("npx sanity deploy to deploy your app");
42874
+ } else {
42875
+ if (print(`\u2705 ${chalk2.green.bold("Success!")} Your Studio has been created.`), isCurrentDir || print(goToProjectDir), print(
42876
+ `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
42877
+ ), mcpConfigured && mcpConfigured.length > 0) {
42878
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42879
+ print(
42880
+ `
42881
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42882
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42883
+ }
42884
+ print(`
42885
+ `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity manage to open the project settings in a browser"), print("npx sanity help to explore the CLI manual");
42886
+ }
42887
+ isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
42733
42888
  Join the Sanity community: ${chalk2.cyan("https://www.sanity.io/community/join")}`), print(`We look forward to seeing you there!
42734
42889
  `)), trace.complete();
42735
42890
  async function getOrCreateUser() {
@@ -43297,7 +43452,7 @@ function getImportCommand(outputPath, studioVersion) {
43297
43452
  );
43298
43453
  }
43299
43454
  }
43300
- const helpText$a = `
43455
+ const helpText$b = `
43301
43456
  Options
43302
43457
  -y, --yes Use unattended mode, accepting defaults and using only flags for choices
43303
43458
  --project, --project-id <projectId> Project ID to use for the studio
@@ -43317,6 +43472,7 @@ Options
43317
43472
  --package-manager <name> Specify which package manager to use [allowed: ${allowedPackageManagersString}]
43318
43473
  --auto-updates Enable/disable auto updates of studio versions (default: true)
43319
43474
  --overwrite-files Overwrite existing files (default: false)
43475
+ --no-mcp Skip AI editor integration (MCP) setup
43320
43476
 
43321
43477
  Some flags are used when initializing a project in a specific framework.
43322
43478
 
@@ -43324,7 +43480,7 @@ Next.js
43324
43480
  --nextjs-add-config-files Add config files to Next.js project (default: true)
43325
43481
  --nextjs-embed-studio Embed the Studio in Next.js application (default: true)
43326
43482
  --nextjs-append-env Append project ID and dataset to .env file (default: true)
43327
-
43483
+
43328
43484
  Examples
43329
43485
  # Initialize a new project, prompt for required information along the way
43330
43486
  sanity init
@@ -43350,7 +43506,7 @@ Examples
43350
43506
  name: "init",
43351
43507
  signature: "",
43352
43508
  description: "Initializes a new Sanity Studio and/or project",
43353
- helpText: helpText$a,
43509
+ helpText: helpText$b,
43354
43510
  action: async (args, context) => {
43355
43511
  const [type2] = args.argsWithoutOptions;
43356
43512
  if (type2)
@@ -43385,7 +43541,7 @@ Examples
43385
43541
  const { output } = context, { print } = output, url = "https://www.sanity.io/learn";
43386
43542
  print(`Opening ${url}`), await open(url);
43387
43543
  }
43388
- }, helpText$9 = `
43544
+ }, helpText$a = `
43389
43545
  Options
43390
43546
  --sso <slug> Log in using Single Sign On, using the given slug
43391
43547
  --provider <providerId> Authenticate against a specific provider
@@ -43403,16 +43559,16 @@ Examples
43403
43559
  `, loginCommand = {
43404
43560
  name: "login",
43405
43561
  signature: "[--sso <slug>] [--provider <providerId>] [--no-open]",
43406
- helpText: helpText$9,
43562
+ helpText: helpText$a,
43407
43563
  description: "Authenticates the CLI for access to Sanity projects",
43408
43564
  action: login
43409
- }, helpText$8 = `
43565
+ }, helpText$9 = `
43410
43566
  Examples
43411
43567
  # Log out of the CLI
43412
43568
  sanity logout
43413
43569
  `, logoutCommand = {
43414
43570
  name: "logout",
43415
- helpText: helpText$8,
43571
+ helpText: helpText$9,
43416
43572
  signature: "logout",
43417
43573
  description: "Logs out the CLI from the current user session",
43418
43574
  async action(args, { output, apiClient }) {
@@ -43442,6 +43598,29 @@ ${err.message}`));
43442
43598
  const { output, cliConfig } = context, { print } = output, projectId = cliConfig?.api?.projectId, url = projectId ? `https://www.sanity.io/manage/project/${projectId}` : "https://www.sanity.io/manage/";
43443
43599
  print(`Opening ${url}`), await open(url);
43444
43600
  }
43601
+ }, helpText$8 = `
43602
+ Examples
43603
+ # Configure Sanity MCP server for detected AI editors
43604
+ sanity mcp configure
43605
+ `, configureMcpCommand = {
43606
+ name: "configure",
43607
+ group: "mcp",
43608
+ helpText: helpText$8,
43609
+ signature: "",
43610
+ description: "Configure Sanity MCP server for AI editors (Cursor, VS Code, Claude Code)",
43611
+ async action(args, context) {
43612
+ const { output } = context;
43613
+ if ((await detectAvailableEditors()).length === 0) {
43614
+ output.print("No supported AI editors detected (Cursor, VS Code, Claude Code)."), output.print("Visit https://mcp.sanity.io for manual setup instructions.");
43615
+ return;
43616
+ }
43617
+ await setupMCP(context, { mcp: !0 });
43618
+ }
43619
+ }, mcpGroup = {
43620
+ name: "mcp",
43621
+ signature: "[COMMAND]",
43622
+ isGroupRoot: !0,
43623
+ description: "Manages MCP (Model Context Protocol) server configuration for AI editors"
43445
43624
  };
43446
43625
  async function getSpec(options2, context) {
43447
43626
  const { output } = context;
@@ -44085,6 +44264,8 @@ const baseCommands = [
44085
44264
  disableTelemetryCommand,
44086
44265
  enableTelemetryCommand,
44087
44266
  telemetryStatusCommand,
44267
+ mcpGroup,
44268
+ configureMcpCommand,
44088
44269
  generateTypegenCommand,
44089
44270
  typegenGroup,
44090
44271
  functionsGroup,
@@ -44100,9 +44281,9 @@ const baseCommands = [
44100
44281
  doctorBlueprintsCommand,
44101
44282
  infoBlueprintsCommand,
44102
44283
  initBlueprintsCommand,
44103
- stacksBlueprintsCommand,
44104
44284
  logsBlueprintsCommand,
44105
- planBlueprintsCommand
44285
+ planBlueprintsCommand,
44286
+ stacksBlueprintsCommand
44106
44287
  ], copyProperty = (to, from2, property, ignoreNonConfigurable) => {
44107
44288
  if (property === "length" || property === "prototype" || property === "arguments" || property === "caller")
44108
44289
  return;
@@ -44162,7 +44343,7 @@ process.platform !== "win32" && signals.push(
44162
44343
  // 'SIGPROF'
44163
44344
  );
44164
44345
  process.platform === "linux" && signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
44165
- const processOk = (process2) => !!process2 && typeof process2 == "object" && typeof process2.removeListener == "function" && typeof process2.emit == "function" && typeof process2.reallyExit == "function" && typeof process2.listeners == "function" && typeof process2.kill == "function" && typeof process2.pid == "number" && typeof process2.on == "function", kExitEmitter = Symbol.for("signal-exit emitter"), global = globalThis, ObjectDefineProperty = Object.defineProperty.bind(Object);
44346
+ const processOk = (process2) => !!process2 && typeof process2 == "object" && typeof process2.removeListener == "function" && typeof process2.emit == "function" && typeof process2.reallyExit == "function" && typeof process2.listeners == "function" && typeof process2.kill == "function" && typeof process2.pid == "number" && typeof process2.on == "function", kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter"), global = globalThis, ObjectDefineProperty = Object.defineProperty.bind(Object);
44166
44347
  class Emitter {
44167
44348
  emitted = {
44168
44349
  afterExit: !1,