@fern-api/fern-api-dev 3.44.0 → 3.44.1

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 +780 -787
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -31948,14 +31948,14 @@ var require_urlencoded = __commonJS({
31948
31948
  }
31949
31949
  return output2;
31950
31950
  }
31951
- function strictlySplitByteSequence(buf, cp11) {
31951
+ function strictlySplitByteSequence(buf, cp10) {
31952
31952
  const list14 = [];
31953
31953
  let last4 = 0;
31954
- let i11 = buf.indexOf(cp11);
31954
+ let i11 = buf.indexOf(cp10);
31955
31955
  while (i11 >= 0) {
31956
31956
  list14.push(buf.slice(last4, i11));
31957
31957
  last4 = i11 + 1;
31958
- i11 = buf.indexOf(cp11, last4);
31958
+ i11 = buf.indexOf(cp10, last4);
31959
31959
  }
31960
31960
  if (last4 !== buf.length) {
31961
31961
  list14.push(buf.slice(last4));
@@ -35853,7 +35853,7 @@ var require_base64 = __commonJS({
35853
35853
  var cb_btou = function(cccc) {
35854
35854
  switch (cccc.length) {
35855
35855
  case 4:
35856
- var cp11 = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset2 = cp11 - 65536;
35856
+ var cp10 = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset2 = cp10 - 65536;
35857
35857
  return _fromCC2((offset2 >>> 10) + 55296) + _fromCC2((offset2 & 1023) + 56320);
35858
35858
  case 3:
35859
35859
  return _fromCC2((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
@@ -157604,12 +157604,12 @@ var require_code3 = __commonJS({
157604
157604
  function isLineTerminator(ch3) {
157605
157605
  return ch3 === 10 || ch3 === 13 || ch3 === 8232 || ch3 === 8233;
157606
157606
  }
157607
- function fromCodePoint2(cp11) {
157608
- if (cp11 <= 65535) {
157609
- return String.fromCharCode(cp11);
157607
+ function fromCodePoint2(cp10) {
157608
+ if (cp10 <= 65535) {
157609
+ return String.fromCharCode(cp10);
157610
157610
  }
157611
- var cu1 = String.fromCharCode(Math.floor((cp11 - 65536) / 1024) + 55296);
157612
- var cu22 = String.fromCharCode((cp11 - 65536) % 1024 + 56320);
157611
+ var cu1 = String.fromCharCode(Math.floor((cp10 - 65536) / 1024) + 55296);
157612
+ var cu22 = String.fromCharCode((cp10 - 65536) % 1024 + 56320);
157613
157613
  return cu1 + cu22;
157614
157614
  }
157615
157615
  IDENTIFIER_START = new Array(128);
@@ -162201,8 +162201,8 @@ var require_esprima = __commonJS({
162201
162201
  return result;
162202
162202
  };
162203
162203
  JSXParser2.prototype.lexJSX = function() {
162204
- var cp11 = this.scanner.source.charCodeAt(this.scanner.index);
162205
- if (cp11 === 60 || cp11 === 62 || cp11 === 47 || cp11 === 58 || cp11 === 61 || cp11 === 123 || cp11 === 125) {
162204
+ var cp10 = this.scanner.source.charCodeAt(this.scanner.index);
162205
+ if (cp10 === 60 || cp10 === 62 || cp10 === 47 || cp10 === 58 || cp10 === 61 || cp10 === 123 || cp10 === 125) {
162206
162206
  var value = this.scanner.source[this.scanner.index++];
162207
162207
  return {
162208
162208
  type: 7,
@@ -162213,7 +162213,7 @@ var require_esprima = __commonJS({
162213
162213
  end: this.scanner.index
162214
162214
  };
162215
162215
  }
162216
- if (cp11 === 34 || cp11 === 39) {
162216
+ if (cp10 === 34 || cp10 === 39) {
162217
162217
  var start2 = this.scanner.index;
162218
162218
  var quote2 = this.scanner.source[this.scanner.index++];
162219
162219
  var str3 = "";
@@ -162236,7 +162236,7 @@ var require_esprima = __commonJS({
162236
162236
  end: this.scanner.index
162237
162237
  };
162238
162238
  }
162239
- if (cp11 === 46) {
162239
+ if (cp10 === 46) {
162240
162240
  var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
162241
162241
  var n23 = this.scanner.source.charCodeAt(this.scanner.index + 2);
162242
162242
  var value = n1 === 46 && n23 === 46 ? "..." : ".";
@@ -162251,7 +162251,7 @@ var require_esprima = __commonJS({
162251
162251
  end: this.scanner.index
162252
162252
  };
162253
162253
  }
162254
- if (cp11 === 96) {
162254
+ if (cp10 === 96) {
162255
162255
  return {
162256
162256
  type: 10,
162257
162257
  value: "",
@@ -162261,7 +162261,7 @@ var require_esprima = __commonJS({
162261
162261
  end: this.scanner.index
162262
162262
  };
162263
162263
  }
162264
- if (character_1.Character.isIdentifierStart(cp11) && cp11 !== 92) {
162264
+ if (character_1.Character.isIdentifierStart(cp10) && cp10 !== 92) {
162265
162265
  var start2 = this.scanner.index;
162266
162266
  ++this.scanner.index;
162267
162267
  while (!this.scanner.eof()) {
@@ -162591,33 +162591,33 @@ var require_esprima = __commonJS({
162591
162591
  };
162592
162592
  exports3.Character = {
162593
162593
  /* tslint:disable:no-bitwise */
162594
- fromCodePoint: function(cp11) {
162595
- return cp11 < 65536 ? String.fromCharCode(cp11) : String.fromCharCode(55296 + (cp11 - 65536 >> 10)) + String.fromCharCode(56320 + (cp11 - 65536 & 1023));
162594
+ fromCodePoint: function(cp10) {
162595
+ return cp10 < 65536 ? String.fromCharCode(cp10) : String.fromCharCode(55296 + (cp10 - 65536 >> 10)) + String.fromCharCode(56320 + (cp10 - 65536 & 1023));
162596
162596
  },
162597
162597
  // https://tc39.github.io/ecma262/#sec-white-space
162598
- isWhiteSpace: function(cp11) {
162599
- return cp11 === 32 || cp11 === 9 || cp11 === 11 || cp11 === 12 || cp11 === 160 || cp11 >= 5760 && [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(cp11) >= 0;
162598
+ isWhiteSpace: function(cp10) {
162599
+ return cp10 === 32 || cp10 === 9 || cp10 === 11 || cp10 === 12 || cp10 === 160 || cp10 >= 5760 && [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(cp10) >= 0;
162600
162600
  },
162601
162601
  // https://tc39.github.io/ecma262/#sec-line-terminators
162602
- isLineTerminator: function(cp11) {
162603
- return cp11 === 10 || cp11 === 13 || cp11 === 8232 || cp11 === 8233;
162602
+ isLineTerminator: function(cp10) {
162603
+ return cp10 === 10 || cp10 === 13 || cp10 === 8232 || cp10 === 8233;
162604
162604
  },
162605
162605
  // https://tc39.github.io/ecma262/#sec-names-and-keywords
162606
- isIdentifierStart: function(cp11) {
162607
- return cp11 === 36 || cp11 === 95 || cp11 >= 65 && cp11 <= 90 || cp11 >= 97 && cp11 <= 122 || cp11 === 92 || cp11 >= 128 && Regex.NonAsciiIdentifierStart.test(exports3.Character.fromCodePoint(cp11));
162606
+ isIdentifierStart: function(cp10) {
162607
+ return cp10 === 36 || cp10 === 95 || cp10 >= 65 && cp10 <= 90 || cp10 >= 97 && cp10 <= 122 || cp10 === 92 || cp10 >= 128 && Regex.NonAsciiIdentifierStart.test(exports3.Character.fromCodePoint(cp10));
162608
162608
  },
162609
- isIdentifierPart: function(cp11) {
162610
- return cp11 === 36 || cp11 === 95 || cp11 >= 65 && cp11 <= 90 || cp11 >= 97 && cp11 <= 122 || cp11 >= 48 && cp11 <= 57 || cp11 === 92 || cp11 >= 128 && Regex.NonAsciiIdentifierPart.test(exports3.Character.fromCodePoint(cp11));
162609
+ isIdentifierPart: function(cp10) {
162610
+ return cp10 === 36 || cp10 === 95 || cp10 >= 65 && cp10 <= 90 || cp10 >= 97 && cp10 <= 122 || cp10 >= 48 && cp10 <= 57 || cp10 === 92 || cp10 >= 128 && Regex.NonAsciiIdentifierPart.test(exports3.Character.fromCodePoint(cp10));
162611
162611
  },
162612
162612
  // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
162613
- isDecimalDigit: function(cp11) {
162614
- return cp11 >= 48 && cp11 <= 57;
162613
+ isDecimalDigit: function(cp10) {
162614
+ return cp10 >= 48 && cp10 <= 57;
162615
162615
  },
162616
- isHexDigit: function(cp11) {
162617
- return cp11 >= 48 && cp11 <= 57 || cp11 >= 65 && cp11 <= 70 || cp11 >= 97 && cp11 <= 102;
162616
+ isHexDigit: function(cp10) {
162617
+ return cp10 >= 48 && cp10 <= 57 || cp10 >= 65 && cp10 <= 70 || cp10 >= 97 && cp10 <= 102;
162618
162618
  },
162619
- isOctalDigit: function(cp11) {
162620
- return cp11 >= 48 && cp11 <= 55;
162619
+ isOctalDigit: function(cp10) {
162620
+ return cp10 >= 48 && cp10 <= 55;
162621
162621
  }
162622
162622
  };
162623
162623
  },
@@ -166691,15 +166691,15 @@ var require_esprima = __commonJS({
166691
166691
  }
166692
166692
  };
166693
166693
  Scanner2.prototype.codePointAt = function(i11) {
166694
- var cp11 = this.source.charCodeAt(i11);
166695
- if (cp11 >= 55296 && cp11 <= 56319) {
166694
+ var cp10 = this.source.charCodeAt(i11);
166695
+ if (cp10 >= 55296 && cp10 <= 56319) {
166696
166696
  var second = this.source.charCodeAt(i11 + 1);
166697
166697
  if (second >= 56320 && second <= 57343) {
166698
- var first3 = cp11;
166699
- cp11 = (first3 - 55296) * 1024 + second - 56320 + 65536;
166698
+ var first3 = cp10;
166699
+ cp10 = (first3 - 55296) * 1024 + second - 56320 + 65536;
166700
166700
  }
166701
166701
  }
166702
- return cp11;
166702
+ return cp10;
166703
166703
  };
166704
166704
  Scanner2.prototype.scanHexEscape = function(prefix2) {
166705
166705
  var len = prefix2 === "u" ? 4 : 2;
@@ -166751,11 +166751,11 @@ var require_esprima = __commonJS({
166751
166751
  return this.source.slice(start2, this.index);
166752
166752
  };
166753
166753
  Scanner2.prototype.getComplexIdentifier = function() {
166754
- var cp11 = this.codePointAt(this.index);
166755
- var id2 = character_1.Character.fromCodePoint(cp11);
166754
+ var cp10 = this.codePointAt(this.index);
166755
+ var id2 = character_1.Character.fromCodePoint(cp10);
166756
166756
  this.index += id2.length;
166757
166757
  var ch2;
166758
- if (cp11 === 92) {
166758
+ if (cp10 === 92) {
166759
166759
  if (this.source.charCodeAt(this.index) !== 117) {
166760
166760
  this.throwUnexpectedToken();
166761
166761
  }
@@ -166772,14 +166772,14 @@ var require_esprima = __commonJS({
166772
166772
  id2 = ch2;
166773
166773
  }
166774
166774
  while (!this.eof()) {
166775
- cp11 = this.codePointAt(this.index);
166776
- if (!character_1.Character.isIdentifierPart(cp11)) {
166775
+ cp10 = this.codePointAt(this.index);
166776
+ if (!character_1.Character.isIdentifierPart(cp10)) {
166777
166777
  break;
166778
166778
  }
166779
- ch2 = character_1.Character.fromCodePoint(cp11);
166779
+ ch2 = character_1.Character.fromCodePoint(cp10);
166780
166780
  id2 += ch2;
166781
166781
  this.index += ch2.length;
166782
- if (cp11 === 92) {
166782
+ if (cp10 === 92) {
166783
166783
  id2 = id2.substr(0, id2.length - 1);
166784
166784
  if (this.source.charCodeAt(this.index) !== 117) {
166785
166785
  this.throwUnexpectedToken();
@@ -167405,29 +167405,29 @@ var require_esprima = __commonJS({
167405
167405
  end: this.index
167406
167406
  };
167407
167407
  }
167408
- var cp11 = this.source.charCodeAt(this.index);
167409
- if (character_1.Character.isIdentifierStart(cp11)) {
167408
+ var cp10 = this.source.charCodeAt(this.index);
167409
+ if (character_1.Character.isIdentifierStart(cp10)) {
167410
167410
  return this.scanIdentifier();
167411
167411
  }
167412
- if (cp11 === 40 || cp11 === 41 || cp11 === 59) {
167412
+ if (cp10 === 40 || cp10 === 41 || cp10 === 59) {
167413
167413
  return this.scanPunctuator();
167414
167414
  }
167415
- if (cp11 === 39 || cp11 === 34) {
167415
+ if (cp10 === 39 || cp10 === 34) {
167416
167416
  return this.scanStringLiteral();
167417
167417
  }
167418
- if (cp11 === 46) {
167418
+ if (cp10 === 46) {
167419
167419
  if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {
167420
167420
  return this.scanNumericLiteral();
167421
167421
  }
167422
167422
  return this.scanPunctuator();
167423
167423
  }
167424
- if (character_1.Character.isDecimalDigit(cp11)) {
167424
+ if (character_1.Character.isDecimalDigit(cp10)) {
167425
167425
  return this.scanNumericLiteral();
167426
167426
  }
167427
- if (cp11 === 96 || cp11 === 125 && this.curlyStack[this.curlyStack.length - 1] === "${") {
167427
+ if (cp10 === 96 || cp10 === 125 && this.curlyStack[this.curlyStack.length - 1] === "${") {
167428
167428
  return this.scanTemplate();
167429
167429
  }
167430
- if (cp11 >= 55296 && cp11 < 57343) {
167430
+ if (cp10 >= 55296 && cp10 < 57343) {
167431
167431
  if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {
167432
167432
  return this.scanIdentifier();
167433
167433
  }
@@ -176369,19 +176369,19 @@ var require_identifier = __commonJS({
176369
176369
  function isIdentifierName(name2) {
176370
176370
  let isFirst = true;
176371
176371
  for (let i11 = 0; i11 < name2.length; i11++) {
176372
- let cp11 = name2.charCodeAt(i11);
176373
- if ((cp11 & 64512) === 55296 && i11 + 1 < name2.length) {
176372
+ let cp10 = name2.charCodeAt(i11);
176373
+ if ((cp10 & 64512) === 55296 && i11 + 1 < name2.length) {
176374
176374
  const trail2 = name2.charCodeAt(++i11);
176375
176375
  if ((trail2 & 64512) === 56320) {
176376
- cp11 = 65536 + ((cp11 & 1023) << 10) + (trail2 & 1023);
176376
+ cp10 = 65536 + ((cp10 & 1023) << 10) + (trail2 & 1023);
176377
176377
  }
176378
176378
  }
176379
176379
  if (isFirst) {
176380
176380
  isFirst = false;
176381
- if (!isIdentifierStart2(cp11)) {
176381
+ if (!isIdentifierStart2(cp10)) {
176382
176382
  return false;
176383
176383
  }
176384
- } else if (!isIdentifierChar2(cp11)) {
176384
+ } else if (!isIdentifierChar2(cp10)) {
176385
176385
  return false;
176386
176386
  }
176387
176387
  }
@@ -225417,19 +225417,19 @@ var require_enoent = __commonJS({
225417
225417
  spawnargs: original.args
225418
225418
  });
225419
225419
  }
225420
- function hookChildProcess(cp11, parsed) {
225420
+ function hookChildProcess(cp10, parsed) {
225421
225421
  if (!isWin) {
225422
225422
  return;
225423
225423
  }
225424
- const originalEmit = cp11.emit;
225425
- cp11.emit = function(name2, arg1) {
225424
+ const originalEmit = cp10.emit;
225425
+ cp10.emit = function(name2, arg1) {
225426
225426
  if (name2 === "exit") {
225427
225427
  const err = verifyENOENT(arg1, parsed);
225428
225428
  if (err) {
225429
- return originalEmit.call(cp11, "error", err);
225429
+ return originalEmit.call(cp10, "error", err);
225430
225430
  }
225431
225431
  }
225432
- return originalEmit.apply(cp11, arguments);
225432
+ return originalEmit.apply(cp10, arguments);
225433
225433
  };
225434
225434
  }
225435
225435
  function verifyENOENT(status, parsed) {
@@ -225457,18 +225457,18 @@ var require_enoent = __commonJS({
225457
225457
  var require_cross_spawn = __commonJS({
225458
225458
  "../../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/index.js"(exports2, module2) {
225459
225459
  "use strict";
225460
- var cp11 = require("child_process");
225460
+ var cp10 = require("child_process");
225461
225461
  var parse12 = require_parse5();
225462
225462
  var enoent = require_enoent();
225463
225463
  function spawn5(command2, args, options2) {
225464
225464
  const parsed = parse12(command2, args, options2);
225465
- const spawned = cp11.spawn(parsed.command, parsed.args, parsed.options);
225465
+ const spawned = cp10.spawn(parsed.command, parsed.args, parsed.options);
225466
225466
  enoent.hookChildProcess(spawned, parsed);
225467
225467
  return spawned;
225468
225468
  }
225469
225469
  function spawnSync5(command2, args, options2) {
225470
225470
  const parsed = parse12(command2, args, options2);
225471
- const result = cp11.spawnSync(parsed.command, parsed.args, parsed.options);
225471
+ const result = cp10.spawnSync(parsed.command, parsed.args, parsed.options);
225472
225472
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
225473
225473
  return result;
225474
225474
  }
@@ -235165,12 +235165,12 @@ var require_send = __commonJS({
235165
235165
  path70 = resolve10(path70);
235166
235166
  }
235167
235167
  if (containsDotFile(parts)) {
235168
- var access5 = this._dotfiles;
235169
- if (access5 === void 0) {
235170
- access5 = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
235168
+ var access4 = this._dotfiles;
235169
+ if (access4 === void 0) {
235170
+ access4 = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
235171
235171
  }
235172
- debug7('%s dotfile "%s"', access5, path70);
235173
- switch (access5) {
235172
+ debug7('%s dotfile "%s"', access4, path70);
235173
+ switch (access4) {
235174
235174
  case "allow":
235175
235175
  break;
235176
235176
  case "deny":
@@ -1283612,8 +1283612,8 @@ var require_formdata_parser = __commonJS({
1283612
1283612
  return false;
1283613
1283613
  }
1283614
1283614
  for (let i11 = 0; i11 < length; ++i11) {
1283615
- const cp11 = boundary.charCodeAt(i11);
1283616
- if (!(cp11 >= 48 && cp11 <= 57 || cp11 >= 65 && cp11 <= 90 || cp11 >= 97 && cp11 <= 122 || cp11 === 39 || cp11 === 45 || cp11 === 95)) {
1283615
+ const cp10 = boundary.charCodeAt(i11);
1283616
+ if (!(cp10 >= 48 && cp10 <= 57 || cp10 >= 65 && cp10 <= 90 || cp10 >= 97 && cp10 <= 122 || cp10 === 39 || cp10 === 45 || cp10 === 95)) {
1283617
1283617
  return false;
1283618
1283618
  }
1283619
1283619
  }
@@ -1420006,7 +1420006,7 @@ var AccessTokenPosthogManager = class {
1420006
1420006
  properties: {
1420007
1420007
  ...event,
1420008
1420008
  ...event.properties,
1420009
- version: "3.44.0",
1420009
+ version: "3.44.1",
1420010
1420010
  usingAccessToken: true
1420011
1420011
  }
1420012
1420012
  });
@@ -1420105,7 +1420105,7 @@ var UserPosthogManager = class {
1420105
1420105
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1420106
1420106
  event: "CLI",
1420107
1420107
  properties: {
1420108
- version: "3.44.0",
1420108
+ version: "3.44.1",
1420109
1420109
  ...event,
1420110
1420110
  ...event.properties,
1420111
1420111
  usingAccessToken: false,
@@ -1449437,20 +1449437,20 @@ var SEQUENCES = {
1449437
1449437
  PUBLIC: "public",
1449438
1449438
  SYSTEM: "system"
1449439
1449439
  };
1449440
- function isSurrogate(cp11) {
1449441
- return cp11 >= 55296 && cp11 <= 57343;
1449440
+ function isSurrogate(cp10) {
1449441
+ return cp10 >= 55296 && cp10 <= 57343;
1449442
1449442
  }
1449443
- function isSurrogatePair(cp11) {
1449444
- return cp11 >= 56320 && cp11 <= 57343;
1449443
+ function isSurrogatePair(cp10) {
1449444
+ return cp10 >= 56320 && cp10 <= 57343;
1449445
1449445
  }
1449446
1449446
  function getSurrogatePairCodePoint(cp1, cp22) {
1449447
1449447
  return (cp1 - 55296) * 1024 + 9216 + cp22;
1449448
1449448
  }
1449449
- function isControlCodePoint(cp11) {
1449450
- return cp11 !== 32 && cp11 !== 10 && cp11 !== 13 && cp11 !== 9 && cp11 !== 12 && cp11 >= 1 && cp11 <= 31 || cp11 >= 127 && cp11 <= 159;
1449449
+ function isControlCodePoint(cp10) {
1449450
+ return cp10 !== 32 && cp10 !== 10 && cp10 !== 13 && cp10 !== 9 && cp10 !== 12 && cp10 >= 1 && cp10 <= 31 || cp10 >= 127 && cp10 <= 159;
1449451
1449451
  }
1449452
- function isUndefinedCodePoint(cp11) {
1449453
- return cp11 >= 64976 && cp11 <= 65007 || UNDEFINED_CODE_POINTS.has(cp11);
1449452
+ function isUndefinedCodePoint(cp10) {
1449453
+ return cp10 >= 64976 && cp10 <= 65007 || UNDEFINED_CODE_POINTS.has(cp10);
1449454
1449454
  }
1449455
1449455
 
1449456
1449456
  // ../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.js
@@ -1449568,20 +1449568,20 @@ var Preprocessor = class {
1449568
1449568
  this.gapStack.push(this.lastGapPos);
1449569
1449569
  this.lastGapPos = this.pos;
1449570
1449570
  }
1449571
- _processSurrogate(cp11) {
1449571
+ _processSurrogate(cp10) {
1449572
1449572
  if (this.pos !== this.html.length - 1) {
1449573
1449573
  const nextCp = this.html.charCodeAt(this.pos + 1);
1449574
1449574
  if (isSurrogatePair(nextCp)) {
1449575
1449575
  this.pos++;
1449576
1449576
  this._addGap();
1449577
- return getSurrogatePairCodePoint(cp11, nextCp);
1449577
+ return getSurrogatePairCodePoint(cp10, nextCp);
1449578
1449578
  }
1449579
1449579
  } else if (!this.lastChunkWritten) {
1449580
1449580
  this.endOfChunkHit = true;
1449581
1449581
  return CODE_POINTS.EOF;
1449582
1449582
  }
1449583
1449583
  this._err(ERR.surrogateInInputStream);
1449584
- return cp11;
1449584
+ return cp10;
1449585
1449585
  }
1449586
1449586
  willDropParsedChunk() {
1449587
1449587
  return this.pos > this.bufferWaterline;
@@ -1449618,8 +1449618,8 @@ var Preprocessor = class {
1449618
1449618
  return this.html.startsWith(pattern, this.pos);
1449619
1449619
  }
1449620
1449620
  for (let i11 = 0; i11 < pattern.length; i11++) {
1449621
- const cp11 = this.html.charCodeAt(this.pos + i11) | 32;
1449622
- if (cp11 !== pattern.charCodeAt(i11)) {
1449621
+ const cp10 = this.html.charCodeAt(this.pos + i11) | 32;
1449622
+ if (cp10 !== pattern.charCodeAt(i11)) {
1449623
1449623
  return false;
1449624
1449624
  }
1449625
1449625
  }
@@ -1449645,13 +1449645,13 @@ var Preprocessor = class {
1449645
1449645
  this.endOfChunkHit = !this.lastChunkWritten;
1449646
1449646
  return CODE_POINTS.EOF;
1449647
1449647
  }
1449648
- let cp11 = this.html.charCodeAt(this.pos);
1449649
- if (cp11 === CODE_POINTS.CARRIAGE_RETURN) {
1449648
+ let cp10 = this.html.charCodeAt(this.pos);
1449649
+ if (cp10 === CODE_POINTS.CARRIAGE_RETURN) {
1449650
1449650
  this.isEol = true;
1449651
1449651
  this.skipNextNewLine = true;
1449652
1449652
  return CODE_POINTS.LINE_FEED;
1449653
1449653
  }
1449654
- if (cp11 === CODE_POINTS.LINE_FEED) {
1449654
+ if (cp10 === CODE_POINTS.LINE_FEED) {
1449655
1449655
  this.isEol = true;
1449656
1449656
  if (this.skipNextNewLine) {
1449657
1449657
  this.line--;
@@ -1449661,19 +1449661,19 @@ var Preprocessor = class {
1449661
1449661
  }
1449662
1449662
  }
1449663
1449663
  this.skipNextNewLine = false;
1449664
- if (isSurrogate(cp11)) {
1449665
- cp11 = this._processSurrogate(cp11);
1449664
+ if (isSurrogate(cp10)) {
1449665
+ cp10 = this._processSurrogate(cp10);
1449666
1449666
  }
1449667
- const isCommonValidRange = this.handler.onParseError === null || cp11 > 31 && cp11 < 127 || cp11 === CODE_POINTS.LINE_FEED || cp11 === CODE_POINTS.CARRIAGE_RETURN || cp11 > 159 && cp11 < 64976;
1449667
+ const isCommonValidRange = this.handler.onParseError === null || cp10 > 31 && cp10 < 127 || cp10 === CODE_POINTS.LINE_FEED || cp10 === CODE_POINTS.CARRIAGE_RETURN || cp10 > 159 && cp10 < 64976;
1449668
1449668
  if (!isCommonValidRange) {
1449669
- this._checkForProblematicCharacters(cp11);
1449669
+ this._checkForProblematicCharacters(cp10);
1449670
1449670
  }
1449671
- return cp11;
1449671
+ return cp10;
1449672
1449672
  }
1449673
- _checkForProblematicCharacters(cp11) {
1449674
- if (isControlCodePoint(cp11)) {
1449673
+ _checkForProblematicCharacters(cp10) {
1449674
+ if (isControlCodePoint(cp10)) {
1449675
1449675
  this._err(ERR.controlCharacterInInputStream);
1449676
- } else if (isUndefinedCodePoint(cp11)) {
1449676
+ } else if (isUndefinedCodePoint(cp10)) {
1449677
1449677
  this._err(ERR.noncharacterInInputStream);
1449678
1449678
  }
1449679
1449679
  }
@@ -1450701,29 +1450701,29 @@ var TokenizerMode = {
1450701
1450701
  PLAINTEXT: State2.PLAINTEXT,
1450702
1450702
  CDATA_SECTION: State2.CDATA_SECTION
1450703
1450703
  };
1450704
- function isAsciiDigit(cp11) {
1450705
- return cp11 >= CODE_POINTS.DIGIT_0 && cp11 <= CODE_POINTS.DIGIT_9;
1450704
+ function isAsciiDigit(cp10) {
1450705
+ return cp10 >= CODE_POINTS.DIGIT_0 && cp10 <= CODE_POINTS.DIGIT_9;
1450706
1450706
  }
1450707
- function isAsciiUpper(cp11) {
1450708
- return cp11 >= CODE_POINTS.LATIN_CAPITAL_A && cp11 <= CODE_POINTS.LATIN_CAPITAL_Z;
1450707
+ function isAsciiUpper(cp10) {
1450708
+ return cp10 >= CODE_POINTS.LATIN_CAPITAL_A && cp10 <= CODE_POINTS.LATIN_CAPITAL_Z;
1450709
1450709
  }
1450710
- function isAsciiLower(cp11) {
1450711
- return cp11 >= CODE_POINTS.LATIN_SMALL_A && cp11 <= CODE_POINTS.LATIN_SMALL_Z;
1450710
+ function isAsciiLower(cp10) {
1450711
+ return cp10 >= CODE_POINTS.LATIN_SMALL_A && cp10 <= CODE_POINTS.LATIN_SMALL_Z;
1450712
1450712
  }
1450713
- function isAsciiLetter(cp11) {
1450714
- return isAsciiLower(cp11) || isAsciiUpper(cp11);
1450713
+ function isAsciiLetter(cp10) {
1450714
+ return isAsciiLower(cp10) || isAsciiUpper(cp10);
1450715
1450715
  }
1450716
- function isAsciiAlphaNumeric2(cp11) {
1450717
- return isAsciiLetter(cp11) || isAsciiDigit(cp11);
1450716
+ function isAsciiAlphaNumeric2(cp10) {
1450717
+ return isAsciiLetter(cp10) || isAsciiDigit(cp10);
1450718
1450718
  }
1450719
- function toAsciiLower(cp11) {
1450720
- return cp11 + 32;
1450719
+ function toAsciiLower(cp10) {
1450720
+ return cp10 + 32;
1450721
1450721
  }
1450722
- function isWhitespace2(cp11) {
1450723
- return cp11 === CODE_POINTS.SPACE || cp11 === CODE_POINTS.LINE_FEED || cp11 === CODE_POINTS.TABULATION || cp11 === CODE_POINTS.FORM_FEED;
1450722
+ function isWhitespace2(cp10) {
1450723
+ return cp10 === CODE_POINTS.SPACE || cp10 === CODE_POINTS.LINE_FEED || cp10 === CODE_POINTS.TABULATION || cp10 === CODE_POINTS.FORM_FEED;
1450724
1450724
  }
1450725
- function isScriptDataDoubleEscapeSequenceEnd(cp11) {
1450726
- return isWhitespace2(cp11) || cp11 === CODE_POINTS.SOLIDUS || cp11 === CODE_POINTS.GREATER_THAN_SIGN;
1450725
+ function isScriptDataDoubleEscapeSequenceEnd(cp10) {
1450726
+ return isWhitespace2(cp10) || cp10 === CODE_POINTS.SOLIDUS || cp10 === CODE_POINTS.GREATER_THAN_SIGN;
1450727
1450727
  }
1450728
1450728
  function getErrorForNumericCharacterReference(code5) {
1450729
1450729
  if (code5 === CODE_POINTS.NULL) {
@@ -1450757,9 +1450757,9 @@ var Tokenizer = class {
1450757
1450757
  this.currentAttr = { name: "", value: "" };
1450758
1450758
  this.preprocessor = new Preprocessor(handler3);
1450759
1450759
  this.currentLocation = this.getCurrentLocation(-1);
1450760
- this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp11, consumed) => {
1450760
+ this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp10, consumed) => {
1450761
1450761
  this.preprocessor.pos = this.entityStartPos + consumed - 1;
1450762
- this._flushCodePointConsumedAsCharacterReference(cp11);
1450762
+ this._flushCodePointConsumedAsCharacterReference(cp10);
1450763
1450763
  }, handler3.onParseError ? {
1450764
1450764
  missingSemicolonAfterCharacterReference: () => {
1450765
1450765
  this._err(ERR.missingSemicolonAfterCharacterReference, 1);
@@ -1450799,9 +1450799,9 @@ var Tokenizer = class {
1450799
1450799
  this.inLoop = true;
1450800
1450800
  while (this.active && !this.paused) {
1450801
1450801
  this.consumedAfterSnapshot = 0;
1450802
- const cp11 = this._consume();
1450802
+ const cp10 = this._consume();
1450803
1450803
  if (!this._ensureHibernation()) {
1450804
- this._callState(cp11);
1450804
+ this._callState(cp10);
1450805
1450805
  }
1450806
1450806
  }
1450807
1450807
  this.inLoop = false;
@@ -1451036,9 +1451036,9 @@ var Tokenizer = class {
1451036
1451036
  }
1451037
1451037
  this._createCharacterToken(type8, ch2);
1451038
1451038
  }
1451039
- _emitCodePoint(cp11) {
1451040
- const type8 = isWhitespace2(cp11) ? TokenType3.WHITESPACE_CHARACTER : cp11 === CODE_POINTS.NULL ? TokenType3.NULL_CHARACTER : TokenType3.CHARACTER;
1451041
- this._appendCharToCurrentCharacterToken(type8, String.fromCodePoint(cp11));
1451039
+ _emitCodePoint(cp10) {
1451040
+ const type8 = isWhitespace2(cp10) ? TokenType3.WHITESPACE_CHARACTER : cp10 === CODE_POINTS.NULL ? TokenType3.NULL_CHARACTER : TokenType3.CHARACTER;
1451041
+ this._appendCharToCurrentCharacterToken(type8, String.fromCodePoint(cp10));
1451042
1451042
  }
1451043
1451043
  //NOTE: used when we emit characters explicitly.
1451044
1451044
  //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
@@ -1451055,298 +1451055,298 @@ var Tokenizer = class {
1451055
1451055
  _isCharacterReferenceInAttribute() {
1451056
1451056
  return this.returnState === State2.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State2.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State2.ATTRIBUTE_VALUE_UNQUOTED;
1451057
1451057
  }
1451058
- _flushCodePointConsumedAsCharacterReference(cp11) {
1451058
+ _flushCodePointConsumedAsCharacterReference(cp10) {
1451059
1451059
  if (this._isCharacterReferenceInAttribute()) {
1451060
- this.currentAttr.value += String.fromCodePoint(cp11);
1451060
+ this.currentAttr.value += String.fromCodePoint(cp10);
1451061
1451061
  } else {
1451062
- this._emitCodePoint(cp11);
1451062
+ this._emitCodePoint(cp10);
1451063
1451063
  }
1451064
1451064
  }
1451065
1451065
  // Calling states this way turns out to be much faster than any other approach.
1451066
- _callState(cp11) {
1451066
+ _callState(cp10) {
1451067
1451067
  switch (this.state) {
1451068
1451068
  case State2.DATA: {
1451069
- this._stateData(cp11);
1451069
+ this._stateData(cp10);
1451070
1451070
  break;
1451071
1451071
  }
1451072
1451072
  case State2.RCDATA: {
1451073
- this._stateRcdata(cp11);
1451073
+ this._stateRcdata(cp10);
1451074
1451074
  break;
1451075
1451075
  }
1451076
1451076
  case State2.RAWTEXT: {
1451077
- this._stateRawtext(cp11);
1451077
+ this._stateRawtext(cp10);
1451078
1451078
  break;
1451079
1451079
  }
1451080
1451080
  case State2.SCRIPT_DATA: {
1451081
- this._stateScriptData(cp11);
1451081
+ this._stateScriptData(cp10);
1451082
1451082
  break;
1451083
1451083
  }
1451084
1451084
  case State2.PLAINTEXT: {
1451085
- this._statePlaintext(cp11);
1451085
+ this._statePlaintext(cp10);
1451086
1451086
  break;
1451087
1451087
  }
1451088
1451088
  case State2.TAG_OPEN: {
1451089
- this._stateTagOpen(cp11);
1451089
+ this._stateTagOpen(cp10);
1451090
1451090
  break;
1451091
1451091
  }
1451092
1451092
  case State2.END_TAG_OPEN: {
1451093
- this._stateEndTagOpen(cp11);
1451093
+ this._stateEndTagOpen(cp10);
1451094
1451094
  break;
1451095
1451095
  }
1451096
1451096
  case State2.TAG_NAME: {
1451097
- this._stateTagName(cp11);
1451097
+ this._stateTagName(cp10);
1451098
1451098
  break;
1451099
1451099
  }
1451100
1451100
  case State2.RCDATA_LESS_THAN_SIGN: {
1451101
- this._stateRcdataLessThanSign(cp11);
1451101
+ this._stateRcdataLessThanSign(cp10);
1451102
1451102
  break;
1451103
1451103
  }
1451104
1451104
  case State2.RCDATA_END_TAG_OPEN: {
1451105
- this._stateRcdataEndTagOpen(cp11);
1451105
+ this._stateRcdataEndTagOpen(cp10);
1451106
1451106
  break;
1451107
1451107
  }
1451108
1451108
  case State2.RCDATA_END_TAG_NAME: {
1451109
- this._stateRcdataEndTagName(cp11);
1451109
+ this._stateRcdataEndTagName(cp10);
1451110
1451110
  break;
1451111
1451111
  }
1451112
1451112
  case State2.RAWTEXT_LESS_THAN_SIGN: {
1451113
- this._stateRawtextLessThanSign(cp11);
1451113
+ this._stateRawtextLessThanSign(cp10);
1451114
1451114
  break;
1451115
1451115
  }
1451116
1451116
  case State2.RAWTEXT_END_TAG_OPEN: {
1451117
- this._stateRawtextEndTagOpen(cp11);
1451117
+ this._stateRawtextEndTagOpen(cp10);
1451118
1451118
  break;
1451119
1451119
  }
1451120
1451120
  case State2.RAWTEXT_END_TAG_NAME: {
1451121
- this._stateRawtextEndTagName(cp11);
1451121
+ this._stateRawtextEndTagName(cp10);
1451122
1451122
  break;
1451123
1451123
  }
1451124
1451124
  case State2.SCRIPT_DATA_LESS_THAN_SIGN: {
1451125
- this._stateScriptDataLessThanSign(cp11);
1451125
+ this._stateScriptDataLessThanSign(cp10);
1451126
1451126
  break;
1451127
1451127
  }
1451128
1451128
  case State2.SCRIPT_DATA_END_TAG_OPEN: {
1451129
- this._stateScriptDataEndTagOpen(cp11);
1451129
+ this._stateScriptDataEndTagOpen(cp10);
1451130
1451130
  break;
1451131
1451131
  }
1451132
1451132
  case State2.SCRIPT_DATA_END_TAG_NAME: {
1451133
- this._stateScriptDataEndTagName(cp11);
1451133
+ this._stateScriptDataEndTagName(cp10);
1451134
1451134
  break;
1451135
1451135
  }
1451136
1451136
  case State2.SCRIPT_DATA_ESCAPE_START: {
1451137
- this._stateScriptDataEscapeStart(cp11);
1451137
+ this._stateScriptDataEscapeStart(cp10);
1451138
1451138
  break;
1451139
1451139
  }
1451140
1451140
  case State2.SCRIPT_DATA_ESCAPE_START_DASH: {
1451141
- this._stateScriptDataEscapeStartDash(cp11);
1451141
+ this._stateScriptDataEscapeStartDash(cp10);
1451142
1451142
  break;
1451143
1451143
  }
1451144
1451144
  case State2.SCRIPT_DATA_ESCAPED: {
1451145
- this._stateScriptDataEscaped(cp11);
1451145
+ this._stateScriptDataEscaped(cp10);
1451146
1451146
  break;
1451147
1451147
  }
1451148
1451148
  case State2.SCRIPT_DATA_ESCAPED_DASH: {
1451149
- this._stateScriptDataEscapedDash(cp11);
1451149
+ this._stateScriptDataEscapedDash(cp10);
1451150
1451150
  break;
1451151
1451151
  }
1451152
1451152
  case State2.SCRIPT_DATA_ESCAPED_DASH_DASH: {
1451153
- this._stateScriptDataEscapedDashDash(cp11);
1451153
+ this._stateScriptDataEscapedDashDash(cp10);
1451154
1451154
  break;
1451155
1451155
  }
1451156
1451156
  case State2.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
1451157
- this._stateScriptDataEscapedLessThanSign(cp11);
1451157
+ this._stateScriptDataEscapedLessThanSign(cp10);
1451158
1451158
  break;
1451159
1451159
  }
1451160
1451160
  case State2.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {
1451161
- this._stateScriptDataEscapedEndTagOpen(cp11);
1451161
+ this._stateScriptDataEscapedEndTagOpen(cp10);
1451162
1451162
  break;
1451163
1451163
  }
1451164
1451164
  case State2.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {
1451165
- this._stateScriptDataEscapedEndTagName(cp11);
1451165
+ this._stateScriptDataEscapedEndTagName(cp10);
1451166
1451166
  break;
1451167
1451167
  }
1451168
1451168
  case State2.SCRIPT_DATA_DOUBLE_ESCAPE_START: {
1451169
- this._stateScriptDataDoubleEscapeStart(cp11);
1451169
+ this._stateScriptDataDoubleEscapeStart(cp10);
1451170
1451170
  break;
1451171
1451171
  }
1451172
1451172
  case State2.SCRIPT_DATA_DOUBLE_ESCAPED: {
1451173
- this._stateScriptDataDoubleEscaped(cp11);
1451173
+ this._stateScriptDataDoubleEscaped(cp10);
1451174
1451174
  break;
1451175
1451175
  }
1451176
1451176
  case State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
1451177
- this._stateScriptDataDoubleEscapedDash(cp11);
1451177
+ this._stateScriptDataDoubleEscapedDash(cp10);
1451178
1451178
  break;
1451179
1451179
  }
1451180
1451180
  case State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
1451181
- this._stateScriptDataDoubleEscapedDashDash(cp11);
1451181
+ this._stateScriptDataDoubleEscapedDashDash(cp10);
1451182
1451182
  break;
1451183
1451183
  }
1451184
1451184
  case State2.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
1451185
- this._stateScriptDataDoubleEscapedLessThanSign(cp11);
1451185
+ this._stateScriptDataDoubleEscapedLessThanSign(cp10);
1451186
1451186
  break;
1451187
1451187
  }
1451188
1451188
  case State2.SCRIPT_DATA_DOUBLE_ESCAPE_END: {
1451189
- this._stateScriptDataDoubleEscapeEnd(cp11);
1451189
+ this._stateScriptDataDoubleEscapeEnd(cp10);
1451190
1451190
  break;
1451191
1451191
  }
1451192
1451192
  case State2.BEFORE_ATTRIBUTE_NAME: {
1451193
- this._stateBeforeAttributeName(cp11);
1451193
+ this._stateBeforeAttributeName(cp10);
1451194
1451194
  break;
1451195
1451195
  }
1451196
1451196
  case State2.ATTRIBUTE_NAME: {
1451197
- this._stateAttributeName(cp11);
1451197
+ this._stateAttributeName(cp10);
1451198
1451198
  break;
1451199
1451199
  }
1451200
1451200
  case State2.AFTER_ATTRIBUTE_NAME: {
1451201
- this._stateAfterAttributeName(cp11);
1451201
+ this._stateAfterAttributeName(cp10);
1451202
1451202
  break;
1451203
1451203
  }
1451204
1451204
  case State2.BEFORE_ATTRIBUTE_VALUE: {
1451205
- this._stateBeforeAttributeValue(cp11);
1451205
+ this._stateBeforeAttributeValue(cp10);
1451206
1451206
  break;
1451207
1451207
  }
1451208
1451208
  case State2.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
1451209
- this._stateAttributeValueDoubleQuoted(cp11);
1451209
+ this._stateAttributeValueDoubleQuoted(cp10);
1451210
1451210
  break;
1451211
1451211
  }
1451212
1451212
  case State2.ATTRIBUTE_VALUE_SINGLE_QUOTED: {
1451213
- this._stateAttributeValueSingleQuoted(cp11);
1451213
+ this._stateAttributeValueSingleQuoted(cp10);
1451214
1451214
  break;
1451215
1451215
  }
1451216
1451216
  case State2.ATTRIBUTE_VALUE_UNQUOTED: {
1451217
- this._stateAttributeValueUnquoted(cp11);
1451217
+ this._stateAttributeValueUnquoted(cp10);
1451218
1451218
  break;
1451219
1451219
  }
1451220
1451220
  case State2.AFTER_ATTRIBUTE_VALUE_QUOTED: {
1451221
- this._stateAfterAttributeValueQuoted(cp11);
1451221
+ this._stateAfterAttributeValueQuoted(cp10);
1451222
1451222
  break;
1451223
1451223
  }
1451224
1451224
  case State2.SELF_CLOSING_START_TAG: {
1451225
- this._stateSelfClosingStartTag(cp11);
1451225
+ this._stateSelfClosingStartTag(cp10);
1451226
1451226
  break;
1451227
1451227
  }
1451228
1451228
  case State2.BOGUS_COMMENT: {
1451229
- this._stateBogusComment(cp11);
1451229
+ this._stateBogusComment(cp10);
1451230
1451230
  break;
1451231
1451231
  }
1451232
1451232
  case State2.MARKUP_DECLARATION_OPEN: {
1451233
- this._stateMarkupDeclarationOpen(cp11);
1451233
+ this._stateMarkupDeclarationOpen(cp10);
1451234
1451234
  break;
1451235
1451235
  }
1451236
1451236
  case State2.COMMENT_START: {
1451237
- this._stateCommentStart(cp11);
1451237
+ this._stateCommentStart(cp10);
1451238
1451238
  break;
1451239
1451239
  }
1451240
1451240
  case State2.COMMENT_START_DASH: {
1451241
- this._stateCommentStartDash(cp11);
1451241
+ this._stateCommentStartDash(cp10);
1451242
1451242
  break;
1451243
1451243
  }
1451244
1451244
  case State2.COMMENT: {
1451245
- this._stateComment(cp11);
1451245
+ this._stateComment(cp10);
1451246
1451246
  break;
1451247
1451247
  }
1451248
1451248
  case State2.COMMENT_LESS_THAN_SIGN: {
1451249
- this._stateCommentLessThanSign(cp11);
1451249
+ this._stateCommentLessThanSign(cp10);
1451250
1451250
  break;
1451251
1451251
  }
1451252
1451252
  case State2.COMMENT_LESS_THAN_SIGN_BANG: {
1451253
- this._stateCommentLessThanSignBang(cp11);
1451253
+ this._stateCommentLessThanSignBang(cp10);
1451254
1451254
  break;
1451255
1451255
  }
1451256
1451256
  case State2.COMMENT_LESS_THAN_SIGN_BANG_DASH: {
1451257
- this._stateCommentLessThanSignBangDash(cp11);
1451257
+ this._stateCommentLessThanSignBangDash(cp10);
1451258
1451258
  break;
1451259
1451259
  }
1451260
1451260
  case State2.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {
1451261
- this._stateCommentLessThanSignBangDashDash(cp11);
1451261
+ this._stateCommentLessThanSignBangDashDash(cp10);
1451262
1451262
  break;
1451263
1451263
  }
1451264
1451264
  case State2.COMMENT_END_DASH: {
1451265
- this._stateCommentEndDash(cp11);
1451265
+ this._stateCommentEndDash(cp10);
1451266
1451266
  break;
1451267
1451267
  }
1451268
1451268
  case State2.COMMENT_END: {
1451269
- this._stateCommentEnd(cp11);
1451269
+ this._stateCommentEnd(cp10);
1451270
1451270
  break;
1451271
1451271
  }
1451272
1451272
  case State2.COMMENT_END_BANG: {
1451273
- this._stateCommentEndBang(cp11);
1451273
+ this._stateCommentEndBang(cp10);
1451274
1451274
  break;
1451275
1451275
  }
1451276
1451276
  case State2.DOCTYPE: {
1451277
- this._stateDoctype(cp11);
1451277
+ this._stateDoctype(cp10);
1451278
1451278
  break;
1451279
1451279
  }
1451280
1451280
  case State2.BEFORE_DOCTYPE_NAME: {
1451281
- this._stateBeforeDoctypeName(cp11);
1451281
+ this._stateBeforeDoctypeName(cp10);
1451282
1451282
  break;
1451283
1451283
  }
1451284
1451284
  case State2.DOCTYPE_NAME: {
1451285
- this._stateDoctypeName(cp11);
1451285
+ this._stateDoctypeName(cp10);
1451286
1451286
  break;
1451287
1451287
  }
1451288
1451288
  case State2.AFTER_DOCTYPE_NAME: {
1451289
- this._stateAfterDoctypeName(cp11);
1451289
+ this._stateAfterDoctypeName(cp10);
1451290
1451290
  break;
1451291
1451291
  }
1451292
1451292
  case State2.AFTER_DOCTYPE_PUBLIC_KEYWORD: {
1451293
- this._stateAfterDoctypePublicKeyword(cp11);
1451293
+ this._stateAfterDoctypePublicKeyword(cp10);
1451294
1451294
  break;
1451295
1451295
  }
1451296
1451296
  case State2.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
1451297
- this._stateBeforeDoctypePublicIdentifier(cp11);
1451297
+ this._stateBeforeDoctypePublicIdentifier(cp10);
1451298
1451298
  break;
1451299
1451299
  }
1451300
1451300
  case State2.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
1451301
- this._stateDoctypePublicIdentifierDoubleQuoted(cp11);
1451301
+ this._stateDoctypePublicIdentifierDoubleQuoted(cp10);
1451302
1451302
  break;
1451303
1451303
  }
1451304
1451304
  case State2.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
1451305
- this._stateDoctypePublicIdentifierSingleQuoted(cp11);
1451305
+ this._stateDoctypePublicIdentifierSingleQuoted(cp10);
1451306
1451306
  break;
1451307
1451307
  }
1451308
1451308
  case State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
1451309
- this._stateAfterDoctypePublicIdentifier(cp11);
1451309
+ this._stateAfterDoctypePublicIdentifier(cp10);
1451310
1451310
  break;
1451311
1451311
  }
1451312
1451312
  case State2.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
1451313
- this._stateBetweenDoctypePublicAndSystemIdentifiers(cp11);
1451313
+ this._stateBetweenDoctypePublicAndSystemIdentifiers(cp10);
1451314
1451314
  break;
1451315
1451315
  }
1451316
1451316
  case State2.AFTER_DOCTYPE_SYSTEM_KEYWORD: {
1451317
- this._stateAfterDoctypeSystemKeyword(cp11);
1451317
+ this._stateAfterDoctypeSystemKeyword(cp10);
1451318
1451318
  break;
1451319
1451319
  }
1451320
1451320
  case State2.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
1451321
- this._stateBeforeDoctypeSystemIdentifier(cp11);
1451321
+ this._stateBeforeDoctypeSystemIdentifier(cp10);
1451322
1451322
  break;
1451323
1451323
  }
1451324
1451324
  case State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
1451325
- this._stateDoctypeSystemIdentifierDoubleQuoted(cp11);
1451325
+ this._stateDoctypeSystemIdentifierDoubleQuoted(cp10);
1451326
1451326
  break;
1451327
1451327
  }
1451328
1451328
  case State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
1451329
- this._stateDoctypeSystemIdentifierSingleQuoted(cp11);
1451329
+ this._stateDoctypeSystemIdentifierSingleQuoted(cp10);
1451330
1451330
  break;
1451331
1451331
  }
1451332
1451332
  case State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
1451333
- this._stateAfterDoctypeSystemIdentifier(cp11);
1451333
+ this._stateAfterDoctypeSystemIdentifier(cp10);
1451334
1451334
  break;
1451335
1451335
  }
1451336
1451336
  case State2.BOGUS_DOCTYPE: {
1451337
- this._stateBogusDoctype(cp11);
1451337
+ this._stateBogusDoctype(cp10);
1451338
1451338
  break;
1451339
1451339
  }
1451340
1451340
  case State2.CDATA_SECTION: {
1451341
- this._stateCdataSection(cp11);
1451341
+ this._stateCdataSection(cp10);
1451342
1451342
  break;
1451343
1451343
  }
1451344
1451344
  case State2.CDATA_SECTION_BRACKET: {
1451345
- this._stateCdataSectionBracket(cp11);
1451345
+ this._stateCdataSectionBracket(cp10);
1451346
1451346
  break;
1451347
1451347
  }
1451348
1451348
  case State2.CDATA_SECTION_END: {
1451349
- this._stateCdataSectionEnd(cp11);
1451349
+ this._stateCdataSectionEnd(cp10);
1451350
1451350
  break;
1451351
1451351
  }
1451352
1451352
  case State2.CHARACTER_REFERENCE: {
@@ -1451354,7 +1451354,7 @@ var Tokenizer = class {
1451354
1451354
  break;
1451355
1451355
  }
1451356
1451356
  case State2.AMBIGUOUS_AMPERSAND: {
1451357
- this._stateAmbiguousAmpersand(cp11);
1451357
+ this._stateAmbiguousAmpersand(cp10);
1451358
1451358
  break;
1451359
1451359
  }
1451360
1451360
  default: {
@@ -1451365,8 +1451365,8 @@ var Tokenizer = class {
1451365
1451365
  // State machine
1451366
1451366
  // Data state
1451367
1451367
  //------------------------------------------------------------------
1451368
- _stateData(cp11) {
1451369
- switch (cp11) {
1451368
+ _stateData(cp10) {
1451369
+ switch (cp10) {
1451370
1451370
  case CODE_POINTS.LESS_THAN_SIGN: {
1451371
1451371
  this.state = State2.TAG_OPEN;
1451372
1451372
  break;
@@ -1451377,7 +1451377,7 @@ var Tokenizer = class {
1451377
1451377
  }
1451378
1451378
  case CODE_POINTS.NULL: {
1451379
1451379
  this._err(ERR.unexpectedNullCharacter);
1451380
- this._emitCodePoint(cp11);
1451380
+ this._emitCodePoint(cp10);
1451381
1451381
  break;
1451382
1451382
  }
1451383
1451383
  case CODE_POINTS.EOF: {
@@ -1451385,14 +1451385,14 @@ var Tokenizer = class {
1451385
1451385
  break;
1451386
1451386
  }
1451387
1451387
  default: {
1451388
- this._emitCodePoint(cp11);
1451388
+ this._emitCodePoint(cp10);
1451389
1451389
  }
1451390
1451390
  }
1451391
1451391
  }
1451392
1451392
  // RCDATA state
1451393
1451393
  //------------------------------------------------------------------
1451394
- _stateRcdata(cp11) {
1451395
- switch (cp11) {
1451394
+ _stateRcdata(cp10) {
1451395
+ switch (cp10) {
1451396
1451396
  case CODE_POINTS.AMPERSAND: {
1451397
1451397
  this._startCharacterReference();
1451398
1451398
  break;
@@ -1451411,14 +1451411,14 @@ var Tokenizer = class {
1451411
1451411
  break;
1451412
1451412
  }
1451413
1451413
  default: {
1451414
- this._emitCodePoint(cp11);
1451414
+ this._emitCodePoint(cp10);
1451415
1451415
  }
1451416
1451416
  }
1451417
1451417
  }
1451418
1451418
  // RAWTEXT state
1451419
1451419
  //------------------------------------------------------------------
1451420
- _stateRawtext(cp11) {
1451421
- switch (cp11) {
1451420
+ _stateRawtext(cp10) {
1451421
+ switch (cp10) {
1451422
1451422
  case CODE_POINTS.LESS_THAN_SIGN: {
1451423
1451423
  this.state = State2.RAWTEXT_LESS_THAN_SIGN;
1451424
1451424
  break;
@@ -1451433,14 +1451433,14 @@ var Tokenizer = class {
1451433
1451433
  break;
1451434
1451434
  }
1451435
1451435
  default: {
1451436
- this._emitCodePoint(cp11);
1451436
+ this._emitCodePoint(cp10);
1451437
1451437
  }
1451438
1451438
  }
1451439
1451439
  }
1451440
1451440
  // Script data state
1451441
1451441
  //------------------------------------------------------------------
1451442
- _stateScriptData(cp11) {
1451443
- switch (cp11) {
1451442
+ _stateScriptData(cp10) {
1451443
+ switch (cp10) {
1451444
1451444
  case CODE_POINTS.LESS_THAN_SIGN: {
1451445
1451445
  this.state = State2.SCRIPT_DATA_LESS_THAN_SIGN;
1451446
1451446
  break;
@@ -1451455,14 +1451455,14 @@ var Tokenizer = class {
1451455
1451455
  break;
1451456
1451456
  }
1451457
1451457
  default: {
1451458
- this._emitCodePoint(cp11);
1451458
+ this._emitCodePoint(cp10);
1451459
1451459
  }
1451460
1451460
  }
1451461
1451461
  }
1451462
1451462
  // PLAINTEXT state
1451463
1451463
  //------------------------------------------------------------------
1451464
- _statePlaintext(cp11) {
1451465
- switch (cp11) {
1451464
+ _statePlaintext(cp10) {
1451465
+ switch (cp10) {
1451466
1451466
  case CODE_POINTS.NULL: {
1451467
1451467
  this._err(ERR.unexpectedNullCharacter);
1451468
1451468
  this._emitChars(REPLACEMENT_CHARACTER);
@@ -1451473,19 +1451473,19 @@ var Tokenizer = class {
1451473
1451473
  break;
1451474
1451474
  }
1451475
1451475
  default: {
1451476
- this._emitCodePoint(cp11);
1451476
+ this._emitCodePoint(cp10);
1451477
1451477
  }
1451478
1451478
  }
1451479
1451479
  }
1451480
1451480
  // Tag open state
1451481
1451481
  //------------------------------------------------------------------
1451482
- _stateTagOpen(cp11) {
1451483
- if (isAsciiLetter(cp11)) {
1451482
+ _stateTagOpen(cp10) {
1451483
+ if (isAsciiLetter(cp10)) {
1451484
1451484
  this._createStartTagToken();
1451485
1451485
  this.state = State2.TAG_NAME;
1451486
- this._stateTagName(cp11);
1451486
+ this._stateTagName(cp10);
1451487
1451487
  } else
1451488
- switch (cp11) {
1451488
+ switch (cp10) {
1451489
1451489
  case CODE_POINTS.EXCLAMATION_MARK: {
1451490
1451490
  this.state = State2.MARKUP_DECLARATION_OPEN;
1451491
1451491
  break;
@@ -1451498,7 +1451498,7 @@ var Tokenizer = class {
1451498
1451498
  this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);
1451499
1451499
  this._createCommentToken(1);
1451500
1451500
  this.state = State2.BOGUS_COMMENT;
1451501
- this._stateBogusComment(cp11);
1451501
+ this._stateBogusComment(cp10);
1451502
1451502
  break;
1451503
1451503
  }
1451504
1451504
  case CODE_POINTS.EOF: {
@@ -1451511,19 +1451511,19 @@ var Tokenizer = class {
1451511
1451511
  this._err(ERR.invalidFirstCharacterOfTagName);
1451512
1451512
  this._emitChars("<");
1451513
1451513
  this.state = State2.DATA;
1451514
- this._stateData(cp11);
1451514
+ this._stateData(cp10);
1451515
1451515
  }
1451516
1451516
  }
1451517
1451517
  }
1451518
1451518
  // End tag open state
1451519
1451519
  //------------------------------------------------------------------
1451520
- _stateEndTagOpen(cp11) {
1451521
- if (isAsciiLetter(cp11)) {
1451520
+ _stateEndTagOpen(cp10) {
1451521
+ if (isAsciiLetter(cp10)) {
1451522
1451522
  this._createEndTagToken();
1451523
1451523
  this.state = State2.TAG_NAME;
1451524
- this._stateTagName(cp11);
1451524
+ this._stateTagName(cp10);
1451525
1451525
  } else
1451526
- switch (cp11) {
1451526
+ switch (cp10) {
1451527
1451527
  case CODE_POINTS.GREATER_THAN_SIGN: {
1451528
1451528
  this._err(ERR.missingEndTagName);
1451529
1451529
  this.state = State2.DATA;
@@ -1451539,15 +1451539,15 @@ var Tokenizer = class {
1451539
1451539
  this._err(ERR.invalidFirstCharacterOfTagName);
1451540
1451540
  this._createCommentToken(2);
1451541
1451541
  this.state = State2.BOGUS_COMMENT;
1451542
- this._stateBogusComment(cp11);
1451542
+ this._stateBogusComment(cp10);
1451543
1451543
  }
1451544
1451544
  }
1451545
1451545
  }
1451546
1451546
  // Tag name state
1451547
1451547
  //------------------------------------------------------------------
1451548
- _stateTagName(cp11) {
1451548
+ _stateTagName(cp10) {
1451549
1451549
  const token = this.currentToken;
1451550
- switch (cp11) {
1451550
+ switch (cp10) {
1451551
1451551
  case CODE_POINTS.SPACE:
1451552
1451552
  case CODE_POINTS.LINE_FEED:
1451553
1451553
  case CODE_POINTS.TABULATION:
@@ -1451575,31 +1451575,31 @@ var Tokenizer = class {
1451575
1451575
  break;
1451576
1451576
  }
1451577
1451577
  default: {
1451578
- token.tagName += String.fromCodePoint(isAsciiUpper(cp11) ? toAsciiLower(cp11) : cp11);
1451578
+ token.tagName += String.fromCodePoint(isAsciiUpper(cp10) ? toAsciiLower(cp10) : cp10);
1451579
1451579
  }
1451580
1451580
  }
1451581
1451581
  }
1451582
1451582
  // RCDATA less-than sign state
1451583
1451583
  //------------------------------------------------------------------
1451584
- _stateRcdataLessThanSign(cp11) {
1451585
- if (cp11 === CODE_POINTS.SOLIDUS) {
1451584
+ _stateRcdataLessThanSign(cp10) {
1451585
+ if (cp10 === CODE_POINTS.SOLIDUS) {
1451586
1451586
  this.state = State2.RCDATA_END_TAG_OPEN;
1451587
1451587
  } else {
1451588
1451588
  this._emitChars("<");
1451589
1451589
  this.state = State2.RCDATA;
1451590
- this._stateRcdata(cp11);
1451590
+ this._stateRcdata(cp10);
1451591
1451591
  }
1451592
1451592
  }
1451593
1451593
  // RCDATA end tag open state
1451594
1451594
  //------------------------------------------------------------------
1451595
- _stateRcdataEndTagOpen(cp11) {
1451596
- if (isAsciiLetter(cp11)) {
1451595
+ _stateRcdataEndTagOpen(cp10) {
1451596
+ if (isAsciiLetter(cp10)) {
1451597
1451597
  this.state = State2.RCDATA_END_TAG_NAME;
1451598
- this._stateRcdataEndTagName(cp11);
1451598
+ this._stateRcdataEndTagName(cp10);
1451599
1451599
  } else {
1451600
1451600
  this._emitChars("</");
1451601
1451601
  this.state = State2.RCDATA;
1451602
- this._stateRcdata(cp11);
1451602
+ this._stateRcdata(cp10);
1451603
1451603
  }
1451604
1451604
  }
1451605
1451605
  handleSpecialEndTag(_cp) {
@@ -1451609,8 +1451609,8 @@ var Tokenizer = class {
1451609
1451609
  this._createEndTagToken();
1451610
1451610
  const token = this.currentToken;
1451611
1451611
  token.tagName = this.lastStartTagName;
1451612
- const cp11 = this.preprocessor.peek(this.lastStartTagName.length);
1451613
- switch (cp11) {
1451612
+ const cp10 = this.preprocessor.peek(this.lastStartTagName.length);
1451613
+ switch (cp10) {
1451614
1451614
  case CODE_POINTS.SPACE:
1451615
1451615
  case CODE_POINTS.LINE_FEED:
1451616
1451616
  case CODE_POINTS.TABULATION:
@@ -1451637,49 +1451637,49 @@ var Tokenizer = class {
1451637
1451637
  }
1451638
1451638
  // RCDATA end tag name state
1451639
1451639
  //------------------------------------------------------------------
1451640
- _stateRcdataEndTagName(cp11) {
1451641
- if (this.handleSpecialEndTag(cp11)) {
1451640
+ _stateRcdataEndTagName(cp10) {
1451641
+ if (this.handleSpecialEndTag(cp10)) {
1451642
1451642
  this._emitChars("</");
1451643
1451643
  this.state = State2.RCDATA;
1451644
- this._stateRcdata(cp11);
1451644
+ this._stateRcdata(cp10);
1451645
1451645
  }
1451646
1451646
  }
1451647
1451647
  // RAWTEXT less-than sign state
1451648
1451648
  //------------------------------------------------------------------
1451649
- _stateRawtextLessThanSign(cp11) {
1451650
- if (cp11 === CODE_POINTS.SOLIDUS) {
1451649
+ _stateRawtextLessThanSign(cp10) {
1451650
+ if (cp10 === CODE_POINTS.SOLIDUS) {
1451651
1451651
  this.state = State2.RAWTEXT_END_TAG_OPEN;
1451652
1451652
  } else {
1451653
1451653
  this._emitChars("<");
1451654
1451654
  this.state = State2.RAWTEXT;
1451655
- this._stateRawtext(cp11);
1451655
+ this._stateRawtext(cp10);
1451656
1451656
  }
1451657
1451657
  }
1451658
1451658
  // RAWTEXT end tag open state
1451659
1451659
  //------------------------------------------------------------------
1451660
- _stateRawtextEndTagOpen(cp11) {
1451661
- if (isAsciiLetter(cp11)) {
1451660
+ _stateRawtextEndTagOpen(cp10) {
1451661
+ if (isAsciiLetter(cp10)) {
1451662
1451662
  this.state = State2.RAWTEXT_END_TAG_NAME;
1451663
- this._stateRawtextEndTagName(cp11);
1451663
+ this._stateRawtextEndTagName(cp10);
1451664
1451664
  } else {
1451665
1451665
  this._emitChars("</");
1451666
1451666
  this.state = State2.RAWTEXT;
1451667
- this._stateRawtext(cp11);
1451667
+ this._stateRawtext(cp10);
1451668
1451668
  }
1451669
1451669
  }
1451670
1451670
  // RAWTEXT end tag name state
1451671
1451671
  //------------------------------------------------------------------
1451672
- _stateRawtextEndTagName(cp11) {
1451673
- if (this.handleSpecialEndTag(cp11)) {
1451672
+ _stateRawtextEndTagName(cp10) {
1451673
+ if (this.handleSpecialEndTag(cp10)) {
1451674
1451674
  this._emitChars("</");
1451675
1451675
  this.state = State2.RAWTEXT;
1451676
- this._stateRawtext(cp11);
1451676
+ this._stateRawtext(cp10);
1451677
1451677
  }
1451678
1451678
  }
1451679
1451679
  // Script data less-than sign state
1451680
1451680
  //------------------------------------------------------------------
1451681
- _stateScriptDataLessThanSign(cp11) {
1451682
- switch (cp11) {
1451681
+ _stateScriptDataLessThanSign(cp10) {
1451682
+ switch (cp10) {
1451683
1451683
  case CODE_POINTS.SOLIDUS: {
1451684
1451684
  this.state = State2.SCRIPT_DATA_END_TAG_OPEN;
1451685
1451685
  break;
@@ -1451692,57 +1451692,57 @@ var Tokenizer = class {
1451692
1451692
  default: {
1451693
1451693
  this._emitChars("<");
1451694
1451694
  this.state = State2.SCRIPT_DATA;
1451695
- this._stateScriptData(cp11);
1451695
+ this._stateScriptData(cp10);
1451696
1451696
  }
1451697
1451697
  }
1451698
1451698
  }
1451699
1451699
  // Script data end tag open state
1451700
1451700
  //------------------------------------------------------------------
1451701
- _stateScriptDataEndTagOpen(cp11) {
1451702
- if (isAsciiLetter(cp11)) {
1451701
+ _stateScriptDataEndTagOpen(cp10) {
1451702
+ if (isAsciiLetter(cp10)) {
1451703
1451703
  this.state = State2.SCRIPT_DATA_END_TAG_NAME;
1451704
- this._stateScriptDataEndTagName(cp11);
1451704
+ this._stateScriptDataEndTagName(cp10);
1451705
1451705
  } else {
1451706
1451706
  this._emitChars("</");
1451707
1451707
  this.state = State2.SCRIPT_DATA;
1451708
- this._stateScriptData(cp11);
1451708
+ this._stateScriptData(cp10);
1451709
1451709
  }
1451710
1451710
  }
1451711
1451711
  // Script data end tag name state
1451712
1451712
  //------------------------------------------------------------------
1451713
- _stateScriptDataEndTagName(cp11) {
1451714
- if (this.handleSpecialEndTag(cp11)) {
1451713
+ _stateScriptDataEndTagName(cp10) {
1451714
+ if (this.handleSpecialEndTag(cp10)) {
1451715
1451715
  this._emitChars("</");
1451716
1451716
  this.state = State2.SCRIPT_DATA;
1451717
- this._stateScriptData(cp11);
1451717
+ this._stateScriptData(cp10);
1451718
1451718
  }
1451719
1451719
  }
1451720
1451720
  // Script data escape start state
1451721
1451721
  //------------------------------------------------------------------
1451722
- _stateScriptDataEscapeStart(cp11) {
1451723
- if (cp11 === CODE_POINTS.HYPHEN_MINUS) {
1451722
+ _stateScriptDataEscapeStart(cp10) {
1451723
+ if (cp10 === CODE_POINTS.HYPHEN_MINUS) {
1451724
1451724
  this.state = State2.SCRIPT_DATA_ESCAPE_START_DASH;
1451725
1451725
  this._emitChars("-");
1451726
1451726
  } else {
1451727
1451727
  this.state = State2.SCRIPT_DATA;
1451728
- this._stateScriptData(cp11);
1451728
+ this._stateScriptData(cp10);
1451729
1451729
  }
1451730
1451730
  }
1451731
1451731
  // Script data escape start dash state
1451732
1451732
  //------------------------------------------------------------------
1451733
- _stateScriptDataEscapeStartDash(cp11) {
1451734
- if (cp11 === CODE_POINTS.HYPHEN_MINUS) {
1451733
+ _stateScriptDataEscapeStartDash(cp10) {
1451734
+ if (cp10 === CODE_POINTS.HYPHEN_MINUS) {
1451735
1451735
  this.state = State2.SCRIPT_DATA_ESCAPED_DASH_DASH;
1451736
1451736
  this._emitChars("-");
1451737
1451737
  } else {
1451738
1451738
  this.state = State2.SCRIPT_DATA;
1451739
- this._stateScriptData(cp11);
1451739
+ this._stateScriptData(cp10);
1451740
1451740
  }
1451741
1451741
  }
1451742
1451742
  // Script data escaped state
1451743
1451743
  //------------------------------------------------------------------
1451744
- _stateScriptDataEscaped(cp11) {
1451745
- switch (cp11) {
1451744
+ _stateScriptDataEscaped(cp10) {
1451745
+ switch (cp10) {
1451746
1451746
  case CODE_POINTS.HYPHEN_MINUS: {
1451747
1451747
  this.state = State2.SCRIPT_DATA_ESCAPED_DASH;
1451748
1451748
  this._emitChars("-");
@@ -1451763,14 +1451763,14 @@ var Tokenizer = class {
1451763
1451763
  break;
1451764
1451764
  }
1451765
1451765
  default: {
1451766
- this._emitCodePoint(cp11);
1451766
+ this._emitCodePoint(cp10);
1451767
1451767
  }
1451768
1451768
  }
1451769
1451769
  }
1451770
1451770
  // Script data escaped dash state
1451771
1451771
  //------------------------------------------------------------------
1451772
- _stateScriptDataEscapedDash(cp11) {
1451773
- switch (cp11) {
1451772
+ _stateScriptDataEscapedDash(cp10) {
1451773
+ switch (cp10) {
1451774
1451774
  case CODE_POINTS.HYPHEN_MINUS: {
1451775
1451775
  this.state = State2.SCRIPT_DATA_ESCAPED_DASH_DASH;
1451776
1451776
  this._emitChars("-");
@@ -1451793,14 +1451793,14 @@ var Tokenizer = class {
1451793
1451793
  }
1451794
1451794
  default: {
1451795
1451795
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451796
- this._emitCodePoint(cp11);
1451796
+ this._emitCodePoint(cp10);
1451797
1451797
  }
1451798
1451798
  }
1451799
1451799
  }
1451800
1451800
  // Script data escaped dash dash state
1451801
1451801
  //------------------------------------------------------------------
1451802
- _stateScriptDataEscapedDashDash(cp11) {
1451803
- switch (cp11) {
1451802
+ _stateScriptDataEscapedDashDash(cp10) {
1451803
+ switch (cp10) {
1451804
1451804
  case CODE_POINTS.HYPHEN_MINUS: {
1451805
1451805
  this._emitChars("-");
1451806
1451806
  break;
@@ -1451827,64 +1451827,64 @@ var Tokenizer = class {
1451827
1451827
  }
1451828
1451828
  default: {
1451829
1451829
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451830
- this._emitCodePoint(cp11);
1451830
+ this._emitCodePoint(cp10);
1451831
1451831
  }
1451832
1451832
  }
1451833
1451833
  }
1451834
1451834
  // Script data escaped less-than sign state
1451835
1451835
  //------------------------------------------------------------------
1451836
- _stateScriptDataEscapedLessThanSign(cp11) {
1451837
- if (cp11 === CODE_POINTS.SOLIDUS) {
1451836
+ _stateScriptDataEscapedLessThanSign(cp10) {
1451837
+ if (cp10 === CODE_POINTS.SOLIDUS) {
1451838
1451838
  this.state = State2.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
1451839
- } else if (isAsciiLetter(cp11)) {
1451839
+ } else if (isAsciiLetter(cp10)) {
1451840
1451840
  this._emitChars("<");
1451841
1451841
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPE_START;
1451842
- this._stateScriptDataDoubleEscapeStart(cp11);
1451842
+ this._stateScriptDataDoubleEscapeStart(cp10);
1451843
1451843
  } else {
1451844
1451844
  this._emitChars("<");
1451845
1451845
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451846
- this._stateScriptDataEscaped(cp11);
1451846
+ this._stateScriptDataEscaped(cp10);
1451847
1451847
  }
1451848
1451848
  }
1451849
1451849
  // Script data escaped end tag open state
1451850
1451850
  //------------------------------------------------------------------
1451851
- _stateScriptDataEscapedEndTagOpen(cp11) {
1451852
- if (isAsciiLetter(cp11)) {
1451851
+ _stateScriptDataEscapedEndTagOpen(cp10) {
1451852
+ if (isAsciiLetter(cp10)) {
1451853
1451853
  this.state = State2.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
1451854
- this._stateScriptDataEscapedEndTagName(cp11);
1451854
+ this._stateScriptDataEscapedEndTagName(cp10);
1451855
1451855
  } else {
1451856
1451856
  this._emitChars("</");
1451857
1451857
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451858
- this._stateScriptDataEscaped(cp11);
1451858
+ this._stateScriptDataEscaped(cp10);
1451859
1451859
  }
1451860
1451860
  }
1451861
1451861
  // Script data escaped end tag name state
1451862
1451862
  //------------------------------------------------------------------
1451863
- _stateScriptDataEscapedEndTagName(cp11) {
1451864
- if (this.handleSpecialEndTag(cp11)) {
1451863
+ _stateScriptDataEscapedEndTagName(cp10) {
1451864
+ if (this.handleSpecialEndTag(cp10)) {
1451865
1451865
  this._emitChars("</");
1451866
1451866
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451867
- this._stateScriptDataEscaped(cp11);
1451867
+ this._stateScriptDataEscaped(cp10);
1451868
1451868
  }
1451869
1451869
  }
1451870
1451870
  // Script data double escape start state
1451871
1451871
  //------------------------------------------------------------------
1451872
- _stateScriptDataDoubleEscapeStart(cp11) {
1451872
+ _stateScriptDataDoubleEscapeStart(cp10) {
1451873
1451873
  if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
1451874
- this._emitCodePoint(cp11);
1451874
+ this._emitCodePoint(cp10);
1451875
1451875
  for (let i11 = 0; i11 < SEQUENCES.SCRIPT.length; i11++) {
1451876
1451876
  this._emitCodePoint(this._consume());
1451877
1451877
  }
1451878
1451878
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED;
1451879
1451879
  } else if (!this._ensureHibernation()) {
1451880
1451880
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451881
- this._stateScriptDataEscaped(cp11);
1451881
+ this._stateScriptDataEscaped(cp10);
1451882
1451882
  }
1451883
1451883
  }
1451884
1451884
  // Script data double escaped state
1451885
1451885
  //------------------------------------------------------------------
1451886
- _stateScriptDataDoubleEscaped(cp11) {
1451887
- switch (cp11) {
1451886
+ _stateScriptDataDoubleEscaped(cp10) {
1451887
+ switch (cp10) {
1451888
1451888
  case CODE_POINTS.HYPHEN_MINUS: {
1451889
1451889
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;
1451890
1451890
  this._emitChars("-");
@@ -1451906,14 +1451906,14 @@ var Tokenizer = class {
1451906
1451906
  break;
1451907
1451907
  }
1451908
1451908
  default: {
1451909
- this._emitCodePoint(cp11);
1451909
+ this._emitCodePoint(cp10);
1451910
1451910
  }
1451911
1451911
  }
1451912
1451912
  }
1451913
1451913
  // Script data double escaped dash state
1451914
1451914
  //------------------------------------------------------------------
1451915
- _stateScriptDataDoubleEscapedDash(cp11) {
1451916
- switch (cp11) {
1451915
+ _stateScriptDataDoubleEscapedDash(cp10) {
1451916
+ switch (cp10) {
1451917
1451917
  case CODE_POINTS.HYPHEN_MINUS: {
1451918
1451918
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;
1451919
1451919
  this._emitChars("-");
@@ -1451937,14 +1451937,14 @@ var Tokenizer = class {
1451937
1451937
  }
1451938
1451938
  default: {
1451939
1451939
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED;
1451940
- this._emitCodePoint(cp11);
1451940
+ this._emitCodePoint(cp10);
1451941
1451941
  }
1451942
1451942
  }
1451943
1451943
  }
1451944
1451944
  // Script data double escaped dash dash state
1451945
1451945
  //------------------------------------------------------------------
1451946
- _stateScriptDataDoubleEscapedDashDash(cp11) {
1451947
- switch (cp11) {
1451946
+ _stateScriptDataDoubleEscapedDashDash(cp10) {
1451947
+ switch (cp10) {
1451948
1451948
  case CODE_POINTS.HYPHEN_MINUS: {
1451949
1451949
  this._emitChars("-");
1451950
1451950
  break;
@@ -1451972,39 +1451972,39 @@ var Tokenizer = class {
1451972
1451972
  }
1451973
1451973
  default: {
1451974
1451974
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED;
1451975
- this._emitCodePoint(cp11);
1451975
+ this._emitCodePoint(cp10);
1451976
1451976
  }
1451977
1451977
  }
1451978
1451978
  }
1451979
1451979
  // Script data double escaped less-than sign state
1451980
1451980
  //------------------------------------------------------------------
1451981
- _stateScriptDataDoubleEscapedLessThanSign(cp11) {
1451982
- if (cp11 === CODE_POINTS.SOLIDUS) {
1451981
+ _stateScriptDataDoubleEscapedLessThanSign(cp10) {
1451982
+ if (cp10 === CODE_POINTS.SOLIDUS) {
1451983
1451983
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPE_END;
1451984
1451984
  this._emitChars("/");
1451985
1451985
  } else {
1451986
1451986
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED;
1451987
- this._stateScriptDataDoubleEscaped(cp11);
1451987
+ this._stateScriptDataDoubleEscaped(cp10);
1451988
1451988
  }
1451989
1451989
  }
1451990
1451990
  // Script data double escape end state
1451991
1451991
  //------------------------------------------------------------------
1451992
- _stateScriptDataDoubleEscapeEnd(cp11) {
1451992
+ _stateScriptDataDoubleEscapeEnd(cp10) {
1451993
1451993
  if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
1451994
- this._emitCodePoint(cp11);
1451994
+ this._emitCodePoint(cp10);
1451995
1451995
  for (let i11 = 0; i11 < SEQUENCES.SCRIPT.length; i11++) {
1451996
1451996
  this._emitCodePoint(this._consume());
1451997
1451997
  }
1451998
1451998
  this.state = State2.SCRIPT_DATA_ESCAPED;
1451999
1451999
  } else if (!this._ensureHibernation()) {
1452000
1452000
  this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED;
1452001
- this._stateScriptDataDoubleEscaped(cp11);
1452001
+ this._stateScriptDataDoubleEscaped(cp10);
1452002
1452002
  }
1452003
1452003
  }
1452004
1452004
  // Before attribute name state
1452005
1452005
  //------------------------------------------------------------------
1452006
- _stateBeforeAttributeName(cp11) {
1452007
- switch (cp11) {
1452006
+ _stateBeforeAttributeName(cp10) {
1452007
+ switch (cp10) {
1452008
1452008
  case CODE_POINTS.SPACE:
1452009
1452009
  case CODE_POINTS.LINE_FEED:
1452010
1452010
  case CODE_POINTS.TABULATION:
@@ -1452015,7 +1452015,7 @@ var Tokenizer = class {
1452015
1452015
  case CODE_POINTS.GREATER_THAN_SIGN:
1452016
1452016
  case CODE_POINTS.EOF: {
1452017
1452017
  this.state = State2.AFTER_ATTRIBUTE_NAME;
1452018
- this._stateAfterAttributeName(cp11);
1452018
+ this._stateAfterAttributeName(cp10);
1452019
1452019
  break;
1452020
1452020
  }
1452021
1452021
  case CODE_POINTS.EQUALS_SIGN: {
@@ -1452027,14 +1452027,14 @@ var Tokenizer = class {
1452027
1452027
  default: {
1452028
1452028
  this._createAttr("");
1452029
1452029
  this.state = State2.ATTRIBUTE_NAME;
1452030
- this._stateAttributeName(cp11);
1452030
+ this._stateAttributeName(cp10);
1452031
1452031
  }
1452032
1452032
  }
1452033
1452033
  }
1452034
1452034
  // Attribute name state
1452035
1452035
  //------------------------------------------------------------------
1452036
- _stateAttributeName(cp11) {
1452037
- switch (cp11) {
1452036
+ _stateAttributeName(cp10) {
1452037
+ switch (cp10) {
1452038
1452038
  case CODE_POINTS.SPACE:
1452039
1452039
  case CODE_POINTS.LINE_FEED:
1452040
1452040
  case CODE_POINTS.TABULATION:
@@ -1452044,7 +1452044,7 @@ var Tokenizer = class {
1452044
1452044
  case CODE_POINTS.EOF: {
1452045
1452045
  this._leaveAttrName();
1452046
1452046
  this.state = State2.AFTER_ATTRIBUTE_NAME;
1452047
- this._stateAfterAttributeName(cp11);
1452047
+ this._stateAfterAttributeName(cp10);
1452048
1452048
  break;
1452049
1452049
  }
1452050
1452050
  case CODE_POINTS.EQUALS_SIGN: {
@@ -1452056,7 +1452056,7 @@ var Tokenizer = class {
1452056
1452056
  case CODE_POINTS.APOSTROPHE:
1452057
1452057
  case CODE_POINTS.LESS_THAN_SIGN: {
1452058
1452058
  this._err(ERR.unexpectedCharacterInAttributeName);
1452059
- this.currentAttr.name += String.fromCodePoint(cp11);
1452059
+ this.currentAttr.name += String.fromCodePoint(cp10);
1452060
1452060
  break;
1452061
1452061
  }
1452062
1452062
  case CODE_POINTS.NULL: {
@@ -1452065,14 +1452065,14 @@ var Tokenizer = class {
1452065
1452065
  break;
1452066
1452066
  }
1452067
1452067
  default: {
1452068
- this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp11) ? toAsciiLower(cp11) : cp11);
1452068
+ this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp10) ? toAsciiLower(cp10) : cp10);
1452069
1452069
  }
1452070
1452070
  }
1452071
1452071
  }
1452072
1452072
  // After attribute name state
1452073
1452073
  //------------------------------------------------------------------
1452074
- _stateAfterAttributeName(cp11) {
1452075
- switch (cp11) {
1452074
+ _stateAfterAttributeName(cp10) {
1452075
+ switch (cp10) {
1452076
1452076
  case CODE_POINTS.SPACE:
1452077
1452077
  case CODE_POINTS.LINE_FEED:
1452078
1452078
  case CODE_POINTS.TABULATION:
@@ -1452100,14 +1452100,14 @@ var Tokenizer = class {
1452100
1452100
  default: {
1452101
1452101
  this._createAttr("");
1452102
1452102
  this.state = State2.ATTRIBUTE_NAME;
1452103
- this._stateAttributeName(cp11);
1452103
+ this._stateAttributeName(cp10);
1452104
1452104
  }
1452105
1452105
  }
1452106
1452106
  }
1452107
1452107
  // Before attribute value state
1452108
1452108
  //------------------------------------------------------------------
1452109
- _stateBeforeAttributeValue(cp11) {
1452110
- switch (cp11) {
1452109
+ _stateBeforeAttributeValue(cp10) {
1452110
+ switch (cp10) {
1452111
1452111
  case CODE_POINTS.SPACE:
1452112
1452112
  case CODE_POINTS.LINE_FEED:
1452113
1452113
  case CODE_POINTS.TABULATION:
@@ -1452130,14 +1452130,14 @@ var Tokenizer = class {
1452130
1452130
  }
1452131
1452131
  default: {
1452132
1452132
  this.state = State2.ATTRIBUTE_VALUE_UNQUOTED;
1452133
- this._stateAttributeValueUnquoted(cp11);
1452133
+ this._stateAttributeValueUnquoted(cp10);
1452134
1452134
  }
1452135
1452135
  }
1452136
1452136
  }
1452137
1452137
  // Attribute value (double-quoted) state
1452138
1452138
  //------------------------------------------------------------------
1452139
- _stateAttributeValueDoubleQuoted(cp11) {
1452140
- switch (cp11) {
1452139
+ _stateAttributeValueDoubleQuoted(cp10) {
1452140
+ switch (cp10) {
1452141
1452141
  case CODE_POINTS.QUOTATION_MARK: {
1452142
1452142
  this.state = State2.AFTER_ATTRIBUTE_VALUE_QUOTED;
1452143
1452143
  break;
@@ -1452157,14 +1452157,14 @@ var Tokenizer = class {
1452157
1452157
  break;
1452158
1452158
  }
1452159
1452159
  default: {
1452160
- this.currentAttr.value += String.fromCodePoint(cp11);
1452160
+ this.currentAttr.value += String.fromCodePoint(cp10);
1452161
1452161
  }
1452162
1452162
  }
1452163
1452163
  }
1452164
1452164
  // Attribute value (single-quoted) state
1452165
1452165
  //------------------------------------------------------------------
1452166
- _stateAttributeValueSingleQuoted(cp11) {
1452167
- switch (cp11) {
1452166
+ _stateAttributeValueSingleQuoted(cp10) {
1452167
+ switch (cp10) {
1452168
1452168
  case CODE_POINTS.APOSTROPHE: {
1452169
1452169
  this.state = State2.AFTER_ATTRIBUTE_VALUE_QUOTED;
1452170
1452170
  break;
@@ -1452184,14 +1452184,14 @@ var Tokenizer = class {
1452184
1452184
  break;
1452185
1452185
  }
1452186
1452186
  default: {
1452187
- this.currentAttr.value += String.fromCodePoint(cp11);
1452187
+ this.currentAttr.value += String.fromCodePoint(cp10);
1452188
1452188
  }
1452189
1452189
  }
1452190
1452190
  }
1452191
1452191
  // Attribute value (unquoted) state
1452192
1452192
  //------------------------------------------------------------------
1452193
- _stateAttributeValueUnquoted(cp11) {
1452194
- switch (cp11) {
1452193
+ _stateAttributeValueUnquoted(cp10) {
1452194
+ switch (cp10) {
1452195
1452195
  case CODE_POINTS.SPACE:
1452196
1452196
  case CODE_POINTS.LINE_FEED:
1452197
1452197
  case CODE_POINTS.TABULATION:
@@ -1452221,7 +1452221,7 @@ var Tokenizer = class {
1452221
1452221
  case CODE_POINTS.EQUALS_SIGN:
1452222
1452222
  case CODE_POINTS.GRAVE_ACCENT: {
1452223
1452223
  this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
1452224
- this.currentAttr.value += String.fromCodePoint(cp11);
1452224
+ this.currentAttr.value += String.fromCodePoint(cp10);
1452225
1452225
  break;
1452226
1452226
  }
1452227
1452227
  case CODE_POINTS.EOF: {
@@ -1452230,14 +1452230,14 @@ var Tokenizer = class {
1452230
1452230
  break;
1452231
1452231
  }
1452232
1452232
  default: {
1452233
- this.currentAttr.value += String.fromCodePoint(cp11);
1452233
+ this.currentAttr.value += String.fromCodePoint(cp10);
1452234
1452234
  }
1452235
1452235
  }
1452236
1452236
  }
1452237
1452237
  // After attribute value (quoted) state
1452238
1452238
  //------------------------------------------------------------------
1452239
- _stateAfterAttributeValueQuoted(cp11) {
1452240
- switch (cp11) {
1452239
+ _stateAfterAttributeValueQuoted(cp10) {
1452240
+ switch (cp10) {
1452241
1452241
  case CODE_POINTS.SPACE:
1452242
1452242
  case CODE_POINTS.LINE_FEED:
1452243
1452243
  case CODE_POINTS.TABULATION:
@@ -1452265,14 +1452265,14 @@ var Tokenizer = class {
1452265
1452265
  default: {
1452266
1452266
  this._err(ERR.missingWhitespaceBetweenAttributes);
1452267
1452267
  this.state = State2.BEFORE_ATTRIBUTE_NAME;
1452268
- this._stateBeforeAttributeName(cp11);
1452268
+ this._stateBeforeAttributeName(cp10);
1452269
1452269
  }
1452270
1452270
  }
1452271
1452271
  }
1452272
1452272
  // Self-closing start tag state
1452273
1452273
  //------------------------------------------------------------------
1452274
- _stateSelfClosingStartTag(cp11) {
1452275
- switch (cp11) {
1452274
+ _stateSelfClosingStartTag(cp10) {
1452275
+ switch (cp10) {
1452276
1452276
  case CODE_POINTS.GREATER_THAN_SIGN: {
1452277
1452277
  const token = this.currentToken;
1452278
1452278
  token.selfClosing = true;
@@ -1452288,15 +1452288,15 @@ var Tokenizer = class {
1452288
1452288
  default: {
1452289
1452289
  this._err(ERR.unexpectedSolidusInTag);
1452290
1452290
  this.state = State2.BEFORE_ATTRIBUTE_NAME;
1452291
- this._stateBeforeAttributeName(cp11);
1452291
+ this._stateBeforeAttributeName(cp10);
1452292
1452292
  }
1452293
1452293
  }
1452294
1452294
  }
1452295
1452295
  // Bogus comment state
1452296
1452296
  //------------------------------------------------------------------
1452297
- _stateBogusComment(cp11) {
1452297
+ _stateBogusComment(cp10) {
1452298
1452298
  const token = this.currentToken;
1452299
- switch (cp11) {
1452299
+ switch (cp10) {
1452300
1452300
  case CODE_POINTS.GREATER_THAN_SIGN: {
1452301
1452301
  this.state = State2.DATA;
1452302
1452302
  this.emitCurrentComment(token);
@@ -1452313,13 +1452313,13 @@ var Tokenizer = class {
1452313
1452313
  break;
1452314
1452314
  }
1452315
1452315
  default: {
1452316
- token.data += String.fromCodePoint(cp11);
1452316
+ token.data += String.fromCodePoint(cp10);
1452317
1452317
  }
1452318
1452318
  }
1452319
1452319
  }
1452320
1452320
  // Markup declaration open state
1452321
1452321
  //------------------------------------------------------------------
1452322
- _stateMarkupDeclarationOpen(cp11) {
1452322
+ _stateMarkupDeclarationOpen(cp10) {
1452323
1452323
  if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {
1452324
1452324
  this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);
1452325
1452325
  this.state = State2.COMMENT_START;
@@ -1452339,13 +1452339,13 @@ var Tokenizer = class {
1452339
1452339
  this._err(ERR.incorrectlyOpenedComment);
1452340
1452340
  this._createCommentToken(2);
1452341
1452341
  this.state = State2.BOGUS_COMMENT;
1452342
- this._stateBogusComment(cp11);
1452342
+ this._stateBogusComment(cp10);
1452343
1452343
  }
1452344
1452344
  }
1452345
1452345
  // Comment start state
1452346
1452346
  //------------------------------------------------------------------
1452347
- _stateCommentStart(cp11) {
1452348
- switch (cp11) {
1452347
+ _stateCommentStart(cp10) {
1452348
+ switch (cp10) {
1452349
1452349
  case CODE_POINTS.HYPHEN_MINUS: {
1452350
1452350
  this.state = State2.COMMENT_START_DASH;
1452351
1452351
  break;
@@ -1452359,15 +1452359,15 @@ var Tokenizer = class {
1452359
1452359
  }
1452360
1452360
  default: {
1452361
1452361
  this.state = State2.COMMENT;
1452362
- this._stateComment(cp11);
1452362
+ this._stateComment(cp10);
1452363
1452363
  }
1452364
1452364
  }
1452365
1452365
  }
1452366
1452366
  // Comment start dash state
1452367
1452367
  //------------------------------------------------------------------
1452368
- _stateCommentStartDash(cp11) {
1452368
+ _stateCommentStartDash(cp10) {
1452369
1452369
  const token = this.currentToken;
1452370
- switch (cp11) {
1452370
+ switch (cp10) {
1452371
1452371
  case CODE_POINTS.HYPHEN_MINUS: {
1452372
1452372
  this.state = State2.COMMENT_END;
1452373
1452373
  break;
@@ -1452387,15 +1452387,15 @@ var Tokenizer = class {
1452387
1452387
  default: {
1452388
1452388
  token.data += "-";
1452389
1452389
  this.state = State2.COMMENT;
1452390
- this._stateComment(cp11);
1452390
+ this._stateComment(cp10);
1452391
1452391
  }
1452392
1452392
  }
1452393
1452393
  }
1452394
1452394
  // Comment state
1452395
1452395
  //------------------------------------------------------------------
1452396
- _stateComment(cp11) {
1452396
+ _stateComment(cp10) {
1452397
1452397
  const token = this.currentToken;
1452398
- switch (cp11) {
1452398
+ switch (cp10) {
1452399
1452399
  case CODE_POINTS.HYPHEN_MINUS: {
1452400
1452400
  this.state = State2.COMMENT_END_DASH;
1452401
1452401
  break;
@@ -1452417,15 +1452417,15 @@ var Tokenizer = class {
1452417
1452417
  break;
1452418
1452418
  }
1452419
1452419
  default: {
1452420
- token.data += String.fromCodePoint(cp11);
1452420
+ token.data += String.fromCodePoint(cp10);
1452421
1452421
  }
1452422
1452422
  }
1452423
1452423
  }
1452424
1452424
  // Comment less-than sign state
1452425
1452425
  //------------------------------------------------------------------
1452426
- _stateCommentLessThanSign(cp11) {
1452426
+ _stateCommentLessThanSign(cp10) {
1452427
1452427
  const token = this.currentToken;
1452428
- switch (cp11) {
1452428
+ switch (cp10) {
1452429
1452429
  case CODE_POINTS.EXCLAMATION_MARK: {
1452430
1452430
  token.data += "!";
1452431
1452431
  this.state = State2.COMMENT_LESS_THAN_SIGN_BANG;
@@ -1452437,44 +1452437,44 @@ var Tokenizer = class {
1452437
1452437
  }
1452438
1452438
  default: {
1452439
1452439
  this.state = State2.COMMENT;
1452440
- this._stateComment(cp11);
1452440
+ this._stateComment(cp10);
1452441
1452441
  }
1452442
1452442
  }
1452443
1452443
  }
1452444
1452444
  // Comment less-than sign bang state
1452445
1452445
  //------------------------------------------------------------------
1452446
- _stateCommentLessThanSignBang(cp11) {
1452447
- if (cp11 === CODE_POINTS.HYPHEN_MINUS) {
1452446
+ _stateCommentLessThanSignBang(cp10) {
1452447
+ if (cp10 === CODE_POINTS.HYPHEN_MINUS) {
1452448
1452448
  this.state = State2.COMMENT_LESS_THAN_SIGN_BANG_DASH;
1452449
1452449
  } else {
1452450
1452450
  this.state = State2.COMMENT;
1452451
- this._stateComment(cp11);
1452451
+ this._stateComment(cp10);
1452452
1452452
  }
1452453
1452453
  }
1452454
1452454
  // Comment less-than sign bang dash state
1452455
1452455
  //------------------------------------------------------------------
1452456
- _stateCommentLessThanSignBangDash(cp11) {
1452457
- if (cp11 === CODE_POINTS.HYPHEN_MINUS) {
1452456
+ _stateCommentLessThanSignBangDash(cp10) {
1452457
+ if (cp10 === CODE_POINTS.HYPHEN_MINUS) {
1452458
1452458
  this.state = State2.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;
1452459
1452459
  } else {
1452460
1452460
  this.state = State2.COMMENT_END_DASH;
1452461
- this._stateCommentEndDash(cp11);
1452461
+ this._stateCommentEndDash(cp10);
1452462
1452462
  }
1452463
1452463
  }
1452464
1452464
  // Comment less-than sign bang dash dash state
1452465
1452465
  //------------------------------------------------------------------
1452466
- _stateCommentLessThanSignBangDashDash(cp11) {
1452467
- if (cp11 !== CODE_POINTS.GREATER_THAN_SIGN && cp11 !== CODE_POINTS.EOF) {
1452466
+ _stateCommentLessThanSignBangDashDash(cp10) {
1452467
+ if (cp10 !== CODE_POINTS.GREATER_THAN_SIGN && cp10 !== CODE_POINTS.EOF) {
1452468
1452468
  this._err(ERR.nestedComment);
1452469
1452469
  }
1452470
1452470
  this.state = State2.COMMENT_END;
1452471
- this._stateCommentEnd(cp11);
1452471
+ this._stateCommentEnd(cp10);
1452472
1452472
  }
1452473
1452473
  // Comment end dash state
1452474
1452474
  //------------------------------------------------------------------
1452475
- _stateCommentEndDash(cp11) {
1452475
+ _stateCommentEndDash(cp10) {
1452476
1452476
  const token = this.currentToken;
1452477
- switch (cp11) {
1452477
+ switch (cp10) {
1452478
1452478
  case CODE_POINTS.HYPHEN_MINUS: {
1452479
1452479
  this.state = State2.COMMENT_END;
1452480
1452480
  break;
@@ -1452488,15 +1452488,15 @@ var Tokenizer = class {
1452488
1452488
  default: {
1452489
1452489
  token.data += "-";
1452490
1452490
  this.state = State2.COMMENT;
1452491
- this._stateComment(cp11);
1452491
+ this._stateComment(cp10);
1452492
1452492
  }
1452493
1452493
  }
1452494
1452494
  }
1452495
1452495
  // Comment end state
1452496
1452496
  //------------------------------------------------------------------
1452497
- _stateCommentEnd(cp11) {
1452497
+ _stateCommentEnd(cp10) {
1452498
1452498
  const token = this.currentToken;
1452499
- switch (cp11) {
1452499
+ switch (cp10) {
1452500
1452500
  case CODE_POINTS.GREATER_THAN_SIGN: {
1452501
1452501
  this.state = State2.DATA;
1452502
1452502
  this.emitCurrentComment(token);
@@ -1452519,15 +1452519,15 @@ var Tokenizer = class {
1452519
1452519
  default: {
1452520
1452520
  token.data += "--";
1452521
1452521
  this.state = State2.COMMENT;
1452522
- this._stateComment(cp11);
1452522
+ this._stateComment(cp10);
1452523
1452523
  }
1452524
1452524
  }
1452525
1452525
  }
1452526
1452526
  // Comment end bang state
1452527
1452527
  //------------------------------------------------------------------
1452528
- _stateCommentEndBang(cp11) {
1452528
+ _stateCommentEndBang(cp10) {
1452529
1452529
  const token = this.currentToken;
1452530
- switch (cp11) {
1452530
+ switch (cp10) {
1452531
1452531
  case CODE_POINTS.HYPHEN_MINUS: {
1452532
1452532
  token.data += "--!";
1452533
1452533
  this.state = State2.COMMENT_END_DASH;
@@ -1452548,14 +1452548,14 @@ var Tokenizer = class {
1452548
1452548
  default: {
1452549
1452549
  token.data += "--!";
1452550
1452550
  this.state = State2.COMMENT;
1452551
- this._stateComment(cp11);
1452551
+ this._stateComment(cp10);
1452552
1452552
  }
1452553
1452553
  }
1452554
1452554
  }
1452555
1452555
  // DOCTYPE state
1452556
1452556
  //------------------------------------------------------------------
1452557
- _stateDoctype(cp11) {
1452558
- switch (cp11) {
1452557
+ _stateDoctype(cp10) {
1452558
+ switch (cp10) {
1452559
1452559
  case CODE_POINTS.SPACE:
1452560
1452560
  case CODE_POINTS.LINE_FEED:
1452561
1452561
  case CODE_POINTS.TABULATION:
@@ -1452565,7 +1452565,7 @@ var Tokenizer = class {
1452565
1452565
  }
1452566
1452566
  case CODE_POINTS.GREATER_THAN_SIGN: {
1452567
1452567
  this.state = State2.BEFORE_DOCTYPE_NAME;
1452568
- this._stateBeforeDoctypeName(cp11);
1452568
+ this._stateBeforeDoctypeName(cp10);
1452569
1452569
  break;
1452570
1452570
  }
1452571
1452571
  case CODE_POINTS.EOF: {
@@ -1452580,18 +1452580,18 @@ var Tokenizer = class {
1452580
1452580
  default: {
1452581
1452581
  this._err(ERR.missingWhitespaceBeforeDoctypeName);
1452582
1452582
  this.state = State2.BEFORE_DOCTYPE_NAME;
1452583
- this._stateBeforeDoctypeName(cp11);
1452583
+ this._stateBeforeDoctypeName(cp10);
1452584
1452584
  }
1452585
1452585
  }
1452586
1452586
  }
1452587
1452587
  // Before DOCTYPE name state
1452588
1452588
  //------------------------------------------------------------------
1452589
- _stateBeforeDoctypeName(cp11) {
1452590
- if (isAsciiUpper(cp11)) {
1452591
- this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp11)));
1452589
+ _stateBeforeDoctypeName(cp10) {
1452590
+ if (isAsciiUpper(cp10)) {
1452591
+ this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp10)));
1452592
1452592
  this.state = State2.DOCTYPE_NAME;
1452593
1452593
  } else
1452594
- switch (cp11) {
1452594
+ switch (cp10) {
1452595
1452595
  case CODE_POINTS.SPACE:
1452596
1452596
  case CODE_POINTS.LINE_FEED:
1452597
1452597
  case CODE_POINTS.TABULATION:
@@ -1452623,16 +1452623,16 @@ var Tokenizer = class {
1452623
1452623
  break;
1452624
1452624
  }
1452625
1452625
  default: {
1452626
- this._createDoctypeToken(String.fromCodePoint(cp11));
1452626
+ this._createDoctypeToken(String.fromCodePoint(cp10));
1452627
1452627
  this.state = State2.DOCTYPE_NAME;
1452628
1452628
  }
1452629
1452629
  }
1452630
1452630
  }
1452631
1452631
  // DOCTYPE name state
1452632
1452632
  //------------------------------------------------------------------
1452633
- _stateDoctypeName(cp11) {
1452633
+ _stateDoctypeName(cp10) {
1452634
1452634
  const token = this.currentToken;
1452635
- switch (cp11) {
1452635
+ switch (cp10) {
1452636
1452636
  case CODE_POINTS.SPACE:
1452637
1452637
  case CODE_POINTS.LINE_FEED:
1452638
1452638
  case CODE_POINTS.TABULATION:
@@ -1452658,15 +1452658,15 @@ var Tokenizer = class {
1452658
1452658
  break;
1452659
1452659
  }
1452660
1452660
  default: {
1452661
- token.name += String.fromCodePoint(isAsciiUpper(cp11) ? toAsciiLower(cp11) : cp11);
1452661
+ token.name += String.fromCodePoint(isAsciiUpper(cp10) ? toAsciiLower(cp10) : cp10);
1452662
1452662
  }
1452663
1452663
  }
1452664
1452664
  }
1452665
1452665
  // After DOCTYPE name state
1452666
1452666
  //------------------------------------------------------------------
1452667
- _stateAfterDoctypeName(cp11) {
1452667
+ _stateAfterDoctypeName(cp10) {
1452668
1452668
  const token = this.currentToken;
1452669
- switch (cp11) {
1452669
+ switch (cp10) {
1452670
1452670
  case CODE_POINTS.SPACE:
1452671
1452671
  case CODE_POINTS.LINE_FEED:
1452672
1452672
  case CODE_POINTS.TABULATION:
@@ -1452694,16 +1452694,16 @@ var Tokenizer = class {
1452694
1452694
  this._err(ERR.invalidCharacterSequenceAfterDoctypeName);
1452695
1452695
  token.forceQuirks = true;
1452696
1452696
  this.state = State2.BOGUS_DOCTYPE;
1452697
- this._stateBogusDoctype(cp11);
1452697
+ this._stateBogusDoctype(cp10);
1452698
1452698
  }
1452699
1452699
  }
1452700
1452700
  }
1452701
1452701
  }
1452702
1452702
  // After DOCTYPE public keyword state
1452703
1452703
  //------------------------------------------------------------------
1452704
- _stateAfterDoctypePublicKeyword(cp11) {
1452704
+ _stateAfterDoctypePublicKeyword(cp10) {
1452705
1452705
  const token = this.currentToken;
1452706
- switch (cp11) {
1452706
+ switch (cp10) {
1452707
1452707
  case CODE_POINTS.SPACE:
1452708
1452708
  case CODE_POINTS.LINE_FEED:
1452709
1452709
  case CODE_POINTS.TABULATION:
@@ -1452741,15 +1452741,15 @@ var Tokenizer = class {
1452741
1452741
  this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
1452742
1452742
  token.forceQuirks = true;
1452743
1452743
  this.state = State2.BOGUS_DOCTYPE;
1452744
- this._stateBogusDoctype(cp11);
1452744
+ this._stateBogusDoctype(cp10);
1452745
1452745
  }
1452746
1452746
  }
1452747
1452747
  }
1452748
1452748
  // Before DOCTYPE public identifier state
1452749
1452749
  //------------------------------------------------------------------
1452750
- _stateBeforeDoctypePublicIdentifier(cp11) {
1452750
+ _stateBeforeDoctypePublicIdentifier(cp10) {
1452751
1452751
  const token = this.currentToken;
1452752
- switch (cp11) {
1452752
+ switch (cp10) {
1452753
1452753
  case CODE_POINTS.SPACE:
1452754
1452754
  case CODE_POINTS.LINE_FEED:
1452755
1452755
  case CODE_POINTS.TABULATION:
@@ -1452784,15 +1452784,15 @@ var Tokenizer = class {
1452784
1452784
  this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
1452785
1452785
  token.forceQuirks = true;
1452786
1452786
  this.state = State2.BOGUS_DOCTYPE;
1452787
- this._stateBogusDoctype(cp11);
1452787
+ this._stateBogusDoctype(cp10);
1452788
1452788
  }
1452789
1452789
  }
1452790
1452790
  }
1452791
1452791
  // DOCTYPE public identifier (double-quoted) state
1452792
1452792
  //------------------------------------------------------------------
1452793
- _stateDoctypePublicIdentifierDoubleQuoted(cp11) {
1452793
+ _stateDoctypePublicIdentifierDoubleQuoted(cp10) {
1452794
1452794
  const token = this.currentToken;
1452795
- switch (cp11) {
1452795
+ switch (cp10) {
1452796
1452796
  case CODE_POINTS.QUOTATION_MARK: {
1452797
1452797
  this.state = State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
1452798
1452798
  break;
@@ -1452817,15 +1452817,15 @@ var Tokenizer = class {
1452817
1452817
  break;
1452818
1452818
  }
1452819
1452819
  default: {
1452820
- token.publicId += String.fromCodePoint(cp11);
1452820
+ token.publicId += String.fromCodePoint(cp10);
1452821
1452821
  }
1452822
1452822
  }
1452823
1452823
  }
1452824
1452824
  // DOCTYPE public identifier (single-quoted) state
1452825
1452825
  //------------------------------------------------------------------
1452826
- _stateDoctypePublicIdentifierSingleQuoted(cp11) {
1452826
+ _stateDoctypePublicIdentifierSingleQuoted(cp10) {
1452827
1452827
  const token = this.currentToken;
1452828
- switch (cp11) {
1452828
+ switch (cp10) {
1452829
1452829
  case CODE_POINTS.APOSTROPHE: {
1452830
1452830
  this.state = State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
1452831
1452831
  break;
@@ -1452850,15 +1452850,15 @@ var Tokenizer = class {
1452850
1452850
  break;
1452851
1452851
  }
1452852
1452852
  default: {
1452853
- token.publicId += String.fromCodePoint(cp11);
1452853
+ token.publicId += String.fromCodePoint(cp10);
1452854
1452854
  }
1452855
1452855
  }
1452856
1452856
  }
1452857
1452857
  // After DOCTYPE public identifier state
1452858
1452858
  //------------------------------------------------------------------
1452859
- _stateAfterDoctypePublicIdentifier(cp11) {
1452859
+ _stateAfterDoctypePublicIdentifier(cp10) {
1452860
1452860
  const token = this.currentToken;
1452861
- switch (cp11) {
1452861
+ switch (cp10) {
1452862
1452862
  case CODE_POINTS.SPACE:
1452863
1452863
  case CODE_POINTS.LINE_FEED:
1452864
1452864
  case CODE_POINTS.TABULATION:
@@ -1452894,15 +1452894,15 @@ var Tokenizer = class {
1452894
1452894
  this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
1452895
1452895
  token.forceQuirks = true;
1452896
1452896
  this.state = State2.BOGUS_DOCTYPE;
1452897
- this._stateBogusDoctype(cp11);
1452897
+ this._stateBogusDoctype(cp10);
1452898
1452898
  }
1452899
1452899
  }
1452900
1452900
  }
1452901
1452901
  // Between DOCTYPE public and system identifiers state
1452902
1452902
  //------------------------------------------------------------------
1452903
- _stateBetweenDoctypePublicAndSystemIdentifiers(cp11) {
1452903
+ _stateBetweenDoctypePublicAndSystemIdentifiers(cp10) {
1452904
1452904
  const token = this.currentToken;
1452905
- switch (cp11) {
1452905
+ switch (cp10) {
1452906
1452906
  case CODE_POINTS.SPACE:
1452907
1452907
  case CODE_POINTS.LINE_FEED:
1452908
1452908
  case CODE_POINTS.TABULATION:
@@ -1452935,15 +1452935,15 @@ var Tokenizer = class {
1452935
1452935
  this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
1452936
1452936
  token.forceQuirks = true;
1452937
1452937
  this.state = State2.BOGUS_DOCTYPE;
1452938
- this._stateBogusDoctype(cp11);
1452938
+ this._stateBogusDoctype(cp10);
1452939
1452939
  }
1452940
1452940
  }
1452941
1452941
  }
1452942
1452942
  // After DOCTYPE system keyword state
1452943
1452943
  //------------------------------------------------------------------
1452944
- _stateAfterDoctypeSystemKeyword(cp11) {
1452944
+ _stateAfterDoctypeSystemKeyword(cp10) {
1452945
1452945
  const token = this.currentToken;
1452946
- switch (cp11) {
1452946
+ switch (cp10) {
1452947
1452947
  case CODE_POINTS.SPACE:
1452948
1452948
  case CODE_POINTS.LINE_FEED:
1452949
1452949
  case CODE_POINTS.TABULATION:
@@ -1452981,15 +1452981,15 @@ var Tokenizer = class {
1452981
1452981
  this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
1452982
1452982
  token.forceQuirks = true;
1452983
1452983
  this.state = State2.BOGUS_DOCTYPE;
1452984
- this._stateBogusDoctype(cp11);
1452984
+ this._stateBogusDoctype(cp10);
1452985
1452985
  }
1452986
1452986
  }
1452987
1452987
  }
1452988
1452988
  // Before DOCTYPE system identifier state
1452989
1452989
  //------------------------------------------------------------------
1452990
- _stateBeforeDoctypeSystemIdentifier(cp11) {
1452990
+ _stateBeforeDoctypeSystemIdentifier(cp10) {
1452991
1452991
  const token = this.currentToken;
1452992
- switch (cp11) {
1452992
+ switch (cp10) {
1452993
1452993
  case CODE_POINTS.SPACE:
1452994
1452994
  case CODE_POINTS.LINE_FEED:
1452995
1452995
  case CODE_POINTS.TABULATION:
@@ -1453024,15 +1453024,15 @@ var Tokenizer = class {
1453024
1453024
  this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
1453025
1453025
  token.forceQuirks = true;
1453026
1453026
  this.state = State2.BOGUS_DOCTYPE;
1453027
- this._stateBogusDoctype(cp11);
1453027
+ this._stateBogusDoctype(cp10);
1453028
1453028
  }
1453029
1453029
  }
1453030
1453030
  }
1453031
1453031
  // DOCTYPE system identifier (double-quoted) state
1453032
1453032
  //------------------------------------------------------------------
1453033
- _stateDoctypeSystemIdentifierDoubleQuoted(cp11) {
1453033
+ _stateDoctypeSystemIdentifierDoubleQuoted(cp10) {
1453034
1453034
  const token = this.currentToken;
1453035
- switch (cp11) {
1453035
+ switch (cp10) {
1453036
1453036
  case CODE_POINTS.QUOTATION_MARK: {
1453037
1453037
  this.state = State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
1453038
1453038
  break;
@@ -1453057,15 +1453057,15 @@ var Tokenizer = class {
1453057
1453057
  break;
1453058
1453058
  }
1453059
1453059
  default: {
1453060
- token.systemId += String.fromCodePoint(cp11);
1453060
+ token.systemId += String.fromCodePoint(cp10);
1453061
1453061
  }
1453062
1453062
  }
1453063
1453063
  }
1453064
1453064
  // DOCTYPE system identifier (single-quoted) state
1453065
1453065
  //------------------------------------------------------------------
1453066
- _stateDoctypeSystemIdentifierSingleQuoted(cp11) {
1453066
+ _stateDoctypeSystemIdentifierSingleQuoted(cp10) {
1453067
1453067
  const token = this.currentToken;
1453068
- switch (cp11) {
1453068
+ switch (cp10) {
1453069
1453069
  case CODE_POINTS.APOSTROPHE: {
1453070
1453070
  this.state = State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
1453071
1453071
  break;
@@ -1453090,15 +1453090,15 @@ var Tokenizer = class {
1453090
1453090
  break;
1453091
1453091
  }
1453092
1453092
  default: {
1453093
- token.systemId += String.fromCodePoint(cp11);
1453093
+ token.systemId += String.fromCodePoint(cp10);
1453094
1453094
  }
1453095
1453095
  }
1453096
1453096
  }
1453097
1453097
  // After DOCTYPE system identifier state
1453098
1453098
  //------------------------------------------------------------------
1453099
- _stateAfterDoctypeSystemIdentifier(cp11) {
1453099
+ _stateAfterDoctypeSystemIdentifier(cp10) {
1453100
1453100
  const token = this.currentToken;
1453101
- switch (cp11) {
1453101
+ switch (cp10) {
1453102
1453102
  case CODE_POINTS.SPACE:
1453103
1453103
  case CODE_POINTS.LINE_FEED:
1453104
1453104
  case CODE_POINTS.TABULATION:
@@ -1453120,15 +1453120,15 @@ var Tokenizer = class {
1453120
1453120
  default: {
1453121
1453121
  this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);
1453122
1453122
  this.state = State2.BOGUS_DOCTYPE;
1453123
- this._stateBogusDoctype(cp11);
1453123
+ this._stateBogusDoctype(cp10);
1453124
1453124
  }
1453125
1453125
  }
1453126
1453126
  }
1453127
1453127
  // Bogus DOCTYPE state
1453128
1453128
  //------------------------------------------------------------------
1453129
- _stateBogusDoctype(cp11) {
1453129
+ _stateBogusDoctype(cp10) {
1453130
1453130
  const token = this.currentToken;
1453131
- switch (cp11) {
1453131
+ switch (cp10) {
1453132
1453132
  case CODE_POINTS.GREATER_THAN_SIGN: {
1453133
1453133
  this.emitCurrentDoctype(token);
1453134
1453134
  this.state = State2.DATA;
@@ -1453148,8 +1453148,8 @@ var Tokenizer = class {
1453148
1453148
  }
1453149
1453149
  // CDATA section state
1453150
1453150
  //------------------------------------------------------------------
1453151
- _stateCdataSection(cp11) {
1453152
- switch (cp11) {
1453151
+ _stateCdataSection(cp10) {
1453152
+ switch (cp10) {
1453153
1453153
  case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
1453154
1453154
  this.state = State2.CDATA_SECTION_BRACKET;
1453155
1453155
  break;
@@ -1453160,25 +1453160,25 @@ var Tokenizer = class {
1453160
1453160
  break;
1453161
1453161
  }
1453162
1453162
  default: {
1453163
- this._emitCodePoint(cp11);
1453163
+ this._emitCodePoint(cp10);
1453164
1453164
  }
1453165
1453165
  }
1453166
1453166
  }
1453167
1453167
  // CDATA section bracket state
1453168
1453168
  //------------------------------------------------------------------
1453169
- _stateCdataSectionBracket(cp11) {
1453170
- if (cp11 === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
1453169
+ _stateCdataSectionBracket(cp10) {
1453170
+ if (cp10 === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
1453171
1453171
  this.state = State2.CDATA_SECTION_END;
1453172
1453172
  } else {
1453173
1453173
  this._emitChars("]");
1453174
1453174
  this.state = State2.CDATA_SECTION;
1453175
- this._stateCdataSection(cp11);
1453175
+ this._stateCdataSection(cp10);
1453176
1453176
  }
1453177
1453177
  }
1453178
1453178
  // CDATA section end state
1453179
1453179
  //------------------------------------------------------------------
1453180
- _stateCdataSectionEnd(cp11) {
1453181
- switch (cp11) {
1453180
+ _stateCdataSectionEnd(cp10) {
1453181
+ switch (cp10) {
1453182
1453182
  case CODE_POINTS.GREATER_THAN_SIGN: {
1453183
1453183
  this.state = State2.DATA;
1453184
1453184
  break;
@@ -1453190,7 +1453190,7 @@ var Tokenizer = class {
1453190
1453190
  default: {
1453191
1453191
  this._emitChars("]]");
1453192
1453192
  this.state = State2.CDATA_SECTION;
1453193
- this._stateCdataSection(cp11);
1453193
+ this._stateCdataSection(cp10);
1453194
1453194
  }
1453195
1453195
  }
1453196
1453196
  }
@@ -1453219,15 +1453219,15 @@ var Tokenizer = class {
1453219
1453219
  }
1453220
1453220
  // Ambiguos ampersand state
1453221
1453221
  //------------------------------------------------------------------
1453222
- _stateAmbiguousAmpersand(cp11) {
1453223
- if (isAsciiAlphaNumeric2(cp11)) {
1453224
- this._flushCodePointConsumedAsCharacterReference(cp11);
1453222
+ _stateAmbiguousAmpersand(cp10) {
1453223
+ if (isAsciiAlphaNumeric2(cp10)) {
1453224
+ this._flushCodePointConsumedAsCharacterReference(cp10);
1453225
1453225
  } else {
1453226
- if (cp11 === CODE_POINTS.SEMICOLON) {
1453226
+ if (cp10 === CODE_POINTS.SEMICOLON) {
1453227
1453227
  this._err(ERR.unknownNamedCharacterReference);
1453228
1453228
  }
1453229
1453229
  this.state = this.returnState;
1453230
- this._callState(cp11);
1453230
+ this._callState(cp10);
1453231
1453231
  }
1453232
1453232
  }
1453233
1453233
  };
@@ -1499477,7 +1499477,7 @@ var CliContext = class {
1499477
1499477
  if (false) {
1499478
1499478
  this.logger.error("CLI_VERSION is not defined");
1499479
1499479
  }
1499480
- return "3.44.0";
1499480
+ return "3.44.1";
1499481
1499481
  }
1499482
1499482
  getCliName() {
1499483
1499483
  if (false) {
@@ -1543972,7 +1543972,7 @@ var OpenRPCConverterContext3_1 = class extends AbstractConverterContext {
1543972
1543972
  };
1543973
1543973
 
1543974
1543974
  // ../workspace/lazy-fern-workspace/lib/OSSWorkspace.js
1543975
- var import_promises49 = require("fs/promises");
1543975
+ var import_promises48 = require("fs/promises");
1543976
1543976
 
1543977
1543977
  // ../../commons/casings-generator/src/reserved.ts
1543978
1543978
  var RESERVED_KEYWORDS2 = {
@@ -1544788,60 +1544788,45 @@ function createLoggingExecutable(executable, { logger, ...loggingExecaOptions }
1544788
1544788
  }
1544789
1544789
 
1544790
1544790
  // ../workspace/lazy-fern-workspace/lib/protobuf/ProtobufIRGenerator.js
1544791
- var import_promises47 = require("fs/promises");
1544791
+ var import_promises46 = require("fs/promises");
1544792
1544792
  var import_path32 = __toESM(require("path"), 1);
1544793
1544793
  var import_tmp_promise7 = __toESM(require_tmp_promise(), 1);
1544794
1544794
 
1544795
1544795
  // ../workspace/lazy-fern-workspace/lib/protobuf/utils.js
1544796
- var import_promises46 = require("fs/promises");
1544797
1544796
  var import_tmp_promise6 = __toESM(require_tmp_promise(), 1);
1544798
1544797
  function isNetworkError(errorMessage) {
1544799
- return errorMessage.includes("server hosted at that remote is unavailable") || errorMessage.includes("failed to connect") || errorMessage.includes("network") || errorMessage.includes("ENOTFOUND") || errorMessage.includes("ETIMEDOUT") || errorMessage.includes("TIMEDOUT") || errorMessage.includes("timed out");
1544798
+ return errorMessage.includes("server hosted at that remote is unavailable") || errorMessage.includes("fetch failed") || errorMessage.includes("failed to connect") || errorMessage.includes("network") || errorMessage.includes("ENOTFOUND") || errorMessage.includes("ETIMEDOUT") || errorMessage.includes("TIMEDOUT") || errorMessage.includes("timed out") || errorMessage.includes("ECONNREFUSED") || errorMessage.includes("ECONNRESET") || errorMessage.includes("socket hang up");
1544800
1544799
  }
1544801
- async function detectAirGappedMode(absoluteFilepathToProtobufRoot, logger) {
1544802
- const bufLockPath = join2(absoluteFilepathToProtobufRoot, RelativeFilePath2.of("buf.lock"));
1544803
- let bufLockExists = false;
1544804
- try {
1544805
- await (0, import_promises46.access)(bufLockPath);
1544806
- bufLockExists = true;
1544807
- logger.debug(`Found buf.lock at: ${bufLockPath}`);
1544808
- } catch {
1544809
- logger.debug(`No buf.lock found at: ${bufLockPath}`);
1544800
+ var airGapDetectionResult;
1544801
+ var airGapDetectionPromise;
1544802
+ async function detectAirGappedMode(url2, logger, timeoutMs = 5e3) {
1544803
+ if (airGapDetectionResult !== void 0) {
1544804
+ return airGapDetectionResult;
1544810
1544805
  }
1544811
- if (!bufLockExists) {
1544812
- return false;
1544806
+ if (airGapDetectionPromise == null) {
1544807
+ airGapDetectionPromise = performAirGapDetection(url2, logger, timeoutMs);
1544813
1544808
  }
1544814
- const tmpDir = AbsoluteFilePath2.of((await import_tmp_promise6.default.dir()).path);
1544809
+ return airGapDetectionPromise;
1544810
+ }
1544811
+ async function performAirGapDetection(url2, logger, timeoutMs) {
1544812
+ logger.debug(`Detecting air-gapped mode by checking connectivity to ${url2}`);
1544815
1544813
  try {
1544816
- const bufYamlPath = join2(absoluteFilepathToProtobufRoot, RelativeFilePath2.of("buf.yaml"));
1544817
- try {
1544818
- await (0, import_promises46.cp)(bufYamlPath, join2(tmpDir, RelativeFilePath2.of("buf.yaml")));
1544819
- await (0, import_promises46.cp)(bufLockPath, join2(tmpDir, RelativeFilePath2.of("buf.lock")));
1544820
- } catch {
1544821
- return false;
1544822
- }
1544823
- try {
1544824
- await runExeca(logger, "buf", ["dep", "update"], {
1544825
- cwd: tmpDir,
1544826
- stdio: "pipe",
1544827
- timeout: 3e4
1544828
- // 30 second timeout for detection
1544829
- });
1544830
- logger.debug("Network check succeeded - not in air-gapped mode");
1544831
- return false;
1544832
- } catch (error2) {
1544833
- const errorMessage = error2 instanceof Error ? error2.message : String(error2);
1544834
- if (isNetworkError(errorMessage)) {
1544835
- logger.debug(`Network check failed - entering air-gapped mode: ${errorMessage.substring(0, 100)}`);
1544836
- return true;
1544837
- }
1544838
- return false;
1544839
- }
1544840
- } finally {
1544841
- try {
1544842
- await (0, import_promises46.rm)(tmpDir, { recursive: true, force: true });
1544843
- } catch {
1544814
+ await fetch(url2, {
1544815
+ method: "GET",
1544816
+ signal: AbortSignal.timeout(timeoutMs)
1544817
+ });
1544818
+ airGapDetectionResult = false;
1544819
+ logger.debug("Network check succeeded - not in air-gapped mode");
1544820
+ return false;
1544821
+ } catch (error2) {
1544822
+ const errorMessage = error2 instanceof Error ? error2.message : String(error2);
1544823
+ if (isNetworkError(errorMessage)) {
1544824
+ airGapDetectionResult = true;
1544825
+ logger.debug(`Network check failed - entering air-gapped mode: ${errorMessage}`);
1544826
+ return true;
1544844
1544827
  }
1544828
+ airGapDetectionResult = false;
1544829
+ return false;
1544845
1544830
  }
1544846
1544831
  }
1544847
1544832
  var PROTOBUF_GENERATOR_CONFIG_FILENAME = "buf.gen.yaml";
@@ -1544959,7 +1544944,7 @@ var ProtobufIRGenerator = class {
1544959
1544944
  this.context.logger.info(`Using buf export with version: ${version6}`);
1544960
1544945
  const tmpBufConfigFile = await import_tmp_promise7.default.file({ postfix: ".yaml" });
1544961
1544946
  const configContent = version6 === "v1" ? PROTOBUF_EXPORT_CONFIG_V1 : PROTOBUF_EXPORT_CONFIG_V2;
1544962
- await (0, import_promises47.writeFile)(tmpBufConfigFile.path, configContent, "utf8");
1544947
+ await (0, import_promises46.writeFile)(tmpBufConfigFile.path, configContent, "utf8");
1544963
1544948
  try {
1544964
1544949
  const result = await runExeca(this.context.logger, "buf", [
1544965
1544950
  "export",
@@ -1544988,7 +1544973,7 @@ var ProtobufIRGenerator = class {
1544988
1544973
  }
1544989
1544974
  }
1544990
1544975
  async copyProtobufFilesFromRoot({ protobufGeneratorConfigPath, absoluteFilepathToProtobufRoot }) {
1544991
- await (0, import_promises47.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, {
1544976
+ await (0, import_promises46.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, {
1544992
1544977
  recursive: true,
1544993
1544978
  filter: (src) => {
1544994
1544979
  const basename5 = import_path32.default.basename(src);
@@ -1544997,7 +1544982,7 @@ var ProtobufIRGenerator = class {
1544997
1544982
  });
1544998
1544983
  }
1544999
1544984
  async setupRemainingProtobufConfig({ protobufGeneratorConfigPath }) {
1545000
- await (0, import_promises47.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of("package.json")), PROTOBUF_MODULE_PACKAGE_JSON);
1544985
+ await (0, import_promises46.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of("package.json")), PROTOBUF_MODULE_PACKAGE_JSON);
1545001
1544986
  await runExeca(void 0, "npm", ["install"], {
1545002
1544987
  cwd: protobufGeneratorConfigPath,
1545003
1544988
  stdout: "ignore",
@@ -1545008,10 +1544993,10 @@ var ProtobufIRGenerator = class {
1545008
1544993
  stdout: "ignore",
1545009
1544994
  stderr: "pipe"
1545010
1544995
  });
1545011
- await (0, import_promises47.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME)), PROTOBUF_GEN_CONFIG);
1544996
+ await (0, import_promises46.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME)), PROTOBUF_GEN_CONFIG);
1545012
1544997
  const shellProxyPath = join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_SHELL_PROXY_FILENAME));
1545013
- await (0, import_promises47.writeFile)(shellProxyPath, PROTOBUF_SHELL_PROXY);
1545014
- await (0, import_promises47.chmod)(shellProxyPath, 493);
1544998
+ await (0, import_promises46.writeFile)(shellProxyPath, PROTOBUF_SHELL_PROXY);
1544999
+ await (0, import_promises46.chmod)(shellProxyPath, 493);
1545015
1545000
  }
1545016
1545001
  async doGenerateLocal({ cwd: cwd2, deps }) {
1545017
1545002
  const which = createLoggingExecutable("which", {
@@ -1545033,13 +1545018,13 @@ var ProtobufIRGenerator = class {
1545033
1545018
  stderr: "pipe"
1545034
1545019
  });
1545035
1545020
  try {
1545036
- await (0, import_promises47.writeFile)(bufYamlPath, configContent);
1545021
+ await (0, import_promises46.writeFile)(bufYamlPath, configContent);
1545037
1545022
  if (deps.length > 0) {
1545038
1545023
  if (this.isAirGapped) {
1545039
1545024
  this.context.logger.debug("Air-gapped mode: skipping buf dep update");
1545040
1545025
  const bufLockPath = join2(cwd2, RelativeFilePath2.of("buf.lock"));
1545041
1545026
  try {
1545042
- await (0, import_promises47.access)(bufLockPath);
1545027
+ await (0, import_promises46.access)(bufLockPath);
1545043
1545028
  } catch {
1545044
1545029
  this.context.failAndThrow("Air-gapped mode requires a pre-cached buf.lock file. Please run 'buf dep update' at build time to cache dependencies.");
1545045
1545030
  }
@@ -1545051,9 +1545036,9 @@ var ProtobufIRGenerator = class {
1545051
1545036
  if (bufGenerateResult.exitCode !== 0) {
1545052
1545037
  this.context.failAndThrow(bufGenerateResult.stderr);
1545053
1545038
  }
1545054
- await (0, import_promises47.unlink)(bufYamlPath);
1545039
+ await (0, import_promises46.unlink)(bufYamlPath);
1545055
1545040
  } catch (error2) {
1545056
- await (0, import_promises47.unlink)(bufYamlPath);
1545041
+ await (0, import_promises46.unlink)(bufYamlPath);
1545057
1545042
  throw error2;
1545058
1545043
  }
1545059
1545044
  return join2(cwd2, RelativeFilePath2.of(PROTOBUF_GENERATOR_OUTPUT_FILEPATH));
@@ -1545064,7 +1545049,7 @@ var ProtobufIRGenerator = class {
1545064
1545049
  };
1545065
1545050
 
1545066
1545051
  // ../workspace/lazy-fern-workspace/lib/protobuf/ProtobufOpenAPIGenerator.js
1545067
- var import_promises48 = require("fs/promises");
1545052
+ var import_promises47 = require("fs/promises");
1545068
1545053
  var import_tmp_promise8 = __toESM(require_tmp_promise(), 1);
1545069
1545054
  var PROTOBUF_GENERATOR_CONFIG_FILENAME2 = "buf.gen.yaml";
1545070
1545055
  var PROTOBUF_GENERATOR_OUTPUT_PATH2 = "output";
@@ -1545105,8 +1545090,8 @@ var ProtobufOpenAPIGenerator = class {
1545105
1545090
  }
1545106
1545091
  async setupProtobufGeneratorConfig({ absoluteFilepathToProtobufRoot, relativeFilepathToProtobufRoot }) {
1545107
1545092
  const protobufGeneratorConfigPath = AbsoluteFilePath2.of((await import_tmp_promise8.default.dir()).path);
1545108
- await (0, import_promises48.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, { recursive: true });
1545109
- await (0, import_promises48.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME2)), getProtobufGeneratorConfig({ relativeFilepathToProtobufRoot }));
1545093
+ await (0, import_promises47.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, { recursive: true });
1545094
+ await (0, import_promises47.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME2)), getProtobufGeneratorConfig({ relativeFilepathToProtobufRoot }));
1545110
1545095
  return protobufGeneratorConfigPath;
1545111
1545096
  }
1545112
1545097
  async doGenerateLocal({ cwd: cwd2, target, deps, existingBufLockContents }) {
@@ -1545137,15 +1545122,15 @@ var ProtobufOpenAPIGenerator = class {
1545137
1545122
  stderr: "pipe"
1545138
1545123
  });
1545139
1545124
  try {
1545140
- await (0, import_promises48.writeFile)(bufYamlPath, configContent);
1545125
+ await (0, import_promises47.writeFile)(bufYamlPath, configContent);
1545141
1545126
  if (existingBufLockContents != null) {
1545142
- await (0, import_promises48.writeFile)(bufLockPath, existingBufLockContents);
1545127
+ await (0, import_promises47.writeFile)(bufLockPath, existingBufLockContents);
1545143
1545128
  cleanupBufLock = true;
1545144
1545129
  } else if (deps.length > 0) {
1545145
1545130
  if (this.isAirGapped) {
1545146
1545131
  this.context.logger.debug("Air-gapped mode: skipping buf dep update");
1545147
1545132
  try {
1545148
- await (0, import_promises48.access)(bufLockPath);
1545133
+ await (0, import_promises47.access)(bufLockPath);
1545149
1545134
  } catch {
1545150
1545135
  this.context.failAndThrow("Air-gapped mode requires a pre-cached buf.lock file. Please run 'buf dep update' at build time to cache dependencies.");
1545151
1545136
  }
@@ -1545153,7 +1545138,7 @@ var ProtobufOpenAPIGenerator = class {
1545153
1545138
  await buf(["dep", "update"]);
1545154
1545139
  }
1545155
1545140
  try {
1545156
- bufLockContents = await (0, import_promises48.readFile)(bufLockPath, "utf-8");
1545141
+ bufLockContents = await (0, import_promises47.readFile)(bufLockPath, "utf-8");
1545157
1545142
  } catch {
1545158
1545143
  bufLockContents = void 0;
1545159
1545144
  }
@@ -1545163,14 +1545148,14 @@ var ProtobufOpenAPIGenerator = class {
1545163
1545148
  this.context.failAndThrow(bufGenerateResult.stderr);
1545164
1545149
  }
1545165
1545150
  if (cleanupBufLock) {
1545166
- await (0, import_promises48.unlink)(bufLockPath);
1545151
+ await (0, import_promises47.unlink)(bufLockPath);
1545167
1545152
  }
1545168
- await (0, import_promises48.unlink)(bufYamlPath);
1545153
+ await (0, import_promises47.unlink)(bufYamlPath);
1545169
1545154
  } catch (error2) {
1545170
1545155
  if (cleanupBufLock) {
1545171
- await (0, import_promises48.unlink)(bufLockPath);
1545156
+ await (0, import_promises47.unlink)(bufLockPath);
1545172
1545157
  }
1545173
- await (0, import_promises48.unlink)(bufYamlPath);
1545158
+ await (0, import_promises47.unlink)(bufYamlPath);
1545174
1545159
  throw error2;
1545175
1545160
  }
1545176
1545161
  return {
@@ -1545470,7 +1545455,7 @@ var OSSWorkspace = class _OSSWorkspace extends BaseOpenAPIWorkspace {
1545470
1545455
  local: true,
1545471
1545456
  deps: spec.dependencies
1545472
1545457
  });
1545473
- const result = await (0, import_promises49.readFile)(protobufIRFilepath, "utf-8");
1545458
+ const result = await (0, import_promises48.readFile)(protobufIRFilepath, "utf-8");
1545474
1545459
  const casingsGenerator = constructCasingsGenerator2({
1545475
1545460
  generationLanguage: "typescript",
1545476
1545461
  keywords: void 0,
@@ -1545727,7 +1545712,7 @@ function parseIssue(issue) {
1545727
1545712
  }
1545728
1545713
 
1545729
1545714
  // ../workspace/loader/lib/listFernFiles.js
1545730
- var import_promises50 = require("fs/promises");
1545715
+ var import_promises49 = require("fs/promises");
1545731
1545716
  async function listFernFiles2(root6, extensionGlob) {
1545732
1545717
  const files = [];
1545733
1545718
  for (const absoluteFilepath of await listFiles(root6, extensionGlob)) {
@@ -1545742,7 +1545727,7 @@ async function createFernFile2({ relativeFilepath, absoluteFilepath }) {
1545742
1545727
  return {
1545743
1545728
  relativeFilepath,
1545744
1545729
  absoluteFilepath,
1545745
- fileContents: (await (0, import_promises50.readFile)(absoluteFilepath)).toString()
1545730
+ fileContents: (await (0, import_promises49.readFile)(absoluteFilepath)).toString()
1545746
1545731
  };
1545747
1545732
  }
1545748
1545733
 
@@ -1545994,7 +1545979,7 @@ async function loadAPIWorkspace({ absolutePathToWorkspace, context: context2, cl
1545994
1545979
  }
1545995
1545980
 
1545996
1545981
  // ../workspace/loader/lib/loadDocsWorkspace.js
1545997
- var import_promises51 = require("fs/promises");
1545982
+ var import_promises50 = require("fs/promises");
1545998
1545983
 
1545999
1545984
  // ../workspace/loader/lib/docs-yml.schema.json
1546000
1545985
  var docs_yml_schema_exports = {};
@@ -1551155,7 +1551140,7 @@ async function loadDocsConfiguration({ absolutePathToDocsDefinition, context: co
1551155
1551140
  });
1551156
1551141
  }
1551157
1551142
  async function loadRawDocsConfiguration({ absolutePathOfConfiguration, context: context2 }) {
1551158
- const contentsStr = await (0, import_promises51.readFile)(absolutePathOfConfiguration);
1551143
+ const contentsStr = await (0, import_promises50.readFile)(absolutePathOfConfiguration);
1551159
1551144
  const contentsJson = jsYaml.load(contentsStr.toString());
1551160
1551145
  const result = validateAgainstJsonSchema(contentsJson, docs_yml_schema_exports, {
1551161
1551146
  filePath: absolutePathOfConfiguration
@@ -1551184,7 +1551169,7 @@ ${result.error?.message ?? "Unknown error"}`);
1551184
1551169
  }
1551185
1551170
 
1551186
1551171
  // ../project-loader/lib/loadProject.js
1551187
- var import_promises52 = require("fs/promises");
1551172
+ var import_promises51 = require("fs/promises");
1551188
1551173
  async function loadProject({ context: context2, nameOverride, ...args }) {
1551189
1551174
  const fernDirectory = await getFernDirectory(nameOverride);
1551190
1551175
  if (fernDirectory == null) {
@@ -1551239,7 +1551224,7 @@ async function loadApis({ cliName, fernDirectory, context: context2, cliVersion,
1551239
1551224
  const apisDirectory = join2(fernDirectory, RelativeFilePath2.of(APIS_DIRECTORY));
1551240
1551225
  const apisDirectoryExists = await doesPathExist(apisDirectory);
1551241
1551226
  if (apisDirectoryExists) {
1551242
- const apiDirectoryContents = await (0, import_promises52.readdir)(apisDirectory, { withFileTypes: true });
1551227
+ const apiDirectoryContents = await (0, import_promises51.readdir)(apisDirectory, { withFileTypes: true });
1551243
1551228
  const apiWorkspaceDirectoryNames = apiDirectoryContents.reduce((all9, item) => {
1551244
1551229
  if (item.isDirectory()) {
1551245
1551230
  all9.push(item.name);
@@ -1551316,10 +1551301,10 @@ async function loadProjectAndRegisterWorkspacesWithContext(cliContext, args, reg
1551316
1551301
 
1551317
1551302
  // src/cliV2.ts
1551318
1551303
  var import_generators_sdk4 = __toESM(require_generators_sdk(), 1);
1551319
- var import_promises57 = require("fs/promises");
1551304
+ var import_promises56 = require("fs/promises");
1551320
1551305
 
1551321
1551306
  // src/commands/generator-list/getGeneratorList.ts
1551322
- var import_promises53 = require("fs/promises");
1551307
+ var import_promises52 = require("fs/promises");
1551323
1551308
  var GenerationModeFilter = {
1551324
1551309
  GitHub: "github",
1551325
1551310
  Local: "local-file-system",
@@ -1551379,7 +1551364,7 @@ async function getGeneratorList({
1551379
1551364
  return;
1551380
1551365
  }
1551381
1551366
  try {
1551382
- await (0, import_promises53.writeFile)(outputLocation, generatorsListYaml);
1551367
+ await (0, import_promises52.writeFile)(outputLocation, generatorsListYaml);
1551383
1551368
  } catch (error2) {
1551384
1551369
  cliContext.failAndThrow(`Could not write file to the specified location: ${outputLocation}`, error2);
1551385
1551370
  }
@@ -1551445,7 +1551430,7 @@ async function getGeneratorMetadata({
1551445
1551430
  }
1551446
1551431
 
1551447
1551432
  // src/commands/organization/getOrganization.ts
1551448
- var import_promises54 = require("fs/promises");
1551433
+ var import_promises53 = require("fs/promises");
1551449
1551434
  async function getOrganization({
1551450
1551435
  project,
1551451
1551436
  outputLocation,
@@ -1551457,20 +1551442,20 @@ async function getOrganization({
1551457
1551442
  return;
1551458
1551443
  }
1551459
1551444
  try {
1551460
- await (0, import_promises54.writeFile)(outputLocation, org);
1551445
+ await (0, import_promises53.writeFile)(outputLocation, org);
1551461
1551446
  } catch (error2) {
1551462
1551447
  context2.failAndThrow(`Could not write file to the specified location: ${outputLocation}`, error2);
1551463
1551448
  }
1551464
1551449
  }
1551465
1551450
 
1551466
1551451
  // src/commands/upgrade/upgradeGenerator.ts
1551467
- var import_promises56 = require("fs/promises");
1551452
+ var import_promises55 = require("fs/promises");
1551468
1551453
  var import_path34 = __toESM(require("path"), 1);
1551469
1551454
  var import_semver8 = __toESM(require_semver2(), 1);
1551470
1551455
  var import_yaml = __toESM(require_dist4(), 1);
1551471
1551456
 
1551472
1551457
  // src/commands/upgrade/migrations/loader.ts
1551473
- var import_promises55 = require("fs/promises");
1551458
+ var import_promises54 = require("fs/promises");
1551474
1551459
  var import_os4 = require("os");
1551475
1551460
  var import_path33 = require("path");
1551476
1551461
  var import_semver7 = __toESM(require_semver2(), 1);
@@ -1551481,7 +1551466,7 @@ function getMigrationCacheDir() {
1551481
1551466
  async function loadMigrationModule(params2) {
1551482
1551467
  const { generatorName, logger } = params2;
1551483
1551468
  const cacheDir = getMigrationCacheDir();
1551484
- await (0, import_promises55.mkdir)(cacheDir, { recursive: true });
1551469
+ await (0, import_promises54.mkdir)(cacheDir, { recursive: true });
1551485
1551470
  try {
1551486
1551471
  await loggingExeca(logger, "npm", [
1551487
1551472
  "install",
@@ -1551494,7 +1551479,7 @@ async function loadMigrationModule(params2) {
1551494
1551479
  ]);
1551495
1551480
  const packageDir = (0, import_path33.join)(cacheDir, "node_modules", MIGRATION_PACKAGE_NAME);
1551496
1551481
  const packageJsonPath = (0, import_path33.join)(packageDir, "package.json");
1551497
- const packageJsonContent = await (0, import_promises55.readFile)(packageJsonPath, "utf-8");
1551482
+ const packageJsonContent = await (0, import_promises54.readFile)(packageJsonPath, "utf-8");
1551498
1551483
  const packageJson2 = JSON.parse(packageJsonContent);
1551499
1551484
  if (packageJson2.main == null) {
1551500
1551485
  throw new Error(`No main field found in package.json for ${MIGRATION_PACKAGE_NAME}`);
@@ -1551645,7 +1551630,7 @@ async function loadAndUpdateGenerators({
1551645
1551630
  context2.logger.debug("Generators configuration file was not found, no generators to upgrade.");
1551646
1551631
  return { updatedConfiguration: void 0, skippedMajorUpgrades: [], appliedUpgrades: [], alreadyUpToDate: [] };
1551647
1551632
  }
1551648
- const contents = await (0, import_promises56.readFile)(filepath);
1551633
+ const contents = await (0, import_promises55.readFile)(filepath);
1551649
1551634
  context2.logger.debug(`Found generators: ${contents.toString()}`);
1551650
1551635
  const parsedDocument = import_yaml.default.parseDocument(contents.toString());
1551651
1551636
  const generatorGroups = parsedDocument.get("groups");
@@ -1551826,7 +1551811,7 @@ async function upgradeGenerator({
1551826
1551811
  absolutePathToWorkspace: workspace.absoluteFilePath
1551827
1551812
  });
1551828
1551813
  if (absolutePathToGeneratorsConfiguration != null && result.updatedConfiguration != null) {
1551829
- await (0, import_promises56.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
1551814
+ await (0, import_promises55.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
1551830
1551815
  }
1551831
1551816
  allSkippedMajorUpgrades.push(...result.skippedMajorUpgrades);
1551832
1551817
  if (result.appliedUpgrades.length > 0) {
@@ -1552180,7 +1552165,7 @@ function addGeneratorCommands(cli, cliContext) {
1552180
1552165
  }
1552181
1552166
  if (argv.output) {
1552182
1552167
  try {
1552183
- await (0, import_promises57.writeFile)(argv.output, JSON.stringify(generatorMetadata, null, 2));
1552168
+ await (0, import_promises56.writeFile)(argv.output, JSON.stringify(generatorMetadata, null, 2));
1552184
1552169
  } catch (error2) {
1552185
1552170
  cliContext.failAndThrow(
1552186
1552171
  `Could not write file to the specified location: ${argv.output}`,
@@ -1552194,7 +1552179,7 @@ function addGeneratorCommands(cli, cliContext) {
1552194
1552179
  }
1552195
1552180
 
1552196
1552181
  // src/commands/add-generator/addGeneratorToWorkspaces.ts
1552197
- var import_promises58 = require("fs/promises");
1552182
+ var import_promises57 = require("fs/promises");
1552198
1552183
  async function addGeneratorToWorkspaces({
1552199
1552184
  project: { apiWorkspaces },
1552200
1552185
  generatorName,
@@ -1552221,7 +1552206,7 @@ async function addGeneratorToWorkspaces({
1552221
1552206
  if (absolutePathToGeneratorsConfiguration == null) {
1552222
1552207
  return;
1552223
1552208
  }
1552224
- await (0, import_promises58.writeFile)(
1552209
+ await (0, import_promises57.writeFile)(
1552225
1552210
  absolutePathToGeneratorsConfiguration,
1552226
1552211
  "# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json\n" + jsYaml.dump(newConfiguration)
1552227
1552212
  );
@@ -1552232,7 +1552217,7 @@ async function addGeneratorToWorkspaces({
1552232
1552217
  }
1552233
1552218
 
1552234
1552219
  // src/commands/diff/diff.ts
1552235
- var import_promises59 = require("fs/promises");
1552220
+ var import_promises58 = require("fs/promises");
1552236
1552221
  var import_semver9 = __toESM(require_semver2(), 1);
1552237
1552222
  async function diff({
1552238
1552223
  context: context2,
@@ -1552275,7 +1552260,7 @@ async function readIr({
1552275
1552260
  context2.failWithoutThrowing(`File not found: ${absoluteFilepath}`);
1552276
1552261
  throw new FernCliError();
1552277
1552262
  }
1552278
- const ir14 = await (0, import_promises59.readFile)(absoluteFilepath, "utf-8");
1552263
+ const ir14 = await (0, import_promises58.readFile)(absoluteFilepath, "utf-8");
1552279
1552264
  const parsed = serialization_exports4.IntermediateRepresentation.parse(JSON.parse(ir14));
1552280
1552265
  if (!parsed.ok) {
1552281
1552266
  context2.failWithoutThrowing(`Invalid --${flagName}; expected a filepath containing a valid IR`);
@@ -1570028,9 +1570013,9 @@ function replaceFrontmatterImagesforLogo(data2, mapImage) {
1570028
1570013
  }
1570029
1570014
 
1570030
1570015
  // ../docs-markdown-utils/lib/replaceReferencedCode.js
1570031
- var import_promises60 = require("fs/promises");
1570016
+ var import_promises59 = require("fs/promises");
1570032
1570017
  async function defaultFileLoader(filepath) {
1570033
- const file = await (0, import_promises60.readFile)(filepath);
1570018
+ const file = await (0, import_promises59.readFile)(filepath);
1570034
1570019
  return file.toString();
1570035
1570020
  }
1570036
1570021
  function isUrl2(src) {
@@ -1570197,10 +1570182,10 @@ ${replacement}
1570197
1570182
  }
1570198
1570183
 
1570199
1570184
  // ../docs-markdown-utils/lib/replaceReferencedMarkdown.js
1570200
- var import_promises61 = require("fs/promises");
1570185
+ var import_promises60 = require("fs/promises");
1570201
1570186
  var import_gray_matter5 = __toESM(require_gray_matter(), 1);
1570202
1570187
  async function defaultMarkdownLoader(filepath) {
1570203
- const { content: content5 } = (0, import_gray_matter5.default)(await (0, import_promises61.readFile)(filepath));
1570188
+ const { content: content5 } = (0, import_gray_matter5.default)(await (0, import_promises60.readFile)(filepath));
1570204
1570189
  return content5;
1570205
1570190
  }
1570206
1570191
  function extractAttributes(markdownTag) {
@@ -1577951,7 +1577936,7 @@ function computeServiceTypeReferenceInfo(irGraph) {
1577951
1577936
  // ../docs-resolver/lib/DocsDefinitionResolver.js
1577952
1577937
  var import_dayjs3 = __toESM(require_dayjs_min(), 1);
1577953
1577938
  var import_utc3 = __toESM(require_utc(), 1);
1577954
- var import_promises65 = require("fs/promises");
1577939
+ var import_promises64 = require("fs/promises");
1577955
1577940
  var import_gray_matter6 = __toESM(require_gray_matter(), 1);
1577956
1577941
 
1577957
1577942
  // ../../../node_modules/.pnpm/@fern-api+ui-core-utils@0.129.4-b6c699ad2/node_modules/@fern-api/ui-core-utils/dist/assertNever.js
@@ -1579676,10 +1579661,10 @@ var HeapAsync = (
1579676
1579661
  };
1579677
1579662
  HeapAsync2.prototype._applyLimit = function() {
1579678
1579663
  if (this._limit && this._limit < this.heapArray.length) {
1579679
- var rm16 = this.heapArray.length - this._limit;
1579680
- while (rm16) {
1579664
+ var rm15 = this.heapArray.length - this._limit;
1579665
+ while (rm15) {
1579681
1579666
  this.heapArray.pop();
1579682
- --rm16;
1579667
+ --rm15;
1579683
1579668
  }
1579684
1579669
  }
1579685
1579670
  };
@@ -1580508,10 +1580493,10 @@ var Heap = (
1580508
1580493
  };
1580509
1580494
  Heap2.prototype._applyLimit = function() {
1580510
1580495
  if (this._limit > 0 && this._limit < this.heapArray.length) {
1580511
- var rm16 = this.heapArray.length - this._limit;
1580512
- while (rm16) {
1580496
+ var rm15 = this.heapArray.length - this._limit;
1580497
+ while (rm15) {
1580513
1580498
  this.heapArray.pop();
1580514
- --rm16;
1580499
+ --rm15;
1580515
1580500
  }
1580516
1580501
  }
1580517
1580502
  };
@@ -1582065,7 +1582050,7 @@ var OpenAPIPruner = class {
1582065
1582050
  };
1582066
1582051
 
1582067
1582052
  // ../register/lib/ai-example-enhancer/enhanceExamplesWithAI.js
1582068
- var import_promises64 = require("fs/promises");
1582053
+ var import_promises63 = require("fs/promises");
1582069
1582054
 
1582070
1582055
  // ../register/lib/ai-example-enhancer/lambdaClient.js
1582071
1582056
  var DEFAULT_AI_ENHANCEMENT_MAX_RETRIES = 0;
@@ -1582142,6 +1582127,14 @@ var LambdaExampleEnhancer = class {
1582142
1582127
  enhancedResponseExample: request6.originalResponseExample
1582143
1582128
  };
1582144
1582129
  }
1582130
+ const isAirGapped = await detectAirGappedMode(`${this.venusOrigin}/health`, this.context.logger);
1582131
+ if (isAirGapped) {
1582132
+ this.context.logger.debug("Skipping AI example enhancement in air-gapped environment");
1582133
+ return {
1582134
+ enhancedRequestExample: request6.originalRequestExample,
1582135
+ enhancedResponseExample: request6.originalResponseExample
1582136
+ };
1582137
+ }
1582145
1582138
  let jwt3;
1582146
1582139
  try {
1582147
1582140
  jwt3 = await this.getJwt();
@@ -1582274,12 +1582267,12 @@ var SpinnerStatusCoordinator = class _SpinnerStatusCoordinator {
1582274
1582267
  };
1582275
1582268
 
1582276
1582269
  // ../register/lib/ai-example-enhancer/validateAiExamples.js
1582277
- var import_promises62 = require("fs/promises");
1582270
+ var import_promises61 = require("fs/promises");
1582278
1582271
  async function parseAiExamplesOverride(sourceFilePath, context2) {
1582279
1582272
  const overrideFilePath = AbsoluteFilePath2.of(`${dirname4(sourceFilePath)}/ai_examples_override.yml`);
1582280
1582273
  const aiExamples = [];
1582281
1582274
  try {
1582282
- const existingContent = await (0, import_promises62.readFile)(overrideFilePath, "utf-8");
1582275
+ const existingContent = await (0, import_promises61.readFile)(overrideFilePath, "utf-8");
1582283
1582276
  const parsed = jsYaml.load(existingContent);
1582284
1582277
  if (parsed && typeof parsed === "object" && "paths" in parsed) {
1582285
1582278
  const paths = parsed.paths;
@@ -1582328,7 +1582321,7 @@ async function validateAiExamplesFromFile({ sourceFilePath, context: context2 })
1582328
1582321
  }
1582329
1582322
  let spec;
1582330
1582323
  try {
1582331
- const specContent = await (0, import_promises62.readFile)(sourceFilePath, "utf-8");
1582324
+ const specContent = await (0, import_promises61.readFile)(sourceFilePath, "utf-8");
1582332
1582325
  try {
1582333
1582326
  spec = JSON.parse(specContent);
1582334
1582327
  } catch {
@@ -1582387,7 +1582380,7 @@ async function removeInvalidAiExamples({ sourceFilePath, context: context2 }) {
1582387
1582380
  }
1582388
1582381
  const overrideFilePath = AbsoluteFilePath2.of(`${dirname4(sourceFilePath)}/ai_examples_override.yml`);
1582389
1582382
  try {
1582390
- const existingContent = await (0, import_promises62.readFile)(overrideFilePath, "utf-8");
1582383
+ const existingContent = await (0, import_promises61.readFile)(overrideFilePath, "utf-8");
1582391
1582384
  const parsed = jsYaml.load(existingContent);
1582392
1582385
  if (!parsed || !parsed.paths) {
1582393
1582386
  return {
@@ -1582431,12 +1582424,12 @@ async function removeInvalidAiExamples({ sourceFilePath, context: context2 }) {
1582431
1582424
  }
1582432
1582425
 
1582433
1582426
  // ../register/lib/ai-example-enhancer/writeAiExamplesOverride.js
1582434
- var import_promises63 = require("fs/promises");
1582427
+ var import_promises62 = require("fs/promises");
1582435
1582428
  async function loadExistingOverrideCoverage(sourceFilePath, context2) {
1582436
1582429
  const overrideFilePath = AbsoluteFilePath2.of(`${dirname4(sourceFilePath)}/ai_examples_override.yml`);
1582437
1582430
  const coveredEndpoints = /* @__PURE__ */ new Set();
1582438
1582431
  try {
1582439
- const existingContent = await (0, import_promises63.readFile)(overrideFilePath, "utf-8");
1582432
+ const existingContent = await (0, import_promises62.readFile)(overrideFilePath, "utf-8");
1582440
1582433
  const parsed = jsYaml.load(existingContent);
1582441
1582434
  if (parsed && typeof parsed === "object" && "paths" in parsed) {
1582442
1582435
  const paths = parsed.paths;
@@ -1582515,7 +1582508,7 @@ async function writeAiExamplesOverride({ enhancedExamples, sourceFilePath, conte
1582515
1582508
  try {
1582516
1582509
  let existingOverride = {};
1582517
1582510
  try {
1582518
- const existingContent = await (0, import_promises63.readFile)(overrideFilePath, "utf-8");
1582511
+ const existingContent = await (0, import_promises62.readFile)(overrideFilePath, "utf-8");
1582519
1582512
  const parsed = jsYaml.load(existingContent);
1582520
1582513
  if (parsed && typeof parsed === "object") {
1582521
1582514
  existingOverride = parsed;
@@ -1582558,7 +1582551,7 @@ async function writeAiExamplesOverride({ enhancedExamples, sourceFilePath, conte
1582558
1582551
  lineWidth: -1,
1582559
1582552
  noRefs: true
1582560
1582553
  });
1582561
- await (0, import_promises63.writeFile)(overrideFilePath, yamlContent, "utf-8");
1582554
+ await (0, import_promises62.writeFile)(overrideFilePath, yamlContent, "utf-8");
1582562
1582555
  context2.logger.debug(`AI enhanced examples written to: ${overrideFilePath}`);
1582563
1582556
  } catch (error2) {
1582564
1582557
  context2.logger.warn(`Failed to write AI examples override file: ${error2}`);
@@ -1582761,7 +1582754,7 @@ async function performAIEnhancement(apiDefinition, config2, context2, token, org
1582761
1582754
  let endpointsNeedingRegeneration = /* @__PURE__ */ new Set();
1582762
1582755
  if (sourceFilePath != null) {
1582763
1582756
  try {
1582764
- const specContent = await (0, import_promises64.readFile)(sourceFilePath, "utf-8");
1582757
+ const specContent = await (0, import_promises63.readFile)(sourceFilePath, "utf-8");
1582765
1582758
  if (!isOpenApiSpec(specContent)) {
1582766
1582759
  context2.logger.debug("Non-OpenAPI spec detected, skipping AI example enhancement");
1582767
1582760
  return apiDefinition;
@@ -1585567,7 +1585560,7 @@ var DocsDefinitionResolver = class {
1585567
1585560
  const jsFilePaths = /* @__PURE__ */ new Set();
1585568
1585561
  await Promise.all(this._parsedDocsConfig.experimental.mdxComponents.map(async (filepath) => {
1585569
1585562
  const absoluteFilePath = resolve5(this.docsWorkspace.absoluteFilePath, filepath);
1585570
- const stats = await (0, import_promises65.stat)(absoluteFilePath);
1585563
+ const stats = await (0, import_promises64.stat)(absoluteFilePath);
1585571
1585564
  if (stats.isDirectory()) {
1585572
1585565
  const files = await listFiles(absoluteFilePath, "{js,ts,jsx,tsx,md,mdx}");
1585573
1585566
  files.forEach((file) => {
@@ -1585579,7 +1585572,7 @@ var DocsDefinitionResolver = class {
1585579
1585572
  }));
1585580
1585573
  jsFiles = Object.fromEntries(await Promise.all([...jsFilePaths].map(async (filePath) => {
1585581
1585574
  const relativeFilePath = this.toRelativeFilepath(filePath);
1585582
- const contents = (await (0, import_promises65.readFile)(filePath)).toString();
1585575
+ const contents = (await (0, import_promises64.readFile)(filePath)).toString();
1585583
1585576
  return [relativeFilePath, contents];
1585584
1585577
  })));
1585585
1585578
  const mdxTime = performance.now() - mdxStart;
@@ -1593616,7 +1593609,7 @@ async function generateFdrFromOpenApiWorkspace(workspace, context2) {
1593616
1593609
  // ../docs-preview/lib/runAppPreviewServer.js
1593617
1593610
  var import_cors = __toESM(require_lib16(), 1);
1593618
1593611
  var import_express = __toESM(require_express3(), 1);
1593619
- var import_promises71 = require("fs/promises");
1593612
+ var import_promises70 = require("fs/promises");
1593620
1593613
  var import_http6 = __toESM(require("http"), 1);
1593621
1593614
  var import_path39 = __toESM(require("path"), 1);
1593622
1593615
 
@@ -1595288,13 +1595281,13 @@ var watcher_default = Watcher;
1595288
1595281
  init_wrapper();
1595289
1595282
 
1595290
1595283
  // ../docs-preview/lib/DebugLogger.js
1595291
- var import_promises66 = require("fs/promises");
1595284
+ var import_promises65 = require("fs/promises");
1595292
1595285
  var import_os5 = require("os");
1595293
1595286
  var import_path37 = __toESM(require("path"), 1);
1595294
1595287
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1595295
1595288
  var LOGS_FOLDER_NAME = "logs";
1595296
1595289
  function getCliSource() {
1595297
- const version6 = "3.44.0";
1595290
+ const version6 = "3.44.1";
1595298
1595291
  return `cli@${version6}`;
1595299
1595292
  }
1595300
1595293
  var DebugLogger = class {
@@ -1595314,7 +1595307,7 @@ var DebugLogger = class {
1595314
1595307
  const localStorageFolder = join2(AbsoluteFilePath2.of((0, import_os5.homedir)()), RelativeFilePath2.of(LOCAL_STORAGE_FOLDER4));
1595315
1595308
  const logsDir = join2(localStorageFolder, RelativeFilePath2.of(LOGS_FOLDER_NAME));
1595316
1595309
  if (!await doesPathExist(logsDir)) {
1595317
- await (0, import_promises66.mkdir)(logsDir, { recursive: true });
1595310
+ await (0, import_promises65.mkdir)(logsDir, { recursive: true });
1595318
1595311
  }
1595319
1595312
  const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
1595320
1595313
  const logFileName = `${timestamp2}.debug.log`;
@@ -1595327,7 +1595320,7 @@ var DebugLogger = class {
1595327
1595320
  "================================================================================",
1595328
1595321
  ""
1595329
1595322
  ].join("\n");
1595330
- await (0, import_promises66.writeFile)(this.logFilePath, header, "utf-8");
1595323
+ await (0, import_promises65.writeFile)(this.logFilePath, header, "utf-8");
1595331
1595324
  this.initialized = true;
1595332
1595325
  }
1595333
1595326
  /**
@@ -1595345,7 +1595338,7 @@ var DebugLogger = class {
1595345
1595338
  }
1595346
1595339
  const line = JSON.stringify(entry) + "\n";
1595347
1595340
  try {
1595348
- await (0, import_promises66.appendFile)(this.logFilePath, line, "utf-8");
1595341
+ await (0, import_promises65.appendFile)(this.logFilePath, line, "utf-8");
1595349
1595342
  } catch (error2) {
1595350
1595343
  }
1595351
1595344
  }
@@ -1595469,7 +1595462,7 @@ var DebugLogger = class {
1595469
1595462
  // ../docs-preview/lib/downloadLocalDocsBundle.js
1595470
1595463
  var import_cli_progress = __toESM(require_cli_progress(), 1);
1595471
1595464
  var import_decompress = __toESM(require_decompress(), 1);
1595472
- var import_promises67 = require("fs/promises");
1595465
+ var import_promises66 = require("fs/promises");
1595473
1595466
  var import_os6 = require("os");
1595474
1595467
  var import_tmp_promise9 = __toESM(require_tmp_promise(), 1);
1595475
1595468
  var import_xml2js = __toESM(require_xml2js(), 1);
@@ -1595557,7 +1595550,7 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595557
1595550
  let currentETag = void 0;
1595558
1595551
  if (currentETagExists) {
1595559
1595552
  logger.debug("Reading existing ETag");
1595560
- currentETag = (await (0, import_promises67.readFile)(eTagFilepath)).toString();
1595553
+ currentETag = (await (0, import_promises66.readFile)(eTagFilepath)).toString();
1595561
1595554
  }
1595562
1595555
  if (currentETag != null && currentETag === eTag) {
1595563
1595556
  logger.debug("ETag matches. Using already downloaded bundle");
@@ -1595621,16 +1595614,16 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595621
1595614
  }
1595622
1595615
  }
1595623
1595616
  const nodeBuffer = Buffer.concat(chunks);
1595624
- await (0, import_promises67.writeFile)(outputZipPath, new Uint8Array(nodeBuffer));
1595617
+ await (0, import_promises66.writeFile)(outputZipPath, new Uint8Array(nodeBuffer));
1595625
1595618
  logger.debug(`Wrote ${tryTar ? "output.tar.gz" : "output.zip"} to ${outputZipPath}`);
1595626
1595619
  const absolutePathToPreviewFolder = getPathToPreviewFolder({ app });
1595627
1595620
  if (await doesPathExist(absolutePathToPreviewFolder)) {
1595628
1595621
  logger.debug(`Removing previously cached bundle at: ${absolutePathToPreviewFolder}`);
1595629
- await (0, import_promises67.rm)(absolutePathToPreviewFolder, { recursive: true });
1595622
+ await (0, import_promises66.rm)(absolutePathToPreviewFolder, { recursive: true });
1595630
1595623
  }
1595631
- await (0, import_promises67.mkdir)(absolutePathToPreviewFolder, { recursive: true });
1595624
+ await (0, import_promises66.mkdir)(absolutePathToPreviewFolder, { recursive: true });
1595632
1595625
  const absolutePathToBundleFolder = getPathToBundleFolder({ app });
1595633
- await (0, import_promises67.mkdir)(absolutePathToBundleFolder, { recursive: true });
1595626
+ await (0, import_promises66.mkdir)(absolutePathToBundleFolder, { recursive: true });
1595634
1595627
  logger.debug(`Decompressing bundle from ${outputZipPath} to ${absolutePathToBundleFolder}`);
1595635
1595628
  let unzipProgressBar;
1595636
1595629
  let unzipInterval;
@@ -1595665,7 +1595658,7 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595665
1595658
  unzipProgressBar.stop();
1595666
1595659
  }
1595667
1595660
  }
1595668
- await (0, import_promises67.writeFile)(eTagFilepath, eTag);
1595661
+ await (0, import_promises66.writeFile)(eTagFilepath, eTag);
1595669
1595662
  logger.debug(`Downloaded bundle to ${absolutePathToBundleFolder}`);
1595670
1595663
  if (app) {
1595671
1595664
  logger.debug("Checking if pnpm is installed");
@@ -1595747,15 +1595740,15 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595747
1595740
  }
1595748
1595741
  if (!pnpmfileExists) {
1595749
1595742
  logger.debug(`Writing pnpmfile.cjs at ${pnpmfilePath}`);
1595750
- await (0, import_promises67.writeFile)(pnpmfilePath, PNPMFILE_CJS_CONTENTS);
1595743
+ await (0, import_promises66.writeFile)(pnpmfilePath, PNPMFILE_CJS_CONTENTS);
1595751
1595744
  }
1595752
1595745
  if (!npmrcExists) {
1595753
1595746
  logger.debug(`Writing .npmrc at ${npmrcPath}`);
1595754
- await (0, import_promises67.writeFile)(npmrcPath, NPMRC_CONTENTS);
1595747
+ await (0, import_promises66.writeFile)(npmrcPath, NPMRC_CONTENTS);
1595755
1595748
  }
1595756
1595749
  if (instrumentationJsExists) {
1595757
1595750
  logger.debug(`Removing instrumentation.js at ${absPathToInstrumentationJs}`);
1595758
- await (0, import_promises67.rm)(absPathToInstrumentationJs);
1595751
+ await (0, import_promises66.rm)(absPathToInstrumentationJs);
1595759
1595752
  }
1595760
1595753
  try {
1595761
1595754
  logger.debug("Running pnpm install within standalone");
@@ -1595775,7 +1595768,7 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595775
1595768
  logger.error(`Error: ${error2}`);
1595776
1595769
  const absolutePathToPreviewFolder = getPathToPreviewFolder({ app });
1595777
1595770
  if (await doesPathExist(absolutePathToPreviewFolder)) {
1595778
- await (0, import_promises67.rm)(absolutePathToPreviewFolder, { recursive: true });
1595771
+ await (0, import_promises66.rm)(absolutePathToPreviewFolder, { recursive: true });
1595779
1595772
  }
1595780
1595773
  logger.debug(`Removing incomplete bundle: rm -rf ${absolutePathToPreviewFolder}`);
1595781
1595774
  return {
@@ -1595785,7 +1595778,7 @@ async function downloadBundle({ bucketUrl, logger, preferCached, app = false, tr
1595785
1595778
  }
1595786
1595779
 
1595787
1595780
  // ../docs-preview/lib/previewDocs.js
1595788
- var import_promises70 = require("fs/promises");
1595781
+ var import_promises69 = require("fs/promises");
1595789
1595782
  var import_gray_matter10 = __toESM(require_gray_matter(), 1);
1595790
1595783
 
1595791
1595784
  // ../docs-markdown-utils/src/extract-literals.ts
@@ -1596628,9 +1596621,9 @@ function replaceFrontmatterImagesforLogo2(data2, mapImage) {
1596628
1596621
  }
1596629
1596622
 
1596630
1596623
  // ../docs-markdown-utils/src/replaceReferencedCode.ts
1596631
- var import_promises68 = require("fs/promises");
1596624
+ var import_promises67 = require("fs/promises");
1596632
1596625
  async function defaultFileLoader2(filepath) {
1596633
- const file = await (0, import_promises68.readFile)(filepath);
1596626
+ const file = await (0, import_promises67.readFile)(filepath);
1596634
1596627
  return file.toString();
1596635
1596628
  }
1596636
1596629
  function isUrl3(src) {
@@ -1596804,10 +1596797,10 @@ ${replacement}
1596804
1596797
  }
1596805
1596798
 
1596806
1596799
  // ../docs-markdown-utils/src/replaceReferencedMarkdown.ts
1596807
- var import_promises69 = require("fs/promises");
1596800
+ var import_promises68 = require("fs/promises");
1596808
1596801
  var import_gray_matter9 = __toESM(require_gray_matter(), 1);
1596809
1596802
  async function defaultMarkdownLoader2(filepath) {
1596810
- const { content: content5 } = (0, import_gray_matter9.default)(await (0, import_promises69.readFile)(filepath));
1596803
+ const { content: content5 } = (0, import_gray_matter9.default)(await (0, import_promises68.readFile)(filepath));
1596811
1596804
  return content5;
1596812
1596805
  }
1596813
1596806
  function extractAttributes2(markdownTag) {
@@ -1597006,7 +1596999,7 @@ async function getPreviewDocsDefinition({ domain: domain2, project, context: con
1597006
1596999
  navAffectingChange = true;
1597007
1597000
  continue;
1597008
1597001
  }
1597009
- const markdown = (await (0, import_promises70.readFile)(absoluteFilePath)).toString();
1597002
+ const markdown = (await (0, import_promises69.readFile)(absoluteFilePath)).toString();
1597010
1597003
  const isNewFile = previousValue == null;
1597011
1597004
  if (isNewFile) {
1597012
1597005
  navAffectingChange = true;
@@ -1597394,7 +1597387,7 @@ var SnippetDependencyTracker = class {
1597394
1597387
  const markdownFiles = await this.findMarkdownFiles(docsWorkspace.absoluteFilePath);
1597395
1597388
  for (const markdownFile of markdownFiles) {
1597396
1597389
  try {
1597397
- const content5 = await (0, import_promises71.readFile)(markdownFile, "utf-8");
1597390
+ const content5 = await (0, import_promises70.readFile)(markdownFile, "utf-8");
1597398
1597391
  const referencedFiles = this.extractReferences(content5, markdownFile, docsWorkspace.absoluteFilePath);
1597399
1597392
  this.pageToSnippets.set(markdownFile, referencedFiles);
1597400
1597393
  for (const referencedFile of referencedFiles) {
@@ -1597476,7 +1597469,7 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
1597476
1597469
  const appPreviewFolder = getPathToPreviewFolder({ app: true });
1597477
1597470
  if (await doesPathExist(appPreviewFolder)) {
1597478
1597471
  context2.logger.info("Force download requested. Deleting cached bundle...");
1597479
- await (0, import_promises71.rm)(appPreviewFolder, { recursive: true });
1597472
+ await (0, import_promises70.rm)(appPreviewFolder, { recursive: true });
1597480
1597473
  }
1597481
1597474
  }
1597482
1597475
  if (bundlePath != null) {
@@ -1599969,7 +1599962,7 @@ async function validateVersionConfigFileSchema({ value }) {
1599969
1599962
  }
1599970
1599963
 
1599971
1599964
  // ../yaml/docs-validator/lib/docsAst/visitDocsConfigFileYamlAst.js
1599972
- var import_promises73 = require("fs/promises");
1599965
+ var import_promises72 = require("fs/promises");
1599973
1599966
 
1599974
1599967
  // ../yaml/docs-validator/lib/docsAst/products-yml.schema.json
1599975
1599968
  var products_yml_schema_exports = {};
@@ -1601820,7 +1601813,7 @@ async function visitFilepath({ absoluteFilepathToConfiguration, rawUnresolvedFil
1601820
1601813
  }
1601821
1601814
 
1601822
1601815
  // ../yaml/docs-validator/lib/docsAst/visitNavigationAst.js
1601823
- var import_promises72 = require("fs/promises");
1601816
+ var import_promises71 = require("fs/promises");
1601824
1601817
 
1601825
1601818
  // ../yaml/docs-validator/lib/utils/asyncPool.js
1601826
1601819
  async function asyncPool(limit, items, fn4) {
@@ -1601971,13 +1601964,13 @@ async function visitNavigationItem2({ absolutePathToFernFolder, navigationItem,
1601971
1601964
  if (navigationItemIsPage(navigationItem)) {
1601972
1601965
  const absoluteFilepath = resolve5(dirname4(absoluteFilepathToConfiguration), navigationItem.path);
1601973
1601966
  if (await doesPathExist(absoluteFilepath)) {
1601974
- const fileStats = await (0, import_promises72.stat)(absoluteFilepath);
1601967
+ const fileStats = await (0, import_promises71.stat)(absoluteFilepath);
1601975
1601968
  const fileSizeMB = fileStats.size / (1024 * 1024);
1601976
1601969
  if (fileSizeMB > 1) {
1601977
1601970
  context2.logger.trace(`Processing large markdown file: ${navigationItem.path} (${fileSizeMB.toFixed(2)} MB)`);
1601978
1601971
  }
1601979
1601972
  const startTime = performance.now();
1601980
- const content5 = (await (0, import_promises72.readFile)(absoluteFilepath, "utf8")).toString();
1601973
+ const content5 = (await (0, import_promises71.readFile)(absoluteFilepath, "utf8")).toString();
1601981
1601974
  const readTime = performance.now() - startTime;
1601982
1601975
  if (readTime > 2e3) {
1601983
1601976
  context2.logger.debug(`Slow file read: ${navigationItem.path} took ${readTime.toFixed(0)}ms`);
@@ -1602024,12 +1602017,12 @@ async function visitNavigationItem2({ absolutePathToFernFolder, navigationItem,
1602024
1602017
  context2.logger.trace(`Starting changelog processing for directory: ${changelogDir}`);
1602025
1602018
  if (await doesPathExist(changelogDir)) {
1602026
1602019
  const startTime = performance.now();
1602027
- const files = await (0, import_promises72.readdir)(changelogDir);
1602020
+ const files = await (0, import_promises71.readdir)(changelogDir);
1602028
1602021
  const markdownFiles = files.filter((file) => file.endsWith(".md") || file.endsWith(".mdx"));
1602029
1602022
  context2.logger.debug(`Processing ${markdownFiles.length} changelog files in ${changelogDir}`);
1602030
1602023
  await asyncPool(VALIDATION_CONCURRENCY, markdownFiles, async (file) => {
1602031
1602024
  const absoluteFilepath = resolve5(changelogDir, file);
1602032
- const content5 = (await (0, import_promises72.readFile)(absoluteFilepath, "utf8")).toString();
1602025
+ const content5 = (await (0, import_promises71.readFile)(absoluteFilepath, "utf8")).toString();
1602033
1602026
  context2.logger.trace(`Validating changelog file: ${file}`);
1602034
1602027
  await visitor.markdownPage?.({
1602035
1602028
  title: file,
@@ -1602219,7 +1602212,7 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
1602219
1602212
  willBeUploaded: false
1602220
1602213
  });
1602221
1602214
  const absoluteFilepath = resolve5(dirname4(absoluteFilepathToConfiguration), product.path);
1602222
- const content5 = jsYaml.load((await (0, import_promises73.readFile)(absoluteFilepath)).toString());
1602215
+ const content5 = jsYaml.load((await (0, import_promises72.readFile)(absoluteFilepath)).toString());
1602223
1602216
  if (await doesPathExist(absoluteFilepath)) {
1602224
1602217
  await visitor.productFile?.({
1602225
1602218
  path: product.path,
@@ -1602297,7 +1602290,7 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
1602297
1602290
  willBeUploaded: false
1602298
1602291
  });
1602299
1602292
  const absoluteFilepath = resolve5(dirname4(absoluteFilepathToConfiguration), version6.path);
1602300
- const content5 = jsYaml.load((await (0, import_promises73.readFile)(absoluteFilepath)).toString());
1602293
+ const content5 = jsYaml.load((await (0, import_promises72.readFile)(absoluteFilepath)).toString());
1602301
1602294
  if (await doesPathExist(absoluteFilepath)) {
1602302
1602295
  await visitor.versionFile?.({
1602303
1602296
  path: version6.path,
@@ -1602731,7 +1602724,7 @@ var import_web = require("stream/web");
1602731
1602724
  var import_node_stream5 = require("stream");
1602732
1602725
 
1602733
1602726
  // ../../../node_modules/.pnpm/strtok3@9.1.1/node_modules/strtok3/lib/index.js
1602734
- var import_promises75 = require("fs/promises");
1602727
+ var import_promises74 = require("fs/promises");
1602735
1602728
 
1602736
1602729
  // ../../../node_modules/.pnpm/peek-readable@5.4.2/node_modules/peek-readable/lib/EndOfStreamError.js
1602737
1602730
  var defaultMessages = "End-Of-Stream";
@@ -1603102,14 +1603095,14 @@ function fromBuffer(uint8Array, options2) {
1603102
1603095
  }
1603103
1603096
 
1603104
1603097
  // ../../../node_modules/.pnpm/strtok3@9.1.1/node_modules/strtok3/lib/FileTokenizer.js
1603105
- var import_promises74 = require("fs/promises");
1603098
+ var import_promises73 = require("fs/promises");
1603106
1603099
  var FileTokenizer = class _FileTokenizer extends AbstractTokenizer {
1603107
1603100
  /**
1603108
1603101
  * Create tokenizer from provided file path
1603109
1603102
  * @param sourceFilePath File path
1603110
1603103
  */
1603111
1603104
  static async fromFile(sourceFilePath) {
1603112
- const fileHandle = await (0, import_promises74.open)(sourceFilePath, "r");
1603105
+ const fileHandle = await (0, import_promises73.open)(sourceFilePath, "r");
1603113
1603106
  const stat3 = await fileHandle.stat();
1603114
1603107
  return new _FileTokenizer(fileHandle, { fileInfo: { path: sourceFilePath, size: stat3.size } });
1603115
1603108
  }
@@ -1603241,9 +1603234,9 @@ function decodeUTF8(bytes) {
1603241
1603234
  const b23 = bytes[i11++] & 63;
1603242
1603235
  const b32 = bytes[i11++] & 63;
1603243
1603236
  const b42 = bytes[i11++] & 63;
1603244
- let cp11 = (b1 & 7) << 18 | b23 << 12 | b32 << 6 | b42;
1603245
- cp11 -= 65536;
1603246
- out += String.fromCharCode(55296 + (cp11 >> 10 & 1023), 56320 + (cp11 & 1023));
1603237
+ let cp10 = (b1 & 7) << 18 | b23 << 12 | b32 << 6 | b42;
1603238
+ cp10 -= 65536;
1603239
+ out += String.fromCharCode(55296 + (cp10 >> 10 & 1023), 56320 + (cp10 & 1023));
1603247
1603240
  }
1603248
1603241
  }
1603249
1603242
  return out;
@@ -1605071,7 +1605064,7 @@ var supportedExtensions = new Set(extensions);
1605071
1605064
  var supportedMimeTypes = new Set(mimeTypes);
1605072
1605065
 
1605073
1605066
  // ../yaml/docs-validator/lib/rules/valid-file-types/valid-file-types.js
1605074
- var import_promises76 = require("fs/promises");
1605067
+ var import_promises75 = require("fs/promises");
1605075
1605068
  var import_path41 = __toESM(require("path"), 1);
1605076
1605069
  var ALLOWED_FILE_TYPES = /* @__PURE__ */ new Set([
1605077
1605070
  // image files
@@ -1605192,7 +1605185,7 @@ var ValidFileTypes = {
1605192
1605185
  }
1605193
1605186
  };
1605194
1605187
  var getViolationsForFile = async (absoluteFilepath) => {
1605195
- const file = new Uint8Array(await (0, import_promises76.readFile)(absoluteFilepath));
1605188
+ const file = new Uint8Array(await (0, import_promises75.readFile)(absoluteFilepath));
1605196
1605189
  const fileType = await fileTypeFromBuffer(file);
1605197
1605190
  if (fileType != null) {
1605198
1605191
  if (ALLOWED_FILE_TYPES.has(fileType.mime)) {
@@ -1605231,7 +1605224,7 @@ var getViolationsForFile = async (absoluteFilepath) => {
1605231
1605224
  };
1605232
1605225
 
1605233
1605226
  // ../yaml/docs-validator/lib/rules/valid-frontmatter/valid-frontmatter.js
1605234
- var import_promises77 = require("fs/promises");
1605227
+ var import_promises76 = require("fs/promises");
1605235
1605228
  var import_gray_matter11 = __toESM(require_gray_matter(), 1);
1605236
1605229
  var ValidFrontmatter = {
1605237
1605230
  name: "valid-frontmatter",
@@ -1605242,7 +1605235,7 @@ var ValidFrontmatter = {
1605242
1605235
  return [];
1605243
1605236
  }
1605244
1605237
  try {
1605245
- const fileContents = await (0, import_promises77.readFile)(absoluteFilepath, "utf-8");
1605238
+ const fileContents = await (0, import_promises76.readFile)(absoluteFilepath, "utf-8");
1605246
1605239
  (0, import_gray_matter11.default)(fileContents);
1605247
1605240
  return [];
1605248
1605241
  } catch (error2) {
@@ -1610118,7 +1610111,7 @@ async function parseMarkdown({ markdown, absoluteFilepath, absolutePathToFernFol
1610118
1610111
  }
1610119
1610112
 
1610120
1610113
  // ../yaml/docs-validator/lib/rules/valid-markdown-file-reference/valid-markdown-file-reference.js
1610121
- var import_promises78 = require("fs/promises");
1610114
+ var import_promises77 = require("fs/promises");
1610122
1610115
  var import_gray_matter12 = __toESM(require_gray_matter(), 1);
1610123
1610116
  var ValidMarkdownFileReferences = {
1610124
1610117
  name: "valid-markdown-file-references",
@@ -1610129,7 +1610122,7 @@ var ValidMarkdownFileReferences = {
1610129
1610122
  return [];
1610130
1610123
  }
1610131
1610124
  try {
1610132
- const fileContents = await (0, import_promises78.readFile)(absoluteFilepath, "utf-8");
1610125
+ const fileContents = await (0, import_promises77.readFile)(absoluteFilepath, "utf-8");
1610133
1610126
  const { content: content5 } = (0, import_gray_matter12.default)(fileContents, {});
1610134
1610127
  const tree = parseMarkdownToTree(content5);
1610135
1610128
  const errors4 = [];
@@ -1611271,7 +1611264,7 @@ function createDocsConfigFileAstVisitorForRules({ relativeFilepath, allRuleVisit
1611271
1611264
  }
1611272
1611265
 
1611273
1611266
  // ../yaml/docs-validator/lib/rules/no-non-component-refs/no-non-component-refs.js
1611274
- var import_promises79 = require("fs/promises");
1611267
+ var import_promises78 = require("fs/promises");
1611275
1611268
  var NoNonComponentRefsRule = {
1611276
1611269
  name: "no-non-component-refs",
1611277
1611270
  create: ({ ossWorkspaces, logger, workspace: docsWorkspace }) => {
@@ -1611285,7 +1611278,7 @@ var NoNonComponentRefsRule = {
1611285
1611278
  if (!processedFiles.has(spec.absoluteFilepath)) {
1611286
1611279
  processedFiles.add(spec.absoluteFilepath);
1611287
1611280
  try {
1611288
- const contents = (await (0, import_promises79.readFile)(spec.absoluteFilepath)).toString();
1611281
+ const contents = (await (0, import_promises78.readFile)(spec.absoluteFilepath)).toString();
1611289
1611282
  const relativePath = relative3(docsWorkspace.absoluteFilePath, spec.absoluteFilepath);
1611290
1611283
  const isOpenApiV2 = contents.includes("swagger:") && (contents.includes('swagger: "2.0"') || contents.includes("swagger: '2.0'") || contents.includes("swagger: 2.0"));
1611291
1611284
  if (isOpenApiV2) {
@@ -1611325,7 +1611318,7 @@ var NoNonComponentRefsRule = {
1611325
1611318
  };
1611326
1611319
 
1611327
1611320
  // ../yaml/docs-validator/lib/rules/no-openapi-v2-in-docs/no-openapi-v2-in-docs.js
1611328
- var import_promises80 = require("fs/promises");
1611321
+ var import_promises79 = require("fs/promises");
1611329
1611322
  var NoOpenApiV2InDocsRule = {
1611330
1611323
  name: "no-openapi-v2-in-docs",
1611331
1611324
  create: ({ ossWorkspaces, logger, workspace: docsWorkspace }) => {
@@ -1611338,7 +1611331,7 @@ var NoOpenApiV2InDocsRule = {
1611338
1611331
  if (spec.type === "openapi" && !processedFiles.has(spec.absoluteFilepath)) {
1611339
1611332
  processedFiles.add(spec.absoluteFilepath);
1611340
1611333
  try {
1611341
- const contents = (await (0, import_promises80.readFile)(spec.absoluteFilepath)).toString();
1611334
+ const contents = (await (0, import_promises79.readFile)(spec.absoluteFilepath)).toString();
1611342
1611335
  const relativePath = relative3(docsWorkspace.absoluteFilePath, spec.absoluteFilepath);
1611343
1611336
  if (contents.includes("swagger:") && (contents.includes('swagger: "2.0"') || contents.includes("swagger: '2.0'") || contents.includes("swagger: 2.0"))) {
1611344
1611337
  violations.push({
@@ -1611461,7 +1611454,7 @@ var ValidInstanceUrlRule = {
1611461
1611454
  };
1611462
1611455
 
1611463
1611456
  // ../yaml/docs-validator/lib/rules/valid-local-references/valid-local-references.js
1611464
- var import_promises81 = require("fs/promises");
1611457
+ var import_promises80 = require("fs/promises");
1611465
1611458
  function validateReference(ref2, spec) {
1611466
1611459
  const pathParts = ref2.replace(/^#\//, "").split("/").map((part) => (
1611467
1611460
  // Decode JSON Pointer escapes: ~1 -> /, ~0 -> ~
@@ -1611528,7 +1611521,7 @@ var ValidLocalReferencesRule = {
1611528
1611521
  if (spec.type === "openapi" && !processedFiles.has(spec.absoluteFilepath)) {
1611529
1611522
  processedFiles.add(spec.absoluteFilepath);
1611530
1611523
  try {
1611531
- const contents = (await (0, import_promises81.readFile)(spec.absoluteFilepath)).toString();
1611524
+ const contents = (await (0, import_promises80.readFile)(spec.absoluteFilepath)).toString();
1611532
1611525
  const relativePath = relative3(docsWorkspace.absoluteFilePath, spec.absoluteFilepath);
1611533
1611526
  const isOpenApiV2 = contents.includes("swagger:") && (contents.includes('swagger: "2.0"') || contents.includes("swagger: '2.0'") || contents.includes("swagger: 2.0"));
1611534
1611527
  if (isOpenApiV2) {
@@ -1611581,7 +1611574,7 @@ var ValidLocalReferencesRule = {
1611581
1611574
  };
1611582
1611575
 
1611583
1611576
  // ../yaml/docs-validator/lib/rules/valid-openapi-examples/valid-openapi-examples.js
1611584
- var import_promises82 = require("fs/promises");
1611577
+ var import_promises81 = require("fs/promises");
1611585
1611578
  var ValidOpenApiExamples = {
1611586
1611579
  name: "valid-openapi-examples",
1611587
1611580
  create: ({ ossWorkspaces, logger, workspace: docsWorkspace }) => {
@@ -1611679,7 +1611672,7 @@ var ValidOpenApiExamples = {
1611679
1611672
  };
1611680
1611673
  async function validateOpenApiExamples({ specPath, logger }) {
1611681
1611674
  try {
1611682
- const specContent = await (0, import_promises82.readFile)(specPath, "utf-8");
1611675
+ const specContent = await (0, import_promises81.readFile)(specPath, "utf-8");
1611683
1611676
  let spec;
1611684
1611677
  try {
1611685
1611678
  spec = JSON.parse(specContent);
@@ -1612373,7 +1612366,7 @@ Found ${previewDeployments.length} preview deployment(s):
1612373
1612366
  }
1612374
1612367
 
1612375
1612368
  // src/commands/downgrade/downgrade.ts
1612376
- var import_promises83 = require("fs/promises");
1612369
+ var import_promises82 = require("fs/promises");
1612377
1612370
 
1612378
1612371
  // ../../../node_modules/.pnpm/immer@10.1.3/node_modules/immer/dist/immer.mjs
1612379
1612372
  var NOTHING = Symbol.for("immer-nothing");
@@ -1613062,12 +1613055,12 @@ async function downgrade({
1613062
1613055
  const newProjectConfig = produce(projectConfig.rawConfig, (draft) => {
1613063
1613056
  draft.version = targetVersion;
1613064
1613057
  });
1613065
- await (0, import_promises83.writeFile)(projectConfig._absolutePath, ensureFinalNewline(JSON.stringify(newProjectConfig, void 0, 2)));
1613058
+ await (0, import_promises82.writeFile)(projectConfig._absolutePath, ensureFinalNewline(JSON.stringify(newProjectConfig, void 0, 2)));
1613066
1613059
  cliContext.logger.info(`Updated ${PROJECT_CONFIG_FILENAME} to version ${targetVersion}`);
1613067
1613060
  }
1613068
1613061
 
1613069
1613062
  // src/commands/export/generateOpenAPIForWorkspaces.ts
1613070
- var import_promises84 = require("fs/promises");
1613063
+ var import_promises83 = require("fs/promises");
1613071
1613064
 
1613072
1613065
  // src/commands/export/converters/servicesConverter.ts
1613073
1613066
  var import_openapi_types3 = __toESM(require_dist20(), 1);
@@ -1614320,8 +1614313,8 @@ async function generateOpenAPIForWorkspaces({
1614320
1614313
  ir: ir14,
1614321
1614314
  mode: "openapi"
1614322
1614315
  });
1614323
- await (0, import_promises84.mkdir)(dirname4(outputPath), { recursive: true });
1614324
- await (0, import_promises84.writeFile)(
1614316
+ await (0, import_promises83.mkdir)(dirname4(outputPath), { recursive: true });
1614317
+ await (0, import_promises83.writeFile)(
1614325
1614318
  outputPath,
1614326
1614319
  outputPath.endsWith(".json") ? JSON.stringify(openapi, void 0, indent3) : jsYaml.dump(openapi, { indent: indent3 })
1614327
1614320
  );
@@ -1614360,10 +1614353,10 @@ var APPROVED_DIRECTORIES_FILENAME = "approved-output-directories";
1614360
1614353
  var LOCAL_STORAGE_FOLDER6 = ".fern-dev";
1614361
1614354
 
1614362
1614355
  // src/commands/generate/checkOutputDirectory.ts
1614363
- var import_promises87 = require("fs/promises");
1614356
+ var import_promises86 = require("fs/promises");
1614364
1614357
 
1614365
1614358
  // src/persistence/output-directories/getOutputDirectories.ts
1614366
- var import_promises85 = require("fs/promises");
1614359
+ var import_promises84 = require("fs/promises");
1614367
1614360
 
1614368
1614361
  // src/persistence/output-directories/getPathToOutputDirectoriesFile.ts
1614369
1614362
  var import_os7 = require("os");
@@ -1614382,17 +1614375,17 @@ async function getOutputDirectories() {
1614382
1614375
  if (!doesOutputDirectoriesFileExist) {
1614383
1614376
  return [];
1614384
1614377
  }
1614385
- const outputDirectoriesFileContents = await (0, import_promises85.readFile)(pathToOutputDirectoriesFile, { encoding: "utf-8" });
1614378
+ const outputDirectoriesFileContents = await (0, import_promises84.readFile)(pathToOutputDirectoriesFile, { encoding: "utf-8" });
1614386
1614379
  const outputDirectories = JSON.parse(outputDirectoriesFileContents);
1614387
1614380
  return outputDirectories;
1614388
1614381
  }
1614389
1614382
 
1614390
1614383
  // src/persistence/output-directories/storeOutputDirectories.ts
1614391
- var import_promises86 = require("fs/promises");
1614384
+ var import_promises85 = require("fs/promises");
1614392
1614385
  var import_path43 = __toESM(require("path"), 1);
1614393
1614386
  async function storeOutputDirectories(outputDirectories) {
1614394
- await (0, import_promises86.mkdir)(import_path43.default.dirname(getPathToOutputDirectoriesFile()), { recursive: true });
1614395
- await (0, import_promises86.writeFile)(getPathToOutputDirectoriesFile(), JSON.stringify(outputDirectories, null, 2));
1614387
+ await (0, import_promises85.mkdir)(import_path43.default.dirname(getPathToOutputDirectoriesFile()), { recursive: true });
1614388
+ await (0, import_promises85.writeFile)(getPathToOutputDirectoriesFile(), JSON.stringify(outputDirectories, null, 2));
1614396
1614389
  }
1614397
1614390
 
1614398
1614391
  // src/commands/generate/checkOutputDirectory.ts
@@ -1614414,7 +1614407,7 @@ async function checkOutputDirectory(outputPath, cliContext, force) {
1614414
1614407
  shouldProceed: true
1614415
1614408
  };
1614416
1614409
  }
1614417
- const files = await (0, import_promises87.readdir)(outputPath);
1614410
+ const files = await (0, import_promises86.readdir)(outputPath);
1614418
1614411
  if (files.length === 0) {
1614419
1614412
  return {
1614420
1614413
  shouldProceed: true
@@ -1614776,7 +1614769,7 @@ var AutoVersioningService = class {
1614776
1614769
  };
1614777
1614770
 
1614778
1614771
  // ../generation/local-generation/docker-utils/lib/runDocker.js
1614779
- var import_promises88 = require("fs/promises");
1614772
+ var import_promises87 = require("fs/promises");
1614780
1614773
  var import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
1614781
1614774
  async function runContainer({ logger, imageName, args = [], binds = [], envVars = {}, ports = {}, writeLogsToFile = true, removeAfterCompletion = false, runner }) {
1614782
1614775
  const tryRun = () => tryRunContainer({
@@ -1614825,7 +1614818,7 @@ async function tryRunContainer({ logger, imageName, args, binds, envVars = {}, p
1614825
1614818
  const logs = stdout + stderr;
1614826
1614819
  if (writeLogsToFile) {
1614827
1614820
  const tmpFile = await import_tmp_promise10.default.file();
1614828
- await (0, import_promises88.writeFile)(tmpFile.path, logs);
1614821
+ await (0, import_promises87.writeFile)(tmpFile.path, logs);
1614829
1614822
  logger.info(`Generator logs here: ${tmpFile.path}`);
1614830
1614823
  }
1614831
1614824
  if (exitCode == null) {
@@ -1614918,7 +1614911,7 @@ var ContainerExecutionEnvironment = class {
1614918
1614911
 
1614919
1614912
  // ../generation/local-generation/local-workspace-runner/lib/runGenerator.js
1614920
1614913
  var import_serialization = __toESM(require_serialization3(), 1);
1614921
- var import_promises90 = require("fs/promises");
1614914
+ var import_promises89 = require("fs/promises");
1614922
1614915
  var path54 = __toESM(require("path"), 1);
1614923
1614916
  var import_path46 = require("path");
1614924
1614917
  var import_tmp_promise12 = __toESM(require_tmp_promise(), 1);
@@ -1628744,7 +1628737,7 @@ function configureBamlClient(config2) {
1628744
1628737
 
1628745
1628738
  // ../generation/local-generation/local-workspace-runner/lib/LocalTaskHandler.js
1628746
1628739
  var import_decompress2 = __toESM(require_decompress(), 1);
1628747
- var import_promises89 = require("fs/promises");
1628740
+ var import_promises88 = require("fs/promises");
1628748
1628741
  var import_os8 = require("os");
1628749
1628742
  var import_path45 = require("path");
1628750
1628743
  var import_semver10 = __toESM(require_semver2(), 1);
@@ -1628827,7 +1628820,7 @@ var LocalTaskHandler = class {
1628827
1628820
  try {
1628828
1628821
  this.context.logger.info("Analyzing SDK changes for automatic semantic versioning");
1628829
1628822
  diffFile = await this.generateDiffFile();
1628830
- const diffContent = await (0, import_promises89.readFile)(diffFile, "utf-8");
1628823
+ const diffContent = await (0, import_promises88.readFile)(diffFile, "utf-8");
1628831
1628824
  if (diffContent.trim().length === 0) {
1628832
1628825
  this.context.logger.info("No changes detected in generated SDK");
1628833
1628826
  return null;
@@ -1628874,7 +1628867,7 @@ var LocalTaskHandler = class {
1628874
1628867
  } finally {
1628875
1628868
  if (diffFile) {
1628876
1628869
  try {
1628877
- await (0, import_promises89.rm)(diffFile);
1628870
+ await (0, import_promises88.rm)(diffFile);
1628878
1628871
  } catch (cleanupError) {
1628879
1628872
  this.context.logger.warn(`Failed to delete temp diff file: ${diffFile}`, String(cleanupError));
1628880
1628873
  }
@@ -1628953,7 +1628946,7 @@ var LocalTaskHandler = class {
1628953
1628946
  const tmpOutputResolutionDir = AbsoluteFilePath2.of((await import_tmp_promise11.default.dir({})).path);
1628954
1628947
  const absolutePathToFernignore = AbsoluteFilePath2.of(join2(this.absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME)));
1628955
1628948
  const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
1628956
- await (0, import_promises89.cp)(this.absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
1628949
+ await (0, import_promises88.cp)(this.absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
1628957
1628950
  await this.runGitCommand(["init"], tmpOutputResolutionDir);
1628958
1628951
  await this.runGitCommand(["add", "."], tmpOutputResolutionDir);
1628959
1628952
  const response = await this.runGitCommand(["config", "--list"], tmpOutputResolutionDir);
@@ -1628967,13 +1628960,13 @@ var LocalTaskHandler = class {
1628967
1628960
  await this.runGitCommand(["add", "."], tmpOutputResolutionDir);
1628968
1628961
  await this.runGitCommand(["reset", "--", ...fernIgnorePaths], tmpOutputResolutionDir);
1628969
1628962
  await this.runGitCommand(["restore", "."], tmpOutputResolutionDir);
1628970
- await (0, import_promises89.rm)(join2(tmpOutputResolutionDir, RelativeFilePath2.of(".git")), { recursive: true });
1628971
- await (0, import_promises89.rm)(this.absolutePathToLocalOutput, { recursive: true });
1628972
- await (0, import_promises89.cp)(tmpOutputResolutionDir, this.absolutePathToLocalOutput, { recursive: true });
1628963
+ await (0, import_promises88.rm)(join2(tmpOutputResolutionDir, RelativeFilePath2.of(".git")), { recursive: true });
1628964
+ await (0, import_promises88.rm)(this.absolutePathToLocalOutput, { recursive: true });
1628965
+ await (0, import_promises88.cp)(tmpOutputResolutionDir, this.absolutePathToLocalOutput, { recursive: true });
1628973
1628966
  }
1628974
1628967
  async copyGeneratedFilesNoFernIgnorePreservingGit() {
1628975
- const contents = await (0, import_promises89.readdir)(this.absolutePathToLocalOutput);
1628976
- await Promise.all(contents.filter((item) => item !== ".git").map((item) => (0, import_promises89.rm)(join2(this.absolutePathToLocalOutput, RelativeFilePath2.of(item)), {
1628968
+ const contents = await (0, import_promises88.readdir)(this.absolutePathToLocalOutput);
1628969
+ await Promise.all(contents.filter((item) => item !== ".git").map((item) => (0, import_promises88.rm)(join2(this.absolutePathToLocalOutput, RelativeFilePath2.of(item)), {
1628977
1628970
  force: true,
1628978
1628971
  recursive: true
1628979
1628972
  })));
@@ -1628981,11 +1628974,11 @@ var LocalTaskHandler = class {
1628981
1628974
  }
1628982
1628975
  async copyGeneratedFilesNoFernIgnoreDeleteAll() {
1628983
1628976
  this.context.logger.debug(`rm -rf ${this.absolutePathToLocalOutput}`);
1628984
- await (0, import_promises89.rm)(this.absolutePathToLocalOutput, { force: true, recursive: true });
1628977
+ await (0, import_promises88.rm)(this.absolutePathToLocalOutput, { force: true, recursive: true });
1628985
1628978
  await this.copyGeneratedFilesToDirectory(this.absolutePathToLocalOutput);
1628986
1628979
  }
1628987
1628980
  async copyGeneratedFilesToDirectory(outputPath) {
1628988
- const [firstLocalOutputItem, ...remaininglocalOutputItems] = await (0, import_promises89.readdir)(this.absolutePathToTmpOutputDirectory);
1628981
+ const [firstLocalOutputItem, ...remaininglocalOutputItems] = await (0, import_promises88.readdir)(this.absolutePathToTmpOutputDirectory);
1628989
1628982
  if (firstLocalOutputItem == null) {
1628990
1628983
  return;
1628991
1628984
  }
@@ -1628993,15 +1628986,15 @@ var LocalTaskHandler = class {
1628993
1628986
  if (firstLocalOutputItem.endsWith(".zip")) {
1628994
1628987
  await (0, import_decompress2.default)(join2(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(firstLocalOutputItem)), outputPath);
1628995
1628988
  for (const localOutputItem of remaininglocalOutputItems) {
1628996
- await (0, import_promises89.cp)(join2(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(localOutputItem)), join2(outputPath, RelativeFilePath2.of(localOutputItem)), { recursive: true });
1628989
+ await (0, import_promises88.cp)(join2(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(localOutputItem)), join2(outputPath, RelativeFilePath2.of(localOutputItem)), { recursive: true });
1628997
1628990
  }
1628998
1628991
  } else {
1628999
- await (0, import_promises89.cp)(this.absolutePathToTmpOutputDirectory, outputPath, { recursive: true });
1628992
+ await (0, import_promises88.cp)(this.absolutePathToTmpOutputDirectory, outputPath, { recursive: true });
1629000
1628993
  }
1629001
1628994
  }
1629002
1628995
  async copySnippetJSON({ absolutePathToTmpSnippetJSON, absolutePathToLocalSnippetJSON }) {
1629003
1628996
  this.context.logger.debug(`Copying generated snippets to ${absolutePathToLocalSnippetJSON}`);
1629004
- await (0, import_promises89.cp)(absolutePathToTmpSnippetJSON, absolutePathToLocalSnippetJSON);
1628997
+ await (0, import_promises88.cp)(absolutePathToTmpSnippetJSON, absolutePathToLocalSnippetJSON);
1629005
1628998
  }
1629006
1628999
  async runGitCommand(options2, cwd2) {
1629007
1629000
  const response = await loggingExeca(this.context.logger, "git", options2, {
@@ -1629056,24 +1629049,24 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
1629056
1629049
  context2.logger.debug("Wrote IR to: " + absolutePathToIr);
1629057
1629050
  const configJsonFile = (0, import_path46.join)(workspaceTempDir.path, GENERATOR_CONFIG_FILENAME);
1629058
1629051
  const absolutePathToWriteConfigJson = AbsoluteFilePath2.of(configJsonFile);
1629059
- await (0, import_promises90.writeFile)(configJsonFile, "");
1629052
+ await (0, import_promises89.writeFile)(configJsonFile, "");
1629060
1629053
  context2.logger.debug("Will write config.json to: " + absolutePathToWriteConfigJson);
1629061
1629054
  const tmpOutputDirectory = (0, import_path46.join)(workspaceTempDir.path, CODEGEN_OUTPUT_DIRECTORY_NAME);
1629062
1629055
  const absolutePathToTmpOutputDirectory = AbsoluteFilePath2.of(tmpOutputDirectory);
1629063
- await (0, import_promises90.mkdir)(tmpOutputDirectory, { recursive: true });
1629056
+ await (0, import_promises89.mkdir)(tmpOutputDirectory, { recursive: true });
1629064
1629057
  context2.logger.debug("Will write output to: " + absolutePathToTmpOutputDirectory);
1629065
1629058
  let absolutePathToTmpSnippetJSON = void 0;
1629066
1629059
  if (absolutePathToLocalSnippetJSON != null) {
1629067
1629060
  const snippetJsonFile = (0, import_path46.join)(workspaceTempDir.path, "snippet.json");
1629068
1629061
  absolutePathToTmpSnippetJSON = AbsoluteFilePath2.of(snippetJsonFile);
1629069
- await (0, import_promises90.writeFile)(snippetJsonFile, "");
1629062
+ await (0, import_promises89.writeFile)(snippetJsonFile, "");
1629070
1629063
  context2.logger.debug("Will write snippet.json to: " + absolutePathToTmpSnippetJSON);
1629071
1629064
  }
1629072
1629065
  let absolutePathToTmpSnippetTemplatesJSON = void 0;
1629073
1629066
  if (absolutePathToLocalSnippetTemplateJSON != null) {
1629074
1629067
  const snippetTemplatesJsonFile = (0, import_path46.join)(workspaceTempDir.path, SNIPPET_TEMPLATES_JSON_FILENAME);
1629075
1629068
  absolutePathToTmpSnippetTemplatesJSON = AbsoluteFilePath2.of(snippetTemplatesJsonFile);
1629076
- await (0, import_promises90.writeFile)(snippetTemplatesJsonFile, "");
1629069
+ await (0, import_promises89.writeFile)(snippetTemplatesJsonFile, "");
1629077
1629070
  context2.logger.debug("Will write snippet-templates.json to: " + absolutePathToTmpSnippetTemplatesJSON);
1629078
1629071
  }
1629079
1629072
  const environment2 = executionEnvironment ?? new ContainerExecutionEnvironment({
@@ -1629109,7 +1629102,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
1629109
1629102
  whiteLabel,
1629110
1629103
  paths
1629111
1629104
  });
1629112
- await (0, import_promises90.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(await import_serialization.GeneratorConfig.jsonOrThrow(config2), void 0, 4));
1629105
+ await (0, import_promises89.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(await import_serialization.GeneratorConfig.jsonOrThrow(config2), void 0, 4));
1629113
1629106
  const absolutePathToLicenseFile = extractLicenseFilePath(generatorInvocation, absolutePathToFernConfig);
1629114
1629107
  await environment2.execute({
1629115
1629108
  generatorName: generatorInvocation.name,
@@ -1629351,8 +1629344,8 @@ var import_fiddle_sdk5 = __toESM(require_fiddle_sdk(), 1);
1629351
1629344
 
1629352
1629345
  // ../generation/remote-generation/remote-workspace-runner/lib/downloadSnippetsForTask.js
1629353
1629346
  var import_fs17 = require("fs");
1629354
- var import_promises91 = require("fs/promises");
1629355
- var import_promises92 = require("stream/promises");
1629347
+ var import_promises90 = require("fs/promises");
1629348
+ var import_promises91 = require("stream/promises");
1629356
1629349
  async function downloadSnippetsForTask({ snippetsS3PreSignedReadUrl, absolutePathToLocalSnippetJSON, context: context2 }) {
1629357
1629350
  try {
1629358
1629351
  await downloadFileForTask({
@@ -1629369,22 +1629362,22 @@ async function downloadFileForTask({ s3PreSignedReadUrl, absolutePathToLocalOutp
1629369
1629362
  responseType: "stream"
1629370
1629363
  });
1629371
1629364
  if (await doesPathExist(absolutePathToLocalOutput)) {
1629372
- await (0, import_promises91.rm)(absolutePathToLocalOutput, { recursive: true });
1629365
+ await (0, import_promises90.rm)(absolutePathToLocalOutput, { recursive: true });
1629373
1629366
  }
1629374
- await (0, import_promises91.mkdir)(dirname4(absolutePathToLocalOutput), { recursive: true });
1629375
- await (0, import_promises92.pipeline)(request6.data, (0, import_fs17.createWriteStream)(absolutePathToLocalOutput));
1629367
+ await (0, import_promises90.mkdir)(dirname4(absolutePathToLocalOutput), { recursive: true });
1629368
+ await (0, import_promises91.pipeline)(request6.data, (0, import_fs17.createWriteStream)(absolutePathToLocalOutput));
1629376
1629369
  }
1629377
1629370
 
1629378
1629371
  // ../generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
1629379
1629372
  var import_fiddle_sdk4 = __toESM(require_fiddle_sdk(), 1);
1629380
1629373
  var import_form_data4 = __toESM(require_form_data(), 1);
1629381
- var import_promises93 = require("fs/promises");
1629374
+ var import_promises92 = require("fs/promises");
1629382
1629375
  var import_url_join23 = __toESM(require_url_join(), 1);
1629383
1629376
  async function createAndStartJob({ projectConfig, workspace, organization, intermediateRepresentation, generatorInvocation, version: version6, context: context2, shouldLogS3Url, token, whitelabel, irVersionOverride, absolutePathToPreview, fernignorePath }) {
1629384
1629377
  let fernignoreContents;
1629385
1629378
  if (fernignorePath != null) {
1629386
1629379
  try {
1629387
- fernignoreContents = await (0, import_promises93.readFile)(fernignorePath, "utf-8");
1629380
+ fernignoreContents = await (0, import_promises92.readFile)(fernignorePath, "utf-8");
1629388
1629381
  } catch (error2) {
1629389
1629382
  context2.failAndThrow(`Failed to read fernignore file at ${fernignorePath}: ${error2}`);
1629390
1629383
  }
@@ -1629576,9 +1629569,9 @@ function pollJobAndReportStatus({ job, taskId, taskHandler, context: context2 })
1629576
1629569
  // ../generation/remote-generation/remote-workspace-runner/lib/RemoteTaskHandler.js
1629577
1629570
  var import_decompress3 = __toESM(require_decompress(), 1);
1629578
1629571
  var import_fs18 = require("fs");
1629579
- var import_promises94 = require("fs/promises");
1629572
+ var import_promises93 = require("fs/promises");
1629580
1629573
  var import_path47 = __toESM(require("path"), 1);
1629581
- var import_promises95 = require("stream/promises");
1629574
+ var import_promises94 = require("stream/promises");
1629582
1629575
 
1629583
1629576
  // ../../../node_modules/.pnpm/terminal-link@3.0.0/node_modules/terminal-link/index.js
1629584
1629577
  var import_supports_hyperlinks = __toESM(require_supports_hyperlinks(), 1);
@@ -1629746,9 +1629739,9 @@ async function downloadZipForTask({ s3PreSignedReadUrl, absolutePathToLocalOutpu
1629746
1629739
  });
1629747
1629740
  const tmpDir = await import_tmp_promise13.default.dir({ prefix: "fern", unsafeCleanup: true });
1629748
1629741
  const outputZipPath = import_path47.default.join(tmpDir.path, "output.zip");
1629749
- await (0, import_promises95.pipeline)(request6.data, (0, import_fs18.createWriteStream)(outputZipPath));
1629742
+ await (0, import_promises94.pipeline)(request6.data, (0, import_fs18.createWriteStream)(outputZipPath));
1629750
1629743
  await forceRemoveDirectory(absolutePathToLocalOutput);
1629751
- await (0, import_promises94.mkdir)(absolutePathToLocalOutput, { recursive: true });
1629744
+ await (0, import_promises93.mkdir)(absolutePathToLocalOutput, { recursive: true });
1629752
1629745
  await (0, import_decompress3.default)(outputZipPath, absolutePathToLocalOutput);
1629753
1629746
  }
1629754
1629747
  async function forceRemoveDirectory(dirPath) {
@@ -1629756,22 +1629749,22 @@ async function forceRemoveDirectory(dirPath) {
1629756
1629749
  return;
1629757
1629750
  }
1629758
1629751
  await makeWritableRecursive(dirPath);
1629759
- await (0, import_promises94.rm)(dirPath, { recursive: true, force: true });
1629752
+ await (0, import_promises93.rm)(dirPath, { recursive: true, force: true });
1629760
1629753
  }
1629761
1629754
  async function makeWritableRecursive(dirPath) {
1629762
1629755
  try {
1629763
- const entries10 = await (0, import_promises94.readdir)(dirPath, { withFileTypes: true });
1629756
+ const entries10 = await (0, import_promises93.readdir)(dirPath, { withFileTypes: true });
1629764
1629757
  for (const entry of entries10) {
1629765
1629758
  const fullPath = AbsoluteFilePath2.of(import_path47.default.join(dirPath, entry.name));
1629766
1629759
  if (entry.isDirectory()) {
1629767
1629760
  await makeWritableRecursive(fullPath);
1629768
1629761
  }
1629769
1629762
  try {
1629770
- await (0, import_promises94.chmod)(fullPath, 493);
1629763
+ await (0, import_promises93.chmod)(fullPath, 493);
1629771
1629764
  } catch {
1629772
1629765
  }
1629773
1629766
  }
1629774
- await (0, import_promises94.chmod)(dirPath, 493);
1629767
+ await (0, import_promises93.chmod)(dirPath, 493);
1629775
1629768
  } catch {
1629776
1629769
  }
1629777
1629770
  }
@@ -1629822,7 +1629815,7 @@ async function downloadFilesWithFernIgnoreInTempRepo({ s3PreSignedReadUrl, absol
1629822
1629815
  const tmpOutputResolutionDir = AbsoluteFilePath2.of((await import_tmp_promise13.default.dir({})).path);
1629823
1629816
  const absolutePathToFernignore = join2(absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME));
1629824
1629817
  const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
1629825
- await (0, import_promises94.cp)(absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
1629818
+ await (0, import_promises93.cp)(absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
1629826
1629819
  await runGitCommand(["init"], tmpOutputResolutionDir, context2);
1629827
1629820
  await runGitCommand(["add", "."], tmpOutputResolutionDir, context2);
1629828
1629821
  const gitConfigResponse = await runGitCommand(["config", "--list"], tmpOutputResolutionDir, context2);
@@ -1629838,7 +1629831,7 @@ async function downloadFilesWithFernIgnoreInTempRepo({ s3PreSignedReadUrl, absol
1629838
1629831
  await runGitCommand(["restore", "."], tmpOutputResolutionDir, context2);
1629839
1629832
  await forceRemoveDirectory(join2(tmpOutputResolutionDir, RelativeFilePath2.of(".git")));
1629840
1629833
  await forceRemoveDirectory(absolutePathToLocalOutput);
1629841
- await (0, import_promises94.cp)(tmpOutputResolutionDir, absolutePathToLocalOutput, { recursive: true });
1629834
+ await (0, import_promises93.cp)(tmpOutputResolutionDir, absolutePathToLocalOutput, { recursive: true });
1629842
1629835
  }
1629843
1629836
  async function downloadAndExtractZipToDirectory({ s3PreSignedReadUrl, outputPath }) {
1629844
1629837
  const request6 = await axios_default.get(s3PreSignedReadUrl, {
@@ -1629846,12 +1629839,12 @@ async function downloadAndExtractZipToDirectory({ s3PreSignedReadUrl, outputPath
1629846
1629839
  });
1629847
1629840
  const tmpDir = await import_tmp_promise13.default.dir({ prefix: "fern", unsafeCleanup: true });
1629848
1629841
  const outputZipPath = import_path47.default.join(tmpDir.path, "output.zip");
1629849
- await (0, import_promises95.pipeline)(request6.data, (0, import_fs18.createWriteStream)(outputZipPath));
1629842
+ await (0, import_promises94.pipeline)(request6.data, (0, import_fs18.createWriteStream)(outputZipPath));
1629850
1629843
  await (0, import_decompress3.default)(outputZipPath, outputPath);
1629851
1629844
  }
1629852
1629845
 
1629853
1629846
  // ../generation/remote-generation/remote-workspace-runner/lib/SourceUploader.js
1629854
- var import_promises96 = require("fs/promises");
1629847
+ var import_promises95 = require("fs/promises");
1629855
1629848
  var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
1629856
1629849
  var PROTOBUF_ZIP_FILENAME = "proto.zip";
1629857
1629850
  var SourceUploader = class {
@@ -1629872,7 +1629865,7 @@ var SourceUploader = class {
1629872
1629865
  }
1629873
1629866
  async uploadSource(source2, uploadURL) {
1629874
1629867
  const uploadCommand = await this.getUploadCommand(source2);
1629875
- const fileData = await (0, import_promises96.readFile)(uploadCommand.absoluteFilePath);
1629868
+ const fileData = await (0, import_promises95.readFile)(uploadCommand.absoluteFilePath);
1629876
1629869
  const response = await fetch(uploadURL, {
1629877
1629870
  method: "PUT",
1629878
1629871
  body: fileData,
@@ -1629892,7 +1629885,7 @@ var SourceUploader = class {
1629892
1629885
  absoluteFilePath,
1629893
1629886
  cleanup: async () => {
1629894
1629887
  this.context.logger.debug(`Removing ${absoluteFilePath}`);
1629895
- await (0, import_promises96.unlink)(absoluteFilePath);
1629888
+ await (0, import_promises95.unlink)(absoluteFilePath);
1629896
1629889
  }
1629897
1629890
  };
1629898
1629891
  }
@@ -1630334,7 +1630327,7 @@ async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization,
1630334
1630327
 
1630335
1630328
  // ../generation/remote-generation/remote-workspace-runner/lib/publishDocs.js
1630336
1630329
  var import_crypto9 = require("crypto");
1630337
- var import_promises97 = require("fs/promises");
1630330
+ var import_promises96 = require("fs/promises");
1630338
1630331
  var mime = __toESM(require_mime_types(), 1);
1630339
1630332
 
1630340
1630333
  // ../generation/remote-generation/remote-workspace-runner/lib/measureImageSizes.js
@@ -1630391,7 +1630384,7 @@ var MEASURE_IMAGE_BATCH_SIZE = 10;
1630391
1630384
  var UPLOAD_FILE_BATCH_SIZE = 10;
1630392
1630385
  var HASH_CONCURRENCY = parseInt(process.env.FERN_DOCS_ASSET_HASH_CONCURRENCY ?? "32", 10);
1630393
1630386
  async function calculateFileHash(absoluteFilePath) {
1630394
- const fileBuffer = await (0, import_promises97.readFile)(absoluteFilePath);
1630387
+ const fileBuffer = await (0, import_promises96.readFile)(absoluteFilePath);
1630395
1630388
  return (0, import_crypto9.createHash)("sha256").update(new Uint8Array(fileBuffer)).digest("hex");
1630396
1630389
  }
1630397
1630390
  async function publishDocs({ token, organization, docsWorkspace, domain: domain2, customDomains, apiWorkspaces, ossWorkspaces, context: context2, preview, editThisPage, isPrivate = false, disableTemplates = false, skipUpload = false, withAiExamples = true, excludeApis = false, targetAudiences }) {
@@ -1630708,7 +1630701,7 @@ async function uploadFiles(filesToUpload, docsWorkspacePath, context2, batchSize
1630708
1630701
  const absoluteFilePath = resolve5(docsWorkspacePath, relativeFilePath);
1630709
1630702
  try {
1630710
1630703
  const mimeType = mime.lookup(absoluteFilePath);
1630711
- await axios_default.put(uploadUrl, await (0, import_promises97.readFile)(absoluteFilePath), {
1630704
+ await axios_default.put(uploadUrl, await (0, import_promises96.readFile)(absoluteFilePath), {
1630712
1630705
  headers: {
1630713
1630706
  "Content-Type": mimeType === false ? "application/octet-stream" : mimeType,
1630714
1630707
  // Set max cache control for S3 uploads
@@ -1640682,14 +1640675,14 @@ async function validateGeneratorsYmlFile({ contents, allRuleVisitors, cliVersion
1640682
1640675
  }
1640683
1640676
 
1640684
1640677
  // ../workspace/oss-validator/lib/rules/no-duplicate-overrides/no-duplicate-overrides.js
1640685
- var import_promises98 = require("fs/promises");
1640678
+ var import_promises97 = require("fs/promises");
1640686
1640679
  var NoDuplicateOverridesRule = {
1640687
1640680
  name: "no-duplicate-overrides",
1640688
1640681
  run: async ({ workspace, specs, context: context2 }) => {
1640689
1640682
  const violations = [];
1640690
1640683
  const seenMethodsByAudience = /* @__PURE__ */ new Map();
1640691
1640684
  for (const spec of specs) {
1640692
- const contents = (await (0, import_promises98.readFile)(spec.absoluteFilepath)).toString();
1640685
+ const contents = (await (0, import_promises97.readFile)(spec.absoluteFilepath)).toString();
1640693
1640686
  if (contents.includes("openapi") || contents.includes("swagger")) {
1640694
1640687
  const openAPI = await loadOpenAPI({
1640695
1640688
  absolutePathToOpenAPI: spec.absoluteFilepath,
@@ -1641515,7 +1641508,7 @@ async function generateOpenAPIIrForWorkspaces({
1641515
1641508
  }
1641516
1641509
 
1641517
1641510
  // src/commands/generate-overrides/compareOpenAPISpecs.ts
1641518
- var import_promises99 = require("fs/promises");
1641511
+ var import_promises98 = require("fs/promises");
1641519
1641512
  async function compareOpenAPISpecs({
1641520
1641513
  originalPath,
1641521
1641514
  modifiedPath,
@@ -1641552,12 +1641545,12 @@ async function compareOpenAPISpecs({
1641552
1641545
  }
1641553
1641546
  outputPath = join2(dirname4(originalPath), RelativeFilePath2.of(overridesFilename));
1641554
1641547
  }
1641555
- await (0, import_promises99.writeFile)(outputPath, jsYaml.dump(overrides, { lineWidth: -1, noRefs: true }));
1641548
+ await (0, import_promises98.writeFile)(outputPath, jsYaml.dump(overrides, { lineWidth: -1, noRefs: true }));
1641556
1641549
  context2.logger.info(`Overrides written to ${outputPath}`);
1641557
1641550
  });
1641558
1641551
  }
1641559
1641552
  async function loadSpec(filepath, context2) {
1641560
- const contents = await (0, import_promises99.readFile)(filepath, "utf8");
1641553
+ const contents = await (0, import_promises98.readFile)(filepath, "utf8");
1641561
1641554
  try {
1641562
1641555
  return JSON.parse(contents);
1641563
1641556
  } catch {
@@ -1641658,7 +1641651,7 @@ function deepEqual(a10, b18) {
1641658
1641651
  }
1641659
1641652
 
1641660
1641653
  // src/commands/generate-overrides/writeOverridesForWorkspaces.ts
1641661
- var import_promises100 = require("fs/promises");
1641654
+ var import_promises99 = require("fs/promises");
1641662
1641655
  async function writeOverridesForWorkspaces({
1641663
1641656
  project,
1641664
1641657
  includeModels,
@@ -1641683,7 +1641676,7 @@ async function writeOverridesForWorkspaces({
1641683
1641676
  async function readExistingOverrides(overridesFilepath, context2) {
1641684
1641677
  let parsedOverrides = null;
1641685
1641678
  try {
1641686
- const contents = (await (0, import_promises100.readFile)(overridesFilepath, "utf8")).toString();
1641679
+ const contents = (await (0, import_promises99.readFile)(overridesFilepath, "utf8")).toString();
1641687
1641680
  try {
1641688
1641681
  parsedOverrides = JSON.parse(contents);
1641689
1641682
  } catch (err) {
@@ -1641747,7 +1641740,7 @@ async function writeDefinitionForOpenAPIWorkspace({
1641747
1641740
  overridesFilename = `${nameWithoutExt}-overrides${extension2}`;
1641748
1641741
  }
1641749
1641742
  }
1641750
- await (0, import_promises100.writeFile)(
1641743
+ await (0, import_promises99.writeFile)(
1641751
1641744
  join2(dirname4(spec.absoluteFilepath), RelativeFilePath2.of(overridesFilename)),
1641752
1641745
  jsYaml.dump({ paths, components })
1641753
1641746
  );
@@ -1642112,7 +1642105,7 @@ function convertIRtoJsonSchema(args) {
1642112
1642105
  }
1642113
1642106
 
1642114
1642107
  // src/commands/jsonschema/generateJsonschemaForWorkspace.ts
1642115
- var import_promises101 = require("fs/promises");
1642108
+ var import_promises100 = require("fs/promises");
1642116
1642109
  async function generateJsonschemaForWorkspaces({
1642117
1642110
  typeLocator,
1642118
1642111
  project,
@@ -1642160,9 +1642153,9 @@ async function generateJsonschemaForWorkspaces({
1642160
1642153
  context: context2
1642161
1642154
  });
1642162
1642155
  if (!await doesPathExist(dirname4(jsonschemaFilepath))) {
1642163
- await (0, import_promises101.mkdir)(dirname4(jsonschemaFilepath), { recursive: true });
1642156
+ await (0, import_promises100.mkdir)(dirname4(jsonschemaFilepath), { recursive: true });
1642164
1642157
  }
1642165
- await (0, import_promises101.writeFile)(jsonschemaFilepath, JSON.stringify(jsonSchema, null, 2));
1642158
+ await (0, import_promises100.writeFile)(jsonschemaFilepath, JSON.stringify(jsonSchema, null, 2));
1642166
1642159
  context2.logger.info(source_default.green(`Wrote JSON Schema to ${jsonschemaFilepath}`));
1642167
1642160
  });
1642168
1642161
  })
@@ -1642519,7 +1642512,7 @@ async function mockServer({
1642519
1642512
 
1642520
1642513
  // src/commands/register/registerWorkspacesV1.ts
1642521
1642514
  var import_fiddle_sdk7 = __toESM(require_fiddle_sdk(), 1);
1642522
- var import_promises102 = require("fs/promises");
1642515
+ var import_promises101 = require("fs/promises");
1642523
1642516
  var import_path56 = __toESM(require("path"), 1);
1642524
1642517
  var import_tar2 = __toESM(require_tar(), 1);
1642525
1642518
  var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
@@ -1642569,7 +1642562,7 @@ async function registerWorkspacesV1({
1642569
1642562
  context2.logger.debug(`Compressing definition at ${tmpDir.path}`);
1642570
1642563
  await (0, import_tar2.create)({ file: tarPath, cwd: resolvedWorkspace.absoluteFilePath }, ["."]);
1642571
1642564
  context2.logger.info("Uploading definition...");
1642572
- await axios_default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises102.readFile)(tarPath));
1642565
+ await axios_default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises101.readFile)(tarPath));
1642573
1642566
  context2.logger.info(
1642574
1642567
  `Registered @${project.config.organization}/${resolvedWorkspace.definition.rootApiFile.contents.name}:${registerApiResponse.body.version}`
1642575
1642568
  );
@@ -1642707,7 +1642700,7 @@ async function generateDiff({
1642707
1642700
  }
1642708
1642701
 
1642709
1642702
  // src/commands/self-update/selfUpdate.ts
1642710
- var import_promises103 = require("fs/promises");
1642703
+ var import_promises102 = require("fs/promises");
1642711
1642704
  var import_path57 = require("path");
1642712
1642705
  async function getPackageManagerBinDir(logger, pm) {
1642713
1642706
  let command2;
@@ -1642753,7 +1642746,7 @@ async function detectInstallationMethod(logger) {
1642753
1642746
  logger.debug(`Found fern at: ${fernPath}`);
1642754
1642747
  let resolvedPath;
1642755
1642748
  try {
1642756
- resolvedPath = await (0, import_promises103.realpath)(fernPath);
1642749
+ resolvedPath = await (0, import_promises102.realpath)(fernPath);
1642757
1642750
  logger.debug(`Resolved to: ${resolvedPath}`);
1642758
1642751
  } catch (error2) {
1642759
1642752
  logger.debug(`Failed to resolve symlink: ${error2}`);
@@ -1643034,20 +1643027,20 @@ async function generateToken({
1643034
1643027
 
1643035
1643028
  // src/commands/upgrade/updateApiSpec.ts
1643036
1643029
  var fs22 = __toESM(require("fs"), 1);
1643037
- var import_promises104 = require("fs/promises");
1643030
+ var import_promises103 = require("fs/promises");
1643038
1643031
  var import_stream9 = require("stream");
1643039
- var import_promises105 = require("stream/promises");
1643032
+ var import_promises104 = require("stream/promises");
1643040
1643033
  async function fetchAndWriteFile(url2, path69, logger, indent3) {
1643041
1643034
  const resp = await fetch(url2);
1643042
1643035
  if (resp.ok && resp.body) {
1643043
1643036
  logger.debug("Origin successfully fetched, writing to file");
1643044
1643037
  const fileStream = fs22.createWriteStream(path69);
1643045
- await (0, import_promises105.finished)(import_stream9.Readable.fromWeb(resp.body).pipe(fileStream));
1643046
- const fileContents = await (0, import_promises104.readFile)(path69, "utf8");
1643038
+ await (0, import_promises104.finished)(import_stream9.Readable.fromWeb(resp.body).pipe(fileStream));
1643039
+ const fileContents = await (0, import_promises103.readFile)(path69, "utf8");
1643047
1643040
  try {
1643048
- await (0, import_promises104.writeFile)(path69, JSON.stringify(JSON.parse(fileContents), void 0, indent3), "utf8");
1643041
+ await (0, import_promises103.writeFile)(path69, JSON.stringify(JSON.parse(fileContents), void 0, indent3), "utf8");
1643049
1643042
  } catch (e6) {
1643050
- await (0, import_promises104.writeFile)(path69, jsYaml.dump(jsYaml.load(fileContents), { indent: indent3 }), "utf8");
1643043
+ await (0, import_promises103.writeFile)(path69, jsYaml.dump(jsYaml.load(fileContents), { indent: indent3 }), "utf8");
1643051
1643044
  }
1643052
1643045
  logger.debug("File written successfully");
1643053
1643046
  }
@@ -1643143,7 +1643136,7 @@ async function processDefinitions({
1643143
1643136
  }
1643144
1643137
 
1643145
1643138
  // ../cli-migrations/lib/migrations/0.0.191/discriminant/migration.js
1643146
- var import_promises106 = require("fs/promises");
1643139
+ var import_promises105 = require("fs/promises");
1643147
1643140
 
1643148
1643141
  // ../cli-migrations/lib/migrations/0.0.191/discriminant/getAllYamlFiles.js
1643149
1643142
  var FERN_DIRECTORY2 = "fern";
@@ -1643177,7 +1643170,7 @@ var migration = {
1643177
1643170
  try {
1643178
1643171
  const fileContents = await getFileContents(yamlFilepath);
1643179
1643172
  const newContents = addDiscriminantToFile(fileContents);
1643180
- await (0, import_promises106.writeFile)(yamlFilepath, newContents);
1643173
+ await (0, import_promises105.writeFile)(yamlFilepath, newContents);
1643181
1643174
  } catch (error2) {
1643182
1643175
  context2.failAndThrow("Failed to migrate " + yamlFilepath, error2);
1643183
1643176
  }
@@ -1643185,7 +1643178,7 @@ var migration = {
1643185
1643178
  }
1643186
1643179
  };
1643187
1643180
  async function getFileContents(filepath) {
1643188
- const buffer = await (0, import_promises106.readFile)(filepath);
1643181
+ const buffer = await (0, import_promises105.readFile)(filepath);
1643189
1643182
  return buffer.toString();
1643190
1643183
  }
1643191
1643184
  var UNION_REGEX = /^(\s{2,})union:\s*$/gm;
@@ -1643214,7 +1643207,7 @@ var versionMigrations = {
1643214
1643207
  var __default = versionMigrations;
1643215
1643208
 
1643216
1643209
  // ../cli-migrations/lib/migrations/0.0.203/union-single-property-key/migration.js
1643217
- var import_promises107 = require("fs/promises");
1643210
+ var import_promises106 = require("fs/promises");
1643218
1643211
  var import_yaml3 = __toESM(require_dist4(), 1);
1643219
1643212
 
1643220
1643213
  // ../cli-migrations/lib/migrations/0.0.203/union-single-property-key/getAllYamlFiles.js
@@ -1643255,7 +1643248,7 @@ var migration2 = {
1643255
1643248
  }
1643256
1643249
  };
1643257
1643250
  async function migrateFile(filepath, context2) {
1643258
- const contents = await (0, import_promises107.readFile)(filepath);
1643251
+ const contents = await (0, import_promises106.readFile)(filepath);
1643259
1643252
  const parsedDocument = import_yaml3.default.parseDocument(contents.toString());
1643260
1643253
  const types4 = parsedDocument.get("types");
1643261
1643254
  if (types4 == null) {
@@ -1643287,7 +1643280,7 @@ async function migrateFile(filepath, context2) {
1643287
1643280
  }
1643288
1643281
  }
1643289
1643282
  }
1643290
- await (0, import_promises107.writeFile)(filepath, parsedDocument.toString());
1643283
+ await (0, import_promises106.writeFile)(filepath, parsedDocument.toString());
1643291
1643284
  }
1643292
1643285
 
1643293
1643286
  // ../cli-migrations/lib/migrations/0.0.203/index.js
@@ -1643298,7 +1643291,7 @@ var versionMigrations2 = {
1643298
1643291
  var __default2 = versionMigrations2;
1643299
1643292
 
1643300
1643293
  // ../cli-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/migration.js
1643301
- var import_promises108 = require("fs/promises");
1643294
+ var import_promises107 = require("fs/promises");
1643302
1643295
  var import_yaml4 = __toESM(require_dist4(), 1);
1643303
1643296
 
1643304
1643297
  // ../cli-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/getAllGeneratorYamlFiles.js
@@ -1643339,7 +1643332,7 @@ var migration3 = {
1643339
1643332
  }
1643340
1643333
  };
1643341
1643334
  async function migrateGeneratorsYml(filepath, context2) {
1643342
- const contents = await (0, import_promises108.readFile)(filepath);
1643335
+ const contents = await (0, import_promises107.readFile)(filepath);
1643343
1643336
  const parsedDocument = import_yaml4.default.parseDocument(contents.toString());
1643344
1643337
  const draftGenerators = parsedDocument.get("draft");
1643345
1643338
  if (draftGenerators == null) {
@@ -1643366,7 +1643359,7 @@ async function migrateGeneratorsYml(filepath, context2) {
1643366
1643359
  draftGenerator.set("output-path", name2.value.includes("openapi") ? "./generated-openapi" : name2.value.includes("postman") ? "./generated-postman" : localOutput);
1643367
1643360
  }
1643368
1643361
  });
1643369
- await (0, import_promises108.writeFile)(filepath, parsedDocument.toString());
1643362
+ await (0, import_promises107.writeFile)(filepath, parsedDocument.toString());
1643370
1643363
  }
1643371
1643364
 
1643372
1643365
  // ../cli-migrations/lib/migrations/0.0.207/index.js
@@ -1643377,7 +1643370,7 @@ var versionMigrations3 = {
1643377
1643370
  var __default3 = versionMigrations3;
1643378
1643371
 
1643379
1643372
  // ../cli-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/migration.js
1643380
- var import_promises109 = require("fs/promises");
1643373
+ var import_promises108 = require("fs/promises");
1643381
1643374
  var import_yaml5 = __toESM(require_dist4(), 1);
1643382
1643375
 
1643383
1643376
  // ../cli-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/getAllYamlFiles.js
@@ -1643418,7 +1643411,7 @@ var migration4 = {
1643418
1643411
  }
1643419
1643412
  };
1643420
1643413
  async function migrateFile2(filepath, context2) {
1643421
- const contents = await (0, import_promises109.readFile)(filepath);
1643414
+ const contents = await (0, import_promises108.readFile)(filepath);
1643422
1643415
  const parsedDocument = import_yaml5.default.parseDocument(contents.toString());
1643423
1643416
  const addType = (typeName, typeDeclaration) => {
1643424
1643417
  const types4 = parsedDocument.get("types");
@@ -1643462,7 +1643455,7 @@ async function migrateFile2(filepath, context2) {
1643462
1643455
  }
1643463
1643456
  }
1643464
1643457
  }
1643465
- await (0, import_promises109.writeFile)(filepath, parsedDocument.toString());
1643458
+ await (0, import_promises108.writeFile)(filepath, parsedDocument.toString());
1643466
1643459
  }
1643467
1643460
 
1643468
1643461
  // ../cli-migrations/lib/migrations/0.0.210/index.js
@@ -1643473,7 +1643466,7 @@ var versionMigrations4 = {
1643473
1643466
  var __default4 = versionMigrations4;
1643474
1643467
 
1643475
1643468
  // ../cli-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/migration.js
1643476
- var import_promises110 = require("fs/promises");
1643469
+ var import_promises109 = require("fs/promises");
1643477
1643470
  var import_yaml6 = __toESM(require_dist4(), 1);
1643478
1643471
 
1643479
1643472
  // ../cli-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/getAllGeneratorYamlFiles.js
@@ -1643514,7 +1643507,7 @@ var migration5 = {
1643514
1643507
  }
1643515
1643508
  };
1643516
1643509
  async function migrateGeneratorsYml2(filepath, context2) {
1643517
- const contents = await (0, import_promises110.readFile)(filepath);
1643510
+ const contents = await (0, import_promises109.readFile)(filepath);
1643518
1643511
  const parsedDocument = import_yaml6.default.parseDocument(contents.toString());
1643519
1643512
  const releaseGenerators = parsedDocument.get("release");
1643520
1643513
  if (releaseGenerators == null) {
@@ -1643552,7 +1643545,7 @@ async function migrateGeneratorsYml2(filepath, context2) {
1643552
1643545
  }
1643553
1643546
  releaseGenerator.delete("outputs");
1643554
1643547
  });
1643555
- await (0, import_promises110.writeFile)(filepath, parsedDocument.toString());
1643548
+ await (0, import_promises109.writeFile)(filepath, parsedDocument.toString());
1643556
1643549
  }
1643557
1643550
 
1643558
1643551
  // ../cli-migrations/lib/migrations/0.0.212/index.js
@@ -1643563,7 +1643556,7 @@ var versionMigrations5 = {
1643563
1643556
  var __default5 = versionMigrations5;
1643564
1643557
 
1643565
1643558
  // ../cli-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/migration.js
1643566
- var import_promises111 = require("fs/promises");
1643559
+ var import_promises110 = require("fs/promises");
1643567
1643560
 
1643568
1643561
  // ../cli-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/getAllYamlFiles.js
1643569
1643562
  var FERN_DIRECTORY7 = "fern";
@@ -1643594,9 +1643587,9 @@ var migration6 = {
1643594
1643587
  run: async ({ context: context2 }) => {
1643595
1643588
  const yamlFiles = await getAllYamlFiles4(context2);
1643596
1643589
  for (const filepath of yamlFiles) {
1643597
- const contents = await (0, import_promises111.readFile)(filepath);
1643590
+ const contents = await (0, import_promises110.readFile)(filepath);
1643598
1643591
  const newContents = contents.toString().replaceAll(" alias:", " type:");
1643599
- await (0, import_promises111.writeFile)(filepath, newContents);
1643592
+ await (0, import_promises110.writeFile)(filepath, newContents);
1643600
1643593
  }
1643601
1643594
  }
1643602
1643595
  };
@@ -1643609,7 +1643602,7 @@ var versionMigrations6 = {
1643609
1643602
  var __default6 = versionMigrations6;
1643610
1643603
 
1643611
1643604
  // ../cli-migrations/lib/migrations/0.0.221/add-error-discriminant/migration.js
1643612
- var import_promises112 = require("fs/promises");
1643605
+ var import_promises111 = require("fs/promises");
1643613
1643606
 
1643614
1643607
  // ../cli-migrations/lib/migrations/0.0.221/add-error-discriminant/getAllRootApiYamlFiles.js
1643615
1643608
  var FERN_DIRECTORY8 = "fern";
@@ -1643640,9 +1643633,9 @@ var migration7 = {
1643640
1643633
  run: async ({ context: context2 }) => {
1643641
1643634
  const yamlFiles = await getAllRootApiYamlFiles(context2);
1643642
1643635
  for (const filepath of yamlFiles) {
1643643
- const contents = await (0, import_promises112.readFile)(filepath);
1643636
+ const contents = await (0, import_promises111.readFile)(filepath);
1643644
1643637
  const newContents = contents.toString() + "\nerror-discriminant: error";
1643645
- await (0, import_promises112.writeFile)(filepath, newContents);
1643638
+ await (0, import_promises111.writeFile)(filepath, newContents);
1643646
1643639
  }
1643647
1643640
  }
1643648
1643641
  };
@@ -1643655,7 +1643648,7 @@ var versionMigrations7 = {
1643655
1643648
  var __default7 = versionMigrations7;
1643656
1643649
 
1643657
1643650
  // ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/migration.js
1643658
- var import_promises113 = require("fs/promises");
1643651
+ var import_promises112 = require("fs/promises");
1643659
1643652
 
1643660
1643653
  // ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/getAllGeneratorYamlFiles.js
1643661
1643654
  var FERN_DIRECTORY9 = "fern";
@@ -1643762,7 +1643755,7 @@ var migration8 = {
1643762
1643755
  }
1643763
1643756
  };
1643764
1643757
  async function migrateGeneratorsYml3(filepath) {
1643765
- const contentsStr = await (0, import_promises113.readFile)(filepath);
1643758
+ const contentsStr = await (0, import_promises112.readFile)(filepath);
1643766
1643759
  const contents = jsYaml.load(contentsStr.toString());
1643767
1643760
  const oldGeneratorsConfiguration = GeneratorsConfigurationSchema2.parse(contents);
1643768
1643761
  let newGeneratorsConfiguration = {};
@@ -1643780,7 +1643773,7 @@ async function migrateGeneratorsYml3(filepath) {
1643780
1643773
  generators: oldGeneratorsConfiguration.release.map((releaseGeneratorInvocation) => convertReleaseGeneratorInvocation(releaseGeneratorInvocation))
1643781
1643774
  };
1643782
1643775
  }
1643783
- await (0, import_promises113.writeFile)(filepath, jsYaml.dump(newGeneratorsConfiguration));
1643776
+ await (0, import_promises112.writeFile)(filepath, jsYaml.dump(newGeneratorsConfiguration));
1643784
1643777
  }
1643785
1643778
  function convertDraftGeneratorInvocation(draftGeneratorInvocation) {
1643786
1643779
  const newSchema = {
@@ -1643855,7 +1643848,7 @@ var versionMigrations8 = {
1643855
1643848
  var __default8 = versionMigrations8;
1643856
1643849
 
1643857
1643850
  // ../cli-migrations/lib/migrations/0.0.248/add-error-discrimination-config/migration.js
1643858
- var import_promises114 = require("fs/promises");
1643851
+ var import_promises113 = require("fs/promises");
1643859
1643852
  var import_yaml7 = __toESM(require_dist4(), 1);
1643860
1643853
 
1643861
1643854
  // ../cli-migrations/lib/migrations/0.0.248/add-error-discrimination-config/getAllRootApiYamlFiles.js
@@ -1643896,7 +1643889,7 @@ var migration9 = {
1643896
1643889
  }
1643897
1643890
  };
1643898
1643891
  async function migrateRootApiFile(filepath) {
1643899
- const contents = await (0, import_promises114.readFile)(filepath);
1643892
+ const contents = await (0, import_promises113.readFile)(filepath);
1643900
1643893
  const parsedDocument = import_yaml7.default.parseDocument(contents.toString());
1643901
1643894
  const errorDiscriminant = parsedDocument.get("error-discriminant", true);
1643902
1643895
  if (errorDiscriminant == null || !import_yaml7.default.isScalar(errorDiscriminant) || typeof errorDiscriminant.value !== "string") {
@@ -1643907,7 +1643900,7 @@ async function migrateRootApiFile(filepath) {
1643907
1643900
  "property-name": errorDiscriminant.value
1643908
1643901
  });
1643909
1643902
  parsedDocument.delete("error-discriminant");
1643910
- await (0, import_promises114.writeFile)(filepath, parsedDocument.toString());
1643903
+ await (0, import_promises113.writeFile)(filepath, parsedDocument.toString());
1643911
1643904
  }
1643912
1643905
 
1643913
1643906
  // ../cli-migrations/lib/migrations/0.0.248/index.js
@@ -1643918,7 +1643911,7 @@ var versionMigrations9 = {
1643918
1643911
  var __default9 = versionMigrations9;
1643919
1643912
 
1643920
1643913
  // ../cli-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/migration.js
1643921
- var import_promises115 = require("fs/promises");
1643914
+ var import_promises114 = require("fs/promises");
1643922
1643915
  var import_yaml8 = __toESM(require_dist4(), 1);
1643923
1643916
 
1643924
1643917
  // ../cli-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/getAllYamlFiles.js
@@ -1643959,7 +1643952,7 @@ var migration10 = {
1643959
1643952
  }
1643960
1643953
  };
1643961
1643954
  async function migrateYamlFile(filepath, context2) {
1643962
- const contents = await (0, import_promises115.readFile)(filepath);
1643955
+ const contents = await (0, import_promises114.readFile)(filepath);
1643963
1643956
  const parsedDocument = import_yaml8.default.parseDocument(contents.toString());
1643964
1643957
  const services = parsedDocument.get("services");
1643965
1643958
  if (services == null) {
@@ -1643999,7 +1643992,7 @@ async function migrateYamlFile(filepath, context2) {
1643999
1643992
  context2.failWithoutThrowing("Failed to convert endpoint", e6);
1644000
1643993
  }
1644001
1643994
  }
1644002
- await (0, import_promises115.writeFile)(filepath, parsedDocument.toString());
1643995
+ await (0, import_promises114.writeFile)(filepath, parsedDocument.toString());
1644003
1643996
  }
1644004
1643997
  }
1644005
1643998
  function convertEndpoint20({ document: document4, endpoint: endpoint3 }) {
@@ -1644078,7 +1644071,7 @@ var versionMigrations10 = {
1644078
1644071
  var __default10 = versionMigrations10;
1644079
1644072
 
1644080
1644073
  // ../cli-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/migration.js
1644081
- var import_promises116 = require("fs/promises");
1644074
+ var import_promises115 = require("fs/promises");
1644082
1644075
  var import_yaml9 = __toESM(require_dist4(), 1);
1644083
1644076
 
1644084
1644077
  // ../cli-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/getAllYamlFiles.js
@@ -1644119,7 +1644112,7 @@ var migration11 = {
1644119
1644112
  }
1644120
1644113
  };
1644121
1644114
  async function migrateYamlFile2(filepath, context2) {
1644122
- const contents = await (0, import_promises116.readFile)(filepath);
1644115
+ const contents = await (0, import_promises115.readFile)(filepath);
1644123
1644116
  const parsedDocument = import_yaml9.default.parseDocument(contents.toString());
1644124
1644117
  const types4 = parsedDocument.get("types");
1644125
1644118
  if (types4 == null) {
@@ -1644145,7 +1644138,7 @@ async function migrateYamlFile2(filepath, context2) {
1644145
1644138
  examples.set(i11, { value });
1644146
1644139
  }
1644147
1644140
  }
1644148
- await (0, import_promises116.writeFile)(filepath, parsedDocument.toString());
1644141
+ await (0, import_promises115.writeFile)(filepath, parsedDocument.toString());
1644149
1644142
  }
1644150
1644143
 
1644151
1644144
  // ../cli-migrations/lib/migrations/0.3.0-rc12/index.js
@@ -1644156,7 +1644149,7 @@ var versionMigrations11 = {
1644156
1644149
  var __default11 = versionMigrations11;
1644157
1644150
 
1644158
1644151
  // ../cli-migrations/lib/migrations/0.3.23/change-services-key-to-service/migration.js
1644159
- var import_promises117 = require("fs/promises");
1644152
+ var import_promises116 = require("fs/promises");
1644160
1644153
  var import_yaml10 = __toESM(require_dist4(), 1);
1644161
1644154
 
1644162
1644155
  // ../cli-migrations/lib/migrations/0.3.23/change-services-key-to-service/getAllYamlFiles.js
@@ -1644197,7 +1644190,7 @@ var migration12 = {
1644197
1644190
  }
1644198
1644191
  };
1644199
1644192
  async function migrateYamlFile3(filepath, context2) {
1644200
- const contents = await (0, import_promises117.readFile)(filepath);
1644193
+ const contents = await (0, import_promises116.readFile)(filepath);
1644201
1644194
  const parsedDocument = import_yaml10.default.parseDocument(contents.toString());
1644202
1644195
  if (!import_yaml10.default.isMap(parsedDocument.contents)) {
1644203
1644196
  return context2.failAndThrow("File is not a map");
@@ -1644227,7 +1644220,7 @@ async function migrateYamlFile3(filepath, context2) {
1644227
1644220
  pair.value = firstService.value;
1644228
1644221
  }
1644229
1644222
  }
1644230
- await (0, import_promises117.writeFile)(filepath, parsedDocument.toString());
1644223
+ await (0, import_promises116.writeFile)(filepath, parsedDocument.toString());
1644231
1644224
  }
1644232
1644225
 
1644233
1644226
  // ../cli-migrations/lib/migrations/0.3.23/index.js
@@ -1644238,7 +1644231,7 @@ var versionMigrations12 = {
1644238
1644231
  var __default12 = versionMigrations12;
1644239
1644232
 
1644240
1644233
  // ../cli-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/migration.js
1644241
- var import_promises118 = require("fs/promises");
1644234
+ var import_promises117 = require("fs/promises");
1644242
1644235
  var import_yaml11 = __toESM(require_dist4(), 1);
1644243
1644236
 
1644244
1644237
  // ../cli-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/getAllYamlFiles.js
@@ -1644279,7 +1644272,7 @@ var migration13 = {
1644279
1644272
  }
1644280
1644273
  };
1644281
1644274
  async function migrateYamlFile4(filepath, context2) {
1644282
- const contents = await (0, import_promises118.readFile)(filepath);
1644275
+ const contents = await (0, import_promises117.readFile)(filepath);
1644283
1644276
  const parsedDocument = import_yaml11.default.parseDocument(contents.toString());
1644284
1644277
  if (!import_yaml11.default.isMap(parsedDocument.contents)) {
1644285
1644278
  return context2.failAndThrow("File is not a map");
@@ -1644298,7 +1644291,7 @@ async function migrateYamlFile4(filepath, context2) {
1644298
1644291
  }
1644299
1644292
  service.items.splice(indexOfServiceDocsPair, 1);
1644300
1644293
  parsedDocument.contents.items.unshift(docsPair);
1644301
- await (0, import_promises118.writeFile)(filepath, parsedDocument.toString());
1644294
+ await (0, import_promises117.writeFile)(filepath, parsedDocument.toString());
1644302
1644295
  }
1644303
1644296
 
1644304
1644297
  // ../cli-migrations/lib/migrations/0.5.4/index.js
@@ -1644309,7 +1644302,7 @@ var versionMigrations13 = {
1644309
1644302
  var __default13 = versionMigrations13;
1644310
1644303
 
1644311
1644304
  // ../cli-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/migration.js
1644312
- var import_promises119 = require("fs/promises");
1644305
+ var import_promises118 = require("fs/promises");
1644313
1644306
 
1644314
1644307
  // ../cli-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/getAllGeneratorYamlFiles.js
1644315
1644308
  var FERN_DIRECTORY15 = "fern";
@@ -1644349,14 +1644342,14 @@ var migration14 = {
1644349
1644342
  }
1644350
1644343
  };
1644351
1644344
  async function migrateYamlFile5(filepath) {
1644352
- const contents = await (0, import_promises119.readFile)(filepath);
1644345
+ const contents = await (0, import_promises118.readFile)(filepath);
1644353
1644346
  const domainSuffix = process.env.DOMAIN_SUFFIX ?? "docs.buildwithfern.com";
1644354
1644347
  const regex5 = /(docs:\s*domain:\s*)"([^"]*)"/g;
1644355
1644348
  const updatedSnapshot = contents.toString().replace(regex5, (_match, _prefix, domain2) => {
1644356
1644349
  return `docs:
1644357
1644350
  domain: "${domain2}.${domainSuffix}"`;
1644358
1644351
  });
1644359
- await (0, import_promises119.writeFile)(filepath, updatedSnapshot.toString());
1644352
+ await (0, import_promises118.writeFile)(filepath, updatedSnapshot.toString());
1644360
1644353
  }
1644361
1644354
 
1644362
1644355
  // ../cli-migrations/lib/migrations/0.9.10/index.js
@@ -1644372,10 +1644365,10 @@ var import_legacy_docs_config = __toESM(require_legacy_docs_config(), 1);
1644372
1644365
  var LegacyDocsSerializers = __toESM(require_serialization44(), 1);
1644373
1644366
 
1644374
1644367
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/loadRawDocsConfiguration.js
1644375
- var import_promises120 = require("fs/promises");
1644368
+ var import_promises119 = require("fs/promises");
1644376
1644369
  async function loadRawDocsConfiguration2({ absolutePathToWorkspace }) {
1644377
1644370
  const filepath = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
1644378
- const contentsStr = await (0, import_promises120.readFile)(filepath);
1644371
+ const contentsStr = await (0, import_promises119.readFile)(filepath);
1644379
1644372
  const contentsParsed = jsYaml.load(contentsStr.toString());
1644380
1644373
  const result = await LegacyDocsSerializers.DocsConfiguration.parse(contentsParsed);
1644381
1644374
  if (result.ok) {
@@ -1644393,7 +1644386,7 @@ function getAbsolutePathToDocsFolder({ absolutePathToWorkspace }) {
1644393
1644386
  }
1644394
1644387
 
1644395
1644388
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndMultipleAPIs.js
1644396
- var import_promises122 = require("fs/promises");
1644389
+ var import_promises121 = require("fs/promises");
1644397
1644390
 
1644398
1644391
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/convertLegacyDocsConfig.js
1644399
1644392
  function convertLegacyDocsConfig({ docsConfiguration, docsURLs, apiName }) {
@@ -1644571,10 +1644564,10 @@ __export(legacy_exports, {
1644571
1644564
  });
1644572
1644565
 
1644573
1644566
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/generators-configuration/loadRawGeneratorsConfiguration.js
1644574
- var import_promises121 = require("fs/promises");
1644567
+ var import_promises120 = require("fs/promises");
1644575
1644568
  async function loadRawGeneratorsConfiguration2({ absolutePathToWorkspace }) {
1644576
1644569
  const filepath = getAbsolutePathToGeneratorsConfiguration({ absolutePathToWorkspace });
1644577
- const contentsStr = await (0, import_promises121.readFile)(filepath);
1644570
+ const contentsStr = await (0, import_promises120.readFile)(filepath);
1644578
1644571
  const contentsParsed = jsYaml.load(contentsStr.toString());
1644579
1644572
  const result = await legacy_exports.GeneratorsConfigurationSchema.safeParseAsync(contentsParsed);
1644580
1644573
  if (result.success) {
@@ -1644604,7 +1644597,7 @@ function migrateDocsInstances(docsURLs) {
1644604
1644597
  var APIS_DIRECTORY2 = "apis";
1644605
1644598
  async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspaces, workspaceContainingDocs }) {
1644606
1644599
  const absolutePathToApisDirectory = join2(absolutePathToFernDirectory, RelativeFilePath2.of(APIS_DIRECTORY2));
1644607
- await (0, import_promises122.mkdir)(absolutePathToApisDirectory);
1644600
+ await (0, import_promises121.mkdir)(absolutePathToApisDirectory);
1644608
1644601
  for (const workspace of workspaces) {
1644609
1644602
  const absolutePathToWorkspace = join2(absolutePathToFernDirectory, RelativeFilePath2.of(workspace));
1644610
1644603
  const docsURLs = await migrateAndWriteGeneratorsYml({ absolutePathToWorkspace });
@@ -1644612,11 +1644605,11 @@ async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspa
1644612
1644605
  await migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName: workspaceContainingDocs });
1644613
1644606
  const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
1644614
1644607
  await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
1644615
- await (0, import_promises122.rm)(absolutePathToDocsFolder, { recursive: true });
1644608
+ await (0, import_promises121.rm)(absolutePathToDocsFolder, { recursive: true });
1644616
1644609
  }
1644617
1644610
  const absolutePathToNestedWorkspace = join2(absolutePathToApisDirectory, RelativeFilePath2.of(workspace));
1644618
1644611
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
1644619
- await (0, import_promises122.rm)(absolutePathToWorkspace, { recursive: true });
1644612
+ await (0, import_promises121.rm)(absolutePathToWorkspace, { recursive: true });
1644620
1644613
  }
1644621
1644614
  }
1644622
1644615
  async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
@@ -1644629,7 +1644622,7 @@ async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
1644629
1644622
  generatorsConfiguration,
1644630
1644623
  pathModificationStrategy: PathModificationStrategy.Nest
1644631
1644624
  });
1644632
- await (0, import_promises122.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644625
+ await (0, import_promises121.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644633
1644626
  return convertedResponse.docsURLs;
1644634
1644627
  }
1644635
1644628
  async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName }) {
@@ -1644643,19 +1644636,19 @@ async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiNa
1644643
1644636
  apiName
1644644
1644637
  });
1644645
1644638
  const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
1644646
- await (0, import_promises122.writeFile)(absolutePathToDocsConfig, jsYaml.dump(convertedDocsConfig));
1644639
+ await (0, import_promises121.writeFile)(absolutePathToDocsConfig, jsYaml.dump(convertedDocsConfig));
1644647
1644640
  }
1644648
1644641
 
1644649
1644642
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndSingleAPI.js
1644650
- var import_promises123 = require("fs/promises");
1644643
+ var import_promises122 = require("fs/promises");
1644651
1644644
  async function migrateDocsAndSingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
1644652
1644645
  const docsURLs = await migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace });
1644653
1644646
  await migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs });
1644654
1644647
  const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
1644655
1644648
  await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
1644656
1644649
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
1644657
- await (0, import_promises123.rm)(absolutePathToDocsFolder, { recursive: true });
1644658
- await (0, import_promises123.rm)(absolutePathToWorkspace, { recursive: true });
1644650
+ await (0, import_promises122.rm)(absolutePathToDocsFolder, { recursive: true });
1644651
+ await (0, import_promises122.rm)(absolutePathToWorkspace, { recursive: true });
1644659
1644652
  }
1644660
1644653
  async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
1644661
1644654
  const docsConfiguration = await loadRawDocsConfiguration2({ absolutePathToWorkspace });
@@ -1644668,7 +1644661,7 @@ async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
1644668
1644661
  apiName: void 0
1644669
1644662
  });
1644670
1644663
  const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
1644671
- await (0, import_promises123.writeFile)(absolutePathToDocsConfig, jsYaml.dump(convertedDocsConfig));
1644664
+ await (0, import_promises122.writeFile)(absolutePathToDocsConfig, jsYaml.dump(convertedDocsConfig));
1644672
1644665
  }
1644673
1644666
  async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
1644674
1644667
  const generatorsConfiguration = await loadRawGeneratorsConfiguration2({ absolutePathToWorkspace });
@@ -1644680,22 +1644673,22 @@ async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
1644680
1644673
  generatorsConfiguration,
1644681
1644674
  pathModificationStrategy: "MoveUp"
1644682
1644675
  });
1644683
- await (0, import_promises123.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644676
+ await (0, import_promises122.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644684
1644677
  return convertedResponse.docsURLs;
1644685
1644678
  }
1644686
1644679
 
1644687
1644680
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlyMultipleAPIs.js
1644688
- var import_promises124 = require("fs/promises");
1644681
+ var import_promises123 = require("fs/promises");
1644689
1644682
  var APIS_DIRECTORY3 = "apis";
1644690
1644683
  async function migrateOnlyMultipleAPIs({ absolutePathToFernDirectory, workspaces }) {
1644691
1644684
  const absolutePathToApisDirectory = join2(absolutePathToFernDirectory, RelativeFilePath2.of(APIS_DIRECTORY3));
1644692
- await (0, import_promises124.mkdir)(absolutePathToApisDirectory);
1644685
+ await (0, import_promises123.mkdir)(absolutePathToApisDirectory);
1644693
1644686
  for (const workspace of workspaces) {
1644694
1644687
  const absolutePathToWorkspace = join2(absolutePathToFernDirectory, RelativeFilePath2.of(workspace));
1644695
1644688
  await migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace });
1644696
1644689
  const absolutePathToNestedWorkspace = join2(absolutePathToApisDirectory, RelativeFilePath2.of(workspace));
1644697
1644690
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
1644698
- await (0, import_promises124.rm)(absolutePathToWorkspace, { recursive: true });
1644691
+ await (0, import_promises123.rm)(absolutePathToWorkspace, { recursive: true });
1644699
1644692
  }
1644700
1644693
  }
1644701
1644694
  async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
@@ -1644708,15 +1644701,15 @@ async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
1644708
1644701
  generatorsConfiguration,
1644709
1644702
  pathModificationStrategy: PathModificationStrategy.Nest
1644710
1644703
  });
1644711
- await (0, import_promises124.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644704
+ await (0, import_promises123.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644712
1644705
  }
1644713
1644706
 
1644714
1644707
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlySingleAPI.js
1644715
- var import_promises125 = require("fs/promises");
1644708
+ var import_promises124 = require("fs/promises");
1644716
1644709
  async function migrateOnlySingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
1644717
1644710
  await migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace });
1644718
1644711
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
1644719
- await (0, import_promises125.rm)(absolutePathToWorkspace, { recursive: true });
1644712
+ await (0, import_promises124.rm)(absolutePathToWorkspace, { recursive: true });
1644720
1644713
  }
1644721
1644714
  async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
1644722
1644715
  const generatorsConfiguration = await loadRawGeneratorsConfiguration2({ absolutePathToWorkspace });
@@ -1644728,7 +1644721,7 @@ async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
1644728
1644721
  generatorsConfiguration,
1644729
1644722
  pathModificationStrategy: "MoveUp"
1644730
1644723
  });
1644731
- await (0, import_promises125.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644724
+ await (0, import_promises124.writeFile)(absolutePathToGeneratorsConfiguration, jsYaml.dump(convertedResponse.value));
1644732
1644725
  }
1644733
1644726
 
1644734
1644727
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migration.js
@@ -1644805,7 +1644798,7 @@ var versionMigrations15 = {
1644805
1644798
  var __default15 = versionMigrations15;
1644806
1644799
 
1644807
1644800
  // ../cli-migrations/lib/migrations/0.41.0-rc0/require-generators-yml/migration.js
1644808
- var import_promises126 = require("fs/promises");
1644801
+ var import_promises125 = require("fs/promises");
1644809
1644802
  var import_yaml12 = __toESM(require_dist4(), 1);
1644810
1644803
  var migration16 = {
1644811
1644804
  name: "require-generators-yml",
@@ -1644848,7 +1644841,7 @@ async function addApiConfigurationToSingleWorkspace({ absolutePathToFernDirector
1644848
1644841
  if (existingGeneratorsYml == null) {
1644849
1644842
  if (openapiDirectory != null && openapiDirectory.contents[0] != null) {
1644850
1644843
  const absolutePathToGeneratorsYml = join2(absoluteFilepathToWorkspace, RelativeFilePath2.of("generators.yml"));
1644851
- await (0, import_promises126.writeFile)(absolutePathToGeneratorsYml, jsYaml.dump({
1644844
+ await (0, import_promises125.writeFile)(absolutePathToGeneratorsYml, jsYaml.dump({
1644852
1644845
  api: {
1644853
1644846
  path: join2(relativize(absolutePathToFernDirectory, absoluteFilepathToWorkspace), RelativeFilePath2.of(openapiDirectory.name), RelativeFilePath2.of(openapiDirectory.contents[0]?.name))
1644854
1644847
  }
@@ -1644863,7 +1644856,7 @@ async function addApiConfigurationToSingleWorkspace({ absolutePathToFernDirector
1644863
1644856
  parsedDocument.set("api", {
1644864
1644857
  path: join2(relativize(absolutePathToFernDirectory, absoluteFilepathToWorkspace), RelativeFilePath2.of(openapiDirectory.name), RelativeFilePath2.of(openapiDirectory.contents[0]?.name))
1644865
1644858
  });
1644866
- await (0, import_promises126.writeFile)(existingGeneratorsYml.absolutePath, parsedDocument.toString());
1644859
+ await (0, import_promises125.writeFile)(existingGeneratorsYml.absolutePath, parsedDocument.toString());
1644867
1644860
  context2.logger.info(source_default.green(`Updated ${existingGeneratorsYml.absolutePath}`));
1644868
1644861
  }
1644869
1644862
  }
@@ -1644890,7 +1644883,7 @@ var versionMigrations16 = {
1644890
1644883
  var __default16 = versionMigrations16;
1644891
1644884
 
1644892
1644885
  // ../cli-migrations/lib/migrations/0.54.0-rc0/use-generators-yml-specs/migration.js
1644893
- var import_promises127 = require("fs/promises");
1644886
+ var import_promises126 = require("fs/promises");
1644894
1644887
  var import_yaml13 = __toESM(require_dist4(), 1);
1644895
1644888
  var migration17 = {
1644896
1644889
  name: "generators-yml-use-api-specs",
@@ -1645070,7 +1645063,7 @@ async function addApiConfigurationToSingleWorkspace2({ absoluteFilepathToWorkspa
1645070
1645063
  if (schemaComment && documentToWrite.indexOf(schemaComment) === -1) {
1645071
1645064
  documentToWrite = `${schemaComment}${documentToWrite}`;
1645072
1645065
  }
1645073
- await (0, import_promises127.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645066
+ await (0, import_promises126.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645074
1645067
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1645075
1645068
  }
1645076
1645069
  async function parseApiSpec({ oldSpec, absoluteFilepathToWorkspace, files, directories, context: context2, namespace }) {
@@ -1645117,7 +1645110,7 @@ async function parseApiSpec({ oldSpec, absoluteFilepathToWorkspace, files, direc
1645117
1645110
  }
1645118
1645111
  let specContent;
1645119
1645112
  try {
1645120
- const fileContents = await (0, import_promises127.readFile)(absoluteSpecPath, { encoding: "utf-8" });
1645113
+ const fileContents = await (0, import_promises126.readFile)(absoluteSpecPath, { encoding: "utf-8" });
1645121
1645114
  specContent = jsYaml.load(fileContents);
1645122
1645115
  } catch (e6) {
1645123
1645116
  context2.logger.warn(`Failed to read API spec file ${spec.path}. Error: ${e6}. Skipping...`);
@@ -1645220,7 +1645213,7 @@ var versionMigrations17 = {
1645220
1645213
  var __default17 = versionMigrations17;
1645221
1645214
 
1645222
1645215
  // ../cli-migrations/lib/migrations/0.82.1/add-path-parameter-order-setting/migration.js
1645223
- var import_promises128 = require("fs/promises");
1645216
+ var import_promises127 = require("fs/promises");
1645224
1645217
  var migration18 = {
1645225
1645218
  name: "add-path-parameter-order-setting",
1645226
1645219
  summary: `Adds the 'path-parameter-order' setting to existing API configurations to maintain backwards compatibility.
@@ -1645308,7 +1645301,7 @@ async function updateGeneratorsYml({ context: context2, files }) {
1645308
1645301
  documentToWrite = `${schemaComment}
1645309
1645302
  ${documentToWrite}`;
1645310
1645303
  }
1645311
- await (0, import_promises128.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645304
+ await (0, import_promises127.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645312
1645305
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1645313
1645306
  }
1645314
1645307
  async function getFilesAndDirectories3(absoluteFilepath) {
@@ -1645344,7 +1645337,7 @@ var versionMigrations18 = {
1645344
1645337
  var __default18 = versionMigrations18;
1645345
1645338
 
1645346
1645339
  // ../cli-migrations/lib/migrations/1.0.0/update-settings-defaults/migration.js
1645347
- var import_promises129 = require("fs/promises");
1645340
+ var import_promises128 = require("fs/promises");
1645348
1645341
  var migration19 = {
1645349
1645342
  name: "update-1_0_0-defaults",
1645350
1645343
  summary: `The defaults of the API spec settings have changed.
@@ -1645519,7 +1645512,7 @@ async function updateGeneratorsYml2({ context: context2, files }) {
1645519
1645512
  documentToWrite = `${schemaComment}
1645520
1645513
  ${documentToWrite}`;
1645521
1645514
  }
1645522
- await (0, import_promises129.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645515
+ await (0, import_promises128.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645523
1645516
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1645524
1645517
  }
1645525
1645518
  async function getFilesAndDirectories4(absoluteFilepath) {
@@ -1645588,7 +1645581,7 @@ var versionMigrations19 = {
1645588
1645581
  var __default19 = versionMigrations19;
1645589
1645582
 
1645590
1645583
  // ../cli-migrations/lib/migrations/2.0.0-rc0/update-settings-defaults/migration.js
1645591
- var import_promises130 = require("fs/promises");
1645584
+ var import_promises129 = require("fs/promises");
1645592
1645585
  var migration20 = {
1645593
1645586
  name: "update-2_0_0-defaults",
1645594
1645587
  summary: `The default of 'coerce-enums-to-literals' has changed from true to false.
@@ -1645763,7 +1645756,7 @@ async function updateGeneratorsYml3({ context: context2, files }) {
1645763
1645756
  documentToWrite = `${schemaComment}
1645764
1645757
  ${documentToWrite}`;
1645765
1645758
  }
1645766
- await (0, import_promises130.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645759
+ await (0, import_promises129.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645767
1645760
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1645768
1645761
  }
1645769
1645762
  async function getFilesAndDirectories5(absoluteFilepath) {
@@ -1645809,7 +1645802,7 @@ var versionMigrations20 = {
1645809
1645802
  var __default20 = versionMigrations20;
1645810
1645803
 
1645811
1645804
  // ../cli-migrations/lib/migrations/2.13.0/migrate-deprecated-generator-api-settings/migration.js
1645812
- var import_promises131 = require("fs/promises");
1645805
+ var import_promises130 = require("fs/promises");
1645813
1645806
  var migration21 = {
1645814
1645807
  name: "migrate-deprecated-generator-api-settings",
1645815
1645808
  summary: `Migrates deprecated generator-level API settings keys to their new equivalents:
@@ -1645900,7 +1645893,7 @@ async function updateGeneratorsYml4({ context: context2, files }) {
1645900
1645893
  documentToWrite = `${schemaComment}
1645901
1645894
  ${documentToWrite}`;
1645902
1645895
  }
1645903
- await (0, import_promises131.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645896
+ await (0, import_promises130.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1645904
1645897
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1645905
1645898
  }
1645906
1645899
  function migrateDeprecatedSettings(settings, context2) {
@@ -1645946,7 +1645939,7 @@ var versionMigrations21 = {
1645946
1645939
  var __default21 = versionMigrations21;
1645947
1645940
 
1645948
1645941
  // ../cli-migrations/lib/migrations/3.0.0/enable-smart-casing/migration.js
1645949
- var import_promises132 = require("fs/promises");
1645942
+ var import_promises131 = require("fs/promises");
1645950
1645943
  var migration22 = {
1645951
1645944
  name: "enable-smart-casing",
1645952
1645945
  summary: `Sets 'smart-casing: false' for existing generators to preserve backwards compatibility.
@@ -1646030,7 +1646023,7 @@ async function updateGeneratorsYml5({ context: context2, files }) {
1646030
1646023
  documentToWrite = `${schemaComment}
1646031
1646024
  ${documentToWrite}`;
1646032
1646025
  }
1646033
- await (0, import_promises132.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1646026
+ await (0, import_promises131.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
1646034
1646027
  context2.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
1646035
1646028
  }
1646036
1646029
  function setSmartCasingFalseIfNotConfigured(generator, context2) {
@@ -1646171,7 +1646164,7 @@ ${source_default.dim(migration23.summary)}`
1646171
1646164
  }
1646172
1646165
 
1646173
1646166
  // src/commands/upgrade/upgrade.ts
1646174
- var import_promises133 = require("fs/promises");
1646167
+ var import_promises132 = require("fs/promises");
1646175
1646168
 
1646176
1646169
  // src/cwd.ts
1646177
1646170
  var FERN_CWD_ENV_VAR = "FERN_CWD";
@@ -1646488,7 +1646481,7 @@ async function upgrade({
1646488
1646481
  const newProjectConfig = produce(projectConfig2.rawConfig, (draft) => {
1646489
1646482
  draft.version = resolvedTargetVersion;
1646490
1646483
  });
1646491
- await (0, import_promises133.writeFile)(
1646484
+ await (0, import_promises132.writeFile)(
1646492
1646485
  projectConfig2._absolutePath,
1646493
1646486
  ensureFinalNewline2(JSON.stringify(newProjectConfig, void 0, 2))
1646494
1646487
  );
@@ -1646913,7 +1646906,7 @@ async function validateWorkspaces({
1646913
1646906
  }
1646914
1646907
 
1646915
1646908
  // src/commands/write-definition/writeDefinitionForWorkspaces.ts
1646916
- var import_promises134 = require("fs/promises");
1646909
+ var import_promises133 = require("fs/promises");
1646917
1646910
  var import_path58 = __toESM(require("path"), 1);
1646918
1646911
  async function writeDefinitionForWorkspaces({
1646919
1646912
  project,
@@ -1646994,27 +1646987,27 @@ async function writeFernDefinition({
1646994
1646987
  return a10.localeCompare(b18);
1646995
1646988
  };
1646996
1646989
  if (await doesPathExist(absolutePathToOutputDirectory)) {
1646997
- await (0, import_promises134.rm)(absolutePathToOutputDirectory, { recursive: true });
1646990
+ await (0, import_promises133.rm)(absolutePathToOutputDirectory, { recursive: true });
1646998
1646991
  }
1646999
- await (0, import_promises134.mkdir)(absolutePathToOutputDirectory, { recursive: true });
1647000
- await (0, import_promises134.writeFile)(
1646992
+ await (0, import_promises133.mkdir)(absolutePathToOutputDirectory, { recursive: true });
1646993
+ await (0, import_promises133.writeFile)(
1647001
1646994
  join2(absolutePathToOutputDirectory, RelativeFilePath2.of(ROOT_API_FILENAME)),
1647002
1646995
  jsYaml.dump(definition3.rootApiFile.contents, { sortKeys })
1647003
1646996
  );
1647004
1646997
  for (const [relativePath, packageMarker] of Object.entries(definition3.packageMarkers)) {
1647005
1646998
  const absoluteFilepath = join2(absolutePathToOutputDirectory, RelativeFilePath2.of(relativePath));
1647006
- await (0, import_promises134.mkdir)(dirname4(absoluteFilepath), { recursive: true });
1647007
- await (0, import_promises134.writeFile)(absoluteFilepath, jsYaml.dump(packageMarker.contents, { sortKeys }));
1646999
+ await (0, import_promises133.mkdir)(dirname4(absoluteFilepath), { recursive: true });
1647000
+ await (0, import_promises133.writeFile)(absoluteFilepath, jsYaml.dump(packageMarker.contents, { sortKeys }));
1647008
1647001
  }
1647009
1647002
  for (const [relativePath, definitionFile] of Object.entries(definition3.namedDefinitionFiles)) {
1647010
1647003
  const absoluteFilepath = join2(absolutePathToOutputDirectory, RelativeFilePath2.of(relativePath));
1647011
- await (0, import_promises134.mkdir)(dirname4(absoluteFilepath), { recursive: true });
1647012
- await (0, import_promises134.writeFile)(absoluteFilepath, jsYaml.dump(definitionFile.contents, { sortKeys }));
1647004
+ await (0, import_promises133.mkdir)(dirname4(absoluteFilepath), { recursive: true });
1647005
+ await (0, import_promises133.writeFile)(absoluteFilepath, jsYaml.dump(definitionFile.contents, { sortKeys }));
1647013
1647006
  }
1647014
1647007
  }
1647015
1647008
 
1647016
1647009
  // src/commands/write-docs-definition/writeDocsDefinitionForProject.ts
1647017
- var import_promises135 = require("fs/promises");
1647010
+ var import_promises134 = require("fs/promises");
1647018
1647011
  async function writeDocsDefinitionForProject({
1647019
1647012
  project,
1647020
1647013
  outputPath,
@@ -1647046,7 +1647039,7 @@ async function writeDocsDefinitionForProject({
1647046
1647039
  targetAudiences: docsWorkspace.config.instances[0]?.audiences ? Array.isArray(docsWorkspace.config.instances[0].audiences) ? docsWorkspace.config.instances[0].audiences : [docsWorkspace.config.instances[0].audiences] : void 0
1647047
1647040
  });
1647048
1647041
  const docsDefinition = await docsResolver.resolve();
1647049
- await (0, import_promises135.writeFile)(AbsoluteFilePath2.of(outputPath), JSON.stringify(docsDefinition, null, 2));
1647042
+ await (0, import_promises134.writeFile)(AbsoluteFilePath2.of(outputPath), JSON.stringify(docsDefinition, null, 2));
1647050
1647043
  context2.logger.info(source_default.green(`Docs definition written to ${outputPath}`));
1647051
1647044
  });
1647052
1647045
  }
@@ -1647054,7 +1647047,7 @@ async function writeDocsDefinitionForProject({
1647054
1647047
  // src/commands/write-translation/writeTranslationForProject.ts
1647055
1647048
  var import_cli_progress2 = __toESM(require_cli_progress(), 1);
1647056
1647049
  var import_fs21 = require("fs");
1647057
- var import_promises139 = require("fs/promises");
1647050
+ var import_promises138 = require("fs/promises");
1647058
1647051
  var import_is_ci2 = __toESM(require_is_ci(), 1);
1647059
1647052
  var import_path61 = __toESM(require("path"), 1);
1647060
1647053
 
@@ -1647539,7 +1647532,7 @@ function shouldProcessFile(filePath, stub) {
1647539
1647532
  }
1647540
1647533
 
1647541
1647534
  // src/commands/write-translation/docs-config-utils.ts
1647542
- var import_promises136 = require("fs/promises");
1647535
+ var import_promises135 = require("fs/promises");
1647543
1647536
 
1647544
1647537
  // src/commands/write-translation/url-utils.ts
1647545
1647538
  function addLanguageSuffixToUrl(url2, language) {
@@ -1647696,7 +1647689,7 @@ async function createLanguageSpecificDocsConfig({
1647696
1647689
  stub = false
1647697
1647690
  }) {
1647698
1647691
  try {
1647699
- const originalConfigContent = await (0, import_promises136.readFile)(originalDocsConfigPath, "utf-8");
1647692
+ const originalConfigContent = await (0, import_promises135.readFile)(originalDocsConfigPath, "utf-8");
1647700
1647693
  const transformation = {
1647701
1647694
  filePath: DOCS_CONFIGURATION_FILENAME,
1647702
1647695
  language,
@@ -1647710,7 +1647703,7 @@ async function createLanguageSpecificDocsConfig({
1647710
1647703
  const modifiedConfigContent = jsYaml.dump(modifiedConfig, {
1647711
1647704
  sortKeys: false
1647712
1647705
  });
1647713
- await (0, import_promises136.writeFile)(modifiedConfigPath, modifiedConfigContent, "utf-8");
1647706
+ await (0, import_promises135.writeFile)(modifiedConfigPath, modifiedConfigContent, "utf-8");
1647714
1647707
  context2.logger.debug(`Created language-specific docs config: ${modifiedConfigPath}`);
1647715
1647708
  } catch (error2) {
1647716
1647709
  if (error2 instanceof Error && error2.message.includes("403")) {
@@ -1647722,11 +1647715,11 @@ async function createLanguageSpecificDocsConfig({
1647722
1647715
 
1647723
1647716
  // src/commands/write-translation/file-collection-utils.ts
1647724
1647717
  var import_fs19 = require("fs");
1647725
- var import_promises137 = require("fs/promises");
1647718
+ var import_promises136 = require("fs/promises");
1647726
1647719
  var import_path59 = __toESM(require("path"), 1);
1647727
1647720
  async function collectFiles(baseDirectory, relativeBase) {
1647728
1647721
  const discoveredFiles = {};
1647729
- const entries10 = await (0, import_promises137.readdir)(baseDirectory);
1647722
+ const entries10 = await (0, import_promises136.readdir)(baseDirectory);
1647730
1647723
  for (const entry of entries10) {
1647731
1647724
  if (entry === "translations") {
1647732
1647725
  continue;
@@ -1647749,7 +1647742,7 @@ async function collectFiles(baseDirectory, relativeBase) {
1647749
1647742
  // src/commands/write-translation/hash-utils.ts
1647750
1647743
  var import_crypto10 = require("crypto");
1647751
1647744
  var import_fs20 = require("fs");
1647752
- var import_promises138 = require("fs/promises");
1647745
+ var import_promises137 = require("fs/promises");
1647753
1647746
  var import_path60 = __toESM(require("path"), 1);
1647754
1647747
  function calculateContentHash(content5) {
1647755
1647748
  return (0, import_crypto10.createHash)("sha256").update(content5, "utf-8").digest("hex");
@@ -1647760,7 +1647753,7 @@ async function loadHashMappings(translationsDirectory) {
1647760
1647753
  return {};
1647761
1647754
  }
1647762
1647755
  try {
1647763
- const hashesContent = await (0, import_promises138.readFile)(hashesFilePath, "utf-8");
1647756
+ const hashesContent = await (0, import_promises137.readFile)(hashesFilePath, "utf-8");
1647764
1647757
  const parsed = JSON.parse(hashesContent);
1647765
1647758
  const { _comment, ...hashMappings } = parsed;
1647766
1647759
  return hashMappings;
@@ -1647781,11 +1647774,11 @@ async function saveHashMappings(translationsDirectory, hashMappings) {
1647781
1647774
  _comment: "This file is auto-generated by Fern to track source file changes for translation purposes. Do not edit manually - it will be overwritten on the next translation update.",
1647782
1647775
  ...sortedMappings
1647783
1647776
  };
1647784
- await (0, import_promises138.writeFile)(hashesFilePath, JSON.stringify(fileContent, null, 2), "utf-8");
1647777
+ await (0, import_promises137.writeFile)(hashesFilePath, JSON.stringify(fileContent, null, 2), "utf-8");
1647785
1647778
  }
1647786
1647779
  async function hasFileChanged(filePath, relativePath, previousHashes) {
1647787
1647780
  try {
1647788
- const content5 = await (0, import_promises138.readFile)(filePath, "utf-8");
1647781
+ const content5 = await (0, import_promises137.readFile)(filePath, "utf-8");
1647789
1647782
  const currentHash = calculateContentHash(content5);
1647790
1647783
  const previousHash = previousHashes[relativePath];
1647791
1647784
  return currentHash !== previousHash;
@@ -1647838,7 +1647831,7 @@ async function writeTranslationForProject({
1647838
1647831
  }
1647839
1647832
  if (!(0, import_fs21.existsSync)(translationsDirectory)) {
1647840
1647833
  context2.logger.debug(`Creating translations directory at: ${translationsDirectory}`);
1647841
- await (0, import_promises139.mkdir)(translationsDirectory, { recursive: true });
1647834
+ await (0, import_promises138.mkdir)(translationsDirectory, { recursive: true });
1647842
1647835
  }
1647843
1647836
  const languageStats = {};
1647844
1647837
  const targetLanguages = languages.filter((lang) => lang !== sourceLanguage);
@@ -1647851,7 +1647844,7 @@ async function writeTranslationForProject({
1647851
1647844
  RelativeFilePath2.of("fern")
1647852
1647845
  );
1647853
1647846
  if (!(0, import_fs21.existsSync)(languageDirectory)) {
1647854
- await (0, import_promises139.mkdir)(languageDirectory, { recursive: true });
1647847
+ await (0, import_promises138.mkdir)(languageDirectory, { recursive: true });
1647855
1647848
  }
1647856
1647849
  languageStats[language] = {
1647857
1647850
  filesProcessed: 0,
@@ -1647953,7 +1647946,7 @@ async function writeTranslationForProject({
1647953
1647946
  `[COMPLETED] ${DOCS_CONFIGURATION_FILENAME} -> ${language}/${DOCS_CONFIGURATION_FILENAME}`
1647954
1647947
  );
1647955
1647948
  }
1647956
- const originalConfigContent = await (0, import_promises139.readFile)(originalDocsConfigPath, "utf-8");
1647949
+ const originalConfigContent = await (0, import_promises138.readFile)(originalDocsConfigPath, "utf-8");
1647957
1647950
  await updateAndSaveHashForFile(
1647958
1647951
  translationsDirectory,
1647959
1647952
  hashMappings,
@@ -1647998,7 +1647991,7 @@ async function writeTranslationForProject({
1647998
1647991
  continue;
1647999
1647992
  }
1648000
1647993
  cliContext.logger.debug(`[PROCESSING] ${relativePath} (detected changes)`);
1648001
- const originalContent = await (0, import_promises139.readFile)(filePath, "utf-8");
1647994
+ const originalContent = await (0, import_promises138.readFile)(filePath, "utf-8");
1648002
1647995
  await updateAndSaveHashForFile(translationsDirectory, hashMappings, relativePath, originalContent);
1648003
1647996
  const sourceStats = languageStats[sourceLanguage];
1648004
1647997
  if (sourceStats) {
@@ -1648023,7 +1648016,7 @@ async function writeTranslationForProject({
1648023
1648016
  const destPath = join2(languageDirectory, relativePath);
1648024
1648017
  const destDir = import_path61.default.dirname(destPath);
1648025
1648018
  if (!(0, import_fs21.existsSync)(destDir)) {
1648026
- await (0, import_promises139.mkdir)(destDir, { recursive: true });
1648019
+ await (0, import_promises138.mkdir)(destDir, { recursive: true });
1648027
1648020
  }
1648028
1648021
  const transformation = {
1648029
1648022
  filePath: relativePath,
@@ -1648036,7 +1648029,7 @@ async function writeTranslationForProject({
1648036
1648029
  cliContext,
1648037
1648030
  stub
1648038
1648031
  });
1648039
- await (0, import_promises139.writeFile)(destPath, transformedContent, "utf-8");
1648032
+ await (0, import_promises138.writeFile)(destPath, transformedContent, "utf-8");
1648040
1648033
  const languageStatsForLang = languageStats[language];
1648041
1648034
  if (languageStatsForLang) {
1648042
1648035
  languageStatsForLang.filesProcessed++;
@@ -1648067,9 +1648060,9 @@ async function writeTranslationForProject({
1648067
1648060
  const destPath = join2(languageDirectory, relativePath);
1648068
1648061
  const destDir = import_path61.default.dirname(destPath);
1648069
1648062
  if (!(0, import_fs21.existsSync)(destDir)) {
1648070
- await (0, import_promises139.mkdir)(destDir, { recursive: true });
1648063
+ await (0, import_promises138.mkdir)(destDir, { recursive: true });
1648071
1648064
  }
1648072
- await (0, import_promises139.copyFile)(filePath, destPath);
1648065
+ await (0, import_promises138.copyFile)(filePath, destPath);
1648073
1648066
  assetsCopied++;
1648074
1648067
  cliContext.logger.debug(`[ASSET COPIED] ${relativePath} -> ${language}/${relativePath}`);
1648075
1648068
  }