@fern-api/fern-api-dev 5.33.7 → 5.35.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.
Files changed (2) hide show
  1. package/cli.cjs +384 -172
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -4178,8 +4178,8 @@ function hrTimeDuration(startTime, endTime) {
4178
4178
  }
4179
4179
  function hrTimeToTimeStamp(time3) {
4180
4180
  const precision = NANOSECOND_DIGITS;
4181
- const tmp18 = `${"0".repeat(precision)}${time3[1]}Z`;
4182
- const nanoString = tmp18.substring(tmp18.length - precision - 1);
4181
+ const tmp19 = `${"0".repeat(precision)}${time3[1]}Z`;
4182
+ const nanoString = tmp19.substring(tmp19.length - precision - 1);
4183
4183
  const date26 = new Date(time3[0] * 1e3).toISOString();
4184
4184
  return date26.replace("000Z", nanoString);
4185
4185
  }
@@ -20549,15 +20549,15 @@ var init_cliui = __esm({
20549
20549
  // ../../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
20550
20550
  function sync_default(start2, callback) {
20551
20551
  let dir = (0, import_path5.resolve)(".", start2);
20552
- let tmp18, stats = (0, import_fs4.statSync)(dir);
20552
+ let tmp19, stats = (0, import_fs4.statSync)(dir);
20553
20553
  if (!stats.isDirectory()) {
20554
20554
  dir = (0, import_path5.dirname)(dir);
20555
20555
  }
20556
20556
  while (true) {
20557
- tmp18 = callback(dir, (0, import_fs4.readdirSync)(dir));
20558
- if (tmp18) return (0, import_path5.resolve)(dir, tmp18);
20559
- dir = (0, import_path5.dirname)(tmp18 = dir);
20560
- if (tmp18 === dir) break;
20557
+ tmp19 = callback(dir, (0, import_fs4.readdirSync)(dir));
20558
+ if (tmp19) return (0, import_path5.resolve)(dir, tmp19);
20559
+ dir = (0, import_path5.dirname)(tmp19 = dir);
20560
+ if (tmp19 === dir) break;
20561
20561
  }
20562
20562
  }
20563
20563
  var import_path5, import_fs4;
@@ -27167,16 +27167,16 @@ var init_index_node_esm = __esm({
27167
27167
  for (let t3 = 0; t3 < ret.length; t3++) {
27168
27168
  const rett = ret[t3];
27169
27169
  if (rett && rett.isParentSelector) {
27170
- const tmp18 = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr);
27171
- if (Array.isArray(tmp18)) {
27172
- ret[t3] = tmp18[0];
27173
- const tl5 = tmp18.length;
27170
+ const tmp19 = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr);
27171
+ if (Array.isArray(tmp19)) {
27172
+ ret[t3] = tmp19[0];
27173
+ const tl5 = tmp19.length;
27174
27174
  for (let tt9 = 1; tt9 < tl5; tt9++) {
27175
27175
  t3++;
27176
- ret.splice(t3, 0, tmp18[tt9]);
27176
+ ret.splice(t3, 0, tmp19[tt9]);
27177
27177
  }
27178
27178
  } else {
27179
- ret[t3] = tmp18;
27179
+ ret[t3] = tmp19;
27180
27180
  }
27181
27181
  }
27182
27182
  }
@@ -27205,8 +27205,8 @@ var init_index_node_esm = __esm({
27205
27205
  end = end < 0 ? Math.max(0, end + len) : Math.min(len, end);
27206
27206
  const ret = [];
27207
27207
  for (let i9 = start2; i9 < end; i9 += step) {
27208
- const tmp18 = this._trace(unshift(i9, expr), val, path115, parent, parentPropName, callback, true);
27209
- tmp18.forEach((t3) => {
27208
+ const tmp19 = this._trace(unshift(i9, expr), val, path115, parent, parentPropName, callback, true);
27209
+ tmp19.forEach((t3) => {
27210
27210
  ret.push(t3);
27211
27211
  });
27212
27212
  }
@@ -53021,10 +53021,10 @@ var require_tmp_promise = __commonJS({
53021
53021
  "../../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js"(exports2, module4) {
53022
53022
  "use strict";
53023
53023
  var { promisify: promisify8 } = require("util");
53024
- var tmp18 = require_tmp();
53025
- module4.exports.fileSync = tmp18.fileSync;
53024
+ var tmp19 = require_tmp();
53025
+ module4.exports.fileSync = tmp19.fileSync;
53026
53026
  var fileWithOptions = promisify8(
53027
- (options2, cb) => tmp18.file(
53027
+ (options2, cb) => tmp19.file(
53028
53028
  options2,
53029
53029
  (err, path115, fd2, cleanup) => err ? cb(err) : cb(void 0, { path: path115, fd: fd2, cleanup: promisify8(cleanup) })
53030
53030
  )
@@ -53038,9 +53038,9 @@ var require_tmp_promise = __commonJS({
53038
53038
  await cleanup();
53039
53039
  }
53040
53040
  };
53041
- module4.exports.dirSync = tmp18.dirSync;
53041
+ module4.exports.dirSync = tmp19.dirSync;
53042
53042
  var dirWithOptions = promisify8(
53043
- (options2, cb) => tmp18.dir(
53043
+ (options2, cb) => tmp19.dir(
53044
53044
  options2,
53045
53045
  (err, path115, cleanup) => err ? cb(err) : cb(void 0, { path: path115, cleanup: promisify8(cleanup) })
53046
53046
  )
@@ -53054,10 +53054,10 @@ var require_tmp_promise = __commonJS({
53054
53054
  await cleanup();
53055
53055
  }
53056
53056
  };
53057
- module4.exports.tmpNameSync = tmp18.tmpNameSync;
53058
- module4.exports.tmpName = promisify8(tmp18.tmpName);
53059
- module4.exports.tmpdir = tmp18.tmpdir;
53060
- module4.exports.setGracefulCleanup = tmp18.setGracefulCleanup;
53057
+ module4.exports.tmpNameSync = tmp19.tmpNameSync;
53058
+ module4.exports.tmpName = promisify8(tmp19.tmpName);
53059
+ module4.exports.tmpdir = tmp19.tmpdir;
53060
+ module4.exports.setGracefulCleanup = tmp19.setGracefulCleanup;
53061
53061
  }
53062
53062
  });
53063
53063
 
@@ -59058,23 +59058,23 @@ function getValues(context3, operator2, key2, modifier) {
59058
59058
  });
59059
59059
  }
59060
59060
  } else {
59061
- const tmp18 = [];
59061
+ const tmp19 = [];
59062
59062
  if (Array.isArray(value2)) {
59063
59063
  value2.filter(isDefined).forEach(function(value22) {
59064
- tmp18.push(encodeValue(operator2, value22));
59064
+ tmp19.push(encodeValue(operator2, value22));
59065
59065
  });
59066
59066
  } else {
59067
59067
  Object.keys(value2).forEach(function(k5) {
59068
59068
  if (isDefined(value2[k5])) {
59069
- tmp18.push(encodeUnreserved(k5));
59070
- tmp18.push(encodeValue(operator2, value2[k5].toString()));
59069
+ tmp19.push(encodeUnreserved(k5));
59070
+ tmp19.push(encodeValue(operator2, value2[k5].toString()));
59071
59071
  }
59072
59072
  });
59073
59073
  }
59074
59074
  if (isKeyOperator(operator2)) {
59075
- result.push(encodeUnreserved(key2) + "=" + tmp18.join(","));
59076
- } else if (tmp18.length !== 0) {
59077
- result.push(tmp18.join(","));
59075
+ result.push(encodeUnreserved(key2) + "=" + tmp19.join(","));
59076
+ } else if (tmp19.length !== 0) {
59077
+ result.push(tmp19.join(","));
59078
59078
  }
59079
59079
  }
59080
59080
  }
@@ -59109,8 +59109,8 @@ function expand2(template, context3) {
59109
59109
  expression = expression.substr(1);
59110
59110
  }
59111
59111
  expression.split(/,/g).forEach(function(variable3) {
59112
- var tmp18 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
59113
- values2.push(getValues(context3, operator2, tmp18[1], tmp18[2] || tmp18[3]));
59112
+ var tmp19 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
59113
+ values2.push(getValues(context3, operator2, tmp19[1], tmp19[2] || tmp19[3]));
59114
59114
  });
59115
59115
  if (operator2 && operator2 !== "+") {
59116
59116
  var separator = ",";
@@ -70623,7 +70623,7 @@ function readSingleQuotedScalar(state, nodeIndent) {
70623
70623
  throwError(state, "unexpected end of the stream within a single quoted scalar");
70624
70624
  }
70625
70625
  function readDoubleQuotedScalar(state, nodeIndent) {
70626
- var captureStart, captureEnd, hexLength, hexResult, tmp18, ch;
70626
+ var captureStart, captureEnd, hexLength, hexResult, tmp19, ch;
70627
70627
  ch = state.input.charCodeAt(state.position);
70628
70628
  if (ch !== 34) {
70629
70629
  return false;
@@ -70645,13 +70645,13 @@ function readDoubleQuotedScalar(state, nodeIndent) {
70645
70645
  } else if (ch < 256 && simpleEscapeCheck[ch]) {
70646
70646
  state.result += simpleEscapeMap[ch];
70647
70647
  state.position++;
70648
- } else if ((tmp18 = escapedHexLen(ch)) > 0) {
70649
- hexLength = tmp18;
70648
+ } else if ((tmp19 = escapedHexLen(ch)) > 0) {
70649
+ hexLength = tmp19;
70650
70650
  hexResult = 0;
70651
70651
  for (; hexLength > 0; hexLength--) {
70652
70652
  ch = state.input.charCodeAt(++state.position);
70653
- if ((tmp18 = fromHexCode(ch)) >= 0) {
70654
- hexResult = (hexResult << 4) + tmp18;
70653
+ if ((tmp19 = fromHexCode(ch)) >= 0) {
70654
+ hexResult = (hexResult << 4) + tmp19;
70655
70655
  } else {
70656
70656
  throwError(state, "expected hexadecimal character");
70657
70657
  }
@@ -70752,7 +70752,7 @@ function readFlowCollection(state, nodeIndent) {
70752
70752
  throwError(state, "unexpected end of the stream within a flow collection");
70753
70753
  }
70754
70754
  function readBlockScalar(state, nodeIndent) {
70755
- var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp18, ch;
70755
+ var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp19, ch;
70756
70756
  ch = state.input.charCodeAt(state.position);
70757
70757
  if (ch === 124) {
70758
70758
  folding = false;
@@ -70771,11 +70771,11 @@ function readBlockScalar(state, nodeIndent) {
70771
70771
  } else {
70772
70772
  throwError(state, "repeat of a chomping mode identifier");
70773
70773
  }
70774
- } else if ((tmp18 = fromDecimalCode(ch)) >= 0) {
70775
- if (tmp18 === 0) {
70774
+ } else if ((tmp19 = fromDecimalCode(ch)) >= 0) {
70775
+ if (tmp19 === 0) {
70776
70776
  throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
70777
70777
  } else if (!detectedIndent) {
70778
- textIndent = nodeIndent + tmp18 - 1;
70778
+ textIndent = nodeIndent + tmp19 - 1;
70779
70779
  detectedIndent = true;
70780
70780
  } else {
70781
70781
  throwError(state, "repeat of an indentation width identifier");
@@ -77859,7 +77859,7 @@ var require_loader = __commonJS({
77859
77859
  throwError2(state, "unexpected end of the stream within a single quoted scalar");
77860
77860
  }
77861
77861
  function readDoubleQuotedScalar2(state, nodeIndent) {
77862
- var captureStart, captureEnd, hexLength, hexResult, tmp18, ch;
77862
+ var captureStart, captureEnd, hexLength, hexResult, tmp19, ch;
77863
77863
  ch = state.input.charCodeAt(state.position);
77864
77864
  if (ch !== 34) {
77865
77865
  return false;
@@ -77881,13 +77881,13 @@ var require_loader = __commonJS({
77881
77881
  } else if (ch < 256 && simpleEscapeCheck2[ch]) {
77882
77882
  state.result += simpleEscapeMap2[ch];
77883
77883
  state.position++;
77884
- } else if ((tmp18 = escapedHexLen2(ch)) > 0) {
77885
- hexLength = tmp18;
77884
+ } else if ((tmp19 = escapedHexLen2(ch)) > 0) {
77885
+ hexLength = tmp19;
77886
77886
  hexResult = 0;
77887
77887
  for (; hexLength > 0; hexLength--) {
77888
77888
  ch = state.input.charCodeAt(++state.position);
77889
- if ((tmp18 = fromHexCode2(ch)) >= 0) {
77890
- hexResult = (hexResult << 4) + tmp18;
77889
+ if ((tmp19 = fromHexCode2(ch)) >= 0) {
77890
+ hexResult = (hexResult << 4) + tmp19;
77891
77891
  } else {
77892
77892
  throwError2(state, "expected hexadecimal character");
77893
77893
  }
@@ -77988,7 +77988,7 @@ var require_loader = __commonJS({
77988
77988
  throwError2(state, "unexpected end of the stream within a flow collection");
77989
77989
  }
77990
77990
  function readBlockScalar2(state, nodeIndent) {
77991
- var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp18, ch;
77991
+ var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp19, ch;
77992
77992
  ch = state.input.charCodeAt(state.position);
77993
77993
  if (ch === 124) {
77994
77994
  folding = false;
@@ -78007,11 +78007,11 @@ var require_loader = __commonJS({
78007
78007
  } else {
78008
78008
  throwError2(state, "repeat of a chomping mode identifier");
78009
78009
  }
78010
- } else if ((tmp18 = fromDecimalCode2(ch)) >= 0) {
78011
- if (tmp18 === 0) {
78010
+ } else if ((tmp19 = fromDecimalCode2(ch)) >= 0) {
78011
+ if (tmp19 === 0) {
78012
78012
  throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
78013
78013
  } else if (!detectedIndent) {
78014
- textIndent = nodeIndent + tmp18 - 1;
78014
+ textIndent = nodeIndent + tmp19 - 1;
78015
78015
  detectedIndent = true;
78016
78016
  } else {
78017
78017
  throwError2(state, "repeat of an indentation width identifier");
@@ -95473,9 +95473,9 @@ var require_js_levenshtein = __commonJS({
95473
95473
  return 0;
95474
95474
  }
95475
95475
  if (a3.length > b8.length) {
95476
- var tmp18 = a3;
95476
+ var tmp19 = a3;
95477
95477
  a3 = b8;
95478
- b8 = tmp18;
95478
+ b8 = tmp19;
95479
95479
  }
95480
95480
  var la7 = a3.length;
95481
95481
  var lb = b8.length;
@@ -104092,7 +104092,7 @@ var require_loader2 = __commonJS({
104092
104092
  throwError2(state, "unexpected end of the stream within a single quoted scalar");
104093
104093
  }
104094
104094
  function readDoubleQuotedScalar2(state, nodeIndent) {
104095
- var captureStart, captureEnd, hexLength, hexResult, tmp18, tmpEsc, ch;
104095
+ var captureStart, captureEnd, hexLength, hexResult, tmp19, tmpEsc, ch;
104096
104096
  ch = state.input.charCodeAt(state.position);
104097
104097
  if (34 !== ch) {
104098
104098
  return false;
@@ -104119,13 +104119,13 @@ var require_loader2 = __commonJS({
104119
104119
  } else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck2[ch])) {
104120
104120
  scalar.value += state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap2[ch];
104121
104121
  state.position++;
104122
- } else if ((tmp18 = escapedHexLen2(ch)) > 0) {
104123
- hexLength = tmp18;
104122
+ } else if ((tmp19 = escapedHexLen2(ch)) > 0) {
104123
+ hexLength = tmp19;
104124
104124
  hexResult = 0;
104125
104125
  for (; hexLength > 0; hexLength--) {
104126
104126
  ch = state.input.charCodeAt(++state.position);
104127
- if ((tmp18 = fromHexCode2(ch)) >= 0) {
104128
- hexResult = (hexResult << 4) + tmp18;
104127
+ if ((tmp19 = fromHexCode2(ch)) >= 0) {
104128
+ hexResult = (hexResult << 4) + tmp19;
104129
104129
  } else {
104130
104130
  throwError2(state, "expected hexadecimal character");
104131
104131
  }
@@ -104234,7 +104234,7 @@ var require_loader2 = __commonJS({
104234
104234
  throwError2(state, "unexpected end of the stream within a flow collection");
104235
104235
  }
104236
104236
  function readBlockScalar2(state, nodeIndent) {
104237
- var captureStart, folding, chomping = CHOMPING_CLIP2, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp18, ch;
104237
+ var captureStart, folding, chomping = CHOMPING_CLIP2, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp19, ch;
104238
104238
  ch = state.input.charCodeAt(state.position);
104239
104239
  if (ch === 124) {
104240
104240
  folding = false;
@@ -104255,11 +104255,11 @@ var require_loader2 = __commonJS({
104255
104255
  } else {
104256
104256
  throwError2(state, "repeat of a chomping mode identifier");
104257
104257
  }
104258
- } else if ((tmp18 = fromDecimalCode2(ch)) >= 0) {
104259
- if (tmp18 === 0) {
104258
+ } else if ((tmp19 = fromDecimalCode2(ch)) >= 0) {
104259
+ if (tmp19 === 0) {
104260
104260
  throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
104261
104261
  } else if (!detectedIndent) {
104262
- textIndent = nodeIndent + tmp18 - 1;
104262
+ textIndent = nodeIndent + tmp19 - 1;
104263
104263
  detectedIndent = true;
104264
104264
  } else {
104265
104265
  throwError2(state, "repeat of an indentation width identifier");
@@ -181714,7 +181714,7 @@ var require_loader3 = __commonJS({
181714
181714
  throwError2(state, "unexpected end of the stream within a single quoted scalar");
181715
181715
  }
181716
181716
  function readDoubleQuotedScalar2(state, nodeIndent) {
181717
- var captureStart, captureEnd, hexLength, hexResult, tmp18, ch;
181717
+ var captureStart, captureEnd, hexLength, hexResult, tmp19, ch;
181718
181718
  ch = state.input.charCodeAt(state.position);
181719
181719
  if (ch !== 34) {
181720
181720
  return false;
@@ -181736,13 +181736,13 @@ var require_loader3 = __commonJS({
181736
181736
  } else if (ch < 256 && simpleEscapeCheck2[ch]) {
181737
181737
  state.result += simpleEscapeMap2[ch];
181738
181738
  state.position++;
181739
- } else if ((tmp18 = escapedHexLen2(ch)) > 0) {
181740
- hexLength = tmp18;
181739
+ } else if ((tmp19 = escapedHexLen2(ch)) > 0) {
181740
+ hexLength = tmp19;
181741
181741
  hexResult = 0;
181742
181742
  for (; hexLength > 0; hexLength--) {
181743
181743
  ch = state.input.charCodeAt(++state.position);
181744
- if ((tmp18 = fromHexCode2(ch)) >= 0) {
181745
- hexResult = (hexResult << 4) + tmp18;
181744
+ if ((tmp19 = fromHexCode2(ch)) >= 0) {
181745
+ hexResult = (hexResult << 4) + tmp19;
181746
181746
  } else {
181747
181747
  throwError2(state, "expected hexadecimal character");
181748
181748
  }
@@ -181839,7 +181839,7 @@ var require_loader3 = __commonJS({
181839
181839
  throwError2(state, "unexpected end of the stream within a flow collection");
181840
181840
  }
181841
181841
  function readBlockScalar2(state, nodeIndent) {
181842
- var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp18, ch;
181842
+ var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp19, ch;
181843
181843
  ch = state.input.charCodeAt(state.position);
181844
181844
  if (ch === 124) {
181845
181845
  folding = false;
@@ -181858,11 +181858,11 @@ var require_loader3 = __commonJS({
181858
181858
  } else {
181859
181859
  throwError2(state, "repeat of a chomping mode identifier");
181860
181860
  }
181861
- } else if ((tmp18 = fromDecimalCode2(ch)) >= 0) {
181862
- if (tmp18 === 0) {
181861
+ } else if ((tmp19 = fromDecimalCode2(ch)) >= 0) {
181862
+ if (tmp19 === 0) {
181863
181863
  throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
181864
181864
  } else if (!detectedIndent) {
181865
- textIndent = nodeIndent + tmp18 - 1;
181865
+ textIndent = nodeIndent + tmp19 - 1;
181866
181866
  detectedIndent = true;
181867
181867
  } else {
181868
181868
  throwError2(state, "repeat of an indentation width identifier");
@@ -188523,16 +188523,16 @@ var require_URLSearchParams = __commonJS({
188523
188523
  );
188524
188524
  } else {
188525
188525
  const V5 = [];
188526
- const tmp18 = curArg;
188527
- for (let nextItem of tmp18) {
188526
+ const tmp19 = curArg;
188527
+ for (let nextItem of tmp19) {
188528
188528
  if (!utils2.isObject(nextItem)) {
188529
188529
  throw new globalObject.TypeError(
188530
188530
  "Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object."
188531
188531
  );
188532
188532
  } else {
188533
188533
  const V6 = [];
188534
- const tmp19 = nextItem;
188535
- for (let nextItem2 of tmp19) {
188534
+ const tmp20 = nextItem;
188535
+ for (let nextItem2 of tmp20) {
188536
188536
  nextItem2 = conversions["USVString"](nextItem2, {
188537
188537
  context: "Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",
188538
188538
  globals: globalObject
@@ -222713,13 +222713,13 @@ var require_fast_safe_stringify = __commonJS({
222713
222713
  if (typeof options2 === "undefined") {
222714
222714
  options2 = defaultOptions3();
222715
222715
  }
222716
- var tmp18 = deterministicDecirc(obj, "", 0, [], void 0, 0, options2) || obj;
222716
+ var tmp19 = deterministicDecirc(obj, "", 0, [], void 0, 0, options2) || obj;
222717
222717
  var res;
222718
222718
  try {
222719
222719
  if (replacerStack.length === 0) {
222720
- res = JSON.stringify(tmp18, replacer, spacer);
222720
+ res = JSON.stringify(tmp19, replacer, spacer);
222721
222721
  } else {
222722
- res = JSON.stringify(tmp18, replaceGetterValues(replacer), spacer);
222722
+ res = JSON.stringify(tmp19, replaceGetterValues(replacer), spacer);
222723
222723
  }
222724
222724
  } catch (_7) {
222725
222725
  return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
@@ -222766,18 +222766,18 @@ var require_fast_safe_stringify = __commonJS({
222766
222766
  deterministicDecirc(val[i9], i9, i9, stack, val, depth, options2);
222767
222767
  }
222768
222768
  } else {
222769
- var tmp18 = {};
222769
+ var tmp19 = {};
222770
222770
  var keys25 = Object.keys(val).sort(compareFunction);
222771
222771
  for (i9 = 0; i9 < keys25.length; i9++) {
222772
222772
  var key2 = keys25[i9];
222773
222773
  deterministicDecirc(val[key2], key2, i9, stack, val, depth, options2);
222774
- tmp18[key2] = val[key2];
222774
+ tmp19[key2] = val[key2];
222775
222775
  }
222776
222776
  if (typeof parent !== "undefined") {
222777
222777
  arr.push([parent, k5, val]);
222778
- parent[k5] = tmp18;
222778
+ parent[k5] = tmp19;
222779
222779
  } else {
222780
- return tmp18;
222780
+ return tmp19;
222781
222781
  }
222782
222782
  }
222783
222783
  stack.pop();
@@ -229775,9 +229775,9 @@ var init_suggestionList = __esm({
229775
229775
  let a3 = stringToArray2(optionLowerCase);
229776
229776
  let b8 = this._inputArray;
229777
229777
  if (a3.length < b8.length) {
229778
- const tmp18 = a3;
229778
+ const tmp19 = a3;
229779
229779
  a3 = b8;
229780
- b8 = tmp18;
229780
+ b8 = tmp19;
229781
229781
  }
229782
229782
  const aLength = a3.length;
229783
229783
  const bLength = b8.length;
@@ -236720,10 +236720,28 @@ var init_GraphQLConverter = __esm({
236720
236720
  namespace;
236721
236721
  processingTypes = /* @__PURE__ */ new Set();
236722
236722
  types = {};
236723
- constructor({ context: context3, filePath, namespace }) {
236723
+ examplesByOperation = /* @__PURE__ */ new Map();
236724
+ constructor({ context: context3, filePath, namespace, examples }) {
236724
236725
  this.context = context3;
236725
236726
  this.filePath = filePath;
236726
236727
  this.namespace = namespace;
236728
+ if (examples != null) {
236729
+ for (const entry of examples) {
236730
+ const mapped = entry.examples.map((ex) => ({
236731
+ name: ex.name ?? void 0,
236732
+ description: ex.description ?? void 0,
236733
+ query: ex.query,
236734
+ variables: ex.variables ?? void 0,
236735
+ response: ex.response ?? void 0
236736
+ }));
236737
+ if (entry.operationType != null) {
236738
+ const key2 = `${entry.operationType.toLowerCase()}:${entry.operation}`;
236739
+ this.examplesByOperation.set(key2, mapped);
236740
+ } else {
236741
+ this.examplesByOperation.set(entry.operation, mapped);
236742
+ }
236743
+ }
236744
+ }
236727
236745
  }
236728
236746
  isBuiltInScalar(typeName) {
236729
236747
  return ["String", "Int", "Float", "Boolean", "ID"].includes(typeName);
@@ -236887,6 +236905,7 @@ var init_GraphQLConverter = __esm({
236887
236905
  }
236888
236906
  convertField(field5, name2, operationType) {
236889
236907
  const args = field5.args.map((arg) => this.convertArgument(arg));
236908
+ const examples = this.examplesByOperation.get(`${operationType.toLowerCase()}:${name2}`) ?? this.examplesByOperation.get(name2);
236890
236909
  return {
236891
236910
  id: this.getNamespacedOperationId(`${operationType.toLowerCase()}_${name2}`),
236892
236911
  operationType,
@@ -236896,7 +236915,7 @@ var init_GraphQLConverter = __esm({
236896
236915
  availability: void 0,
236897
236916
  arguments: args.length > 0 ? args : void 0,
236898
236917
  returnType: this.convertOutputType(field5.type),
236899
- examples: void 0,
236918
+ examples: examples != null && examples.length > 0 ? examples : void 0,
236900
236919
  snippets: void 0
236901
236920
  };
236902
236921
  }
@@ -265205,9 +265224,9 @@ var require_utf16 = __commonJS({
265205
265224
  Utf16BEEncoder.prototype.write = function(str3) {
265206
265225
  var buf = Buffer5.from(str3, "ucs2");
265207
265226
  for (var i9 = 0; i9 < buf.length; i9 += 2) {
265208
- var tmp18 = buf[i9];
265227
+ var tmp19 = buf[i9];
265209
265228
  buf[i9] = buf[i9 + 1];
265210
- buf[i9 + 1] = tmp18;
265229
+ buf[i9 + 1] = tmp19;
265211
265230
  }
265212
265231
  return buf;
265213
265232
  };
@@ -319876,9 +319895,9 @@ var init_mod = __esm({
319876
319895
  };
319877
319896
  distance = (a3, b8) => {
319878
319897
  if (a3.length < b8.length) {
319879
- const tmp18 = b8;
319898
+ const tmp19 = b8;
319880
319899
  b8 = a3;
319881
- a3 = tmp18;
319900
+ a3 = tmp19;
319882
319901
  }
319883
319902
  if (b8.length === 0) {
319884
319903
  return a3.length;
@@ -319933,7 +319952,7 @@ var require_levenshtein = __commonJS({
319933
319952
  var str1Len = str1.length, str2Len = str22.length;
319934
319953
  if (str1Len === 0) return str2Len;
319935
319954
  if (str2Len === 0) return str1Len;
319936
- var curCol, nextCol, i9, j7, tmp18;
319955
+ var curCol, nextCol, i9, j7, tmp19;
319937
319956
  for (i9 = 0; i9 < str2Len; ++i9) {
319938
319957
  prevRow[i9] = i9;
319939
319958
  str2Char[i9] = str22.charCodeAt(i9);
@@ -319946,13 +319965,13 @@ var require_levenshtein = __commonJS({
319946
319965
  curCol = nextCol;
319947
319966
  strCmp = 0 === collator.compare(str1.charAt(i9), String.fromCharCode(str2Char[j7]));
319948
319967
  nextCol = prevRow[j7] + (strCmp ? 0 : 1);
319949
- tmp18 = curCol + 1;
319950
- if (nextCol > tmp18) {
319951
- nextCol = tmp18;
319968
+ tmp19 = curCol + 1;
319969
+ if (nextCol > tmp19) {
319970
+ nextCol = tmp19;
319952
319971
  }
319953
- tmp18 = prevRow[j7 + 1] + 1;
319954
- if (nextCol > tmp18) {
319955
- nextCol = tmp18;
319972
+ tmp19 = prevRow[j7 + 1] + 1;
319973
+ if (nextCol > tmp19) {
319974
+ nextCol = tmp19;
319956
319975
  }
319957
319976
  prevRow[j7] = curCol;
319958
319977
  }
@@ -322785,9 +322804,9 @@ var require_utf162 = __commonJS({
322785
322804
  Utf16BEEncoder.prototype.write = function(str3) {
322786
322805
  var buf = Buffer5.from(str3, "ucs2");
322787
322806
  for (var i9 = 0; i9 < buf.length; i9 += 2) {
322788
- var tmp18 = buf[i9];
322807
+ var tmp19 = buf[i9];
322789
322808
  buf[i9] = buf[i9 + 1];
322790
- buf[i9 + 1] = tmp18;
322809
+ buf[i9 + 1] = tmp19;
322791
322810
  }
322792
322811
  return buf;
322793
322812
  };
@@ -345201,9 +345220,9 @@ var require_buffer_crc32 = __commonJS({
345201
345220
  }
345202
345221
  }
345203
345222
  function bufferizeInt(num) {
345204
- var tmp18 = ensureBuffer(4);
345205
- tmp18.writeInt32BE(num, 0);
345206
- return tmp18;
345223
+ var tmp19 = ensureBuffer(4);
345224
+ tmp19.writeInt32BE(num, 0);
345225
+ return tmp19;
345207
345226
  }
345208
345227
  function _crc32(buf, previous4) {
345209
345228
  buf = ensureBuffer(buf);
@@ -363113,17 +363132,17 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
363113
363132
  }
363114
363133
  async function unifiedDiff(beforeContent, afterContent, filePath) {
363115
363134
  if (beforeContent === afterContent) return "";
363116
- const tmp18 = await (0, import_promises410.mkdtemp)((0, import_node_path62.join)((0, import_node_os22.tmpdir)(), "fern-replay-pp-"));
363135
+ const tmp19 = await (0, import_promises410.mkdtemp)((0, import_node_path62.join)((0, import_node_os22.tmpdir)(), "fern-replay-pp-"));
363117
363136
  try {
363118
- const beforePath = (0, import_node_path62.join)(tmp18, "before");
363119
- const afterPath = (0, import_node_path62.join)(tmp18, "after");
363137
+ const beforePath = (0, import_node_path62.join)(tmp19, "before");
363138
+ const afterPath = (0, import_node_path62.join)(tmp19, "after");
363120
363139
  await (0, import_promises410.writeFile)(beforePath, beforeContent, "utf-8");
363121
363140
  await (0, import_promises410.writeFile)(afterPath, afterContent, "utf-8");
363122
363141
  const raw = await runGitDiffNoIndex(beforePath, afterPath);
363123
363142
  if (!raw.trim()) return "";
363124
363143
  return rewriteDiffHeaders(raw, filePath);
363125
363144
  } finally {
363126
- await (0, import_promises410.rm)(tmp18, { recursive: true, force: true });
363145
+ await (0, import_promises410.rm)(tmp19, { recursive: true, force: true });
363127
363146
  }
363128
363147
  }
363129
363148
  function runGitDiffNoIndex(beforePath, afterPath) {
@@ -365985,23 +366004,23 @@ function getValues2(context3, operator2, key2, modifier) {
365985
366004
  });
365986
366005
  }
365987
366006
  } else {
365988
- const tmp18 = [];
366007
+ const tmp19 = [];
365989
366008
  if (Array.isArray(value2)) {
365990
366009
  value2.filter(isDefined2).forEach(function(value22) {
365991
- tmp18.push(encodeValue4(operator2, value22));
366010
+ tmp19.push(encodeValue4(operator2, value22));
365992
366011
  });
365993
366012
  } else {
365994
366013
  Object.keys(value2).forEach(function(k5) {
365995
366014
  if (isDefined2(value2[k5])) {
365996
- tmp18.push(encodeUnreserved2(k5));
365997
- tmp18.push(encodeValue4(operator2, value2[k5].toString()));
366015
+ tmp19.push(encodeUnreserved2(k5));
366016
+ tmp19.push(encodeValue4(operator2, value2[k5].toString()));
365998
366017
  }
365999
366018
  });
366000
366019
  }
366001
366020
  if (isKeyOperator2(operator2)) {
366002
- result.push(encodeUnreserved2(key2) + "=" + tmp18.join(","));
366003
- } else if (tmp18.length !== 0) {
366004
- result.push(tmp18.join(","));
366021
+ result.push(encodeUnreserved2(key2) + "=" + tmp19.join(","));
366022
+ } else if (tmp19.length !== 0) {
366023
+ result.push(tmp19.join(","));
366005
366024
  }
366006
366025
  }
366007
366026
  }
@@ -366036,8 +366055,8 @@ function expand3(template, context3) {
366036
366055
  expression = expression.substr(1);
366037
366056
  }
366038
366057
  expression.split(/,/g).forEach(function(variable3) {
366039
- var tmp18 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
366040
- values2.push(getValues2(context3, operator2, tmp18[1], tmp18[2] || tmp18[3]));
366058
+ var tmp19 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
366059
+ values2.push(getValues2(context3, operator2, tmp19[1], tmp19[2] || tmp19[3]));
366041
366060
  });
366042
366061
  if (operator2 && operator2 !== "+") {
366043
366062
  var separator = ",";
@@ -440581,9 +440600,9 @@ var require_receivebuffer = __commonJS({
440581
440600
  throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");
440582
440601
  }
440583
440602
  if (this.offset + data2.length >= this.buffer.length) {
440584
- const tmp18 = this.buffer;
440603
+ const tmp19 = this.buffer;
440585
440604
  this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data2.length));
440586
- tmp18.copy(this.buffer);
440605
+ tmp19.copy(this.buffer);
440587
440606
  }
440588
440607
  data2.copy(this.buffer, this.offset);
440589
440608
  return this.offset += data2.length;
@@ -454482,10 +454501,10 @@ var require_esprima = __commonJS({
454482
454501
  };
454483
454502
  Scanner2.prototype.testRegExp = function(pattern, flags2) {
454484
454503
  var astralSubstitute = "\uFFFF";
454485
- var tmp18 = pattern;
454504
+ var tmp19 = pattern;
454486
454505
  var self2 = this;
454487
454506
  if (flags2.indexOf("u") >= 0) {
454488
- tmp18 = tmp18.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $23) {
454507
+ tmp19 = tmp19.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $23) {
454489
454508
  var codePoint = parseInt($1 || $23, 16);
454490
454509
  if (codePoint > 1114111) {
454491
454510
  self2.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
@@ -454497,7 +454516,7 @@ var require_esprima = __commonJS({
454497
454516
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
454498
454517
  }
454499
454518
  try {
454500
- RegExp(tmp18);
454519
+ RegExp(tmp19);
454501
454520
  } catch (e8) {
454502
454521
  this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
454503
454522
  }
@@ -471795,15 +471814,15 @@ var require_sync2 = __commonJS({
471795
471814
  var { readdirSync: readdirSync4, statSync: statSync4 } = require("fs");
471796
471815
  module4.exports = function(start2, callback) {
471797
471816
  let dir = resolve15(".", start2);
471798
- let tmp18, stats = statSync4(dir);
471817
+ let tmp19, stats = statSync4(dir);
471799
471818
  if (!stats.isDirectory()) {
471800
471819
  dir = dirname22(dir);
471801
471820
  }
471802
471821
  while (true) {
471803
- tmp18 = callback(dir, readdirSync4(dir));
471804
- if (tmp18) return resolve15(dir, tmp18);
471805
- dir = dirname22(tmp18 = dir);
471806
- if (tmp18 === dir) break;
471822
+ tmp19 = callback(dir, readdirSync4(dir));
471823
+ if (tmp19) return resolve15(dir, tmp19);
471824
+ dir = dirname22(tmp19 = dir);
471825
+ if (tmp19 === dir) break;
471807
471826
  }
471808
471827
  };
471809
471828
  }
@@ -561844,6 +561863,7 @@ var GraphQlSpecSchema = schemas_exports8.object({
561844
561863
  graphql: schemas_exports8.string(),
561845
561864
  origin: schemas_exports8.string().optional(),
561846
561865
  overrides: schemas_exports8.string().optional(),
561866
+ examples: schemas_exports8.string().optional(),
561847
561867
  name: schemas_exports8.string().optional()
561848
561868
  });
561849
561869
 
@@ -596233,7 +596253,8 @@ async function parseApiConfigurationV2Schema({ apiConfiguration, rawConfiguratio
596233
596253
  definitionLocation = {
596234
596254
  schema: {
596235
596255
  type: "graphql",
596236
- path: spec.graphql
596256
+ path: spec.graphql,
596257
+ examples: spec.examples
596237
596258
  },
596238
596259
  origin: spec.origin,
596239
596260
  overrides: spec.overrides,
@@ -659909,9 +659930,12 @@ var OSSWorkspace = class _OSSWorkspace extends BaseOpenAPIWorkspace {
659909
659930
  const graphqlSpecs = this.allSpecs.filter((spec) => spec.type === "graphql");
659910
659931
  for (const spec of graphqlSpecs) {
659911
659932
  try {
659933
+ const examples = await loadGraphQlExamples(spec.absoluteFilepathToExamples, context3);
659912
659934
  const converter = new GraphQLConverter2({
659913
659935
  context: context3,
659914
- filePath: spec.absoluteFilepath
659936
+ filePath: spec.absoluteFilepath,
659937
+ namespace: spec.namespace,
659938
+ examples
659915
659939
  });
659916
659940
  const result = await converter.convert();
659917
659941
  Object.assign(this.graphqlOperations, result.graphqlOperations);
@@ -660245,7 +660269,8 @@ var OSSWorkspace = class _OSSWorkspace extends BaseOpenAPIWorkspace {
660245
660269
  ...this.allSpecs.flatMap((spec) => {
660246
660270
  const mainPath = spec.type === "protobuf" ? spec.absoluteFilepathToProtobufTarget : spec.absoluteFilepath;
660247
660271
  const overridePaths = Array.isArray(spec.absoluteFilepathToOverrides) ? spec.absoluteFilepathToOverrides : spec.absoluteFilepathToOverrides != null ? [spec.absoluteFilepathToOverrides] : [];
660248
- return [mainPath, ...overridePaths];
660272
+ const examplesPath = spec.type === "graphql" ? spec.absoluteFilepathToExamples : void 0;
660273
+ return [mainPath, ...overridePaths, ...examplesPath != null ? [examplesPath] : []];
660249
660274
  }).filter(isNonNullish)
660250
660275
  ];
660251
660276
  }
@@ -660270,6 +660295,52 @@ var OSSWorkspace = class _OSSWorkspace extends BaseOpenAPIWorkspace {
660270
660295
  }, result);
660271
660296
  }
660272
660297
  };
660298
+ async function loadGraphQlExamples(absoluteFilepathToExamples, context3) {
660299
+ if (absoluteFilepathToExamples == null) {
660300
+ return void 0;
660301
+ }
660302
+ try {
660303
+ const contents = (await (0, import_promises39.readFile)(absoluteFilepathToExamples)).toString();
660304
+ const parsed = jsYaml.load(contents);
660305
+ if (!Array.isArray(parsed)) {
660306
+ return void 0;
660307
+ }
660308
+ for (const entry of parsed) {
660309
+ if (typeof entry !== "object" || entry == null) {
660310
+ context3.logger.warn(`Skipping invalid entry in GraphQL examples file ${absoluteFilepathToExamples}: expected object`);
660311
+ continue;
660312
+ }
660313
+ if (typeof entry.operation !== "string") {
660314
+ context3.logger.warn(`Skipping entry in GraphQL examples file ${absoluteFilepathToExamples}: missing or invalid 'operation' field`);
660315
+ continue;
660316
+ }
660317
+ if (!Array.isArray(entry.examples)) {
660318
+ context3.logger.warn(`Skipping entry for operation '${entry.operation}' in ${absoluteFilepathToExamples}: 'examples' must be an array`);
660319
+ continue;
660320
+ }
660321
+ }
660322
+ const validEntries = parsed.filter((entry) => typeof entry === "object" && entry != null && typeof entry.operation === "string" && Array.isArray(entry.examples)).map((entry) => {
660323
+ const validExamples = entry.examples.filter((ex) => {
660324
+ if (typeof ex !== "object" || ex == null || typeof ex.query !== "string") {
660325
+ context3.logger.warn(`Skipping malformed example for operation '${entry.operation}' in ${absoluteFilepathToExamples}: missing or invalid 'query' field`);
660326
+ return false;
660327
+ }
660328
+ return true;
660329
+ });
660330
+ if (entry.operationType != null) {
660331
+ const lower = entry.operationType.toLowerCase();
660332
+ if (lower !== "query" && lower !== "mutation" && lower !== "subscription") {
660333
+ context3.logger.warn(`Invalid operationType '${entry.operationType}' for operation '${entry.operation}' in ${absoluteFilepathToExamples}: must be 'query', 'mutation', or 'subscription'`);
660334
+ }
660335
+ }
660336
+ return { ...entry, examples: validExamples };
660337
+ }).filter((entry) => entry.examples.length > 0);
660338
+ return validEntries.length > 0 ? validEntries : void 0;
660339
+ } catch (error50) {
660340
+ context3.logger.error(`Failed to load GraphQL examples from ${absoluteFilepathToExamples}:`, extractErrorMessage(error50));
660341
+ return void 0;
660342
+ }
660343
+ }
660273
660344
  async function getAuthFromOverrideFiles(specs) {
660274
660345
  for (const spec of specs) {
660275
660346
  if (spec.type !== "openapi") {
@@ -661303,6 +661374,8 @@ var GraphQlSpecSchema2 = external_exports.object({
661303
661374
  origin: external_exports.string().optional(),
661304
661375
  /** Path to overrides file for the GraphQL spec. */
661305
661376
  overrides: external_exports.union([external_exports.string(), external_exports.array(external_exports.string()).nonempty()]).optional(),
661377
+ /** Path to a YAML/JSON file containing named examples for GraphQL operations. */
661378
+ examples: external_exports.string().optional(),
661306
661379
  /** Name used to group this GraphQL spec in the docs (rendered as a top-level section). */
661307
661380
  name: external_exports.string().optional()
661308
661381
  });
@@ -668495,7 +668568,7 @@ var AccessTokenPosthogManager = class {
668495
668568
  properties: {
668496
668569
  ...event,
668497
668570
  ...event.properties,
668498
- version: "5.33.7",
668571
+ version: "5.35.0",
668499
668572
  usingAccessToken: true,
668500
668573
  ...getRunIdProperties()
668501
668574
  }
@@ -668559,7 +668632,7 @@ var UserPosthogManager = class {
668559
668632
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
668560
668633
  event: "CLI",
668561
668634
  properties: {
668562
- version: "5.33.7",
668635
+ version: "5.35.0",
668563
668636
  ...event,
668564
668637
  ...event.properties,
668565
668638
  usingAccessToken: false,
@@ -673153,6 +673226,13 @@ var ApiDefinitionConverter = class {
673153
673226
  sourced: sourced.overrides
673154
673227
  });
673155
673228
  }
673229
+ if (spec.examples != null && !isNullish2(sourced.examples)) {
673230
+ result.examples = await this.resolvePath({
673231
+ absoluteFernYmlPath,
673232
+ path: spec.examples,
673233
+ sourced: sourced.examples
673234
+ });
673235
+ }
673156
673236
  if (spec.name != null) {
673157
673237
  result.name = spec.name;
673158
673238
  }
@@ -674588,6 +674668,7 @@ var LegacyApiSpecAdapter = class {
674588
674668
  type: "graphql",
674589
674669
  absoluteFilepath: spec.graphql,
674590
674670
  absoluteFilepathToOverrides: spec.overrides,
674671
+ absoluteFilepathToExamples: spec.examples,
674591
674672
  namespace: spec.name
674592
674673
  };
674593
674674
  }
@@ -812991,7 +813072,7 @@ var V67_TO_V66_MIGRATION = {
812991
813072
  [GeneratorName.PHP_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
812992
813073
  [GeneratorName.RUST_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
812993
813074
  [GeneratorName.RUST_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
812994
- [GeneratorName.CLI]: GeneratorWasNotCreatedYet
813075
+ [GeneratorName.CLI]: "0.0.1"
812995
813076
  },
812996
813077
  jsonifyEarlierVersion: (ir11) => IrSerialization_exports.V66.IntermediateRepresentation.jsonOrThrow(ir11, {
812997
813078
  unrecognizedObjectKeys: "passthrough",
@@ -825187,10 +825268,12 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
825187
825268
  const graphqlSpecs = workspace.allSpecs.filter((spec) => spec.type === "graphql");
825188
825269
  for (const spec of graphqlSpecs) {
825189
825270
  try {
825271
+ const examples = await this.loadGraphQlExamples(spec.absoluteFilepathToExamples);
825190
825272
  const converter = new GraphQLConverter({
825191
825273
  context: this.taskContext,
825192
825274
  filePath: spec.absoluteFilepath,
825193
- namespace: spec.namespace
825275
+ namespace: spec.namespace,
825276
+ examples
825194
825277
  });
825195
825278
  const graphqlResult = await converter.convert();
825196
825279
  Object.assign(graphqlOperations, graphqlResult.graphqlOperations);
@@ -825206,6 +825289,52 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
825206
825289
  }
825207
825290
  return { operations: graphqlOperations, types: graphqlTypes, namespacesByOperationId };
825208
825291
  }
825292
+ async loadGraphQlExamples(absoluteFilepathToExamples) {
825293
+ if (absoluteFilepathToExamples == null) {
825294
+ return void 0;
825295
+ }
825296
+ try {
825297
+ const contents = (await (0, import_promises65.readFile)(absoluteFilepathToExamples)).toString();
825298
+ const parsed = jsYaml.load(contents);
825299
+ if (!Array.isArray(parsed)) {
825300
+ return void 0;
825301
+ }
825302
+ for (const entry of parsed) {
825303
+ if (typeof entry !== "object" || entry == null) {
825304
+ this.taskContext.logger.warn(`Skipping invalid entry in GraphQL examples file ${absoluteFilepathToExamples}: expected object`);
825305
+ continue;
825306
+ }
825307
+ if (typeof entry.operation !== "string") {
825308
+ this.taskContext.logger.warn(`Skipping entry in GraphQL examples file ${absoluteFilepathToExamples}: missing or invalid 'operation' field`);
825309
+ continue;
825310
+ }
825311
+ if (!Array.isArray(entry.examples)) {
825312
+ this.taskContext.logger.warn(`Skipping entry for operation '${entry.operation}' in ${absoluteFilepathToExamples}: 'examples' must be an array`);
825313
+ continue;
825314
+ }
825315
+ }
825316
+ const validEntries = parsed.filter((entry) => typeof entry === "object" && entry != null && typeof entry.operation === "string" && Array.isArray(entry.examples)).map((entry) => {
825317
+ const validExamples = entry.examples.filter((ex) => {
825318
+ if (typeof ex !== "object" || ex == null || typeof ex.query !== "string") {
825319
+ this.taskContext.logger.warn(`Skipping malformed example for operation '${entry.operation}' in ${absoluteFilepathToExamples}: missing or invalid 'query' field`);
825320
+ return false;
825321
+ }
825322
+ return true;
825323
+ });
825324
+ if (entry.operationType != null) {
825325
+ const lower = entry.operationType.toLowerCase();
825326
+ if (lower !== "query" && lower !== "mutation" && lower !== "subscription") {
825327
+ this.taskContext.logger.warn(`Invalid operationType '${entry.operationType}' for operation '${entry.operation}' in ${absoluteFilepathToExamples}: must be 'query', 'mutation', or 'subscription'`);
825328
+ }
825329
+ }
825330
+ return { ...entry, examples: validExamples };
825331
+ }).filter((entry) => entry.examples.length > 0);
825332
+ return validEntries.length > 0 ? validEntries : void 0;
825333
+ } catch (error50) {
825334
+ this.taskContext.logger.error(`Failed to load GraphQL examples from ${absoluteFilepathToExamples}:`, String(error50));
825335
+ return void 0;
825336
+ }
825337
+ }
825209
825338
  /**
825210
825339
  * Handles librarySection navigation items by reading pre-generated MDX files
825211
825340
  * and _navigation.yml from the library's output directory.
@@ -860356,7 +860485,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
860356
860485
  var LOGS_FOLDER_NAME = "logs";
860357
860486
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
860358
860487
  function getCliSource() {
860359
- const version7 = "5.33.7";
860488
+ const version7 = "5.35.0";
860360
860489
  return `cli@${version7}`;
860361
860490
  }
860362
860491
  var DebugLogger = class {
@@ -869684,10 +869813,22 @@ async function loadSingleNamespaceAPIWorkspace({ absolutePathToWorkspace, namesp
869684
869813
  }
869685
869814
  };
869686
869815
  }
869816
+ const absoluteFilepathToExamples = definition3.schema.examples != null ? join8(absolutePathToWorkspace, RelativeFilePath2.of(definition3.schema.examples)) : void 0;
869817
+ if (definition3.schema.examples != null && absoluteFilepathToExamples != null && !await doesPathExist(absoluteFilepathToExamples)) {
869818
+ return {
869819
+ didSucceed: false,
869820
+ failures: {
869821
+ [RelativeFilePath2.of(definition3.schema.examples)]: {
869822
+ type: WorkspaceLoaderFailureType.FILE_MISSING
869823
+ }
869824
+ }
869825
+ };
869826
+ }
869687
869827
  specs.push({
869688
869828
  type: "graphql",
869689
869829
  absoluteFilepath: absoluteFilepathToGraphQL,
869690
869830
  absoluteFilepathToOverrides,
869831
+ absoluteFilepathToExamples,
869691
869832
  namespace
869692
869833
  });
869693
869834
  continue;
@@ -876520,7 +876661,7 @@ async function retryWithRateLimit({ fn: fn10, retryRateLimited, logger: logger4,
876520
876661
 
876521
876662
  // ../generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
876522
876663
  var gzipAsync = (0, import_util19.promisify)(import_zlib5.gzip);
876523
- async function createAndStartJob({ projectConfig, workspace, organization, intermediateRepresentation, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, irVersionOverride, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignorePath, skipFernignore, retryRateLimited, automationMode, autoMerge, skipIfNoDiff, verify: verify2, loginCommand = "fern login" }) {
876664
+ async function createAndStartJob({ projectConfig, workspace, organization, intermediateRepresentation, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, irVersionOverride, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignorePath, skipFernignore, retryRateLimited, automationMode, autoMerge, skipIfNoDiff, verify: verify2, loginCommand = "fern login", specsTarGzBuffer }) {
876524
876665
  let fernignoreContents;
876525
876666
  if (skipFernignore) {
876526
876667
  fernignoreContents = "";
@@ -876559,7 +876700,14 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
876559
876700
  logger: context3.logger,
876560
876701
  onRateLimitedWithoutRetry: () => context3.failAndThrow("Received 429 Too Many Requests. Re-run with --retry-rate-limited to automatically retry.", void 0, { code: CliError.Code.NetworkError })
876561
876702
  });
876562
- await startJob({ intermediateRepresentation, job, context: context3, generatorInvocation, irVersionOverride });
876703
+ await startJob({
876704
+ intermediateRepresentation,
876705
+ job,
876706
+ context: context3,
876707
+ generatorInvocation,
876708
+ irVersionOverride,
876709
+ specsTarGzBuffer
876710
+ });
876563
876711
  return job;
876564
876712
  }
876565
876713
  async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, verify: verify2, loginCommand }) {
@@ -876663,7 +876811,7 @@ Please ensure you have membership at https://dashboard.buildwithfern.com, and as
876663
876811
  }
876664
876812
  return createResponse.body;
876665
876813
  }
876666
- async function startJob({ intermediateRepresentation, generatorInvocation, job, context: context3, irVersionOverride }) {
876814
+ async function startJob({ intermediateRepresentation, generatorInvocation, job, context: context3, irVersionOverride, specsTarGzBuffer }) {
876667
876815
  const irVersionFromFdr = await getIrVersionForGenerator(generatorInvocation).then((version7) => version7 == null ? void 0 : "v" + version7.toString());
876668
876816
  const resolvedIrVersionOverride = irVersionOverride ?? irVersionFromFdr;
876669
876817
  const migratedIntermediateRepresentation = resolvedIrVersionOverride == null ? await migrateIntermediateRepresentationForGenerator({
@@ -876691,7 +876839,11 @@ async function startJob({ intermediateRepresentation, generatorInvocation, job,
876691
876839
  const irBytes = new TextEncoder().encode(irAsString);
876692
876840
  const compressed = await gzipAsync(irBytes);
876693
876841
  context3.logger.debug(`Compressed IR from ${irBytes.byteLength} bytes to ${compressed.length} bytes (${((1 - compressed.length / irBytes.byteLength) * 100).toFixed(1)}% reduction)`);
876694
- formData.append("file", compressed, { filename: "ir.json", contentType: "application/octet-stream" });
876842
+ formData.append("ir", compressed, { filename: "ir.json", contentType: "application/octet-stream" });
876843
+ if (specsTarGzBuffer != null) {
876844
+ formData.append("specs", specsTarGzBuffer, { filename: "specs.tar.gz", contentType: "application/gzip" });
876845
+ context3.logger.debug(`Appended specs tar.gz (${specsTarGzBuffer.length} bytes)`);
876846
+ }
876695
876847
  const url3 = (0, import_url_join23.default)(getFiddleOrigin(), `/api/remote-gen/jobs/${job.jobId}/start`);
876696
876848
  try {
876697
876849
  await axios_default.post(url3, formData, {
@@ -877382,7 +877534,7 @@ var SourceUploader = class {
877382
877534
  };
877383
877535
 
877384
877536
  // ../generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForGenerator.js
877385
- async function runRemoteGenerationForGenerator({ projectConfig, organization, workspace, interactiveTaskContext, generatorInvocation, version: version7, audiences, shouldLogS3Url, token, whitelabel, replay, irVersionOverride, absolutePathToPreview, isPreview: isPreviewOverride, fiddlePreview, pushPreviewBranch, readme, fernignorePath, skipFernignore, dynamicIrOnly, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, loginCommand }) {
877537
+ async function runRemoteGenerationForGenerator({ projectConfig, organization, workspace, interactiveTaskContext, generatorInvocation, version: version7, audiences, shouldLogS3Url, token, whitelabel, replay, irVersionOverride, absolutePathToPreview, isPreview: isPreviewOverride, fiddlePreview, pushPreviewBranch, readme, fernignorePath, skipFernignore, dynamicIrOnly, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, loginCommand, specsTarGzBuffer }) {
877386
877538
  const fdr = createFdrService({ token: token.value });
877387
877539
  const fdrOrigin = "https://registry-dev2.buildwithfern.com";
877388
877540
  const isAirGapped = await detectAirGappedMode(`${fdrOrigin}/health`, interactiveTaskContext.logger);
@@ -877574,7 +877726,8 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
877574
877726
  autoMerge,
877575
877727
  skipIfNoDiff,
877576
877728
  verify: verify2,
877577
- loginCommand
877729
+ loginCommand,
877730
+ specsTarGzBuffer
877578
877731
  });
877579
877732
  interactiveTaskContext.logger.debug(`Job ID: ${job.jobId}`);
877580
877733
  const taskId = job.taskIds[0];
@@ -877742,7 +877895,7 @@ function resolveVersionFallback(resolvedVersion) {
877742
877895
  }
877743
877896
 
877744
877897
  // ../generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForAPIWorkspace.js
877745
- async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization, workspace, context: context3, generatorGroup, version: version7, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, isPreview, fiddlePreview, pushPreviewBranch, mode, fernignorePath, skipFernignore, dynamicIrOnly, validateWorkspace, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, automation, occurrenceTracker, loginCommand }) {
877898
+ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization, workspace, context: context3, generatorGroup, version: version7, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, isPreview, fiddlePreview, pushPreviewBranch, mode, fernignorePath, skipFernignore, dynamicIrOnly, validateWorkspace, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, automation, occurrenceTracker, loginCommand, getSpecsTarGzBuffer }) {
877746
877899
  if (generatorGroup.generators.length === 0) {
877747
877900
  context3.logger.warn("No generators specified.");
877748
877901
  return null;
@@ -877788,6 +877941,7 @@ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization,
877788
877941
  generatorsYmlAbsolutePath,
877789
877942
  occurrenceTracker: effectiveOccurrenceTracker,
877790
877943
  loginCommand,
877944
+ getSpecsTarGzBuffer,
877791
877945
  onSnippetsProduced: (invocation) => snippetsProducedBy.push(invocation)
877792
877946
  }))));
877793
877947
  if (automation == null && results.some((didSucceed) => !didSucceed)) {
@@ -877797,7 +877951,7 @@ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization,
877797
877951
  snippetsProducedBy
877798
877952
  };
877799
877953
  }
877800
- async function generateOne({ generatorInvocation, interactiveTaskContext, projectConfig, organization, workspace, context: context3, generatorGroup, version: version7, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, isPreview, fiddlePreview, pushPreviewBranch, mode, fernignorePath, skipFernignore, dynamicIrOnly, validateWorkspace, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, automation, generatorsYmlAbsolutePath, occurrenceTracker, loginCommand, onSnippetsProduced }) {
877954
+ async function generateOne({ generatorInvocation, interactiveTaskContext, projectConfig, organization, workspace, context: context3, generatorGroup, version: version7, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, isPreview, fiddlePreview, pushPreviewBranch, mode, fernignorePath, skipFernignore, dynamicIrOnly, validateWorkspace, retryRateLimited, requireEnvVars, automationMode, autoMerge, skipIfNoDiff, verify: verify2, noReplay, disableTelemetry, automation, generatorsYmlAbsolutePath, occurrenceTracker, loginCommand, getSpecsTarGzBuffer, onSnippetsProduced }) {
877801
877955
  const startedAt = Date.now();
877802
877956
  try {
877803
877957
  const settings = getBaseOpenAPIWorkspaceSettingsFromGeneratorInvocation(generatorInvocation);
@@ -877863,7 +878017,8 @@ async function generateOne({ generatorInvocation, interactiveTaskContext, projec
877863
878017
  verify: verify2,
877864
878018
  noReplay,
877865
878019
  disableTelemetry,
877866
- loginCommand
878020
+ loginCommand,
878021
+ specsTarGzBuffer: await getSpecsTarGzBuffer?.(generatorInvocation.name)
877867
878022
  });
877868
878023
  if (remoteTaskHandlerResponse?.createdSnippets) {
877869
878024
  onSnippetsProduced(generatorInvocation);
@@ -879202,7 +879357,7 @@ var LegacyDocsPublisher = class {
879202
879357
  previewId,
879203
879358
  disableTemplates: void 0,
879204
879359
  skipUpload,
879205
- cliVersion: "5.33.7",
879360
+ cliVersion: "5.35.0",
879206
879361
  loginCommand: "fern auth login"
879207
879362
  });
879208
879363
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -904619,7 +904774,7 @@ var EndpointSnippetGenerator3 = class {
904619
904774
  this.context.errors.scope(Scope4.PathParameters);
904620
904775
  const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
904621
904776
  if (pathParameters.length > 0) {
904622
- otherArgs.push(...this.getPathParameters({ namedParameters: pathParameters, snippet: snippet2 }).map((field5) => field5.value));
904777
+ otherArgs.push(...this.getPathParameters({ namedParameters: pathParameters, snippet: snippet2, asPointer: true }).map((field5) => field5.value));
904623
904778
  }
904624
904779
  this.context.errors.unscope();
904625
904780
  this.context.errors.scope(Scope4.RequestBody);
@@ -904657,20 +904812,25 @@ var EndpointSnippetGenerator3 = class {
904657
904812
  inlinePathParameters: this.context.customConfig?.inlinePathParameters ?? true,
904658
904813
  inlineFileProperties: this.context.customConfig?.inlineFileProperties ?? true
904659
904814
  };
904815
+ const includePathParamsInRequest = this.context.includePathParametersInWrappedRequest({
904816
+ request: request7,
904817
+ inlinePathParameters
904818
+ });
904660
904819
  this.context.errors.scope(Scope4.PathParameters);
904661
904820
  const pathParameterFields = [];
904662
904821
  const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
904663
904822
  if (pathParameters.length > 0) {
904664
904823
  pathParameterFields.push(...this.getPathParameters({
904665
904824
  namedParameters: pathParameters,
904666
- snippet: snippet2
904825
+ snippet: snippet2,
904826
+ asPointer: !includePathParamsInRequest
904667
904827
  }));
904668
904828
  }
904669
904829
  this.context.errors.unscope();
904670
904830
  this.context.errors.scope(Scope4.RequestBody);
904671
904831
  const filePropertyInfo = this.getFilePropertyInfo({ request: request7, snippet: snippet2 });
904672
904832
  this.context.errors.unscope();
904673
- if (!this.context.includePathParametersInWrappedRequest({ request: request7, inlinePathParameters })) {
904833
+ if (!includePathParamsInRequest) {
904674
904834
  otherArgs.push(...pathParameterFields.map((field5) => field5.value));
904675
904835
  }
904676
904836
  if (!inlineFileProperties) {
@@ -904683,10 +904843,7 @@ var EndpointSnippetGenerator3 = class {
904683
904843
  }) ? this.getInlinedRequestArg({
904684
904844
  request: request7,
904685
904845
  snippet: snippet2,
904686
- pathParameterFields: this.context.includePathParametersInWrappedRequest({
904687
- request: request7,
904688
- inlinePathParameters
904689
- }) ? pathParameterFields : [],
904846
+ pathParameterFields: includePathParamsInRequest ? pathParameterFields : [],
904690
904847
  filePropertyInfo
904691
904848
  }) : void 0;
904692
904849
  return { otherArgs, requestArg };
@@ -904788,7 +904945,7 @@ var EndpointSnippetGenerator3 = class {
904788
904945
  }
904789
904946
  return fields;
904790
904947
  }
904791
- getPathParameters({ namedParameters, snippet: snippet2 }) {
904948
+ getPathParameters({ namedParameters, snippet: snippet2, asPointer }) {
904792
904949
  const args = [];
904793
904950
  const pathParameters = this.context.associateByWireValueOrDefault({
904794
904951
  parameters: namedParameters,
@@ -904797,7 +904954,7 @@ var EndpointSnippetGenerator3 = class {
904797
904954
  for (const parameter6 of pathParameters) {
904798
904955
  args.push({
904799
904956
  name: this.context.getTypeName(parameter6.name.name),
904800
- value: this.context.dynamicTypeInstantiationMapper.convertToPointerIfPossible(parameter6)
904957
+ value: asPointer ? this.context.dynamicTypeInstantiationMapper.convertToPointerIfPossible(parameter6) : this.context.dynamicTypeInstantiationMapper.convert(parameter6)
904801
904958
  });
904802
904959
  }
904803
904960
  return args;
@@ -930496,7 +930653,7 @@ var import_serialization = __toESM(require_serialization3(), 1);
930496
930653
  var import_promises118 = require("fs/promises");
930497
930654
  var path87 = __toESM(require("path"), 1);
930498
930655
  var import_path93 = require("path");
930499
- var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
930656
+ var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
930500
930657
 
930501
930658
  // ../generation/local-generation/local-workspace-runner/lib/getGeneratorConfig.js
930502
930659
  init_lib9();
@@ -931674,21 +931831,35 @@ var LocalTaskHandler = class {
931674
931831
 
931675
931832
  // ../generation/local-generation/local-workspace-runner/lib/rawSpecs.js
931676
931833
  init_lib4();
931834
+ init_lib8();
931677
931835
  var import_promises117 = require("fs/promises");
931678
931836
  init_js_yaml();
931679
931837
  var import_path92 = __toESM(require("path"), 1);
931838
+ var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
931680
931839
  async function collectRawSpecs({ specs, hostOutputDir, containerBaseDir, context: context3, audiences }) {
931681
931840
  const manifest = { specs: [] };
931682
931841
  if (specs.length === 0) {
931683
931842
  return manifest;
931684
931843
  }
931685
- for (const [i9, spec] of specs.entries()) {
931844
+ const typeCounters = {};
931845
+ function nextIndex2(type8) {
931846
+ const idx = typeCounters[type8] ?? 0;
931847
+ typeCounters[type8] = idx + 1;
931848
+ return idx;
931849
+ }
931850
+ for (const spec of specs) {
931851
+ let specType;
931852
+ if (spec.type === "openapi") {
931853
+ specType = await isAsyncAPISpec(spec.absoluteFilepath) ? "asyncapi" : "openapi";
931854
+ } else {
931855
+ specType = spec.type;
931856
+ }
931686
931857
  const entry = await resolveAndWriteSpec({
931687
931858
  spec,
931688
931859
  hostOutputDir,
931689
931860
  containerBaseDir,
931690
931861
  context: context3,
931691
- index: i9,
931862
+ index: nextIndex2(specType),
931692
931863
  audiences
931693
931864
  });
931694
931865
  manifest.specs.push(entry);
@@ -931712,7 +931883,7 @@ async function resolveAndWriteSpec({ spec, hostOutputDir, containerBaseDir, cont
931712
931883
  }
931713
931884
  async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir, context: context3, index: index3, audiences }) {
931714
931885
  const isAsync2 = await isAsyncAPISpec(spec.absoluteFilepath);
931715
- const filename = `spec-${index3}.json`;
931886
+ const filename = isAsync2 ? `asyncapi${index3}.json` : `openapi${index3}.json`;
931716
931887
  let resolved;
931717
931888
  if (isAsync2) {
931718
931889
  resolved = await loadAsyncAPI({
@@ -931737,7 +931908,7 @@ async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir,
931737
931908
  };
931738
931909
  }
931739
931910
  async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context: context3, index: index3 }) {
931740
- const filename = `spec-${index3}.json`;
931911
+ const filename = `openrpc${index3}.json`;
931741
931912
  const rawContent = await (0, import_promises117.readFile)(spec.absoluteFilepath, "utf-8");
931742
931913
  let parsed;
931743
931914
  try {
@@ -931768,7 +931939,7 @@ async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context:
931768
931939
  };
931769
931940
  }
931770
931941
  async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
931771
- const dirName = `proto-${index3}`;
931942
+ const dirName = `protobuf${index3}`;
931772
931943
  const destDir = import_path92.default.join(hostOutputDir, dirName);
931773
931944
  await (0, import_promises117.cp)(spec.absoluteFilepathToProtobufRoot, destDir, { recursive: true });
931774
931945
  const entry = {
@@ -931779,7 +931950,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
931779
931950
  if (overrides.length > 0) {
931780
931951
  entry.overridePaths = [];
931781
931952
  for (const [i9, override] of overrides.entries()) {
931782
- const overrideName = `proto-${index3}-override-${i9}${import_path92.default.extname(override)}`;
931953
+ const overrideName = `protobuf${index3}-override-${i9}${import_path92.default.extname(override)}`;
931783
931954
  await (0, import_promises117.copyFile)(override, import_path92.default.join(hostOutputDir, overrideName));
931784
931955
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
931785
931956
  }
@@ -931788,7 +931959,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
931788
931959
  }
931789
931960
  async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
931790
931961
  const ext2 = import_path92.default.extname(spec.absoluteFilepath) || ".graphql";
931791
- const filename = `spec-${index3}${ext2}`;
931962
+ const filename = `graphql${index3}${ext2}`;
931792
931963
  await (0, import_promises117.copyFile)(spec.absoluteFilepath, import_path92.default.join(hostOutputDir, filename));
931793
931964
  const entry = {
931794
931965
  type: "graphql",
@@ -931798,7 +931969,7 @@ async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index
931798
931969
  if (overrides.length > 0) {
931799
931970
  entry.overridePaths = [];
931800
931971
  for (const [i9, override] of overrides.entries()) {
931801
- const overrideName = `graphql-${index3}-override-${i9}${import_path92.default.extname(override)}`;
931972
+ const overrideName = `graphql${index3}-override-${i9}${import_path92.default.extname(override)}`;
931802
931973
  await (0, import_promises117.copyFile)(override, import_path92.default.join(hostOutputDir, overrideName));
931803
931974
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
931804
931975
  }
@@ -931907,6 +932078,30 @@ function matchesAudiences(operation, selectedAudiences) {
931907
932078
  function hasOperations(pathItem) {
931908
932079
  return Object.keys(pathItem).some((key2) => HTTP_METHODS2.has(key2.toLowerCase()));
931909
932080
  }
932081
+ async function createSpecsTarGzBuffer({ specs, context: context3, audiences }) {
932082
+ const tmpDir = await import_tmp_promise14.default.dir({ unsafeCleanup: true });
932083
+ try {
932084
+ const manifest = await collectRawSpecs({
932085
+ specs,
932086
+ hostOutputDir: AbsoluteFilePath2.of(tmpDir.path),
932087
+ containerBaseDir: "/fern/specs",
932088
+ context: context3,
932089
+ audiences
932090
+ });
932091
+ await (0, import_promises117.writeFile)(join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of(SPECS_MANIFEST_FILENAME)), JSON.stringify(manifest, void 0, 4));
932092
+ const tarGzPath = join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of("specs.tar.gz"));
932093
+ await Zn8({
932094
+ gzip: true,
932095
+ cwd: tmpDir.path,
932096
+ file: tarGzPath,
932097
+ portable: true,
932098
+ filter: (entryPath) => entryPath !== "./specs.tar.gz"
932099
+ }, ["."]);
932100
+ return await (0, import_promises117.readFile)(tarGzPath);
932101
+ } finally {
932102
+ await tmpDir.cleanup();
932103
+ }
932104
+ }
931910
932105
 
931911
932106
  // ../generation/local-generation/local-workspace-runner/lib/runGenerator.js
931912
932107
  function extractLicenseFilePath(generatorInvocation, absolutePathToFernConfig) {
@@ -932065,7 +932260,7 @@ async function writeIrToFile({ ir: ir11, workspaceTempDir, filename, context: co
932065
932260
  if (filename) {
932066
932261
  absolutePathToIr = AbsoluteFilePath2.of((0, import_path93.join)(workspaceTempDir.path, filename));
932067
932262
  } else {
932068
- const irFile = await import_tmp_promise14.default.file({
932263
+ const irFile = await import_tmp_promise15.default.file({
932069
932264
  tmpdir: workspaceTempDir.path
932070
932265
  });
932071
932266
  absolutePathToIr = AbsoluteFilePath2.of(irFile.path);
@@ -932102,7 +932297,7 @@ init_lib6();
932102
932297
  var fs18 = __toESM(require("fs/promises"), 1);
932103
932298
  var import_os13 = __toESM(require("os"), 1);
932104
932299
  var import_path94 = __toESM(require("path"), 1);
932105
- var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
932300
+ var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
932106
932301
 
932107
932302
  // ../generation/local-generation/local-workspace-runner/lib/getGeneratorOutputSubfolder.js
932108
932303
  function getGeneratorOutputSubfolder(generatorName) {
@@ -932220,7 +932415,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
932220
932415
  intermediateRepresentation.publishConfig = publishConfig;
932221
932416
  }
932222
932417
  const absolutePathToPreviewForGenerator = resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvocation);
932223
- const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await import_tmp_promise15.default.dir().then((dir) => dir.path));
932418
+ const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await import_tmp_promise16.default.dir().then((dir) => dir.path));
932224
932419
  const selfhostedGithubConfig = getSelfhostedGithubConfig(generatorInvocation, absolutePathToPreviewForGenerator != null);
932225
932420
  if (version7 != null && (0, import_autoversion4.isAutoVersion)(version7)) {
932226
932421
  if (selfhostedGithubConfig == null) {
@@ -932432,7 +932627,7 @@ function resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvoc
932432
932627
  return join8(absolutePathToPreview, RelativeFilePath2.of(subfolderName));
932433
932628
  }
932434
932629
  async function getWorkspaceTempDir() {
932435
- return import_tmp_promise15.default.dir({
932630
+ return import_tmp_promise16.default.dir({
932436
932631
  // use the /private prefix on osx so that docker can access the tmpdir
932437
932632
  // see https://stackoverflow.com/a/45123074
932438
932633
  tmpdir: import_os13.default.platform() === "darwin" ? import_path94.default.join("/private", import_os13.default.tmpdir()) : void 0,
@@ -950011,7 +950206,7 @@ var initializeWithReadme = async ({ readmeUrl, organization, taskContext, versio
950011
950206
  var import_promises140 = require("fs/promises");
950012
950207
  init_js_yaml();
950013
950208
  var import_path100 = require("path");
950014
- var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
950209
+ var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
950015
950210
  var LoadOpenAPIStatus;
950016
950211
  (function(LoadOpenAPIStatus2) {
950017
950212
  LoadOpenAPIStatus2["Success"] = "success";
@@ -950020,7 +950215,7 @@ var LoadOpenAPIStatus;
950020
950215
  async function loadOpenAPIFromUrl({ url: url3, logger: logger4 }) {
950021
950216
  try {
950022
950217
  const data2 = await fetchOpenAPIFromUrl({ url: url3, logger: logger4 });
950023
- const tmpDir = await import_tmp_promise16.default.dir();
950218
+ const tmpDir = await import_tmp_promise17.default.dir();
950024
950219
  const filePath = (0, import_path100.join)(tmpDir.path, url3.endsWith(".json") ? "openapi.json" : "openapi.yaml");
950025
950220
  logger4.debug("tmpDir", tmpDir.path);
950026
950221
  logger4.debug("filePath", filePath);
@@ -953902,7 +954097,7 @@ function getAutomationContextFromEnv() {
953902
954097
  config_branch: process.env.FERN_CONFIG_BRANCH,
953903
954098
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
953904
954099
  trigger: process.env.GITHUB_EVENT_NAME,
953905
- cli_version: "5.33.7"
954100
+ cli_version: "5.35.0"
953906
954101
  };
953907
954102
  }
953908
954103
  function isAutomationMode() {
@@ -954728,7 +954923,7 @@ var CliContext = class _CliContext {
954728
954923
  if (false) {
954729
954924
  this.logger.error("CLI_VERSION is not defined");
954730
954925
  }
954731
- return "5.33.7";
954926
+ return "5.35.0";
954732
954927
  }
954733
954928
  getCliName() {
954734
954929
  if (false) {
@@ -956682,6 +956877,22 @@ async function generateWorkspace({
956682
956877
  disableTelemetry: isTelemetryDisabled()
956683
956878
  });
956684
956879
  } else if (token != null) {
956880
+ let cachedSpecsTarGz;
956881
+ let specsComputed = false;
956882
+ const getSpecsTarGz = async (generatorName2) => {
956883
+ if (!(workspace instanceof OSSWorkspace) || !generatorWantsSpecs(generatorName2)) {
956884
+ return void 0;
956885
+ }
956886
+ if (!specsComputed) {
956887
+ specsComputed = true;
956888
+ cachedSpecsTarGz = await createSpecsTarGzBuffer({
956889
+ specs: workspace.allSpecs,
956890
+ context: groupContext,
956891
+ audiences: group.audiences
956892
+ });
956893
+ }
956894
+ return cachedSpecsTarGz;
956895
+ };
956685
956896
  await runRemoteGenerationForAPIWorkspace({
956686
956897
  projectConfig,
956687
956898
  organization,
@@ -956708,7 +956919,8 @@ async function generateWorkspace({
956708
956919
  skipIfNoDiff,
956709
956920
  noReplay,
956710
956921
  verify: verify2,
956711
- disableTelemetry: isTelemetryDisabled()
956922
+ disableTelemetry: isTelemetryDisabled(),
956923
+ getSpecsTarGzBuffer: getSpecsTarGz
956712
956924
  });
956713
956925
  }
956714
956926
  })
@@ -967443,7 +967655,7 @@ async function mockServer({
967443
967655
  init_lib6();
967444
967656
  var import_promises191 = require("fs/promises");
967445
967657
  var import_path112 = __toESM(require("path"), 1);
967446
- var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
967658
+ var import_tmp_promise18 = __toESM(require_tmp_promise(), 1);
967447
967659
  async function registerWorkspacesV1({
967448
967660
  project,
967449
967661
  cliContext,
@@ -967489,7 +967701,7 @@ async function registerWorkspacesV1({
967489
967701
  });
967490
967702
  return;
967491
967703
  }
967492
- const tmpDir = await import_tmp_promise17.default.dir();
967704
+ const tmpDir = await import_tmp_promise18.default.dir();
967493
967705
  const tarPath = import_path112.default.join(tmpDir.path, "definition.tgz");
967494
967706
  context3.logger.debug(`Compressing definition at ${tmpDir.path}`);
967495
967707
  await Zn8({ file: tarPath, cwd: resolvedWorkspace.absoluteFilePath }, ["."]);