@fern-api/fern-api-dev 5.102.0 → 5.103.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.cjs +279 -241
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -90561,6 +90561,53 @@ var init_cloneRepository = __esm({
90561
90561
  }
90562
90562
  });
90563
90563
 
90564
+ // ../../commons/github/lib/cloneRepositoryAtRef.js
90565
+ async function cloneRepositoryAtRef({ repositoryUrl, ref: ref2 }) {
90566
+ if (!isGitAvailable()) {
90567
+ throw new Error("Git is not installed or not found in PATH. Cloning a git source requires git to be available. Please install git and ensure it is in your PATH.");
90568
+ }
90569
+ const tmpDir = await import_tmp_promise3.default.dir({ unsafeCleanup: true });
90570
+ const cloneArgs = ["--depth", "1", "--config", "core.symlinks=false"];
90571
+ try {
90572
+ if (ref2 != null && isCommitSha(ref2)) {
90573
+ await simpleGit().clone(repositoryUrl, tmpDir.path, [...cloneArgs, "--no-checkout"]);
90574
+ const repoGit = simpleGit(tmpDir.path);
90575
+ await repoGit.fetch("origin", ref2, { "--depth": "1" });
90576
+ await repoGit.checkout(ref2);
90577
+ } else {
90578
+ await simpleGit().clone(repositoryUrl, tmpDir.path, ref2 != null ? [...cloneArgs, "--branch", ref2] : cloneArgs);
90579
+ }
90580
+ } catch (error50) {
90581
+ const errorMessage = extractErrorMessage(error50);
90582
+ if (errorMessage.includes("Authentication failed") || errorMessage.includes("could not read Username") || errorMessage.includes("401") || errorMessage.includes("403")) {
90583
+ throw new Error(`Failed to clone ${repositoryUrl}: authentication failed. Ensure your git credentials are configured for that repository. The CLI uses your system's git credential configuration (credential helpers, SSH keys, GIT_ASKPASS). Original error: ${errorMessage}`);
90584
+ }
90585
+ if (errorMessage.toLowerCase().includes("repository not found") || errorMessage.includes("404")) {
90586
+ throw new Error(`Failed to clone ${repositoryUrl}: repository not found. Check that it exists and your credentials have access. Original error: ${errorMessage}`);
90587
+ }
90588
+ throw new Error(`Failed to clone ${repositoryUrl}${ref2 != null ? ` at ref '${ref2}'` : ""}. Original error: ${errorMessage}`);
90589
+ }
90590
+ return tmpDir.path;
90591
+ }
90592
+ function resolveRepositorySubpath({ repositoryRoot, subpath, description }) {
90593
+ const resolved = import_path19.default.resolve(repositoryRoot, subpath);
90594
+ if (resolved !== repositoryRoot && !resolved.startsWith(repositoryRoot + import_path19.default.sep)) {
90595
+ throw new Error(`Invalid ${description} '${subpath}': path must be relative to the repository root and cannot traverse outside it.`);
90596
+ }
90597
+ return resolved;
90598
+ }
90599
+ var import_path19, import_tmp_promise3;
90600
+ var init_cloneRepositoryAtRef = __esm({
90601
+ "../../commons/github/lib/cloneRepositoryAtRef.js"() {
90602
+ "use strict";
90603
+ init_lib4();
90604
+ import_path19 = __toESM(require("path"), 1);
90605
+ init_esm16();
90606
+ import_tmp_promise3 = __toESM(require_tmp_promise(), 1);
90607
+ import_tmp_promise3.default.setGracefulCleanup();
90608
+ }
90609
+ });
90610
+
90564
90611
  // ../../commons/github/lib/createOrUpdatePullRequest.js
90565
90612
  function parseRepository2(repository) {
90566
90613
  const [owner, repo] = repository.split("/");
@@ -98956,6 +99003,7 @@ var lib_exports4 = {};
98956
99003
  __export(lib_exports4, {
98957
99004
  ClonedRepository: () => ClonedRepository,
98958
99005
  cloneRepository: () => cloneRepository,
99006
+ cloneRepositoryAtRef: () => cloneRepositoryAtRef,
98959
99007
  createOrUpdatePullRequest: () => createOrUpdatePullRequest,
98960
99008
  deleteBranch: () => deleteBranch,
98961
99009
  expandFernignorePatterns: () => expandFernignorePatterns,
@@ -98963,13 +99011,15 @@ __export(lib_exports4, {
98963
99011
  getGithubApiBaseUrl: () => getGithubApiBaseUrl,
98964
99012
  getLatestRelease: () => getLatestRelease,
98965
99013
  getOrUpdateBranch: () => getOrUpdateBranch,
98966
- parseRepository: () => parseRepository
99014
+ parseRepository: () => parseRepository,
99015
+ resolveRepositorySubpath: () => resolveRepositorySubpath
98967
99016
  });
98968
99017
  var init_lib11 = __esm({
98969
99018
  "../../commons/github/lib/index.js"() {
98970
99019
  "use strict";
98971
99020
  init_ClonedRepository();
98972
99021
  init_cloneRepository();
99022
+ init_cloneRepositoryAtRef();
98973
99023
  init_createOrUpdatePullRequest();
98974
99024
  init_deleteBranch();
98975
99025
  init_expandFernignorePatterns();
@@ -158813,14 +158863,14 @@ function convertMultipartRequestToSchema(request7) {
158813
158863
  maxProperties: void 0
158814
158864
  });
158815
158865
  }
158816
- var fs, path19, ExampleEndpointFactory;
158866
+ var fs, path20, ExampleEndpointFactory;
158817
158867
  var init_ExampleEndpointFactory = __esm({
158818
158868
  "../api-importers/openapi/openapi-ir-parser/lib/openapi/v3/converters/ExampleEndpointFactory.js"() {
158819
158869
  "use strict";
158820
158870
  init_lib4();
158821
158871
  init_lib13();
158822
158872
  fs = __toESM(require("fs"), 1);
158823
- path19 = __toESM(require("path"), 1);
158873
+ path20 = __toESM(require("path"), 1);
158824
158874
  init_ExampleTypeFactory();
158825
158875
  init_convertSchemaToSchemaWithExample();
158826
158876
  init_isSchemaRequired();
@@ -158861,15 +158911,15 @@ var init_ExampleEndpointFactory = __esm({
158861
158911
  let logDir;
158862
158912
  if (this.context.source.type === "openapi") {
158863
158913
  const sourceFile = this.context.source.file;
158864
- const sourceDir = path19.dirname(sourceFile);
158914
+ const sourceDir = path20.dirname(sourceFile);
158865
158915
  let currentDir = sourceDir;
158866
- while (currentDir !== path19.dirname(currentDir)) {
158867
- const fernDir = path19.join(currentDir, "fern");
158916
+ while (currentDir !== path20.dirname(currentDir)) {
158917
+ const fernDir = path20.join(currentDir, "fern");
158868
158918
  if (fs.existsSync(fernDir) && fs.statSync(fernDir).isDirectory()) {
158869
158919
  logDir = fernDir;
158870
158920
  break;
158871
158921
  }
158872
- currentDir = path19.dirname(currentDir);
158922
+ currentDir = path20.dirname(currentDir);
158873
158923
  }
158874
158924
  if (!logDir) {
158875
158925
  logDir = sourceDir;
@@ -158878,7 +158928,7 @@ var init_ExampleEndpointFactory = __esm({
158878
158928
  logDir = process.cwd();
158879
158929
  }
158880
158930
  const resolvedLogDir = logDir ?? process.cwd();
158881
- const logPath = path19.join(resolvedLogDir, "schemas_missing_examples.txt");
158931
+ const logPath = path20.join(resolvedLogDir, "schemas_missing_examples.txt");
158882
158932
  const logContent = [
158883
158933
  `# Schemas Missing Examples Report`,
158884
158934
  `# Generated on: ${(/* @__PURE__ */ new Date()).toISOString()}`,
@@ -165595,7 +165645,7 @@ function maybeResolveCodeReference(code5, baseDir) {
165595
165645
  return code5;
165596
165646
  }
165597
165647
  if (isCodeReference(code5)) {
165598
- const resolvedPath = (0, import_path19.resolve)(baseDir ?? process.cwd(), code5.$ref);
165648
+ const resolvedPath = (0, import_path20.resolve)(baseDir ?? process.cwd(), code5.$ref);
165599
165649
  if ((0, import_fs12.existsSync)(resolvedPath)) {
165600
165650
  try {
165601
165651
  const fileContent = (0, import_fs12.readFileSync)(resolvedPath, "utf-8");
@@ -165629,7 +165679,7 @@ function resolveCodeSamples(codeSamples, baseDir) {
165629
165679
  }
165630
165680
  function getExamplesFromExtension(operationContext, operationObject, context3) {
165631
165681
  const exampleEndpointCalls = getExtension(operationObject, FernOpenAPIExtension.EXAMPLES);
165632
- const baseDir = context3.source.type === "openapi" ? (0, import_path19.dirname)(context3.source.file) : void 0;
165682
+ const baseDir = context3.source.type === "openapi" ? (0, import_path20.dirname)(context3.source.file) : void 0;
165633
165683
  const resolvedExamples = (exampleEndpointCalls ?? []).map((example) => {
165634
165684
  if (!isPlainObject4(example)) {
165635
165685
  return example;
@@ -165677,7 +165727,7 @@ function getExamplesFromExtension(operationContext, operationObject, context3) {
165677
165727
  }
165678
165728
  return validatedExampleEndpointCalls.map(EndpointExample2.unknown);
165679
165729
  }
165680
- var import_fs12, import_path19;
165730
+ var import_fs12, import_path20;
165681
165731
  var init_getExamplesFromExtension = __esm({
165682
165732
  "../api-importers/openapi/openapi-ir-parser/lib/openapi/v3/extensions/getExamplesFromExtension.js"() {
165683
165733
  "use strict";
@@ -165685,7 +165735,7 @@ var init_getExamplesFromExtension = __esm({
165685
165735
  init_lib10();
165686
165736
  init_lib13();
165687
165737
  import_fs12 = require("fs");
165688
- import_path19 = require("path");
165738
+ import_path20 = require("path");
165689
165739
  init_getExtension();
165690
165740
  init_RedoclyCodeSampleSchema();
165691
165741
  init_extensions();
@@ -200252,7 +200302,7 @@ async function validateSchema({ schema, value: value2, context: context3, filepa
200252
200302
  prefix: " - "
200253
200303
  });
200254
200304
  });
200255
- const errorMessage = [`Failed to parse file: ${import_path20.default.relative(process.cwd(), filepathBeingParsed)}`, ...issues].join("\n");
200305
+ const errorMessage = [`Failed to parse file: ${import_path21.default.relative(process.cwd(), filepathBeingParsed)}`, ...issues].join("\n");
200256
200306
  return context3.failAndThrow(errorMessage, void 0, { code: CliError.Code.ConfigError });
200257
200307
  }
200258
200308
  function joinZodPath(arr) {
@@ -200264,13 +200314,13 @@ function joinZodPath(arr) {
200264
200314
  return acc + separator + value2;
200265
200315
  }, "");
200266
200316
  }
200267
- var import_path20;
200317
+ var import_path21;
200268
200318
  var init_validateSchema = __esm({
200269
200319
  "../configuration-loader/lib/commons/validateSchema.js"() {
200270
200320
  "use strict";
200271
200321
  init_lib4();
200272
200322
  init_lib6();
200273
- import_path20 = __toESM(require("path"), 1);
200323
+ import_path21 = __toESM(require("path"), 1);
200274
200324
  }
200275
200325
  });
200276
200326
 
@@ -200289,7 +200339,7 @@ async function convertDependenciesConfiguration({ absolutePathToWorkspace, rawDe
200289
200339
  const dependencies = {};
200290
200340
  for (const [coordinate, versionOrPath] of Object.entries(rawDependenciesConfiguration.dependencies)) {
200291
200341
  if (isPath(versionOrPath)) {
200292
- const pathToApi = AbsoluteFilePath2.of(import_path21.default.join(absolutePathToWorkspace, versionOrPath));
200342
+ const pathToApi = AbsoluteFilePath2.of(import_path22.default.join(absolutePathToWorkspace, versionOrPath));
200293
200343
  if (await doesPathExist(pathToApi)) {
200294
200344
  dependencies[coordinate] = {
200295
200345
  type: "local",
@@ -200330,13 +200380,13 @@ async function convertDependenciesConfiguration({ absolutePathToWorkspace, rawDe
200330
200380
  function isPath(value2) {
200331
200381
  return RELATIVE_PATH_UP_ONE_DIRECTORY_PATTERN.test(value2);
200332
200382
  }
200333
- var import_path21, EMPTY_DEPENDENCIES_CONFIGURATION, RELATIVE_PATH_UP_ONE_DIRECTORY_PATTERN;
200383
+ var import_path22, EMPTY_DEPENDENCIES_CONFIGURATION, RELATIVE_PATH_UP_ONE_DIRECTORY_PATTERN;
200334
200384
  var init_convertDependenciesConfiguration = __esm({
200335
200385
  "../configuration-loader/lib/dependencies-yml/convertDependenciesConfiguration.js"() {
200336
200386
  "use strict";
200337
200387
  init_lib8();
200338
200388
  init_lib6();
200339
- import_path21 = __toESM(require("path"), 1);
200389
+ import_path22 = __toESM(require("path"), 1);
200340
200390
  EMPTY_DEPENDENCIES_CONFIGURATION = {
200341
200391
  dependencies: {}
200342
200392
  };
@@ -236019,7 +236069,7 @@ async function materializeGitRef({ ref: ref2, absolutePathToFernFolder, context:
236019
236069
  return { ...cached2, ref: ref2 };
236020
236070
  }
236021
236071
  await runGit({ args: ["worktree", "prune"], cwd: repoRoot, context: context3 });
236022
- const tmpDir = await import_tmp_promise3.default.dir({ unsafeCleanup: true });
236072
+ const tmpDir = await import_tmp_promise4.default.dir({ unsafeCleanup: true });
236023
236073
  const worktreePath = AbsoluteFilePath2.of(tmpDir.path);
236024
236074
  const addResult = await runGit({
236025
236075
  args: ["worktree", "add", "--detach", "--force", worktreePath, sha],
@@ -236048,7 +236098,7 @@ async function materializeGitRef({ ref: ref2, absolutePathToFernFolder, context:
236048
236098
  materializedRefsBySha.set(cacheKey, materialized);
236049
236099
  return materialized;
236050
236100
  }
236051
- var import_tmp_promise3, materializedRefsBySha;
236101
+ var import_tmp_promise4, materializedRefsBySha;
236052
236102
  var init_materializeGitRef = __esm({
236053
236103
  "../configuration-loader/lib/docs-yml/git-versions/materializeGitRef.js"() {
236054
236104
  "use strict";
@@ -236056,8 +236106,8 @@ var init_materializeGitRef = __esm({
236056
236106
  init_lib8();
236057
236107
  init_lib18();
236058
236108
  init_lib6();
236059
- import_tmp_promise3 = __toESM(require_tmp_promise(), 1);
236060
- import_tmp_promise3.default.setGracefulCleanup();
236109
+ import_tmp_promise4 = __toESM(require_tmp_promise(), 1);
236110
+ import_tmp_promise4.default.setGracefulCleanup();
236061
236111
  materializedRefsBySha = /* @__PURE__ */ new Map();
236062
236112
  }
236063
236113
  });
@@ -237860,7 +237910,7 @@ async function expandFolderConfiguration({ rawConfig, absolutePathToFernFolder,
237860
237910
  });
237861
237911
  const indexPage = contents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
237862
237912
  const filteredContents = indexPage ? contents.filter((item) => item !== indexPage) : contents;
237863
- const folderName = import_path22.default.basename(folderPath);
237913
+ const folderName = import_path23.default.basename(folderPath);
237864
237914
  const indexFrontmatterTitle = effectiveTitleSource === "frontmatter" && indexPage?.type === "page" ? (await getFrontmatterMetadata({ absolutePath: indexPage.absolutePath })).title : void 0;
237865
237915
  const title2 = rawConfig.title ?? indexFrontmatterTitle ?? nameToTitle({ name: folderName });
237866
237916
  const slug = rawConfig.slug ?? nameToSlug({ name: folderName });
@@ -238405,14 +238455,14 @@ async function loadTranslationPages({ translations, defaultLocale, pages, absolu
238405
238455
  if (translations == null || translations.length === 0) {
238406
238456
  return void 0;
238407
238457
  }
238408
- const translationsRootDir = import_path22.default.join(absolutePathToFernFolder, "translations");
238458
+ const translationsRootDir = import_path23.default.join(absolutePathToFernFolder, "translations");
238409
238459
  const result = {};
238410
238460
  const normalizedTranslations = translations.map((t3) => docs_yml_exports.DocsYmlSchemas.normalizeTranslationConfig(t3));
238411
238461
  await Promise.all(normalizedTranslations.map(async ({ lang }) => {
238412
238462
  if (lang === defaultLocale) {
238413
238463
  return;
238414
238464
  }
238415
- const langDir = import_path22.default.join(translationsRootDir, lang);
238465
+ const langDir = import_path23.default.join(translationsRootDir, lang);
238416
238466
  if (!await doesPathExist(langDir)) {
238417
238467
  context3.failAndThrow(`Translation directory for locale "${lang}" not found.
238418
238468
  Expected a directory at: ${langDir}
@@ -238425,7 +238475,7 @@ version at "translations/${lang}/pages/getting-started.mdx".`, void 0, { code: C
238425
238475
  const localePages = {};
238426
238476
  const missingFiles = [];
238427
238477
  await Promise.all(Object.keys(pages).map(async (relativeFilePath) => {
238428
- const translatedFilePath = import_path22.default.join(langDir, relativeFilePath);
238478
+ const translatedFilePath = import_path23.default.join(langDir, relativeFilePath);
238429
238479
  if (await doesPathExist(translatedFilePath)) {
238430
238480
  localePages[relativeFilePath] = await (0, import_promises15.readFile)(translatedFilePath, "utf-8");
238431
238481
  } else {
@@ -238445,7 +238495,7 @@ async function loadTranslationNavigationOverlays({ translations, defaultLocale,
238445
238495
  if (translations == null || translations.length === 0) {
238446
238496
  return void 0;
238447
238497
  }
238448
- const translationsRootDir = import_path22.default.join(absolutePathToFernFolder, "translations");
238498
+ const translationsRootDir = import_path23.default.join(absolutePathToFernFolder, "translations");
238449
238499
  const result = {};
238450
238500
  const normalizedTranslations = translations.map((t3) => docs_yml_exports.DocsYmlSchemas.normalizeTranslationConfig(t3));
238451
238501
  await Promise.all(normalizedTranslations.map(async ({ lang }) => {
@@ -238483,13 +238533,13 @@ async function loadTranslationNavigationOverlays({ translations, defaultLocale,
238483
238533
  return result;
238484
238534
  }
238485
238535
  async function resolveTranslationOverlayDocsYml({ translationsRootDir, lang }) {
238486
- const langDir = import_path22.default.join(translationsRootDir, lang);
238487
- const directDocsYmlPath = import_path22.default.join(langDir, "docs.yml");
238536
+ const langDir = import_path23.default.join(translationsRootDir, lang);
238537
+ const directDocsYmlPath = import_path23.default.join(langDir, "docs.yml");
238488
238538
  if (await doesPathExist(directDocsYmlPath)) {
238489
238539
  return { overlayDocsYmlPath: directDocsYmlPath, overlayDir: langDir };
238490
238540
  }
238491
- const legacyFernDir = import_path22.default.join(langDir, "fern");
238492
- const legacyDocsYmlPath = import_path22.default.join(legacyFernDir, "docs.yml");
238541
+ const legacyFernDir = import_path23.default.join(langDir, "fern");
238542
+ const legacyDocsYmlPath = import_path23.default.join(legacyFernDir, "docs.yml");
238493
238543
  if (await doesPathExist(legacyDocsYmlPath)) {
238494
238544
  return { overlayDocsYmlPath: legacyDocsYmlPath, overlayDir: legacyFernDir };
238495
238545
  }
@@ -238633,7 +238683,7 @@ async function parseVersionOverlay({ versionObj, overlayDir, context: context3 }
238633
238683
  return versionOverlay;
238634
238684
  }
238635
238685
  async function loadNavOverlayFile({ relativeNavPath, overlayDir, overlayKind, context: context3 }) {
238636
- const resolvedNavFilePath = import_path22.default.resolve(overlayDir, relativeNavPath);
238686
+ const resolvedNavFilePath = import_path23.default.resolve(overlayDir, relativeNavPath);
238637
238687
  if (!resolvedNavFilePath.startsWith(overlayDir)) {
238638
238688
  context3.logger.warn(`Invalid path in ${overlayKind} overlay: "${relativeNavPath}" escapes the translations directory. Skipping.`);
238639
238689
  return void 0;
@@ -238723,7 +238773,7 @@ function parseVariantOverlays(variants) {
238723
238773
  }
238724
238774
  return result;
238725
238775
  }
238726
- var import_promises15, import_path22, DEFAULT_CHANGELOG_TITLE;
238776
+ var import_promises15, import_path23, DEFAULT_CHANGELOG_TITLE;
238727
238777
  var init_parseDocsConfiguration = __esm({
238728
238778
  "../configuration-loader/lib/docs-yml/parseDocsConfiguration.js"() {
238729
238779
  "use strict";
@@ -238734,7 +238784,7 @@ var init_parseDocsConfiguration = __esm({
238734
238784
  init_lib6();
238735
238785
  import_promises15 = require("fs/promises");
238736
238786
  init_js_yaml();
238737
- import_path22 = __toESM(require("path"), 1);
238787
+ import_path23 = __toESM(require("path"), 1);
238738
238788
  init_convertColorsConfiguration();
238739
238789
  init_getAllPages();
238740
238790
  init_getVersionContentRef();
@@ -264912,7 +264962,7 @@ async function getGithubLicense({ absolutePathToGeneratorsConfiguration, githubL
264912
264962
  assertNever(githubLicense);
264913
264963
  }
264914
264964
  }
264915
- const absolutePathToLicense = join8(AbsoluteFilePath2.of(import_path23.default.dirname(absolutePathToGeneratorsConfiguration)), RelativeFilePath2.of(githubLicense.custom));
264965
+ const absolutePathToLicense = join8(AbsoluteFilePath2.of(import_path24.default.dirname(absolutePathToGeneratorsConfiguration)), RelativeFilePath2.of(githubLicense.custom));
264916
264966
  const licenseContent = await (0, import_promises17.readFile)(absolutePathToLicense);
264917
264967
  return api_exports4.GithubLicense.custom({
264918
264968
  contents: licenseContent.toString()
@@ -265093,7 +265143,7 @@ function isGithubSelfhosted(github) {
265093
265143
  }
265094
265144
  return "uri" in github && "token" in github;
265095
265145
  }
265096
- var import_promises17, import_path23, UNDEFINED_API_DEFINITION_SETTINGS;
265146
+ var import_promises17, import_path24, UNDEFINED_API_DEFINITION_SETTINGS;
265097
265147
  var init_convertGeneratorsConfiguration = __esm({
265098
265148
  "../configuration-loader/lib/generators-yml/convertGeneratorsConfiguration.js"() {
265099
265149
  "use strict";
@@ -265104,7 +265154,7 @@ var init_convertGeneratorsConfiguration = __esm({
265104
265154
  init_lib6();
265105
265155
  init_esm18();
265106
265156
  import_promises17 = require("fs/promises");
265107
- import_path23 = __toESM(require("path"), 1);
265157
+ import_path24 = __toESM(require("path"), 1);
265108
265158
  init_getGeneratorName();
265109
265159
  UNDEFINED_API_DEFINITION_SETTINGS = {
265110
265160
  shouldUseTitleAsName: void 0,
@@ -265177,7 +265227,7 @@ async function loadRawGeneratorsConfiguration({ absolutePathToWorkspace, context
265177
265227
  });
265178
265228
  } catch (e2) {
265179
265229
  if (e2 instanceof index_vite_proxy_tmp_default.YAMLException) {
265180
- const relativePath = import_path24.default.relative(process.cwd(), filepath);
265230
+ const relativePath = import_path25.default.relative(process.cwd(), filepath);
265181
265231
  let errorMessage = `Failed to parse ${relativePath}: ${e2.reason}`;
265182
265232
  if (e2.mark != null) {
265183
265233
  errorMessage += `
@@ -265233,7 +265283,7 @@ async function getPathToGeneratorsConfiguration({ absolutePathToWorkspace }) {
265233
265283
  }
265234
265284
  return void 0;
265235
265285
  }
265236
- var import_promises18, import_path24;
265286
+ var import_promises18, import_path25;
265237
265287
  var init_loadGeneratorsConfiguration = __esm({
265238
265288
  "../configuration-loader/lib/generators-yml/loadGeneratorsConfiguration.js"() {
265239
265289
  "use strict";
@@ -265242,7 +265292,7 @@ var init_loadGeneratorsConfiguration = __esm({
265242
265292
  init_lib6();
265243
265293
  import_promises18 = require("fs/promises");
265244
265294
  init_js_yaml();
265245
- import_path24 = __toESM(require("path"), 1);
265295
+ import_path25 = __toESM(require("path"), 1);
265246
265296
  init_convertGeneratorsConfiguration();
265247
265297
  }
265248
265298
  });
@@ -318174,7 +318224,7 @@ function setProxy(options2, configProxy, location2, isRedirect) {
318174
318224
  setProxy(redirectOptions, configProxy, redirectOptions.href, true);
318175
318225
  };
318176
318226
  }
318177
- var import_http5, import_https2, import_http22, import_util16, import_path27, import_follow_redirects, import_zlib2, import_stream6, import_events, zlibOptions, brotliOptions, isBrotliSupported, httpFollow, httpsFollow, isHttps, FORM_DATA_CONTENT_HEADERS, kAxiosSocketListener, kAxiosCurrentReq, supportedProtocols, decodeURIComponentSafe, flushOnFinish, Http2Sessions, http2Sessions, isHttpAdapterSupported, wrapAsync, resolveFamily, buildAddressEntry, http2Transport, http_default;
318227
+ var import_http5, import_https2, import_http22, import_util16, import_path28, import_follow_redirects, import_zlib2, import_stream6, import_events, zlibOptions, brotliOptions, isBrotliSupported, httpFollow, httpsFollow, isHttps, FORM_DATA_CONTENT_HEADERS, kAxiosSocketListener, kAxiosCurrentReq, supportedProtocols, decodeURIComponentSafe, flushOnFinish, Http2Sessions, http2Sessions, isHttpAdapterSupported, wrapAsync, resolveFamily, buildAddressEntry, http2Transport, http_default;
318178
318228
  var init_http5 = __esm({
318179
318229
  "../../../node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/adapters/http.js"() {
318180
318230
  "use strict";
@@ -318187,7 +318237,7 @@ var init_http5 = __esm({
318187
318237
  import_https2 = __toESM(require("https"), 1);
318188
318238
  import_http22 = __toESM(require("http2"), 1);
318189
318239
  import_util16 = __toESM(require("util"), 1);
318190
- import_path27 = require("path");
318240
+ import_path28 = require("path");
318191
318241
  import_follow_redirects = __toESM(require_follow_redirects(), 1);
318192
318242
  import_zlib2 = __toESM(require("zlib"), 1);
318193
318243
  init_data();
@@ -318665,9 +318715,9 @@ var init_http5 = __esm({
318665
318715
  }
318666
318716
  if (config5.allowedSocketPaths != null) {
318667
318717
  const allowed = Array.isArray(config5.allowedSocketPaths) ? config5.allowedSocketPaths : [config5.allowedSocketPaths];
318668
- const resolvedSocket = (0, import_path27.resolve)(config5.socketPath);
318718
+ const resolvedSocket = (0, import_path28.resolve)(config5.socketPath);
318669
318719
  const isAllowed = allowed.some(
318670
- (entry) => typeof entry === "string" && (0, import_path27.resolve)(entry) === resolvedSocket
318720
+ (entry) => typeof entry === "string" && (0, import_path28.resolve)(entry) === resolvedSocket
318671
318721
  );
318672
318722
  if (!isAllowed) {
318673
318723
  return reject(
@@ -320588,7 +320638,7 @@ function Un(s5, t3) {
320588
320638
  function Hn(s5, t3) {
320589
320639
  s5.head = new de2(t3, void 0, s5.head, s5), s5.tail || (s5.tail = s5.head), s5.length++;
320590
320640
  }
320591
- var import_events2, import_fs13, import_node_events6, import_node_stream3, import_node_string_decoder2, import_node_path9, import_node_fs6, import_path28, import_events3, import_assert5, import_buffer, Ms, import_zlib3, import_node_path10, import_node_path11, import_fs14, import_fs15, import_path29, import_node_path12, import_path30, import_node_fs7, import_node_assert, import_node_crypto5, import_node_fs8, import_node_path13, import_fs16, import_node_fs9, import_node_path14, import_node_fs10, import_promises21, import_node_path15, import_node_path16, import_node_fs11, import_node_path17, Mr, Br, xs, zr, Ur, Hr, q3, Q3, rt2, Le2, qt2, Ne2, Ls, De2, Ns, z4, Mt2, g2, Qt2, Bt2, b3, D3, _3, gi, Ae2, L4, w2, bi, _i, Ds, Oi, Z3, Ti, Ie2, Jt2, Rt2, F4, jt2, Wr, Gr, Zr, Yr, Fe2, xi, Kr, Vr, A3, Xr, ot2, H4, te2, m2, Ni, j4, Di, Ci, ki, ie2, Ce2, Ut2, Ht2, Ai, Pt2, ht2, U4, nt2, Y3, zt2, Ii, J3, ee3, Fi, ke2, gt2, ve2, bt2, _t2, Me2, tt2, Wt2, qr2, Is, Fs, Cs, ks, vs, Qr, se2, K3, jr, M4, tn, Bs, en, Mi, Tt2, Gt2, Bi, re3, Be2, Pe2, ze2, Ue2, He2, We2, Ge2, Ze2, Ye2, Ps, rn, nn, zs, on, hn, Us, Hs, Ui, ne3, ln, zi, oe2, Ke2, C4, cn, xt2, Hi, fn, at2, dn, un, mn, lt2, pn, En, wn, Wi, Sn, Lt2, ct2, Rn, gn, bn, _n, f2, Ve2, Nt2, Tn, Vi, $i, xn, B3, Dt2, et2, Gi, Ws, V3, he2, ft2, Gs, p3, it2, dt2, Zi, At2, y3, $e2, Xe2, Yi, Zs, Ys, ae2, Ki, qe2, Yt2, ut2, Qe2, It2, Je2, je2, Ks, Ln, st2, mt2, An, Xi, In, Fn, Ft2, qi, kn, Vs, le2, ti, Qi, vn, Mn, Ji, $s, er2, Bn, Qs, Js, js, ts, tr2, ce2, ei, es, ii, is, ss, rs, ns, pt2, si, os4, ji, X3, fe2, ri, ni, Pn, oi, de2, mi, ir2, ai, ue2, W4, me2, Et2, Ct2, pe2, hi, G5, hs, li, sr2, cs, fs4, ci, fi, rr2, as, di, or2, ls, wt2, kt2, Wn, Gn, ar2, lr2, Zn, Yn, Kn, Vn, ur2, mr2, cr2, pr2, Er, wr2, $n, Xn, qn, fr2, ds, us, pi, Qn, ms, Jn, ps, we2, St2, to, Sr2, Es, yr2, eo, Rr2, ws, gr2, Vt2, br2, io, so, ro, Si, Or, Tr2, gs, xr, bs, P4, _s, Os, Ri, Lr, Nr, ye2, Dr, Ar, Ss, yt2, O4, yi, Ir, $t2, ys, Rs, Ts, Re2, ge2, be2, _e2, oo, Oe2, ho, ao, lo, Fr, Xt2, Se2, Te2, co, fo, uo, mo, po, Eo, wo, So, vt2, yo, Ro;
320641
+ var import_events2, import_fs13, import_node_events6, import_node_stream3, import_node_string_decoder2, import_node_path9, import_node_fs6, import_path29, import_events3, import_assert5, import_buffer, Ms, import_zlib3, import_node_path10, import_node_path11, import_fs14, import_fs15, import_path30, import_node_path12, import_path31, import_node_fs7, import_node_assert, import_node_crypto5, import_node_fs8, import_node_path13, import_fs16, import_node_fs9, import_node_path14, import_node_fs10, import_promises21, import_node_path15, import_node_path16, import_node_fs11, import_node_path17, Mr, Br, xs, zr, Ur, Hr, q3, Q3, rt2, Le2, qt2, Ne2, Ls, De2, Ns, z4, Mt2, g2, Qt2, Bt2, b3, D3, _3, gi, Ae2, L4, w2, bi, _i, Ds, Oi, Z3, Ti, Ie2, Jt2, Rt2, F4, jt2, Wr, Gr, Zr, Yr, Fe2, xi, Kr, Vr, A3, Xr, ot2, H4, te2, m2, Ni, j4, Di, Ci, ki, ie2, Ce2, Ut2, Ht2, Ai, Pt2, ht2, U4, nt2, Y3, zt2, Ii, J3, ee3, Fi, ke2, gt2, ve2, bt2, _t2, Me2, tt2, Wt2, qr2, Is, Fs, Cs, ks, vs, Qr, se2, K3, jr, M4, tn, Bs, en, Mi, Tt2, Gt2, Bi, re3, Be2, Pe2, ze2, Ue2, He2, We2, Ge2, Ze2, Ye2, Ps, rn, nn, zs, on, hn, Us, Hs, Ui, ne3, ln, zi, oe2, Ke2, C4, cn, xt2, Hi, fn, at2, dn, un, mn, lt2, pn, En, wn, Wi, Sn, Lt2, ct2, Rn, gn, bn, _n, f2, Ve2, Nt2, Tn, Vi, $i, xn, B3, Dt2, et2, Gi, Ws, V3, he2, ft2, Gs, p3, it2, dt2, Zi, At2, y3, $e2, Xe2, Yi, Zs, Ys, ae2, Ki, qe2, Yt2, ut2, Qe2, It2, Je2, je2, Ks, Ln, st2, mt2, An, Xi, In, Fn, Ft2, qi, kn, Vs, le2, ti, Qi, vn, Mn, Ji, $s, er2, Bn, Qs, Js, js, ts, tr2, ce2, ei, es, ii, is, ss, rs, ns, pt2, si, os4, ji, X3, fe2, ri, ni, Pn, oi, de2, mi, ir2, ai, ue2, W4, me2, Et2, Ct2, pe2, hi, G5, hs, li, sr2, cs, fs4, ci, fi, rr2, as, di, or2, ls, wt2, kt2, Wn, Gn, ar2, lr2, Zn, Yn, Kn, Vn, ur2, mr2, cr2, pr2, Er, wr2, $n, Xn, qn, fr2, ds, us, pi, Qn, ms, Jn, ps, we2, St2, to, Sr2, Es, yr2, eo, Rr2, ws, gr2, Vt2, br2, io, so, ro, Si, Or, Tr2, gs, xr, bs, P4, _s, Os, Ri, Lr, Nr, ye2, Dr, Ar, Ss, yt2, O4, yi, Ir, $t2, ys, Rs, Ts, Re2, ge2, be2, _e2, oo, Oe2, ho, ao, lo, Fr, Xt2, Se2, Te2, co, fo, uo, mo, po, Eo, wo, So, vt2, yo, Ro;
320592
320642
  var init_index_min2 = __esm({
320593
320643
  "../../../node_modules/.pnpm/tar@7.5.16/node_modules/tar/dist/esm/index.min.js"() {
320594
320644
  "use strict";
@@ -320599,7 +320649,7 @@ var init_index_min2 = __esm({
320599
320649
  import_node_string_decoder2 = require("string_decoder");
320600
320650
  import_node_path9 = __toESM(require("path"), 1);
320601
320651
  import_node_fs6 = __toESM(require("fs"), 1);
320602
- import_path28 = require("path");
320652
+ import_path29 = require("path");
320603
320653
  import_events3 = require("events");
320604
320654
  import_assert5 = __toESM(require("assert"), 1);
320605
320655
  import_buffer = require("buffer");
@@ -320609,9 +320659,9 @@ var init_index_min2 = __esm({
320609
320659
  import_node_path11 = require("path");
320610
320660
  import_fs14 = __toESM(require("fs"), 1);
320611
320661
  import_fs15 = __toESM(require("fs"), 1);
320612
- import_path29 = __toESM(require("path"), 1);
320613
- import_node_path12 = require("path");
320614
320662
  import_path30 = __toESM(require("path"), 1);
320663
+ import_node_path12 = require("path");
320664
+ import_path31 = __toESM(require("path"), 1);
320615
320665
  import_node_fs7 = __toESM(require("fs"), 1);
320616
320666
  import_node_assert = __toESM(require("assert"), 1);
320617
320667
  import_node_crypto5 = require("crypto");
@@ -321931,11 +321981,11 @@ var init_index_min2 = __esm({
321931
321981
  };
321932
321982
  Xi = (s5, t3) => {
321933
321983
  let e2 = new Map(t3.map((n2) => [mt2(n2), true])), i5 = s5.filter, r4 = (n2, o3 = "") => {
321934
- let a3 = o3 || (0, import_path28.parse)(n2).root || ".", h4;
321984
+ let a3 = o3 || (0, import_path29.parse)(n2).root || ".", h4;
321935
321985
  if (n2 === a3) h4 = false;
321936
321986
  else {
321937
321987
  let l2 = e2.get(n2);
321938
- h4 = l2 !== void 0 ? l2 : r4((0, import_path28.dirname)(n2), a3);
321988
+ h4 = l2 !== void 0 ? l2 : r4((0, import_path29.dirname)(n2), a3);
321939
321989
  }
321940
321990
  return e2.set(n2, h4), h4;
321941
321991
  };
@@ -322055,7 +322105,7 @@ var init_index_min2 = __esm({
322055
322105
  let [o3, a3] = le2(this.path);
322056
322106
  o3 && typeof a3 == "string" && (this.path = a3, r4 = o3);
322057
322107
  }
322058
- this.win32 = !!i5.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t3 = t3.replaceAll(/\\/g, "/")), this.absolute = f2(i5.absolute || import_path29.default.resolve(this.cwd, t3)), this.path === "" && (this.path = "./"), r4 && this.warn("TAR_ENTRY_INFO", `stripping ${r4} from absolute path`, { entry: this, path: r4 + this.path });
322108
+ this.win32 = !!i5.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t3 = t3.replaceAll(/\\/g, "/")), this.absolute = f2(i5.absolute || import_path30.default.resolve(this.cwd, t3)), this.path === "" && (this.path = "./"), r4 && this.warn("TAR_ENTRY_INFO", `stripping ${r4} from absolute path`, { entry: this, path: r4 + this.path });
322059
322109
  let n2 = this.statCache.get(this.absolute);
322060
322110
  n2 ? this[ii](n2) : this[es]();
322061
322111
  }
@@ -322114,7 +322164,7 @@ var init_index_min2 = __esm({
322114
322164
  }
322115
322165
  [tr2](t3) {
322116
322166
  if (!this.stat) throw new Error("cannot create link entry without stat");
322117
- this.type = "Link", this.linkpath = f2(import_path29.default.relative(this.cwd, t3)), this.stat.size = 0, this[ce2](), this.end();
322167
+ this.type = "Link", this.linkpath = f2(import_path30.default.relative(this.cwd, t3)), this.stat.size = 0, this[ce2](), this.end();
322118
322168
  }
322119
322169
  [Js]() {
322120
322170
  if (!this.stat) throw new Error("cannot create file entry without stat");
@@ -322518,7 +322568,7 @@ var init_index_min2 = __esm({
322518
322568
  return typeof t3 == "string" ? this[li](t3) : this[sr2](t3), this.flowing;
322519
322569
  }
322520
322570
  [sr2](t3) {
322521
- let e2 = f2(import_path30.default.resolve(this.cwd, t3.path));
322571
+ let e2 = f2(import_path31.default.resolve(this.cwd, t3.path));
322522
322572
  if (!this.filter(t3.path, t3)) t3.resume();
322523
322573
  else {
322524
322574
  let i5 = new mi(t3.path, e2);
@@ -322527,7 +322577,7 @@ var init_index_min2 = __esm({
322527
322577
  this[Ct2]();
322528
322578
  }
322529
322579
  [li](t3) {
322530
- let e2 = f2(import_path30.default.resolve(this.cwd, t3));
322580
+ let e2 = f2(import_path31.default.resolve(this.cwd, t3));
322531
322581
  this[W4].push(new mi(t3, e2)), this[Ct2]();
322532
322582
  }
322533
322583
  [cs](t3) {
@@ -323682,8 +323732,8 @@ async function downloadDependency({ s3PreSignedReadUrl, absolutePathToLocalOutpu
323682
323732
  const request7 = await axios_default.get(s3PreSignedReadUrl, {
323683
323733
  responseType: "stream"
323684
323734
  });
323685
- const tmpDir = await import_tmp_promise4.default.dir();
323686
- const outputTarPath = import_path31.default.join(tmpDir.path, "api.tgz");
323735
+ const tmpDir = await import_tmp_promise5.default.dir();
323736
+ const outputTarPath = import_path32.default.join(tmpDir.path, "api.tgz");
323687
323737
  await (0, import_promises23.pipeline)(request7.data, (0, import_fs17.createWriteStream)(outputTarPath));
323688
323738
  await uo({ file: outputTarPath, cwd: absolutePathToLocalOutput });
323689
323739
  }
@@ -323697,7 +323747,7 @@ function stringifyDependency(dependency) {
323697
323747
  assertNever(dependency);
323698
323748
  }
323699
323749
  }
323700
- var import_fs17, import_promises22, import_os, import_path31, import_promises23, import_tmp_promise4, FIDDLE, DEPENDENCIES_FOLDER_NAME, METADATA_RESPONSE_FILENAME, LOCAL_STORAGE_FOLDER;
323750
+ var import_fs17, import_promises22, import_os, import_path32, import_promises23, import_tmp_promise5, FIDDLE, DEPENDENCIES_FOLDER_NAME, METADATA_RESPONSE_FILENAME, LOCAL_STORAGE_FOLDER;
323701
323751
  var init_loadDependency = __esm({
323702
323752
  "../workspace/lazy-fern-workspace/lib/utils/loadDependency.js"() {
323703
323753
  "use strict";
@@ -323712,10 +323762,10 @@ var init_loadDependency = __esm({
323712
323762
  import_fs17 = require("fs");
323713
323763
  import_promises22 = require("fs/promises");
323714
323764
  import_os = require("os");
323715
- import_path31 = __toESM(require("path"), 1);
323765
+ import_path32 = __toESM(require("path"), 1);
323716
323766
  import_promises23 = require("stream/promises");
323717
323767
  init_index_min2();
323718
- import_tmp_promise4 = __toESM(require_tmp_promise(), 1);
323768
+ import_tmp_promise5 = __toESM(require_tmp_promise(), 1);
323719
323769
  init_Result();
323720
323770
  FIDDLE = createFiddleService();
323721
323771
  DEPENDENCIES_FOLDER_NAME = "dependencies";
@@ -335317,7 +335367,7 @@ function validateStructureOfYamlFiles({ files, absolutePathToDefinition, skipVal
335317
335367
  addFailure(result);
335318
335368
  }
335319
335369
  }
335320
- } else if (import_path32.default.basename(relativeFilepath) === FERN_PACKAGE_MARKER_FILENAME) {
335370
+ } else if (import_path33.default.basename(relativeFilepath) === FERN_PACKAGE_MARKER_FILENAME) {
335321
335371
  const cached2 = packageMarkerParsedCache.get(file4.rawContents);
335322
335372
  if (cached2 != null && (cached2.validated || skipValidation)) {
335323
335373
  packageMarkers[relativeFilepath] = {
@@ -335407,7 +335457,7 @@ function validateStructureOfYamlFiles({ files, absolutePathToDefinition, skipVal
335407
335457
  };
335408
335458
  }
335409
335459
  }
335410
- var import_path32, rootApiParsedCache, definitionParsedCache, packageMarkerParsedCache;
335460
+ var import_path33, rootApiParsedCache, definitionParsedCache, packageMarkerParsedCache;
335411
335461
  var init_validateStructureOfYamlFiles = __esm({
335412
335462
  "../workspace/lazy-fern-workspace/lib/utils/validateStructureOfYamlFiles.js"() {
335413
335463
  "use strict";
@@ -335415,7 +335465,7 @@ var init_validateStructureOfYamlFiles = __esm({
335415
335465
  init_lib4();
335416
335466
  init_lib10();
335417
335467
  init_lib8();
335418
- import_path32 = __toESM(require("path"), 1);
335468
+ import_path33 = __toESM(require("path"), 1);
335419
335469
  init_api_yml_schema();
335420
335470
  init_fern_schema();
335421
335471
  init_package_yml_schema();
@@ -345532,7 +345582,7 @@ function parseExternalRef(ref2, baseDir) {
345532
345582
  const hashIndex = ref2.indexOf("#");
345533
345583
  const filePath = hashIndex >= 0 ? ref2.slice(0, hashIndex) : ref2;
345534
345584
  const jsonPointer = hashIndex >= 0 ? ref2.slice(hashIndex + 1) : "";
345535
- const absolutePath = (0, import_path33.resolve)(baseDir, filePath);
345585
+ const absolutePath = (0, import_path34.resolve)(baseDir, filePath);
345536
345586
  return { filePath, jsonPointer, absolutePath };
345537
345587
  }
345538
345588
  function isExternalRefValue(value2) {
@@ -345622,7 +345672,7 @@ async function resolveExternalRefs(obj, baseDir, mainFileAbsPath, registry2, app
345622
345672
  newVisited.add(cacheKey);
345623
345673
  const fileContent = await readAndParseFile(sourceFileAbsPath, fileCache);
345624
345674
  const parsed = navigateJsonPointer(fileContent, pointer2, sourceFileAbsPath);
345625
- const refDir = (0, import_path33.dirname)(sourceFileAbsPath);
345675
+ const refDir = (0, import_path34.dirname)(sourceFileAbsPath);
345626
345676
  const resolved = await resolveExternalRefs(parsed, refDir, mainFileAbsPath, registry2, true, newVisited, fileCache, sourceFileAbsPath);
345627
345677
  return mergeWithSiblings(resolved, siblingProperties, hasSiblings);
345628
345678
  }
@@ -345646,7 +345696,7 @@ async function resolveExternalRefs(obj, baseDir, mainFileAbsPath, registry2, app
345646
345696
  newVisited.add(cacheKey);
345647
345697
  const fileContent = await readAndParseFile(absoluteRefPath, fileCache);
345648
345698
  const parsed = navigateJsonPointer(fileContent, jsonPointer, absoluteRefPath);
345649
- const refDir = (0, import_path33.dirname)(absoluteRefPath);
345699
+ const refDir = (0, import_path34.dirname)(absoluteRefPath);
345650
345700
  const resolved = await resolveExternalRefs(parsed, refDir, mainFileAbsPath, registry2, true, newVisited, fileCache, absoluteRefPath);
345651
345701
  return mergeWithSiblings(resolved, siblingProperties, hasSiblings);
345652
345702
  }
@@ -345656,14 +345706,14 @@ async function resolveExternalRefs(obj, baseDir, mainFileAbsPath, registry2, app
345656
345706
  }
345657
345707
  return result;
345658
345708
  }
345659
- var import_promises25, import_path33;
345709
+ var import_promises25, import_path34;
345660
345710
  var init_resolveExternalRefs = __esm({
345661
345711
  "../workspace/lazy-fern-workspace/lib/utils/resolveExternalRefs.js"() {
345662
345712
  "use strict";
345663
345713
  init_lib6();
345664
345714
  import_promises25 = require("fs/promises");
345665
345715
  init_js_yaml();
345666
- import_path33 = require("path");
345716
+ import_path34 = require("path");
345667
345717
  }
345668
345718
  });
345669
345719
 
@@ -345671,7 +345721,7 @@ var init_resolveExternalRefs = __esm({
345671
345721
  async function loadAsyncAPI({ context: context3, absoluteFilePath, absoluteFilePathToOverrides }) {
345672
345722
  const contents = (await (0, import_promises26.readFile)(absoluteFilePath)).toString();
345673
345723
  const parsed = await index_vite_proxy_tmp_default.load(contents);
345674
- const baseDir = (0, import_path34.dirname)(absoluteFilePath);
345724
+ const baseDir = (0, import_path35.dirname)(absoluteFilePath);
345675
345725
  const registry2 = buildExternalRefRegistry(parsed, baseDir);
345676
345726
  const bundled = await resolveExternalRefs(parsed, baseDir, absoluteFilePath, registry2);
345677
345727
  let overridesFilepaths = [];
@@ -345692,13 +345742,13 @@ async function loadAsyncAPI({ context: context3, absoluteFilePath, absoluteFileP
345692
345742
  }
345693
345743
  return result;
345694
345744
  }
345695
- var import_promises26, import_path34;
345745
+ var import_promises26, import_path35;
345696
345746
  var init_loadAsyncAPI = __esm({
345697
345747
  "../workspace/lazy-fern-workspace/lib/utils/loadAsyncAPI.js"() {
345698
345748
  "use strict";
345699
345749
  import_promises26 = require("fs/promises");
345700
345750
  init_js_yaml();
345701
- import_path34 = require("path");
345751
+ import_path35 = require("path");
345702
345752
  init_mergeWithOverrides2();
345703
345753
  init_resolveExternalRefs();
345704
345754
  }
@@ -345707,7 +345757,7 @@ var init_loadAsyncAPI = __esm({
345707
345757
  // ../workspace/lazy-fern-workspace/lib/loaders/applyOverlays.js
345708
345758
  async function getTempDir() {
345709
345759
  if (tempDir === void 0) {
345710
- const dir = await import_tmp_promise5.default.dir({ prefix: "fern-overlay-" });
345760
+ const dir = await import_tmp_promise6.default.dir({ prefix: "fern-overlay-" });
345711
345761
  tempDir = dir.path;
345712
345762
  }
345713
345763
  return tempDir;
@@ -345723,9 +345773,9 @@ async function applyOverlays({ absoluteFilePathToOverlay, absoluteFilePathToOpen
345723
345773
  overlay
345724
345774
  });
345725
345775
  const dir = await getTempDir();
345726
- const originalFileName = import_path35.default.basename(absoluteFilePathToOpenAPI);
345727
- const outputFileName = `${import_path35.default.parse(originalFileName).name}.overlaid.json`;
345728
- const outputPath = import_path35.default.join(dir, outputFileName);
345776
+ const originalFileName = import_path36.default.basename(absoluteFilePathToOpenAPI);
345777
+ const outputFileName = `${import_path36.default.parse(originalFileName).name}.overlaid.json`;
345778
+ const outputPath = import_path36.default.join(dir, outputFileName);
345729
345779
  await (0, import_promises27.writeFile)(outputPath, JSON.stringify(result, null, 2), "utf8");
345730
345780
  context3.logger.debug(`Wrote overlaid OpenAPI spec to: ${outputPath}`);
345731
345781
  return result;
@@ -345788,7 +345838,7 @@ function validateOverlay(overlay, context3) {
345788
345838
  function isRecord(value2) {
345789
345839
  return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
345790
345840
  }
345791
- var import_promises27, import_path35, import_tmp_promise5, tempDir;
345841
+ var import_promises27, import_path36, import_tmp_promise6, tempDir;
345792
345842
  var init_applyOverlays = __esm({
345793
345843
  "../workspace/lazy-fern-workspace/lib/loaders/applyOverlays.js"() {
345794
345844
  "use strict";
@@ -345796,19 +345846,19 @@ var init_applyOverlays = __esm({
345796
345846
  init_lib6();
345797
345847
  import_promises27 = require("fs/promises");
345798
345848
  init_js_yaml();
345799
- import_path35 = __toESM(require("path"), 1);
345800
- import_tmp_promise5 = __toESM(require_tmp_promise(), 1);
345849
+ import_path36 = __toESM(require("path"), 1);
345850
+ import_tmp_promise6 = __toESM(require_tmp_promise(), 1);
345801
345851
  }
345802
345852
  });
345803
345853
 
345804
345854
  // ../workspace/lazy-fern-workspace/lib/loaders/OpenAPIRefResolver.js
345805
- var import_openapi_core2, import_path36, OpenAPIRefResolver;
345855
+ var import_openapi_core2, import_path37, OpenAPIRefResolver;
345806
345856
  var init_OpenAPIRefResolver = __esm({
345807
345857
  "../workspace/lazy-fern-workspace/lib/loaders/OpenAPIRefResolver.js"() {
345808
345858
  "use strict";
345809
345859
  init_lib8();
345810
345860
  import_openapi_core2 = __toESM(require_lib2(), 1);
345811
- import_path36 = __toESM(require("path"), 1);
345861
+ import_path37 = __toESM(require("path"), 1);
345812
345862
  OpenAPIRefResolver = class extends import_openapi_core2.BaseResolver {
345813
345863
  absolutePathToOpenAPIOverrides;
345814
345864
  absolutePathToOpenAPIOverlays;
@@ -345826,13 +345876,13 @@ var init_OpenAPIRefResolver = __esm({
345826
345876
  return result;
345827
345877
  }
345828
345878
  if (this.absolutePathToOpenAPIOverlays != null) {
345829
- const overlayResolved = import_path36.default.resolve(import_path36.default.dirname(this.absolutePathToOpenAPIOverlays), ref2);
345879
+ const overlayResolved = import_path37.default.resolve(import_path37.default.dirname(this.absolutePathToOpenAPIOverlays), ref2);
345830
345880
  if (doesPathExistSync(AbsoluteFilePath2.of(overlayResolved))) {
345831
345881
  return overlayResolved;
345832
345882
  }
345833
345883
  }
345834
345884
  if (this.absolutePathToOpenAPIOverrides != null) {
345835
- return import_path36.default.resolve(import_path36.default.dirname(this.absolutePathToOpenAPIOverrides), ref2);
345885
+ return import_path37.default.resolve(import_path37.default.dirname(this.absolutePathToOpenAPIOverrides), ref2);
345836
345886
  }
345837
345887
  return result;
345838
345888
  }
@@ -346124,7 +346174,7 @@ function describeRef(value2) {
346124
346174
  return `target="${ref2}"${siblingSuffix}`;
346125
346175
  }
346126
346176
  async function readMarkdownRef(ref2, baseDir, context3, path122) {
346127
- const absolutePath = (0, import_path37.resolve)(baseDir, ref2);
346177
+ const absolutePath = (0, import_path38.resolve)(baseDir, ref2);
346128
346178
  try {
346129
346179
  const contents = await (0, import_promises29.readFile)(absolutePath, "utf-8");
346130
346180
  return contents.trimEnd();
@@ -346133,13 +346183,13 @@ async function readMarkdownRef(ref2, baseDir, context3, path122) {
346133
346183
  return "";
346134
346184
  }
346135
346185
  }
346136
- var import_promises29, import_path37, SKIP_METADATA_PARENTS;
346186
+ var import_promises29, import_path38, SKIP_METADATA_PARENTS;
346137
346187
  var init_resolveDescriptionMarkdownRefs = __esm({
346138
346188
  "../workspace/lazy-fern-workspace/lib/utils/resolveDescriptionMarkdownRefs.js"() {
346139
346189
  "use strict";
346140
346190
  init_lib4();
346141
346191
  import_promises29 = require("fs/promises");
346142
- import_path37 = require("path");
346192
+ import_path38 = require("path");
346143
346193
  SKIP_METADATA_PARENTS = /* @__PURE__ */ new Set(["properties", "patternProperties"]);
346144
346194
  }
346145
346195
  });
@@ -356898,7 +356948,7 @@ function maybeResolveSourceReference(source2, baseDir) {
356898
356948
  return source2;
356899
356949
  }
356900
356950
  if (isCodeReference2(source2)) {
356901
- const resolvedPath = (0, import_path38.resolve)(baseDir ?? process.cwd(), source2.$ref);
356951
+ const resolvedPath = (0, import_path39.resolve)(baseDir ?? process.cwd(), source2.$ref);
356902
356952
  if ((0, import_fs18.existsSync)(resolvedPath)) {
356903
356953
  try {
356904
356954
  const fileContent = (0, import_fs18.readFileSync)(resolvedPath, "utf-8");
@@ -356910,14 +356960,14 @@ function maybeResolveSourceReference(source2, baseDir) {
356910
356960
  }
356911
356961
  return void 0;
356912
356962
  }
356913
- var import_fs18, import_path38, RedoclyCodeSamplesExtension;
356963
+ var import_fs18, import_path39, RedoclyCodeSamplesExtension;
356914
356964
  var init_x_code_samples = __esm({
356915
356965
  "../api-importers/openapi-to-ir/lib/extensions/x-code-samples.js"() {
356916
356966
  "use strict";
356917
356967
  init_lib4();
356918
356968
  init_lib30();
356919
356969
  import_fs18 = require("fs");
356920
- import_path38 = require("path");
356970
+ import_path39 = require("path");
356921
356971
  RedoclyCodeSamplesExtension = class extends AbstractExtension {
356922
356972
  operation;
356923
356973
  baseDir;
@@ -356986,7 +357036,7 @@ function maybeResolveCodeReference2(code5, baseDir) {
356986
357036
  return code5;
356987
357037
  }
356988
357038
  if (isCodeReference3(code5)) {
356989
- const resolvedPath = (0, import_path39.resolve)(baseDir ?? process.cwd(), code5.$ref);
357039
+ const resolvedPath = (0, import_path40.resolve)(baseDir ?? process.cwd(), code5.$ref);
356990
357040
  if ((0, import_fs19.existsSync)(resolvedPath)) {
356991
357041
  try {
356992
357042
  const fileContent = (0, import_fs19.readFileSync)(resolvedPath, "utf-8");
@@ -357018,7 +357068,7 @@ function resolveCodeSamples2(codeSamples, baseDir) {
357018
357068
  }
357019
357069
  return resolved;
357020
357070
  }
357021
- var import_fs19, import_path39, FernExamplesExtension2;
357071
+ var import_fs19, import_path40, FernExamplesExtension2;
357022
357072
  var init_x_fern_examples2 = __esm({
357023
357073
  "../api-importers/openapi-to-ir/lib/extensions/x-fern-examples.js"() {
357024
357074
  "use strict";
@@ -357026,7 +357076,7 @@ var init_x_fern_examples2 = __esm({
357026
357076
  init_lib10();
357027
357077
  init_lib30();
357028
357078
  import_fs19 = require("fs");
357029
- import_path39 = require("path");
357079
+ import_path40 = require("path");
357030
357080
  FernExamplesExtension2 = class extends AbstractExtension {
357031
357081
  operation;
357032
357082
  baseDir;
@@ -360639,7 +360689,7 @@ function getPlatformInfo() {
360639
360689
  }
360640
360690
  function getCacheDir() {
360641
360691
  const homeDir = import_os2.default.homedir();
360642
- return AbsoluteFilePath2.of(import_path40.default.join(homeDir, CACHE_DIR_NAME, BIN_DIR_NAME));
360692
+ return AbsoluteFilePath2.of(import_path41.default.join(homeDir, CACHE_DIR_NAME, BIN_DIR_NAME));
360643
360693
  }
360644
360694
  function getVersionedBinaryPath() {
360645
360695
  const { extension: extension4 } = getPlatformInfo();
@@ -360657,7 +360707,7 @@ function getVersionMarkerPath() {
360657
360707
  }
360658
360708
  function getLockDirPath() {
360659
360709
  const cacheDir = getCacheDir();
360660
- return import_path40.default.join(cacheDir, `${BINARY_NAME}.lock`);
360710
+ return import_path41.default.join(cacheDir, `${BINARY_NAME}.lock`);
360661
360711
  }
360662
360712
  function getDownloadUrl() {
360663
360713
  const { os: osName, arch: arch4, extension: extension4 } = getPlatformInfo();
@@ -360790,7 +360840,7 @@ async function atomicCopyBinary(src, dest) {
360790
360840
  await (0, import_promises34.chmod)(tmpDest, 493);
360791
360841
  await (0, import_promises34.rename)(tmpDest, dest);
360792
360842
  }
360793
- var import_promises34, import_os2, import_path40, BUF_VERSION, GITHUB_RELEASE_URL_BASE, BINARY_NAME, CACHE_DIR_NAME, BIN_DIR_NAME, LOCK_TIMEOUT_MS, LOCK_RETRY_INTERVAL_MS;
360843
+ var import_promises34, import_os2, import_path41, BUF_VERSION, GITHUB_RELEASE_URL_BASE, BINARY_NAME, CACHE_DIR_NAME, BIN_DIR_NAME, LOCK_TIMEOUT_MS, LOCK_RETRY_INTERVAL_MS;
360794
360844
  var init_BufDownloader = __esm({
360795
360845
  "../workspace/lazy-fern-workspace/lib/protobuf/BufDownloader.js"() {
360796
360846
  "use strict";
@@ -360798,7 +360848,7 @@ var init_BufDownloader = __esm({
360798
360848
  init_lib6();
360799
360849
  import_promises34 = require("fs/promises");
360800
360850
  import_os2 = __toESM(require("os"), 1);
360801
- import_path40 = __toESM(require("path"), 1);
360851
+ import_path41 = __toESM(require("path"), 1);
360802
360852
  BUF_VERSION = "v1.50.0";
360803
360853
  GITHUB_RELEASE_URL_BASE = "https://github.com/bufbuild/buf/releases/download";
360804
360854
  BINARY_NAME = "buf";
@@ -360868,7 +360918,7 @@ async function detectAirGappedModeForProtobuf(absoluteFilepathToProtobufRoot, lo
360868
360918
  if (!bufLockExists) {
360869
360919
  return false;
360870
360920
  }
360871
- const tmpDir = AbsoluteFilePath2.of((await import_tmp_promise6.default.dir()).path);
360921
+ const tmpDir = AbsoluteFilePath2.of((await import_tmp_promise7.default.dir()).path);
360872
360922
  try {
360873
360923
  const bufYamlPath = join8(absoluteFilepathToProtobufRoot, RelativeFilePath2.of("buf.yaml"));
360874
360924
  try {
@@ -360929,7 +360979,7 @@ async function ensureBufCommand(logger4) {
360929
360979
  });
360930
360980
  }
360931
360981
  }
360932
- var import_promises35, import_tmp_promise6, airGapDetectionResult, airGapDetectionPromise, PROTOBUF_GENERATOR_CONFIG_FILENAME, PROTOBUF_GENERATOR_OUTPUT_PATH, PROTOBUF_GENERATOR_OUTPUT_FILEPATH, PROTOBUF_SHELL_PROXY_FILENAME, PROTOBUF_EXPORT_CONFIG_V1, PROTOBUF_EXPORT_CONFIG_V2, getProtobufYamlV1, PROTOBUF_GEN_CONFIG, PROTOBUF_MODULE_PACKAGE_JSON, PROTOBUF_SHELL_PROXY;
360982
+ var import_promises35, import_tmp_promise7, airGapDetectionResult, airGapDetectionPromise, PROTOBUF_GENERATOR_CONFIG_FILENAME, PROTOBUF_GENERATOR_OUTPUT_PATH, PROTOBUF_GENERATOR_OUTPUT_FILEPATH, PROTOBUF_SHELL_PROXY_FILENAME, PROTOBUF_EXPORT_CONFIG_V1, PROTOBUF_EXPORT_CONFIG_V2, getProtobufYamlV1, PROTOBUF_GEN_CONFIG, PROTOBUF_MODULE_PACKAGE_JSON, PROTOBUF_SHELL_PROXY;
360933
360983
  var init_utils14 = __esm({
360934
360984
  "../workspace/lazy-fern-workspace/lib/protobuf/utils.js"() {
360935
360985
  "use strict";
@@ -360938,7 +360988,7 @@ var init_utils14 = __esm({
360938
360988
  init_lib18();
360939
360989
  init_lib6();
360940
360990
  import_promises35 = require("fs/promises");
360941
- import_tmp_promise6 = __toESM(require_tmp_promise(), 1);
360991
+ import_tmp_promise7 = __toESM(require_tmp_promise(), 1);
360942
360992
  init_BufDownloader();
360943
360993
  PROTOBUF_GENERATOR_CONFIG_FILENAME = "buf.gen.yaml";
360944
360994
  PROTOBUF_GENERATOR_OUTPUT_PATH = "output";
@@ -361022,7 +361072,7 @@ async function ensureFernGloballyInstalled(cwd2, logger4) {
361022
361072
  })();
361023
361073
  return fernGlobalInstallPromise;
361024
361074
  }
361025
- var import_promises36, import_path41, import_tmp_promise7, fernGlobalInstallPromise, ProtobufIRGenerator;
361075
+ var import_promises36, import_path42, import_tmp_promise8, fernGlobalInstallPromise, ProtobufIRGenerator;
361026
361076
  var init_ProtobufIRGenerator = __esm({
361027
361077
  "../workspace/lazy-fern-workspace/lib/protobuf/ProtobufIRGenerator.js"() {
361028
361078
  "use strict";
@@ -361030,8 +361080,8 @@ var init_ProtobufIRGenerator = __esm({
361030
361080
  init_lib18();
361031
361081
  init_lib6();
361032
361082
  import_promises36 = require("fs/promises");
361033
- import_path41 = __toESM(require("path"), 1);
361034
- import_tmp_promise7 = __toESM(require_tmp_promise(), 1);
361083
+ import_path42 = __toESM(require("path"), 1);
361084
+ import_tmp_promise8 = __toESM(require_tmp_promise(), 1);
361035
361085
  init_utils14();
361036
361086
  ProtobufIRGenerator = class {
361037
361087
  context;
@@ -361065,7 +361115,7 @@ var init_ProtobufIRGenerator = __esm({
361065
361115
  });
361066
361116
  }
361067
361117
  async setupProtobufGeneratorConfig({ absoluteFilepathToProtobufRoot, absoluteFilepathToProtobufTarget }) {
361068
- const protobufGeneratorConfigPath = AbsoluteFilePath2.of((await import_tmp_promise7.default.dir()).path);
361118
+ const protobufGeneratorConfigPath = AbsoluteFilePath2.of((await import_tmp_promise8.default.dir()).path);
361069
361119
  if (absoluteFilepathToProtobufTarget !== void 0) {
361070
361120
  await this.exportProtobufFilesForTarget({
361071
361121
  protobufGeneratorConfigPath,
@@ -361095,7 +361145,7 @@ var init_ProtobufIRGenerator = __esm({
361095
361145
  const bufCommand = this.resolvedBufCommand ?? "buf";
361096
361146
  for (const version7 of ["v1", "v2"]) {
361097
361147
  this.context.logger.info(`Using buf export with version: ${version7}`);
361098
- const tmpBufConfigFile = await import_tmp_promise7.default.file({ postfix: ".yaml" });
361148
+ const tmpBufConfigFile = await import_tmp_promise8.default.file({ postfix: ".yaml" });
361099
361149
  const configContent = version7 === "v1" ? PROTOBUF_EXPORT_CONFIG_V1 : PROTOBUF_EXPORT_CONFIG_V2;
361100
361150
  await (0, import_promises36.writeFile)(tmpBufConfigFile.path, configContent, "utf8");
361101
361151
  try {
@@ -361129,7 +361179,7 @@ var init_ProtobufIRGenerator = __esm({
361129
361179
  await (0, import_promises36.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, {
361130
361180
  recursive: true,
361131
361181
  filter: (src) => {
361132
- const basename8 = import_path41.default.basename(src);
361182
+ const basename8 = import_path42.default.basename(src);
361133
361183
  return basename8 !== "buf.yaml" && !(basename8.startsWith("buf.gen.") && basename8.endsWith(".yaml"));
361134
361184
  }
361135
361185
  });
@@ -361243,7 +361293,7 @@ function getPlatformInfo2() {
361243
361293
  }
361244
361294
  function getCacheDir2() {
361245
361295
  const homeDir = import_os3.default.homedir();
361246
- return AbsoluteFilePath2.of(import_path42.default.join(homeDir, CACHE_DIR_NAME2, BIN_DIR_NAME2));
361296
+ return AbsoluteFilePath2.of(import_path43.default.join(homeDir, CACHE_DIR_NAME2, BIN_DIR_NAME2));
361247
361297
  }
361248
361298
  function getVersionedBinaryPath2() {
361249
361299
  const { extension: extension4 } = getPlatformInfo2();
@@ -361261,7 +361311,7 @@ function getVersionMarkerPath2() {
361261
361311
  }
361262
361312
  function getLockDirPath2() {
361263
361313
  const cacheDir = getCacheDir2();
361264
- return import_path42.default.join(cacheDir, `${BINARY_NAME2}.lock`);
361314
+ return import_path43.default.join(cacheDir, `${BINARY_NAME2}.lock`);
361265
361315
  }
361266
361316
  function getDownloadUrl2() {
361267
361317
  const { os: osName, arch: arch4, extension: extension4 } = getPlatformInfo2();
@@ -361394,7 +361444,7 @@ async function atomicCopyBinary2(src, dest) {
361394
361444
  await (0, import_promises37.chmod)(tmpDest, 493);
361395
361445
  await (0, import_promises37.rename)(tmpDest, dest);
361396
361446
  }
361397
- var import_promises37, import_os3, import_path42, PROTOC_GEN_OPENAPI_VERSION, GITHUB_RELEASE_URL_BASE2, BINARY_NAME2, CACHE_DIR_NAME2, BIN_DIR_NAME2, LOCK_TIMEOUT_MS2, LOCK_RETRY_INTERVAL_MS2;
361447
+ var import_promises37, import_os3, import_path43, PROTOC_GEN_OPENAPI_VERSION, GITHUB_RELEASE_URL_BASE2, BINARY_NAME2, CACHE_DIR_NAME2, BIN_DIR_NAME2, LOCK_TIMEOUT_MS2, LOCK_RETRY_INTERVAL_MS2;
361398
361448
  var init_ProtocGenOpenAPIDownloader = __esm({
361399
361449
  "../workspace/lazy-fern-workspace/lib/protobuf/ProtocGenOpenAPIDownloader.js"() {
361400
361450
  "use strict";
@@ -361402,7 +361452,7 @@ var init_ProtocGenOpenAPIDownloader = __esm({
361402
361452
  init_lib6();
361403
361453
  import_promises37 = require("fs/promises");
361404
361454
  import_os3 = __toESM(require("os"), 1);
361405
- import_path42 = __toESM(require("path"), 1);
361455
+ import_path43 = __toESM(require("path"), 1);
361406
361456
  PROTOC_GEN_OPENAPI_VERSION = "v0.1.13";
361407
361457
  GITHUB_RELEASE_URL_BASE2 = "https://github.com/fern-api/protoc-gen-openapi/releases/download";
361408
361458
  BINARY_NAME2 = "protoc-gen-openapi";
@@ -361429,7 +361479,7 @@ plugins:
361429
361479
  - source_root=${relativeFilepathToProtobufRoot}
361430
361480
  `;
361431
361481
  }
361432
- var import_promises38, import_path43, import_tmp_promise8, PROTOBUF_GENERATOR_CONFIG_FILENAME2, PROTOBUF_GENERATOR_OUTPUT_PATH2, PROTOBUF_GENERATOR_OUTPUT_FILEPATH2, ProtobufOpenAPIGenerator;
361482
+ var import_promises38, import_path44, import_tmp_promise9, PROTOBUF_GENERATOR_CONFIG_FILENAME2, PROTOBUF_GENERATOR_OUTPUT_PATH2, PROTOBUF_GENERATOR_OUTPUT_FILEPATH2, ProtobufOpenAPIGenerator;
361433
361483
  var init_ProtobufOpenAPIGenerator = __esm({
361434
361484
  "../workspace/lazy-fern-workspace/lib/protobuf/ProtobufOpenAPIGenerator.js"() {
361435
361485
  "use strict";
@@ -361437,8 +361487,8 @@ var init_ProtobufOpenAPIGenerator = __esm({
361437
361487
  init_lib18();
361438
361488
  init_lib6();
361439
361489
  import_promises38 = require("fs/promises");
361440
- import_path43 = __toESM(require("path"), 1);
361441
- import_tmp_promise8 = __toESM(require_tmp_promise(), 1);
361490
+ import_path44 = __toESM(require("path"), 1);
361491
+ import_tmp_promise9 = __toESM(require_tmp_promise(), 1);
361442
361492
  init_ProtocGenOpenAPIDownloader();
361443
361493
  init_utils14();
361444
361494
  PROTOBUF_GENERATOR_CONFIG_FILENAME2 = "buf.gen.yaml";
@@ -361482,10 +361532,10 @@ var init_ProtobufOpenAPIGenerator = __esm({
361482
361532
  if (deps.length > 0 && this.isAirGapped === void 0) {
361483
361533
  this.isAirGapped = await detectAirGappedModeForProtobuf(absoluteFilepathToProtobufRoot, this.context.logger, this.resolvedBufCommand);
361484
361534
  }
361485
- const cwd2 = AbsoluteFilePath2.of((await import_tmp_promise8.default.dir()).path);
361535
+ const cwd2 = AbsoluteFilePath2.of((await import_tmp_promise9.default.dir()).path);
361486
361536
  await (0, import_promises38.cp)(absoluteFilepathToProtobufRoot, cwd2, { recursive: true });
361487
361537
  await (0, import_promises38.writeFile)(join8(cwd2, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME2)), getProtobufGeneratorConfig({ relativeFilepathToProtobufRoot }));
361488
- const envOverride = this.protocGenOpenAPIBinDir != null ? { PATH: `${this.protocGenOpenAPIBinDir}${import_path43.default.delimiter}${process.env.PATH ?? ""}` } : void 0;
361538
+ const envOverride = this.protocGenOpenAPIBinDir != null ? { PATH: `${this.protocGenOpenAPIBinDir}${import_path44.default.delimiter}${process.env.PATH ?? ""}` } : void 0;
361489
361539
  const bufYamlPath = join8(cwd2, RelativeFilePath2.of("buf.yaml"));
361490
361540
  const bufLockPath = join8(cwd2, RelativeFilePath2.of("buf.lock"));
361491
361541
  await (0, import_promises38.writeFile)(bufYamlPath, getProtobufYamlV1(deps));
@@ -361544,7 +361594,7 @@ var init_ProtobufOpenAPIGenerator = __esm({
361544
361594
  });
361545
361595
  }
361546
361596
  const outputPath = join8(preparedDir.cwd, RelativeFilePath2.of(PROTOBUF_GENERATOR_OUTPUT_FILEPATH2));
361547
- const uniqueOutput = AbsoluteFilePath2.of((await import_tmp_promise8.default.file({ postfix: ".yaml" })).path);
361597
+ const uniqueOutput = AbsoluteFilePath2.of((await import_tmp_promise9.default.file({ postfix: ".yaml" })).path);
361548
361598
  await (0, import_promises38.copyFile)(outputPath, uniqueOutput);
361549
361599
  await (0, import_promises38.unlink)(outputPath);
361550
361600
  return { absoluteFilepath: uniqueOutput };
@@ -361568,7 +361618,7 @@ var init_ProtobufOpenAPIGenerator = __esm({
361568
361618
  });
361569
361619
  }
361570
361620
  async setupProtobufGeneratorConfig({ absoluteFilepathToProtobufRoot, relativeFilepathToProtobufRoot }) {
361571
- const protobufGeneratorConfigPath = AbsoluteFilePath2.of((await import_tmp_promise8.default.dir()).path);
361621
+ const protobufGeneratorConfigPath = AbsoluteFilePath2.of((await import_tmp_promise9.default.dir()).path);
361572
361622
  await (0, import_promises38.cp)(absoluteFilepathToProtobufRoot, protobufGeneratorConfigPath, { recursive: true });
361573
361623
  await (0, import_promises38.writeFile)(join8(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME2)), getProtobufGeneratorConfig({ relativeFilepathToProtobufRoot }));
361574
361624
  return protobufGeneratorConfigPath;
@@ -361579,7 +361629,7 @@ var init_ProtobufOpenAPIGenerator = __esm({
361579
361629
  const bufLockPath = join8(cwd2, RelativeFilePath2.of("buf.lock"));
361580
361630
  let cleanupBufLock = false;
361581
361631
  const configContent = getProtobufYamlV1(deps);
361582
- const envOverride = this.protocGenOpenAPIBinDir != null ? { PATH: `${this.protocGenOpenAPIBinDir}${import_path43.default.delimiter}${process.env.PATH ?? ""}` } : void 0;
361632
+ const envOverride = this.protocGenOpenAPIBinDir != null ? { PATH: `${this.protocGenOpenAPIBinDir}${import_path44.default.delimiter}${process.env.PATH ?? ""}` } : void 0;
361583
361633
  const bufCommand = this.resolvedBufCommand ?? "buf";
361584
361634
  const buf = createLoggingExecutable(bufCommand, {
361585
361635
  cwd: cwd2,
@@ -424433,7 +424483,7 @@ function tokenizeWwwAutolink(effects, ok3, nok) {
424433
424483
  }
424434
424484
  effects.enter("literalAutolink");
424435
424485
  effects.enter("literalAutolinkWww");
424436
- return effects.check(wwwPrefix, effects.attempt(domain2, effects.attempt(path47, wwwAfter), nok), nok)(code5);
424486
+ return effects.check(wwwPrefix, effects.attempt(domain2, effects.attempt(path48, wwwAfter), nok), nok)(code5);
424437
424487
  }
424438
424488
  function wwwAfter(code5) {
424439
424489
  effects.exit("literalAutolinkWww");
@@ -424483,7 +424533,7 @@ function tokenizeProtocolAutolink(effects, ok3, nok) {
424483
424533
  return nok(code5);
424484
424534
  }
424485
424535
  function afterProtocol(code5) {
424486
- return code5 === null || asciiControl(code5) || markdownLineEndingOrSpace(code5) || unicodeWhitespace(code5) || unicodePunctuation(code5) ? nok(code5) : effects.attempt(domain2, effects.attempt(path47, protocolAfter), nok)(code5);
424536
+ return code5 === null || asciiControl(code5) || markdownLineEndingOrSpace(code5) || unicodeWhitespace(code5) || unicodePunctuation(code5) ? nok(code5) : effects.attempt(domain2, effects.attempt(path48, protocolAfter), nok)(code5);
424487
424537
  }
424488
424538
  function protocolAfter(code5) {
424489
424539
  effects.exit("literalAutolinkHttp");
@@ -424659,7 +424709,7 @@ function previousUnbalanced(events) {
424659
424709
  }
424660
424710
  return result;
424661
424711
  }
424662
- var wwwPrefix, domain2, path47, trail, emailDomainDotTrail, wwwAutolink, protocolAutolink, emailAutolink, text4, code2;
424712
+ var wwwPrefix, domain2, path48, trail, emailDomainDotTrail, wwwAutolink, protocolAutolink, emailAutolink, text4, code2;
424663
424713
  var init_syntax = __esm({
424664
424714
  "../../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js"() {
424665
424715
  "use strict";
@@ -424672,7 +424722,7 @@ var init_syntax = __esm({
424672
424722
  tokenize: tokenizeDomain,
424673
424723
  partial: true
424674
424724
  };
424675
- path47 = {
424725
+ path48 = {
424676
424726
  tokenize: tokenizePath,
424677
424727
  partial: true
424678
424728
  };
@@ -426750,7 +426800,7 @@ function sizingGroup(value2, options2, baseOptions) {
426750
426800
  }
426751
426801
  return buildCommon.makeFragment(inner2);
426752
426802
  }
426753
- var SourceLocation2, Token2, ParseError22, contains, deflt, uppercase2, hyphenate, ESCAPE_LOOKUP, ESCAPE_REGEX, getBaseElem, isCharacterBox, assert5, protocolFromUrl, utils, SETTINGS_SCHEMA, Settings, Style, D4, Dc, T3, Tc, S5, Sc, SS, SSc, styles4, sup, sub, fracNum, fracDen, cramp, text$1, Style$1, scriptData, allBlocks, hLinePad, sqrtMain, sqrtSize1, sqrtSize2, sqrtSize3, sqrtSize4, phasePath, sqrtTall, sqrtPath, innerPath, path48, tallDelim, DocumentFragment2, fontMetricsData, sigmasAndXis, extraCharacterMap, fontMetricsBySizeIndex, sizeStyleMap, sizeMultipliers, sizeAtStyle, Options, ptPerUnit, relativeUnit, validUnit, calculateSize, makeEm, createClass, initNode, toNode, invalidAttributeNameRegex, toMarkup, Span, Anchor, Img, iCombinations, SymbolNode, SvgNode, PathNode, LineNode, ATOMS, NON_ATOMS, symbols, math2, text5, main2, ams, accent, bin, close2, inner, mathord, op, open2, punct, rel, spacing, textord, ligatures, mathTextSymbols, ch, i3, textSymbols, _ch, _i2, letters, _ch2, _i22, wideChar, _ch3, _i3, _ch4, _i4, extraLatin, _ch5, _i5, wideLatinLetterData, wideNumeralData, wideCharacterFont, lookupSymbol, makeSymbol, mathsym, boldsymbol, makeOrd, canCombine, tryCombineChars, sizeElementFromChildren, makeSpan$2, makeSvgSpan, makeLineSpan, makeAnchor, makeFragment, wrapFragment, getVListChildrenAndDepth, makeVList, makeGlue, retrieveTextFontName, fontMap, svgData, staticSvg, buildCommon, thinspace, mediumspace, thickspace, spacings, tightSpacings, _functions, _htmlGroupBuilders, _mathmlGroupBuilders, normalizeArgument, ordargument, makeSpan$1, binLeftCanceller, binRightCanceller, styleMap$1, DomEnum, buildExpression$1, traverseNonSpaceNodes, checkPartialGroup, getOutermostNode, getTypeOfDomTree, makeNullDelimiter, buildGroup$1, MathNode, TextNode, SpaceNode, mathMLTree, makeText, makeRow, getVariant, buildExpression2, buildExpressionRow, buildGroup2, optionsFromSettings, displayWrap, buildTree, buildHTMLTree, stretchyCodePoint, mathMLnode, katexImagesData, groupLength, svgSpan, encloseSpan, stretchy, htmlBuilder$a, mathmlBuilder$9, NON_STRETCHY_ACCENT_REGEX, paddedNode, makeSpan2, binrelClass, cdArrowFunctionName, newCell, isStartOfArrow, isLabelEnd, htmlBuilder$8, mathmlBuilder$7, globalMap, checkControlSequence, getRHS, letCommand, getMetrics, styleWrap, centerSpan, makeSmallDelim, mathrmSize, makeLargeDelim, makeGlyphSpan, makeInner, lapInEms, lap, verts, doubleVerts, makeStackedDelim, vbPad, emPad, sqrtSvg, makeSqrtImage, stackLargeDelimiters, stackAlwaysDelimiters, stackNeverDelimiters, sizeToMaxHeight, makeSizedDelim, stackNeverDelimiterSequence, stackAlwaysDelimiterSequence, stackLargeDelimiterSequence, delimTypeToFont, traverseSequence, makeCustomSizedDelim, makeLeftRightDelim, delimiter2, delimiterSizes, delimiters, htmlBuilder$7, mathmlBuilder$6, _environments, _macros, validateAmsEnvironmentContext, htmlBuilder$6, alignMap, mathmlBuilder$5, alignedHandler, environments, htmlBuilder$5, mathmlBuilder$4, fontAliases, adjustStyle, htmlBuilder$4, mathmlBuilder$3, stylArray, delimFromValue, htmlBuilder$3, mathmlBuilder$2, sizeData, chooseMathStyle, assembleSupSub, noSuccessor, htmlBuilder$2, mathmlBuilder$1, singleCharBigOps, singleCharIntegrals, htmlBuilder$1, mathmlBuilder2, sizeFuncs, htmlBuilder2, styleMap, htmlBuilderDelegate, defaultVariant, cssSpace, regularSpace, pad, textFontFamilies, textFontWeights, textFontShapes, optionsWithFont, makeVerb, functions, spaceRegexString, controlWordRegexString, controlSymbolRegexString, controlWordWhitespaceRegexString, controlSpaceRegexString, combiningDiacriticalMarkString, combiningDiacriticalMarksEndRegex, tokenRegexString, Lexer2, Namespace2, macros, digitToNumber, newcommand, dotsByToken, spaceAfterDots, latexRaiseA, braketHelper, implicitCommands, MacroExpander, unicodeSubRegEx, uSubsAndSups, unicodeAccents, unicodeSymbols, Parser3, parseTree, render, renderToString, generateParseTree, renderError, renderToDomTree, renderToHTMLTree, version3, __domTree, katex;
426803
+ var SourceLocation2, Token2, ParseError22, contains, deflt, uppercase2, hyphenate, ESCAPE_LOOKUP, ESCAPE_REGEX, getBaseElem, isCharacterBox, assert5, protocolFromUrl, utils, SETTINGS_SCHEMA, Settings, Style, D4, Dc, T3, Tc, S5, Sc, SS, SSc, styles4, sup, sub, fracNum, fracDen, cramp, text$1, Style$1, scriptData, allBlocks, hLinePad, sqrtMain, sqrtSize1, sqrtSize2, sqrtSize3, sqrtSize4, phasePath, sqrtTall, sqrtPath, innerPath, path49, tallDelim, DocumentFragment2, fontMetricsData, sigmasAndXis, extraCharacterMap, fontMetricsBySizeIndex, sizeStyleMap, sizeMultipliers, sizeAtStyle, Options, ptPerUnit, relativeUnit, validUnit, calculateSize, makeEm, createClass, initNode, toNode, invalidAttributeNameRegex, toMarkup, Span, Anchor, Img, iCombinations, SymbolNode, SvgNode, PathNode, LineNode, ATOMS, NON_ATOMS, symbols, math2, text5, main2, ams, accent, bin, close2, inner, mathord, op, open2, punct, rel, spacing, textord, ligatures, mathTextSymbols, ch, i3, textSymbols, _ch, _i2, letters, _ch2, _i22, wideChar, _ch3, _i3, _ch4, _i4, extraLatin, _ch5, _i5, wideLatinLetterData, wideNumeralData, wideCharacterFont, lookupSymbol, makeSymbol, mathsym, boldsymbol, makeOrd, canCombine, tryCombineChars, sizeElementFromChildren, makeSpan$2, makeSvgSpan, makeLineSpan, makeAnchor, makeFragment, wrapFragment, getVListChildrenAndDepth, makeVList, makeGlue, retrieveTextFontName, fontMap, svgData, staticSvg, buildCommon, thinspace, mediumspace, thickspace, spacings, tightSpacings, _functions, _htmlGroupBuilders, _mathmlGroupBuilders, normalizeArgument, ordargument, makeSpan$1, binLeftCanceller, binRightCanceller, styleMap$1, DomEnum, buildExpression$1, traverseNonSpaceNodes, checkPartialGroup, getOutermostNode, getTypeOfDomTree, makeNullDelimiter, buildGroup$1, MathNode, TextNode, SpaceNode, mathMLTree, makeText, makeRow, getVariant, buildExpression2, buildExpressionRow, buildGroup2, optionsFromSettings, displayWrap, buildTree, buildHTMLTree, stretchyCodePoint, mathMLnode, katexImagesData, groupLength, svgSpan, encloseSpan, stretchy, htmlBuilder$a, mathmlBuilder$9, NON_STRETCHY_ACCENT_REGEX, paddedNode, makeSpan2, binrelClass, cdArrowFunctionName, newCell, isStartOfArrow, isLabelEnd, htmlBuilder$8, mathmlBuilder$7, globalMap, checkControlSequence, getRHS, letCommand, getMetrics, styleWrap, centerSpan, makeSmallDelim, mathrmSize, makeLargeDelim, makeGlyphSpan, makeInner, lapInEms, lap, verts, doubleVerts, makeStackedDelim, vbPad, emPad, sqrtSvg, makeSqrtImage, stackLargeDelimiters, stackAlwaysDelimiters, stackNeverDelimiters, sizeToMaxHeight, makeSizedDelim, stackNeverDelimiterSequence, stackAlwaysDelimiterSequence, stackLargeDelimiterSequence, delimTypeToFont, traverseSequence, makeCustomSizedDelim, makeLeftRightDelim, delimiter2, delimiterSizes, delimiters, htmlBuilder$7, mathmlBuilder$6, _environments, _macros, validateAmsEnvironmentContext, htmlBuilder$6, alignMap, mathmlBuilder$5, alignedHandler, environments, htmlBuilder$5, mathmlBuilder$4, fontAliases, adjustStyle, htmlBuilder$4, mathmlBuilder$3, stylArray, delimFromValue, htmlBuilder$3, mathmlBuilder$2, sizeData, chooseMathStyle, assembleSupSub, noSuccessor, htmlBuilder$2, mathmlBuilder$1, singleCharBigOps, singleCharIntegrals, htmlBuilder$1, mathmlBuilder2, sizeFuncs, htmlBuilder2, styleMap, htmlBuilderDelegate, defaultVariant, cssSpace, regularSpace, pad, textFontFamilies, textFontWeights, textFontShapes, optionsWithFont, makeVerb, functions, spaceRegexString, controlWordRegexString, controlSymbolRegexString, controlWordWhitespaceRegexString, controlSpaceRegexString, combiningDiacriticalMarkString, combiningDiacriticalMarksEndRegex, tokenRegexString, Lexer2, Namespace2, macros, digitToNumber, newcommand, dotsByToken, spaceAfterDots, latexRaiseA, braketHelper, implicitCommands, MacroExpander, unicodeSubRegEx, uSubsAndSups, unicodeAccents, unicodeSymbols, Parser3, parseTree, render, renderToString, generateParseTree, renderError, renderToDomTree, renderToHTMLTree, version3, __domTree, katex;
426754
426804
  var init_katex = __esm({
426755
426805
  "../../../node_modules/.pnpm/katex@0.16.21/node_modules/katex/dist/katex.mjs"() {
426756
426806
  "use strict";
@@ -427313,7 +427363,7 @@ var init_katex = __esm({
427313
427363
  return "";
427314
427364
  }
427315
427365
  };
427316
- path48 = {
427366
+ path49 = {
427317
427367
  // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
427318
427368
  doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",
427319
427369
  // doublerightarrow is from glyph U+21D2 in font KaTeX Main
@@ -430358,7 +430408,7 @@ var init_katex = __esm({
430358
430408
  if (this.alternate) {
430359
430409
  node4.setAttribute("d", this.alternate);
430360
430410
  } else {
430361
- node4.setAttribute("d", path48[this.pathName]);
430411
+ node4.setAttribute("d", path49[this.pathName]);
430362
430412
  }
430363
430413
  return node4;
430364
430414
  }
@@ -430366,7 +430416,7 @@ var init_katex = __esm({
430366
430416
  if (this.alternate) {
430367
430417
  return '<path d="' + utils.escape(this.alternate) + '"/>';
430368
430418
  } else {
430369
- return '<path d="' + utils.escape(path48[this.pathName]) + '"/>';
430419
+ return '<path d="' + utils.escape(path49[this.pathName]) + '"/>';
430370
430420
  }
430371
430421
  }
430372
430422
  };
@@ -454597,7 +454647,7 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
454597
454647
  if (image3 == null || isExternalUrl(image3) || isDataUrl(image3)) {
454598
454648
  return void 0;
454599
454649
  }
454600
- if ((0, import_path55.isAbsolute)(image3) || isWindowsAbsolutePath(image3)) {
454650
+ if ((0, import_path56.isAbsolute)(image3) || isWindowsAbsolutePath(image3)) {
454601
454651
  const absolutePath = convertToFernHostAbsoluteFilePath(AbsoluteFilePath2.of(image3));
454602
454652
  const fileId = fileIdsMap.get(absolutePath);
454603
454653
  if (fileId) {
@@ -454964,14 +455014,14 @@ function replaceFrontmatterImagesforLogo(data2, mapImage) {
454964
455014
  }
454965
455015
  }
454966
455016
  }
454967
- var import_gray_matter3, import_path55, JSX_TAG_NAME_START_REGEX, BLANK_LINE_REGEX, CODE_FENCE_REGEX, LogoOverrideFrontmatterSchema;
455017
+ var import_gray_matter3, import_path56, JSX_TAG_NAME_START_REGEX, BLANK_LINE_REGEX, CODE_FENCE_REGEX, LogoOverrideFrontmatterSchema;
454968
455018
  var init_parseImagePaths = __esm({
454969
455019
  "../docs-markdown-utils/lib/parseImagePaths.js"() {
454970
455020
  "use strict";
454971
455021
  init_js();
454972
455022
  init_lib8();
454973
455023
  import_gray_matter3 = __toESM(require_gray_matter(), 1);
454974
- import_path55 = require("path");
455024
+ import_path56 = require("path");
454975
455025
  init_unist_util_visit();
454976
455026
  init_zod2();
454977
455027
  init_extract_literals();
@@ -456215,7 +456265,7 @@ function getBundleCacheDir() {
456215
456265
  }
456216
456266
  function getBundleCacheFilePath(cacheDir, contents) {
456217
456267
  const hash5 = (0, import_crypto6.createHash)("sha256").update(ROLLDOWN_VERSION).update("\0").update(contents).digest("hex");
456218
- return import_path56.default.join(cacheDir, `${hash5}.js`);
456268
+ return import_path57.default.join(cacheDir, `${hash5}.js`);
456219
456269
  }
456220
456270
  async function readCachedBundle(contents) {
456221
456271
  const cacheDir = getBundleCacheDir();
@@ -456254,13 +456304,13 @@ async function maybeBundleMdxComponent({ absoluteFilePath, contents, context: co
456254
456304
  return cachedBundle;
456255
456305
  }
456256
456306
  context3.logger.debug(`Bundling ${absoluteFilePath} to inline third-party imports: ${thirdPartyImports.join(", ")}`);
456257
- const { path: tmpDir, cleanup } = await import_tmp_promise9.default.dir({ unsafeCleanup: true });
456307
+ const { path: tmpDir, cleanup } = await import_tmp_promise10.default.dir({ unsafeCleanup: true });
456258
456308
  try {
456259
- const outputFilePath = import_path56.default.join(tmpDir, "bundle.js");
456260
- const configFilePath2 = import_path56.default.join(tmpDir, "rolldown.config.mjs");
456309
+ const outputFilePath = import_path57.default.join(tmpDir, "bundle.js");
456310
+ const configFilePath2 = import_path57.default.join(tmpDir, "rolldown.config.mjs");
456261
456311
  await (0, import_promises71.writeFile)(configFilePath2, buildRolldownConfig({ absoluteFilePath, outputFilePath }));
456262
456312
  const result = await loggingExeca(context3.logger, "npx", ["--quiet", "--yes", `rolldown@${ROLLDOWN_VERSION}`, "-c", configFilePath2], {
456263
- cwd: import_path56.default.dirname(absoluteFilePath),
456313
+ cwd: import_path57.default.dirname(absoluteFilePath),
456264
456314
  doNotPipeOutput: true,
456265
456315
  reject: false
456266
456316
  });
@@ -456311,7 +456361,7 @@ export default {
456311
456361
  };
456312
456362
  `;
456313
456363
  }
456314
- var import_crypto6, import_promises71, import_module2, import_path56, import_tmp_promise9, BUNDLEABLE_EXTENSIONS_REGEX, RENDERER_PROVIDED_MODULES, BUNDLE_CACHE_DIR_ENV_VAR, ROLLDOWN_VERSION, IMPORT_SPECIFIER_REGEX;
456364
+ var import_crypto6, import_promises71, import_module2, import_path57, import_tmp_promise10, BUNDLEABLE_EXTENSIONS_REGEX, RENDERER_PROVIDED_MODULES, BUNDLE_CACHE_DIR_ENV_VAR, ROLLDOWN_VERSION, IMPORT_SPECIFIER_REGEX;
456315
456365
  var init_bundleMdxComponent = __esm({
456316
456366
  "../docs-resolver/lib/utils/bundleMdxComponent.js"() {
456317
456367
  "use strict";
@@ -456319,8 +456369,8 @@ var init_bundleMdxComponent = __esm({
456319
456369
  import_crypto6 = require("crypto");
456320
456370
  import_promises71 = require("fs/promises");
456321
456371
  import_module2 = require("module");
456322
- import_path56 = __toESM(require("path"), 1);
456323
- import_tmp_promise9 = __toESM(require_tmp_promise(), 1);
456372
+ import_path57 = __toESM(require("path"), 1);
456373
+ import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
456324
456374
  BUNDLEABLE_EXTENSIONS_REGEX = /\.(js|jsx|ts|tsx)$/;
456325
456375
  RENDERER_PROVIDED_MODULES = ["react", "react-dom", "@mdx-js/react", "next"];
456326
456376
  BUNDLE_CACHE_DIR_ENV_VAR = "FERN_MDX_BUNDLE_CACHE_DIR";
@@ -456569,9 +456619,6 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
456569
456619
  if (gitDefinitions.length === 0) {
456570
456620
  return definitions7;
456571
456621
  }
456572
- if (!isGitAvailable()) {
456573
- throw new Error("Git is not installed or not found in PATH. Remote git sources in generators.yml require git to be available. Please install git and ensure it is in your PATH.");
456574
- }
456575
456622
  const cloneTargets = /* @__PURE__ */ new Map();
456576
456623
  for (const def of gitDefinitions) {
456577
456624
  const gitSource = def.gitSource;
@@ -456587,36 +456634,8 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
456587
456634
  const clonedPaths = /* @__PURE__ */ new Map();
456588
456635
  for (const [key2, target] of cloneTargets.entries()) {
456589
456636
  context3.logger.info(`Cloning remote spec source: ${target.repo}${target.ref ? `@${target.ref}` : ""}`);
456590
- const tmpDir = await import_tmp_promise10.default.dir({ unsafeCleanup: true });
456591
- const clonePath = AbsoluteFilePath2.of(tmpDir.path);
456592
- const git = simpleGit();
456593
- const useCommitShaFlow = target.ref != null && isCommitSha(target.ref);
456594
- try {
456595
- if (useCommitShaFlow) {
456596
- const ref2 = target.ref;
456597
- const cloneArgs = ["--depth", "1", "--config", "core.symlinks=false", "--no-checkout"];
456598
- await git.clone(target.repo, tmpDir.path, cloneArgs);
456599
- const repoGit = simpleGit(tmpDir.path);
456600
- await repoGit.fetch("origin", ref2, { "--depth": "1" });
456601
- await repoGit.checkout(ref2);
456602
- } else {
456603
- const cloneArgs = ["--depth", "1", "--config", "core.symlinks=false"];
456604
- if (target.ref != null) {
456605
- cloneArgs.push("--branch", target.ref);
456606
- }
456607
- await git.clone(target.repo, tmpDir.path, cloneArgs);
456608
- }
456609
- } catch (error50) {
456610
- const errorMessage = extractErrorMessage(error50);
456611
- if (errorMessage.includes("Authentication failed") || errorMessage.includes("could not read Username") || errorMessage.includes("401") || errorMessage.includes("403")) {
456612
- throw new Error(`Failed to clone remote spec source: authentication failed. Ensure your git credentials are configured for ${target.repo}. The CLI uses your system's git credential configuration (credential helpers, SSH keys, GIT_ASKPASS). Original error: ${errorMessage}`);
456613
- }
456614
- if (errorMessage.includes("Repository not found") || errorMessage.includes("not found") || errorMessage.includes("404")) {
456615
- throw new Error(`Failed to clone remote spec source: repository not found. Check that ${target.repo} exists and your credentials have access. Original error: ${errorMessage}`);
456616
- }
456617
- throw new Error(`Failed to clone remote spec source ${target.repo}${target.ref ? ` at ref '${target.ref}'` : ""}. Original error: ${errorMessage}`);
456618
- }
456619
- clonedPaths.set(key2, clonePath);
456637
+ const clonePath = await cloneRepositoryAtRef({ repositoryUrl: target.repo, ref: target.ref });
456638
+ clonedPaths.set(key2, AbsoluteFilePath2.of(clonePath));
456620
456639
  }
456621
456640
  return definitions7.map((def) => {
456622
456641
  if (def.gitSource == null) {
@@ -456628,15 +456647,17 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
456628
456647
  if (clonedPath == null) {
456629
456648
  throw new Error(`Internal error: no clone found for ${key2}`);
456630
456649
  }
456631
- const resolvedPath = AbsoluteFilePath2.of(import_path57.default.resolve(clonedPath, def.gitSource.path));
456632
- if (!resolvedPath.startsWith(clonedPath + import_path57.default.sep) && resolvedPath !== clonedPath) {
456633
- throw new Error(`Invalid git source path '${def.gitSource.path}': path must be relative to the repository root and cannot traverse outside it.`);
456634
- }
456650
+ const resolvedPath = AbsoluteFilePath2.of(resolveRepositorySubpath({
456651
+ repositoryRoot: clonedPath,
456652
+ subpath: def.gitSource.path,
456653
+ description: "git source path"
456654
+ }));
456635
456655
  if (def.schema.type === "protobuf") {
456636
- const resolvedTarget = def.schema.target.length > 0 ? import_path57.default.resolve(clonedPath, def.schema.target) : def.schema.target;
456637
- if (resolvedTarget.length > 0 && !resolvedTarget.startsWith(clonedPath + import_path57.default.sep) && resolvedTarget !== clonedPath) {
456638
- throw new Error(`Invalid proto target path '${def.schema.target}': path must be relative to the repository root and cannot traverse outside it.`);
456639
- }
456656
+ const resolvedTarget = def.schema.target.length > 0 ? resolveRepositorySubpath({
456657
+ repositoryRoot: clonedPath,
456658
+ subpath: def.schema.target,
456659
+ description: "proto target path"
456660
+ }) : def.schema.target;
456640
456661
  return {
456641
456662
  ...def,
456642
456663
  schema: {
@@ -456659,15 +456680,11 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
456659
456680
  };
456660
456681
  });
456661
456682
  }
456662
- var import_path57, import_tmp_promise10;
456663
456683
  var init_resolveRemoteSpecs = __esm({
456664
456684
  "../workspace/loader/lib/resolveRemoteSpecs.js"() {
456665
456685
  "use strict";
456666
- init_lib4();
456667
456686
  init_lib8();
456668
- import_path57 = __toESM(require("path"), 1);
456669
- init_esm16();
456670
- import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
456687
+ init_lib11();
456671
456688
  }
456672
456689
  });
456673
456690
 
@@ -689478,14 +689495,14 @@ function getCamelCaseNormalizedCollisions(nameToProperties) {
689478
689495
 
689479
689496
  // ../fern-definition/validator/lib/rules/no-duplicate-declarations/no-duplicate-declarations.js
689480
689497
  init_lib17();
689481
- var import_path25 = __toESM(require("path"), 1);
689498
+ var import_path26 = __toESM(require("path"), 1);
689482
689499
  var NoDuplicateDeclarationsRule = {
689483
689500
  name: "no-duplicate-declarations",
689484
689501
  create: ({ workspace, logger: logger4 }) => {
689485
689502
  const declarations = getDeclarations(workspace);
689486
689503
  const seenTypes = {};
689487
689504
  const getRuleViolations = ({ declaredName, relativeFilepath }) => {
689488
- const relativeDirectoryPath = import_path25.default.dirname(relativeFilepath);
689505
+ const relativeDirectoryPath = import_path26.default.dirname(relativeFilepath);
689489
689506
  const declarationsForName = declarations[relativeDirectoryPath]?.[declaredName];
689490
689507
  if (declarationsForName == null) {
689491
689508
  logger4.error(`Could not find declarations for name: ${declaredName}. This is an error in the Fern validator.`);
@@ -689521,7 +689538,7 @@ var NoDuplicateDeclarationsRule = {
689521
689538
  function getDeclarations(workspace) {
689522
689539
  const declarations = {};
689523
689540
  visitAllDefinitionFiles(workspace, (relativeFilepath, file4) => {
689524
- const relativeDirectoryPath = import_path25.default.dirname(relativeFilepath);
689541
+ const relativeDirectoryPath = import_path26.default.dirname(relativeFilepath);
689525
689542
  const declarationsForDirectory = declarations[relativeDirectoryPath] ??= {};
689526
689543
  const addDeclaration = (declaredName) => {
689527
689544
  (declarationsForDirectory[declaredName] ??= []).push(relativeFilepath);
@@ -691530,7 +691547,7 @@ init_lib20();
691530
691547
  init_lib4();
691531
691548
  init_lib8();
691532
691549
  init_lib6();
691533
- var import_path26 = __toESM(require("path"), 1);
691550
+ var import_path27 = __toESM(require("path"), 1);
691534
691551
  var ValidNavigationRule = {
691535
691552
  name: "valid-navigation",
691536
691553
  create: ({ workspace }) => {
@@ -691538,7 +691555,7 @@ var ValidNavigationRule = {
691538
691555
  const allNamedDefinitionFilepaths = keys2(getAllNamedDefinitionFiles(workspace.definition));
691539
691556
  const directoryToChildren = allNamedDefinitionFilepaths.reduce((acc, definitionFilepath) => {
691540
691557
  const children2 = acc[dirname6(definitionFilepath)] ??= /* @__PURE__ */ new Set();
691541
- children2.add(import_path26.default.basename(definitionFilepath));
691558
+ children2.add(import_path27.default.basename(definitionFilepath));
691542
691559
  return acc;
691543
691560
  }, {});
691544
691561
  return {
@@ -696281,10 +696298,10 @@ async function removeToken() {
696281
696298
 
696282
696299
  // ../auth/lib/persistence/storeToken.js
696283
696300
  var import_promises48 = require("fs/promises");
696284
- var import_path44 = __toESM(require("path"), 1);
696301
+ var import_path45 = __toESM(require("path"), 1);
696285
696302
  async function storeToken(token) {
696286
696303
  const pathToTokenFile = getPathToTokenFile();
696287
- await (0, import_promises48.mkdir)(import_path44.default.dirname(pathToTokenFile), { recursive: true });
696304
+ await (0, import_promises48.mkdir)(import_path45.default.dirname(pathToTokenFile), { recursive: true });
696288
696305
  await (0, import_promises48.writeFile)(pathToTokenFile, token);
696289
696306
  }
696290
696307
 
@@ -698704,7 +698721,7 @@ var inquirer = {
698704
698721
  var lib_default4 = inquirer;
698705
698722
 
698706
698723
  // ../../../node_modules/.pnpm/posthog-node@5.35.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
698707
- var import_path45 = require("path");
698724
+ var import_path46 = require("path");
698708
698725
  function createModulerModifier() {
698709
698726
  const getModuleFromFileName = createGetModuleFromFilename2();
698710
698727
  return async (frames) => {
@@ -698712,12 +698729,12 @@ function createModulerModifier() {
698712
698729
  return frames;
698713
698730
  };
698714
698731
  }
698715
- function createGetModuleFromFilename2(basePath = process.argv[1] ? (0, import_path45.dirname)(process.argv[1]) : process.cwd(), isWindows = "\\" === import_path45.sep) {
698732
+ function createGetModuleFromFilename2(basePath = process.argv[1] ? (0, import_path46.dirname)(process.argv[1]) : process.cwd(), isWindows = "\\" === import_path46.sep) {
698716
698733
  const normalizedBase = isWindows ? normalizeWindowsPath2(basePath) : basePath;
698717
698734
  return (filename) => {
698718
698735
  if (!filename) return;
698719
698736
  const normalizedFilename = isWindows ? normalizeWindowsPath2(filename) : filename;
698720
- let { dir, base: file4, ext: ext2 } = import_path45.posix.parse(normalizedFilename);
698737
+ let { dir, base: file4, ext: ext2 } = import_path46.posix.parse(normalizedFilename);
698721
698738
  if (".js" === ext2 || ".mjs" === ext2 || ".cjs" === ext2) file4 = file4.slice(0, -1 * ext2.length);
698722
698739
  const decodedFile = decodeURIComponent(file4);
698723
698740
  if (!dir) dir = ".";
@@ -701363,14 +701380,14 @@ function snipLine2(line, colno) {
701363
701380
  }
701364
701381
 
701365
701382
  // ../../../node_modules/.pnpm/posthog-node@5.35.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
701366
- var import_path46 = require("path");
701383
+ var import_path47 = require("path");
701367
701384
  function createRelativePathModifier(basePath = process.cwd()) {
701368
- const isWindows = "\\" === import_path46.sep;
701385
+ const isWindows = "\\" === import_path47.sep;
701369
701386
  const toUnix = (p6) => isWindows ? p6.replace(/\\/g, "/") : p6;
701370
701387
  const normalizedBase = toUnix(basePath);
701371
701388
  return async (frames) => {
701372
701389
  for (const frame of frames) if (!(!frame.filename || frame.filename.startsWith("node:") || frame.filename.startsWith("data:"))) {
701373
- if ((0, import_path46.isAbsolute)(frame.filename)) frame.filename = toUnix((0, import_path46.relative)(normalizedBase, toUnix(frame.filename)));
701390
+ if ((0, import_path47.isAbsolute)(frame.filename)) frame.filename = toUnix((0, import_path47.relative)(normalizedBase, toUnix(frame.filename)));
701374
701391
  }
701375
701392
  return frames;
701376
701393
  };
@@ -703430,7 +703447,7 @@ var AccessTokenPosthogManager = class {
703430
703447
  properties: {
703431
703448
  ...event,
703432
703449
  ...event.properties,
703433
- version: "5.102.0",
703450
+ version: "5.103.0",
703434
703451
  usingAccessToken: true,
703435
703452
  ...getRunIdProperties()
703436
703453
  }
@@ -703469,7 +703486,7 @@ init_lib27();
703469
703486
  init_lib8();
703470
703487
  var import_promises49 = require("fs/promises");
703471
703488
  var import_os6 = require("os");
703472
- var import_path47 = require("path");
703489
+ var import_path48 = require("path");
703473
703490
  init_dist_node6();
703474
703491
  var DISTINCT_ID_FILENAME = "id";
703475
703492
  var LOCAL_STORAGE_FOLDER3 = ".fern-dev";
@@ -703496,7 +703513,7 @@ var UserPosthogManager = class {
703496
703513
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
703497
703514
  event: "CLI",
703498
703515
  properties: {
703499
- version: "5.102.0",
703516
+ version: "5.103.0",
703500
703517
  ...event,
703501
703518
  ...event.properties,
703502
703519
  usingAccessToken: false,
@@ -703548,7 +703565,7 @@ var UserPosthogManager = class {
703548
703565
  const pathToFile = join8(AbsoluteFilePath2.of((0, import_os6.homedir)()), RelativeFilePath2.of(LOCAL_STORAGE_FOLDER3), RelativeFilePath2.of(DISTINCT_ID_FILENAME));
703549
703566
  try {
703550
703567
  if (!await doesPathExist(pathToFile)) {
703551
- await (0, import_promises49.mkdir)((0, import_path47.dirname)(pathToFile), { recursive: true });
703568
+ await (0, import_promises49.mkdir)((0, import_path48.dirname)(pathToFile), { recursive: true });
703552
703569
  await (0, import_promises49.writeFile)(pathToFile, generatedDistinctId);
703553
703570
  this.persistedDistinctId = generatedDistinctId;
703554
703571
  } else {
@@ -706546,7 +706563,7 @@ var import_os7 = __toESM(require("os"), 1);
706546
706563
 
706547
706564
  // ../cli-v2/lib/cache/docs-preview/DocsPreviewCache.js
706548
706565
  var import_promises54 = __toESM(require("fs/promises"), 1);
706549
- var import_path48 = __toESM(require("path"), 1);
706566
+ var import_path49 = __toESM(require("path"), 1);
706550
706567
  var DocsPreviewCache = class {
706551
706568
  /** Absolute file path to the docs-preview cache directory */
706552
706569
  absoluteFilePath;
@@ -706564,7 +706581,7 @@ var DocsPreviewCache = class {
706564
706581
  for (const entry of entries24) {
706565
706582
  if (entry.isDirectory()) {
706566
706583
  bundleCount++;
706567
- totalSize += await this.getDirectorySize(import_path48.default.join(this.absoluteFilePath, entry.name));
706584
+ totalSize += await this.getDirectorySize(import_path49.default.join(this.absoluteFilePath, entry.name));
706568
706585
  }
706569
706586
  }
706570
706587
  } catch {
@@ -706581,7 +706598,7 @@ var DocsPreviewCache = class {
706581
706598
  const entries24 = await import_promises54.default.readdir(this.absoluteFilePath, { withFileTypes: true });
706582
706599
  for (const entry of entries24) {
706583
706600
  if (entry.isDirectory()) {
706584
- const fullPath = import_path48.default.join(this.absoluteFilePath, entry.name);
706601
+ const fullPath = import_path49.default.join(this.absoluteFilePath, entry.name);
706585
706602
  const size2 = await this.getDirectorySize(fullPath);
706586
706603
  deletedCount++;
706587
706604
  freedSize += size2;
@@ -706599,7 +706616,7 @@ var DocsPreviewCache = class {
706599
706616
  try {
706600
706617
  const entries24 = await import_promises54.default.readdir(dirPath, { withFileTypes: true });
706601
706618
  for (const entry of entries24) {
706602
- const entryPath = import_path48.default.join(dirPath, entry.name);
706619
+ const entryPath = import_path49.default.join(dirPath, entry.name);
706603
706620
  if (entry.isFile() || entry.isSymbolicLink()) {
706604
706621
  try {
706605
706622
  const stats = await import_promises54.default.stat(entryPath);
@@ -708177,7 +708194,7 @@ var import_promises60 = require("fs/promises");
708177
708194
  var import_is_ci2 = __toESM(require_is_ci(), 1);
708178
708195
  var os10 = __toESM(require("os"), 1);
708179
708196
  var import_os8 = require("os");
708180
- var import_path49 = require("path");
708197
+ var import_path50 = require("path");
708181
708198
  init_dist_node6();
708182
708199
  var TelemetryClient = class _TelemetryClient {
708183
708200
  posthog;
@@ -708327,7 +708344,7 @@ var TelemetryClient = class _TelemetryClient {
708327
708344
  let distinctId = null;
708328
708345
  try {
708329
708346
  if (!await doesPathExist(distinctIdFilepath)) {
708330
- await (0, import_promises60.mkdir)((0, import_path49.dirname)(distinctIdFilepath), { recursive: true });
708347
+ await (0, import_promises60.mkdir)((0, import_path50.dirname)(distinctIdFilepath), { recursive: true });
708331
708348
  await (0, import_promises60.writeFile)(distinctIdFilepath, v4_default(), { flag: "wx" });
708332
708349
  }
708333
708350
  const content5 = (await (0, import_promises60.readFile)(distinctIdFilepath)).toString().trim();
@@ -709721,12 +709738,12 @@ function getLogLevelPrefix(level) {
709721
709738
  init_source();
709722
709739
  var import_dotenv = __toESM(require_main2(), 1);
709723
709740
  var import_fs24 = __toESM(require("fs"), 1);
709724
- var import_path50 = __toESM(require("path"), 1);
709741
+ var import_path51 = __toESM(require("path"), 1);
709725
709742
  function loadDotenvFile(envFilePath, logDebug) {
709726
709743
  if (envFilePath == null) {
709727
709744
  return;
709728
709745
  }
709729
- const resolved = import_path50.default.resolve(process.cwd(), envFilePath);
709746
+ const resolved = import_path51.default.resolve(process.cwd(), envFilePath);
709730
709747
  if (!import_fs24.default.existsSync(resolved)) {
709731
709748
  process.stderr.write(`${source_default.yellow("warn")} .env file not found: ${resolved}
709732
709749
  `);
@@ -849483,7 +849500,7 @@ init_lib8();
849483
849500
  init_lib6();
849484
849501
  init_source();
849485
849502
  var import_promises65 = require("fs/promises");
849486
- var import_path51 = __toESM(require("path"), 1);
849503
+ var import_path52 = __toESM(require("path"), 1);
849487
849504
 
849488
849505
  // ../cli-v2/lib/commands/api/utils/loadSpec.js
849489
849506
  init_lib6();
@@ -849941,8 +849958,8 @@ function stripFernExamples(spec) {
849941
849958
  // ../cli-v2/lib/commands/api/enrich/command.js
849942
849959
  var EnrichCommand = class {
849943
849960
  async handle(context3, args) {
849944
- const openapiPath = AbsoluteFilePath2.of(import_path51.default.resolve(context3.cwd, args.openapi));
849945
- const outputPath = args.output != null ? AbsoluteFilePath2.of(import_path51.default.resolve(context3.cwd, args.output)) : openapiPath;
849961
+ const openapiPath = AbsoluteFilePath2.of(import_path52.default.resolve(context3.cwd, args.openapi));
849962
+ const outputPath = args.output != null ? AbsoluteFilePath2.of(import_path52.default.resolve(context3.cwd, args.output)) : openapiPath;
849946
849963
  if (args.file == null) {
849947
849964
  if (args["ai-examples"] === true) {
849948
849965
  throw new CliError({
@@ -849955,7 +849972,7 @@ var EnrichCommand = class {
849955
849972
  code: CliError.Code.ConfigError
849956
849973
  });
849957
849974
  }
849958
- const overridesPath = AbsoluteFilePath2.of(import_path51.default.resolve(context3.cwd, args.file));
849975
+ const overridesPath = AbsoluteFilePath2.of(import_path52.default.resolve(context3.cwd, args.file));
849959
849976
  const [spec, overrides] = await Promise.all([loadSpec(openapiPath), loadSpec(overridesPath)]);
849960
849977
  const logger4 = {
849961
849978
  warn: (msg) => context3.stderr.warn(msg)
@@ -850010,7 +850027,7 @@ init_lib4();
850010
850027
  init_lib6();
850011
850028
  init_source();
850012
850029
  var import_promises67 = require("fs/promises");
850013
- var import_path53 = __toESM(require("path"), 1);
850030
+ var import_path54 = __toESM(require("path"), 1);
850014
850031
 
850015
850032
  // ../cli-v2/lib/config/fern-yml/constants.js
850016
850033
  var FERN_YML_FILENAME = "fern.yml";
@@ -850020,7 +850037,7 @@ var REF_KEY2 = "$ref";
850020
850037
  init_lib8();
850021
850038
  init_lib6();
850022
850039
  var import_promises66 = require("fs/promises");
850023
- var import_path52 = __toESM(require("path"), 1);
850040
+ var import_path53 = __toESM(require("path"), 1);
850024
850041
  var import_yaml4 = __toESM(require_dist11(), 1);
850025
850042
  var FernYmlEditor = class _FernYmlEditor {
850026
850043
  rootDocument;
@@ -850121,23 +850138,23 @@ var FernYmlEditor = class _FernYmlEditor {
850121
850138
  async addOverride(specFilePath, overrideAbsolutePath) {
850122
850139
  const section = await this.resolveSection("api", ["specs"]);
850123
850140
  const fileDir = dirname6(section.filePath);
850124
- const relativeOverridePath = `./${import_path52.default.relative(fileDir, overrideAbsolutePath)}`;
850141
+ const relativeOverridePath = `./${import_path53.default.relative(fileDir, overrideAbsolutePath)}`;
850125
850142
  const index3 = this.findSpecIndex(section, specFilePath);
850126
850143
  if (index3 < 0) {
850127
850144
  return void 0;
850128
850145
  }
850129
850146
  const overridesPath = [...section.basePath, index3, "overrides"];
850130
850147
  const existing = nodeToJS(section.document.getIn(overridesPath));
850131
- const normalizedNew = import_path52.default.normalize(relativeOverridePath);
850148
+ const normalizedNew = import_path53.default.normalize(relativeOverridePath);
850132
850149
  if (existing == null) {
850133
850150
  section.document.setIn(overridesPath, relativeOverridePath);
850134
850151
  } else if (typeof existing === "string") {
850135
- if (import_path52.default.normalize(existing) === normalizedNew) {
850152
+ if (import_path53.default.normalize(existing) === normalizedNew) {
850136
850153
  return void 0;
850137
850154
  }
850138
850155
  section.document.setIn(overridesPath, section.document.createNode([existing, relativeOverridePath]));
850139
850156
  } else if (Array.isArray(existing)) {
850140
- if (existing.some((p6) => import_path52.default.normalize(p6) === normalizedNew)) {
850157
+ if (existing.some((p6) => import_path53.default.normalize(p6) === normalizedNew)) {
850141
850158
  return void 0;
850142
850159
  }
850143
850160
  const updated = [...existing, relativeOverridePath];
@@ -850195,18 +850212,18 @@ var FernYmlEditor = class _FernYmlEditor {
850195
850212
  async addOverlay(specFilePath, overlayAbsolutePath) {
850196
850213
  const section = await this.resolveSection("api", ["specs"]);
850197
850214
  const fileDir = dirname6(section.filePath);
850198
- const relativeOverlayPath = `./${import_path52.default.relative(fileDir, overlayAbsolutePath)}`;
850215
+ const relativeOverlayPath = `./${import_path53.default.relative(fileDir, overlayAbsolutePath)}`;
850199
850216
  const index3 = this.findSpecIndex(section, specFilePath);
850200
850217
  if (index3 < 0) {
850201
850218
  return void 0;
850202
850219
  }
850203
850220
  const overlaysPath = [...section.basePath, index3, "overlays"];
850204
850221
  const existing = nodeToJS(section.document.getIn(overlaysPath));
850205
- const normalizedNew = import_path52.default.normalize(relativeOverlayPath);
850222
+ const normalizedNew = import_path53.default.normalize(relativeOverlayPath);
850206
850223
  if (existing == null) {
850207
850224
  section.document.setIn(overlaysPath, relativeOverlayPath);
850208
850225
  } else if (typeof existing === "string") {
850209
- if (import_path52.default.normalize(existing) === normalizedNew) {
850226
+ if (import_path53.default.normalize(existing) === normalizedNew) {
850210
850227
  return void 0;
850211
850228
  }
850212
850229
  section.document.setIn(overlaysPath, relativeOverlayPath);
@@ -850329,14 +850346,14 @@ var FernYmlEditor = class _FernYmlEditor {
850329
850346
  return -1;
850330
850347
  }
850331
850348
  const fileDir = dirname6(section.filePath);
850332
- const relativeSpecPath = import_path52.default.normalize(import_path52.default.relative(fileDir, specFilePath));
850349
+ const relativeSpecPath = import_path53.default.normalize(import_path53.default.relative(fileDir, specFilePath));
850333
850350
  for (let i5 = 0; i5 < specs.length; i5++) {
850334
850351
  const spec = specs[i5];
850335
850352
  if (spec == null) {
850336
850353
  continue;
850337
850354
  }
850338
850355
  const specPath = spec.openapi ?? spec.asyncapi;
850339
- if (specPath != null && import_path52.default.normalize(specPath) === relativeSpecPath) {
850356
+ if (specPath != null && import_path53.default.normalize(specPath) === relativeSpecPath) {
850340
850357
  return i5;
850341
850358
  }
850342
850359
  }
@@ -850665,16 +850682,16 @@ var MergeCommand = class {
850665
850682
  if (overridePaths != null) {
850666
850683
  const edit = await editor.removeOverrides(entry.specFilePath);
850667
850684
  if (edit != null) {
850668
- const relPath = import_path53.default.relative(context3.cwd, await editor.getApiFilePath());
850669
- const names2 = overridePaths.map((o3) => import_path53.default.basename(o3)).join(", ");
850685
+ const relPath = import_path54.default.relative(context3.cwd, await editor.getApiFilePath());
850686
+ const names2 = overridePaths.map((o3) => import_path54.default.basename(o3)).join(", ");
850670
850687
  context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: removed reference to ${names2}`));
850671
850688
  }
850672
850689
  }
850673
850690
  if (overlayPath != null) {
850674
850691
  const edit = await editor.removeOverlay(entry.specFilePath);
850675
850692
  if (edit != null) {
850676
- const relPath = import_path53.default.relative(context3.cwd, await editor.getApiFilePath());
850677
- context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: removed reference to ${import_path53.default.basename(overlayPath)}`));
850693
+ const relPath = import_path54.default.relative(context3.cwd, await editor.getApiFilePath());
850694
+ context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: removed reference to ${import_path54.default.basename(overlayPath)}`));
850678
850695
  }
850679
850696
  }
850680
850697
  }
@@ -850727,7 +850744,7 @@ init_lib6();
850727
850744
  init_source();
850728
850745
  var import_child_process6 = require("child_process");
850729
850746
  var import_promises68 = require("fs/promises");
850730
- var import_path54 = __toESM(require("path"), 1);
850747
+ var import_path55 = __toESM(require("path"), 1);
850731
850748
  var import_util17 = require("util");
850732
850749
 
850733
850750
  // ../cli-v2/lib/commands/api/split/deriveOutputPath.js
@@ -850826,7 +850843,7 @@ var SplitCommand = class {
850826
850843
  */
850827
850844
  async handleStdoutPreview(context3, entries24, format3) {
850828
850845
  if (entries24.length > 1) {
850829
- const names2 = entries24.map((e2) => import_path54.default.basename(e2.specFilePath)).join(", ");
850846
+ const names2 = entries24.map((e2) => import_path55.default.basename(e2.specFilePath)).join(", ");
850830
850847
  throw new CliError({
850831
850848
  message: `--output "-" requires --api to select a single spec, but ${entries24.length} matched: ${names2}.`,
850832
850849
  code: CliError.Code.ConfigError
@@ -850872,8 +850889,8 @@ var SplitCommand = class {
850872
850889
  }
850873
850890
  const edit = await editor.addOverlay(entry.specFilePath, outputPath);
850874
850891
  if (edit != null) {
850875
- const relPath = import_path54.default.relative(context3.cwd, await editor.getApiFilePath());
850876
- context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: added reference to ${import_path54.default.basename(outputPath)}`));
850892
+ const relPath = import_path55.default.relative(context3.cwd, await editor.getApiFilePath());
850893
+ context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: added reference to ${import_path55.default.basename(outputPath)}`));
850877
850894
  }
850878
850895
  }
850879
850896
  async splitAsOverrides(context3, editor, entry, originalContent, currentContent, outputArg) {
@@ -850887,8 +850904,8 @@ var SplitCommand = class {
850887
850904
  }
850888
850905
  const edit = await editor.addOverride(entry.specFilePath, outputPath);
850889
850906
  if (edit != null) {
850890
- const relPath = import_path54.default.relative(context3.cwd, await editor.getApiFilePath());
850891
- context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: added reference to ${import_path54.default.basename(outputPath)}`));
850907
+ const relPath = import_path55.default.relative(context3.cwd, await editor.getApiFilePath());
850908
+ context3.stderr.info(source_default.dim(`${relPath}:${edit.line}: added reference to ${import_path55.default.basename(outputPath)}`));
850892
850909
  }
850893
850910
  }
850894
850911
  /**
@@ -850932,7 +850949,7 @@ var SplitCommand = class {
850932
850949
  }
850933
850950
  async getFileFromGitHead(repoRoot, absolutePath) {
850934
850951
  try {
850935
- const relativePath = import_path54.default.relative(repoRoot, absolutePath);
850952
+ const relativePath = import_path55.default.relative(repoRoot, absolutePath);
850936
850953
  const { stdout } = await execFileAsync5("git", ["show", `HEAD:${relativePath}`], {
850937
850954
  cwd: repoRoot,
850938
850955
  encoding: "utf8",
@@ -850950,7 +850967,7 @@ var SplitCommand = class {
850950
850967
  }
850951
850968
  async getRepoRoot(nearPath) {
850952
850969
  const { stdout } = await execFileAsync5("git", ["rev-parse", "--show-toplevel"], {
850953
- cwd: import_path54.default.dirname(nearPath),
850970
+ cwd: import_path55.default.dirname(nearPath),
850954
850971
  encoding: "utf8"
850955
850972
  });
850956
850973
  return stdout.trim();
@@ -884878,7 +884895,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
884878
884895
  var LOGS_FOLDER_NAME = "logs";
884879
884896
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
884880
884897
  function getCliSource() {
884881
- const version7 = "5.102.0";
884898
+ const version7 = "5.103.0";
884882
884899
  return `cli@${version7}`;
884883
884900
  }
884884
884901
  var DebugLogger = class {
@@ -904552,6 +904569,7 @@ function writeGroupPage(group, dir, writer2, written) {
904552
904569
  var import_promises116 = require("fs/promises");
904553
904570
  init_lib4();
904554
904571
  init_lib8();
904572
+ init_lib11();
904555
904573
  init_lib6();
904556
904574
  init_source();
904557
904575
 
@@ -904587,6 +904605,7 @@ async function runLocalParser({ context: context3, sourcePath, language, config:
904587
904605
  await (0, import_promises115.writeFile)(configFile.path, JSON.stringify({
904588
904606
  packagePath: config5.packagePath,
904589
904607
  sourceUrl: config5.sourceUrl,
904608
+ branch: config5.branch,
904590
904609
  doxyfileContent: config5.doxyfileContent
904591
904610
  }));
904592
904611
  await runContainer({
@@ -905567,16 +905586,35 @@ async function generateIrRemotely({ client: client3, name: name2, config: config
905567
905586
  });
905568
905587
  }
905569
905588
  async function generateIrLocally({ context: context3, name: name2, config: config5, docsDirectoryPath, language, doxyfileContent, wrapStep }) {
905589
+ let sourcePath;
905590
+ let parserConfig;
905570
905591
  if (isGitLibraryInput2(config5.input)) {
905571
- throw new CliError({
905572
- message: `Library '${name2}': 'git' inputs are generated remotely, not with --local. For --local, use a 'path' input pointing at a local checkout of the library.`,
905573
- code: CliError.Code.ConfigError
905592
+ const gitInput = config5.input;
905593
+ const clonePath = await wrapStep({
905594
+ message: `Library '${name2}': cloning ${gitInput.git}${gitInput.ref != null ? ` (ref: ${gitInput.ref})` : ""}`,
905595
+ operation: () => cloneRepositoryAtRef({ repositoryUrl: gitInput.git, ref: gitInput.ref })
905574
905596
  });
905597
+ if (gitInput.subpath != null) {
905598
+ resolveRepositorySubpath({
905599
+ repositoryRoot: clonePath,
905600
+ subpath: gitInput.subpath,
905601
+ description: `subpath for library '${name2}'`
905602
+ });
905603
+ }
905604
+ sourcePath = AbsoluteFilePath2.of(clonePath);
905605
+ parserConfig = {
905606
+ packagePath: gitInput.subpath,
905607
+ sourceUrl: gitInput.git,
905608
+ branch: gitInput.ref,
905609
+ doxyfileContent
905610
+ };
905611
+ } else {
905612
+ sourcePath = resolve6(docsDirectoryPath, config5.input.path);
905613
+ parserConfig = { doxyfileContent };
905575
905614
  }
905576
- const sourcePath = resolve6(docsDirectoryPath, config5.input.path);
905577
905615
  const ir3 = await wrapStep({
905578
905616
  message: `Library '${name2}': parsing library source locally`,
905579
- operation: () => runLocalParser({ context: context3, sourcePath, language, config: { doxyfileContent } })
905617
+ operation: () => runLocalParser({ context: context3, sourcePath, language, config: parserConfig })
905580
905618
  });
905581
905619
  validateLibraryIr(ir3, language, name2);
905582
905620
  return ir3;
@@ -910943,7 +910981,7 @@ var LegacyDocsPublisher = class {
910943
910981
  previewId,
910944
910982
  disableTemplates: void 0,
910945
910983
  skipUpload,
910946
- cliVersion: "5.102.0",
910984
+ cliVersion: "5.103.0",
910947
910985
  loginCommand: "fern auth login"
910948
910986
  });
910949
910987
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -978314,7 +978352,7 @@ function getAutomationContextFromEnv() {
978314
978352
  config_branch: process.env.FERN_CONFIG_BRANCH,
978315
978353
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
978316
978354
  trigger: process.env.GITHUB_EVENT_NAME,
978317
- cli_version: "5.102.0"
978355
+ cli_version: "5.103.0"
978318
978356
  };
978319
978357
  }
978320
978358
  function isAutomationMode() {
@@ -979146,7 +979184,7 @@ var CliContext = class _CliContext {
979146
979184
  if (false) {
979147
979185
  this.logger.error("CLI_VERSION is not defined");
979148
979186
  }
979149
- return "5.102.0";
979187
+ return "5.103.0";
979150
979188
  }
979151
979189
  getCliName() {
979152
979190
  if (false) {