@fern-api/fern-api-dev 5.33.6 → 5.34.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 +245 -165
  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;
@@ -265205,9 +265205,9 @@ var require_utf16 = __commonJS({
265205
265205
  Utf16BEEncoder.prototype.write = function(str3) {
265206
265206
  var buf = Buffer5.from(str3, "ucs2");
265207
265207
  for (var i9 = 0; i9 < buf.length; i9 += 2) {
265208
- var tmp18 = buf[i9];
265208
+ var tmp19 = buf[i9];
265209
265209
  buf[i9] = buf[i9 + 1];
265210
- buf[i9 + 1] = tmp18;
265210
+ buf[i9 + 1] = tmp19;
265211
265211
  }
265212
265212
  return buf;
265213
265213
  };
@@ -319876,9 +319876,9 @@ var init_mod = __esm({
319876
319876
  };
319877
319877
  distance = (a3, b8) => {
319878
319878
  if (a3.length < b8.length) {
319879
- const tmp18 = b8;
319879
+ const tmp19 = b8;
319880
319880
  b8 = a3;
319881
- a3 = tmp18;
319881
+ a3 = tmp19;
319882
319882
  }
319883
319883
  if (b8.length === 0) {
319884
319884
  return a3.length;
@@ -319933,7 +319933,7 @@ var require_levenshtein = __commonJS({
319933
319933
  var str1Len = str1.length, str2Len = str22.length;
319934
319934
  if (str1Len === 0) return str2Len;
319935
319935
  if (str2Len === 0) return str1Len;
319936
- var curCol, nextCol, i9, j7, tmp18;
319936
+ var curCol, nextCol, i9, j7, tmp19;
319937
319937
  for (i9 = 0; i9 < str2Len; ++i9) {
319938
319938
  prevRow[i9] = i9;
319939
319939
  str2Char[i9] = str22.charCodeAt(i9);
@@ -319946,13 +319946,13 @@ var require_levenshtein = __commonJS({
319946
319946
  curCol = nextCol;
319947
319947
  strCmp = 0 === collator.compare(str1.charAt(i9), String.fromCharCode(str2Char[j7]));
319948
319948
  nextCol = prevRow[j7] + (strCmp ? 0 : 1);
319949
- tmp18 = curCol + 1;
319950
- if (nextCol > tmp18) {
319951
- nextCol = tmp18;
319949
+ tmp19 = curCol + 1;
319950
+ if (nextCol > tmp19) {
319951
+ nextCol = tmp19;
319952
319952
  }
319953
- tmp18 = prevRow[j7 + 1] + 1;
319954
- if (nextCol > tmp18) {
319955
- nextCol = tmp18;
319953
+ tmp19 = prevRow[j7 + 1] + 1;
319954
+ if (nextCol > tmp19) {
319955
+ nextCol = tmp19;
319956
319956
  }
319957
319957
  prevRow[j7] = curCol;
319958
319958
  }
@@ -322785,9 +322785,9 @@ var require_utf162 = __commonJS({
322785
322785
  Utf16BEEncoder.prototype.write = function(str3) {
322786
322786
  var buf = Buffer5.from(str3, "ucs2");
322787
322787
  for (var i9 = 0; i9 < buf.length; i9 += 2) {
322788
- var tmp18 = buf[i9];
322788
+ var tmp19 = buf[i9];
322789
322789
  buf[i9] = buf[i9 + 1];
322790
- buf[i9 + 1] = tmp18;
322790
+ buf[i9 + 1] = tmp19;
322791
322791
  }
322792
322792
  return buf;
322793
322793
  };
@@ -345201,9 +345201,9 @@ var require_buffer_crc32 = __commonJS({
345201
345201
  }
345202
345202
  }
345203
345203
  function bufferizeInt(num) {
345204
- var tmp18 = ensureBuffer(4);
345205
- tmp18.writeInt32BE(num, 0);
345206
- return tmp18;
345204
+ var tmp19 = ensureBuffer(4);
345205
+ tmp19.writeInt32BE(num, 0);
345206
+ return tmp19;
345207
345207
  }
345208
345208
  function _crc32(buf, previous4) {
345209
345209
  buf = ensureBuffer(buf);
@@ -363113,17 +363113,17 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
363113
363113
  }
363114
363114
  async function unifiedDiff(beforeContent, afterContent, filePath) {
363115
363115
  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-"));
363116
+ const tmp19 = await (0, import_promises410.mkdtemp)((0, import_node_path62.join)((0, import_node_os22.tmpdir)(), "fern-replay-pp-"));
363117
363117
  try {
363118
- const beforePath = (0, import_node_path62.join)(tmp18, "before");
363119
- const afterPath = (0, import_node_path62.join)(tmp18, "after");
363118
+ const beforePath = (0, import_node_path62.join)(tmp19, "before");
363119
+ const afterPath = (0, import_node_path62.join)(tmp19, "after");
363120
363120
  await (0, import_promises410.writeFile)(beforePath, beforeContent, "utf-8");
363121
363121
  await (0, import_promises410.writeFile)(afterPath, afterContent, "utf-8");
363122
363122
  const raw = await runGitDiffNoIndex(beforePath, afterPath);
363123
363123
  if (!raw.trim()) return "";
363124
363124
  return rewriteDiffHeaders(raw, filePath);
363125
363125
  } finally {
363126
- await (0, import_promises410.rm)(tmp18, { recursive: true, force: true });
363126
+ await (0, import_promises410.rm)(tmp19, { recursive: true, force: true });
363127
363127
  }
363128
363128
  }
363129
363129
  function runGitDiffNoIndex(beforePath, afterPath) {
@@ -365985,23 +365985,23 @@ function getValues2(context3, operator2, key2, modifier) {
365985
365985
  });
365986
365986
  }
365987
365987
  } else {
365988
- const tmp18 = [];
365988
+ const tmp19 = [];
365989
365989
  if (Array.isArray(value2)) {
365990
365990
  value2.filter(isDefined2).forEach(function(value22) {
365991
- tmp18.push(encodeValue4(operator2, value22));
365991
+ tmp19.push(encodeValue4(operator2, value22));
365992
365992
  });
365993
365993
  } else {
365994
365994
  Object.keys(value2).forEach(function(k5) {
365995
365995
  if (isDefined2(value2[k5])) {
365996
- tmp18.push(encodeUnreserved2(k5));
365997
- tmp18.push(encodeValue4(operator2, value2[k5].toString()));
365996
+ tmp19.push(encodeUnreserved2(k5));
365997
+ tmp19.push(encodeValue4(operator2, value2[k5].toString()));
365998
365998
  }
365999
365999
  });
366000
366000
  }
366001
366001
  if (isKeyOperator2(operator2)) {
366002
- result.push(encodeUnreserved2(key2) + "=" + tmp18.join(","));
366003
- } else if (tmp18.length !== 0) {
366004
- result.push(tmp18.join(","));
366002
+ result.push(encodeUnreserved2(key2) + "=" + tmp19.join(","));
366003
+ } else if (tmp19.length !== 0) {
366004
+ result.push(tmp19.join(","));
366005
366005
  }
366006
366006
  }
366007
366007
  }
@@ -366036,8 +366036,8 @@ function expand3(template, context3) {
366036
366036
  expression = expression.substr(1);
366037
366037
  }
366038
366038
  expression.split(/,/g).forEach(function(variable3) {
366039
- var tmp18 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
366040
- values2.push(getValues2(context3, operator2, tmp18[1], tmp18[2] || tmp18[3]));
366039
+ var tmp19 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
366040
+ values2.push(getValues2(context3, operator2, tmp19[1], tmp19[2] || tmp19[3]));
366041
366041
  });
366042
366042
  if (operator2 && operator2 !== "+") {
366043
366043
  var separator = ",";
@@ -440581,9 +440581,9 @@ var require_receivebuffer = __commonJS({
440581
440581
  throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");
440582
440582
  }
440583
440583
  if (this.offset + data2.length >= this.buffer.length) {
440584
- const tmp18 = this.buffer;
440584
+ const tmp19 = this.buffer;
440585
440585
  this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data2.length));
440586
- tmp18.copy(this.buffer);
440586
+ tmp19.copy(this.buffer);
440587
440587
  }
440588
440588
  data2.copy(this.buffer, this.offset);
440589
440589
  return this.offset += data2.length;
@@ -454482,10 +454482,10 @@ var require_esprima = __commonJS({
454482
454482
  };
454483
454483
  Scanner2.prototype.testRegExp = function(pattern, flags2) {
454484
454484
  var astralSubstitute = "\uFFFF";
454485
- var tmp18 = pattern;
454485
+ var tmp19 = pattern;
454486
454486
  var self2 = this;
454487
454487
  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) {
454488
+ tmp19 = tmp19.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $23) {
454489
454489
  var codePoint = parseInt($1 || $23, 16);
454490
454490
  if (codePoint > 1114111) {
454491
454491
  self2.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
@@ -454497,7 +454497,7 @@ var require_esprima = __commonJS({
454497
454497
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
454498
454498
  }
454499
454499
  try {
454500
- RegExp(tmp18);
454500
+ RegExp(tmp19);
454501
454501
  } catch (e8) {
454502
454502
  this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
454503
454503
  }
@@ -471795,15 +471795,15 @@ var require_sync2 = __commonJS({
471795
471795
  var { readdirSync: readdirSync4, statSync: statSync4 } = require("fs");
471796
471796
  module4.exports = function(start2, callback) {
471797
471797
  let dir = resolve15(".", start2);
471798
- let tmp18, stats = statSync4(dir);
471798
+ let tmp19, stats = statSync4(dir);
471799
471799
  if (!stats.isDirectory()) {
471800
471800
  dir = dirname22(dir);
471801
471801
  }
471802
471802
  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;
471803
+ tmp19 = callback(dir, readdirSync4(dir));
471804
+ if (tmp19) return resolve15(dir, tmp19);
471805
+ dir = dirname22(tmp19 = dir);
471806
+ if (tmp19 === dir) break;
471807
471807
  }
471808
471808
  };
471809
471809
  }
@@ -645818,9 +645818,11 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
645818
645818
  }
645819
645819
  try {
645820
645820
  try {
645821
- return JSON.parse(contents);
645821
+ const parsedJson = JSON.parse(contents);
645822
+ return parsedJson;
645822
645823
  } catch {
645823
- return jsYaml.load(contents, { json: true });
645824
+ const parsedYaml = jsYaml.load(contents, { json: true });
645825
+ return parsedYaml;
645824
645826
  }
645825
645827
  } catch (err) {
645826
645828
  return context3.failAndThrow(`Failed to parse overlay file at ${absoluteFilePathToOverlay}: ${err}`, void 0, {
@@ -645829,21 +645831,27 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
645829
645831
  }
645830
645832
  }
645831
645833
  function validateOverlay(overlay, context3) {
645832
- if (!overlay.overlay) {
645834
+ if (!isRecord(overlay)) {
645835
+ context3.logger.error("Overlay file must be a YAML or JSON object");
645836
+ return false;
645837
+ }
645838
+ if (typeof overlay.overlay !== "string" || overlay.overlay.length === 0) {
645833
645839
  context3.logger.error("Overlay file missing required 'overlay' version field");
645834
645840
  return false;
645835
645841
  }
645836
- if (!overlay.info?.title || !overlay.info?.version) {
645842
+ const info = overlay.info;
645843
+ if (!isRecord(info) || typeof info.title !== "string" || info.title.length === 0 || typeof info.version !== "string" || info.version.length === 0) {
645837
645844
  context3.logger.error("Overlay file missing required 'info.title' or 'info.version' field");
645838
645845
  return false;
645839
645846
  }
645840
- if (!Array.isArray(overlay.actions) || overlay.actions.length === 0) {
645847
+ const actions = overlay.actions;
645848
+ if (!Array.isArray(actions) || actions.length === 0) {
645841
645849
  context3.logger.error("Overlay file must have at least one action");
645842
645850
  return false;
645843
645851
  }
645844
- for (let i9 = 0; i9 < overlay.actions.length; i9++) {
645845
- const action = overlay.actions[i9];
645846
- if (!action?.target) {
645852
+ for (let i9 = 0; i9 < actions.length; i9++) {
645853
+ const action = actions[i9];
645854
+ if (!isRecord(action) || !action.target) {
645847
645855
  context3.logger.error(`Overlay action at index ${i9} missing required 'target' field`);
645848
645856
  return false;
645849
645857
  }
@@ -645854,6 +645862,9 @@ function validateOverlay(overlay, context3) {
645854
645862
  }
645855
645863
  return true;
645856
645864
  }
645865
+ function isRecord(value2) {
645866
+ return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
645867
+ }
645857
645868
 
645858
645869
  // ../workspace/lazy-fern-workspace/lib/utils/parseOpenAPI.js
645859
645870
  var import_openapi_core3 = __toESM(require_lib2(), 1);
@@ -668484,7 +668495,7 @@ var AccessTokenPosthogManager = class {
668484
668495
  properties: {
668485
668496
  ...event,
668486
668497
  ...event.properties,
668487
- version: "5.33.6",
668498
+ version: "5.34.0",
668488
668499
  usingAccessToken: true,
668489
668500
  ...getRunIdProperties()
668490
668501
  }
@@ -668548,7 +668559,7 @@ var UserPosthogManager = class {
668548
668559
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
668549
668560
  event: "CLI",
668550
668561
  properties: {
668551
- version: "5.33.6",
668562
+ version: "5.34.0",
668552
668563
  ...event,
668553
668564
  ...event.properties,
668554
668565
  usingAccessToken: false,
@@ -812980,7 +812991,7 @@ var V67_TO_V66_MIGRATION = {
812980
812991
  [GeneratorName.PHP_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
812981
812992
  [GeneratorName.RUST_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
812982
812993
  [GeneratorName.RUST_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
812983
- [GeneratorName.CLI]: GeneratorWasNotCreatedYet
812994
+ [GeneratorName.CLI]: "0.0.1"
812984
812995
  },
812985
812996
  jsonifyEarlierVersion: (ir11) => IrSerialization_exports.V66.IntermediateRepresentation.jsonOrThrow(ir11, {
812986
812997
  unrecognizedObjectKeys: "passthrough",
@@ -860345,7 +860356,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
860345
860356
  var LOGS_FOLDER_NAME = "logs";
860346
860357
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
860347
860358
  function getCliSource() {
860348
- const version7 = "5.33.6";
860359
+ const version7 = "5.34.0";
860349
860360
  return `cli@${version7}`;
860350
860361
  }
860351
860362
  var DebugLogger = class {
@@ -876509,7 +876520,7 @@ async function retryWithRateLimit({ fn: fn10, retryRateLimited, logger: logger4,
876509
876520
 
876510
876521
  // ../generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
876511
876522
  var gzipAsync = (0, import_util19.promisify)(import_zlib5.gzip);
876512
- 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" }) {
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", specsTarGzBuffer }) {
876513
876524
  let fernignoreContents;
876514
876525
  if (skipFernignore) {
876515
876526
  fernignoreContents = "";
@@ -876548,7 +876559,14 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
876548
876559
  logger: context3.logger,
876549
876560
  onRateLimitedWithoutRetry: () => context3.failAndThrow("Received 429 Too Many Requests. Re-run with --retry-rate-limited to automatically retry.", void 0, { code: CliError.Code.NetworkError })
876550
876561
  });
876551
- await startJob({ intermediateRepresentation, job, context: context3, generatorInvocation, irVersionOverride });
876562
+ await startJob({
876563
+ intermediateRepresentation,
876564
+ job,
876565
+ context: context3,
876566
+ generatorInvocation,
876567
+ irVersionOverride,
876568
+ specsTarGzBuffer
876569
+ });
876552
876570
  return job;
876553
876571
  }
876554
876572
  async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, verify: verify2, loginCommand }) {
@@ -876652,7 +876670,7 @@ Please ensure you have membership at https://dashboard.buildwithfern.com, and as
876652
876670
  }
876653
876671
  return createResponse.body;
876654
876672
  }
876655
- async function startJob({ intermediateRepresentation, generatorInvocation, job, context: context3, irVersionOverride }) {
876673
+ async function startJob({ intermediateRepresentation, generatorInvocation, job, context: context3, irVersionOverride, specsTarGzBuffer }) {
876656
876674
  const irVersionFromFdr = await getIrVersionForGenerator(generatorInvocation).then((version7) => version7 == null ? void 0 : "v" + version7.toString());
876657
876675
  const resolvedIrVersionOverride = irVersionOverride ?? irVersionFromFdr;
876658
876676
  const migratedIntermediateRepresentation = resolvedIrVersionOverride == null ? await migrateIntermediateRepresentationForGenerator({
@@ -876680,7 +876698,11 @@ async function startJob({ intermediateRepresentation, generatorInvocation, job,
876680
876698
  const irBytes = new TextEncoder().encode(irAsString);
876681
876699
  const compressed = await gzipAsync(irBytes);
876682
876700
  context3.logger.debug(`Compressed IR from ${irBytes.byteLength} bytes to ${compressed.length} bytes (${((1 - compressed.length / irBytes.byteLength) * 100).toFixed(1)}% reduction)`);
876683
- formData.append("file", compressed, { filename: "ir.json", contentType: "application/octet-stream" });
876701
+ formData.append("ir", compressed, { filename: "ir.json", contentType: "application/octet-stream" });
876702
+ if (specsTarGzBuffer != null) {
876703
+ formData.append("specs", specsTarGzBuffer, { filename: "specs.tar.gz", contentType: "application/gzip" });
876704
+ context3.logger.debug(`Appended specs tar.gz (${specsTarGzBuffer.length} bytes)`);
876705
+ }
876684
876706
  const url3 = (0, import_url_join23.default)(getFiddleOrigin(), `/api/remote-gen/jobs/${job.jobId}/start`);
876685
876707
  try {
876686
876708
  await axios_default.post(url3, formData, {
@@ -877371,7 +877393,7 @@ var SourceUploader = class {
877371
877393
  };
877372
877394
 
877373
877395
  // ../generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForGenerator.js
877374
- 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 }) {
877396
+ 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 }) {
877375
877397
  const fdr = createFdrService({ token: token.value });
877376
877398
  const fdrOrigin = "https://registry-dev2.buildwithfern.com";
877377
877399
  const isAirGapped = await detectAirGappedMode(`${fdrOrigin}/health`, interactiveTaskContext.logger);
@@ -877563,7 +877585,8 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
877563
877585
  autoMerge,
877564
877586
  skipIfNoDiff,
877565
877587
  verify: verify2,
877566
- loginCommand
877588
+ loginCommand,
877589
+ specsTarGzBuffer
877567
877590
  });
877568
877591
  interactiveTaskContext.logger.debug(`Job ID: ${job.jobId}`);
877569
877592
  const taskId = job.taskIds[0];
@@ -877731,7 +877754,7 @@ function resolveVersionFallback(resolvedVersion) {
877731
877754
  }
877732
877755
 
877733
877756
  // ../generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForAPIWorkspace.js
877734
- 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 }) {
877757
+ 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 }) {
877735
877758
  if (generatorGroup.generators.length === 0) {
877736
877759
  context3.logger.warn("No generators specified.");
877737
877760
  return null;
@@ -877777,6 +877800,7 @@ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization,
877777
877800
  generatorsYmlAbsolutePath,
877778
877801
  occurrenceTracker: effectiveOccurrenceTracker,
877779
877802
  loginCommand,
877803
+ getSpecsTarGzBuffer,
877780
877804
  onSnippetsProduced: (invocation) => snippetsProducedBy.push(invocation)
877781
877805
  }))));
877782
877806
  if (automation == null && results.some((didSucceed) => !didSucceed)) {
@@ -877786,7 +877810,7 @@ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization,
877786
877810
  snippetsProducedBy
877787
877811
  };
877788
877812
  }
877789
- 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 }) {
877813
+ 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 }) {
877790
877814
  const startedAt = Date.now();
877791
877815
  try {
877792
877816
  const settings = getBaseOpenAPIWorkspaceSettingsFromGeneratorInvocation(generatorInvocation);
@@ -877852,7 +877876,8 @@ async function generateOne({ generatorInvocation, interactiveTaskContext, projec
877852
877876
  verify: verify2,
877853
877877
  noReplay,
877854
877878
  disableTelemetry,
877855
- loginCommand
877879
+ loginCommand,
877880
+ specsTarGzBuffer: await getSpecsTarGzBuffer?.(generatorInvocation.name)
877856
877881
  });
877857
877882
  if (remoteTaskHandlerResponse?.createdSnippets) {
877858
877883
  onSnippetsProduced(generatorInvocation);
@@ -879191,7 +879216,7 @@ var LegacyDocsPublisher = class {
879191
879216
  previewId,
879192
879217
  disableTemplates: void 0,
879193
879218
  skipUpload,
879194
- cliVersion: "5.33.6",
879219
+ cliVersion: "5.34.0",
879195
879220
  loginCommand: "fern auth login"
879196
879221
  });
879197
879222
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -930485,7 +930510,7 @@ var import_serialization = __toESM(require_serialization3(), 1);
930485
930510
  var import_promises118 = require("fs/promises");
930486
930511
  var path87 = __toESM(require("path"), 1);
930487
930512
  var import_path93 = require("path");
930488
- var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
930513
+ var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
930489
930514
 
930490
930515
  // ../generation/local-generation/local-workspace-runner/lib/getGeneratorConfig.js
930491
930516
  init_lib9();
@@ -931663,21 +931688,35 @@ var LocalTaskHandler = class {
931663
931688
 
931664
931689
  // ../generation/local-generation/local-workspace-runner/lib/rawSpecs.js
931665
931690
  init_lib4();
931691
+ init_lib8();
931666
931692
  var import_promises117 = require("fs/promises");
931667
931693
  init_js_yaml();
931668
931694
  var import_path92 = __toESM(require("path"), 1);
931695
+ var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
931669
931696
  async function collectRawSpecs({ specs, hostOutputDir, containerBaseDir, context: context3, audiences }) {
931670
931697
  const manifest = { specs: [] };
931671
931698
  if (specs.length === 0) {
931672
931699
  return manifest;
931673
931700
  }
931674
- for (const [i9, spec] of specs.entries()) {
931701
+ const typeCounters = {};
931702
+ function nextIndex2(type8) {
931703
+ const idx = typeCounters[type8] ?? 0;
931704
+ typeCounters[type8] = idx + 1;
931705
+ return idx;
931706
+ }
931707
+ for (const spec of specs) {
931708
+ let specType;
931709
+ if (spec.type === "openapi") {
931710
+ specType = await isAsyncAPISpec(spec.absoluteFilepath) ? "asyncapi" : "openapi";
931711
+ } else {
931712
+ specType = spec.type;
931713
+ }
931675
931714
  const entry = await resolveAndWriteSpec({
931676
931715
  spec,
931677
931716
  hostOutputDir,
931678
931717
  containerBaseDir,
931679
931718
  context: context3,
931680
- index: i9,
931719
+ index: nextIndex2(specType),
931681
931720
  audiences
931682
931721
  });
931683
931722
  manifest.specs.push(entry);
@@ -931701,7 +931740,7 @@ async function resolveAndWriteSpec({ spec, hostOutputDir, containerBaseDir, cont
931701
931740
  }
931702
931741
  async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir, context: context3, index: index3, audiences }) {
931703
931742
  const isAsync2 = await isAsyncAPISpec(spec.absoluteFilepath);
931704
- const filename = `spec-${index3}.json`;
931743
+ const filename = isAsync2 ? `asyncapi${index3}.json` : `openapi${index3}.json`;
931705
931744
  let resolved;
931706
931745
  if (isAsync2) {
931707
931746
  resolved = await loadAsyncAPI({
@@ -931726,7 +931765,7 @@ async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir,
931726
931765
  };
931727
931766
  }
931728
931767
  async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context: context3, index: index3 }) {
931729
- const filename = `spec-${index3}.json`;
931768
+ const filename = `openrpc${index3}.json`;
931730
931769
  const rawContent = await (0, import_promises117.readFile)(spec.absoluteFilepath, "utf-8");
931731
931770
  let parsed;
931732
931771
  try {
@@ -931757,7 +931796,7 @@ async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context:
931757
931796
  };
931758
931797
  }
931759
931798
  async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
931760
- const dirName = `proto-${index3}`;
931799
+ const dirName = `protobuf${index3}`;
931761
931800
  const destDir = import_path92.default.join(hostOutputDir, dirName);
931762
931801
  await (0, import_promises117.cp)(spec.absoluteFilepathToProtobufRoot, destDir, { recursive: true });
931763
931802
  const entry = {
@@ -931768,7 +931807,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
931768
931807
  if (overrides.length > 0) {
931769
931808
  entry.overridePaths = [];
931770
931809
  for (const [i9, override] of overrides.entries()) {
931771
- const overrideName = `proto-${index3}-override-${i9}${import_path92.default.extname(override)}`;
931810
+ const overrideName = `protobuf${index3}-override-${i9}${import_path92.default.extname(override)}`;
931772
931811
  await (0, import_promises117.copyFile)(override, import_path92.default.join(hostOutputDir, overrideName));
931773
931812
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
931774
931813
  }
@@ -931777,7 +931816,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
931777
931816
  }
931778
931817
  async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
931779
931818
  const ext2 = import_path92.default.extname(spec.absoluteFilepath) || ".graphql";
931780
- const filename = `spec-${index3}${ext2}`;
931819
+ const filename = `graphql${index3}${ext2}`;
931781
931820
  await (0, import_promises117.copyFile)(spec.absoluteFilepath, import_path92.default.join(hostOutputDir, filename));
931782
931821
  const entry = {
931783
931822
  type: "graphql",
@@ -931787,7 +931826,7 @@ async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index
931787
931826
  if (overrides.length > 0) {
931788
931827
  entry.overridePaths = [];
931789
931828
  for (const [i9, override] of overrides.entries()) {
931790
- const overrideName = `graphql-${index3}-override-${i9}${import_path92.default.extname(override)}`;
931829
+ const overrideName = `graphql${index3}-override-${i9}${import_path92.default.extname(override)}`;
931791
931830
  await (0, import_promises117.copyFile)(override, import_path92.default.join(hostOutputDir, overrideName));
931792
931831
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
931793
931832
  }
@@ -931896,6 +931935,30 @@ function matchesAudiences(operation, selectedAudiences) {
931896
931935
  function hasOperations(pathItem) {
931897
931936
  return Object.keys(pathItem).some((key2) => HTTP_METHODS2.has(key2.toLowerCase()));
931898
931937
  }
931938
+ async function createSpecsTarGzBuffer({ specs, context: context3, audiences }) {
931939
+ const tmpDir = await import_tmp_promise14.default.dir({ unsafeCleanup: true });
931940
+ try {
931941
+ const manifest = await collectRawSpecs({
931942
+ specs,
931943
+ hostOutputDir: AbsoluteFilePath2.of(tmpDir.path),
931944
+ containerBaseDir: "/fern/specs",
931945
+ context: context3,
931946
+ audiences
931947
+ });
931948
+ await (0, import_promises117.writeFile)(join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of(SPECS_MANIFEST_FILENAME)), JSON.stringify(manifest, void 0, 4));
931949
+ const tarGzPath = join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of("specs.tar.gz"));
931950
+ await Zn8({
931951
+ gzip: true,
931952
+ cwd: tmpDir.path,
931953
+ file: tarGzPath,
931954
+ portable: true,
931955
+ filter: (entryPath) => entryPath !== "./specs.tar.gz"
931956
+ }, ["."]);
931957
+ return await (0, import_promises117.readFile)(tarGzPath);
931958
+ } finally {
931959
+ await tmpDir.cleanup();
931960
+ }
931961
+ }
931899
931962
 
931900
931963
  // ../generation/local-generation/local-workspace-runner/lib/runGenerator.js
931901
931964
  function extractLicenseFilePath(generatorInvocation, absolutePathToFernConfig) {
@@ -932054,7 +932117,7 @@ async function writeIrToFile({ ir: ir11, workspaceTempDir, filename, context: co
932054
932117
  if (filename) {
932055
932118
  absolutePathToIr = AbsoluteFilePath2.of((0, import_path93.join)(workspaceTempDir.path, filename));
932056
932119
  } else {
932057
- const irFile = await import_tmp_promise14.default.file({
932120
+ const irFile = await import_tmp_promise15.default.file({
932058
932121
  tmpdir: workspaceTempDir.path
932059
932122
  });
932060
932123
  absolutePathToIr = AbsoluteFilePath2.of(irFile.path);
@@ -932091,7 +932154,7 @@ init_lib6();
932091
932154
  var fs18 = __toESM(require("fs/promises"), 1);
932092
932155
  var import_os13 = __toESM(require("os"), 1);
932093
932156
  var import_path94 = __toESM(require("path"), 1);
932094
- var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
932157
+ var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
932095
932158
 
932096
932159
  // ../generation/local-generation/local-workspace-runner/lib/getGeneratorOutputSubfolder.js
932097
932160
  function getGeneratorOutputSubfolder(generatorName) {
@@ -932209,7 +932272,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
932209
932272
  intermediateRepresentation.publishConfig = publishConfig;
932210
932273
  }
932211
932274
  const absolutePathToPreviewForGenerator = resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvocation);
932212
- const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await import_tmp_promise15.default.dir().then((dir) => dir.path));
932275
+ const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await import_tmp_promise16.default.dir().then((dir) => dir.path));
932213
932276
  const selfhostedGithubConfig = getSelfhostedGithubConfig(generatorInvocation, absolutePathToPreviewForGenerator != null);
932214
932277
  if (version7 != null && (0, import_autoversion4.isAutoVersion)(version7)) {
932215
932278
  if (selfhostedGithubConfig == null) {
@@ -932421,7 +932484,7 @@ function resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvoc
932421
932484
  return join8(absolutePathToPreview, RelativeFilePath2.of(subfolderName));
932422
932485
  }
932423
932486
  async function getWorkspaceTempDir() {
932424
- return import_tmp_promise15.default.dir({
932487
+ return import_tmp_promise16.default.dir({
932425
932488
  // use the /private prefix on osx so that docker can access the tmpdir
932426
932489
  // see https://stackoverflow.com/a/45123074
932427
932490
  tmpdir: import_os13.default.platform() === "darwin" ? import_path94.default.join("/private", import_os13.default.tmpdir()) : void 0,
@@ -950000,7 +950063,7 @@ var initializeWithReadme = async ({ readmeUrl, organization, taskContext, versio
950000
950063
  var import_promises140 = require("fs/promises");
950001
950064
  init_js_yaml();
950002
950065
  var import_path100 = require("path");
950003
- var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
950066
+ var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
950004
950067
  var LoadOpenAPIStatus;
950005
950068
  (function(LoadOpenAPIStatus2) {
950006
950069
  LoadOpenAPIStatus2["Success"] = "success";
@@ -950009,7 +950072,7 @@ var LoadOpenAPIStatus;
950009
950072
  async function loadOpenAPIFromUrl({ url: url3, logger: logger4 }) {
950010
950073
  try {
950011
950074
  const data2 = await fetchOpenAPIFromUrl({ url: url3, logger: logger4 });
950012
- const tmpDir = await import_tmp_promise16.default.dir();
950075
+ const tmpDir = await import_tmp_promise17.default.dir();
950013
950076
  const filePath = (0, import_path100.join)(tmpDir.path, url3.endsWith(".json") ? "openapi.json" : "openapi.yaml");
950014
950077
  logger4.debug("tmpDir", tmpDir.path);
950015
950078
  logger4.debug("filePath", filePath);
@@ -953891,7 +953954,7 @@ function getAutomationContextFromEnv() {
953891
953954
  config_branch: process.env.FERN_CONFIG_BRANCH,
953892
953955
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
953893
953956
  trigger: process.env.GITHUB_EVENT_NAME,
953894
- cli_version: "5.33.6"
953957
+ cli_version: "5.34.0"
953895
953958
  };
953896
953959
  }
953897
953960
  function isAutomationMode() {
@@ -954717,7 +954780,7 @@ var CliContext = class _CliContext {
954717
954780
  if (false) {
954718
954781
  this.logger.error("CLI_VERSION is not defined");
954719
954782
  }
954720
- return "5.33.6";
954783
+ return "5.34.0";
954721
954784
  }
954722
954785
  getCliName() {
954723
954786
  if (false) {
@@ -956671,6 +956734,22 @@ async function generateWorkspace({
956671
956734
  disableTelemetry: isTelemetryDisabled()
956672
956735
  });
956673
956736
  } else if (token != null) {
956737
+ let cachedSpecsTarGz;
956738
+ let specsComputed = false;
956739
+ const getSpecsTarGz = async (generatorName2) => {
956740
+ if (!(workspace instanceof OSSWorkspace) || !generatorWantsSpecs(generatorName2)) {
956741
+ return void 0;
956742
+ }
956743
+ if (!specsComputed) {
956744
+ specsComputed = true;
956745
+ cachedSpecsTarGz = await createSpecsTarGzBuffer({
956746
+ specs: workspace.allSpecs,
956747
+ context: groupContext,
956748
+ audiences: group.audiences
956749
+ });
956750
+ }
956751
+ return cachedSpecsTarGz;
956752
+ };
956674
956753
  await runRemoteGenerationForAPIWorkspace({
956675
956754
  projectConfig,
956676
956755
  organization,
@@ -956697,7 +956776,8 @@ async function generateWorkspace({
956697
956776
  skipIfNoDiff,
956698
956777
  noReplay,
956699
956778
  verify: verify2,
956700
- disableTelemetry: isTelemetryDisabled()
956779
+ disableTelemetry: isTelemetryDisabled(),
956780
+ getSpecsTarGzBuffer: getSpecsTarGz
956701
956781
  });
956702
956782
  }
956703
956783
  })
@@ -967432,7 +967512,7 @@ async function mockServer({
967432
967512
  init_lib6();
967433
967513
  var import_promises191 = require("fs/promises");
967434
967514
  var import_path112 = __toESM(require("path"), 1);
967435
- var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
967515
+ var import_tmp_promise18 = __toESM(require_tmp_promise(), 1);
967436
967516
  async function registerWorkspacesV1({
967437
967517
  project,
967438
967518
  cliContext,
@@ -967478,7 +967558,7 @@ async function registerWorkspacesV1({
967478
967558
  });
967479
967559
  return;
967480
967560
  }
967481
- const tmpDir = await import_tmp_promise17.default.dir();
967561
+ const tmpDir = await import_tmp_promise18.default.dir();
967482
967562
  const tarPath = import_path112.default.join(tmpDir.path, "definition.tgz");
967483
967563
  context3.logger.debug(`Compressing definition at ${tmpDir.path}`);
967484
967564
  await Zn8({ file: tarPath, cwd: resolvedWorkspace.absoluteFilePath }, ["."]);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.33.6",
2
+ "version": "5.34.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",