@fern-api/fern-api-dev 5.65.0 → 5.65.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 +555 -485
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -6326,7 +6326,7 @@ var require_has_flag = __commonJS({
6326
6326
  var require_supports_color = __commonJS({
6327
6327
  "../../../node_modules/.pnpm/supports-color@4.5.0/node_modules/supports-color/index.js"(exports2, module4) {
6328
6328
  "use strict";
6329
- var os22 = require("os");
6329
+ var os23 = require("os");
6330
6330
  var hasFlag2 = require_has_flag();
6331
6331
  var env5 = process.env;
6332
6332
  var support = (level) => {
@@ -6357,7 +6357,7 @@ var require_supports_color = __commonJS({
6357
6357
  return 0;
6358
6358
  }
6359
6359
  if (process.platform === "win32") {
6360
- const osRelease = os22.release().split(".");
6360
+ const osRelease = os23.release().split(".");
6361
6361
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
6362
6362
  return 2;
6363
6363
  }
@@ -53342,15 +53342,15 @@ var require_tmp = __commonJS({
53342
53342
  "../../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js"(exports2, module4) {
53343
53343
  "use strict";
53344
53344
  var fs34 = require("fs");
53345
- var os22 = require("os");
53345
+ var os23 = require("os");
53346
53346
  var path119 = require("path");
53347
53347
  var crypto5 = require("crypto");
53348
- var _c3 = { fs: fs34.constants, os: os22.constants };
53348
+ var _c3 = { fs: fs34.constants, os: os23.constants };
53349
53349
  var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
53350
53350
  var TEMPLATE_PATTERN = /XXXXXX/;
53351
53351
  var DEFAULT_TRIES = 3;
53352
53352
  var CREATE_FLAGS = (_c3.O_CREAT || _c3.fs.O_CREAT) | (_c3.O_EXCL || _c3.fs.O_EXCL) | (_c3.O_RDWR || _c3.fs.O_RDWR);
53353
- var IS_WIN32 = os22.platform() === "win32";
53353
+ var IS_WIN32 = os23.platform() === "win32";
53354
53354
  var EBADF = _c3.EBADF || _c3.os.errno.EBADF;
53355
53355
  var ENOENT2 = _c3.ENOENT || _c3.os.errno.ENOENT;
53356
53356
  var DIR_MODE = 448;
@@ -53689,10 +53689,10 @@ var require_tmp = __commonJS({
53689
53689
  _gracefulCleanup = true;
53690
53690
  }
53691
53691
  function _getTmpDir(options2, cb) {
53692
- return fs34.realpath(options2 && options2.tmpdir || os22.tmpdir(), cb);
53692
+ return fs34.realpath(options2 && options2.tmpdir || os23.tmpdir(), cb);
53693
53693
  }
53694
53694
  function _getTmpDirSync(options2) {
53695
- return fs34.realpathSync(options2 && options2.tmpdir || os22.tmpdir());
53695
+ return fs34.realpathSync(options2 && options2.tmpdir || os23.tmpdir());
53696
53696
  }
53697
53697
  process.addListener(EXIT3, _garbageCollector);
53698
53698
  Object.defineProperty(module4.exports, "tmpdir", {
@@ -100116,8 +100116,8 @@ var require_graceful_fs = __commonJS({
100116
100116
  }
100117
100117
  }
100118
100118
  var fs$writeFile = fs35.writeFile;
100119
- fs35.writeFile = writeFile99;
100120
- function writeFile99(path119, data2, options2, cb) {
100119
+ fs35.writeFile = writeFile100;
100120
+ function writeFile100(path119, data2, options2, cb) {
100121
100121
  if (typeof options2 === "function")
100122
100122
  cb = options2, options2 = null;
100123
100123
  return go$writeFile(path119, data2, options2, cb);
@@ -101261,9 +101261,9 @@ var require_conf = __commonJS({
101261
101261
  var require_defaults2 = __commonJS({
101262
101262
  "../../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
101263
101263
  "use strict";
101264
- var os22 = require("os");
101264
+ var os23 = require("os");
101265
101265
  var path119 = require("path");
101266
- var temp = os22.tmpdir();
101266
+ var temp = os23.tmpdir();
101267
101267
  var uidOrPid = process.getuid ? process.getuid() : process.pid;
101268
101268
  var hasUnicode2 = () => true;
101269
101269
  var isWindows = process.platform === "win32";
@@ -101274,7 +101274,7 @@ var require_defaults2 = __commonJS({
101274
101274
  var umask = {
101275
101275
  fromString: () => process.umask()
101276
101276
  };
101277
- var home = os22.homedir();
101277
+ var home = os23.homedir();
101278
101278
  if (home) {
101279
101279
  process.env.HOME = home;
101280
101280
  } else {
@@ -355629,7 +355629,7 @@ var require_stdio = __commonJS({
355629
355629
  var require_kill = __commonJS({
355630
355630
  "../../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module4) {
355631
355631
  "use strict";
355632
- var os22 = require("os");
355632
+ var os23 = require("os");
355633
355633
  var onExit2 = require_signal_exit();
355634
355634
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
355635
355635
  var spawnedKill = (kill, signal = "SIGTERM", options2 = {}) => {
@@ -355653,7 +355653,7 @@ var require_kill = __commonJS({
355653
355653
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
355654
355654
  };
355655
355655
  var isSigterm = (signal) => {
355656
- return signal === os22.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
355656
+ return signal === os23.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
355657
355657
  };
355658
355658
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
355659
355659
  if (forceKillAfterTimeout === true) {
@@ -388861,7 +388861,7 @@ var require_has_flag2 = __commonJS({
388861
388861
  var require_supports_color2 = __commonJS({
388862
388862
  "../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module4) {
388863
388863
  "use strict";
388864
- var os22 = require("os");
388864
+ var os23 = require("os");
388865
388865
  var tty2 = require("tty");
388866
388866
  var hasFlag2 = require_has_flag2();
388867
388867
  var { env: env5 } = process;
@@ -388909,7 +388909,7 @@ var require_supports_color2 = __commonJS({
388909
388909
  return min;
388910
388910
  }
388911
388911
  if (process.platform === "win32") {
388912
- const osRelease = os22.release().split(".");
388912
+ const osRelease = os23.release().split(".");
388913
388913
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
388914
388914
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
388915
388915
  }
@@ -407507,7 +407507,7 @@ var require_main2 = __commonJS({
407507
407507
  "use strict";
407508
407508
  var fs34 = require("fs");
407509
407509
  var path119 = require("path");
407510
- var os22 = require("os");
407510
+ var os23 = require("os");
407511
407511
  var crypto5 = require("crypto");
407512
407512
  var packageJson2 = require_package4();
407513
407513
  var version7 = packageJson2.version;
@@ -407630,7 +407630,7 @@ var require_main2 = __commonJS({
407630
407630
  return null;
407631
407631
  }
407632
407632
  function _resolveHome(envPath) {
407633
- return envPath[0] === "~" ? path119.join(os22.homedir(), envPath.slice(1)) : envPath;
407633
+ return envPath[0] === "~" ? path119.join(os23.homedir(), envPath.slice(1)) : envPath;
407634
407634
  }
407635
407635
  function _configVault(options2) {
407636
407636
  const debug9 = Boolean(options2 && options2.debug);
@@ -456668,13 +456668,13 @@ async function removeInvalidAiExamples({ sourceFilePath, context: context3 }) {
456668
456668
  }
456669
456669
  }
456670
456670
  }
456671
- const { writeFile: writeFile99 } = await import("fs/promises");
456671
+ const { writeFile: writeFile100 } = await import("fs/promises");
456672
456672
  const yamlContent = index_vite_proxy_tmp_default.dump(parsed, {
456673
456673
  indent: 2,
456674
456674
  lineWidth: -1,
456675
456675
  noRefs: true
456676
456676
  });
456677
- await writeFile99(overrideFilePath, yamlContent, "utf-8");
456677
+ await writeFile100(overrideFilePath, yamlContent, "utf-8");
456678
456678
  context3.logger.info(`Removed ${validationResult.invalidCount} invalid AI examples from ai_examples_override.yml`);
456679
456679
  return {
456680
456680
  removedCount: validationResult.invalidCount,
@@ -479932,8 +479932,8 @@ var require_graceful_fs2 = __commonJS({
479932
479932
  }
479933
479933
  }
479934
479934
  var fs$writeFile = fs35.writeFile;
479935
- fs35.writeFile = writeFile99;
479936
- function writeFile99(path119, data2, options2, cb) {
479935
+ fs35.writeFile = writeFile100;
479936
+ function writeFile100(path119, data2, options2, cb) {
479937
479937
  if (typeof options2 === "function")
479938
479938
  cb = options2, options2 = null;
479939
479939
  return go$writeFile(path119, data2, options2, cb);
@@ -560756,7 +560756,7 @@ async function unpackArchive(archivePath, folderPath) {
560756
560756
  } else if (archivePath.endsWith(".tar.bz2")) {
560757
560757
  await extractTar(archivePath, folderPath, "bzip2");
560758
560758
  } else if (archivePath.endsWith(".dmg")) {
560759
- await (0, import_promises101.mkdir)(folderPath);
560759
+ await (0, import_promises102.mkdir)(folderPath);
560760
560760
  await installDMG(archivePath, folderPath);
560761
560761
  } else if (archivePath.endsWith(".exe")) {
560762
560762
  const result = (0, import_node_child_process11.spawnSync)(archivePath, [`/ExtractDir=${folderPath}`], {
@@ -560845,7 +560845,7 @@ async function installDMG(dmgPath, folderPath) {
560845
560845
  }
560846
560846
  const mountPath = volumes[0];
560847
560847
  try {
560848
- const fileNames = await (0, import_promises101.readdir)(mountPath);
560848
+ const fileNames = await (0, import_promises102.readdir)(mountPath);
560849
560849
  const appName = fileNames.find((item) => {
560850
560850
  return typeof item === "string" && item.endsWith(".app");
560851
560851
  });
@@ -560858,13 +560858,13 @@ async function installDMG(dmgPath, folderPath) {
560858
560858
  (0, import_node_child_process11.spawnSync)("hdiutil", ["detach", mountPath, "-quiet"]);
560859
560859
  }
560860
560860
  }
560861
- var import_node_child_process11, import_node_fs26, import_promises101, path76, import_node_stream6, import_debug8, debugFileUtil, internalConstantsForTesting;
560861
+ var import_node_child_process11, import_node_fs26, import_promises102, path76, import_node_stream6, import_debug8, debugFileUtil, internalConstantsForTesting;
560862
560862
  var init_fileUtil = __esm({
560863
560863
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js"() {
560864
560864
  "use strict";
560865
560865
  import_node_child_process11 = require("child_process");
560866
560866
  import_node_fs26 = require("fs");
560867
- import_promises101 = require("fs/promises");
560867
+ import_promises102 = require("fs/promises");
560868
560868
  path76 = __toESM(require("path"), 1);
560869
560869
  import_node_stream6 = require("stream");
560870
560870
  import_debug8 = __toESM(require_src(), 1);
@@ -560927,7 +560927,7 @@ async function installWithProviders(options2) {
560927
560927
  }
560928
560928
  debugInstall(`Successfully got URL from ${provider.getName()}: ${url3}`);
560929
560929
  if (!(0, import_node_fs27.existsSync)(browserRoot)) {
560930
- await (0, import_promises102.mkdir)(browserRoot, { recursive: true });
560930
+ await (0, import_promises103.mkdir)(browserRoot, { recursive: true });
560931
560931
  }
560932
560932
  return await installUrl(url3, options2, provider);
560933
560933
  } catch (err) {
@@ -561000,7 +561000,7 @@ async function installUrl(url3, options2, provider) {
561000
561000
  const browserRoot = cache2.browserRoot(options2.browser);
561001
561001
  const archivePath = import_node_path32.default.join(browserRoot, `${options2.buildId}-${fileName}`);
561002
561002
  if (!(0, import_node_fs27.existsSync)(browserRoot)) {
561003
- await (0, import_promises102.mkdir)(browserRoot, { recursive: true });
561003
+ await (0, import_promises103.mkdir)(browserRoot, { recursive: true });
561004
561004
  }
561005
561005
  if (!options2.unpack) {
561006
561006
  if ((0, import_node_fs27.existsSync)(archivePath)) {
@@ -561064,7 +561064,7 @@ async function installUrl(url3, options2, provider) {
561064
561064
  return installedBrowser;
561065
561065
  } finally {
561066
561066
  if ((0, import_node_fs27.existsSync)(archivePath)) {
561067
- await (0, import_promises102.unlink)(archivePath);
561067
+ await (0, import_promises103.unlink)(archivePath);
561068
561068
  }
561069
561069
  }
561070
561070
  }
@@ -561144,14 +561144,14 @@ function toMegabytes(bytes) {
561144
561144
  const mb = bytes / 1e3 / 1e3;
561145
561145
  return `${Math.round(mb * 10) / 10} MB`;
561146
561146
  }
561147
- var import_node_assert3, import_node_child_process12, import_node_fs27, import_promises102, import_node_os10, import_node_path32, import_progress, debugInstall, times;
561147
+ var import_node_assert3, import_node_child_process12, import_node_fs27, import_promises103, import_node_os10, import_node_path32, import_progress, debugInstall, times;
561148
561148
  var init_install = __esm({
561149
561149
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/install.js"() {
561150
561150
  "use strict";
561151
561151
  import_node_assert3 = __toESM(require("assert"), 1);
561152
561152
  import_node_child_process12 = require("child_process");
561153
561153
  import_node_fs27 = require("fs");
561154
- import_promises102 = require("fs/promises");
561154
+ import_promises103 = require("fs/promises");
561155
561155
  import_node_os10 = __toESM(require("os"), 1);
561156
561156
  import_node_path32 = __toESM(require("path"), 1);
561157
561157
  import_progress = __toESM(require_progress(), 1);
@@ -562231,9 +562231,9 @@ var require_env_paths = __commonJS({
562231
562231
  "../../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports2, module4) {
562232
562232
  "use strict";
562233
562233
  var path119 = require("path");
562234
- var os22 = require("os");
562235
- var homedir11 = os22.homedir();
562236
- var tmpdir5 = os22.tmpdir();
562234
+ var os23 = require("os");
562235
+ var homedir11 = os23.homedir();
562236
+ var tmpdir5 = os23.tmpdir();
562237
562237
  var { env: env5 } = process;
562238
562238
  var macos = (name2) => {
562239
562239
  const library = path119.join(homedir11, "Library");
@@ -563078,7 +563078,7 @@ async function tryRunContainer({ logger: logger4, imageName, args, binds, envVar
563078
563078
  const logs4 = stdout + stderr;
563079
563079
  if (writeLogsToFile) {
563080
563080
  const tmpFile = await import_tmp_promise10.default.file();
563081
- await (0, import_promises106.writeFile)(tmpFile.path, logs4);
563081
+ await (0, import_promises107.writeFile)(tmpFile.path, logs4);
563082
563082
  logger4.info(`Generator logs here: ${tmpFile.path}`);
563083
563083
  }
563084
563084
  if (exitCode == null) {
@@ -563138,7 +563138,7 @@ async function execInContainer({ logger: logger4, containerId, command: command3
563138
563138
  const logs4 = stdout + stderr;
563139
563139
  if (writeLogsToFile) {
563140
563140
  const tmpFile = await import_tmp_promise10.default.file();
563141
- await (0, import_promises106.writeFile)(tmpFile.path, logs4);
563141
+ await (0, import_promises107.writeFile)(tmpFile.path, logs4);
563142
563142
  logger4.info(`Generator logs here: ${tmpFile.path}`);
563143
563143
  }
563144
563144
  const resolvedExitCode = exitCode ?? 1;
@@ -563180,12 +563180,12 @@ async function stopContainer({ logger: logger4, containerId, runner }) {
563180
563180
  doNotPipeOutput: true
563181
563181
  });
563182
563182
  }
563183
- var import_promises106, import_tmp_promise10, runDocker;
563183
+ var import_promises107, import_tmp_promise10, runDocker;
563184
563184
  var init_runDocker = __esm({
563185
563185
  "../generation/local-generation/docker-utils/lib/runDocker.js"() {
563186
563186
  "use strict";
563187
563187
  init_lib33();
563188
- import_promises106 = require("fs/promises");
563188
+ import_promises107 = require("fs/promises");
563189
563189
  import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
563190
563190
  runDocker = runContainer;
563191
563191
  }
@@ -573161,7 +573161,7 @@ var require_dist24 = __commonJS({
573161
573161
  return copy;
573162
573162
  }
573163
573163
  };
573164
- var import_promises215 = require("fs/promises");
573164
+ var import_promises216 = require("fs/promises");
573165
573165
  var import_node_path310 = require("path");
573166
573166
  async function resolveInputs(args) {
573167
573167
  const {
@@ -573214,7 +573214,7 @@ var require_dist24 = __commonJS({
573214
573214
  }
573215
573215
  }
573216
573216
  const oursPath = (0, import_node_path310.join)(outputDir, resolvedPath);
573217
- const ours = await (0, import_promises215.readFile)(oursPath, "utf-8").catch(() => null);
573217
+ const ours = await (0, import_promises216.readFile)(oursPath, "utf-8").catch(() => null);
573218
573218
  let ghostTheirs = null;
573219
573219
  let baseTreeUnreachable = false;
573220
573220
  if (!base4 && !renameSourcePath) {
@@ -573456,7 +573456,7 @@ var require_dist24 = __commonJS({
573456
573456
  conflictReasonHint
573457
573457
  };
573458
573458
  }
573459
- var import_promises216 = require("fs/promises");
573459
+ var import_promises217 = require("fs/promises");
573460
573460
  var import_node_path45 = require("path");
573461
573461
  async function runMergeAndRecord(args) {
573462
573462
  const { plan, inputs, patch: patch5, accumulator } = args;
@@ -573466,14 +573466,14 @@ var require_dist24 = __commonJS({
573466
573466
  }
573467
573467
  if (plan.kind === "new-file-only-user") {
573468
573468
  accumulator.recordMerge(resolvedPath, plan.theirs, patch5.base_generation);
573469
- await (0, import_promises216.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573470
- await (0, import_promises216.writeFile)(oursPath, plan.theirs);
573469
+ await (0, import_promises217.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573470
+ await (0, import_promises217.writeFile)(oursPath, plan.theirs);
573471
573471
  return { file: resolvedPath, status: "merged", reason: "new-file" };
573472
573472
  }
573473
573473
  if (plan.kind === "new-file-both") {
573474
573474
  const merged2 = threeWayMerge("", ours, plan.theirs);
573475
- await (0, import_promises216.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573476
- await (0, import_promises216.writeFile)(oursPath, merged2.content);
573475
+ await (0, import_promises217.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573476
+ await (0, import_promises217.writeFile)(oursPath, merged2.content);
573477
573477
  const unreachableFlag = plan.baseTreeUnreachable ? { baseTreeUnreachable: true } : {};
573478
573478
  if (merged2.hasConflicts) {
573479
573479
  return {
@@ -573489,8 +573489,8 @@ var require_dist24 = __commonJS({
573489
573489
  return { file: resolvedPath, status: "merged", ...unreachableFlag };
573490
573490
  }
573491
573491
  const merged = threeWayMerge(plan.mergeBase, ours, plan.theirs);
573492
- await (0, import_promises216.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573493
- await (0, import_promises216.writeFile)(oursPath, merged.content);
573492
+ await (0, import_promises217.mkdir)((0, import_node_path45.dirname)(oursPath), { recursive: true });
573493
+ await (0, import_promises217.writeFile)(oursPath, merged.content);
573494
573494
  if (merged.hasConflicts) {
573495
573495
  accumulator.recordConflict(resolvedPath, plan.theirs, patch5.base_generation);
573496
573496
  return {
@@ -590260,13 +590260,13 @@ async function buildTranslatedDocsDefinition({ docsDefinition, locale, localePag
590260
590260
  };
590261
590261
  const localeAwareMarkdownLoader = async (filepath) => {
590262
590262
  const pathToRead = await resolveLocalePath(filepath);
590263
- const raw = await (0, import_promises119.readFile)(pathToRead, "utf-8");
590263
+ const raw = await (0, import_promises120.readFile)(pathToRead, "utf-8");
590264
590264
  const fmMatch = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);
590265
590265
  return fmMatch != null ? raw.slice(fmMatch[0].length) : raw;
590266
590266
  };
590267
590267
  const localeAwareFileLoader = async (filepath) => {
590268
590268
  const pathToRead = await resolveLocalePath(filepath);
590269
- return (0, import_promises119.readFile)(pathToRead, "utf-8");
590269
+ return (0, import_promises120.readFile)(pathToRead, "utf-8");
590270
590270
  };
590271
590271
  const translatedPageEntries = await Promise.all(Object.entries(localePages).map(async ([path119, rawMarkdown]) => {
590272
590272
  try {
@@ -590342,13 +590342,13 @@ async function buildTranslatedDocsDefinition({ docsDefinition, locale, localePag
590342
590342
  }
590343
590343
  };
590344
590344
  }
590345
- var import_promises119;
590345
+ var import_promises120;
590346
590346
  var init_buildTranslatedDocsDefinition = __esm({
590347
590347
  "../generation/remote-generation/remote-workspace-runner/lib/buildTranslatedDocsDefinition.js"() {
590348
590348
  "use strict";
590349
590349
  init_lib67();
590350
590350
  init_lib8();
590351
- import_promises119 = require("fs/promises");
590351
+ import_promises120 = require("fs/promises");
590352
590352
  }
590353
590353
  });
590354
590354
 
@@ -620797,7 +620797,7 @@ async function readFernYmlRaw(start2) {
620797
620797
  for (let i5 = 0; i5 < 50; i5++) {
620798
620798
  const candidate = (0, import_path102.resolve)(dir, "fern.yml");
620799
620799
  try {
620800
- const content5 = await (0, import_promises143.readFile)(candidate, "utf-8");
620800
+ const content5 = await (0, import_promises144.readFile)(candidate, "utf-8");
620801
620801
  const parsed = index_vite_proxy_tmp_default.load(content5);
620802
620802
  if (isRawFernYml(parsed)) {
620803
620803
  return parsed;
@@ -620845,11 +620845,11 @@ function extractInstances(raw) {
620845
620845
  }
620846
620846
  return raw.docs.instances.flatMap((inst) => typeof inst?.url === "string" ? [inst.url] : []);
620847
620847
  }
620848
- var import_promises143, import_path102;
620848
+ var import_promises144, import_path102;
620849
620849
  var init_completion2 = __esm({
620850
620850
  "../cli-v2/lib/completion.js"() {
620851
620851
  "use strict";
620852
- import_promises143 = require("fs/promises");
620852
+ import_promises144 = require("fs/promises");
620853
620853
  init_js_yaml();
620854
620854
  import_path102 = require("path");
620855
620855
  }
@@ -622013,7 +622013,7 @@ var require_jsonfile = __commonJS({
622013
622013
  const str2 = stringify5(obj, options2);
622014
622014
  await universalify.fromCallback(fs34.writeFile)(file4, str2, options2);
622015
622015
  }
622016
- var writeFile99 = universalify.fromPromise(_writeFile);
622016
+ var writeFile100 = universalify.fromPromise(_writeFile);
622017
622017
  function writeFileSync9(file4, obj, options2 = {}) {
622018
622018
  const fs34 = options2.fs || _fs;
622019
622019
  const str2 = stringify5(obj, options2);
@@ -622022,7 +622022,7 @@ var require_jsonfile = __commonJS({
622022
622022
  module4.exports = {
622023
622023
  readFile: readFile119,
622024
622024
  readFileSync: readFileSync19,
622025
- writeFile: writeFile99,
622025
+ writeFile: writeFile100,
622026
622026
  writeFileSync: writeFileSync9
622027
622027
  };
622028
622028
  }
@@ -688404,7 +688404,7 @@ var AccessTokenPosthogManager = class {
688404
688404
  properties: {
688405
688405
  ...event,
688406
688406
  ...event.properties,
688407
- version: "5.65.0",
688407
+ version: "5.65.1",
688408
688408
  usingAccessToken: true,
688409
688409
  ...getRunIdProperties()
688410
688410
  }
@@ -688470,7 +688470,7 @@ var UserPosthogManager = class {
688470
688470
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
688471
688471
  event: "CLI",
688472
688472
  properties: {
688473
- version: "5.65.0",
688473
+ version: "5.65.1",
688474
688474
  ...event,
688475
688475
  ...event.properties,
688476
688476
  usingAccessToken: false,
@@ -869551,8 +869551,9 @@ var import_child_process7 = require("child_process");
869551
869551
  var import_cors = __toESM(require_lib13(), 1);
869552
869552
  var import_express3 = __toESM(require_express3(), 1);
869553
869553
  var import_fs30 = __toESM(require("fs"), 1);
869554
- var import_promises99 = require("fs/promises");
869554
+ var import_promises100 = require("fs/promises");
869555
869555
  var import_http9 = __toESM(require("http"), 1);
869556
+ var import_os11 = __toESM(require("os"), 1);
869556
869557
  var import_path71 = __toESM(require("path"), 1);
869557
869558
  init_wrapper();
869558
869559
 
@@ -869565,7 +869566,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
869565
869566
  var LOGS_FOLDER_NAME = "logs";
869566
869567
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
869567
869568
  function getCliSource() {
869568
- const version7 = "5.65.0";
869569
+ const version7 = "5.65.1";
869569
869570
  return `cli@${version7}`;
869570
869571
  }
869571
869572
  var DebugLogger = class {
@@ -872654,6 +872655,43 @@ var ReferencedAPICollectorV2 = class {
872654
872655
  }
872655
872656
  };
872656
872657
 
872658
+ // ../docs-preview/lib/reloadUtils.js
872659
+ var import_promises99 = require("fs/promises");
872660
+ function isContentOnlyEdit(editedFilepaths) {
872661
+ if (editedFilepaths == null || editedFilepaths.length === 0) {
872662
+ return false;
872663
+ }
872664
+ return editedFilepaths.every((f3) => {
872665
+ const lower = f3.toLowerCase();
872666
+ return lower.endsWith(".md") || lower.endsWith(".mdx");
872667
+ });
872668
+ }
872669
+ var GenerationFileManager = class {
872670
+ filePath;
872671
+ generation = 0;
872672
+ constructor(filePath) {
872673
+ this.filePath = filePath;
872674
+ }
872675
+ /** Current generation value. */
872676
+ get current() {
872677
+ return this.generation;
872678
+ }
872679
+ /** Increment the generation and persist to the temp file. */
872680
+ async increment() {
872681
+ this.generation++;
872682
+ await this.write();
872683
+ return this.generation;
872684
+ }
872685
+ /** Write the current generation to disk (best-effort). */
872686
+ async write() {
872687
+ try {
872688
+ await (0, import_promises99.writeFile)(this.filePath, String(this.generation), "utf-8");
872689
+ } catch (e2) {
872690
+ console.debug(`Failed to write generation file ${this.filePath}: ${e2}`);
872691
+ }
872692
+ }
872693
+ };
872694
+
872657
872695
  // ../docs-preview/lib/runAppPreviewServer.js
872658
872696
  var EMPTY_DOCS_DEFINITION = {
872659
872697
  pages: {},
@@ -872845,7 +872883,7 @@ var SnippetDependencyTracker = class {
872845
872883
  const markdownFiles = await this.findMarkdownFiles(docsWorkspace.absoluteFilePath);
872846
872884
  for (const markdownFile of markdownFiles) {
872847
872885
  try {
872848
- const content5 = await (0, import_promises99.readFile)(markdownFile, "utf-8");
872886
+ const content5 = await (0, import_promises100.readFile)(markdownFile, "utf-8");
872849
872887
  const referencedFiles = this.extractReferences(content5, markdownFile, docsWorkspace.absoluteFilePath);
872850
872888
  this.pageToSnippets.set(markdownFile, referencedFiles);
872851
872889
  for (const referencedFile of referencedFiles) {
@@ -872931,7 +872969,7 @@ async function cleanFernDocsCache(bundleRoot, context3) {
872931
872969
  const cacheExists = await doesPathExist(AbsoluteFilePath2.of(cachePath));
872932
872970
  if (cacheExists) {
872933
872971
  context3.logger.debug(`Cleaning Fern Docs cache at ${cachePath}`);
872934
- await (0, import_promises99.rm)(cachePath, { recursive: true });
872972
+ await (0, import_promises100.rm)(cachePath, { recursive: true });
872935
872973
  context3.logger.debug("Fern Docs cache cleaned successfully");
872936
872974
  } else {
872937
872975
  context3.logger.debug("No Fern Docs cache to clean");
@@ -872984,7 +873022,7 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
872984
873022
  const appPreviewFolder = getPathToPreviewFolder({ app: true, cacheDir });
872985
873023
  if (await doesPathExist(appPreviewFolder)) {
872986
873024
  context3.logger.info("Force download requested. Deleting cached bundle...");
872987
- await (0, import_promises99.rm)(appPreviewFolder, { recursive: true });
873025
+ await (0, import_promises100.rm)(appPreviewFolder, { recursive: true });
872988
873026
  }
872989
873027
  }
872990
873028
  if (bundlePath != null) {
@@ -873149,7 +873187,7 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
873149
873187
  const slugTracker = new SlugChangeTracker(context3);
873150
873188
  let reloadTimer = null;
873151
873189
  let isReloading = false;
873152
- const RELOAD_DEBOUNCE_MS = 1e3;
873190
+ const RELOAD_DEBOUNCE_MS = 500;
873153
873191
  async function computeTranslatedDefinitions(result) {
873154
873192
  const translations = /* @__PURE__ */ new Map();
873155
873193
  const { docsDefinition, translationPages, translationNavigationOverlays, translatedApiDefinitions, collectedFileIds, docsWorkspacePath } = result;
@@ -873176,13 +873214,13 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
873176
873214
  };
873177
873215
  const localeAwareMarkdownLoader = async (filepath) => {
873178
873216
  const pathToRead = await resolveLocalePath(filepath);
873179
- const raw = await (0, import_promises99.readFile)(pathToRead, "utf-8");
873217
+ const raw = await (0, import_promises100.readFile)(pathToRead, "utf-8");
873180
873218
  const fmMatch = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);
873181
873219
  return fmMatch != null ? raw.slice(fmMatch[0].length) : raw;
873182
873220
  };
873183
873221
  const localeAwareFileLoader = async (filepath) => {
873184
873222
  const pathToRead = await resolveLocalePath(filepath);
873185
- return (0, import_promises99.readFile)(pathToRead, "utf-8");
873223
+ return (0, import_promises100.readFile)(pathToRead, "utf-8");
873186
873224
  };
873187
873225
  const translatedPages = {};
873188
873226
  for (const [pageId, page] of Object.entries(docsDefinition.pages)) {
@@ -873284,6 +873322,8 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
873284
873322
  }
873285
873323
  return translations;
873286
873324
  }
873325
+ const genFilePath = import_path71.default.join(import_os11.default.tmpdir(), `fern-docs-dev-gen-${backendPort}`);
873326
+ const generationManager = new GenerationFileManager(genFilePath);
873287
873327
  const reloadDocsDefinition = async (editedAbsoluteFilepaths2) => {
873288
873328
  context3.logger.info("Reloading docs...");
873289
873329
  const startTime = Date.now();
@@ -873291,18 +873331,20 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
873291
873331
  try {
873292
873332
  project = await reloadProject();
873293
873333
  await snippetTracker.buildDependencyMap(project);
873294
- const validationStartTime = Date.now();
873295
- void validateProject(project).then(() => {
873296
- const validationTime = Date.now() - validationStartTime;
873297
- void debugLogger.logCliValidation(validationTime, true);
873298
- }).catch((err) => {
873299
- const validationTime = Date.now() - validationStartTime;
873300
- void debugLogger.logCliValidation(validationTime, false);
873301
- context3.logger.error(`Validation failed (took ${validationTime}ms): ${extractErrorMessage(err)}`);
873302
- if (err instanceof Error && err.stack) {
873303
- context3.logger.debug(`Validation error stack: ${err.stack}`);
873304
- }
873305
- });
873334
+ if (!isContentOnlyEdit(editedAbsoluteFilepaths2)) {
873335
+ const validationStartTime = Date.now();
873336
+ void validateProject(project).then(() => {
873337
+ const validationTime = Date.now() - validationStartTime;
873338
+ void debugLogger.logCliValidation(validationTime, true);
873339
+ }).catch((err) => {
873340
+ const validationTime = Date.now() - validationStartTime;
873341
+ void debugLogger.logCliValidation(validationTime, false);
873342
+ context3.logger.error(`Validation failed (took ${validationTime}ms): ${extractErrorMessage(err)}`);
873343
+ if (err instanceof Error && err.stack) {
873344
+ context3.logger.debug(`Validation error stack: ${err.stack}`);
873345
+ }
873346
+ });
873347
+ }
873306
873348
  const docsGenStartTime = Date.now();
873307
873349
  const newPreviewResult = await getPreviewDocsDefinition({
873308
873350
  domain: `${instance.host}${instance.pathname}`,
@@ -873461,6 +873503,7 @@ ${err.stack}`);
873461
873503
  NEXT_PUBLIC_FDR_ORIGIN: `http://localhost:${backendPort}`,
873462
873504
  NEXT_PUBLIC_DOCS_DOMAIN: initialProject.docsWorkspaces?.config.instances[0]?.url,
873463
873505
  NEXT_PUBLIC_IS_LOCAL: "1",
873506
+ FERN_DOCS_DEV_GEN_FILE: genFilePath,
873464
873507
  NEXT_DISABLE_CACHE: "1",
873465
873508
  NODE_ENV: "production",
873466
873509
  NODE_PATH: bundleRoot,
@@ -873565,6 +873608,7 @@ ${err.stack}`);
873565
873608
  if (translatedDefinitions.size > 0) {
873566
873609
  context3.logger.debug(`Recomputed translations for ${translatedDefinitions.size} locale(s)`);
873567
873610
  }
873611
+ await generationManager.increment();
873568
873612
  sendData({
873569
873613
  version: 1,
873570
873614
  type: "finishReload"
@@ -873581,6 +873625,7 @@ ${err.stack}`);
873581
873625
  });
873582
873626
  }
873583
873627
  } else {
873628
+ await generationManager.increment();
873584
873629
  sendData({
873585
873630
  version: 1,
873586
873631
  type: "finishReload"
@@ -873588,6 +873633,7 @@ ${err.stack}`);
873588
873633
  }
873589
873634
  } catch (err) {
873590
873635
  context3.logger.error(`Reload failed: ${extractErrorMessage(err)}`);
873636
+ await generationManager.increment();
873591
873637
  sendData({
873592
873638
  version: 1,
873593
873639
  type: "finishReload"
@@ -873678,7 +873724,7 @@ init_lib6();
873678
873724
  init_source();
873679
873725
  var import_cors2 = __toESM(require_lib13(), 1);
873680
873726
  var import_express4 = __toESM(require_express3(), 1);
873681
- var import_promises100 = require("fs/promises");
873727
+ var import_promises101 = require("fs/promises");
873682
873728
  var import_http10 = __toESM(require("http"), 1);
873683
873729
  var import_path72 = __toESM(require("path"), 1);
873684
873730
  init_wrapper();
@@ -873798,13 +873844,13 @@ async function runPreviewServer({ initialProject, reloadProject, validateProject
873798
873844
  };
873799
873845
  const localeAwareMarkdownLoader = async (filepath) => {
873800
873846
  const pathToRead = await resolveLocalePath(filepath);
873801
- const raw = await (0, import_promises100.readFile)(pathToRead, "utf-8");
873847
+ const raw = await (0, import_promises101.readFile)(pathToRead, "utf-8");
873802
873848
  const fmMatch = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);
873803
873849
  return fmMatch != null ? raw.slice(fmMatch[0].length) : raw;
873804
873850
  };
873805
873851
  const localeAwareFileLoader = async (filepath) => {
873806
873852
  const pathToRead = await resolveLocalePath(filepath);
873807
- return (0, import_promises100.readFile)(pathToRead, "utf-8");
873853
+ return (0, import_promises101.readFile)(pathToRead, "utf-8");
873808
873854
  };
873809
873855
  const translatedPages = {};
873810
873856
  for (const [pageId, page] of Object.entries(docsDefinition.pages)) {
@@ -874159,7 +874205,7 @@ function addDevCommand(cli) {
874159
874205
  // ../cli-v2/lib/commands/docs/diff/command.js
874160
874206
  init_lib8();
874161
874207
  init_lib6();
874162
- var import_promises105 = require("fs/promises");
874208
+ var import_promises106 = require("fs/promises");
874163
874209
  var import_pngjs = __toESM(require_png(), 1);
874164
874210
 
874165
874211
  // ../../../node_modules/.pnpm/puppeteer-core@24.40.0/node_modules/puppeteer-core/lib/esm/puppeteer/api/api.js
@@ -882613,7 +882659,7 @@ init_disposable();
882613
882659
  init_incremental_id_generator();
882614
882660
 
882615
882661
  // ../../../node_modules/.pnpm/puppeteer-core@24.40.0/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js
882616
- var import_promises103 = require("fs/promises");
882662
+ var import_promises104 = require("fs/promises");
882617
882663
  var import_node_os12 = __toESM(require("os"), 1);
882618
882664
  var import_node_path34 = __toESM(require("path"), 1);
882619
882665
  init_main();
@@ -883057,7 +883103,7 @@ var ChromeLauncher = class extends BrowserLauncher {
883057
883103
  });
883058
883104
  if (userDataDirIndex < 0) {
883059
883105
  isTempUserDataDir = true;
883060
- chromeArguments.push(`--user-data-dir=${await (0, import_promises103.mkdtemp)(this.getProfilePath())}`);
883106
+ chromeArguments.push(`--user-data-dir=${await (0, import_promises104.mkdtemp)(this.getProfilePath())}`);
883061
883107
  userDataDirIndex = chromeArguments.length - 1;
883062
883108
  }
883063
883109
  const userDataDir = chromeArguments[userDataDirIndex].split("=", 2)[1];
@@ -883214,7 +883260,7 @@ function removeMatchingFlags(array3, flag) {
883214
883260
 
883215
883261
  // ../../../node_modules/.pnpm/puppeteer-core@24.40.0/node_modules/puppeteer-core/lib/esm/puppeteer/node/FirefoxLauncher.js
883216
883262
  var import_node_fs30 = __toESM(require("fs"), 1);
883217
- var import_promises104 = require("fs/promises");
883263
+ var import_promises105 = require("fs/promises");
883218
883264
  var import_node_os13 = __toESM(require("os"), 1);
883219
883265
  var import_node_path35 = __toESM(require("path"), 1);
883220
883266
  init_main();
@@ -883268,7 +883314,7 @@ var FirefoxLauncher = class _FirefoxLauncher extends BrowserLauncher {
883268
883314
  }
883269
883315
  isTempUserDataDir = false;
883270
883316
  } else {
883271
- userDataDir = await (0, import_promises104.mkdtemp)(this.getProfilePath());
883317
+ userDataDir = await (0, import_promises105.mkdtemp)(this.getProfilePath());
883272
883318
  firefoxArguments.push("--profile");
883273
883319
  firefoxArguments.push(userDataDir);
883274
883320
  }
@@ -883309,8 +883355,8 @@ var FirefoxLauncher = class _FirefoxLauncher extends BrowserLauncher {
883309
883355
  const prefsBackupPath = import_node_path35.default.join(userDataDir, file4 + backupSuffix);
883310
883356
  if (import_node_fs30.default.existsSync(prefsBackupPath)) {
883311
883357
  const prefsPath = import_node_path35.default.join(userDataDir, file4);
883312
- await (0, import_promises104.unlink)(prefsPath);
883313
- await (0, import_promises104.rename)(prefsBackupPath, prefsPath);
883358
+ await (0, import_promises105.unlink)(prefsPath);
883359
+ await (0, import_promises105.rename)(prefsBackupPath, prefsPath);
883314
883360
  }
883315
883361
  }));
883316
883362
  for (const result of results) {
@@ -884089,7 +884135,7 @@ var DiffCommand = class {
884089
884135
  }
884090
884136
  const outputPath = AbsoluteFilePath2.of(outputDir.startsWith("/") ? outputDir : join8(cwd(), RelativeFilePath2.of(outputDir)));
884091
884137
  if (!await doesPathExist(outputPath)) {
884092
- await (0, import_promises105.mkdir)(outputPath, { recursive: true });
884138
+ await (0, import_promises106.mkdir)(outputPath, { recursive: true });
884093
884139
  }
884094
884140
  const results = [];
884095
884141
  context3.stderr.info("Starting browser for screenshot capture...");
@@ -884426,8 +884472,8 @@ function createSideBySideComparison(beforePng, afterPng, gap = 20, highlight = t
884426
884472
  return combined;
884427
884473
  }
884428
884474
  async function generateComparisons({ beforePath, afterPath, comparisonBasePath }) {
884429
- const beforePng = import_pngjs.PNG.sync.read(await (0, import_promises105.readFile)(beforePath));
884430
- const afterPng = import_pngjs.PNG.sync.read(await (0, import_promises105.readFile)(afterPath));
884475
+ const beforePng = import_pngjs.PNG.sync.read(await (0, import_promises106.readFile)(beforePath));
884476
+ const afterPng = import_pngjs.PNG.sync.read(await (0, import_promises106.readFile)(afterPath));
884431
884477
  const beforeOriginalHeight = beforePng.height;
884432
884478
  const afterOriginalHeight = afterPng.height;
884433
884479
  const width = Math.max(beforePng.width, afterPng.width);
@@ -884461,7 +884507,7 @@ async function generateComparisons({ beforePath, afterPath, comparisonBasePath }
884461
884507
  const sideBySide = createSideBySideComparison(croppedBefore, croppedAfter);
884462
884508
  const outPath = `${base4}-region-${i5 + 1}.png`;
884463
884509
  const pngBuffer = import_pngjs.PNG.sync.write(sideBySide);
884464
- await (0, import_promises105.writeFile)(outPath, new Uint8Array(pngBuffer));
884510
+ await (0, import_promises106.writeFile)(outPath, new Uint8Array(pngBuffer));
884465
884511
  results.push({ changePercent, boundingBox, comparisonPath: outPath });
884466
884512
  }
884467
884513
  return results;
@@ -888987,14 +889033,14 @@ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug)
888987
889033
  }
888988
889034
 
888989
889035
  // ../library-docs-generator/lib/src/orchestrate.js
888990
- var import_promises108 = require("fs/promises");
889036
+ var import_promises109 = require("fs/promises");
888991
889037
  init_lib4();
888992
889038
  init_lib8();
888993
889039
  init_lib6();
888994
889040
  init_source();
888995
889041
 
888996
889042
  // ../library-docs-generator/lib/src/LocalParserRunner.js
888997
- var import_promises107 = require("fs/promises");
889043
+ var import_promises108 = require("fs/promises");
888998
889044
  var import_node_path39 = require("path");
888999
889045
  init_lib68();
889000
889046
  init_lib6();
@@ -889022,7 +889068,7 @@ async function runLocalParser({ context: context3, sourcePath, language, config:
889022
889068
  const outputDir = await import_tmp_promise11.default.dir({ unsafeCleanup: true });
889023
889069
  const configFile = await import_tmp_promise11.default.file({ postfix: ".json" });
889024
889070
  try {
889025
- await (0, import_promises107.writeFile)(configFile.path, JSON.stringify({
889071
+ await (0, import_promises108.writeFile)(configFile.path, JSON.stringify({
889026
889072
  packagePath: config5.packagePath,
889027
889073
  sourceUrl: config5.sourceUrl,
889028
889074
  doxyfileContent: config5.doxyfileContent
@@ -889045,7 +889091,7 @@ async function runLocalParser({ context: context3, sourcePath, language, config:
889045
889091
  const irPath = (0, import_node_path39.join)(outputDir.path, "ir.json");
889046
889092
  let irContents;
889047
889093
  try {
889048
- irContents = await (0, import_promises107.readFile)(irPath, "utf-8");
889094
+ irContents = await (0, import_promises108.readFile)(irPath, "utf-8");
889049
889095
  } catch {
889050
889096
  throw new CliError({
889051
889097
  message: `Local parser (${imageName}) did not produce IR at ${irPath}`,
@@ -889926,7 +889972,7 @@ async function generateSingleLibrary({ client: client3, context: context3, name:
889926
889972
  if (config5.lang === "cpp" && config5.config?.doxyfile != null) {
889927
889973
  const doxyfilePath = resolve6(docsDirectoryPath, config5.config.doxyfile);
889928
889974
  try {
889929
- doxyfileContent = await (0, import_promises108.readFile)(doxyfilePath, "utf-8");
889975
+ doxyfileContent = await (0, import_promises109.readFile)(doxyfilePath, "utf-8");
889930
889976
  } catch {
889931
889977
  throw new CliError({
889932
889978
  message: `Library '${name2}': Could not read Doxyfile at '${config5.config.doxyfile}' (resolved to ${doxyfilePath})`,
@@ -890216,7 +890262,7 @@ init_source();
890216
890262
  init_lib4();
890217
890263
 
890218
890264
  // ../generation/remote-generation/remote-workspace-runner/lib/automationMetadata.js
890219
- var import_promises109 = require("fs/promises");
890265
+ var import_promises110 = require("fs/promises");
890220
890266
  function getOutputRepoUrl(generatorInvocation) {
890221
890267
  return generatorInvocation.outputMode._visit({
890222
890268
  downloadFiles: () => void 0,
@@ -890235,7 +890281,7 @@ function getOutputRepoUrl(generatorInvocation) {
890235
890281
  async function findGeneratorLineNumber(absolutePathToGeneratorsYml, generatorName, occurrenceIndex) {
890236
890282
  let content5;
890237
890283
  try {
890238
- content5 = await (0, import_promises109.readFile)(absolutePathToGeneratorsYml, "utf8");
890284
+ content5 = await (0, import_promises110.readFile)(absolutePathToGeneratorsYml, "utf8");
890239
890285
  } catch {
890240
890286
  return void 0;
890241
890287
  }
@@ -891082,7 +891128,7 @@ init_lib8();
891082
891128
 
891083
891129
  // ../workspace/loader/lib/listFernFiles.js
891084
891130
  init_lib8();
891085
- var import_promises110 = require("fs/promises");
891131
+ var import_promises111 = require("fs/promises");
891086
891132
  async function listFernFiles2(root6, extensionGlob) {
891087
891133
  const files = [];
891088
891134
  for (const absoluteFilepath of await listFiles(root6, extensionGlob)) {
@@ -891097,7 +891143,7 @@ async function createFernFile2({ relativeFilepath, absoluteFilepath }) {
891097
891143
  return {
891098
891144
  relativeFilepath,
891099
891145
  absoluteFilepath,
891100
- fileContents: (await (0, import_promises110.readFile)(absoluteFilepath)).toString()
891146
+ fileContents: (await (0, import_promises111.readFile)(absoluteFilepath)).toString()
891101
891147
  };
891102
891148
  }
891103
891149
 
@@ -891562,7 +891608,7 @@ init_lib19();
891562
891608
  init_lib4();
891563
891609
  init_lib8();
891564
891610
  init_lib6();
891565
- var import_promises111 = require("fs/promises");
891611
+ var import_promises112 = require("fs/promises");
891566
891612
  init_js_yaml();
891567
891613
 
891568
891614
  // ../workspace/loader/lib/docs-yml.schema.json
@@ -898245,7 +898291,7 @@ async function loadDocsConfiguration({ absolutePathToDocsDefinition, context: co
898245
898291
  });
898246
898292
  }
898247
898293
  async function loadRawDocsConfiguration({ absolutePathOfConfiguration, context: context3 }) {
898248
- const contentsStr = await (0, import_promises111.readFile)(absolutePathOfConfiguration);
898294
+ const contentsStr = await (0, import_promises112.readFile)(absolutePathOfConfiguration);
898249
898295
  let contentsJson;
898250
898296
  try {
898251
898297
  contentsJson = index_vite_proxy_tmp_default.load(contentsStr.toString());
@@ -898292,15 +898338,15 @@ ${result.error?.message ?? "Unknown error"}`,
898292
898338
 
898293
898339
  // ../generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForAPIWorkspace.js
898294
898340
  init_esm19();
898295
- var import_promises118 = require("fs/promises");
898341
+ var import_promises119 = require("fs/promises");
898296
898342
 
898297
898343
  // ../generation/remote-generation/remote-workspace-runner/lib/downloadSnippetsForTask.js
898298
898344
  init_lib8();
898299
898345
  init_axios2();
898300
898346
  init_source();
898301
898347
  var import_fs36 = require("fs");
898302
- var import_promises112 = require("fs/promises");
898303
- var import_promises113 = require("stream/promises");
898348
+ var import_promises113 = require("fs/promises");
898349
+ var import_promises114 = require("stream/promises");
898304
898350
  async function downloadSnippetsForTask({ snippetsS3PreSignedReadUrl, absolutePathToLocalSnippetJSON, context: context3 }) {
898305
898351
  try {
898306
898352
  await downloadFileForTask({
@@ -898317,10 +898363,10 @@ async function downloadFileForTask({ s3PreSignedReadUrl, absolutePathToLocalOutp
898317
898363
  responseType: "stream"
898318
898364
  });
898319
898365
  if (await doesPathExist(absolutePathToLocalOutput)) {
898320
- await (0, import_promises112.rm)(absolutePathToLocalOutput, { recursive: true });
898366
+ await (0, import_promises113.rm)(absolutePathToLocalOutput, { recursive: true });
898321
898367
  }
898322
- await (0, import_promises112.mkdir)(dirname6(absolutePathToLocalOutput), { recursive: true });
898323
- await (0, import_promises113.pipeline)(request7.data, (0, import_fs36.createWriteStream)(absolutePathToLocalOutput));
898368
+ await (0, import_promises113.mkdir)(dirname6(absolutePathToLocalOutput), { recursive: true });
898369
+ await (0, import_promises114.pipeline)(request7.data, (0, import_fs36.createWriteStream)(absolutePathToLocalOutput));
898324
898370
  }
898325
898371
 
898326
898372
  // ../generation/remote-generation/remote-workspace-runner/lib/resolveAutoDiscoveredFernignorePath.js
@@ -898361,7 +898407,7 @@ init_lib6();
898361
898407
  init_esm19();
898362
898408
  init_axios2();
898363
898409
  var import_form_data4 = __toESM(require_form_data(), 1);
898364
- var import_promises114 = require("fs/promises");
898410
+ var import_promises115 = require("fs/promises");
898365
898411
  init_js_yaml();
898366
898412
  var import_url_join23 = __toESM(require_url_join(), 1);
898367
898413
  var import_util68 = require("util");
@@ -898423,7 +898469,7 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
898423
898469
  fernignoreContents = "";
898424
898470
  } else if (fernignorePath != null) {
898425
898471
  try {
898426
- fernignoreContents = await (0, import_promises114.readFile)(fernignorePath, "utf-8");
898472
+ fernignoreContents = await (0, import_promises115.readFile)(fernignorePath, "utf-8");
898427
898473
  } catch (error50) {
898428
898474
  context3.failAndThrow(`Failed to read fernignore file at ${fernignorePath}: ${error50}`, void 0, {
898429
898475
  code: CliError.Code.ConfigError
@@ -898733,9 +898779,9 @@ init_lib6();
898733
898779
  init_axios2();
898734
898780
  init_source();
898735
898781
  var import_fs37 = require("fs");
898736
- var import_promises115 = require("fs/promises");
898782
+ var import_promises116 = require("fs/promises");
898737
898783
  var import_path79 = __toESM(require("path"), 1);
898738
- var import_promises116 = require("stream/promises");
898784
+ var import_promises117 = require("stream/promises");
898739
898785
 
898740
898786
  // ../../../node_modules/.pnpm/terminal-link@3.0.0/node_modules/terminal-link/index.js
898741
898787
  init_ansi_escapes();
@@ -899057,9 +899103,9 @@ async function downloadZipForTask({ s3PreSignedReadUrl, absolutePathToLocalOutpu
899057
899103
  });
899058
899104
  const tmpDir = await import_tmp_promise13.default.dir({ prefix: "fern", unsafeCleanup: true });
899059
899105
  const outputZipPath = import_path79.default.join(tmpDir.path, "output.zip");
899060
- await (0, import_promises116.pipeline)(request7.data, (0, import_fs37.createWriteStream)(outputZipPath));
899106
+ await (0, import_promises117.pipeline)(request7.data, (0, import_fs37.createWriteStream)(outputZipPath));
899061
899107
  await forceRemoveDirectory(absolutePathToLocalOutput);
899062
- await (0, import_promises115.mkdir)(absolutePathToLocalOutput, { recursive: true });
899108
+ await (0, import_promises116.mkdir)(absolutePathToLocalOutput, { recursive: true });
899063
899109
  await extractZipToDirectory(outputZipPath, absolutePathToLocalOutput);
899064
899110
  }
899065
899111
  async function forceRemoveDirectory(dirPath) {
@@ -899067,22 +899113,22 @@ async function forceRemoveDirectory(dirPath) {
899067
899113
  return;
899068
899114
  }
899069
899115
  await makeWritableRecursive(dirPath);
899070
- await (0, import_promises115.rm)(dirPath, { recursive: true, force: true });
899116
+ await (0, import_promises116.rm)(dirPath, { recursive: true, force: true });
899071
899117
  }
899072
899118
  async function makeWritableRecursive(dirPath) {
899073
899119
  try {
899074
- const entries24 = await (0, import_promises115.readdir)(dirPath, { withFileTypes: true });
899120
+ const entries24 = await (0, import_promises116.readdir)(dirPath, { withFileTypes: true });
899075
899121
  for (const entry of entries24) {
899076
899122
  const fullPath = AbsoluteFilePath2.of(import_path79.default.join(dirPath, entry.name));
899077
899123
  if (entry.isDirectory()) {
899078
899124
  await makeWritableRecursive(fullPath);
899079
899125
  }
899080
899126
  try {
899081
- await (0, import_promises115.chmod)(fullPath, 493);
899127
+ await (0, import_promises116.chmod)(fullPath, 493);
899082
899128
  } catch {
899083
899129
  }
899084
899130
  }
899085
- await (0, import_promises115.chmod)(dirPath, 493);
899131
+ await (0, import_promises116.chmod)(dirPath, 493);
899086
899132
  } catch {
899087
899133
  }
899088
899134
  }
@@ -899128,7 +899174,7 @@ async function downloadFilesWithFernIgnoreInTempRepo({ s3PreSignedReadUrl, absol
899128
899174
  const tmpOutputResolutionDir = AbsoluteFilePath2.of((await import_tmp_promise13.default.dir({})).path);
899129
899175
  const absolutePathToFernignore = join8(absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME));
899130
899176
  const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
899131
- await (0, import_promises115.cp)(absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
899177
+ await (0, import_promises116.cp)(absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
899132
899178
  await runGitCommand(["init"], tmpOutputResolutionDir, context3);
899133
899179
  await runGitCommand(["add", "."], tmpOutputResolutionDir, context3);
899134
899180
  await runGitCommand([
@@ -899151,7 +899197,7 @@ async function downloadFilesWithFernIgnoreInTempRepo({ s3PreSignedReadUrl, absol
899151
899197
  await runGitCommand(["restore", "."], tmpOutputResolutionDir, context3);
899152
899198
  await forceRemoveDirectory(join8(tmpOutputResolutionDir, RelativeFilePath2.of(".git")));
899153
899199
  await forceRemoveDirectory(absolutePathToLocalOutput);
899154
- await (0, import_promises115.cp)(tmpOutputResolutionDir, absolutePathToLocalOutput, { recursive: true });
899200
+ await (0, import_promises116.cp)(tmpOutputResolutionDir, absolutePathToLocalOutput, { recursive: true });
899155
899201
  }
899156
899202
  async function downloadAndExtractZipToDirectory({ s3PreSignedReadUrl, outputPath }) {
899157
899203
  const request7 = await axios_default.get(s3PreSignedReadUrl, {
@@ -899161,7 +899207,7 @@ async function downloadAndExtractZipToDirectory({ s3PreSignedReadUrl, outputPath
899161
899207
  });
899162
899208
  const tmpDir = await import_tmp_promise13.default.dir({ prefix: "fern", unsafeCleanup: true });
899163
899209
  const outputZipPath = import_path79.default.join(tmpDir.path, "output.zip");
899164
- await (0, import_promises116.pipeline)(request7.data, (0, import_fs37.createWriteStream)(outputZipPath));
899210
+ await (0, import_promises117.pipeline)(request7.data, (0, import_fs37.createWriteStream)(outputZipPath));
899165
899211
  await extractZipToDirectory(outputZipPath, outputPath);
899166
899212
  }
899167
899213
  async function extractZipToDirectory(zipPath, outputDir) {
@@ -899176,10 +899222,10 @@ async function extractZipToDirectory(zipPath, outputDir) {
899176
899222
  zipFile.on("entry", (entry) => {
899177
899223
  const outputPath = import_path79.default.join(outputDir, entry.fileName);
899178
899224
  if (entry.fileName.endsWith("/")) {
899179
- (0, import_promises115.mkdir)(outputPath, { recursive: true }).then(() => zipFile.readEntry()).catch(reject);
899225
+ (0, import_promises116.mkdir)(outputPath, { recursive: true }).then(() => zipFile.readEntry()).catch(reject);
899180
899226
  return;
899181
899227
  }
899182
- (0, import_promises115.mkdir)(import_path79.default.dirname(outputPath), { recursive: true }).then(() => {
899228
+ (0, import_promises116.mkdir)(import_path79.default.dirname(outputPath), { recursive: true }).then(() => {
899183
899229
  zipFile.openReadStream(entry, (streamErr, readStream2) => {
899184
899230
  if (streamErr || !readStream2) {
899185
899231
  reject(streamErr ?? new Error("Failed to open read stream"));
@@ -899199,7 +899245,7 @@ init_lib8();
899199
899245
  init_lib9();
899200
899246
  init_lib33();
899201
899247
  init_lib6();
899202
- var import_promises117 = require("fs/promises");
899248
+ var import_promises118 = require("fs/promises");
899203
899249
  var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
899204
899250
  var PROTOBUF_ZIP_FILENAME = "proto.zip";
899205
899251
  var SourceUploader = class {
@@ -899220,7 +899266,7 @@ var SourceUploader = class {
899220
899266
  }
899221
899267
  async uploadSource(source2, uploadURL) {
899222
899268
  const uploadCommand = await this.getUploadCommand(source2);
899223
- const fileData = await (0, import_promises117.readFile)(uploadCommand.absoluteFilePath);
899269
+ const fileData = await (0, import_promises118.readFile)(uploadCommand.absoluteFilePath);
899224
899270
  let response;
899225
899271
  try {
899226
899272
  response = await fetch(uploadURL, {
@@ -899249,7 +899295,7 @@ var SourceUploader = class {
899249
899295
  absoluteFilePath,
899250
899296
  cleanup: async () => {
899251
899297
  this.context.logger.debug(`Removing ${absoluteFilePath}`);
899252
- await (0, import_promises117.unlink)(absoluteFilePath);
899298
+ await (0, import_promises118.unlink)(absoluteFilePath);
899253
899299
  }
899254
899300
  };
899255
899301
  }
@@ -899916,7 +899962,7 @@ async function emitGenerationAnnotations(ctx) {
899916
899962
  const lines = notices.map((n2) => `${n2.summaryLine}
899917
899963
  `).join("");
899918
899964
  try {
899919
- await (0, import_promises118.appendFile)(stepSummaryPath, lines, "utf8");
899965
+ await (0, import_promises119.appendFile)(stepSummaryPath, lines, "utf8");
899920
899966
  } catch (error50) {
899921
899967
  process.stderr.write(`[warn] Failed to append to GITHUB_STEP_SUMMARY: ${error50}
899922
899968
  `);
@@ -899983,7 +900029,7 @@ init_lib6();
899983
900029
  init_axios2();
899984
900030
  init_source();
899985
900031
  var import_crypto9 = require("crypto");
899986
- var import_promises121 = require("fs/promises");
900032
+ var import_promises122 = require("fs/promises");
899987
900033
  init_lodash();
899988
900034
  var mime3 = __toESM(require_mime_types(), 1);
899989
900035
  var import_path80 = require("path");
@@ -900058,7 +900104,7 @@ init_lib67();
900058
900104
  init_js();
900059
900105
  init_lib66();
900060
900106
  var import_crypto8 = require("crypto");
900061
- var import_promises120 = require("fs/promises");
900107
+ var import_promises121 = require("fs/promises");
900062
900108
  var mime2 = __toESM(require_mime_types(), 1);
900063
900109
 
900064
900110
  // ../generation/remote-generation/remote-workspace-runner/lib/mapDocsConfigToLedgerConfig.js
@@ -900430,7 +900476,7 @@ async function uploadMissingBlobs(missingContent, blobs, context3, filePaths) {
900430
900476
  if (blob == null && filePaths != null) {
900431
900477
  const filePath = filePaths.get(hash5);
900432
900478
  if (filePath != null) {
900433
- blob = await (0, import_promises120.readFile)(filePath);
900479
+ blob = await (0, import_promises121.readFile)(filePath);
900434
900480
  const inferred = mime2.lookup(filePath);
900435
900481
  if (inferred !== false) {
900436
900482
  contentType = inferred;
@@ -900730,7 +900776,7 @@ function sanitizeRelativePathForS3(relativeFilePath) {
900730
900776
  return relativeFilePath.replace(/\.\.\//g, "_dot_dot_/");
900731
900777
  }
900732
900778
  async function readAndHashFile(absoluteFilePath) {
900733
- const buffer = await (0, import_promises121.readFile)(absoluteFilePath);
900779
+ const buffer = await (0, import_promises122.readFile)(absoluteFilePath);
900734
900780
  const hash5 = (0, import_crypto9.createHash)("sha256").update(new Uint8Array(buffer)).digest("hex");
900735
900781
  return { buffer, hash: hash5 };
900736
900782
  }
@@ -901231,13 +901277,13 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
901231
901277
  };
901232
901278
  const localeAwareMarkdownLoader = async (filepath) => {
901233
901279
  const pathToRead = await resolveLocalePath(filepath);
901234
- const raw = await (0, import_promises121.readFile)(pathToRead, "utf-8");
901280
+ const raw = await (0, import_promises122.readFile)(pathToRead, "utf-8");
901235
901281
  const fmMatch = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);
901236
901282
  return fmMatch != null ? raw.slice(fmMatch[0].length) : raw;
901237
901283
  };
901238
901284
  const localeAwareFileLoader = async (filepath) => {
901239
901285
  const pathToRead = await resolveLocalePath(filepath);
901240
- return (0, import_promises121.readFile)(pathToRead, "utf-8");
901286
+ return (0, import_promises122.readFile)(pathToRead, "utf-8");
901241
901287
  };
901242
901288
  const translatedPageEntries = await Promise.all(Object.entries(localePages).map(async ([path119, rawMarkdown]) => {
901243
901289
  try {
@@ -901431,7 +901477,7 @@ async function uploadFiles(filesToUpload, docsWorkspacePath, context3, batchSize
901431
901477
  try {
901432
901478
  const uploadUrl = extractUploadUrl(urlValue);
901433
901479
  const mimeType = mime3.lookup(absoluteFilePath);
901434
- await axios_default.put(uploadUrl, await (0, import_promises121.readFile)(absoluteFilePath), {
901480
+ await axios_default.put(uploadUrl, await (0, import_promises122.readFile)(absoluteFilePath), {
901435
901481
  headers: {
901436
901482
  "Content-Type": mimeType === false ? "application/octet-stream" : mimeType,
901437
901483
  // Set max cache control for S3 uploads
@@ -902082,7 +902128,7 @@ var LegacyDocsPublisher = class {
902082
902128
  previewId,
902083
902129
  disableTemplates: void 0,
902084
902130
  skipUpload,
902085
- cliVersion: "5.65.0",
902131
+ cliVersion: "5.65.1",
902086
902132
  loginCommand: "fern auth login"
902087
902133
  });
902088
902134
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -903072,7 +903118,7 @@ init_lib4();
903072
903118
  init_lib8();
903073
903119
  init_lib6();
903074
903120
  init_source();
903075
- var import_promises122 = require("fs/promises");
903121
+ var import_promises123 = require("fs/promises");
903076
903122
  var import_path82 = __toESM(require("path"), 1);
903077
903123
 
903078
903124
  // ../cli-v2/lib/config/fern-yml/FernYmlBuilder.js
@@ -903943,7 +903989,7 @@ var InitCommand = class {
903943
903989
  apiPath,
903944
903990
  defaultGroup: result.defaultGroup
903945
903991
  });
903946
- await (0, import_promises122.writeFile)(fernYmlPath, fernYmlContent, "utf-8");
903992
+ await (0, import_promises123.writeFile)(fernYmlPath, fernYmlContent, "utf-8");
903947
903993
  context3.stderr.info(`
903948
903994
  ${Icons.success} Created ${FERN_YML_FILENAME}`);
903949
903995
  }
@@ -903965,9 +904011,9 @@ var InitCommand = class {
903965
904011
  }
903966
904012
  async writeSpecFile(cwd2, filename, content5) {
903967
904013
  const specsDir = join8(cwd2, RelativeFilePath2.of(SPECS_DIR));
903968
- await (0, import_promises122.mkdir)(specsDir, { recursive: true });
904014
+ await (0, import_promises123.mkdir)(specsDir, { recursive: true });
903969
904015
  const filePath = join8(specsDir, RelativeFilePath2.of(filename));
903970
- await (0, import_promises122.writeFile)(filePath, content5, "utf-8");
904016
+ await (0, import_promises123.writeFile)(filePath, content5, "utf-8");
903971
904017
  }
903972
904018
  resolveApiPath(apiSource) {
903973
904019
  switch (apiSource.type) {
@@ -905129,7 +905175,7 @@ function addReplayCommand(cli) {
905129
905175
  init_lib8();
905130
905176
  init_lib6();
905131
905177
  init_source();
905132
- var import_promises123 = require("fs/promises");
905178
+ var import_promises124 = require("fs/promises");
905133
905179
  var SchemaCommand = class {
905134
905180
  async handle(context3, args) {
905135
905181
  const schema = this.resolveSchema(args.name);
@@ -905165,9 +905211,9 @@ var SchemaCommand = class {
905165
905211
  const absoluteOutputPath = resolve6(context3.cwd, outputPath);
905166
905212
  const outputDir = dirname6(absoluteOutputPath);
905167
905213
  if (!await doesPathExist(outputDir)) {
905168
- await (0, import_promises123.mkdir)(outputDir, { recursive: true });
905214
+ await (0, import_promises124.mkdir)(outputDir, { recursive: true });
905169
905215
  }
905170
- await (0, import_promises123.writeFile)(absoluteOutputPath, this.formatJson(value2, pretty));
905216
+ await (0, import_promises124.writeFile)(absoluteOutputPath, this.formatJson(value2, pretty));
905171
905217
  context3.stderr.info(source_default.green(`Wrote JSON Schema to ${absoluteOutputPath}`));
905172
905218
  }
905173
905219
  };
@@ -905451,14 +905497,14 @@ init_lib4();
905451
905497
  init_lib8();
905452
905498
  init_lib6();
905453
905499
  init_source();
905454
- var import_promises141 = require("fs/promises");
905500
+ var import_promises142 = require("fs/promises");
905455
905501
  init_js_yaml();
905456
905502
 
905457
905503
  // ../cli-v2/lib/api/resolver/ApiSpecResolver.js
905458
905504
  init_lib8();
905459
905505
  init_lib6();
905460
- var import_promises124 = require("fs/promises");
905461
- var import_os11 = require("os");
905506
+ var import_promises125 = require("fs/promises");
905507
+ var import_os12 = require("os");
905462
905508
  var import_path86 = __toESM(require("path"), 1);
905463
905509
 
905464
905510
  // ../cli-v2/lib/api/resolver/ApiSpecDetector.js
@@ -905534,9 +905580,9 @@ var ApiSpecResolver = class {
905534
905580
  });
905535
905581
  }
905536
905582
  const extension4 = this.inferExtensionFromContent(content5);
905537
- const tempDir2 = await (0, import_promises124.mkdtemp)(import_path86.default.join((0, import_os11.tmpdir)(), "fern-"));
905583
+ const tempDir2 = await (0, import_promises125.mkdtemp)(import_path86.default.join((0, import_os12.tmpdir)(), "fern-"));
905538
905584
  const absoluteFilePath = AbsoluteFilePath2.of(import_path86.default.join(tempDir2, `spec${extension4}`));
905539
- await (0, import_promises124.writeFile)(absoluteFilePath, content5, "utf-8");
905585
+ await (0, import_promises125.writeFile)(absoluteFilePath, content5, "utf-8");
905540
905586
  const specType = await this.detector.detect({ absoluteFilePath, content: content5, reference: "stdin" });
905541
905587
  return {
905542
905588
  absoluteFilePath,
@@ -905552,9 +905598,9 @@ var ApiSpecResolver = class {
905552
905598
  async resolveUrl({ reference: reference4 }) {
905553
905599
  const { content: content5, contentType } = await this.fetchContent({ url: reference4 });
905554
905600
  const extension4 = this.inferExtension({ url: reference4, contentType });
905555
- const tempDir2 = await (0, import_promises124.mkdtemp)(import_path86.default.join((0, import_os11.tmpdir)(), "fern-"));
905601
+ const tempDir2 = await (0, import_promises125.mkdtemp)(import_path86.default.join((0, import_os12.tmpdir)(), "fern-"));
905556
905602
  const absoluteFilePath = AbsoluteFilePath2.of(import_path86.default.join(tempDir2, `spec${extension4}`));
905557
- await (0, import_promises124.writeFile)(absoluteFilePath, content5, "utf-8");
905603
+ await (0, import_promises125.writeFile)(absoluteFilePath, content5, "utf-8");
905558
905604
  const specType = await this.detector.detect({ absoluteFilePath, content: content5, reference: reference4 });
905559
905605
  return {
905560
905606
  absoluteFilePath,
@@ -905570,7 +905616,7 @@ var ApiSpecResolver = class {
905570
905616
  code: CliError.Code.ConfigError
905571
905617
  });
905572
905618
  }
905573
- const content5 = await (0, import_promises124.readFile)(absoluteFilePath, "utf-8");
905619
+ const content5 = await (0, import_promises125.readFile)(absoluteFilePath, "utf-8");
905574
905620
  const specType = await this.detector.detect({ absoluteFilePath, content: content5, reference: reference4 });
905575
905621
  return {
905576
905622
  absoluteFilePath,
@@ -924363,7 +924409,7 @@ var DynamicSnippetsGenerator = class extends AbstractDynamicSnippetsGenerator {
924363
924409
 
924364
924410
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/csharp/DynamicSnippetsCsharpTestGenerator.js
924365
924411
  init_lib8();
924366
- var import_promises125 = require("fs/promises");
924412
+ var import_promises126 = require("fs/promises");
924367
924413
  var import_path88 = __toESM(require("path"), 1);
924368
924414
 
924369
924415
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/utils/convertEndpointSnippetRequest.js
@@ -924497,8 +924543,8 @@ var DynamicSnippetsCsharpTestGenerator = class {
924497
924543
  endpointId
924498
924544
  });
924499
924545
  const dynamicSnippetFilePath = this.getTestFilePath({ absolutePathToOutputDir, idx });
924500
- await (0, import_promises125.mkdir)(import_path88.default.dirname(dynamicSnippetFilePath), { recursive: true });
924501
- await (0, import_promises125.writeFile)(dynamicSnippetFilePath, response.snippet);
924546
+ await (0, import_promises126.mkdir)(import_path88.default.dirname(dynamicSnippetFilePath), { recursive: true });
924547
+ await (0, import_promises126.writeFile)(dynamicSnippetFilePath, response.snippet);
924502
924548
  } catch (error50) {
924503
924549
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
924504
924550
  }
@@ -924507,8 +924553,8 @@ var DynamicSnippetsCsharpTestGenerator = class {
924507
924553
  }
924508
924554
  async initializeProject(outputDir) {
924509
924555
  const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("Snippets"));
924510
- await (0, import_promises125.mkdir)(absolutePathToOutputDir, { recursive: true });
924511
- await (0, import_promises125.writeFile)(join8(absolutePathToOutputDir, RelativeFilePath2.of("Snippets.csproj")), PROJECT_FILE_CONTENT);
924556
+ await (0, import_promises126.mkdir)(absolutePathToOutputDir, { recursive: true });
924557
+ await (0, import_promises126.writeFile)(join8(absolutePathToOutputDir, RelativeFilePath2.of("Snippets.csproj")), PROJECT_FILE_CONTENT);
924512
924558
  return absolutePathToOutputDir;
924513
924559
  }
924514
924560
  getTestFilePath({ absolutePathToOutputDir, idx }) {
@@ -928021,7 +928067,7 @@ var DynamicSnippetsGenerator2 = class extends AbstractDynamicSnippetsGenerator {
928021
928067
  };
928022
928068
 
928023
928069
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/go/DynamicSnippetsGoTestGenerator.js
928024
- var import_promises126 = require("fs/promises");
928070
+ var import_promises127 = require("fs/promises");
928025
928071
  var import_path90 = __toESM(require("path"), 1);
928026
928072
  var DynamicSnippetsGoTestGenerator = class {
928027
928073
  context;
@@ -928050,8 +928096,8 @@ var DynamicSnippetsGoTestGenerator = class {
928050
928096
  endpointId
928051
928097
  });
928052
928098
  const dynamicSnippetFilePath = this.getTestFilePath({ outputDir, idx });
928053
- await (0, import_promises126.mkdir)(import_path90.default.dirname(dynamicSnippetFilePath), { recursive: true });
928054
- await (0, import_promises126.writeFile)(dynamicSnippetFilePath, response.snippet);
928099
+ await (0, import_promises127.mkdir)(import_path90.default.dirname(dynamicSnippetFilePath), { recursive: true });
928100
+ await (0, import_promises127.writeFile)(dynamicSnippetFilePath, response.snippet);
928055
928101
  } catch (error50) {
928056
928102
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
928057
928103
  if (error50 instanceof Error && error50.stack) {
@@ -931938,7 +931984,7 @@ var DynamicSnippetsGenerator3 = class extends AbstractDynamicSnippetsGenerator {
931938
931984
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/java/DynamicSnippetsJavaTestGenerator.js
931939
931985
  init_lib33();
931940
931986
  init_lib6();
931941
- var import_promises127 = require("fs/promises");
931987
+ var import_promises128 = require("fs/promises");
931942
931988
  var import_path91 = __toESM(require("path"), 1);
931943
931989
  var DynamicSnippetsJavaTestGenerator = class {
931944
931990
  context;
@@ -931976,8 +932022,8 @@ var DynamicSnippetsJavaTestGenerator = class {
931976
932022
  endpointId
931977
932023
  });
931978
932024
  const dynamicSnippetFilePath = this.getTestFilePath({ absolutePathToOutputDir, idx });
931979
- await (0, import_promises127.mkdir)(import_path91.default.dirname(dynamicSnippetFilePath), { recursive: true });
931980
- await (0, import_promises127.writeFile)(dynamicSnippetFilePath, response.snippet);
932025
+ await (0, import_promises128.mkdir)(import_path91.default.dirname(dynamicSnippetFilePath), { recursive: true });
932026
+ await (0, import_promises128.writeFile)(dynamicSnippetFilePath, response.snippet);
931981
932027
  } catch (error50) {
931982
932028
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
931983
932029
  }
@@ -932004,7 +932050,7 @@ var DynamicSnippetsJavaTestGenerator = class {
932004
932050
  const reportsPath = join8(outputDir, RelativeFilePath2.of("reports"));
932005
932051
  const buildReportsExists = await doesPathExist(buildReportsPath, "directory");
932006
932052
  if (buildReportsExists) {
932007
- await (0, import_promises127.cp)(buildReportsPath, reportsPath, { recursive: true });
932053
+ await (0, import_promises128.cp)(buildReportsPath, reportsPath, { recursive: true });
932008
932054
  this.context.logger.info("Gradle profiling report copied to reports/");
932009
932055
  } else {
932010
932056
  this.context.logger.info("No profiling report found in build/reports/");
@@ -932018,7 +932064,7 @@ var DynamicSnippetsJavaTestGenerator = class {
932018
932064
  }
932019
932065
  async initializeProject(outputDir) {
932020
932066
  const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("src/main/java/com/snippets"));
932021
- await (0, import_promises127.mkdir)(absolutePathToOutputDir, { recursive: true });
932067
+ await (0, import_promises128.mkdir)(absolutePathToOutputDir, { recursive: true });
932022
932068
  return absolutePathToOutputDir;
932023
932069
  }
932024
932070
  getTestFilePath({ absolutePathToOutputDir, idx }) {
@@ -935521,7 +935567,7 @@ var DynamicSnippetsGenerator4 = class extends AbstractDynamicSnippetsGenerator {
935521
935567
  };
935522
935568
 
935523
935569
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/php/DynamicSnippetsPhpTestGenerator.js
935524
- var import_promises128 = require("fs/promises");
935570
+ var import_promises129 = require("fs/promises");
935525
935571
  var import_path92 = __toESM(require("path"), 1);
935526
935572
  var DynamicSnippetsPhpTestGenerator = class {
935527
935573
  context;
@@ -935550,8 +935596,8 @@ var DynamicSnippetsPhpTestGenerator = class {
935550
935596
  endpointId
935551
935597
  });
935552
935598
  const dynamicSnippetFilePath = this.getTestFilePath({ outputDir, idx });
935553
- await (0, import_promises128.mkdir)(import_path92.default.dirname(dynamicSnippetFilePath), { recursive: true });
935554
- await (0, import_promises128.writeFile)(dynamicSnippetFilePath, response.snippet);
935599
+ await (0, import_promises129.mkdir)(import_path92.default.dirname(dynamicSnippetFilePath), { recursive: true });
935600
+ await (0, import_promises129.writeFile)(dynamicSnippetFilePath, response.snippet);
935555
935601
  } catch (error50) {
935556
935602
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
935557
935603
  }
@@ -938808,7 +938854,7 @@ var DynamicSnippetsGenerator5 = class extends AbstractDynamicSnippetsGenerator {
938808
938854
  };
938809
938855
 
938810
938856
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/python/DynamicSnippetsPythonTestGenerator.js
938811
- var import_promises129 = require("fs/promises");
938857
+ var import_promises130 = require("fs/promises");
938812
938858
  var import_path93 = __toESM(require("path"), 1);
938813
938859
  var DynamicSnippetsPythonTestGenerator = class {
938814
938860
  context;
@@ -938837,8 +938883,8 @@ var DynamicSnippetsPythonTestGenerator = class {
938837
938883
  endpointId
938838
938884
  });
938839
938885
  const dynamicSnippetFilePath = this.getTestFilePath({ outputDir, idx });
938840
- await (0, import_promises129.mkdir)(import_path93.default.dirname(dynamicSnippetFilePath), { recursive: true });
938841
- await (0, import_promises129.writeFile)(dynamicSnippetFilePath, response.snippet);
938886
+ await (0, import_promises130.mkdir)(import_path93.default.dirname(dynamicSnippetFilePath), { recursive: true });
938887
+ await (0, import_promises130.writeFile)(dynamicSnippetFilePath, response.snippet);
938842
938888
  } catch (error50) {
938843
938889
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
938844
938890
  }
@@ -941458,7 +941504,8 @@ var EndpointSnippetGenerator6 = class {
941458
941504
  args.push(...this.getNamedParameterArgs({
941459
941505
  kind: "PathParameters",
941460
941506
  namedParameters: pathParameters,
941461
- values: snippet.pathParameters
941507
+ values: snippet.pathParameters,
941508
+ reservedNames: this.getInlinedBodyPropertyNames({ request: request7 })
941462
941509
  }));
941463
941510
  args.push(...this.getNamedParameterArgs({
941464
941511
  kind: "QueryParameters",
@@ -941521,7 +941568,23 @@ var EndpointSnippetGenerator6 = class {
941521
941568
  }
941522
941569
  return args;
941523
941570
  }
941524
- getNamedParameterArgs({ kind, namedParameters, values: values2 }) {
941571
+ /**
941572
+ * Property names of an inlined request body (both Ruby names and wire values). Path
941573
+ * parameters that collide with these are renamed in the generated SDK, so snippets
941574
+ * must rename them the same way.
941575
+ */
941576
+ getInlinedBodyPropertyNames({ request: request7 }) {
941577
+ const names2 = /* @__PURE__ */ new Set();
941578
+ if (request7.body?.type !== "properties") {
941579
+ return names2;
941580
+ }
941581
+ for (const property24 of request7.body.value) {
941582
+ names2.add(this.context.getPropertyName(property24.name.name));
941583
+ names2.add(property24.name.wireValue);
941584
+ }
941585
+ return names2;
941586
+ }
941587
+ getNamedParameterArgs({ kind, namedParameters, values: values2, reservedNames }) {
941525
941588
  const args = [];
941526
941589
  this.context.errors.scope(kind);
941527
941590
  if (namedParameters != null) {
@@ -941535,8 +941598,15 @@ var EndpointSnippetGenerator6 = class {
941535
941598
  if (ruby_exports.TypeLiteral.isNop(value2)) {
941536
941599
  continue;
941537
941600
  }
941601
+ let name2 = this.context.getPropertyName(parameter6.name.name);
941602
+ if (reservedNames != null && reservedNames.has(name2)) {
941603
+ name2 = `${name2}_path_param`;
941604
+ while (reservedNames.has(name2)) {
941605
+ name2 = `${name2}_`;
941606
+ }
941607
+ }
941538
941608
  args.push(ruby_exports.keywordArgument({
941539
- name: this.context.getPropertyName(parameter6.name.name),
941609
+ name: name2,
941540
941610
  value: value2
941541
941611
  }));
941542
941612
  }
@@ -941785,7 +941855,7 @@ var DynamicSnippetsGenerator6 = class extends AbstractDynamicSnippetsGenerator {
941785
941855
  };
941786
941856
 
941787
941857
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/ruby/DynamicSnippetsRubyTestGenerator.js
941788
- var import_promises130 = require("fs/promises");
941858
+ var import_promises131 = require("fs/promises");
941789
941859
  var import_path94 = __toESM(require("path"), 1);
941790
941860
  var DynamicSnippetsRubyTestGenerator = class {
941791
941861
  context;
@@ -941814,8 +941884,8 @@ var DynamicSnippetsRubyTestGenerator = class {
941814
941884
  endpointId
941815
941885
  });
941816
941886
  const dynamicSnippetFilePath = this.getTestFilePath({ outputDir, idx });
941817
- await (0, import_promises130.mkdir)(import_path94.default.dirname(dynamicSnippetFilePath), { recursive: true });
941818
- await (0, import_promises130.writeFile)(dynamicSnippetFilePath, response.snippet);
941887
+ await (0, import_promises131.mkdir)(import_path94.default.dirname(dynamicSnippetFilePath), { recursive: true });
941888
+ await (0, import_promises131.writeFile)(dynamicSnippetFilePath, response.snippet);
941819
941889
  } catch (error50) {
941820
941890
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
941821
941891
  if (error50 instanceof Error && error50.stack) {
@@ -941831,7 +941901,7 @@ var DynamicSnippetsRubyTestGenerator = class {
941831
941901
  };
941832
941902
 
941833
941903
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/rust/DynamicSnippetsRustTestGenerator.js
941834
- var import_promises131 = require("fs/promises");
941904
+ var import_promises132 = require("fs/promises");
941835
941905
  var import_node_path40 = __toESM(require("path"), 1);
941836
941906
  init_lib8();
941837
941907
 
@@ -947065,8 +947135,8 @@ var DynamicSnippetsRustTestGenerator = class {
947065
947135
  absolutePathToOutputDir,
947066
947136
  idx
947067
947137
  });
947068
- await (0, import_promises131.mkdir)(import_node_path40.default.dirname(dynamicSnippetFilePath), { recursive: true });
947069
- await (0, import_promises131.writeFile)(dynamicSnippetFilePath, response.snippet);
947138
+ await (0, import_promises132.mkdir)(import_node_path40.default.dirname(dynamicSnippetFilePath), { recursive: true });
947139
+ await (0, import_promises132.writeFile)(dynamicSnippetFilePath, response.snippet);
947070
947140
  } catch (error50) {
947071
947141
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
947072
947142
  }
@@ -947075,7 +947145,7 @@ var DynamicSnippetsRustTestGenerator = class {
947075
947145
  }
947076
947146
  async initializeProject(outputDir) {
947077
947147
  const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("dynamic-snippets"));
947078
- await (0, import_promises131.mkdir)(absolutePathToOutputDir, { recursive: true });
947148
+ await (0, import_promises132.mkdir)(absolutePathToOutputDir, { recursive: true });
947079
947149
  return absolutePathToOutputDir;
947080
947150
  }
947081
947151
  getTestFilePath({ absolutePathToOutputDir, idx }) {
@@ -947084,7 +947154,7 @@ var DynamicSnippetsRustTestGenerator = class {
947084
947154
  };
947085
947155
 
947086
947156
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/swift/DynamicSnippetsSwiftTestGenerator.js
947087
- var import_promises132 = require("fs/promises");
947157
+ var import_promises133 = require("fs/promises");
947088
947158
  var import_node_path41 = __toESM(require("path"), 1);
947089
947159
  init_lib8();
947090
947160
 
@@ -951748,8 +951818,8 @@ var DynamicSnippetsSwiftTestGenerator = class {
951748
951818
  absolutePathToOutputDir,
951749
951819
  idx
951750
951820
  });
951751
- await (0, import_promises132.mkdir)(import_node_path41.default.dirname(dynamicSnippetFilePath), { recursive: true });
951752
- await (0, import_promises132.writeFile)(dynamicSnippetFilePath, this.wrapSnippetAsLibrary(response.snippet, `Example${idx}`));
951821
+ await (0, import_promises133.mkdir)(import_node_path41.default.dirname(dynamicSnippetFilePath), { recursive: true });
951822
+ await (0, import_promises133.writeFile)(dynamicSnippetFilePath, this.wrapSnippetAsLibrary(response.snippet, `Example${idx}`));
951753
951823
  } catch (error50) {
951754
951824
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
951755
951825
  }
@@ -951758,7 +951828,7 @@ var DynamicSnippetsSwiftTestGenerator = class {
951758
951828
  }
951759
951829
  async initializeProject(outputDir) {
951760
951830
  const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("Tests/Snippets"));
951761
- await (0, import_promises132.mkdir)(absolutePathToOutputDir, { recursive: true });
951831
+ await (0, import_promises133.mkdir)(absolutePathToOutputDir, { recursive: true });
951762
951832
  return absolutePathToOutputDir;
951763
951833
  }
951764
951834
  getTestFilePath({ absolutePathToOutputDir, idx }) {
@@ -954259,7 +954329,7 @@ var DynamicSnippetsGenerator9 = class extends AbstractDynamicSnippetsGenerator {
954259
954329
  };
954260
954330
 
954261
954331
  // ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/typescript/DynamicSnippetsTypeScriptTestGenerator.js
954262
- var import_promises133 = require("fs/promises");
954332
+ var import_promises134 = require("fs/promises");
954263
954333
  var import_path95 = __toESM(require("path"), 1);
954264
954334
  var DynamicSnippetsTypeScriptTestGenerator = class {
954265
954335
  context;
@@ -954288,8 +954358,8 @@ var DynamicSnippetsTypeScriptTestGenerator = class {
954288
954358
  endpointId
954289
954359
  });
954290
954360
  const dynamicSnippetFilePath = this.getTestFilePath({ outputDir, idx });
954291
- await (0, import_promises133.mkdir)(import_path95.default.dirname(dynamicSnippetFilePath), { recursive: true });
954292
- await (0, import_promises133.writeFile)(dynamicSnippetFilePath, response.snippet);
954361
+ await (0, import_promises134.mkdir)(import_path95.default.dirname(dynamicSnippetFilePath), { recursive: true });
954362
+ await (0, import_promises134.writeFile)(dynamicSnippetFilePath, response.snippet);
954293
954363
  } catch (error50) {
954294
954364
  this.context.logger.error(`Failed to generate dynamic snippet for endpoint ${JSON.stringify(request7.endpoint)}: ${error50}`);
954295
954365
  }
@@ -954404,7 +954474,7 @@ init_lib8();
954404
954474
  var import_autoversion3 = __toESM(require_autoversion(), 1);
954405
954475
  init_lib9();
954406
954476
  var import_serialization = __toESM(require_serialization3(), 1);
954407
- var import_promises137 = require("fs/promises");
954477
+ var import_promises138 = require("fs/promises");
954408
954478
  var path102 = __toESM(require("path"), 1);
954409
954479
  var import_path98 = require("path");
954410
954480
  var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
@@ -954412,12 +954482,12 @@ var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
954412
954482
  // ../generation/local-generation/local-workspace-runner/lib/applyTypeRelocations.js
954413
954483
  init_lib8();
954414
954484
  init_lib9();
954415
- var import_promises134 = require("fs/promises");
954485
+ var import_promises135 = require("fs/promises");
954416
954486
  async function applyTypeRelocations({ ir: ir3, tmpOutputDirectory, context: context3 }) {
954417
954487
  const relocationsFilepath = join8(tmpOutputDirectory, RelativeFilePath2.of(TYPE_RELOCATIONS_FILENAME));
954418
954488
  let contents;
954419
954489
  try {
954420
- contents = await (0, import_promises134.readFile)(relocationsFilepath, "utf-8");
954490
+ contents = await (0, import_promises135.readFile)(relocationsFilepath, "utf-8");
954421
954491
  } catch {
954422
954492
  return;
954423
954493
  }
@@ -954451,7 +954521,7 @@ async function applyTypeRelocations({ ir: ir3, tmpOutputDirectory, context: cont
954451
954521
  } catch (error50) {
954452
954522
  context3.logger.warn(`Failed to apply type relocations from ${relocationsFilepath}: ${error50 instanceof Error ? error50.message : String(error50)}`);
954453
954523
  } finally {
954454
- await (0, import_promises134.rm)(relocationsFilepath, { force: true });
954524
+ await (0, import_promises135.rm)(relocationsFilepath, { force: true });
954455
954525
  }
954456
954526
  }
954457
954527
 
@@ -954996,8 +955066,8 @@ var import_autoversion2 = __toESM(require_autoversion(), 1);
954996
955066
  init_lib33();
954997
955067
  init_lib6();
954998
955068
  var import_decompress2 = __toESM(require_decompress(), 1);
954999
- var import_promises135 = require("fs/promises");
955000
- var import_os12 = require("os");
955069
+ var import_promises136 = require("fs/promises");
955070
+ var import_os13 = require("os");
955001
955071
  var import_path96 = require("path");
955002
955072
  var import_semver13 = __toESM(require_semver2(), 1);
955003
955073
  var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
@@ -955105,7 +955175,7 @@ var LocalTaskHandler = class {
955105
955175
  try {
955106
955176
  this.context.logger.info("Analyzing SDK changes for automatic semantic versioning");
955107
955177
  diffFile = await this.generateDiffFile();
955108
- const diffContent = await (0, import_promises135.readFile)(diffFile, "utf-8");
955178
+ const diffContent = await (0, import_promises136.readFile)(diffFile, "utf-8");
955109
955179
  if (diffContent.trim().length === 0) {
955110
955180
  this.context.logger.info("No changes detected in generated SDK");
955111
955181
  return null;
@@ -955310,7 +955380,7 @@ var LocalTaskHandler = class {
955310
955380
  } finally {
955311
955381
  if (diffFile) {
955312
955382
  try {
955313
- await (0, import_promises135.rm)(diffFile);
955383
+ await (0, import_promises136.rm)(diffFile);
955314
955384
  } catch (cleanupError) {
955315
955385
  this.context.logger.warn(`Failed to delete temp diff file: ${diffFile}`, String(cleanupError));
955316
955386
  }
@@ -955491,7 +955561,7 @@ var LocalTaskHandler = class {
955491
955561
  const absolutePathToFernignore = AbsoluteFilePath2.of(join8(this.absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME)));
955492
955562
  const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
955493
955563
  const pathsToPreserve = await this.getPathsToPreserve(fernIgnorePaths);
955494
- await (0, import_promises135.cp)(this.absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true, verbatimSymlinks: true });
955564
+ await (0, import_promises136.cp)(this.absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true, verbatimSymlinks: true });
955495
955565
  await this.runThrowawayGitCommand(["init"], tmpOutputResolutionDir);
955496
955566
  await this.runThrowawayGitCommand(["config", "gc.auto", "0"], tmpOutputResolutionDir);
955497
955567
  await this.runThrowawayGitCommand(["add", "."], tmpOutputResolutionDir);
@@ -955512,22 +955582,22 @@ var LocalTaskHandler = class {
955512
955582
  await this.runThrowawayGitCommand(["reset", "--", ...pathsToPreserve], tmpOutputResolutionDir);
955513
955583
  await this.runThrowawayGitCommand(["clean", "-fd", "--", ...pathsToPreserve], tmpOutputResolutionDir);
955514
955584
  await this.runThrowawayGitCommand(["restore", "."], tmpOutputResolutionDir);
955515
- await (0, import_promises135.rm)(join8(tmpOutputResolutionDir, RelativeFilePath2.of(".git")), {
955585
+ await (0, import_promises136.rm)(join8(tmpOutputResolutionDir, RelativeFilePath2.of(".git")), {
955516
955586
  recursive: true,
955517
955587
  force: true,
955518
955588
  maxRetries: 3,
955519
955589
  retryDelay: 100
955520
955590
  });
955521
- await (0, import_promises135.rm)(this.absolutePathToLocalOutput, { recursive: true });
955522
- await (0, import_promises135.cp)(tmpOutputResolutionDir, this.absolutePathToLocalOutput, { recursive: true, verbatimSymlinks: true });
955591
+ await (0, import_promises136.rm)(this.absolutePathToLocalOutput, { recursive: true });
955592
+ await (0, import_promises136.cp)(tmpOutputResolutionDir, this.absolutePathToLocalOutput, { recursive: true, verbatimSymlinks: true });
955523
955593
  }
955524
955594
  async copyGeneratedFilesNoFernIgnorePreservingGit() {
955525
- const contents = await (0, import_promises135.readdir)(this.absolutePathToLocalOutput);
955595
+ const contents = await (0, import_promises136.readdir)(this.absolutePathToLocalOutput);
955526
955596
  const itemsToPreserve = [".git"];
955527
955597
  if (await this.generatedOutputMissingReadme()) {
955528
955598
  itemsToPreserve.push("README.md");
955529
955599
  }
955530
- await Promise.all(contents.filter((item) => !itemsToPreserve.includes(item)).map((item) => (0, import_promises135.rm)(join8(this.absolutePathToLocalOutput, RelativeFilePath2.of(item)), {
955600
+ await Promise.all(contents.filter((item) => !itemsToPreserve.includes(item)).map((item) => (0, import_promises136.rm)(join8(this.absolutePathToLocalOutput, RelativeFilePath2.of(item)), {
955531
955601
  force: true,
955532
955602
  recursive: true
955533
955603
  })));
@@ -955535,11 +955605,11 @@ var LocalTaskHandler = class {
955535
955605
  }
955536
955606
  async copyGeneratedFilesNoFernIgnoreDeleteAll() {
955537
955607
  this.context.logger.debug(`rm -rf ${this.absolutePathToLocalOutput}`);
955538
- await (0, import_promises135.rm)(this.absolutePathToLocalOutput, { force: true, recursive: true });
955608
+ await (0, import_promises136.rm)(this.absolutePathToLocalOutput, { force: true, recursive: true });
955539
955609
  await this.copyGeneratedFilesToDirectory(this.absolutePathToLocalOutput);
955540
955610
  }
955541
955611
  async copyGeneratedFilesToDirectory(outputPath) {
955542
- const [firstLocalOutputItem, ...remaininglocalOutputItems] = await (0, import_promises135.readdir)(this.absolutePathToTmpOutputDirectory);
955612
+ const [firstLocalOutputItem, ...remaininglocalOutputItems] = await (0, import_promises136.readdir)(this.absolutePathToTmpOutputDirectory);
955543
955613
  if (firstLocalOutputItem == null) {
955544
955614
  return;
955545
955615
  }
@@ -955547,10 +955617,10 @@ var LocalTaskHandler = class {
955547
955617
  if (firstLocalOutputItem.endsWith(".zip")) {
955548
955618
  await (0, import_decompress2.default)(join8(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(firstLocalOutputItem)), outputPath);
955549
955619
  for (const localOutputItem of remaininglocalOutputItems) {
955550
- await (0, import_promises135.cp)(join8(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(localOutputItem)), join8(outputPath, RelativeFilePath2.of(localOutputItem)), { recursive: true, verbatimSymlinks: true });
955620
+ await (0, import_promises136.cp)(join8(this.absolutePathToTmpOutputDirectory, RelativeFilePath2.of(localOutputItem)), join8(outputPath, RelativeFilePath2.of(localOutputItem)), { recursive: true, verbatimSymlinks: true });
955551
955621
  }
955552
955622
  } else {
955553
- await (0, import_promises135.cp)(this.absolutePathToTmpOutputDirectory, outputPath, { recursive: true, verbatimSymlinks: true });
955623
+ await (0, import_promises136.cp)(this.absolutePathToTmpOutputDirectory, outputPath, { recursive: true, verbatimSymlinks: true });
955554
955624
  }
955555
955625
  }
955556
955626
  async copySnippetJSON({ absolutePathToTmpSnippetJSON, absolutePathToLocalSnippetJSON }) {
@@ -955571,7 +955641,7 @@ var LocalTaskHandler = class {
955571
955641
  */
955572
955642
  async generatedOutputMissingReadme() {
955573
955643
  try {
955574
- const contents = await (0, import_promises135.readdir)(this.absolutePathToTmpOutputDirectory);
955644
+ const contents = await (0, import_promises136.readdir)(this.absolutePathToTmpOutputDirectory);
955575
955645
  if (contents.length === 1 && contents[0] != null && contents[0].endsWith(".zip")) {
955576
955646
  return false;
955577
955647
  }
@@ -955621,13 +955691,13 @@ var LocalTaskHandler = class {
955621
955691
  async readPriorChangelog(maxEntries) {
955622
955692
  const MAX_CHANGELOG_SIZE = 2048;
955623
955693
  try {
955624
- const files = await (0, import_promises135.readdir)(this.absolutePathToLocalOutput);
955694
+ const files = await (0, import_promises136.readdir)(this.absolutePathToLocalOutput);
955625
955695
  const changelogFile = files.find((f3) => f3.toLowerCase() === "changelog.md");
955626
955696
  if (!changelogFile) {
955627
955697
  return "";
955628
955698
  }
955629
955699
  const changelogPath = join8(this.absolutePathToLocalOutput, RelativeFilePath2.of(changelogFile));
955630
- const content5 = await (0, import_promises135.readFile)(changelogPath, "utf-8");
955700
+ const content5 = await (0, import_promises136.readFile)(changelogPath, "utf-8");
955631
955701
  if (content5.trim().length === 0) {
955632
955702
  return "";
955633
955703
  }
@@ -955695,7 +955765,7 @@ var LocalTaskHandler = class {
955695
955765
  * when the copy path does not stage files (copyGeneratedFilesNoFernIgnorePreservingGit).
955696
955766
  */
955697
955767
  async generateDiffFile() {
955698
- const diffFile = (0, import_path96.join)((0, import_os12.tmpdir)(), `git-diff-${Date.now()}.patch`);
955768
+ const diffFile = (0, import_path96.join)((0, import_os13.tmpdir)(), `git-diff-${Date.now()}.patch`);
955699
955769
  await this.runGitCommand(["add", "-N", "."], this.absolutePathToLocalOutput);
955700
955770
  await this.runGitCommand(["diff", "HEAD", "--output", diffFile, "--", ".", ":(exclude).fern/metadata.json"], this.absolutePathToLocalOutput);
955701
955771
  this.context.logger.info(`Generated git diff to file: ${diffFile}`);
@@ -955703,11 +955773,11 @@ var LocalTaskHandler = class {
955703
955773
  }
955704
955774
  };
955705
955775
  async function copySnippetJsonIfNonEmpty({ src, dest }) {
955706
- const tmpStat = await (0, import_promises135.stat)(src);
955776
+ const tmpStat = await (0, import_promises136.stat)(src);
955707
955777
  if (tmpStat.size === 0) {
955708
955778
  return "skipped-empty";
955709
955779
  }
955710
- await (0, import_promises135.cp)(src, dest);
955780
+ await (0, import_promises136.cp)(src, dest);
955711
955781
  return "copied";
955712
955782
  }
955713
955783
 
@@ -955715,7 +955785,7 @@ async function copySnippetJsonIfNonEmpty({ src, dest }) {
955715
955785
  init_lib4();
955716
955786
  init_lib8();
955717
955787
  init_lib35();
955718
- var import_promises136 = require("fs/promises");
955788
+ var import_promises137 = require("fs/promises");
955719
955789
  init_js_yaml();
955720
955790
  var import_path97 = __toESM(require("path"), 1);
955721
955791
  init_index_min2();
@@ -955784,7 +955854,7 @@ async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir,
955784
955854
  });
955785
955855
  }
955786
955856
  resolved = filterSpec(resolved, audiences);
955787
- await (0, import_promises136.writeFile)(import_path97.default.join(hostOutputDir, filename), JSON.stringify(resolved));
955857
+ await (0, import_promises137.writeFile)(import_path97.default.join(hostOutputDir, filename), JSON.stringify(resolved));
955788
955858
  context3.logger.debug(`Resolved ${isAsync2 ? "AsyncAPI" : "OpenAPI"} spec ${spec.absoluteFilepath} -> ${filename}`);
955789
955859
  return {
955790
955860
  type: isAsync2 ? "asyncapi" : "openapi",
@@ -955794,7 +955864,7 @@ async function resolveOpenAPIOrAsyncAPI({ spec, hostOutputDir, containerBaseDir,
955794
955864
  }
955795
955865
  async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context: context3, index: index3 }) {
955796
955866
  const filename = `openrpc${index3}.json`;
955797
- const rawContent = await (0, import_promises136.readFile)(spec.absoluteFilepath, "utf-8");
955867
+ const rawContent = await (0, import_promises137.readFile)(spec.absoluteFilepath, "utf-8");
955798
955868
  let parsed;
955799
955869
  try {
955800
955870
  parsed = JSON.parse(rawContent);
@@ -955804,7 +955874,7 @@ async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context:
955804
955874
  let result = parsed;
955805
955875
  const overrides = normalizeOverrides(spec.absoluteFilepathToOverrides);
955806
955876
  for (const overridePath of overrides) {
955807
- const overrideContent = await (0, import_promises136.readFile)(overridePath, "utf-8");
955877
+ const overrideContent = await (0, import_promises137.readFile)(overridePath, "utf-8");
955808
955878
  let overrideParsed;
955809
955879
  try {
955810
955880
  overrideParsed = JSON.parse(overrideContent);
@@ -955816,7 +955886,7 @@ async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context:
955816
955886
  overrides: overrideParsed
955817
955887
  });
955818
955888
  }
955819
- await (0, import_promises136.writeFile)(import_path97.default.join(hostOutputDir, filename), JSON.stringify(result));
955889
+ await (0, import_promises137.writeFile)(import_path97.default.join(hostOutputDir, filename), JSON.stringify(result));
955820
955890
  context3.logger.debug(`Resolved OpenRPC spec ${spec.absoluteFilepath} -> ${filename}`);
955821
955891
  return {
955822
955892
  type: "openrpc",
@@ -955827,7 +955897,7 @@ async function resolveOpenRPC({ spec, hostOutputDir, containerBaseDir, context:
955827
955897
  async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
955828
955898
  const dirName = `protobuf${index3}`;
955829
955899
  const destDir = import_path97.default.join(hostOutputDir, dirName);
955830
- await (0, import_promises136.cp)(spec.absoluteFilepathToProtobufRoot, destDir, { recursive: true });
955900
+ await (0, import_promises137.cp)(spec.absoluteFilepathToProtobufRoot, destDir, { recursive: true });
955831
955901
  const entry = {
955832
955902
  type: "protobuf",
955833
955903
  specPath: toContainerPath(dirName, containerBaseDir)
@@ -955837,7 +955907,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
955837
955907
  entry.overridePaths = [];
955838
955908
  for (const [i5, override] of overrides.entries()) {
955839
955909
  const overrideName = `protobuf${index3}-override-${i5}${import_path97.default.extname(override)}`;
955840
- await (0, import_promises136.copyFile)(override, import_path97.default.join(hostOutputDir, overrideName));
955910
+ await (0, import_promises137.copyFile)(override, import_path97.default.join(hostOutputDir, overrideName));
955841
955911
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
955842
955912
  }
955843
955913
  }
@@ -955846,7 +955916,7 @@ async function copyProtobuf({ spec, hostOutputDir, containerBaseDir, index: inde
955846
955916
  async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index3 }) {
955847
955917
  const ext2 = import_path97.default.extname(spec.absoluteFilepath) || ".graphql";
955848
955918
  const filename = `graphql${index3}${ext2}`;
955849
- await (0, import_promises136.copyFile)(spec.absoluteFilepath, import_path97.default.join(hostOutputDir, filename));
955919
+ await (0, import_promises137.copyFile)(spec.absoluteFilepath, import_path97.default.join(hostOutputDir, filename));
955850
955920
  const entry = {
955851
955921
  type: "graphql",
955852
955922
  specPath: toContainerPath(filename, containerBaseDir),
@@ -955857,7 +955927,7 @@ async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index
955857
955927
  entry.overridePaths = [];
955858
955928
  for (const [i5, override] of overrides.entries()) {
955859
955929
  const overrideName = `graphql${index3}-override-${i5}${import_path97.default.extname(override)}`;
955860
- await (0, import_promises136.copyFile)(override, import_path97.default.join(hostOutputDir, overrideName));
955930
+ await (0, import_promises137.copyFile)(override, import_path97.default.join(hostOutputDir, overrideName));
955861
955931
  entry.overridePaths.push(toContainerPath(overrideName, containerBaseDir));
955862
955932
  }
955863
955933
  }
@@ -955865,7 +955935,7 @@ async function copyGraphQL({ spec, hostOutputDir, containerBaseDir, index: index
955865
955935
  }
955866
955936
  async function isAsyncAPISpec(filepath) {
955867
955937
  try {
955868
- const content5 = await (0, import_promises136.readFile)(filepath, "utf-8");
955938
+ const content5 = await (0, import_promises137.readFile)(filepath, "utf-8");
955869
955939
  return content5.includes("asyncapi");
955870
955940
  } catch {
955871
955941
  return false;
@@ -955975,7 +956045,7 @@ async function createSpecsTarGzBuffer({ specs, context: context3, audiences }) {
955975
956045
  context: context3,
955976
956046
  audiences
955977
956047
  });
955978
- await (0, import_promises136.writeFile)(join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of(SPECS_MANIFEST_FILENAME)), JSON.stringify(manifest, void 0, 4));
956048
+ await (0, import_promises137.writeFile)(join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of(SPECS_MANIFEST_FILENAME)), JSON.stringify(manifest, void 0, 4));
955979
956049
  const tarGzPath = join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of("specs.tar.gz"));
955980
956050
  await Kn({
955981
956051
  gzip: true,
@@ -955984,7 +956054,7 @@ async function createSpecsTarGzBuffer({ specs, context: context3, audiences }) {
955984
956054
  portable: true,
955985
956055
  filter: (entryPath) => entryPath !== "./specs.tar.gz"
955986
956056
  }, ["."]);
955987
- return await (0, import_promises136.readFile)(tarGzPath);
956057
+ return await (0, import_promises137.readFile)(tarGzPath);
955988
956058
  } finally {
955989
956059
  await tmpDir.cleanup();
955990
956060
  }
@@ -956026,24 +956096,24 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
956026
956096
  context3.logger.debug("Wrote IR to: " + absolutePathToIr);
956027
956097
  const configJsonFile = (0, import_path98.join)(workspaceTempDir.path, GENERATOR_CONFIG_FILENAME);
956028
956098
  const absolutePathToWriteConfigJson = AbsoluteFilePath2.of(configJsonFile);
956029
- await (0, import_promises137.writeFile)(configJsonFile, "");
956099
+ await (0, import_promises138.writeFile)(configJsonFile, "");
956030
956100
  context3.logger.debug("Will write config.json to: " + absolutePathToWriteConfigJson);
956031
956101
  const tmpOutputDirectory = (0, import_path98.join)(workspaceTempDir.path, CODEGEN_OUTPUT_DIRECTORY_NAME);
956032
956102
  const absolutePathToTmpOutputDirectory = AbsoluteFilePath2.of(tmpOutputDirectory);
956033
- await (0, import_promises137.mkdir)(tmpOutputDirectory, { recursive: true });
956103
+ await (0, import_promises138.mkdir)(tmpOutputDirectory, { recursive: true });
956034
956104
  context3.logger.debug("Will write output to: " + absolutePathToTmpOutputDirectory);
956035
956105
  let absolutePathToTmpSnippetJSON = void 0;
956036
956106
  if (absolutePathToLocalSnippetJSON != null) {
956037
956107
  const snippetJsonFile = (0, import_path98.join)(workspaceTempDir.path, "snippet.json");
956038
956108
  absolutePathToTmpSnippetJSON = AbsoluteFilePath2.of(snippetJsonFile);
956039
- await (0, import_promises137.writeFile)(snippetJsonFile, "");
956109
+ await (0, import_promises138.writeFile)(snippetJsonFile, "");
956040
956110
  context3.logger.debug("Will write snippet.json to: " + absolutePathToTmpSnippetJSON);
956041
956111
  }
956042
956112
  let absolutePathToTmpSnippetTemplatesJSON = void 0;
956043
956113
  if (absolutePathToLocalSnippetTemplateJSON != null) {
956044
956114
  const snippetTemplatesJsonFile = (0, import_path98.join)(workspaceTempDir.path, SNIPPET_TEMPLATES_JSON_FILENAME);
956045
956115
  absolutePathToTmpSnippetTemplatesJSON = AbsoluteFilePath2.of(snippetTemplatesJsonFile);
956046
- await (0, import_promises137.writeFile)(snippetTemplatesJsonFile, "");
956116
+ await (0, import_promises138.writeFile)(snippetTemplatesJsonFile, "");
956047
956117
  context3.logger.debug("Will write snippet-templates.json to: " + absolutePathToTmpSnippetTemplatesJSON);
956048
956118
  }
956049
956119
  const environment2 = executionEnvironment ?? new ContainerExecutionEnvironment({
@@ -956084,7 +956154,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
956084
956154
  publishToRegistry,
956085
956155
  paths
956086
956156
  });
956087
- await (0, import_promises137.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(await import_serialization.GeneratorConfig.jsonOrThrow(config5), void 0, 4));
956157
+ await (0, import_promises138.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(await import_serialization.GeneratorConfig.jsonOrThrow(config5), void 0, 4));
956088
956158
  const absolutePathToLicenseFile = extractLicenseFilePath(generatorInvocation, absolutePathToFernConfig);
956089
956159
  const sourceMounts = workspace.getSources().filter((source2) => source2.type === "protobuf").map((source2) => ({
956090
956160
  hostPath: source2.absoluteFilePath,
@@ -956092,7 +956162,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
956092
956162
  }));
956093
956163
  if (rawApiSpecs != null && rawApiSpecs.length > 0) {
956094
956164
  const rawSpecsDir = (0, import_path98.join)(workspaceTempDir.path, SPECS_DIRECTORY_NAME);
956095
- await (0, import_promises137.mkdir)(rawSpecsDir, { recursive: true });
956165
+ await (0, import_promises138.mkdir)(rawSpecsDir, { recursive: true });
956096
956166
  const containerSpecsDir = environment2.usesContainerPaths ? CONTAINER_SPECS_DIRECTORY : rawSpecsDir;
956097
956167
  const manifest = await collectRawSpecs({
956098
956168
  specs: rawApiSpecs,
@@ -956101,7 +956171,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
956101
956171
  context: context3,
956102
956172
  audiences
956103
956173
  });
956104
- await (0, import_promises137.writeFile)((0, import_path98.join)(rawSpecsDir, SPECS_MANIFEST_FILENAME), JSON.stringify(manifest, void 0, 4));
956174
+ await (0, import_promises138.writeFile)((0, import_path98.join)(rawSpecsDir, SPECS_MANIFEST_FILENAME), JSON.stringify(manifest, void 0, 4));
956105
956175
  context3.logger.debug(`Wrote raw specs manifest with ${manifest.specs.length} spec(s) to ${rawSpecsDir}`);
956106
956176
  sourceMounts.push({
956107
956177
  hostPath: AbsoluteFilePath2.of(rawSpecsDir),
@@ -956197,7 +956267,7 @@ init_lib35();
956197
956267
  init_lib6();
956198
956268
  init_source();
956199
956269
  var fs30 = __toESM(require("fs/promises"), 1);
956200
- var import_os13 = __toESM(require("os"), 1);
956270
+ var import_os14 = __toESM(require("os"), 1);
956201
956271
  var import_path99 = __toESM(require("path"), 1);
956202
956272
  var import_tmp_promise18 = __toESM(require_tmp_promise(), 1);
956203
956273
 
@@ -956544,7 +956614,7 @@ async function getWorkspaceTempDir() {
956544
956614
  return import_tmp_promise18.default.dir({
956545
956615
  // use the /private prefix on osx so that docker can access the tmpdir
956546
956616
  // see https://stackoverflow.com/a/45123074
956547
- tmpdir: import_os13.default.platform() === "darwin" ? import_path99.default.join("/private", import_os13.default.tmpdir()) : void 0,
956617
+ tmpdir: import_os14.default.platform() === "darwin" ? import_path99.default.join("/private", import_os14.default.tmpdir()) : void 0,
956548
956618
  prefix: "fern"
956549
956619
  });
956550
956620
  }
@@ -956871,7 +956941,7 @@ async function runVerifyPipeline({ outputDir, generatorName, generatorVersion, c
956871
956941
  // ../cli-v2/lib/sdk/generator/LegacyLocalGenerationRunner.js
956872
956942
  init_lib5();
956873
956943
  init_lib6();
956874
- var import_promises139 = require("fs/promises");
956944
+ var import_promises140 = require("fs/promises");
956875
956945
 
956876
956946
  // ../cli-v2/lib/sdk/adapter/LegacyGeneratorInvocationAdapter.js
956877
956947
  init_lib12();
@@ -956881,7 +956951,7 @@ init_lib8();
956881
956951
  init_lib11();
956882
956952
  init_lib6();
956883
956953
  init_esm19();
956884
- var import_promises138 = require("fs/promises");
956954
+ var import_promises139 = require("fs/promises");
956885
956955
  var LegacyGeneratorInvocationAdapter = class {
956886
956956
  context;
956887
956957
  constructor(config5) {
@@ -957135,7 +957205,7 @@ var LegacyGeneratorInvocationAdapter = class {
957135
957205
  code: CliError.Code.InternalError
957136
957206
  });
957137
957207
  }
957138
- const contents = await (0, import_promises138.readFile)(absolutePath, "utf-8");
957208
+ const contents = await (0, import_promises139.readFile)(absolutePath, "utf-8");
957139
957209
  return api_exports4.GithubLicense.custom({ contents });
957140
957210
  }
957141
957211
  buildReadme(target) {
@@ -957361,7 +957431,7 @@ var LegacyLocalGenerationRunner = class {
957361
957431
  });
957362
957432
  if (args.target.output.path != null && generatorInvocation.absolutePathToLocalOutput != null) {
957363
957433
  const snippetPath = join8(generatorInvocation.absolutePathToLocalOutput, RelativeFilePath2.of(SNIPPET_JSON_FILENAME));
957364
- await (0, import_promises139.rm)(snippetPath, { force: true });
957434
+ await (0, import_promises140.rm)(snippetPath, { force: true });
957365
957435
  }
957366
957436
  if (taskContext.getResult() === TaskResult.Failure) {
957367
957437
  return {
@@ -957380,8 +957450,8 @@ init_lib4();
957380
957450
  init_lib8();
957381
957451
  init_lib5();
957382
957452
  init_lib6();
957383
- var import_promises140 = require("fs/promises");
957384
- var import_os14 = require("os");
957453
+ var import_promises141 = require("fs/promises");
957454
+ var import_os15 = require("os");
957385
957455
  var LegacyRemoteGenerationRunner = class {
957386
957456
  context;
957387
957457
  cliVersion;
@@ -957439,13 +957509,13 @@ var LegacyRemoteGenerationRunner = class {
957439
957509
  const previewOutputDirectory = join8(absolutePathToPreview, RelativeFilePath2.of(generatorName));
957440
957510
  const targetOutputDirectory = generatorInvocation.absolutePathToLocalOutput;
957441
957511
  if (targetOutputDirectory != null) {
957442
- await (0, import_promises140.cp)(previewOutputDirectory, targetOutputDirectory, { recursive: true });
957443
- await (0, import_promises140.rm)(join8(targetOutputDirectory, RelativeFilePath2.of(".git")), {
957512
+ await (0, import_promises141.cp)(previewOutputDirectory, targetOutputDirectory, { recursive: true });
957513
+ await (0, import_promises141.rm)(join8(targetOutputDirectory, RelativeFilePath2.of(".git")), {
957444
957514
  recursive: true,
957445
957515
  force: true
957446
957516
  });
957447
957517
  }
957448
- await (0, import_promises140.rm)(absolutePathToPreview, { recursive: true, force: true });
957518
+ await (0, import_promises141.rm)(absolutePathToPreview, { recursive: true, force: true });
957449
957519
  }
957450
957520
  if (taskContext.getResult() === TaskResult.Failure) {
957451
957521
  return {
@@ -957474,7 +957544,7 @@ var LegacyRemoteGenerationRunner = class {
957474
957544
  }
957475
957545
  async getAbsolutePathToPreview(args) {
957476
957546
  if (this.isLocalGitCombo(args)) {
957477
- const tmpPreviewDirectory = await (0, import_promises140.mkdtemp)(join8(AbsoluteFilePath2.of((0, import_os14.tmpdir)()), RelativeFilePath2.of("fern-preview-")));
957547
+ const tmpPreviewDirectory = await (0, import_promises141.mkdtemp)(join8(AbsoluteFilePath2.of((0, import_os15.tmpdir)()), RelativeFilePath2.of("fern-preview-")));
957478
957548
  return AbsoluteFilePath2.of(tmpPreviewDirectory);
957479
957549
  }
957480
957550
  if (!args.preview) {
@@ -958210,7 +958280,7 @@ Example:
958210
958280
  if (!exists2) {
958211
958281
  return { shouldProceed: true };
958212
958282
  }
958213
- const files = await (0, import_promises141.readdir)(outputPath);
958283
+ const files = await (0, import_promises142.readdir)(outputPath);
958214
958284
  if (files.length === 0) {
958215
958285
  return { shouldProceed: true };
958216
958286
  }
@@ -958622,7 +958692,7 @@ init_lib4();
958622
958692
  init_lib33();
958623
958693
  init_lib6();
958624
958694
  var import_fs38 = require("fs");
958625
- var import_promises142 = require("fs/promises");
958695
+ var import_promises143 = require("fs/promises");
958626
958696
  var import_path101 = require("path");
958627
958697
  var import_semver14 = __toESM(require_semver2(), 1);
958628
958698
  var import_url8 = require("url");
@@ -958732,7 +958802,7 @@ var GeneratorMigrator = class _GeneratorMigrator {
958732
958802
  }
958733
958803
  this.migrationsInstallPromise = (async () => {
958734
958804
  const cacheDir = this.cachePath;
958735
- await (0, import_promises142.mkdir)(cacheDir, { recursive: true });
958805
+ await (0, import_promises143.mkdir)(cacheDir, { recursive: true });
958736
958806
  const npmCacheDir = (0, import_path101.join)(cacheDir, ".npm-cache");
958737
958807
  const packageDir = (0, import_path101.join)(cacheDir, "node_modules", MIGRATION_PACKAGE_NAME);
958738
958808
  const packageJsonPath = (0, import_path101.join)(packageDir, "package.json");
@@ -958749,7 +958819,7 @@ var GeneratorMigrator = class _GeneratorMigrator {
958749
958819
  "--no-audit",
958750
958820
  "--no-fund"
958751
958821
  ], { doNotPipeOutput: true });
958752
- const packageJsonContent = await (0, import_promises142.readFile)(packageJsonPath, "utf-8");
958822
+ const packageJsonContent = await (0, import_promises143.readFile)(packageJsonPath, "utf-8");
958753
958823
  const packageJson2 = JSON.parse(packageJsonContent);
958754
958824
  if (packageJson2.main == null) {
958755
958825
  throw new CliError({
@@ -958794,7 +958864,7 @@ var GeneratorMigrator = class _GeneratorMigrator {
958794
958864
  const myPid = String(process.pid);
958795
958865
  while (true) {
958796
958866
  try {
958797
- const fh = await (0, import_promises142.open)(lockPath, "wx");
958867
+ const fh = await (0, import_promises143.open)(lockPath, "wx");
958798
958868
  await fh.writeFile(myPid);
958799
958869
  await fh.close();
958800
958870
  const exitHandler = () => {
@@ -958811,9 +958881,9 @@ var GeneratorMigrator = class _GeneratorMigrator {
958811
958881
  return async () => {
958812
958882
  process.removeListener("exit", exitHandler);
958813
958883
  try {
958814
- const currentContent = await (0, import_promises142.readFile)(lockPath, "utf-8");
958884
+ const currentContent = await (0, import_promises143.readFile)(lockPath, "utf-8");
958815
958885
  if (currentContent.trim() === myPid) {
958816
- await (0, import_promises142.unlink)(lockPath);
958886
+ await (0, import_promises143.unlink)(lockPath);
958817
958887
  } else {
958818
958888
  logger4.debug(`Lock file owned by another process (expected pid=${myPid}, found=${currentContent.trim()}); skipping release`);
958819
958889
  }
@@ -958827,14 +958897,14 @@ var GeneratorMigrator = class _GeneratorMigrator {
958827
958897
  throw err;
958828
958898
  }
958829
958899
  try {
958830
- const lockContent = await (0, import_promises142.readFile)(lockPath, "utf-8");
958900
+ const lockContent = await (0, import_promises143.readFile)(lockPath, "utf-8");
958831
958901
  const lockPid = Number(lockContent.trim());
958832
- const lockStat = await (0, import_promises142.stat)(lockPath);
958902
+ const lockStat = await (0, import_promises143.stat)(lockPath);
958833
958903
  const lockAge = Date.now() - lockStat.mtimeMs;
958834
958904
  if (lockAge > _GeneratorMigrator.LOCK_STALE_MS || Number.isFinite(lockPid) && lockPid > 0 && !_GeneratorMigrator.isProcessAlive(lockPid)) {
958835
958905
  logger4.debug(`Removing stale migration lock (pid=${lockContent.trim()}, age=${lockAge}ms)`);
958836
958906
  try {
958837
- await (0, import_promises142.unlink)(lockPath);
958907
+ await (0, import_promises143.unlink)(lockPath);
958838
958908
  } catch (unlinkErr) {
958839
958909
  logger4.debug(`Failed to remove stale lock: ${unlinkErr}`);
958840
958910
  }
@@ -959523,7 +959593,7 @@ var import_generator_cli5 = __toESM(require_api3(), 1);
959523
959593
  init_lib19();
959524
959594
  init_lib8();
959525
959595
  init_source();
959526
- var import_promises147 = require("fs/promises");
959596
+ var import_promises148 = require("fs/promises");
959527
959597
  var import_fs_extra = __toESM(require_lib18(), 1);
959528
959598
  var import_path104 = __toESM(require("path"), 1);
959529
959599
 
@@ -959533,7 +959603,7 @@ init_lib26();
959533
959603
  init_lib8();
959534
959604
  init_lib6();
959535
959605
  init_source();
959536
- var import_promises144 = require("fs/promises");
959606
+ var import_promises145 = require("fs/promises");
959537
959607
  init_lodash();
959538
959608
  var GITIGNORE_CONTENT = "**/.preview\n**/.definition\n";
959539
959609
  async function createFernDirectoryAndWorkspace({ organization, taskContext, versionOfCli }) {
@@ -959565,7 +959635,7 @@ async function createFernDirectoryAndWorkspace({ organization, taskContext, vers
959565
959635
  }
959566
959636
  }
959567
959637
  }
959568
- await (0, import_promises144.mkdir)(FERN_DIRECTORY);
959638
+ await (0, import_promises145.mkdir)(FERN_DIRECTORY);
959569
959639
  await writeProjectConfig({
959570
959640
  filepath: join8(pathToFernDirectory, RelativeFilePath2.of(PROJECT_CONFIG_FILENAME)),
959571
959641
  organization,
@@ -959589,11 +959659,11 @@ async function writeProjectConfig({ organization, filepath, versionOfCli }) {
959589
959659
  organization,
959590
959660
  version: versionOfCli
959591
959661
  };
959592
- await (0, import_promises144.writeFile)(filepath, JSON.stringify(projectConfig, void 0, 4));
959662
+ await (0, import_promises145.writeFile)(filepath, JSON.stringify(projectConfig, void 0, 4));
959593
959663
  }
959594
959664
  async function writeGitignore({ absolutePathToFernDirectory }) {
959595
959665
  const gitignorePath = join8(absolutePathToFernDirectory, RelativeFilePath2.of(".gitignore"));
959596
- await (0, import_promises144.writeFile)(gitignorePath, GITIGNORE_CONTENT);
959666
+ await (0, import_promises145.writeFile)(gitignorePath, GITIGNORE_CONTENT);
959597
959667
  }
959598
959668
 
959599
959669
  // ../init/lib/createWorkspace.js
@@ -959787,7 +959857,7 @@ async function formatDefinitionFile({ fileContents }) {
959787
959857
  init_lib4();
959788
959858
  init_lib6();
959789
959859
  init_source();
959790
- var import_promises145 = require("fs/promises");
959860
+ var import_promises146 = require("fs/promises");
959791
959861
  async function formatFernWorkspace({ workspace, context: context3, shouldFix }) {
959792
959862
  for (const [relativeFilepath, file4] of entries(workspace.definition.namedDefinitionFiles)) {
959793
959863
  const formatted = await formatDefinitionFile({
@@ -959795,7 +959865,7 @@ async function formatFernWorkspace({ workspace, context: context3, shouldFix })
959795
959865
  });
959796
959866
  if (formatted !== file4.rawContents) {
959797
959867
  if (shouldFix) {
959798
- await (0, import_promises145.writeFile)(file4.absoluteFilePath, formatted);
959868
+ await (0, import_promises146.writeFile)(file4.absoluteFilePath, formatted);
959799
959869
  context3.logger.info(source_default.green(`Formatted ${source_default.bold(relativeFilepath)}`));
959800
959870
  } else {
959801
959871
  context3.logger.info(source_default.red(`Invalid formatting: ${source_default.bold(relativeFilepath)}`));
@@ -959808,7 +959878,7 @@ async function formatFernWorkspace({ workspace, context: context3, shouldFix })
959808
959878
  // ../init/lib/createWorkspace.js
959809
959879
  init_lib8();
959810
959880
  init_lib6();
959811
- var import_promises146 = require("fs/promises");
959881
+ var import_promises147 = require("fs/promises");
959812
959882
  init_js_yaml();
959813
959883
 
959814
959884
  // ../init/lib/sampleImdbApi.js
@@ -960009,7 +960079,7 @@ components:
960009
960079
  // ../init/lib/createWorkspace.js
960010
960080
  async function createFernWorkspace({ directoryOfWorkspace, cliVersion, context: context3, apiName = "api" }) {
960011
960081
  if (!await doesPathExist(directoryOfWorkspace)) {
960012
- await (0, import_promises146.mkdir)(directoryOfWorkspace);
960082
+ await (0, import_promises147.mkdir)(directoryOfWorkspace);
960013
960083
  }
960014
960084
  await writeGeneratorsConfiguration({
960015
960085
  filepath: join8(directoryOfWorkspace, RelativeFilePath2.of(GENERATORS_CONFIGURATION_FILENAME)),
@@ -960024,7 +960094,7 @@ async function createFernWorkspace({ directoryOfWorkspace, cliVersion, context:
960024
960094
  }
960025
960095
  async function createOpenAPIWorkspace({ directoryOfWorkspace, openAPIFilePath, cliVersion, context: context3 }) {
960026
960096
  if (!await doesPathExist(directoryOfWorkspace)) {
960027
- await (0, import_promises146.mkdir)(directoryOfWorkspace);
960097
+ await (0, import_promises147.mkdir)(directoryOfWorkspace);
960028
960098
  }
960029
960099
  await writeGeneratorsConfiguration({
960030
960100
  filepath: join8(directoryOfWorkspace, RelativeFilePath2.of(GENERATORS_CONFIGURATION_FILENAME)),
@@ -960037,10 +960107,10 @@ async function createOpenAPIWorkspace({ directoryOfWorkspace, openAPIFilePath, c
960037
960107
  }
960038
960108
  async function createDefaultOpenAPIWorkspace({ directoryOfWorkspace, cliVersion, context: context3 }) {
960039
960109
  if (!await doesPathExist(directoryOfWorkspace)) {
960040
- await (0, import_promises146.mkdir)(directoryOfWorkspace, { recursive: true });
960110
+ await (0, import_promises147.mkdir)(directoryOfWorkspace, { recursive: true });
960041
960111
  }
960042
960112
  const openApiFilePath = join8(directoryOfWorkspace, RelativeFilePath2.of("openapi.yml"));
960043
- await (0, import_promises146.writeFile)(openApiFilePath, SAMPLE_OPENAPI);
960113
+ await (0, import_promises147.writeFile)(openApiFilePath, SAMPLE_OPENAPI);
960044
960114
  await writeGeneratorsConfiguration({
960045
960115
  filepath: join8(directoryOfWorkspace, RelativeFilePath2.of(GENERATORS_CONFIGURATION_FILENAME)),
960046
960116
  cliVersion,
@@ -960085,7 +960155,7 @@ async function getDefaultGeneratorsConfiguration({ cliVersion, context: context3
960085
960155
  return config5;
960086
960156
  }
960087
960157
  async function writeGeneratorsConfiguration({ filepath, cliVersion, context: context3, apiConfiguration }) {
960088
- await (0, import_promises146.writeFile)(filepath, "# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json\n" + index_vite_proxy_tmp_default.dump(await getDefaultGeneratorsConfiguration({ cliVersion, context: context3, apiConfiguration }), {
960158
+ await (0, import_promises147.writeFile)(filepath, "# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json\n" + index_vite_proxy_tmp_default.dump(await getDefaultGeneratorsConfiguration({ cliVersion, context: context3, apiConfiguration }), {
960089
960159
  sortKeys: (a3, b5) => {
960090
960160
  if (a3 === "api") {
960091
960161
  return -1;
@@ -960104,8 +960174,8 @@ async function writeSampleApiDefinition({ directoryOfDefinition, apiName }) {
960104
960174
  strategy: "status-code"
960105
960175
  }
960106
960176
  };
960107
- await (0, import_promises146.mkdir)(directoryOfDefinition);
960108
- await (0, import_promises146.writeFile)(join8(directoryOfDefinition, RelativeFilePath2.of(ROOT_API_FILENAME)), index_vite_proxy_tmp_default.dump(rootApi));
960177
+ await (0, import_promises147.mkdir)(directoryOfDefinition);
960178
+ await (0, import_promises147.writeFile)(join8(directoryOfDefinition, RelativeFilePath2.of(ROOT_API_FILENAME)), index_vite_proxy_tmp_default.dump(rootApi));
960109
960179
  const absoluteFilepathToImdbYaml = join8(directoryOfDefinition, RelativeFilePath2.of("imdb.yml"));
960110
960180
  let formattedContent;
960111
960181
  try {
@@ -960121,7 +960191,7 @@ async function writeSampleApiDefinition({ directoryOfDefinition, apiName }) {
960121
960191
  code: CliError.Code.ParseError
960122
960192
  });
960123
960193
  }
960124
- await (0, import_promises146.writeFile)(absoluteFilepathToImdbYaml, formattedContent);
960194
+ await (0, import_promises147.writeFile)(absoluteFilepathToImdbYaml, formattedContent);
960125
960195
  }
960126
960196
 
960127
960197
  // ../init/lib/initializeAPI.js
@@ -960172,7 +960242,7 @@ async function getDirectoryOfNewAPIWorkspace({ absolutePathToFernDirectory, task
960172
960242
  if (inlinedApiDefinition || inlinedOpenApiWorkspace) {
960173
960243
  taskContext.logger.info("Creating workspaces to support multiple API Definitions.");
960174
960244
  const apiWorkspaceDirectory = join8(absolutePathToFernDirectory, RelativeFilePath2.of(APIS_DIRECTORY), RelativeFilePath2.of("api"));
960175
- await (0, import_promises147.mkdir)(apiWorkspaceDirectory, { recursive: true });
960245
+ await (0, import_promises148.mkdir)(apiWorkspaceDirectory, { recursive: true });
960176
960246
  if (inlinedApiDefinition) {
960177
960247
  const inlinedDefinitionDirectory = join8(absolutePathToFernDirectory, RelativeFilePath2.of(DEFINITION_DIRECTORY));
960178
960248
  const workspaceDefinitionDirectory = join8(apiWorkspaceDirectory, RelativeFilePath2.of(DEFINITION_DIRECTORY));
@@ -960211,7 +960281,7 @@ init_lib19();
960211
960281
  init_lib4();
960212
960282
  init_lib8();
960213
960283
  init_source();
960214
- var import_promises148 = require("fs/promises");
960284
+ var import_promises149 = require("fs/promises");
960215
960285
  init_js_yaml();
960216
960286
  async function initializeDocs({ organization, taskContext, versionOfCli }) {
960217
960287
  const createDirectoryResponse = await createFernDirectoryAndWorkspace({
@@ -960227,7 +960297,7 @@ async function initializeDocs({ organization, taskContext, versionOfCli }) {
960227
960297
  } else {
960228
960298
  try {
960229
960299
  const docsConfig = getDocsConfig(createDirectoryResponse.organization);
960230
- await (0, import_promises148.writeFile)(docsYmlPath, index_vite_proxy_tmp_default.dump(docsConfig));
960300
+ await (0, import_promises149.writeFile)(docsYmlPath, index_vite_proxy_tmp_default.dump(docsConfig));
960231
960301
  taskContext.logger.info(source_default.green("Created docs configuration"));
960232
960302
  return;
960233
960303
  } catch (writeError) {
@@ -960284,7 +960354,7 @@ var FernDocsBuilder = class {
960284
960354
  init_lib12();
960285
960355
  init_lib8();
960286
960356
  init_lib6();
960287
- var import_promises149 = require("fs/promises");
960357
+ var import_promises150 = require("fs/promises");
960288
960358
  init_js_yaml();
960289
960359
  var FernDocsBuilderImpl = class extends FernDocsBuilder {
960290
960360
  openApiSpecs = {};
@@ -960344,7 +960414,7 @@ var FernDocsBuilderImpl = class extends FernDocsBuilder {
960344
960414
  }
960345
960415
  async build({ outputDirectory }) {
960346
960416
  const absolutePathToFernDirectory = join8(outputDirectory, RelativeFilePath2.of(FERN_DIRECTORY));
960347
- await (0, import_promises149.mkdir)(absolutePathToFernDirectory, { recursive: true });
960417
+ await (0, import_promises150.mkdir)(absolutePathToFernDirectory, { recursive: true });
960348
960418
  if (Object.keys(this.tabbedNavigation).length > 0) {
960349
960419
  this.docsYml.tabs = Object.fromEntries(Object.entries(this.tabbedNavigation).map(([key2, value2]) => {
960350
960420
  return [value2.tabId, value2.tabConfig];
@@ -960369,27 +960439,27 @@ var FernDocsBuilderImpl = class extends FernDocsBuilder {
960369
960439
  }))
960370
960440
  };
960371
960441
  }
960372
- await (0, import_promises149.writeFile)(join8(absolutePathToFernDirectory, RelativeFilePath2.of(GENERATORS_CONFIGURATION_FILENAME)), index_vite_proxy_tmp_default.dump(generators_yml_exports.serialization.GeneratorsConfigurationSchema.jsonOrThrow(this.generatorsYml)));
960442
+ await (0, import_promises150.writeFile)(join8(absolutePathToFernDirectory, RelativeFilePath2.of(GENERATORS_CONFIGURATION_FILENAME)), index_vite_proxy_tmp_default.dump(generators_yml_exports.serialization.GeneratorsConfigurationSchema.jsonOrThrow(this.generatorsYml)));
960373
960443
  await Promise.all(Object.entries(this.openApiSpecs).map(async ([relativePath, absolutePath]) => {
960374
960444
  const absolutePathToOpenAPI = join8(absolutePathToFernDirectory, RelativeFilePath2.of(relativePath));
960375
- await (0, import_promises149.mkdir)(dirname6(absolutePathToOpenAPI), { recursive: true });
960376
- await (0, import_promises149.cp)(absolutePath, absolutePathToOpenAPI);
960445
+ await (0, import_promises150.mkdir)(dirname6(absolutePathToOpenAPI), { recursive: true });
960446
+ await (0, import_promises150.cp)(absolutePath, absolutePathToOpenAPI);
960377
960447
  }));
960378
960448
  }
960379
- await (0, import_promises149.writeFile)(join8(absolutePathToFernDirectory, RelativeFilePath2.of(DOCS_CONFIGURATION_FILENAME)), index_vite_proxy_tmp_default.dump(docs_yml_exports.RawSchemas.Serializer.DocsConfiguration.jsonOrThrow(this.docsYml, { omitUndefined: true })));
960449
+ await (0, import_promises150.writeFile)(join8(absolutePathToFernDirectory, RelativeFilePath2.of(DOCS_CONFIGURATION_FILENAME)), index_vite_proxy_tmp_default.dump(docs_yml_exports.RawSchemas.Serializer.DocsConfiguration.jsonOrThrow(this.docsYml, { omitUndefined: true })));
960380
960450
  await Promise.all(Object.entries(this.markdownPages).map(async ([filepath, page]) => {
960381
960451
  const absoluteFilepathToMarkdownPage = join8(absolutePathToFernDirectory, RelativeFilePath2.of(filepath));
960382
- await (0, import_promises149.mkdir)(dirname6(absoluteFilepathToMarkdownPage), { recursive: true });
960452
+ await (0, import_promises150.mkdir)(dirname6(absoluteFilepathToMarkdownPage), { recursive: true });
960383
960453
  const frontmatter = Object.keys(page.frontmatter).length > 0 ? `---
960384
960454
  ${index_vite_proxy_tmp_default.dump(JSON.parse(JSON.stringify(page.frontmatter)))}---
960385
960455
 
960386
960456
  ` : "";
960387
- await (0, import_promises149.writeFile)(absoluteFilepathToMarkdownPage, `${frontmatter}${page.markdown}`);
960457
+ await (0, import_promises150.writeFile)(absoluteFilepathToMarkdownPage, `${frontmatter}${page.markdown}`);
960388
960458
  }));
960389
960459
  await Promise.all(Object.entries(this.assets).map(async ([filepath, asset]) => {
960390
960460
  const absolutePathToAsset = join8(absolutePathToFernDirectory, RelativeFilePath2.of(filepath));
960391
- await (0, import_promises149.mkdir)(dirname6(absolutePathToAsset), { recursive: true });
960392
- await (0, import_promises149.cp)(asset.absoluteFilePathToAsset, absolutePathToAsset);
960461
+ await (0, import_promises150.mkdir)(dirname6(absolutePathToAsset), { recursive: true });
960462
+ await (0, import_promises150.cp)(asset.absoluteFilePathToAsset, absolutePathToAsset);
960393
960463
  }));
960394
960464
  }
960395
960465
  setInstance({ companyName }) {
@@ -960423,7 +960493,7 @@ var NonTabbedNavigationBuilderImpl = class {
960423
960493
  // ../docs-importers/mintlify/lib/MintlifyImporter.js
960424
960494
  init_lib8();
960425
960495
  init_lib6();
960426
- var import_promises151 = require("fs/promises");
960496
+ var import_promises152 = require("fs/promises");
960427
960497
 
960428
960498
  // ../docs-importers/mintlify/lib/convertColors.js
960429
960499
  function convertColors(colors19) {
@@ -960484,10 +960554,10 @@ init_lib8();
960484
960554
 
960485
960555
  // ../docs-importers/mintlify/lib/convertMarkdown.js
960486
960556
  init_lib8();
960487
- var import_promises150 = require("fs/promises");
960557
+ var import_promises151 = require("fs/promises");
960488
960558
  var import_gray_matter11 = __toESM(require_gray_matter(), 1);
960489
960559
  async function convertMarkdown({ absolutePathToMintJson, absoluteFilepathToMarkdown, relativeFilepathFromRoot, builder }) {
960490
- const text9 = await (0, import_promises150.readFile)(absoluteFilepathToMarkdown, "utf-8");
960560
+ const text9 = await (0, import_promises151.readFile)(absoluteFilepathToMarkdown, "utf-8");
960491
960561
  const { data: data2, content: content5 } = parseMintlifyFrontmatter(text9);
960492
960562
  const slug = relativeFilepathFromRoot.replace(/\.(md|mdx)$/, "");
960493
960563
  const transformedContent = markReferencedAssets({
@@ -960656,7 +960726,7 @@ var MintlifyImporter = class extends DocsImporter {
960656
960726
  documentationTab = void 0;
960657
960727
  tabUrlToInfo = {};
960658
960728
  async import({ args, builder }) {
960659
- const mintJsonContent = await (0, import_promises151.readFile)(args.absolutePathToMintJson, "utf-8");
960729
+ const mintJsonContent = await (0, import_promises152.readFile)(args.absolutePathToMintJson, "utf-8");
960660
960730
  const mint = this.parseMintJson({
960661
960731
  content: mintJsonContent,
960662
960732
  absolutePathToMintJson: args.absolutePathToMintJson
@@ -960802,7 +960872,7 @@ var MintlifyImporter = class extends DocsImporter {
960802
960872
  // ../docs-importers/mintlify/lib/runMintlifyMigration.js
960803
960873
  init_lib12();
960804
960874
  init_lib8();
960805
- var import_promises152 = require("fs/promises");
960875
+ var import_promises153 = require("fs/promises");
960806
960876
  async function runMintlifyMigration({ absolutePathToMintJson, outputPath, taskContext, versionOfCli, organization }) {
960807
960877
  const mintlifyImporter = new MintlifyImporter({
960808
960878
  context: taskContext
@@ -960813,7 +960883,7 @@ async function runMintlifyMigration({ absolutePathToMintJson, outputPath, taskCo
960813
960883
  builder
960814
960884
  });
960815
960885
  await builder.build({ outputDirectory: outputPath });
960816
- await (0, import_promises152.writeFile)(join8(AbsoluteFilePath2.of(outputPath), RelativeFilePath2.of(FERN_DIRECTORY), RelativeFilePath2.of(PROJECT_CONFIG_FILENAME)), JSON.stringify({
960886
+ await (0, import_promises153.writeFile)(join8(AbsoluteFilePath2.of(outputPath), RelativeFilePath2.of(FERN_DIRECTORY), RelativeFilePath2.of(PROJECT_CONFIG_FILENAME)), JSON.stringify({
960817
960887
  version: versionOfCli,
960818
960888
  organization
960819
960889
  }, void 0, 4));
@@ -960874,7 +960944,7 @@ function assertIsStringArray(val) {
960874
960944
  // ../docs-importers/readme/lib/ReadmeImporter.js
960875
960945
  init_lib4();
960876
960946
  init_lib8();
960877
- var import_promises153 = require("fs/promises");
960947
+ var import_promises154 = require("fs/promises");
960878
960948
 
960879
960949
  // ../docs-importers/readme/lib/extract/favicon.js
960880
960950
  init_unist_util_visit();
@@ -964228,7 +964298,7 @@ var ReadmeImporter = class extends DocsImporter {
964228
964298
  if (response.ok) {
964229
964299
  const imageBuffer = Buffer.from(await response.arrayBuffer());
964230
964300
  const faviconPath = join8(assetsDirectory, RelativeFilePath2.of("favicon"));
964231
- await (0, import_promises153.writeFile)(faviconPath, new Uint8Array(imageBuffer));
964301
+ await (0, import_promises154.writeFile)(faviconPath, new Uint8Array(imageBuffer));
964232
964302
  builder.setFavicon({ favicon: relativize(this.absolutePathToFernDirectory, faviconPath) });
964233
964303
  }
964234
964304
  }
@@ -964245,7 +964315,7 @@ var ReadmeImporter = class extends DocsImporter {
964245
964315
  */
964246
964316
  async getAndCreateAssetsDirectory() {
964247
964317
  const assetsDirectory = join8(this.absolutePathToFernDirectory, RelativeFilePath2.of("assets"));
964248
- await (0, import_promises153.mkdir)(assetsDirectory, { recursive: true });
964318
+ await (0, import_promises154.mkdir)(assetsDirectory, { recursive: true });
964249
964319
  return assetsDirectory;
964250
964320
  }
964251
964321
  /**
@@ -964295,7 +964365,7 @@ var ReadmeImporter = class extends DocsImporter {
964295
964365
  absolutePathToOutputDirectory,
964296
964366
  section
964297
964367
  });
964298
- await (0, import_promises153.mkdir)(absolutePathToOutputDirectoryForSection, { recursive: true });
964368
+ await (0, import_promises154.mkdir)(absolutePathToOutputDirectoryForSection, { recursive: true });
964299
964369
  await Promise.all(section.pages.filter((page) => page.type === "page").map(async (page) => {
964300
964370
  const url3 = new URL(page.slug.toString(), this.url);
964301
964371
  this.logger.debug(`Fetching page: ${url3.toString()}`);
@@ -964310,7 +964380,7 @@ var ReadmeImporter = class extends DocsImporter {
964310
964380
  absolutePathToOutputDirectoryForSection,
964311
964381
  page: page.slug
964312
964382
  });
964313
- await (0, import_promises153.writeFile)(absolutePathForPage, result.data.mdx);
964383
+ await (0, import_promises154.writeFile)(absolutePathForPage, result.data.mdx);
964314
964384
  if (result.data.images.imageURLs.length > 0) {
964315
964385
  this.logger.debug(`Found ${result.data.images.imageURLs.length} images to download for ${url3.toString()}`);
964316
964386
  await Promise.all(Object.entries(result.data.images.imageURLToFilename).map(async ([imageUrl, filename]) => {
@@ -964323,8 +964393,8 @@ var ReadmeImporter = class extends DocsImporter {
964323
964393
  const imageBuffer = Buffer.from(await response.arrayBuffer());
964324
964394
  const imagePath = join8(absolutePathToOutputDirectoryForSection, RelativeFilePath2.of(filename));
964325
964395
  const imageDir = dirname6(imagePath);
964326
- await (0, import_promises153.mkdir)(imageDir, { recursive: true });
964327
- await (0, import_promises153.writeFile)(imagePath, new Uint8Array(imageBuffer));
964396
+ await (0, import_promises154.mkdir)(imageDir, { recursive: true });
964397
+ await (0, import_promises154.writeFile)(imagePath, new Uint8Array(imageBuffer));
964328
964398
  this.logger.debug(`Saved image to ${imagePath}`);
964329
964399
  } catch (error50) {
964330
964400
  this.logger.warn(`Error downloading image ${imageUrl}: ${error50}`);
@@ -964408,7 +964478,7 @@ var ReadmeImporter = class extends DocsImporter {
964408
964478
  // ../docs-importers/readme/lib/runReadmeMigration.js
964409
964479
  init_lib12();
964410
964480
  init_lib8();
964411
- var import_promises154 = require("fs/promises");
964481
+ var import_promises155 = require("fs/promises");
964412
964482
  async function runReadmeMigration({ readmeUrl, outputPath, taskContext, versionOfCli, organization }) {
964413
964483
  const builder = new FernDocsBuilderImpl();
964414
964484
  builder.setInstance({ companyName: organization });
@@ -964423,7 +964493,7 @@ async function runReadmeMigration({ readmeUrl, outputPath, taskContext, versionO
964423
964493
  builder
964424
964494
  });
964425
964495
  await builder.build({ outputDirectory: outputPath });
964426
- await (0, import_promises154.writeFile)(join8(AbsoluteFilePath2.of(outputPath), RelativeFilePath2.of(FERN_DIRECTORY), RelativeFilePath2.of(PROJECT_CONFIG_FILENAME)), JSON.stringify({
964496
+ await (0, import_promises155.writeFile)(join8(AbsoluteFilePath2.of(outputPath), RelativeFilePath2.of(FERN_DIRECTORY), RelativeFilePath2.of(PROJECT_CONFIG_FILENAME)), JSON.stringify({
964427
964497
  version: versionOfCli,
964428
964498
  organization
964429
964499
  }, void 0, 4));
@@ -964450,7 +964520,7 @@ var initializeWithReadme = async ({ readmeUrl, organization, taskContext, versio
964450
964520
 
964451
964521
  // ../init/lib/utils/loadOpenApiFromUrl.js
964452
964522
  init_axios2();
964453
- var import_promises155 = require("fs/promises");
964523
+ var import_promises156 = require("fs/promises");
964454
964524
  init_js_yaml();
964455
964525
  var import_path105 = require("path");
964456
964526
  var import_tmp_promise19 = __toESM(require_tmp_promise(), 1);
@@ -964466,7 +964536,7 @@ async function loadOpenAPIFromUrl({ url: url3, logger: logger4 }) {
964466
964536
  const filePath = (0, import_path105.join)(tmpDir.path, url3.endsWith(".json") ? "openapi.json" : "openapi.yaml");
964467
964537
  logger4.debug("tmpDir", tmpDir.path);
964468
964538
  logger4.debug("filePath", filePath);
964469
- await (0, import_promises155.writeFile)(filePath, data2);
964539
+ await (0, import_promises156.writeFile)(filePath, data2);
964470
964540
  return {
964471
964541
  status: LoadOpenAPIStatus.Success,
964472
964542
  filePath
@@ -968392,7 +968462,7 @@ function getAutomationContextFromEnv() {
968392
968462
  config_branch: process.env.FERN_CONFIG_BRANCH,
968393
968463
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
968394
968464
  trigger: process.env.GITHUB_EVENT_NAME,
968395
- cli_version: "5.65.0"
968465
+ cli_version: "5.65.1"
968396
968466
  };
968397
968467
  }
968398
968468
  function isAutomationMode() {
@@ -969224,7 +969294,7 @@ var CliContext = class _CliContext {
969224
969294
  if (false) {
969225
969295
  this.logger.error("CLI_VERSION is not defined");
969226
969296
  }
969227
- return "5.65.0";
969297
+ return "5.65.1";
969228
969298
  }
969229
969299
  getCliName() {
969230
969300
  if (false) {
@@ -969534,7 +969604,7 @@ init_lib19();
969534
969604
  init_lib8();
969535
969605
  init_lib6();
969536
969606
  init_source();
969537
- var import_promises156 = require("fs/promises");
969607
+ var import_promises157 = require("fs/promises");
969538
969608
 
969539
969609
  // ../project-loader/lib/normalizeCommandLineApiWorkspace.js
969540
969610
  function normalizeCommandLineApiWorkspace(input3) {
@@ -969616,7 +969686,7 @@ async function loadApis({ cliName, fernDirectory, context: context3, cliVersion,
969616
969686
  const apisDirectory = join8(fernDirectory, RelativeFilePath2.of(APIS_DIRECTORY));
969617
969687
  const apisDirectoryExists = await doesPathExist(apisDirectory);
969618
969688
  if (apisDirectoryExists) {
969619
- const apiDirectoryContents = await (0, import_promises156.readdir)(apisDirectory, { withFileTypes: true });
969689
+ const apiDirectoryContents = await (0, import_promises157.readdir)(apisDirectory, { withFileTypes: true });
969620
969690
  const apiWorkspaceDirectoryNames = apiDirectoryContents.reduce((all9, item) => {
969621
969691
  if (item.isDirectory()) {
969622
969692
  all9.push(item.name);
@@ -969694,13 +969764,13 @@ async function loadProjectAndRegisterWorkspacesWithContext(cliContext, args, reg
969694
969764
  init_lib19();
969695
969765
  init_lib6();
969696
969766
  var import_generators_sdk6 = __toESM(require_generators_sdk(), 1);
969697
- var import_promises161 = require("fs/promises");
969767
+ var import_promises162 = require("fs/promises");
969698
969768
 
969699
969769
  // src/commands/generator-list/getGeneratorList.ts
969700
969770
  init_lib19();
969701
969771
  init_lib4();
969702
969772
  init_lib6();
969703
- var import_promises157 = require("fs/promises");
969773
+ var import_promises158 = require("fs/promises");
969704
969774
  init_js_yaml();
969705
969775
  var GenerationModeFilter = {
969706
969776
  GitHub: "github",
@@ -969761,7 +969831,7 @@ async function getGeneratorList({
969761
969831
  return;
969762
969832
  }
969763
969833
  try {
969764
- await (0, import_promises157.writeFile)(outputLocation, generatorsListYaml);
969834
+ await (0, import_promises158.writeFile)(outputLocation, generatorsListYaml);
969765
969835
  } catch (error50) {
969766
969836
  cliContext.failAndThrow(`Could not write file to the specified location: ${outputLocation}`, error50, {
969767
969837
  code: CliError.Code.ConfigError
@@ -969831,7 +969901,7 @@ async function getGeneratorMetadata({
969831
969901
 
969832
969902
  // src/commands/organization/getOrganization.ts
969833
969903
  init_lib6();
969834
- var import_promises158 = require("fs/promises");
969904
+ var import_promises159 = require("fs/promises");
969835
969905
  async function getOrganization({
969836
969906
  project,
969837
969907
  outputLocation,
@@ -969843,7 +969913,7 @@ async function getOrganization({
969843
969913
  return;
969844
969914
  }
969845
969915
  try {
969846
- await (0, import_promises158.writeFile)(outputLocation, org);
969916
+ await (0, import_promises159.writeFile)(outputLocation, org);
969847
969917
  } catch (error50) {
969848
969918
  context3.failAndThrow(`Could not write file to the specified location: ${outputLocation}`, error50, {
969849
969919
  code: CliError.Code.ConfigError
@@ -969856,7 +969926,7 @@ init_lib19();
969856
969926
  init_lib8();
969857
969927
  init_lib6();
969858
969928
  init_source();
969859
- var import_promises160 = require("fs/promises");
969929
+ var import_promises161 = require("fs/promises");
969860
969930
  var import_path107 = __toESM(require("path"), 1);
969861
969931
  var import_semver16 = __toESM(require_semver2(), 1);
969862
969932
  var import_yaml6 = __toESM(require_dist11(), 1);
@@ -969866,14 +969936,14 @@ init_lib4();
969866
969936
  init_lib33();
969867
969937
  init_lib6();
969868
969938
  var import_fs40 = require("fs");
969869
- var import_promises159 = require("fs/promises");
969870
- var import_os15 = require("os");
969939
+ var import_promises160 = require("fs/promises");
969940
+ var import_os16 = require("os");
969871
969941
  var import_path106 = require("path");
969872
969942
  var import_semver15 = __toESM(require_semver2(), 1);
969873
969943
  var import_url10 = require("url");
969874
969944
  var MIGRATION_PACKAGE_NAME2 = "@fern-api/generator-migrations";
969875
969945
  function getMigrationCacheDir() {
969876
- return (0, import_path106.join)((0, import_os15.homedir)(), ".fern", "migration-cache");
969946
+ return (0, import_path106.join)((0, import_os16.homedir)(), ".fern", "migration-cache");
969877
969947
  }
969878
969948
  var LOCK_FILENAME = ".install.lock";
969879
969949
  var LOCK_POLL_MS = 200;
@@ -969894,7 +969964,7 @@ async function acquireLock3(logger4, cacheDir) {
969894
969964
  const myPid = String(process.pid);
969895
969965
  while (true) {
969896
969966
  try {
969897
- const fh = await (0, import_promises159.open)(lockPath, "wx");
969967
+ const fh = await (0, import_promises160.open)(lockPath, "wx");
969898
969968
  await fh.writeFile(myPid);
969899
969969
  await fh.close();
969900
969970
  const exitHandler = () => {
@@ -969911,9 +969981,9 @@ async function acquireLock3(logger4, cacheDir) {
969911
969981
  return async () => {
969912
969982
  process.removeListener("exit", exitHandler);
969913
969983
  try {
969914
- const currentContent = await (0, import_promises159.readFile)(lockPath, "utf-8");
969984
+ const currentContent = await (0, import_promises160.readFile)(lockPath, "utf-8");
969915
969985
  if (currentContent.trim() === myPid) {
969916
- await (0, import_promises159.unlink)(lockPath);
969986
+ await (0, import_promises160.unlink)(lockPath);
969917
969987
  } else {
969918
969988
  logger4.debug(
969919
969989
  `Lock file owned by another process (expected pid=${myPid}, found=${currentContent.trim()}); skipping release`
@@ -969929,14 +969999,14 @@ async function acquireLock3(logger4, cacheDir) {
969929
969999
  throw err;
969930
970000
  }
969931
970001
  try {
969932
- const lockContent = await (0, import_promises159.readFile)(lockPath, "utf-8");
970002
+ const lockContent = await (0, import_promises160.readFile)(lockPath, "utf-8");
969933
970003
  const lockPid = Number(lockContent.trim());
969934
- const lockStat = await (0, import_promises159.stat)(lockPath);
970004
+ const lockStat = await (0, import_promises160.stat)(lockPath);
969935
970005
  const lockAge = Date.now() - lockStat.mtimeMs;
969936
970006
  if (lockAge > LOCK_STALE_MS || Number.isFinite(lockPid) && lockPid > 0 && !isProcessAlive(lockPid)) {
969937
970007
  logger4.debug(`Removing stale migration lock (pid=${lockContent.trim()}, age=${lockAge}ms)`);
969938
970008
  try {
969939
- await (0, import_promises159.unlink)(lockPath);
970009
+ await (0, import_promises160.unlink)(lockPath);
969940
970010
  } catch (unlinkErr) {
969941
970011
  logger4.debug(`Failed to remove stale lock: ${unlinkErr}`);
969942
970012
  }
@@ -969960,7 +970030,7 @@ async function ensureMigrationsInstalled(logger4) {
969960
970030
  }
969961
970031
  migrationsInstallPromise = (async () => {
969962
970032
  const cacheDir = getMigrationCacheDir();
969963
- await (0, import_promises159.mkdir)(cacheDir, { recursive: true });
970033
+ await (0, import_promises160.mkdir)(cacheDir, { recursive: true });
969964
970034
  const npmCacheDir = (0, import_path106.join)(cacheDir, ".npm-cache");
969965
970035
  const packageDir = (0, import_path106.join)(cacheDir, "node_modules", MIGRATION_PACKAGE_NAME2);
969966
970036
  const packageJsonPath = (0, import_path106.join)(packageDir, "package.json");
@@ -969977,7 +970047,7 @@ async function ensureMigrationsInstalled(logger4) {
969977
970047
  "--no-audit",
969978
970048
  "--no-fund"
969979
970049
  ]);
969980
- const packageJsonContent = await (0, import_promises159.readFile)(packageJsonPath, "utf-8");
970050
+ const packageJsonContent = await (0, import_promises160.readFile)(packageJsonPath, "utf-8");
969981
970051
  const packageJson2 = JSON.parse(packageJsonContent);
969982
970052
  if (packageJson2.main == null) {
969983
970053
  throw new CliError({
@@ -970161,7 +970231,7 @@ async function loadAndUpdateGenerators({
970161
970231
  skippedAutoreleaseDisabled: []
970162
970232
  };
970163
970233
  }
970164
- const contents = await (0, import_promises160.readFile)(filepath);
970234
+ const contents = await (0, import_promises161.readFile)(filepath);
970165
970235
  context3.logger.debug(`Found generators: ${contents.toString()}`);
970166
970236
  const parsedDocument = import_yaml6.default.parseDocument(contents.toString());
970167
970237
  const generatorGroups = parsedDocument.get("groups");
@@ -970398,7 +970468,7 @@ async function upgradeGenerator({
970398
970468
  absolutePathToWorkspace: workspace.absoluteFilePath
970399
970469
  });
970400
970470
  if (absolutePathToGeneratorsConfiguration != null && result.updatedConfiguration != null) {
970401
- await (0, import_promises160.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
970471
+ await (0, import_promises161.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
970402
970472
  }
970403
970473
  allSkippedMajorUpgrades.push(...result.skippedMajorUpgrades);
970404
970474
  if (result.appliedUpgrades.length > 0) {
@@ -970798,7 +970868,7 @@ function addGeneratorCommands(cli, cliContext) {
970798
970868
  }
970799
970869
  if (argv.output) {
970800
970870
  try {
970801
- await (0, import_promises161.writeFile)(argv.output, JSON.stringify(generatorMetadata, null, 2));
970871
+ await (0, import_promises162.writeFile)(argv.output, JSON.stringify(generatorMetadata, null, 2));
970802
970872
  } catch (error50) {
970803
970873
  cliContext.failAndThrow(
970804
970874
  `Could not write file to the specified location: ${argv.output}`,
@@ -970815,7 +970885,7 @@ function addGeneratorCommands(cli, cliContext) {
970815
970885
  // src/commands/add-generator/addGeneratorToWorkspaces.ts
970816
970886
  init_lib19();
970817
970887
  init_source();
970818
- var import_promises162 = require("fs/promises");
970888
+ var import_promises163 = require("fs/promises");
970819
970889
  init_js_yaml();
970820
970890
  async function addGeneratorToWorkspaces({
970821
970891
  project: { apiWorkspaces },
@@ -970843,7 +970913,7 @@ async function addGeneratorToWorkspaces({
970843
970913
  if (absolutePathToGeneratorsConfiguration == null) {
970844
970914
  return;
970845
970915
  }
970846
- await (0, import_promises162.writeFile)(
970916
+ await (0, import_promises163.writeFile)(
970847
970917
  absolutePathToGeneratorsConfiguration,
970848
970918
  "# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json\n" + index_vite_proxy_tmp_default.dump(newConfiguration)
970849
970919
  );
@@ -970911,18 +970981,18 @@ var LOCAL_STORAGE_FOLDER6 = ".fern-dev";
970911
970981
 
970912
970982
  // src/commands/generate/checkOutputDirectory.ts
970913
970983
  init_lib8();
970914
- var import_promises165 = require("fs/promises");
970984
+ var import_promises166 = require("fs/promises");
970915
970985
 
970916
970986
  // src/persistence/output-directories/getOutputDirectories.ts
970917
970987
  init_lib8();
970918
- var import_promises163 = require("fs/promises");
970988
+ var import_promises164 = require("fs/promises");
970919
970989
 
970920
970990
  // src/persistence/output-directories/getPathToOutputDirectoriesFile.ts
970921
970991
  init_lib8();
970922
- var import_os16 = require("os");
970992
+ var import_os17 = require("os");
970923
970993
  function getPathToOutputDirectoriesFile() {
970924
970994
  return join8(
970925
- AbsoluteFilePath2.of((0, import_os16.homedir)()),
970995
+ AbsoluteFilePath2.of((0, import_os17.homedir)()),
970926
970996
  RelativeFilePath2.of(LOCAL_STORAGE_FOLDER6),
970927
970997
  RelativeFilePath2.of(APPROVED_DIRECTORIES_FILENAME)
970928
970998
  );
@@ -970935,17 +971005,17 @@ async function getOutputDirectories() {
970935
971005
  if (!doesOutputDirectoriesFileExist) {
970936
971006
  return [];
970937
971007
  }
970938
- const outputDirectoriesFileContents = await (0, import_promises163.readFile)(pathToOutputDirectoriesFile, { encoding: "utf-8" });
971008
+ const outputDirectoriesFileContents = await (0, import_promises164.readFile)(pathToOutputDirectoriesFile, { encoding: "utf-8" });
970939
971009
  const outputDirectories = JSON.parse(outputDirectoriesFileContents);
970940
971010
  return outputDirectories;
970941
971011
  }
970942
971012
 
970943
971013
  // src/persistence/output-directories/storeOutputDirectories.ts
970944
- var import_promises164 = require("fs/promises");
971014
+ var import_promises165 = require("fs/promises");
970945
971015
  var import_path108 = __toESM(require("path"), 1);
970946
971016
  async function storeOutputDirectories(outputDirectories) {
970947
- await (0, import_promises164.mkdir)(import_path108.default.dirname(getPathToOutputDirectoriesFile()), { recursive: true });
970948
- await (0, import_promises164.writeFile)(getPathToOutputDirectoriesFile(), JSON.stringify(outputDirectories, null, 2));
971017
+ await (0, import_promises165.mkdir)(import_path108.default.dirname(getPathToOutputDirectoriesFile()), { recursive: true });
971018
+ await (0, import_promises165.writeFile)(getPathToOutputDirectoriesFile(), JSON.stringify(outputDirectories, null, 2));
970949
971019
  }
970950
971020
 
970951
971021
  // src/commands/generate/checkOutputDirectory.ts
@@ -970967,7 +971037,7 @@ async function checkOutputDirectory(outputPath, cliContext, force) {
970967
971037
  shouldProceed: true
970968
971038
  };
970969
971039
  }
970970
- const files = await (0, import_promises165.readdir)(outputPath);
971040
+ const files = await (0, import_promises166.readdir)(outputPath);
970971
971041
  if (files.length === 0) {
970972
971042
  return {
970973
971043
  shouldProceed: true
@@ -971960,7 +972030,7 @@ function renderOverflowWarning(failureCount) {
971960
972030
  // src/commands/automations/generate/reportGenerateResults.ts
971961
972031
  init_lib4();
971962
972032
  var import_fs41 = require("fs");
971963
- var import_promises166 = require("fs/promises");
972033
+ var import_promises167 = require("fs/promises");
971964
972034
  var JSON_SCHEMA_VERSION = 1;
971965
972035
  function renderStdoutSummary(results) {
971966
972036
  return formatCounts(countResults(results));
@@ -972150,12 +972220,12 @@ async function writeResults({
972150
972220
  const stepSummaryPath = getGithubStepSummaryPath();
972151
972221
  if (stepSummaryPath != null) {
972152
972222
  try {
972153
- await (0, import_promises166.appendFile)(stepSummaryPath, renderMarkdownSummary(results), "utf8");
972223
+ await (0, import_promises167.appendFile)(stepSummaryPath, renderMarkdownSummary(results), "utf8");
972154
972224
  } catch {
972155
972225
  }
972156
972226
  }
972157
972227
  if (jsonOutputPath != null) {
972158
- await (0, import_promises166.writeFile)(jsonOutputPath, JSON.stringify(renderJsonSummary(results), null, 2), "utf8");
972228
+ await (0, import_promises167.writeFile)(jsonOutputPath, JSON.stringify(renderJsonSummary(results), null, 2), "utf8");
972159
972229
  }
972160
972230
  }
972161
972231
  function writeResultsSync({
@@ -972482,7 +972552,7 @@ function listPreviewGroups({
972482
972552
  init_lib19();
972483
972553
  init_lib6();
972484
972554
  init_source();
972485
- var import_promises196 = require("fs/promises");
972555
+ var import_promises197 = require("fs/promises");
972486
972556
 
972487
972557
  // ../cli-migrations/lib/runMigrations.js
972488
972558
  init_lib4();
@@ -972493,7 +972563,7 @@ init_source();
972493
972563
  init_lib27();
972494
972564
 
972495
972565
  // ../cli-migrations/lib/migrations/0.0.191/discriminant/migration.js
972496
- var import_promises167 = require("fs/promises");
972566
+ var import_promises168 = require("fs/promises");
972497
972567
 
972498
972568
  // ../cli-migrations/lib/migrations/0.0.191/discriminant/getAllYamlFiles.js
972499
972569
  init_lib8();
@@ -972530,7 +972600,7 @@ var migration = {
972530
972600
  try {
972531
972601
  const fileContents = await getFileContents(yamlFilepath);
972532
972602
  const newContents = addDiscriminantToFile(fileContents);
972533
- await (0, import_promises167.writeFile)(yamlFilepath, newContents);
972603
+ await (0, import_promises168.writeFile)(yamlFilepath, newContents);
972534
972604
  } catch (error50) {
972535
972605
  context3.failAndThrow("Failed to migrate " + yamlFilepath, error50);
972536
972606
  }
@@ -972538,7 +972608,7 @@ var migration = {
972538
972608
  }
972539
972609
  };
972540
972610
  async function getFileContents(filepath) {
972541
- const buffer = await (0, import_promises167.readFile)(filepath);
972611
+ const buffer = await (0, import_promises168.readFile)(filepath);
972542
972612
  return buffer.toString();
972543
972613
  }
972544
972614
  var UNION_REGEX = /^(\s{2,})union:\s*$/gm;
@@ -972567,7 +972637,7 @@ var versionMigrations = {
972567
972637
  var __default = versionMigrations;
972568
972638
 
972569
972639
  // ../cli-migrations/lib/migrations/0.0.203/union-single-property-key/migration.js
972570
- var import_promises168 = require("fs/promises");
972640
+ var import_promises169 = require("fs/promises");
972571
972641
  var import_yaml7 = __toESM(require_dist11(), 1);
972572
972642
 
972573
972643
  // ../cli-migrations/lib/migrations/0.0.203/union-single-property-key/getAllYamlFiles.js
@@ -972611,7 +972681,7 @@ var migration2 = {
972611
972681
  }
972612
972682
  };
972613
972683
  async function migrateFile(filepath, context3) {
972614
- const contents = await (0, import_promises168.readFile)(filepath);
972684
+ const contents = await (0, import_promises169.readFile)(filepath);
972615
972685
  const parsedDocument = import_yaml7.default.parseDocument(contents.toString());
972616
972686
  const types4 = parsedDocument.get("types");
972617
972687
  if (types4 == null) {
@@ -972643,7 +972713,7 @@ async function migrateFile(filepath, context3) {
972643
972713
  }
972644
972714
  }
972645
972715
  }
972646
- await (0, import_promises168.writeFile)(filepath, parsedDocument.toString());
972716
+ await (0, import_promises169.writeFile)(filepath, parsedDocument.toString());
972647
972717
  }
972648
972718
 
972649
972719
  // ../cli-migrations/lib/migrations/0.0.203/index.js
@@ -972654,7 +972724,7 @@ var versionMigrations2 = {
972654
972724
  var __default2 = versionMigrations2;
972655
972725
 
972656
972726
  // ../cli-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/migration.js
972657
- var import_promises169 = require("fs/promises");
972727
+ var import_promises170 = require("fs/promises");
972658
972728
  var import_yaml8 = __toESM(require_dist11(), 1);
972659
972729
 
972660
972730
  // ../cli-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/getAllGeneratorYamlFiles.js
@@ -972698,7 +972768,7 @@ var migration3 = {
972698
972768
  }
972699
972769
  };
972700
972770
  async function migrateGeneratorsYml(filepath, context3) {
972701
- const contents = await (0, import_promises169.readFile)(filepath);
972771
+ const contents = await (0, import_promises170.readFile)(filepath);
972702
972772
  const parsedDocument = import_yaml8.default.parseDocument(contents.toString());
972703
972773
  const draftGenerators = parsedDocument.get("draft");
972704
972774
  if (draftGenerators == null) {
@@ -972725,7 +972795,7 @@ async function migrateGeneratorsYml(filepath, context3) {
972725
972795
  draftGenerator.set("output-path", name2.value.includes("openapi") ? "./generated-openapi" : name2.value.includes("postman") ? "./generated-postman" : localOutput);
972726
972796
  }
972727
972797
  });
972728
- await (0, import_promises169.writeFile)(filepath, parsedDocument.toString());
972798
+ await (0, import_promises170.writeFile)(filepath, parsedDocument.toString());
972729
972799
  }
972730
972800
 
972731
972801
  // ../cli-migrations/lib/migrations/0.0.207/index.js
@@ -972736,7 +972806,7 @@ var versionMigrations3 = {
972736
972806
  var __default3 = versionMigrations3;
972737
972807
 
972738
972808
  // ../cli-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/migration.js
972739
- var import_promises170 = require("fs/promises");
972809
+ var import_promises171 = require("fs/promises");
972740
972810
  var import_yaml9 = __toESM(require_dist11(), 1);
972741
972811
 
972742
972812
  // ../cli-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/getAllYamlFiles.js
@@ -972780,7 +972850,7 @@ var migration4 = {
972780
972850
  }
972781
972851
  };
972782
972852
  async function migrateFile2(filepath, context3) {
972783
- const contents = await (0, import_promises170.readFile)(filepath);
972853
+ const contents = await (0, import_promises171.readFile)(filepath);
972784
972854
  const parsedDocument = import_yaml9.default.parseDocument(contents.toString());
972785
972855
  const addType = (typeName, typeDeclaration2) => {
972786
972856
  const types4 = parsedDocument.get("types");
@@ -972824,7 +972894,7 @@ async function migrateFile2(filepath, context3) {
972824
972894
  }
972825
972895
  }
972826
972896
  }
972827
- await (0, import_promises170.writeFile)(filepath, parsedDocument.toString());
972897
+ await (0, import_promises171.writeFile)(filepath, parsedDocument.toString());
972828
972898
  }
972829
972899
 
972830
972900
  // ../cli-migrations/lib/migrations/0.0.210/index.js
@@ -972835,7 +972905,7 @@ var versionMigrations4 = {
972835
972905
  var __default4 = versionMigrations4;
972836
972906
 
972837
972907
  // ../cli-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/migration.js
972838
- var import_promises171 = require("fs/promises");
972908
+ var import_promises172 = require("fs/promises");
972839
972909
  var import_yaml10 = __toESM(require_dist11(), 1);
972840
972910
 
972841
972911
  // ../cli-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/getAllGeneratorYamlFiles.js
@@ -972879,7 +972949,7 @@ var migration5 = {
972879
972949
  }
972880
972950
  };
972881
972951
  async function migrateGeneratorsYml2(filepath, context3) {
972882
- const contents = await (0, import_promises171.readFile)(filepath);
972952
+ const contents = await (0, import_promises172.readFile)(filepath);
972883
972953
  const parsedDocument = import_yaml10.default.parseDocument(contents.toString());
972884
972954
  const releaseGenerators = parsedDocument.get("release");
972885
972955
  if (releaseGenerators == null) {
@@ -972917,7 +972987,7 @@ async function migrateGeneratorsYml2(filepath, context3) {
972917
972987
  }
972918
972988
  releaseGenerator.delete("outputs");
972919
972989
  });
972920
- await (0, import_promises171.writeFile)(filepath, parsedDocument.toString());
972990
+ await (0, import_promises172.writeFile)(filepath, parsedDocument.toString());
972921
972991
  }
972922
972992
 
972923
972993
  // ../cli-migrations/lib/migrations/0.0.212/index.js
@@ -972928,7 +972998,7 @@ var versionMigrations5 = {
972928
972998
  var __default5 = versionMigrations5;
972929
972999
 
972930
973000
  // ../cli-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/migration.js
972931
- var import_promises172 = require("fs/promises");
973001
+ var import_promises173 = require("fs/promises");
972932
973002
 
972933
973003
  // ../cli-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/getAllYamlFiles.js
972934
973004
  init_lib8();
@@ -972962,9 +973032,9 @@ var migration6 = {
972962
973032
  run: async ({ context: context3 }) => {
972963
973033
  const yamlFiles = await getAllYamlFiles4(context3);
972964
973034
  for (const filepath of yamlFiles) {
972965
- const contents = await (0, import_promises172.readFile)(filepath);
973035
+ const contents = await (0, import_promises173.readFile)(filepath);
972966
973036
  const newContents = contents.toString().replaceAll(" alias:", " type:");
972967
- await (0, import_promises172.writeFile)(filepath, newContents);
973037
+ await (0, import_promises173.writeFile)(filepath, newContents);
972968
973038
  }
972969
973039
  }
972970
973040
  };
@@ -972977,7 +973047,7 @@ var versionMigrations6 = {
972977
973047
  var __default6 = versionMigrations6;
972978
973048
 
972979
973049
  // ../cli-migrations/lib/migrations/0.0.221/add-error-discriminant/migration.js
972980
- var import_promises173 = require("fs/promises");
973050
+ var import_promises174 = require("fs/promises");
972981
973051
 
972982
973052
  // ../cli-migrations/lib/migrations/0.0.221/add-error-discriminant/getAllRootApiYamlFiles.js
972983
973053
  init_lib8();
@@ -973011,9 +973081,9 @@ var migration7 = {
973011
973081
  run: async ({ context: context3 }) => {
973012
973082
  const yamlFiles = await getAllRootApiYamlFiles(context3);
973013
973083
  for (const filepath of yamlFiles) {
973014
- const contents = await (0, import_promises173.readFile)(filepath);
973084
+ const contents = await (0, import_promises174.readFile)(filepath);
973015
973085
  const newContents = contents.toString() + "\nerror-discriminant: error";
973016
- await (0, import_promises173.writeFile)(filepath, newContents);
973086
+ await (0, import_promises174.writeFile)(filepath, newContents);
973017
973087
  }
973018
973088
  }
973019
973089
  };
@@ -973027,7 +973097,7 @@ var __default7 = versionMigrations7;
973027
973097
 
973028
973098
  // ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/migration.js
973029
973099
  init_lib4();
973030
- var import_promises174 = require("fs/promises");
973100
+ var import_promises175 = require("fs/promises");
973031
973101
  init_js_yaml();
973032
973102
 
973033
973103
  // ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/getAllGeneratorYamlFiles.js
@@ -973161,7 +973231,7 @@ var migration8 = {
973161
973231
  }
973162
973232
  };
973163
973233
  async function migrateGeneratorsYml3(filepath) {
973164
- const contentsStr = await (0, import_promises174.readFile)(filepath);
973234
+ const contentsStr = await (0, import_promises175.readFile)(filepath);
973165
973235
  const contents = index_vite_proxy_tmp_default.load(contentsStr.toString());
973166
973236
  const oldGeneratorsConfiguration = GeneratorsConfigurationSchema2.parse(contents);
973167
973237
  let newGeneratorsConfiguration = {};
@@ -973179,7 +973249,7 @@ async function migrateGeneratorsYml3(filepath) {
973179
973249
  generators: oldGeneratorsConfiguration.release.map((releaseGeneratorInvocation) => convertReleaseGeneratorInvocation(releaseGeneratorInvocation))
973180
973250
  };
973181
973251
  }
973182
- await (0, import_promises174.writeFile)(filepath, index_vite_proxy_tmp_default.dump(newGeneratorsConfiguration));
973252
+ await (0, import_promises175.writeFile)(filepath, index_vite_proxy_tmp_default.dump(newGeneratorsConfiguration));
973183
973253
  }
973184
973254
  function convertDraftGeneratorInvocation(draftGeneratorInvocation) {
973185
973255
  const newSchema = {
@@ -973254,7 +973324,7 @@ var versionMigrations8 = {
973254
973324
  var __default8 = versionMigrations8;
973255
973325
 
973256
973326
  // ../cli-migrations/lib/migrations/0.0.248/add-error-discrimination-config/migration.js
973257
- var import_promises175 = require("fs/promises");
973327
+ var import_promises176 = require("fs/promises");
973258
973328
  var import_yaml11 = __toESM(require_dist11(), 1);
973259
973329
 
973260
973330
  // ../cli-migrations/lib/migrations/0.0.248/add-error-discrimination-config/getAllRootApiYamlFiles.js
@@ -973298,7 +973368,7 @@ var migration9 = {
973298
973368
  }
973299
973369
  };
973300
973370
  async function migrateRootApiFile(filepath) {
973301
- const contents = await (0, import_promises175.readFile)(filepath);
973371
+ const contents = await (0, import_promises176.readFile)(filepath);
973302
973372
  const parsedDocument = import_yaml11.default.parseDocument(contents.toString());
973303
973373
  const errorDiscriminant = parsedDocument.get("error-discriminant", true);
973304
973374
  if (errorDiscriminant == null || !import_yaml11.default.isScalar(errorDiscriminant) || typeof errorDiscriminant.value !== "string") {
@@ -973309,7 +973379,7 @@ async function migrateRootApiFile(filepath) {
973309
973379
  "property-name": errorDiscriminant.value
973310
973380
  });
973311
973381
  parsedDocument.delete("error-discriminant");
973312
- await (0, import_promises175.writeFile)(filepath, parsedDocument.toString());
973382
+ await (0, import_promises176.writeFile)(filepath, parsedDocument.toString());
973313
973383
  }
973314
973384
 
973315
973385
  // ../cli-migrations/lib/migrations/0.0.248/index.js
@@ -973320,7 +973390,7 @@ var versionMigrations9 = {
973320
973390
  var __default9 = versionMigrations9;
973321
973391
 
973322
973392
  // ../cli-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/migration.js
973323
- var import_promises176 = require("fs/promises");
973393
+ var import_promises177 = require("fs/promises");
973324
973394
  var import_yaml12 = __toESM(require_dist11(), 1);
973325
973395
 
973326
973396
  // ../cli-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/getAllYamlFiles.js
@@ -973364,7 +973434,7 @@ var migration10 = {
973364
973434
  }
973365
973435
  };
973366
973436
  async function migrateYamlFile(filepath, context3) {
973367
- const contents = await (0, import_promises176.readFile)(filepath);
973437
+ const contents = await (0, import_promises177.readFile)(filepath);
973368
973438
  const parsedDocument = import_yaml12.default.parseDocument(contents.toString());
973369
973439
  const services = parsedDocument.get("services");
973370
973440
  if (services == null) {
@@ -973404,7 +973474,7 @@ async function migrateYamlFile(filepath, context3) {
973404
973474
  context3.failWithoutThrowing("Failed to convert endpoint", e2);
973405
973475
  }
973406
973476
  }
973407
- await (0, import_promises176.writeFile)(filepath, parsedDocument.toString());
973477
+ await (0, import_promises177.writeFile)(filepath, parsedDocument.toString());
973408
973478
  }
973409
973479
  }
973410
973480
  function convertEndpoint4({ document: document4, endpoint: endpoint3 }) {
@@ -973483,7 +973553,7 @@ var versionMigrations10 = {
973483
973553
  var __default10 = versionMigrations10;
973484
973554
 
973485
973555
  // ../cli-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/migration.js
973486
- var import_promises177 = require("fs/promises");
973556
+ var import_promises178 = require("fs/promises");
973487
973557
  var import_yaml13 = __toESM(require_dist11(), 1);
973488
973558
 
973489
973559
  // ../cli-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/getAllYamlFiles.js
@@ -973527,7 +973597,7 @@ var migration11 = {
973527
973597
  }
973528
973598
  };
973529
973599
  async function migrateYamlFile2(filepath, context3) {
973530
- const contents = await (0, import_promises177.readFile)(filepath);
973600
+ const contents = await (0, import_promises178.readFile)(filepath);
973531
973601
  const parsedDocument = import_yaml13.default.parseDocument(contents.toString());
973532
973602
  const types4 = parsedDocument.get("types");
973533
973603
  if (types4 == null) {
@@ -973553,7 +973623,7 @@ async function migrateYamlFile2(filepath, context3) {
973553
973623
  examples.set(i5, { value: value2 });
973554
973624
  }
973555
973625
  }
973556
- await (0, import_promises177.writeFile)(filepath, parsedDocument.toString());
973626
+ await (0, import_promises178.writeFile)(filepath, parsedDocument.toString());
973557
973627
  }
973558
973628
 
973559
973629
  // ../cli-migrations/lib/migrations/0.3.0-rc12/index.js
@@ -973564,7 +973634,7 @@ var versionMigrations11 = {
973564
973634
  var __default11 = versionMigrations11;
973565
973635
 
973566
973636
  // ../cli-migrations/lib/migrations/0.3.23/change-services-key-to-service/migration.js
973567
- var import_promises178 = require("fs/promises");
973637
+ var import_promises179 = require("fs/promises");
973568
973638
  var import_yaml14 = __toESM(require_dist11(), 1);
973569
973639
 
973570
973640
  // ../cli-migrations/lib/migrations/0.3.23/change-services-key-to-service/getAllYamlFiles.js
@@ -973608,7 +973678,7 @@ var migration12 = {
973608
973678
  }
973609
973679
  };
973610
973680
  async function migrateYamlFile3(filepath, context3) {
973611
- const contents = await (0, import_promises178.readFile)(filepath);
973681
+ const contents = await (0, import_promises179.readFile)(filepath);
973612
973682
  const parsedDocument = import_yaml14.default.parseDocument(contents.toString());
973613
973683
  if (!import_yaml14.default.isMap(parsedDocument.contents)) {
973614
973684
  return context3.failAndThrow("File is not a map");
@@ -973638,7 +973708,7 @@ async function migrateYamlFile3(filepath, context3) {
973638
973708
  pair.value = firstService.value;
973639
973709
  }
973640
973710
  }
973641
- await (0, import_promises178.writeFile)(filepath, parsedDocument.toString());
973711
+ await (0, import_promises179.writeFile)(filepath, parsedDocument.toString());
973642
973712
  }
973643
973713
 
973644
973714
  // ../cli-migrations/lib/migrations/0.3.23/index.js
@@ -973649,7 +973719,7 @@ var versionMigrations12 = {
973649
973719
  var __default12 = versionMigrations12;
973650
973720
 
973651
973721
  // ../cli-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/migration.js
973652
- var import_promises179 = require("fs/promises");
973722
+ var import_promises180 = require("fs/promises");
973653
973723
  var import_yaml15 = __toESM(require_dist11(), 1);
973654
973724
 
973655
973725
  // ../cli-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/getAllYamlFiles.js
@@ -973693,7 +973763,7 @@ var migration13 = {
973693
973763
  }
973694
973764
  };
973695
973765
  async function migrateYamlFile4(filepath, context3) {
973696
- const contents = await (0, import_promises179.readFile)(filepath);
973766
+ const contents = await (0, import_promises180.readFile)(filepath);
973697
973767
  const parsedDocument = import_yaml15.default.parseDocument(contents.toString());
973698
973768
  if (!import_yaml15.default.isMap(parsedDocument.contents)) {
973699
973769
  return context3.failAndThrow("File is not a map");
@@ -973712,7 +973782,7 @@ async function migrateYamlFile4(filepath, context3) {
973712
973782
  }
973713
973783
  service.items.splice(indexOfServiceDocsPair, 1);
973714
973784
  parsedDocument.contents.items.unshift(docsPair);
973715
- await (0, import_promises179.writeFile)(filepath, parsedDocument.toString());
973785
+ await (0, import_promises180.writeFile)(filepath, parsedDocument.toString());
973716
973786
  }
973717
973787
 
973718
973788
  // ../cli-migrations/lib/migrations/0.5.4/index.js
@@ -973723,7 +973793,7 @@ var versionMigrations13 = {
973723
973793
  var __default13 = versionMigrations13;
973724
973794
 
973725
973795
  // ../cli-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/migration.js
973726
- var import_promises180 = require("fs/promises");
973796
+ var import_promises181 = require("fs/promises");
973727
973797
 
973728
973798
  // ../cli-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/getAllGeneratorYamlFiles.js
973729
973799
  init_lib8();
@@ -973766,14 +973836,14 @@ var migration14 = {
973766
973836
  }
973767
973837
  };
973768
973838
  async function migrateYamlFile5(filepath) {
973769
- const contents = await (0, import_promises180.readFile)(filepath);
973839
+ const contents = await (0, import_promises181.readFile)(filepath);
973770
973840
  const domainSuffix = process.env.DOMAIN_SUFFIX ?? "docs.buildwithfern.com";
973771
973841
  const regex6 = /(docs:\s*domain:\s*)"([^"]*)"/g;
973772
973842
  const updatedSnapshot = contents.toString().replace(regex6, (_match, _prefix, domain3) => {
973773
973843
  return `docs:
973774
973844
  domain: "${domain3}.${domainSuffix}"`;
973775
973845
  });
973776
- await (0, import_promises180.writeFile)(filepath, updatedSnapshot.toString());
973846
+ await (0, import_promises181.writeFile)(filepath, updatedSnapshot.toString());
973777
973847
  }
973778
973848
 
973779
973849
  // ../cli-migrations/lib/migrations/0.9.10/index.js
@@ -973794,11 +973864,11 @@ var LegacyDocsSerializers = __toESM(require_serialization4(), 1);
973794
973864
 
973795
973865
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/loadRawDocsConfiguration.js
973796
973866
  init_lib8();
973797
- var import_promises181 = require("fs/promises");
973867
+ var import_promises182 = require("fs/promises");
973798
973868
  init_js_yaml();
973799
973869
  async function loadRawDocsConfiguration2({ absolutePathToWorkspace }) {
973800
973870
  const filepath = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
973801
- const contentsStr = await (0, import_promises181.readFile)(filepath);
973871
+ const contentsStr = await (0, import_promises182.readFile)(filepath);
973802
973872
  const contentsParsed = index_vite_proxy_tmp_default.load(contentsStr.toString());
973803
973873
  const result = await LegacyDocsSerializers.DocsConfiguration.parse(contentsParsed);
973804
973874
  if (result.ok) {
@@ -973817,7 +973887,7 @@ function getAbsolutePathToDocsFolder({ absolutePathToWorkspace }) {
973817
973887
 
973818
973888
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndMultipleAPIs.js
973819
973889
  init_lib8();
973820
- var import_promises183 = require("fs/promises");
973890
+ var import_promises184 = require("fs/promises");
973821
973891
  init_js_yaml();
973822
973892
 
973823
973893
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/convertLegacyDocsConfig.js
@@ -974026,11 +974096,11 @@ __export(legacy_exports, {
974026
974096
 
974027
974097
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/generators-configuration/loadRawGeneratorsConfiguration.js
974028
974098
  init_lib8();
974029
- var import_promises182 = require("fs/promises");
974099
+ var import_promises183 = require("fs/promises");
974030
974100
  init_js_yaml();
974031
974101
  async function loadRawGeneratorsConfiguration2({ absolutePathToWorkspace }) {
974032
974102
  const filepath = getAbsolutePathToGeneratorsConfiguration({ absolutePathToWorkspace });
974033
- const contentsStr = await (0, import_promises182.readFile)(filepath);
974103
+ const contentsStr = await (0, import_promises183.readFile)(filepath);
974034
974104
  const contentsParsed = index_vite_proxy_tmp_default.load(contentsStr.toString());
974035
974105
  const result = await legacy_exports.GeneratorsConfigurationSchema.safeParseAsync(contentsParsed);
974036
974106
  if (result.success) {
@@ -974060,7 +974130,7 @@ function migrateDocsInstances(docsURLs) {
974060
974130
  var APIS_DIRECTORY2 = "apis";
974061
974131
  async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspaces, workspaceContainingDocs }) {
974062
974132
  const absolutePathToApisDirectory = join8(absolutePathToFernDirectory, RelativeFilePath2.of(APIS_DIRECTORY2));
974063
- await (0, import_promises183.mkdir)(absolutePathToApisDirectory);
974133
+ await (0, import_promises184.mkdir)(absolutePathToApisDirectory);
974064
974134
  for (const workspace of workspaces) {
974065
974135
  const absolutePathToWorkspace = join8(absolutePathToFernDirectory, RelativeFilePath2.of(workspace));
974066
974136
  const docsURLs = await migrateAndWriteGeneratorsYml({ absolutePathToWorkspace });
@@ -974068,11 +974138,11 @@ async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspa
974068
974138
  await migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName: workspaceContainingDocs });
974069
974139
  const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
974070
974140
  await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
974071
- await (0, import_promises183.rm)(absolutePathToDocsFolder, { recursive: true });
974141
+ await (0, import_promises184.rm)(absolutePathToDocsFolder, { recursive: true });
974072
974142
  }
974073
974143
  const absolutePathToNestedWorkspace = join8(absolutePathToApisDirectory, RelativeFilePath2.of(workspace));
974074
974144
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
974075
- await (0, import_promises183.rm)(absolutePathToWorkspace, { recursive: true });
974145
+ await (0, import_promises184.rm)(absolutePathToWorkspace, { recursive: true });
974076
974146
  }
974077
974147
  }
974078
974148
  async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
@@ -974085,7 +974155,7 @@ async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
974085
974155
  generatorsConfiguration,
974086
974156
  pathModificationStrategy: PathModificationStrategy.Nest
974087
974157
  });
974088
- await (0, import_promises183.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974158
+ await (0, import_promises184.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974089
974159
  return convertedResponse.docsURLs;
974090
974160
  }
974091
974161
  async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName }) {
@@ -974099,12 +974169,12 @@ async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiNa
974099
974169
  apiName
974100
974170
  });
974101
974171
  const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
974102
- await (0, import_promises183.writeFile)(absolutePathToDocsConfig, index_vite_proxy_tmp_default.dump(convertedDocsConfig));
974172
+ await (0, import_promises184.writeFile)(absolutePathToDocsConfig, index_vite_proxy_tmp_default.dump(convertedDocsConfig));
974103
974173
  }
974104
974174
 
974105
974175
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndSingleAPI.js
974106
974176
  init_lib8();
974107
- var import_promises184 = require("fs/promises");
974177
+ var import_promises185 = require("fs/promises");
974108
974178
  init_js_yaml();
974109
974179
  async function migrateDocsAndSingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
974110
974180
  const docsURLs = await migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace });
@@ -974112,8 +974182,8 @@ async function migrateDocsAndSingleAPI({ absolutePathToFernDirectory, absolutePa
974112
974182
  const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
974113
974183
  await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
974114
974184
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
974115
- await (0, import_promises184.rm)(absolutePathToDocsFolder, { recursive: true });
974116
- await (0, import_promises184.rm)(absolutePathToWorkspace, { recursive: true });
974185
+ await (0, import_promises185.rm)(absolutePathToDocsFolder, { recursive: true });
974186
+ await (0, import_promises185.rm)(absolutePathToWorkspace, { recursive: true });
974117
974187
  }
974118
974188
  async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
974119
974189
  const docsConfiguration = await loadRawDocsConfiguration2({ absolutePathToWorkspace });
@@ -974126,7 +974196,7 @@ async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
974126
974196
  apiName: void 0
974127
974197
  });
974128
974198
  const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
974129
- await (0, import_promises184.writeFile)(absolutePathToDocsConfig, index_vite_proxy_tmp_default.dump(convertedDocsConfig));
974199
+ await (0, import_promises185.writeFile)(absolutePathToDocsConfig, index_vite_proxy_tmp_default.dump(convertedDocsConfig));
974130
974200
  }
974131
974201
  async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
974132
974202
  const generatorsConfiguration = await loadRawGeneratorsConfiguration2({ absolutePathToWorkspace });
@@ -974138,24 +974208,24 @@ async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
974138
974208
  generatorsConfiguration,
974139
974209
  pathModificationStrategy: "MoveUp"
974140
974210
  });
974141
- await (0, import_promises184.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974211
+ await (0, import_promises185.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974142
974212
  return convertedResponse.docsURLs;
974143
974213
  }
974144
974214
 
974145
974215
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlyMultipleAPIs.js
974146
974216
  init_lib8();
974147
- var import_promises185 = require("fs/promises");
974217
+ var import_promises186 = require("fs/promises");
974148
974218
  init_js_yaml();
974149
974219
  var APIS_DIRECTORY3 = "apis";
974150
974220
  async function migrateOnlyMultipleAPIs({ absolutePathToFernDirectory, workspaces }) {
974151
974221
  const absolutePathToApisDirectory = join8(absolutePathToFernDirectory, RelativeFilePath2.of(APIS_DIRECTORY3));
974152
- await (0, import_promises185.mkdir)(absolutePathToApisDirectory);
974222
+ await (0, import_promises186.mkdir)(absolutePathToApisDirectory);
974153
974223
  for (const workspace of workspaces) {
974154
974224
  const absolutePathToWorkspace = join8(absolutePathToFernDirectory, RelativeFilePath2.of(workspace));
974155
974225
  await migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace });
974156
974226
  const absolutePathToNestedWorkspace = join8(absolutePathToApisDirectory, RelativeFilePath2.of(workspace));
974157
974227
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
974158
- await (0, import_promises185.rm)(absolutePathToWorkspace, { recursive: true });
974228
+ await (0, import_promises186.rm)(absolutePathToWorkspace, { recursive: true });
974159
974229
  }
974160
974230
  }
974161
974231
  async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
@@ -974168,17 +974238,17 @@ async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
974168
974238
  generatorsConfiguration,
974169
974239
  pathModificationStrategy: PathModificationStrategy.Nest
974170
974240
  });
974171
- await (0, import_promises185.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974241
+ await (0, import_promises186.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974172
974242
  }
974173
974243
 
974174
974244
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlySingleAPI.js
974175
974245
  init_lib8();
974176
- var import_promises186 = require("fs/promises");
974246
+ var import_promises187 = require("fs/promises");
974177
974247
  init_js_yaml();
974178
974248
  async function migrateOnlySingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
974179
974249
  await migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace });
974180
974250
  await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
974181
- await (0, import_promises186.rm)(absolutePathToWorkspace, { recursive: true });
974251
+ await (0, import_promises187.rm)(absolutePathToWorkspace, { recursive: true });
974182
974252
  }
974183
974253
  async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
974184
974254
  const generatorsConfiguration = await loadRawGeneratorsConfiguration2({ absolutePathToWorkspace });
@@ -974190,7 +974260,7 @@ async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
974190
974260
  generatorsConfiguration,
974191
974261
  pathModificationStrategy: "MoveUp"
974192
974262
  });
974193
- await (0, import_promises186.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974263
+ await (0, import_promises187.writeFile)(absolutePathToGeneratorsConfiguration, index_vite_proxy_tmp_default.dump(convertedResponse.value));
974194
974264
  }
974195
974265
 
974196
974266
  // ../cli-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migration.js
@@ -974270,7 +974340,7 @@ var __default15 = versionMigrations15;
974270
974340
  init_lib19();
974271
974341
  init_lib8();
974272
974342
  init_source();
974273
- var import_promises187 = require("fs/promises");
974343
+ var import_promises188 = require("fs/promises");
974274
974344
  init_js_yaml();
974275
974345
  var import_yaml16 = __toESM(require_dist11(), 1);
974276
974346
  var migration16 = {
@@ -974314,7 +974384,7 @@ async function addApiConfigurationToSingleWorkspace({ absolutePathToFernDirector
974314
974384
  if (existingGeneratorsYml == null) {
974315
974385
  if (openapiDirectory != null && openapiDirectory.contents[0] != null) {
974316
974386
  const absolutePathToGeneratorsYml = join8(absoluteFilepathToWorkspace, RelativeFilePath2.of("generators.yml"));
974317
- await (0, import_promises187.writeFile)(absolutePathToGeneratorsYml, index_vite_proxy_tmp_default.dump({
974387
+ await (0, import_promises188.writeFile)(absolutePathToGeneratorsYml, index_vite_proxy_tmp_default.dump({
974318
974388
  api: {
974319
974389
  path: join8(relativize(absolutePathToFernDirectory, absoluteFilepathToWorkspace), RelativeFilePath2.of(openapiDirectory.name), RelativeFilePath2.of(openapiDirectory.contents[0]?.name))
974320
974390
  }
@@ -974329,7 +974399,7 @@ async function addApiConfigurationToSingleWorkspace({ absolutePathToFernDirector
974329
974399
  parsedDocument.set("api", {
974330
974400
  path: join8(relativize(absolutePathToFernDirectory, absoluteFilepathToWorkspace), RelativeFilePath2.of(openapiDirectory.name), RelativeFilePath2.of(openapiDirectory.contents[0]?.name))
974331
974401
  });
974332
- await (0, import_promises187.writeFile)(existingGeneratorsYml.absolutePath, parsedDocument.toString());
974402
+ await (0, import_promises188.writeFile)(existingGeneratorsYml.absolutePath, parsedDocument.toString());
974333
974403
  context3.logger.info(source_default.green(`Updated ${existingGeneratorsYml.absolutePath}`));
974334
974404
  }
974335
974405
  }
@@ -974359,7 +974429,7 @@ var __default16 = versionMigrations16;
974359
974429
  init_lib19();
974360
974430
  init_lib8();
974361
974431
  init_source();
974362
- var import_promises188 = require("fs/promises");
974432
+ var import_promises189 = require("fs/promises");
974363
974433
  init_js_yaml();
974364
974434
  var import_yaml17 = __toESM(require_dist11(), 1);
974365
974435
  var migration17 = {
@@ -974540,7 +974610,7 @@ async function addApiConfigurationToSingleWorkspace2({ absoluteFilepathToWorkspa
974540
974610
  if (schemaComment && documentToWrite.indexOf(schemaComment) === -1) {
974541
974611
  documentToWrite = `${schemaComment}${documentToWrite}`;
974542
974612
  }
974543
- await (0, import_promises188.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
974613
+ await (0, import_promises189.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
974544
974614
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
974545
974615
  }
974546
974616
  async function parseApiSpec({ oldSpec, absoluteFilepathToWorkspace, files, directories, context: context3, namespace }) {
@@ -974587,7 +974657,7 @@ async function parseApiSpec({ oldSpec, absoluteFilepathToWorkspace, files, direc
974587
974657
  }
974588
974658
  let specContent;
974589
974659
  try {
974590
- const fileContents = await (0, import_promises188.readFile)(absoluteSpecPath, { encoding: "utf-8" });
974660
+ const fileContents = await (0, import_promises189.readFile)(absoluteSpecPath, { encoding: "utf-8" });
974591
974661
  specContent = index_vite_proxy_tmp_default.load(fileContents);
974592
974662
  } catch (e2) {
974593
974663
  context3.logger.warn(`Failed to read API spec file ${spec.path}. Error: ${e2}. Skipping...`);
@@ -974693,7 +974763,7 @@ var __default17 = versionMigrations17;
974693
974763
  init_lib19();
974694
974764
  init_lib8();
974695
974765
  init_source();
974696
- var import_promises189 = require("fs/promises");
974766
+ var import_promises190 = require("fs/promises");
974697
974767
  init_js_yaml();
974698
974768
  var migration18 = {
974699
974769
  name: "add-path-parameter-order-setting",
@@ -974782,7 +974852,7 @@ async function updateGeneratorsYml({ context: context3, files }) {
974782
974852
  documentToWrite = `${schemaComment}
974783
974853
  ${documentToWrite}`;
974784
974854
  }
974785
- await (0, import_promises189.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
974855
+ await (0, import_promises190.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
974786
974856
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
974787
974857
  }
974788
974858
  async function getFilesAndDirectories3(absoluteFilepath) {
@@ -974821,7 +974891,7 @@ var __default18 = versionMigrations18;
974821
974891
  init_lib19();
974822
974892
  init_lib8();
974823
974893
  init_source();
974824
- var import_promises190 = require("fs/promises");
974894
+ var import_promises191 = require("fs/promises");
974825
974895
  init_js_yaml();
974826
974896
  var migration19 = {
974827
974897
  name: "update-1_0_0-defaults",
@@ -974997,7 +975067,7 @@ async function updateGeneratorsYml2({ context: context3, files }) {
974997
975067
  documentToWrite = `${schemaComment}
974998
975068
  ${documentToWrite}`;
974999
975069
  }
975000
- await (0, import_promises190.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975070
+ await (0, import_promises191.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975001
975071
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
975002
975072
  }
975003
975073
  async function getFilesAndDirectories4(absoluteFilepath) {
@@ -975069,7 +975139,7 @@ var __default19 = versionMigrations19;
975069
975139
  init_lib19();
975070
975140
  init_lib8();
975071
975141
  init_source();
975072
- var import_promises191 = require("fs/promises");
975142
+ var import_promises192 = require("fs/promises");
975073
975143
  init_js_yaml();
975074
975144
  var migration20 = {
975075
975145
  name: "update-2_0_0-defaults",
@@ -975245,7 +975315,7 @@ async function updateGeneratorsYml3({ context: context3, files }) {
975245
975315
  documentToWrite = `${schemaComment}
975246
975316
  ${documentToWrite}`;
975247
975317
  }
975248
- await (0, import_promises191.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975318
+ await (0, import_promises192.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975249
975319
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
975250
975320
  }
975251
975321
  async function getFilesAndDirectories5(absoluteFilepath) {
@@ -975294,7 +975364,7 @@ var __default20 = versionMigrations20;
975294
975364
  init_lib19();
975295
975365
  init_lib8();
975296
975366
  init_source();
975297
- var import_promises192 = require("fs/promises");
975367
+ var import_promises193 = require("fs/promises");
975298
975368
  init_js_yaml();
975299
975369
  var migration21 = {
975300
975370
  name: "migrate-deprecated-generator-api-settings",
@@ -975386,7 +975456,7 @@ async function updateGeneratorsYml4({ context: context3, files }) {
975386
975456
  documentToWrite = `${schemaComment}
975387
975457
  ${documentToWrite}`;
975388
975458
  }
975389
- await (0, import_promises192.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975459
+ await (0, import_promises193.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975390
975460
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
975391
975461
  }
975392
975462
  function migrateDeprecatedSettings(settings, context3) {
@@ -975435,7 +975505,7 @@ var __default21 = versionMigrations21;
975435
975505
  init_lib19();
975436
975506
  init_lib8();
975437
975507
  init_source();
975438
- var import_promises193 = require("fs/promises");
975508
+ var import_promises194 = require("fs/promises");
975439
975509
  init_js_yaml();
975440
975510
  var migration22 = {
975441
975511
  name: "enable-smart-casing",
@@ -975520,7 +975590,7 @@ async function updateGeneratorsYml5({ context: context3, files }) {
975520
975590
  documentToWrite = `${schemaComment}
975521
975591
  ${documentToWrite}`;
975522
975592
  }
975523
- await (0, import_promises193.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975593
+ await (0, import_promises194.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975524
975594
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
975525
975595
  }
975526
975596
  function setSmartCasingFalseIfNotConfigured(generator, context3) {
@@ -975560,7 +975630,7 @@ var __default22 = versionMigrations22;
975560
975630
  init_lib19();
975561
975631
  init_lib8();
975562
975632
  init_source();
975563
- var import_promises194 = require("fs/promises");
975633
+ var import_promises195 = require("fs/promises");
975564
975634
  init_js_yaml();
975565
975635
  var migration23 = {
975566
975636
  name: "disable-disambiguate-request-names",
@@ -975685,7 +975755,7 @@ async function updateGeneratorsYml6({ context: context3, files }) {
975685
975755
  documentToWrite = `${schemaComment}
975686
975756
  ${documentToWrite}`;
975687
975757
  }
975688
- await (0, import_promises194.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975758
+ await (0, import_promises195.writeFile)(generatorsYmlFile.absolutePath, documentToWrite);
975689
975759
  context3.logger.info(source_default.green(`Updated ${generatorsYmlFile.absolutePath}`));
975690
975760
  }
975691
975761
  async function getFilesAndDirectories8(absoluteFilepath) {
@@ -975820,7 +975890,7 @@ init_lib33();
975820
975890
  init_lib27();
975821
975891
  init_lib6();
975822
975892
  init_source();
975823
- var import_promises195 = require("fs/promises");
975893
+ var import_promises196 = require("fs/promises");
975824
975894
 
975825
975895
  // ../../../node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.mjs
975826
975896
  var NOTHING = /* @__PURE__ */ Symbol.for("immer-nothing");
@@ -976876,7 +976946,7 @@ async function upgrade({
976876
976946
  const newProjectConfig = produce(projectConfig2.rawConfig, (draft) => {
976877
976947
  draft.version = resolvedTargetVersion;
976878
976948
  });
976879
- await (0, import_promises195.writeFile)(
976949
+ await (0, import_promises196.writeFile)(
976880
976950
  projectConfig2._absolutePath,
976881
976951
  ensureFinalNewline(JSON.stringify(newProjectConfig, void 0, 2))
976882
976952
  );
@@ -977033,7 +977103,7 @@ async function upgradeGeneratorsForAllWorkspaces({
977033
977103
  absolutePathToWorkspace: workspace.absoluteFilePath
977034
977104
  });
977035
977105
  if (absolutePathToGeneratorsConfiguration != null && result.updatedConfiguration != null) {
977036
- await (0, import_promises196.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
977106
+ await (0, import_promises197.writeFile)(absolutePathToGeneratorsConfiguration, result.updatedConfiguration);
977037
977107
  }
977038
977108
  for (const upgrade2 of result.appliedUpgrades) {
977039
977109
  const normalizedName = addDefaultDockerOrgIfNotPresent(upgrade2.generatorName);
@@ -977511,7 +977581,7 @@ async function previewDocsWorkspace({
977511
977581
  // src/commands/docs-diff/docsDiff.ts
977512
977582
  init_lib8();
977513
977583
  init_lib6();
977514
- var import_promises197 = require("fs/promises");
977584
+ var import_promises198 = require("fs/promises");
977515
977585
  var import_pngjs2 = __toESM(require_png(), 1);
977516
977586
  async function getSlugForFiles2({
977517
977587
  previewUrl,
@@ -977734,8 +977804,8 @@ async function generateComparisons2({
977734
977804
  afterPath,
977735
977805
  comparisonBasePath
977736
977806
  }) {
977737
- const beforePng = import_pngjs2.PNG.sync.read(await (0, import_promises197.readFile)(beforePath));
977738
- const afterPng = import_pngjs2.PNG.sync.read(await (0, import_promises197.readFile)(afterPath));
977807
+ const beforePng = import_pngjs2.PNG.sync.read(await (0, import_promises198.readFile)(beforePath));
977808
+ const afterPng = import_pngjs2.PNG.sync.read(await (0, import_promises198.readFile)(afterPath));
977739
977809
  const beforeOriginalHeight = beforePng.height;
977740
977810
  const afterOriginalHeight = afterPng.height;
977741
977811
  const width = Math.max(beforePng.width, afterPng.width);
@@ -977773,7 +977843,7 @@ async function generateComparisons2({
977773
977843
  const sideBySide = createSideBySideComparison2(croppedBefore, croppedAfter, 20, true);
977774
977844
  const outPath = `${base4}-region-${i5 + 1}.png`;
977775
977845
  const pngBuffer = import_pngjs2.PNG.sync.write(sideBySide);
977776
- await (0, import_promises197.writeFile)(outPath, new Uint8Array(pngBuffer));
977846
+ await (0, import_promises198.writeFile)(outPath, new Uint8Array(pngBuffer));
977777
977847
  results.push({ changePercent, boundingBox, comparisonPath: outPath });
977778
977848
  }
977779
977849
  return results;
@@ -977852,7 +977922,7 @@ async function docsDiff({
977852
977922
  outputDir.startsWith("/") ? outputDir : join8(cwd(), RelativeFilePath2.of(outputDir))
977853
977923
  );
977854
977924
  if (!await doesPathExist(outputPath)) {
977855
- await (0, import_promises197.mkdir)(outputPath, { recursive: true });
977925
+ await (0, import_promises198.mkdir)(outputPath, { recursive: true });
977856
977926
  }
977857
977927
  const results = [];
977858
977928
  await cliContext.runTask(async (context3) => {
@@ -978280,7 +978350,7 @@ init_lib6();
978280
978350
  // src/commands/docs-theme/ThemeExporter.ts
978281
978351
  init_lib12();
978282
978352
  init_lib8();
978283
- var import_promises198 = require("fs/promises");
978353
+ var import_promises199 = require("fs/promises");
978284
978354
  init_js_yaml();
978285
978355
  var import_path109 = __toESM(require("path"), 1);
978286
978356
  var ThemeExporter = class {
@@ -978293,18 +978363,18 @@ var ThemeExporter = class {
978293
978363
  const docsDir = import_path109.default.dirname(docsYmlPath);
978294
978364
  const outDir = output2 != null ? import_path109.default.resolve(process.cwd(), output2) : import_path109.default.join(this.docsWorkspace.absoluteFilePath, "theme");
978295
978365
  context3.logger.info(`Exporting theme-eligible fields from docs.yml \u2192 ${outDir}`);
978296
- const raw = index_vite_proxy_tmp_default.load(await (0, import_promises198.readFile)(docsYmlPath, "utf-8"));
978366
+ const raw = index_vite_proxy_tmp_default.load(await (0, import_promises199.readFile)(docsYmlPath, "utf-8"));
978297
978367
  const themeConfig = {};
978298
978368
  for (const [k4, v3] of Object.entries(raw)) {
978299
978369
  if (docs_yml_exports.THEME_ELIGIBLE_YAML_KEYS.has(k4)) {
978300
978370
  themeConfig[k4] = v3;
978301
978371
  }
978302
978372
  }
978303
- await (0, import_promises198.mkdir)(outDir, { recursive: true });
978373
+ await (0, import_promises199.mkdir)(outDir, { recursive: true });
978304
978374
  const assetsDir = import_path109.default.join(outDir, "assets");
978305
- await (0, import_promises198.mkdir)(assetsDir, { recursive: true });
978375
+ await (0, import_promises199.mkdir)(assetsDir, { recursive: true });
978306
978376
  const exported = await copyLocalFiles(themeConfig, docsDir, assetsDir);
978307
- await (0, import_promises198.writeFile)(import_path109.default.join(outDir, "theme.yml"), index_vite_proxy_tmp_default.dump(exported), "utf-8");
978377
+ await (0, import_promises199.writeFile)(import_path109.default.join(outDir, "theme.yml"), index_vite_proxy_tmp_default.dump(exported), "utf-8");
978308
978378
  context3.logger.info(`Theme exported to ${outDir}/theme.yml`);
978309
978379
  }
978310
978380
  };
@@ -978318,8 +978388,8 @@ async function copyLocalFiles(obj, sourceDir, assetsDir) {
978318
978388
  const destRelative = relFromSource.startsWith("..") ? relFromProject.startsWith("..") ? import_path109.default.basename(abs) : relFromProject : relFromSource;
978319
978389
  const dest = import_path109.default.join(assetsDir, destRelative);
978320
978390
  try {
978321
- await (0, import_promises198.mkdir)(import_path109.default.dirname(dest), { recursive: true });
978322
- await (0, import_promises198.copyFile)(abs, dest);
978391
+ await (0, import_promises199.mkdir)(import_path109.default.dirname(dest), { recursive: true });
978392
+ await (0, import_promises199.copyFile)(abs, dest);
978323
978393
  return `./assets/${destRelative.split(import_path109.default.sep).join("/")}`;
978324
978394
  } catch {
978325
978395
  return obj;
@@ -978411,7 +978481,7 @@ async function listDocsThemes({
978411
978481
 
978412
978482
  // src/commands/docs-theme/uploadDocsTheme.ts
978413
978483
  init_lib6();
978414
- var import_promises200 = require("fs/promises");
978484
+ var import_promises201 = require("fs/promises");
978415
978485
  init_js_yaml();
978416
978486
  var import_path111 = __toESM(require("path"), 1);
978417
978487
 
@@ -978420,7 +978490,7 @@ init_lib8();
978420
978490
  init_lib6();
978421
978491
  var import_child_process13 = require("child_process");
978422
978492
  var import_crypto10 = require("crypto");
978423
- var import_promises199 = require("fs/promises");
978493
+ var import_promises200 = require("fs/promises");
978424
978494
  var import_mime_types2 = __toESM(require_mime_types(), 1);
978425
978495
  var import_path110 = __toESM(require("path"), 1);
978426
978496
  function getGitRoot() {
@@ -978464,7 +978534,7 @@ var ThemeConfigProcessor = class {
978464
978534
  filePaths.map(async (filePath) => {
978465
978535
  const abs = import_path110.default.resolve(this.themeDir, filePath);
978466
978536
  try {
978467
- await (0, import_promises199.access)(abs);
978537
+ await (0, import_promises200.access)(abs);
978468
978538
  } catch {
978469
978539
  errors4.push(`Referenced file not found: ${abs}`);
978470
978540
  }
@@ -978629,7 +978699,7 @@ ${errors4.map((e2) => ` - ${e2}`).join("\n")}`,
978629
978699
  return { config: cfg, filesUploaded };
978630
978700
  }
978631
978701
  async uploadFileToCas(absolutePath) {
978632
- const content5 = await (0, import_promises199.readFile)(absolutePath);
978702
+ const content5 = await (0, import_promises200.readFile)(absolutePath);
978633
978703
  const contentType = import_mime_types2.default.lookup(absolutePath) || "application/octet-stream";
978634
978704
  const bindPath = posixBindPath(this.gitRoot, absolutePath);
978635
978705
  return this.uploadToCas(content5, contentType, bindPath, import_path110.default.basename(absolutePath));
@@ -978744,7 +978814,7 @@ async function uploadDocsTheme({
978744
978814
  await cliContext.runTask(async (context3) => {
978745
978815
  let rawYaml;
978746
978816
  try {
978747
- const content5 = await (0, import_promises200.readFile)(themeYmlPath, "utf-8");
978817
+ const content5 = await (0, import_promises201.readFile)(themeYmlPath, "utf-8");
978748
978818
  rawYaml = index_vite_proxy_tmp_default.load(content5, { schema: index_vite_proxy_tmp_default.JSON_SCHEMA });
978749
978819
  } catch {
978750
978820
  context3.failAndThrow(
@@ -978799,7 +978869,7 @@ async function uploadDocsTheme({
978799
978869
  // src/commands/downgrade/downgrade.ts
978800
978870
  init_lib19();
978801
978871
  init_lib6();
978802
- var import_promises201 = require("fs/promises");
978872
+ var import_promises202 = require("fs/promises");
978803
978873
  function ensureFinalNewline2(content5) {
978804
978874
  return content5.endsWith("\n") ? content5 : content5 + "\n";
978805
978875
  }
@@ -978824,7 +978894,7 @@ async function downgrade({
978824
978894
  const newProjectConfig = produce(projectConfig.rawConfig, (draft) => {
978825
978895
  draft.version = targetVersion;
978826
978896
  });
978827
- await (0, import_promises201.writeFile)(projectConfig._absolutePath, ensureFinalNewline2(JSON.stringify(newProjectConfig, void 0, 2)));
978897
+ await (0, import_promises202.writeFile)(projectConfig._absolutePath, ensureFinalNewline2(JSON.stringify(newProjectConfig, void 0, 2)));
978828
978898
  cliContext.logger.info(`Updated ${PROJECT_CONFIG_FILENAME} to version ${targetVersion}`);
978829
978899
  }
978830
978900
 
@@ -978832,7 +978902,7 @@ async function downgrade({
978832
978902
  init_lib36();
978833
978903
  init_lib8();
978834
978904
  init_lib22();
978835
- var import_promises202 = require("fs/promises");
978905
+ var import_promises203 = require("fs/promises");
978836
978906
  init_js_yaml();
978837
978907
 
978838
978908
  // src/commands/export/convertIrToOpenApi.ts
@@ -980254,8 +980324,8 @@ async function generateOpenAPIForWorkspaces({
980254
980324
  ir: ir3,
980255
980325
  mode: "openapi"
980256
980326
  });
980257
- await (0, import_promises202.mkdir)(dirname6(outputPath), { recursive: true });
980258
- await (0, import_promises202.writeFile)(
980327
+ await (0, import_promises203.mkdir)(dirname6(outputPath), { recursive: true });
980328
+ await (0, import_promises203.writeFile)(
980259
980329
  outputPath,
980260
980330
  outputPath.endsWith(".json") ? JSON.stringify(openapi, void 0, indent4) : index_vite_proxy_tmp_default.dump(openapi, { indent: indent4 })
980261
980331
  );
@@ -980861,7 +980931,7 @@ async function generateOpenAPIIrForWorkspaces({
980861
980931
  // src/commands/generate-overrides/compareOpenAPISpecs.ts
980862
980932
  init_lib8();
980863
980933
  init_lib6();
980864
- var import_promises203 = require("fs/promises");
980934
+ var import_promises204 = require("fs/promises");
980865
980935
  init_js_yaml();
980866
980936
  async function compareOpenAPISpecs({
980867
980937
  originalPath,
@@ -980903,12 +980973,12 @@ async function compareOpenAPISpecs({
980903
980973
  }
980904
980974
  outputPath = join8(dirname6(originalPath), RelativeFilePath2.of(overridesFilename));
980905
980975
  }
980906
- await (0, import_promises203.writeFile)(outputPath, index_vite_proxy_tmp_default.dump(overrides, { lineWidth: -1, noRefs: true }));
980976
+ await (0, import_promises204.writeFile)(outputPath, index_vite_proxy_tmp_default.dump(overrides, { lineWidth: -1, noRefs: true }));
980907
980977
  context3.logger.info(`Overrides written to ${outputPath}`);
980908
980978
  });
980909
980979
  }
980910
980980
  async function loadSpec2(filepath, context3) {
980911
- const contents = await (0, import_promises203.readFile)(filepath, "utf8");
980981
+ const contents = await (0, import_promises204.readFile)(filepath, "utf8");
980912
980982
  try {
980913
980983
  return JSON.parse(contents);
980914
980984
  } catch {
@@ -981016,7 +981086,7 @@ init_lib35();
981016
981086
  init_lib16();
981017
981087
  init_lib15();
981018
981088
  init_lib6();
981019
- var import_promises204 = require("fs/promises");
981089
+ var import_promises205 = require("fs/promises");
981020
981090
  init_js_yaml();
981021
981091
  async function writeOverridesForWorkspaces({
981022
981092
  project,
@@ -981042,7 +981112,7 @@ async function writeOverridesForWorkspaces({
981042
981112
  async function readExistingOverrides(overridesFilepath, context3) {
981043
981113
  let parsedOverrides = null;
981044
981114
  try {
981045
- const contents = (await (0, import_promises204.readFile)(overridesFilepath, "utf8")).toString();
981115
+ const contents = (await (0, import_promises205.readFile)(overridesFilepath, "utf8")).toString();
981046
981116
  try {
981047
981117
  parsedOverrides = JSON.parse(contents);
981048
981118
  } catch (err) {
@@ -981107,7 +981177,7 @@ async function writeDefinitionForOpenAPIWorkspace({
981107
981177
  for (const overridesPath of overridesPaths) {
981108
981178
  const existingOverrides = await readExistingOverrides(overridesPath, context3);
981109
981179
  const content5 = generateOverridesContent({ ir: ir3, existingOverrides, includeModels, context: context3 });
981110
- await (0, import_promises204.writeFile)(overridesPath, index_vite_proxy_tmp_default.dump(content5));
981180
+ await (0, import_promises205.writeFile)(overridesPath, index_vite_proxy_tmp_default.dump(content5));
981111
981181
  }
981112
981182
  } else {
981113
981183
  const content5 = generateOverridesContent({ ir: ir3, existingOverrides: {}, includeModels, context: context3 });
@@ -981121,7 +981191,7 @@ async function writeDefinitionForOpenAPIWorkspace({
981121
981191
  overridesFilename = `${nameWithoutExt}-overrides${extension4}`;
981122
981192
  }
981123
981193
  }
981124
- await (0, import_promises204.writeFile)(
981194
+ await (0, import_promises205.writeFile)(
981125
981195
  join8(dirname6(spec.absoluteFilepath), RelativeFilePath2.of(overridesFilename)),
981126
981196
  index_vite_proxy_tmp_default.dump(content5)
981127
981197
  );
@@ -981580,7 +981650,7 @@ function convertIRtoJsonSchema(args) {
981580
981650
  // src/commands/jsonschema/generateJsonschemaForWorkspace.ts
981581
981651
  init_lib21();
981582
981652
  init_source();
981583
- var import_promises205 = require("fs/promises");
981653
+ var import_promises206 = require("fs/promises");
981584
981654
  async function generateJsonschemaForWorkspaces({
981585
981655
  typeLocator,
981586
981656
  project,
@@ -981628,9 +981698,9 @@ async function generateJsonschemaForWorkspaces({
981628
981698
  context: context3
981629
981699
  });
981630
981700
  if (!await doesPathExist(dirname6(jsonschemaFilepath))) {
981631
- await (0, import_promises205.mkdir)(dirname6(jsonschemaFilepath), { recursive: true });
981701
+ await (0, import_promises206.mkdir)(dirname6(jsonschemaFilepath), { recursive: true });
981632
981702
  }
981633
- await (0, import_promises205.writeFile)(jsonschemaFilepath, JSON.stringify(jsonSchema, null, 2));
981703
+ await (0, import_promises206.writeFile)(jsonschemaFilepath, JSON.stringify(jsonSchema, null, 2));
981634
981704
  context3.logger.info(source_default.green(`Wrote JSON Schema to ${jsonschemaFilepath}`));
981635
981705
  });
981636
981706
  })
@@ -981640,7 +981710,7 @@ async function generateJsonschemaForWorkspaces({
981640
981710
  // src/commands/merge/mergeOpenAPIWithOverrides.ts
981641
981711
  init_lib8();
981642
981712
  init_lib6();
981643
- var import_promises206 = require("fs/promises");
981713
+ var import_promises207 = require("fs/promises");
981644
981714
  init_js_yaml();
981645
981715
  var HTTP_METHODS4 = /* @__PURE__ */ new Set(["get", "put", "post", "delete", "options", "head", "patch", "trace"]);
981646
981716
  async function mergeOpenAPIWithOverrides({
@@ -981669,11 +981739,11 @@ async function mergeOpenAPIWithOverrides({
981669
981739
  if (split2) {
981670
981740
  const examples = extractEnrichedExamples2(openapi, merged);
981671
981741
  const output2 = isJson ? JSON.stringify(examples, null, 2) : index_vite_proxy_tmp_default.dump(examples, { lineWidth: -1, noRefs: true });
981672
- await (0, import_promises206.writeFile)(outputPath, output2);
981742
+ await (0, import_promises207.writeFile)(outputPath, output2);
981673
981743
  context3.logger.info(`Extracted enriched examples written to ${outputPath}`);
981674
981744
  } else {
981675
981745
  const output2 = isJson ? JSON.stringify(merged, null, 2) : index_vite_proxy_tmp_default.dump(merged, { lineWidth: -1, noRefs: true });
981676
- await (0, import_promises206.writeFile)(outputPath, output2);
981746
+ await (0, import_promises207.writeFile)(outputPath, output2);
981677
981747
  if (outputPath === openapiPath) {
981678
981748
  context3.logger.info(`Enriched ${openapiPath} in-place`);
981679
981749
  } else {
@@ -981683,7 +981753,7 @@ async function mergeOpenAPIWithOverrides({
981683
981753
  });
981684
981754
  }
981685
981755
  async function loadYamlOrJson(filepath, context3) {
981686
- const contents = await (0, import_promises206.readFile)(filepath, "utf8");
981756
+ const contents = await (0, import_promises207.readFile)(filepath, "utf8");
981687
981757
  try {
981688
981758
  return JSON.parse(contents);
981689
981759
  } catch {
@@ -982478,7 +982548,7 @@ init_lib35();
982478
982548
  init_lib6();
982479
982549
  init_esm19();
982480
982550
  init_axios2();
982481
- var import_promises207 = require("fs/promises");
982551
+ var import_promises208 = require("fs/promises");
982482
982552
  var import_path117 = __toESM(require("path"), 1);
982483
982553
  init_index_min2();
982484
982554
  var import_tmp_promise20 = __toESM(require_tmp_promise(), 1);
@@ -982532,7 +982602,7 @@ async function registerWorkspacesV1({
982532
982602
  context3.logger.debug(`Compressing definition at ${tmpDir.path}`);
982533
982603
  await Kn({ file: tarPath, cwd: resolvedWorkspace.absoluteFilePath }, ["."]);
982534
982604
  context3.logger.info("Uploading definition...");
982535
- await axios_default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises207.readFile)(tarPath));
982605
+ await axios_default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises208.readFile)(tarPath));
982536
982606
  context3.logger.info(
982537
982607
  `Registered @${project.config.organization}/${resolvedWorkspace.definition.rootApiFile.contents.name}:${registerApiResponse.body.version}`
982538
982608
  );
@@ -982589,7 +982659,7 @@ function getAIEnhancerConfig2() {
982589
982659
  // src/commands/resolve-specs/resolveSpecsForWorkspaces.ts
982590
982660
  init_lib8();
982591
982661
  init_lib35();
982592
- var import_promises208 = require("fs/promises");
982662
+ var import_promises209 = require("fs/promises");
982593
982663
  var import_path118 = __toESM(require("path"), 1);
982594
982664
  async function resolveSpecsForWorkspaces({
982595
982665
  project,
@@ -982609,14 +982679,14 @@ async function resolveSpecsForWorkspaces({
982609
982679
  return;
982610
982680
  }
982611
982681
  const workspaceOutputDir = project.apiWorkspaces.length > 1 ? AbsoluteFilePath2.of(import_path118.default.join(outputDir, workspace.workspaceName ?? "api")) : outputDir;
982612
- await (0, import_promises208.mkdir)(workspaceOutputDir, { recursive: true });
982682
+ await (0, import_promises209.mkdir)(workspaceOutputDir, { recursive: true });
982613
982683
  const manifest = await collectRawSpecs({
982614
982684
  specs,
982615
982685
  hostOutputDir: workspaceOutputDir,
982616
982686
  containerBaseDir: ".",
982617
982687
  context: context3
982618
982688
  });
982619
- await (0, import_promises208.writeFile)(
982689
+ await (0, import_promises209.writeFile)(
982620
982690
  import_path118.default.join(workspaceOutputDir, SPECS_MANIFEST_FILENAME),
982621
982691
  JSON.stringify(manifest, void 0, 4)
982622
982692
  );
@@ -982826,7 +982896,7 @@ init_lib17();
982826
982896
  init_lib19();
982827
982897
  init_lib8();
982828
982898
  init_lib6();
982829
- var import_promises209 = __toESM(require("fs/promises"), 1);
982899
+ var import_promises210 = __toESM(require("fs/promises"), 1);
982830
982900
 
982831
982901
  // src/commands/sdk-preview/computePreviewVersion.ts
982832
982902
  var BASE_VERSION = "0.0.1";
@@ -982946,7 +983016,7 @@ async function sdkPreview({
982946
983016
  const firstPath = pathOutputs[0];
982947
983017
  const absolutePathToOutput = firstPath != null ? AbsoluteFilePath2.of(resolve6(cwd(), firstPath)) : void 0;
982948
983018
  if (absolutePathToOutput != null) {
982949
- await import_promises209.default.mkdir(absolutePathToOutput, { recursive: true });
983019
+ await import_promises210.default.mkdir(absolutePathToOutput, { recursive: true });
982950
983020
  }
982951
983021
  for (const workspace of project.apiWorkspaces) {
982952
983022
  if (workspace.generatorsConfiguration == null) {
@@ -983136,7 +983206,7 @@ async function sdkPreview({
983136
983206
  init_lib33();
983137
983207
  init_lib6();
983138
983208
  init_source();
983139
- var import_promises210 = require("fs/promises");
983209
+ var import_promises211 = require("fs/promises");
983140
983210
  var import_path119 = require("path");
983141
983211
  async function getPackageManagerBinDir(logger4, pm) {
983142
983212
  let command3;
@@ -983182,7 +983252,7 @@ async function detectInstallationMethod(logger4) {
983182
983252
  logger4.debug(`Found fern at: ${fernPath}`);
983183
983253
  let resolvedPath;
983184
983254
  try {
983185
- resolvedPath = await (0, import_promises210.realpath)(fernPath);
983255
+ resolvedPath = await (0, import_promises211.realpath)(fernPath);
983186
983256
  logger4.debug(`Resolved to: ${resolvedPath}`);
983187
983257
  } catch (error50) {
983188
983258
  logger4.debug(`Failed to resolve symlink: ${error50}`);
@@ -983496,22 +983566,22 @@ init_lib19();
983496
983566
  init_lib8();
983497
983567
  init_lib6();
983498
983568
  var fs33 = __toESM(require("fs"), 1);
983499
- var import_promises211 = require("fs/promises");
983569
+ var import_promises212 = require("fs/promises");
983500
983570
  init_graphql();
983501
983571
  init_js_yaml();
983502
983572
  var import_stream18 = require("stream");
983503
- var import_promises212 = require("stream/promises");
983573
+ var import_promises213 = require("stream/promises");
983504
983574
  async function fetchAndWriteFile(url3, path119, logger4, indent4) {
983505
983575
  const resp = await fetch(url3);
983506
983576
  if (resp.ok && resp.body) {
983507
983577
  logger4.debug("Origin successfully fetched, writing to file");
983508
983578
  const fileStream = fs33.createWriteStream(path119);
983509
- await (0, import_promises212.finished)(import_stream18.Readable.fromWeb(resp.body).pipe(fileStream));
983510
- const fileContents = await (0, import_promises211.readFile)(path119, "utf8");
983579
+ await (0, import_promises213.finished)(import_stream18.Readable.fromWeb(resp.body).pipe(fileStream));
983580
+ const fileContents = await (0, import_promises212.readFile)(path119, "utf8");
983511
983581
  try {
983512
- await (0, import_promises211.writeFile)(path119, JSON.stringify(JSON.parse(fileContents), void 0, indent4), "utf8");
983582
+ await (0, import_promises212.writeFile)(path119, JSON.stringify(JSON.parse(fileContents), void 0, indent4), "utf8");
983513
983583
  } catch (e2) {
983514
- await (0, import_promises211.writeFile)(path119, index_vite_proxy_tmp_default.dump(index_vite_proxy_tmp_default.load(fileContents), { indent: indent4 }), "utf8");
983584
+ await (0, import_promises212.writeFile)(path119, index_vite_proxy_tmp_default.dump(index_vite_proxy_tmp_default.load(fileContents), { indent: indent4 }), "utf8");
983515
983585
  }
983516
983586
  logger4.debug("File written successfully");
983517
983587
  }
@@ -983667,14 +983737,14 @@ async function tryDirectJSONFetch(url3, logger4) {
983667
983737
  async function fetchGraphQLSchemaWithAutoDetection(url3, path119, logger4) {
983668
983738
  const postResult = await tryGraphQLIntrospection(url3, logger4);
983669
983739
  if (postResult.success) {
983670
- await (0, import_promises211.writeFile)(path119, postResult.result, "utf8");
983740
+ await (0, import_promises212.writeFile)(path119, postResult.result, "utf8");
983671
983741
  logger4.info("Successfully fetched GraphQL schema using POST introspection");
983672
983742
  return;
983673
983743
  }
983674
983744
  logger4.debug(`POST introspection failed: ${postResult.error}`);
983675
983745
  const getResult = await tryDirectJSONFetch(url3, logger4);
983676
983746
  if (getResult.success) {
983677
- await (0, import_promises211.writeFile)(path119, getResult.result, "utf8");
983747
+ await (0, import_promises212.writeFile)(path119, getResult.result, "utf8");
983678
983748
  logger4.info("Successfully fetched GraphQL schema using direct JSON fetch");
983679
983749
  return;
983680
983750
  }
@@ -984384,7 +984454,7 @@ async function validateWorkspaces({
984384
984454
  init_lib19();
984385
984455
  init_lib8();
984386
984456
  init_source();
984387
- var import_promises213 = require("fs/promises");
984457
+ var import_promises214 = require("fs/promises");
984388
984458
  init_js_yaml();
984389
984459
  var import_path121 = __toESM(require("path"), 1);
984390
984460
  async function writeDefinitionForWorkspaces({
@@ -984466,22 +984536,22 @@ async function writeFernDefinition({
984466
984536
  return a3.localeCompare(b5);
984467
984537
  };
984468
984538
  if (await doesPathExist(absolutePathToOutputDirectory)) {
984469
- await (0, import_promises213.rm)(absolutePathToOutputDirectory, { recursive: true });
984539
+ await (0, import_promises214.rm)(absolutePathToOutputDirectory, { recursive: true });
984470
984540
  }
984471
- await (0, import_promises213.mkdir)(absolutePathToOutputDirectory, { recursive: true });
984472
- await (0, import_promises213.writeFile)(
984541
+ await (0, import_promises214.mkdir)(absolutePathToOutputDirectory, { recursive: true });
984542
+ await (0, import_promises214.writeFile)(
984473
984543
  join8(absolutePathToOutputDirectory, RelativeFilePath2.of(ROOT_API_FILENAME)),
984474
984544
  index_vite_proxy_tmp_default.dump(definition3.rootApiFile.contents, { sortKeys })
984475
984545
  );
984476
984546
  for (const [relativePath, packageMarker] of Object.entries(definition3.packageMarkers)) {
984477
984547
  const absoluteFilepath = join8(absolutePathToOutputDirectory, RelativeFilePath2.of(relativePath));
984478
- await (0, import_promises213.mkdir)(dirname6(absoluteFilepath), { recursive: true });
984479
- await (0, import_promises213.writeFile)(absoluteFilepath, index_vite_proxy_tmp_default.dump(packageMarker.contents, { sortKeys }));
984548
+ await (0, import_promises214.mkdir)(dirname6(absoluteFilepath), { recursive: true });
984549
+ await (0, import_promises214.writeFile)(absoluteFilepath, index_vite_proxy_tmp_default.dump(packageMarker.contents, { sortKeys }));
984480
984550
  }
984481
984551
  for (const [relativePath, definitionFile] of Object.entries(definition3.namedDefinitionFiles)) {
984482
984552
  const absoluteFilepath = join8(absolutePathToOutputDirectory, RelativeFilePath2.of(relativePath));
984483
- await (0, import_promises213.mkdir)(dirname6(absoluteFilepath), { recursive: true });
984484
- await (0, import_promises213.writeFile)(absoluteFilepath, index_vite_proxy_tmp_default.dump(definitionFile.contents, { sortKeys }));
984553
+ await (0, import_promises214.mkdir)(dirname6(absoluteFilepath), { recursive: true });
984554
+ await (0, import_promises214.writeFile)(absoluteFilepath, index_vite_proxy_tmp_default.dump(definitionFile.contents, { sortKeys }));
984485
984555
  }
984486
984556
  }
984487
984557
 
@@ -984489,7 +984559,7 @@ async function writeFernDefinition({
984489
984559
  init_lib67();
984490
984560
  init_lib8();
984491
984561
  init_source();
984492
- var import_promises214 = require("fs/promises");
984562
+ var import_promises215 = require("fs/promises");
984493
984563
  async function writeDocsDefinitionForProject({
984494
984564
  project,
984495
984565
  outputPath,
@@ -984521,7 +984591,7 @@ async function writeDocsDefinitionForProject({
984521
984591
  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
984522
984592
  });
984523
984593
  const docsDefinition = await docsResolver.resolve();
984524
- await (0, import_promises214.writeFile)(AbsoluteFilePath2.of(outputPath), JSON.stringify(docsDefinition, null, 2));
984594
+ await (0, import_promises215.writeFile)(AbsoluteFilePath2.of(outputPath), JSON.stringify(docsDefinition, null, 2));
984525
984595
  context3.logger.info(source_default.green(`Docs definition written to ${outputPath}`));
984526
984596
  });
984527
984597
  }