@sanity/cli 4.21.0-next.8 → 4.21.0

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
 
@@ -3813,7 +3813,7 @@ Examples:
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) {
@@ -3876,7 +3876,7 @@ 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
3881
  --edit, -e Modify the configuration interactively, or directly when combined with ID flags.
3882
3882
  --project-id <id> Directly set the Project ID in the configuration. Requires --edit flag
@@ -3894,7 +3894,7 @@ Examples:
3894
3894
  }, configBlueprintsCommand = {
3895
3895
  name: "config",
3896
3896
  group: "blueprints",
3897
- helpText: helpText$r,
3897
+ helpText: helpText$s,
3898
3898
  signature: "[--edit] [--project-id <id>] [--stack-id <id>] [--verbose]",
3899
3899
  description: "View or edit local Blueprints configuration",
3900
3900
  async action(args, context) {
@@ -3921,7 +3921,7 @@ Examples:
3921
3921
  });
3922
3922
  if (!success) throw new Error(error2);
3923
3923
  }
3924
- }, helpText$q = `
3924
+ }, helpText$r = `
3925
3925
  Options
3926
3926
  --no-wait Do not wait for Stack deployment to complete
3927
3927
 
@@ -3936,7 +3936,7 @@ Examples:
3936
3936
  }, deployBlueprintsCommand = {
3937
3937
  name: "deploy",
3938
3938
  group: "blueprints",
3939
- helpText: helpText$q,
3939
+ helpText: helpText$r,
3940
3940
  signature: "[--no-wait]",
3941
3941
  description: "Deploy a Blueprint",
3942
3942
  async action(args, context) {
@@ -3959,7 +3959,7 @@ Examples:
3959
3959
  });
3960
3960
  if (!success) throw new Error(error2);
3961
3961
  }
3962
- }, helpText$p = `
3962
+ }, helpText$q = `
3963
3963
  Options
3964
3964
  --project-id Project associated with the Stack
3965
3965
  --stack-id Stack ID to destroy (defaults to current Stack)
@@ -3980,7 +3980,7 @@ Examples:
3980
3980
  }, destroyBlueprintsCommand = {
3981
3981
  name: "destroy",
3982
3982
  group: "blueprints",
3983
- helpText: helpText$p,
3983
+ helpText: helpText$q,
3984
3984
  signature: "[--project-id <value> --stack-id <value> --force] [--no-wait]",
3985
3985
  description: "Destroy a Blueprint Stack deployment and its resources (will not delete local files)",
3986
3986
  async action(args, context) {
@@ -4006,7 +4006,7 @@ Examples:
4006
4006
  });
4007
4007
  if (!success) throw new Error(error2);
4008
4008
  }
4009
- }, helpText$o = `
4009
+ }, helpText$p = `
4010
4010
  Options
4011
4011
  --verbose Provide detailed information about issues
4012
4012
 
@@ -4018,7 +4018,7 @@ Examples:
4018
4018
  }, doctorBlueprintsCommand = {
4019
4019
  name: "doctor",
4020
4020
  group: "blueprints",
4021
- helpText: helpText$o,
4021
+ helpText: helpText$p,
4022
4022
  signature: "[--verbose]",
4023
4023
  description: "Diagnose potential issues with Blueprint configuration",
4024
4024
  async action(args, context) {
@@ -4039,7 +4039,7 @@ Examples:
4039
4039
  });
4040
4040
  if (!success) throw new Error(error2);
4041
4041
  }
4042
- }, helpText$n = `
4042
+ }, helpText$o = `
4043
4043
  Examples:
4044
4044
  # Retrieve information about the current Stack
4045
4045
  sanity blueprints info
@@ -4048,7 +4048,7 @@ Examples:
4048
4048
  }, infoBlueprintsCommand = {
4049
4049
  name: "info",
4050
4050
  group: "blueprints",
4051
- helpText: helpText$n,
4051
+ helpText: helpText$o,
4052
4052
  signature: "",
4053
4053
  description: "Show information about a Blueprint Stack deployment",
4054
4054
  async action(args, context) {
@@ -4069,7 +4069,7 @@ Examples:
4069
4069
  });
4070
4070
  if (!success) throw new Error(error2);
4071
4071
  }
4072
- }, helpText$m = `
4072
+ }, helpText$n = `
4073
4073
  Arguments
4074
4074
  [dir] Path to initialize the Blueprint in
4075
4075
 
@@ -4094,7 +4094,7 @@ Examples:
4094
4094
  }, initBlueprintsCommand = {
4095
4095
  name: "init",
4096
4096
  group: "blueprints",
4097
- helpText: helpText$m,
4097
+ helpText: helpText$n,
4098
4098
  signature: "[dir] [--blueprint-type <type>] [--project-id <id>]",
4099
4099
  description: "Initialize a new Blueprint",
4100
4100
  async action(args, context) {
@@ -4135,7 +4135,7 @@ Examples:
4135
4135
  });
4136
4136
  if (!success) throw new Error(error2);
4137
4137
  }
4138
- }, helpText$l = `
4138
+ }, helpText$m = `
4139
4139
  Options
4140
4140
  --watch, -w Watch for new Stack logs (streaming mode)
4141
4141
 
@@ -4150,7 +4150,7 @@ Examples:
4150
4150
  }, logsBlueprintsCommand = {
4151
4151
  name: "logs",
4152
4152
  group: "blueprints",
4153
- helpText: helpText$l,
4153
+ helpText: helpText$m,
4154
4154
  signature: "[--watch] [-w]",
4155
4155
  description: "Display logs for a Blueprint Stack deployment",
4156
4156
  async action(args, context) {
@@ -4173,7 +4173,7 @@ Examples:
4173
4173
  });
4174
4174
  if (streaming && await streaming, !success) throw new Error(error2);
4175
4175
  }
4176
- }, helpText$k = `
4176
+ }, helpText$l = `
4177
4177
  Safe to run at any time. Will not modify any Resources.
4178
4178
 
4179
4179
  Options
@@ -4187,7 +4187,7 @@ Examples:
4187
4187
  }, planBlueprintsCommand = {
4188
4188
  name: "plan",
4189
4189
  group: "blueprints",
4190
- helpText: helpText$k,
4190
+ helpText: helpText$l,
4191
4191
  signature: "",
4192
4192
  description: "Enumerate resources to be deployed - will not modify any resources",
4193
4193
  async action(args, context) {
@@ -4210,7 +4210,7 @@ Examples:
4210
4210
  });
4211
4211
  if (!success) throw new Error(error2);
4212
4212
  }
4213
- }, helpText$j = `
4213
+ }, helpText$k = `
4214
4214
  Options
4215
4215
  --project-id <id> Project ID to use
4216
4216
 
@@ -4225,7 +4225,7 @@ Examples:
4225
4225
  }, stacksBlueprintsCommand = {
4226
4226
  name: "stacks",
4227
4227
  group: "blueprints",
4228
- helpText: helpText$j,
4228
+ helpText: helpText$k,
4229
4229
  signature: "[--project-id <value>]",
4230
4230
  description: "List all Blueprint Stacks",
4231
4231
  hideFromHelp: !1,
@@ -4394,7 +4394,7 @@ function ensureNpx() {
4394
4394
  );
4395
4395
  }
4396
4396
  }
4397
- const helpText$i = `
4397
+ const helpText$j = `
4398
4398
  Runs a given code modification script on the current studio folder.
4399
4399
  Running the command without a specified codemod name will list available transformations.
4400
4400
 
@@ -4416,7 +4416,7 @@ Examples
4416
4416
  name: "codemod",
4417
4417
  signature: "[CODEMOD_NAME]",
4418
4418
  description: "Updates Sanity Studio codebase with a code modification script",
4419
- helpText: helpText$i,
4419
+ helpText: helpText$j,
4420
4420
  action: codemodAction
4421
4421
  };
4422
4422
  var lodash_isplainobject, hasRequiredLodash_isplainobject;
@@ -4884,7 +4884,7 @@ function requireGracefulFs() {
4884
4884
  if (hasRequiredGracefulFs) return gracefulFs;
4885
4885
  hasRequiredGracefulFs = 1;
4886
4886
  var fs2 = require$$0__default.default, polyfills2 = requirePolyfills(), legacy = requireLegacyStreams(), clone = requireClone(), util2 = require$$0__default$5.default, gracefulQueue, previousSymbol;
4887
- 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");
4887
+ 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");
4888
4888
  function noop2() {
4889
4889
  }
4890
4890
  function publishQueue(context, queue3) {
@@ -6109,7 +6109,7 @@ function normalizePath(input2) {
6109
6109
  const sanityDocsPrefix = "https://www.sanity.io";
6110
6110
  return input2.startsWith(sanityDocsPrefix) ? input2.replace(sanityDocsPrefix, "") : input2;
6111
6111
  }
6112
- const helpText$h = `
6112
+ const helpText$i = `
6113
6113
  Arguments
6114
6114
  <path> Path or URL to article, found in search results and docs content as links
6115
6115
 
@@ -6127,13 +6127,13 @@ Examples
6127
6127
  `, readCommand = {
6128
6128
  name: "read",
6129
6129
  group: "docs",
6130
- helpText: helpText$h,
6130
+ helpText: helpText$i,
6131
6131
  signature: "<path|url> [-w, --web]",
6132
6132
  description: "Read an article in terminal",
6133
6133
  async action(args, context) {
6134
6134
  const { output } = context, flags = args.extOptions, input2 = args.argsWithoutOptions[0];
6135
6135
  if (!input2 || typeof input2 != "string") {
6136
- output.error("Please provide an article path or URL"), output.print(""), output.print(helpText$h), process.exit(1);
6136
+ output.error("Please provide an article path or URL"), output.print(""), output.print(helpText$i), process.exit(1);
6137
6137
  return;
6138
6138
  }
6139
6139
  const path2 = normalizePath(input2);
@@ -6163,7 +6163,7 @@ async function searchDocs(options2, context) {
6163
6163
  const results = await response.json();
6164
6164
  return Array.isArray(results) ? results.slice(0, limit) : [];
6165
6165
  }
6166
- const isInteractive$1 = process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env), helpText$g = `
6166
+ const isInteractive$1 = process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env), helpText$h = `
6167
6167
  Arguments
6168
6168
  <query> Search query for documentation
6169
6169
 
@@ -6184,7 +6184,7 @@ Examples
6184
6184
  }, searchCommand = {
6185
6185
  name: "search",
6186
6186
  group: "docs",
6187
- helpText: helpText$g,
6187
+ helpText: helpText$h,
6188
6188
  signature: "<query> [--limit <limit>]",
6189
6189
  description: "Search Sanity docs",
6190
6190
  async action(args, context) {
@@ -6238,7 +6238,7 @@ Found ${results.length} result(s):
6238
6238
  }
6239
6239
  }
6240
6240
  }
6241
- }, helpText$f = `
6241
+ }, helpText$g = `
6242
6242
  Options
6243
6243
  --port <port> Port to start emulator on
6244
6244
  --open Open dev server in a new browser tab
@@ -6262,7 +6262,7 @@ Examples
6262
6262
  }, devFunctionsCommand = {
6263
6263
  name: "dev",
6264
6264
  group: "functions",
6265
- helpText: helpText$f,
6265
+ helpText: helpText$g,
6266
6266
  signature: "[--host <host> --port <port> --open]",
6267
6267
  description: "Start the Sanity Function emulator",
6268
6268
  async action(args, context) {
@@ -6284,7 +6284,7 @@ Examples
6284
6284
  if (!success) throw new Error(error2);
6285
6285
  shouldOpen && await open(`http://${flags.host}:${flags.port}`);
6286
6286
  }
6287
- }, helpText$e = `
6287
+ }, helpText$f = `
6288
6288
  Commands
6289
6289
  add Add or update an environment variable
6290
6290
  list List the environment variables
@@ -6307,7 +6307,7 @@ Examples
6307
6307
  `, envFunctionsCommand = {
6308
6308
  name: "env",
6309
6309
  group: "functions",
6310
- helpText: helpText$e,
6310
+ helpText: helpText$f,
6311
6311
  signature: "<add|list|remove> <name> [key] [value]",
6312
6312
  description: "Add or remove an environment variable or list environment variables for a Sanity function",
6313
6313
  async action(args, context) {
@@ -6363,7 +6363,7 @@ Examples
6363
6363
  signature: "[COMMAND]",
6364
6364
  isGroupRoot: !0,
6365
6365
  description: "Manage, test, and observe Sanity Functions"
6366
- }, helpText$d = `
6366
+ }, helpText$e = `
6367
6367
  Arguments
6368
6368
  <name> The name of the Function to retrieve logs for
6369
6369
 
@@ -6400,7 +6400,7 @@ Examples
6400
6400
  }, logsFunctionsCommand = {
6401
6401
  name: "logs",
6402
6402
  group: "functions",
6403
- helpText: helpText$d,
6403
+ helpText: helpText$e,
6404
6404
  signature: "<name> [--limit <number>] [--json] [--utc] [--delete [--force]] [--watch]",
6405
6405
  description: "Retrieve or delete logs for a Sanity Function",
6406
6406
  async action(args, context) {
@@ -6425,7 +6425,7 @@ Examples
6425
6425
  });
6426
6426
  if (!success) throw new Error(error2);
6427
6427
  }
6428
- }, helpText$c = `
6428
+ }, helpText$d = `
6429
6429
  Arguments
6430
6430
  <name> The name of the Sanity Function
6431
6431
 
@@ -6467,7 +6467,7 @@ Examples
6467
6467
  }, testFunctionsCommand = {
6468
6468
  name: "test",
6469
6469
  group: "functions",
6470
- helpText: helpText$c,
6470
+ helpText: helpText$d,
6471
6471
  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]",
6472
6472
  description: "Invoke a local Sanity Function",
6473
6473
  async action(args, context) {
@@ -6574,11 +6574,11 @@ const commonMistakes = { get: "list" }, levenThreshold = 3, coreCommands = [
6574
6574
  "undeploy",
6575
6575
  "uninstall",
6576
6576
  "users"
6577
- ], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$b = `
6577
+ ], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$c = `
6578
6578
  Run the command again within a Sanity project directory, where "sanity"
6579
6579
  is installed as a dependency.`;
6580
6580
  function getNoSuchCommandText(cmdName, parentGroupName, groups) {
6581
- 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 : []);
6581
+ 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 : []);
6582
6582
  }
6583
6583
  function suggestCommand(cmdName, group, parentGroupName = null) {
6584
6584
  const closest = group.filter((command2) => !discouragedCommands.includes(command2.name)).map((command2) => leven(command2.name, cmdName)).reduce(
@@ -8346,11 +8346,11 @@ function requireTomlParser() {
8346
8346
  function isAlphaNumHyphen(cp) {
8347
8347
  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;
8348
8348
  }
8349
- const _type = Symbol("type"), _declared = Symbol("declared"), hasOwnProperty = Object.prototype.hasOwnProperty, defineProperty = Object.defineProperty, descriptor = { configurable: !0, enumerable: !0, writable: !0, value: void 0 };
8349
+ 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 };
8350
8350
  function hasKey(obj, key2) {
8351
8351
  return hasOwnProperty.call(obj, key2) ? !0 : (key2 === "__proto__" && defineProperty(obj, "__proto__", descriptor), !1);
8352
8352
  }
8353
- const INLINE_TABLE = Symbol("inline-table");
8353
+ const INLINE_TABLE = /* @__PURE__ */ Symbol("inline-table");
8354
8354
  function InlineTable() {
8355
8355
  return Object.defineProperties({}, {
8356
8356
  [_type]: { value: INLINE_TABLE }
@@ -8359,7 +8359,7 @@ function requireTomlParser() {
8359
8359
  function isInlineTable(obj) {
8360
8360
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INLINE_TABLE;
8361
8361
  }
8362
- const TABLE = Symbol("table");
8362
+ const TABLE = /* @__PURE__ */ Symbol("table");
8363
8363
  function Table() {
8364
8364
  return Object.defineProperties({}, {
8365
8365
  [_type]: { value: TABLE },
@@ -8369,7 +8369,7 @@ function requireTomlParser() {
8369
8369
  function isTable(obj) {
8370
8370
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === TABLE;
8371
8371
  }
8372
- const _contentType = Symbol("content-type"), INLINE_LIST = Symbol("inline-list");
8372
+ const _contentType = /* @__PURE__ */ Symbol("content-type"), INLINE_LIST = /* @__PURE__ */ Symbol("inline-list");
8373
8373
  function InlineList(type2) {
8374
8374
  return Object.defineProperties([], {
8375
8375
  [_type]: { value: INLINE_LIST },
@@ -8379,7 +8379,7 @@ function requireTomlParser() {
8379
8379
  function isInlineList(obj) {
8380
8380
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INLINE_LIST;
8381
8381
  }
8382
- const LIST = Symbol("list");
8382
+ const LIST = /* @__PURE__ */ Symbol("list");
8383
8383
  function List() {
8384
8384
  return Object.defineProperties([], {
8385
8385
  [_type]: { value: LIST }
@@ -8419,7 +8419,7 @@ function requireTomlParser() {
8419
8419
  return this.value;
8420
8420
  }
8421
8421
  }
8422
- const INTEGER = Symbol("integer");
8422
+ const INTEGER = /* @__PURE__ */ Symbol("integer");
8423
8423
  function Integer(value) {
8424
8424
  let num = Number(value);
8425
8425
  return Object.is(num, -0) && (num = 0), loadEnv.commonjsGlobal.BigInt && !Number.isSafeInteger(num) ? new BoxedBigInt(value) : Object.defineProperties(new Number(num), {
@@ -8433,7 +8433,7 @@ function requireTomlParser() {
8433
8433
  function isInteger(obj) {
8434
8434
  return obj === null || typeof obj != "object" ? !1 : obj[_type] === INTEGER;
8435
8435
  }
8436
- const FLOAT = Symbol("float");
8436
+ const FLOAT = /* @__PURE__ */ Symbol("float");
8437
8437
  function Float(value) {
8438
8438
  return Object.defineProperties(new Number(value), {
8439
8439
  [_type]: { value: FLOAT },
@@ -14680,7 +14680,7 @@ function requireMinimatch() {
14680
14680
  minimatch_1 = minimatch2;
14681
14681
  const path2 = requirePath$1();
14682
14682
  minimatch2.sep = path2.sep;
14683
- const GLOBSTAR2 = Symbol("globstar **");
14683
+ const GLOBSTAR2 = /* @__PURE__ */ Symbol("globstar **");
14684
14684
  minimatch2.GLOBSTAR = GLOBSTAR2;
14685
14685
  const expand2 = requireBraceExpansion(), plTypes = {
14686
14686
  "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
@@ -14709,7 +14709,7 @@ function requireMinimatch() {
14709
14709
  throw new TypeError("invalid pattern");
14710
14710
  if (pattern.length > MAX_PATTERN_LENGTH2)
14711
14711
  throw new TypeError("pattern is too long");
14712
- }, SUBPARSE = Symbol("subparse");
14712
+ }, SUBPARSE = /* @__PURE__ */ Symbol("subparse");
14713
14713
  minimatch2.makeRe = (pattern, options2) => new Minimatch2(pattern, options2 || {}).makeRe(), minimatch2.match = (list2, pattern, options2 = {}) => {
14714
14714
  const mm = new Minimatch2(pattern, options2);
14715
14715
  return list2 = list2.filter((f) => mm.match(f)), mm.options.nonull && !list2.length && list2.push(pattern), list2;
@@ -22236,7 +22236,7 @@ function requireMinipass$1() {
22236
22236
  const proc2 = typeof process == "object" && process ? process : {
22237
22237
  stdout: null,
22238
22238
  stderr: null
22239
- }, 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);
22239
+ }, 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);
22240
22240
  class Pipe2 {
22241
22241
  constructor(src, dest, opts) {
22242
22242
  this.src = src, this.dest = dest, this.opts = opts, this.ondrain = () => src[RESUME2](), dest.on("drain", this.ondrain);
@@ -22635,7 +22635,7 @@ function requireMinipass() {
22635
22635
  const proc2 = typeof process == "object" && process ? process : {
22636
22636
  stdout: null,
22637
22637
  stderr: null
22638
- }, 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);
22638
+ }, 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);
22639
22639
  class Pipe2 {
22640
22640
  constructor(src, dest, opts) {
22641
22641
  this.src = src, this.dest = dest, this.opts = opts, this.ondrain = () => src[RESUME2](), dest.on("drain", this.ondrain);
@@ -22884,7 +22884,7 @@ var hasRequiredMinizlib;
22884
22884
  function requireMinizlib() {
22885
22885
  if (hasRequiredMinizlib) return minizlib;
22886
22886
  hasRequiredMinizlib = 1;
22887
- 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");
22887
+ 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");
22888
22888
  class ZlibError extends Error {
22889
22889
  constructor(err) {
22890
22890
  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);
@@ -22893,7 +22893,7 @@ function requireMinizlib() {
22893
22893
  return "ZlibError";
22894
22894
  }
22895
22895
  }
22896
- 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");
22896
+ 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");
22897
22897
  class ZlibBase extends Minipass2 {
22898
22898
  constructor(opts, mode2) {
22899
22899
  if (!opts || typeof opts != "object")
@@ -22994,7 +22994,7 @@ function requireMinizlib() {
22994
22994
  super(opts, "Inflate");
22995
22995
  }
22996
22996
  }
22997
- const _portable = Symbol("_portable");
22997
+ const _portable = /* @__PURE__ */ Symbol("_portable");
22998
22998
  class Gzip extends Zlib {
22999
22999
  constructor(opts) {
23000
23000
  super(opts, "Gzip"), this[_portable] = opts && !!opts.portable;
@@ -23052,7 +23052,7 @@ var readEntry, hasRequiredReadEntry;
23052
23052
  function requireReadEntry() {
23053
23053
  if (hasRequiredReadEntry) return readEntry;
23054
23054
  hasRequiredReadEntry = 1;
23055
- const { Minipass: Minipass2 } = requireMinipass$1(), normPath = requireNormalizeWindowsPath(), SLURP = Symbol("slurp");
23055
+ const { Minipass: Minipass2 } = requireMinipass$1(), normPath = requireNormalizeWindowsPath(), SLURP = /* @__PURE__ */ Symbol("slurp");
23056
23056
  return readEntry = class extends Minipass2 {
23057
23057
  constructor(header2, ex, gex) {
23058
23058
  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) {
@@ -23189,7 +23189,7 @@ var header, hasRequiredHeader;
23189
23189
  function requireHeader() {
23190
23190
  if (hasRequiredHeader) return header;
23191
23191
  hasRequiredHeader = 1;
23192
- const types2 = requireTypes$1(), pathModule = require$$0__default$1.default.posix, large = requireLargeNumbers(), SLURP = Symbol("slurp"), TYPE = Symbol("type");
23192
+ const types2 = requireTypes$1(), pathModule = require$$0__default$1.default.posix, large = requireLargeNumbers(), SLURP = /* @__PURE__ */ Symbol("slurp"), TYPE = /* @__PURE__ */ Symbol("type");
23193
23193
  class Header {
23194
23194
  constructor(data, off, ex, gex) {
23195
23195
  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);
@@ -23385,7 +23385,7 @@ var writeEntry, hasRequiredWriteEntry;
23385
23385
  function requireWriteEntry() {
23386
23386
  if (hasRequiredWriteEntry) return writeEntry;
23387
23387
  hasRequiredWriteEntry = 1;
23388
- 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 {
23388
+ 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 {
23389
23389
  constructor(p, opt) {
23390
23390
  if (opt = opt || {}, super(opt), typeof p != "string")
23391
23391
  throw new TypeError("path is required");
@@ -23826,7 +23826,7 @@ function requirePack() {
23826
23826
  this.path = path3 || "./", this.absolute = absolute, this.entry = null, this.stat = null, this.readdir = null, this.pending = !1, this.ignore = !1, this.piped = !1;
23827
23827
  }
23828
23828
  }
23829
- 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 {
23829
+ 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 {
23830
23830
  constructor(opt) {
23831
23831
  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) {
23832
23832
  if (opt.gzip && opt.brotli)
@@ -24005,7 +24005,7 @@ function requireFsMinipass() {
24005
24005
  req.oncomplete = done, binding.writeBuffers(fd, iovec, pos2, req);
24006
24006
  };
24007
24007
  }
24008
- 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");
24008
+ 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");
24009
24009
  class ReadStream extends MiniPass {
24010
24010
  constructor(path2, opt) {
24011
24011
  if (opt = opt || {}, super(opt), this.readable = !0, this.writable = !1, typeof path2 != "string")
@@ -24217,7 +24217,7 @@ var parse, hasRequiredParse;
24217
24217
  function requireParse() {
24218
24218
  if (hasRequiredParse) return parse;
24219
24219
  hasRequiredParse = 1;
24220
- 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;
24220
+ 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;
24221
24221
  return parse = warner(class extends EE {
24222
24222
  constructor(opt) {
24223
24223
  opt = opt || {}, super(opt), this.file = opt.file || "", this[SAW_VALID_ENTRY] = null, this.on(DONE, (_) => {
@@ -25120,7 +25120,7 @@ var unpack, hasRequiredUnpack;
25120
25120
  function requireUnpack() {
25121
25121
  if (hasRequiredUnpack) return unpack;
25122
25122
  hasRequiredUnpack = 1;
25123
- 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) => {
25123
+ 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) => {
25124
25124
  if (!isWindows)
25125
25125
  return fs2.unlink(path3, cb);
25126
25126
  const name = path3 + ".DELETE." + crypto.randomBytes(16).toString("hex");
@@ -37411,7 +37411,7 @@ const escape = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ?
37411
37411
  posix: { sep: "/" }
37412
37412
  }, sep = defaultPlatform$2 === "win32" ? path.win32.sep : path.posix.sep;
37413
37413
  minimatch.sep = sep;
37414
- const GLOBSTAR = Symbol("globstar **");
37414
+ const GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
37415
37415
  minimatch.GLOBSTAR = GLOBSTAR;
37416
37416
  const qmark = "[^/]", star$1 = qmark + "*?", twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?", filter$1 = (pattern, options2 = {}) => (p) => minimatch(p, pattern, options2);
37417
37417
  minimatch.filter = filter$1;
@@ -38731,7 +38731,7 @@ const proc = typeof process == "object" && process ? process : {
38731
38731
  stdout: null,
38732
38732
  stderr: null
38733
38733
  }, 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
38734
- 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);
38734
+ 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);
38735
38735
  class Pipe {
38736
38736
  src;
38737
38737
  dest;
@@ -39334,7 +39334,7 @@ class ChildrenCache extends LRUCache {
39334
39334
  });
39335
39335
  }
39336
39336
  }
39337
- const setAsCwd = Symbol("PathScurry setAsCwd");
39337
+ const setAsCwd = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
39338
39338
  class PathBase {
39339
39339
  /**
39340
39340
  * the basename of this path
@@ -41705,7 +41705,7 @@ const pathArg = (path2, opt = {}) => {
41705
41705
  return rimrafMoveRemoveSync(path2, options2);
41706
41706
  throw er;
41707
41707
  }
41708
- }, START = Symbol("start"), CHILD = Symbol("child"), FINISH = Symbol("finish"), rimrafWindows = async (path2, opt) => {
41708
+ }, START = /* @__PURE__ */ Symbol("start"), CHILD = /* @__PURE__ */ Symbol("child"), FINISH = /* @__PURE__ */ Symbol("finish"), rimrafWindows = async (path2, opt) => {
41709
41709
  if (opt?.signal?.aborted)
41710
41710
  throw opt.signal.reason;
41711
41711
  try {
@@ -42009,6 +42009,126 @@ function readPackageJson(filePath) {
42009
42009
  return;
42010
42010
  }
42011
42011
  }
42012
+ const MCP_SERVER_URL = "https://mcp.sanity.io";
42013
+ async function detectAvailableEditors() {
42014
+ const editors = [], homeDir = os__default.default.homedir(), cursorDir = path__default.default.join(homeDir, ".cursor");
42015
+ fs$1.existsSync(cursorDir) && editors.push({
42016
+ name: "Cursor",
42017
+ configPath: path__default.default.join(cursorDir, "mcp.json"),
42018
+ configKey: "mcpServers"
42019
+ });
42020
+ let vscodeConfigDir = null;
42021
+ switch (process.platform) {
42022
+ case "darwin":
42023
+ vscodeConfigDir = path__default.default.join(homeDir, "Library/Application Support/Code/User");
42024
+ break;
42025
+ case "win32":
42026
+ process.env.APPDATA && (vscodeConfigDir = path__default.default.join(process.env.APPDATA, "Code/User"));
42027
+ break;
42028
+ default:
42029
+ vscodeConfigDir = path__default.default.join(homeDir, ".config/Code/User");
42030
+ }
42031
+ vscodeConfigDir && fs$1.existsSync(vscodeConfigDir) && editors.push({
42032
+ name: "VS Code",
42033
+ configPath: path__default.default.join(vscodeConfigDir, "mcp.json"),
42034
+ configKey: "servers"
42035
+ });
42036
+ try {
42037
+ await execa("claude", ["--version"], { stdio: "pipe", timeout: 5e3 }), editors.push({
42038
+ name: "Claude Code",
42039
+ configPath: path__default.default.join(homeDir, ".claude.json"),
42040
+ configKey: "mcpServers"
42041
+ });
42042
+ } catch {
42043
+ }
42044
+ return editors;
42045
+ }
42046
+ async function promptForMCPSetup(prompt2, detectedEditors, editorsWithExisting) {
42047
+ const editorChoices = detectedEditors.map((e) => {
42048
+ const isConfigured = editorsWithExisting.some((existing) => existing.name === e.name);
42049
+ return {
42050
+ name: isConfigured ? `${e.name} (already installed)` : e.name,
42051
+ value: e.name,
42052
+ checked: !isConfigured
42053
+ // Only pre-select if NOT already configured
42054
+ };
42055
+ }), selectedNames = (await prompt2([
42056
+ {
42057
+ type: "checkbox",
42058
+ name: "selectedEditors",
42059
+ message: "Configure Sanity MCP server",
42060
+ choices: editorChoices
42061
+ }
42062
+ ])).selectedEditors;
42063
+ return !selectedNames || selectedNames.length === 0 ? null : detectedEditors.filter((e) => selectedNames.includes(e.name));
42064
+ }
42065
+ async function createMCPToken(apiClient) {
42066
+ if (!getCliToken())
42067
+ throw new Error("Not authenticated. Please run `sanity login` first.");
42068
+ const client2 = apiClient({ requireUser: !0, requireProject: !1 }).clone().config({ apiVersion: "2025-12-09" }), sessionResponse = await client2.request({
42069
+ method: "POST",
42070
+ uri: "/auth/session/create",
42071
+ body: {
42072
+ sourceId: "sanity-mcp",
42073
+ withStamp: !1
42074
+ }
42075
+ });
42076
+ return (await client2.request({
42077
+ method: "GET",
42078
+ uri: "/auth/fetch",
42079
+ query: { sid: sessionResponse.sid }
42080
+ })).token;
42081
+ }
42082
+ async function getEditorsWithExistingConfig(editors) {
42083
+ const configured = [];
42084
+ for (const editor2 of editors)
42085
+ if (fs$1.existsSync(editor2.configPath))
42086
+ try {
42087
+ const content = await fs__default.default.readFile(editor2.configPath, "utf-8");
42088
+ JSON.parse(content)[editor2.configKey]?.Sanity && configured.push(editor2);
42089
+ } catch (err) {
42090
+ getCliConfig.debug("Could not read MCP config for %s: %s", editor2.name, err);
42091
+ }
42092
+ return configured;
42093
+ }
42094
+ async function writeMCPConfig(editor2, token2) {
42095
+ const configPath = editor2.configPath;
42096
+ let existingConfig = {};
42097
+ if (fs$1.existsSync(configPath))
42098
+ try {
42099
+ const content = await fs__default.default.readFile(configPath, "utf-8");
42100
+ existingConfig = JSON.parse(content);
42101
+ } catch {
42102
+ getCliConfig.debug(`Warning: Could not parse ${configPath}. Creating new config.`);
42103
+ }
42104
+ const serverKey = editor2.configKey;
42105
+ existingConfig[serverKey] || (existingConfig[serverKey] = {}), existingConfig[serverKey].Sanity = {
42106
+ type: "http",
42107
+ url: MCP_SERVER_URL,
42108
+ headers: {
42109
+ Authorization: `Bearer ${token2}`
42110
+ }
42111
+ }, 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");
42112
+ }
42113
+ async function setupMCP(context, options2) {
42114
+ const { output, prompt: prompt2 } = context;
42115
+ try {
42116
+ if (options2.mcp === !1)
42117
+ return output.warn("Skipping MCP configuration due to --no-mcp flag"), null;
42118
+ const detected = await detectAvailableEditors();
42119
+ if (detected.length === 0)
42120
+ return output.warn("No supported AI editors detected (Cursor, VS Code, Claude Code)"), null;
42121
+ const editorsWithExisting = await getEditorsWithExistingConfig(detected), selected = await promptForMCPSetup(prompt2, detected, editorsWithExisting);
42122
+ if (!selected || selected.length === 0)
42123
+ return null;
42124
+ const token2 = await createMCPToken(context.apiClient);
42125
+ for (const editor2 of selected)
42126
+ await writeMCPConfig(editor2, token2), output.success(`MCP configured for ${editor2.name}`);
42127
+ return selected;
42128
+ } catch (error2) {
42129
+ 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;
42130
+ }
42131
+ }
42012
42132
  const authorType = `import {UserIcon} from '@sanity/icons'
42013
42133
  import {defineArrayMember, defineField, defineType} from 'sanity'
42014
42134
 
@@ -42574,7 +42694,7 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42574
42694
  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"));
42575
42695
  }
42576
42696
  }
42577
- let useTypeScript = flagOrDefault("typescript", !0);
42697
+ let useTypeScript = flagOrDefault("typescript", !0), mcpConfigured = null;
42578
42698
  if (initNext) {
42579
42699
  shouldPromptFor("typescript") && (useTypeScript = await promptForTypeScript(prompt2)), trace.log({ step: "useTypeScript", selectedOption: useTypeScript ? "yes" : "no" });
42580
42700
  const fileExtension = useTypeScript ? "ts" : "js";
@@ -42649,6 +42769,7 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42649
42769
  print(`Failed to add ${nextjsLocalDevOrigin} to CORS origins`, error2);
42650
42770
  });
42651
42771
  }
42772
+ mcpConfigured = await setupMCP(context, { mcp: cliFlags.mcp });
42652
42773
  const chosen = await resolvePackageManager(workDir);
42653
42774
  trace.log({ step: "selectPackageManager", selectedOption: chosen });
42654
42775
  const packages = ["@sanity/vision@4", "sanity@4", "@sanity/image-url@1", "styled-components@6"];
@@ -42668,10 +42789,16 @@ You can find your project on Sanity Manage \u2014 https://www.sanity.io/manage/p
42668
42789
  cwd: workDir,
42669
42790
  stdio: "inherit"
42670
42791
  };
42671
- 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(
42792
+ 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(
42672
42793
  `
42673
42794
  ${chalk2.green("Success!")} Your Sanity configuration files has been added to this project`
42674
- );
42795
+ ), mcpConfigured && mcpConfigured.length > 0) {
42796
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42797
+ print(
42798
+ `
42799
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42800
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42801
+ }
42675
42802
  return;
42676
42803
  }
42677
42804
  function countNestedFolders(path2) {
@@ -42704,7 +42831,7 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
42704
42831
  const template = templates[templateName];
42705
42832
  if (!remoteTemplateInfo && !template)
42706
42833
  throw new Error(`Template "${templateName}" not found`);
42707
- !remoteTemplateInfo && template && (template.typescriptOnly === !0 ? useTypeScript = !0 : shouldPromptFor("typescript") && (useTypeScript = await promptForTypeScript(prompt2), trace.log({ step: "useTypeScript", selectedOption: useTypeScript ? "yes" : "no" })));
42834
+ !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 });
42708
42835
  let autoUpdates = !0;
42709
42836
  typeof cliFlags["auto-updates"] == "boolean" && (autoUpdates = cliFlags["auto-updates"]);
42710
42837
  const shouldImport = !unattended && template?.datasetUrl && await promptForDatasetImport(template.importPrompt);
@@ -42735,14 +42862,33 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
42735
42862
  bun: "bun dev",
42736
42863
  manual: "npm run dev"
42737
42864
  }[pkgManager], isCurrentDir = outputPath === process.cwd(), goToProjectDir = `(${chalk2.cyan(`cd ${outputPath}`)} to navigate to your new project directory)`;
42738
- isAppTemplate ? (print(`\u2705 ${chalk2.green.bold("Success!")} Your custom app has been scaffolded.`), isCurrentDir || print(goToProjectDir), print(
42739
- `
42865
+ if (isAppTemplate) {
42866
+ if (print(`\u2705 ${chalk2.green.bold("Success!")} Your custom app has been scaffolded.`), isCurrentDir || print(goToProjectDir), print(
42867
+ `
42740
42868
  ${chalk2.bold("Next")}, configure the project(s) and dataset(s) your app should work with.`
42741
- ), 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(`
42742
- `), 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(
42743
- `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
42744
- ), print(`
42745
- `), 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(`
42869
+ ), 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) {
42870
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42871
+ print(
42872
+ `
42873
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42874
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42875
+ }
42876
+ print(`
42877
+ `), 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");
42878
+ } else {
42879
+ if (print(`\u2705 ${chalk2.green.bold("Success!")} Your Studio has been created.`), isCurrentDir || print(goToProjectDir), print(
42880
+ `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
42881
+ ), mcpConfigured && mcpConfigured.length > 0) {
42882
+ const editorNames = new Intl.ListFormat("en").format(mcpConfigured.map((e) => e.name));
42883
+ print(
42884
+ `
42885
+ Sanity MCP server has been configured for ${editorNames}. You might need to restart your editor for this to take effect.`
42886
+ ), print(`Learn more: ${chalk2.cyan("https://mcp.sanity.io")}`);
42887
+ }
42888
+ print(`
42889
+ `), 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");
42890
+ }
42891
+ isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
42746
42892
  Join the Sanity community: ${chalk2.cyan("https://www.sanity.io/community/join")}`), print(`We look forward to seeing you there!
42747
42893
  `)), trace.complete();
42748
42894
  async function getOrCreateUser() {
@@ -43310,7 +43456,7 @@ function getImportCommand(outputPath, studioVersion) {
43310
43456
  );
43311
43457
  }
43312
43458
  }
43313
- const helpText$a = `
43459
+ const helpText$b = `
43314
43460
  Options
43315
43461
  -y, --yes Use unattended mode, accepting defaults and using only flags for choices
43316
43462
  --project, --project-id <projectId> Project ID to use for the studio
@@ -43330,6 +43476,7 @@ Options
43330
43476
  --package-manager <name> Specify which package manager to use [allowed: ${allowedPackageManagersString}]
43331
43477
  --auto-updates Enable/disable auto updates of studio versions (default: true)
43332
43478
  --overwrite-files Overwrite existing files (default: false)
43479
+ --no-mcp Skip AI editor integration (MCP) setup
43333
43480
 
43334
43481
  Some flags are used when initializing a project in a specific framework.
43335
43482
 
@@ -43337,7 +43484,7 @@ Next.js
43337
43484
  --nextjs-add-config-files Add config files to Next.js project (default: true)
43338
43485
  --nextjs-embed-studio Embed the Studio in Next.js application (default: true)
43339
43486
  --nextjs-append-env Append project ID and dataset to .env file (default: true)
43340
-
43487
+
43341
43488
  Examples
43342
43489
  # Initialize a new project, prompt for required information along the way
43343
43490
  sanity init
@@ -43363,7 +43510,7 @@ Examples
43363
43510
  name: "init",
43364
43511
  signature: "",
43365
43512
  description: "Initializes a new Sanity Studio and/or project",
43366
- helpText: helpText$a,
43513
+ helpText: helpText$b,
43367
43514
  action: async (args, context) => {
43368
43515
  const [type2] = args.argsWithoutOptions;
43369
43516
  if (type2)
@@ -43398,7 +43545,7 @@ Examples
43398
43545
  const { output } = context, { print } = output, url = "https://www.sanity.io/learn";
43399
43546
  print(`Opening ${url}`), await open(url);
43400
43547
  }
43401
- }, helpText$9 = `
43548
+ }, helpText$a = `
43402
43549
  Options
43403
43550
  --sso <slug> Log in using Single Sign On, using the given slug
43404
43551
  --provider <providerId> Authenticate against a specific provider
@@ -43416,16 +43563,16 @@ Examples
43416
43563
  `, loginCommand = {
43417
43564
  name: "login",
43418
43565
  signature: "[--sso <slug>] [--provider <providerId>] [--no-open]",
43419
- helpText: helpText$9,
43566
+ helpText: helpText$a,
43420
43567
  description: "Authenticates the CLI for access to Sanity projects",
43421
43568
  action: login
43422
- }, helpText$8 = `
43569
+ }, helpText$9 = `
43423
43570
  Examples
43424
43571
  # Log out of the CLI
43425
43572
  sanity logout
43426
43573
  `, logoutCommand = {
43427
43574
  name: "logout",
43428
- helpText: helpText$8,
43575
+ helpText: helpText$9,
43429
43576
  signature: "logout",
43430
43577
  description: "Logs out the CLI from the current user session",
43431
43578
  async action(args, { output, apiClient }) {
@@ -43455,6 +43602,29 @@ ${err.message}`));
43455
43602
  const { output, cliConfig } = context, { print } = output, projectId = cliConfig?.api?.projectId, url = projectId ? `https://www.sanity.io/manage/project/${projectId}` : "https://www.sanity.io/manage/";
43456
43603
  print(`Opening ${url}`), await open(url);
43457
43604
  }
43605
+ }, helpText$8 = `
43606
+ Examples
43607
+ # Configure Sanity MCP server for detected AI editors
43608
+ sanity mcp configure
43609
+ `, configureMcpCommand = {
43610
+ name: "configure",
43611
+ group: "mcp",
43612
+ helpText: helpText$8,
43613
+ signature: "",
43614
+ description: "Configure Sanity MCP server for AI editors (Cursor, VS Code, Claude Code)",
43615
+ async action(args, context) {
43616
+ const { output } = context;
43617
+ if ((await detectAvailableEditors()).length === 0) {
43618
+ output.print("No supported AI editors detected (Cursor, VS Code, Claude Code)."), output.print("Visit https://mcp.sanity.io for manual setup instructions.");
43619
+ return;
43620
+ }
43621
+ await setupMCP(context, { mcp: !0 });
43622
+ }
43623
+ }, mcpGroup = {
43624
+ name: "mcp",
43625
+ signature: "[COMMAND]",
43626
+ isGroupRoot: !0,
43627
+ description: "Manages MCP (Model Context Protocol) server configuration for AI editors"
43458
43628
  };
43459
43629
  async function getSpec(options2, context) {
43460
43630
  const { output } = context;
@@ -44098,6 +44268,8 @@ const baseCommands = [
44098
44268
  disableTelemetryCommand,
44099
44269
  enableTelemetryCommand,
44100
44270
  telemetryStatusCommand,
44271
+ mcpGroup,
44272
+ configureMcpCommand,
44101
44273
  generateTypegenCommand,
44102
44274
  typegenGroup,
44103
44275
  functionsGroup,
@@ -44175,7 +44347,7 @@ process.platform !== "win32" && signals.push(
44175
44347
  // 'SIGPROF'
44176
44348
  );
44177
44349
  process.platform === "linux" && signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
44178
- 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);
44350
+ 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);
44179
44351
  class Emitter {
44180
44352
  emitted = {
44181
44353
  afterExit: !1,