@fern-api/fern-api-dev 5.55.0 → 5.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.cjs +372 -174
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -44766,15 +44766,6 @@ var init_MockTaskContext = __esm({
44766
44766
  });
44767
44767
 
44768
44768
  // ../task-context/lib/index.js
44769
- var lib_exports3 = {};
44770
- __export(lib_exports3, {
44771
- CliError: () => CliError,
44772
- TaskAbortSignal: () => TaskAbortSignal,
44773
- TaskResult: () => TaskResult,
44774
- createMockTaskContext: () => createMockTaskContext,
44775
- resolveErrorCode: () => resolveErrorCode,
44776
- shouldReportToSentry: () => shouldReportToSentry
44777
- });
44778
44769
  var init_lib6 = __esm({
44779
44770
  "../task-context/lib/index.js"() {
44780
44771
  "use strict";
@@ -53821,8 +53812,8 @@ var init_waitUntilPathExists = __esm({
53821
53812
  });
53822
53813
 
53823
53814
  // ../../commons/fs-utils/lib/index.js
53824
- var lib_exports4 = {};
53825
- __export(lib_exports4, {
53815
+ var lib_exports3 = {};
53816
+ __export(lib_exports3, {
53826
53817
  AbsoluteFilePath: () => AbsoluteFilePath2,
53827
53818
  RelativeFilePath: () => RelativeFilePath2,
53828
53819
  basename: () => basename3,
@@ -97679,8 +97670,8 @@ var init_getOrUpdateBranch = __esm({
97679
97670
  });
97680
97671
 
97681
97672
  // ../../commons/github/lib/index.js
97682
- var lib_exports5 = {};
97683
- __export(lib_exports5, {
97673
+ var lib_exports4 = {};
97674
+ __export(lib_exports4, {
97684
97675
  ClonedRepository: () => ClonedRepository,
97685
97676
  cloneRepository: () => cloneRepository,
97686
97677
  createOrUpdatePullRequest: () => createOrUpdatePullRequest,
@@ -240086,8 +240077,8 @@ var require_whatwg_url = __commonJS({
240086
240077
  });
240087
240078
 
240088
240079
  // ../../../node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.mjs
240089
- var lib_exports6 = {};
240090
- __export(lib_exports6, {
240080
+ var lib_exports5 = {};
240081
+ __export(lib_exports5, {
240091
240082
  AbortError: () => AbortError2,
240092
240083
  FetchError: () => FetchError,
240093
240084
  Headers: () => Headers2,
@@ -241389,12 +241380,12 @@ var require_getFetchFn = __commonJS({
241389
241380
  return fetch;
241390
241381
  }
241391
241382
  if (runtime_1.RUNTIME.type === "node") {
241392
- return (yield Promise.resolve().then(() => __importStar2((init_lib18(), __toCommonJS(lib_exports6))))).default;
241383
+ return (yield Promise.resolve().then(() => __importStar2((init_lib18(), __toCommonJS(lib_exports5))))).default;
241393
241384
  }
241394
241385
  if (typeof fetch == "function") {
241395
241386
  return fetch;
241396
241387
  }
241397
- return (yield Promise.resolve().then(() => __importStar2((init_lib18(), __toCommonJS(lib_exports6))))).default;
241388
+ return (yield Promise.resolve().then(() => __importStar2((init_lib18(), __toCommonJS(lib_exports5))))).default;
241398
241389
  });
241399
241390
  }
241400
241391
  exports2.getFetchFn = getFetchFn3;
@@ -279194,16 +279185,16 @@ var init_ConjureImporter = __esm({
279194
279185
  });
279195
279186
  }
279196
279187
  for (const [endpointName, endpointDeclaration] of Object.entries(serviceDeclaration.endpoints ?? {})) {
279197
- const endpointLocator = parseEndpointLocator(endpointDeclaration.http);
279198
- if (endpointLocator.type === "failure") {
279188
+ const endpointLocator2 = parseEndpointLocator(endpointDeclaration.http);
279189
+ if (endpointLocator2.type === "failure") {
279199
279190
  this.context?.logger.error(`Failed to parse ${endpointDeclaration.http}. Skipping.`);
279200
279191
  continue;
279201
279192
  }
279202
279193
  const auth8 = endpointDeclaration.auth ?? serviceDeclaration.defaultAuth;
279203
279194
  const endpoint3 = {
279204
279195
  auth: auth8 === ConjureAuthDefinitionType.None ? false : true,
279205
- path: endpointLocator.path,
279206
- method: endpointLocator.method,
279196
+ path: endpointLocator2.path,
279197
+ method: endpointLocator2.method,
279207
279198
  response: endpointDeclaration.returns === "binary" ? "file" : endpointDeclaration.returns
279208
279199
  };
279209
279200
  if (endpointDeclaration.docs != null) {
@@ -279211,7 +279202,7 @@ var init_ConjureImporter = __esm({
279211
279202
  }
279212
279203
  const pathParameters = {};
279213
279204
  if (endpointDeclaration.args != null) {
279214
- for (const pathParameter of endpointLocator.pathParameters) {
279205
+ for (const pathParameter of endpointLocator2.pathParameters) {
279215
279206
  const pathParameterType = endpointDeclaration.args[pathParameter];
279216
279207
  if (pathParameterType == null) {
279217
279208
  throw new CliError({
@@ -329708,8 +329699,8 @@ var require_lib6 = __commonJS({
329708
329699
  });
329709
329700
 
329710
329701
  // ../../../node_modules/.pnpm/node-fetch-h2@2.3.0/node_modules/node-fetch-h2/lib/index.mjs
329711
- var lib_exports8 = {};
329712
- __export(lib_exports8, {
329702
+ var lib_exports7 = {};
329703
+ __export(lib_exports7, {
329713
329704
  FetchError: () => FetchError2,
329714
329705
  Headers: () => Headers5,
329715
329706
  Request: () => Request7,
@@ -336843,7 +336834,7 @@ var require_oas_resolver = __commonJS({
336843
336834
  var fs34 = require("fs");
336844
336835
  var path119 = require("path");
336845
336836
  var url3 = require("url");
336846
- var fetch6 = (init_lib28(), __toCommonJS(lib_exports8));
336837
+ var fetch6 = (init_lib28(), __toCommonJS(lib_exports7));
336847
336838
  var yaml3 = require_yaml();
336848
336839
  var jptr = require_jptr().jptr;
336849
336840
  var recurse = require_recurse().recurse;
@@ -337485,7 +337476,7 @@ var require_swagger2openapi = __commonJS({
337485
337476
  var url3 = require("url");
337486
337477
  var pathlib = require("path");
337487
337478
  var maybe = require_maybe();
337488
- var fetch6 = (init_lib28(), __toCommonJS(lib_exports8));
337479
+ var fetch6 = (init_lib28(), __toCommonJS(lib_exports7));
337489
337480
  var yaml3 = require_yaml();
337490
337481
  var jptr = require_jptr();
337491
337482
  var resolveInternal = jptr.jptr;
@@ -354970,8 +354961,8 @@ var init_createLoggingExecutable = __esm({
354970
354961
  });
354971
354962
 
354972
354963
  // ../../commons/logging-execa/lib/index.js
354973
- var lib_exports9 = {};
354974
- __export(lib_exports9, {
354964
+ var lib_exports8 = {};
354965
+ __export(lib_exports8, {
354975
354966
  createLoggingExecutable: () => createLoggingExecutable,
354976
354967
  loggingExeca: () => loggingExeca,
354977
354968
  runExeca: () => runExeca
@@ -366781,8 +366772,8 @@ var init_GraphQLConverter = __esm({
366781
366772
  });
366782
366773
 
366783
366774
  // ../api-importers/graphql/lib/index.js
366784
- var lib_exports10 = {};
366785
- __export(lib_exports10, {
366775
+ var lib_exports9 = {};
366776
+ __export(lib_exports9, {
366786
366777
  GraphQLConverter: () => GraphQLConverter
366787
366778
  });
366788
366779
  var init_lib34 = __esm({
@@ -367002,7 +366993,7 @@ var init_OSSWorkspace = __esm({
367002
366993
  return Object.keys(this.graphqlTypes).length;
367003
366994
  }
367004
366995
  async processGraphQLSpecs(context3) {
367005
- const { GraphQLConverter: GraphQLConverter2 } = await Promise.resolve().then(() => (init_lib34(), lib_exports10));
366996
+ const { GraphQLConverter: GraphQLConverter2 } = await Promise.resolve().then(() => (init_lib34(), lib_exports9));
367006
366997
  const graphqlSpecs = this.allSpecs.filter((spec) => spec.type === "graphql");
367007
366998
  for (const spec of graphqlSpecs) {
367008
366999
  try {
@@ -449574,8 +449565,8 @@ var init_transformAtPrefixImports = __esm({
449574
449565
  });
449575
449566
 
449576
449567
  // ../docs-markdown-utils/lib/index.js
449577
- var lib_exports11 = {};
449578
- __export(lib_exports11, {
449568
+ var lib_exports10 = {};
449569
+ __export(lib_exports10, {
449579
449570
  extractAttributeValueLiteral: () => extractAttributeValueLiteral,
449580
449571
  extractSingleLiteral: () => extractSingleLiteral,
449581
449572
  getMarkdownFormat: () => getMarkdownFormat,
@@ -449612,100 +449603,229 @@ var init_lib64 = __esm({
449612
449603
  });
449613
449604
 
449614
449605
  // ../docs-resolver/lib/applyTranslatedApiTitlesToNavTree.js
449615
- function applyTranslatedApiTitlesToNavTree(root6, baseApis, translatedApis) {
449616
- const mapsByApiId = /* @__PURE__ */ new Map();
449617
- for (const [apiId, translatedApi] of Object.entries(translatedApis)) {
449618
- const holder = navigation_exports.ApiDefinitionHolder.create(translatedApi);
449619
- const endpoints = /* @__PURE__ */ new Map();
449620
- for (const [id, endpoint3] of holder.endpoints) {
449621
- if (endpoint3.name != null && endpoint3.name.length > 0) {
449622
- endpoints.set(id, endpoint3.name);
449623
- }
449606
+ function stringifyPathPartsForLocator(path119) {
449607
+ return path119.map((part) => part.type === "literal" ? part.value : "{}").join("");
449608
+ }
449609
+ function endpointLocator(endpoint3) {
449610
+ return `${endpoint3.method} ${stringifyPathPartsForLocator(endpoint3.path.parts)}`;
449611
+ }
449612
+ function webhookLocator(webhook) {
449613
+ return `${webhook.method} ${webhook.path.join("/")}`;
449614
+ }
449615
+ function webSocketLocator(webSocket) {
449616
+ return `WSS ${stringifyPathPartsForLocator(webSocket.path.parts)}`;
449617
+ }
449618
+ function nonEmptyTitle(name2) {
449619
+ return name2 != null && name2.length > 0 ? name2 : void 0;
449620
+ }
449621
+ function subpackageTitle(pkg2) {
449622
+ return pkg2.displayName ?? titleCase(pkg2.name);
449623
+ }
449624
+ function subpackageLocators(pkg2) {
449625
+ return [
449626
+ ...pkg2.endpoints.map(endpointLocator),
449627
+ ...pkg2.webhooks.map(webhookLocator),
449628
+ ...pkg2.websockets.map(webSocketLocator)
449629
+ ];
449630
+ }
449631
+ function buildResolverForKind(baseEntries, translatedEntries, locatorOf, titleOf) {
449632
+ const translatedIdByLocator = /* @__PURE__ */ new Map();
449633
+ for (const [navId, def] of translatedEntries) {
449634
+ if (!translatedIdByLocator.has(locatorOf(def))) {
449635
+ translatedIdByLocator.set(locatorOf(def), navId);
449624
449636
  }
449625
- const webhooks2 = /* @__PURE__ */ new Map();
449626
- for (const [id, webhook] of holder.webhooks) {
449627
- if (webhook.name != null && webhook.name.length > 0) {
449628
- webhooks2.set(id, webhook.name);
449629
- }
449637
+ }
449638
+ return (baseNavId) => {
449639
+ const exact = translatedEntries.get(baseNavId);
449640
+ if (exact != null) {
449641
+ return { translatedId: baseNavId, title: titleOf(exact) };
449630
449642
  }
449631
- const webSockets = /* @__PURE__ */ new Map();
449632
- for (const [id, webSocket] of holder.webSockets) {
449633
- if (webSocket.name != null && webSocket.name.length > 0) {
449634
- webSockets.set(id, webSocket.name);
449643
+ const baseDef = baseEntries.get(baseNavId);
449644
+ if (baseDef == null) {
449645
+ return void 0;
449646
+ }
449647
+ const translatedId = translatedIdByLocator.get(locatorOf(baseDef));
449648
+ if (translatedId == null) {
449649
+ return void 0;
449650
+ }
449651
+ const translatedDef = translatedEntries.get(translatedId);
449652
+ return { translatedId, title: translatedDef != null ? titleOf(translatedDef) : void 0 };
449653
+ };
449654
+ }
449655
+ function buildPackagesByBaseTitle(baseApi, translatedApi) {
449656
+ const packagesByBaseTitle = /* @__PURE__ */ new Map();
449657
+ for (const [subpackageId, translatedSubpackage] of Object.entries(translatedApi.subpackages)) {
449658
+ const baseSubpackage = baseApi.subpackages[subpackageId];
449659
+ if (baseSubpackage == null) {
449660
+ continue;
449661
+ }
449662
+ const baseTitle = subpackageTitle(baseSubpackage);
449663
+ const translatedTitle = subpackageTitle(translatedSubpackage);
449664
+ if (baseTitle !== translatedTitle) {
449665
+ packagesByBaseTitle.set(baseTitle, translatedTitle);
449666
+ }
449667
+ }
449668
+ const baseTitleByLocator = /* @__PURE__ */ new Map();
449669
+ for (const baseSubpackage of Object.values(baseApi.subpackages)) {
449670
+ const baseTitle = subpackageTitle(baseSubpackage);
449671
+ for (const locator of subpackageLocators(baseSubpackage)) {
449672
+ if (!baseTitleByLocator.has(locator)) {
449673
+ baseTitleByLocator.set(locator, baseTitle);
449635
449674
  }
449636
449675
  }
449637
- const graphql4 = /* @__PURE__ */ new Map();
449638
- for (const [id, operation] of holder.graphqlOperations) {
449639
- const name2 = operation.displayName ?? operation.name;
449640
- if (name2 != null && name2.length > 0) {
449641
- graphql4.set(id, name2);
449676
+ }
449677
+ for (const translatedSubpackage of Object.values(translatedApi.subpackages)) {
449678
+ const translatedTitle = subpackageTitle(translatedSubpackage);
449679
+ for (const locator of subpackageLocators(translatedSubpackage)) {
449680
+ const baseTitle = baseTitleByLocator.get(locator);
449681
+ if (baseTitle != null && baseTitle !== translatedTitle && !packagesByBaseTitle.has(baseTitle)) {
449682
+ packagesByBaseTitle.set(baseTitle, translatedTitle);
449642
449683
  }
449643
449684
  }
449644
- const packagesByBaseTitle = /* @__PURE__ */ new Map();
449685
+ }
449686
+ return packagesByBaseTitle;
449687
+ }
449688
+ function buildApiTranslationResolvers(baseApis, translatedApis) {
449689
+ const resolvers = /* @__PURE__ */ new Map();
449690
+ for (const [apiId, translatedApi] of Object.entries(translatedApis)) {
449645
449691
  const baseApi = baseApis[apiId];
449646
- if (baseApi != null) {
449647
- for (const [subpackageId, translatedSubpackage] of Object.entries(translatedApi.subpackages)) {
449648
- const baseSubpackage = baseApi.subpackages[subpackageId];
449649
- if (baseSubpackage == null) {
449650
- continue;
449651
- }
449652
- const baseTitle = baseSubpackage.displayName ?? titleCase(baseSubpackage.name);
449653
- const translatedTitle = translatedSubpackage.displayName ?? titleCase(translatedSubpackage.name);
449654
- if (baseTitle !== translatedTitle) {
449655
- packagesByBaseTitle.set(baseTitle, translatedTitle);
449656
- }
449692
+ if (baseApi == null) {
449693
+ continue;
449694
+ }
449695
+ const baseHolder = navigation_exports.ApiDefinitionHolder.create(baseApi);
449696
+ const translatedHolder = navigation_exports.ApiDefinitionHolder.create(translatedApi);
449697
+ const resolveEndpoint = buildResolverForKind(baseHolder.endpoints, translatedHolder.endpoints, endpointLocator, (endpoint3) => nonEmptyTitle(endpoint3.name));
449698
+ const resolveWebhook = buildResolverForKind(baseHolder.webhooks, translatedHolder.webhooks, webhookLocator, (webhook) => nonEmptyTitle(webhook.name));
449699
+ const resolveWebSocket = buildResolverForKind(baseHolder.webSockets, translatedHolder.webSockets, webSocketLocator, (webSocket) => nonEmptyTitle(webSocket.name));
449700
+ const graphqlTitlesById = /* @__PURE__ */ new Map();
449701
+ for (const [id, operation] of translatedHolder.graphqlOperations) {
449702
+ const name2 = operation.displayName ?? operation.name;
449703
+ const title2 = nonEmptyTitle(name2);
449704
+ if (title2 != null) {
449705
+ graphqlTitlesById.set(id, title2);
449657
449706
  }
449658
449707
  }
449659
- mapsByApiId.set(apiId, { endpoints, webhooks: webhooks2, webSockets, graphql: graphql4, packagesByBaseTitle });
449708
+ resolvers.set(apiId, {
449709
+ resolveEndpoint,
449710
+ resolveWebhook,
449711
+ resolveWebSocket,
449712
+ graphqlTitlesById,
449713
+ packagesByBaseTitle: buildPackagesByBaseTitle(baseApi, translatedApi)
449714
+ });
449660
449715
  }
449661
- const clone5 = structuredClone(root6);
449662
- const visit5 = (node4) => {
449663
- if (node4 == null || typeof node4 !== "object") {
449716
+ return resolvers;
449717
+ }
449718
+ function getApiDefinitionId(node4) {
449719
+ return typeof node4.apiDefinitionId === "string" ? node4.apiDefinitionId : void 0;
449720
+ }
449721
+ function visitNavigationNodes(node4, callback) {
449722
+ if (node4 == null || typeof node4 !== "object") {
449723
+ return;
449724
+ }
449725
+ if (Array.isArray(node4)) {
449726
+ for (const item of node4) {
449727
+ visitNavigationNodes(item, callback);
449728
+ }
449729
+ return;
449730
+ }
449731
+ const obj = node4;
449732
+ callback(obj);
449733
+ for (const value2 of Object.values(obj)) {
449734
+ visitNavigationNodes(value2, callback);
449735
+ }
449736
+ }
449737
+ function findIncompatibleTranslatedApiIds(root6, baseApis, translatedApis) {
449738
+ const incompatible = /* @__PURE__ */ new Set();
449739
+ for (const apiId of Object.keys(translatedApis)) {
449740
+ if (baseApis[apiId] == null) {
449741
+ incompatible.add(apiId);
449742
+ }
449743
+ }
449744
+ if (root6 == null) {
449745
+ return incompatible;
449746
+ }
449747
+ const resolvers = buildApiTranslationResolvers(baseApis, translatedApis);
449748
+ visitNavigationNodes(root6, (obj) => {
449749
+ const apiDefinitionId = getApiDefinitionId(obj);
449750
+ if (apiDefinitionId == null || incompatible.has(apiDefinitionId)) {
449751
+ return;
449752
+ }
449753
+ const resolver2 = resolvers.get(apiDefinitionId);
449754
+ if (resolver2 == null) {
449664
449755
  return;
449665
449756
  }
449666
- if (Array.isArray(node4)) {
449667
- for (const item of node4) {
449668
- visit5(item);
449757
+ const type7 = obj.type;
449758
+ if (type7 === "endpoint" && typeof obj.endpointId === "string") {
449759
+ if (resolver2.resolveEndpoint(obj.endpointId) == null) {
449760
+ incompatible.add(apiDefinitionId);
449669
449761
  }
449762
+ } else if (type7 === "webhook" && typeof obj.webhookId === "string") {
449763
+ if (resolver2.resolveWebhook(obj.webhookId) == null) {
449764
+ incompatible.add(apiDefinitionId);
449765
+ }
449766
+ } else if (type7 === "webSocket" && typeof obj.webSocketId === "string") {
449767
+ if (resolver2.resolveWebSocket(obj.webSocketId) == null) {
449768
+ incompatible.add(apiDefinitionId);
449769
+ }
449770
+ }
449771
+ });
449772
+ return incompatible;
449773
+ }
449774
+ function applyTranslatedApiTitlesToNavTree(root6, baseApis, translatedApis, options2) {
449775
+ const resolvers = buildApiTranslationResolvers(baseApis, translatedApis);
449776
+ const rewritableApiIds = options2?.rewritableApiIds;
449777
+ const canRewriteIds = (apiDefinitionId) => rewritableApiIds == null || rewritableApiIds.has(apiDefinitionId);
449778
+ const clone5 = structuredClone(root6);
449779
+ visitNavigationNodes(clone5, (obj) => {
449780
+ const apiDefinitionId = getApiDefinitionId(obj);
449781
+ const resolver2 = apiDefinitionId != null ? resolvers.get(apiDefinitionId) : void 0;
449782
+ if (resolver2 == null || apiDefinitionId == null) {
449670
449783
  return;
449671
449784
  }
449672
- const obj = node4;
449673
- const apiDefinitionId = typeof obj.apiDefinitionId === "string" ? obj.apiDefinitionId : void 0;
449674
- const maps = apiDefinitionId != null ? mapsByApiId.get(apiDefinitionId) : void 0;
449675
- if (maps != null) {
449676
- const type7 = obj.type;
449677
- if (type7 === "endpoint" && typeof obj.endpointId === "string") {
449678
- const translated = maps.endpoints.get(obj.endpointId);
449679
- if (translated != null) {
449680
- obj.title = translated;
449785
+ const rewriteIds = canRewriteIds(apiDefinitionId);
449786
+ const type7 = obj.type;
449787
+ if (type7 === "endpoint" && typeof obj.endpointId === "string") {
449788
+ const match3 = resolver2.resolveEndpoint(obj.endpointId);
449789
+ if (match3 != null) {
449790
+ if (rewriteIds) {
449791
+ obj.endpointId = match3.translatedId;
449681
449792
  }
449682
- } else if (type7 === "webhook" && typeof obj.webhookId === "string") {
449683
- const translated = maps.webhooks.get(obj.webhookId);
449684
- if (translated != null) {
449685
- obj.title = translated;
449793
+ if (match3.title != null) {
449794
+ obj.title = match3.title;
449686
449795
  }
449687
- } else if (type7 === "webSocket" && typeof obj.webSocketId === "string") {
449688
- const translated = maps.webSockets.get(obj.webSocketId);
449689
- if (translated != null) {
449690
- obj.title = translated;
449796
+ }
449797
+ } else if (type7 === "webhook" && typeof obj.webhookId === "string") {
449798
+ const match3 = resolver2.resolveWebhook(obj.webhookId);
449799
+ if (match3 != null) {
449800
+ if (rewriteIds) {
449801
+ obj.webhookId = match3.translatedId;
449691
449802
  }
449692
- } else if (type7 === "graphql" && typeof obj.graphqlOperationId === "string") {
449693
- const translated = maps.graphql.get(obj.graphqlOperationId);
449694
- if (translated != null) {
449695
- obj.title = translated;
449803
+ if (match3.title != null) {
449804
+ obj.title = match3.title;
449696
449805
  }
449697
- } else if (type7 === "apiPackage" && typeof obj.title === "string") {
449698
- const translated = maps.packagesByBaseTitle.get(obj.title);
449699
- if (translated != null) {
449700
- obj.title = translated;
449806
+ }
449807
+ } else if (type7 === "webSocket" && typeof obj.webSocketId === "string") {
449808
+ const match3 = resolver2.resolveWebSocket(obj.webSocketId);
449809
+ if (match3 != null) {
449810
+ if (rewriteIds) {
449811
+ obj.webSocketId = match3.translatedId;
449812
+ }
449813
+ if (match3.title != null) {
449814
+ obj.title = match3.title;
449701
449815
  }
449702
449816
  }
449817
+ } else if (type7 === "graphql" && typeof obj.graphqlOperationId === "string") {
449818
+ const translated = resolver2.graphqlTitlesById.get(obj.graphqlOperationId);
449819
+ if (translated != null) {
449820
+ obj.title = translated;
449821
+ }
449822
+ } else if (type7 === "apiPackage" && typeof obj.title === "string") {
449823
+ const translated = resolver2.packagesByBaseTitle.get(obj.title);
449824
+ if (translated != null) {
449825
+ obj.title = translated;
449826
+ }
449703
449827
  }
449704
- for (const value2 of Object.values(obj)) {
449705
- visit5(value2);
449706
- }
449707
- };
449708
- visit5(clone5);
449828
+ });
449709
449829
  return clone5;
449710
449830
  }
449711
449831
  var init_applyTranslatedApiTitlesToNavTree = __esm({
@@ -561695,8 +561815,8 @@ var init_runDocker = __esm({
561695
561815
  });
561696
561816
 
561697
561817
  // ../generation/local-generation/docker-utils/lib/index.js
561698
- var lib_exports14 = {};
561699
- __export(lib_exports14, {
561818
+ var lib_exports13 = {};
561819
+ __export(lib_exports13, {
561700
561820
  copyFromContainer: () => copyFromContainer,
561701
561821
  copyToContainer: () => copyToContainer,
561702
561822
  execInContainer: () => execInContainer,
@@ -561850,9 +561970,7 @@ var require_AutoVersioningService = __commonJS({
561850
561970
  exports2.AutoVersioningService = exports2.AutoVersioningException = void 0;
561851
561971
  exports2.countFilesInDiff = countFilesInDiff3;
561852
561972
  exports2.formatSizeKB = formatSizeKB3;
561853
- var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
561854
- var logging_execa_1 = (init_lib33(), __toCommonJS(lib_exports9));
561855
- var task_context_1 = (init_lib6(), __toCommonJS(lib_exports3));
561973
+ var logging_execa_1 = (init_lib33(), __toCommonJS(lib_exports8));
561856
561974
  var fs_1 = require("fs");
561857
561975
  var promises_1 = require("fs/promises");
561858
561976
  var path_1 = require("path");
@@ -561894,6 +562012,43 @@ var require_AutoVersioningService = __commonJS({
561894
562012
  function formatSizeKB3(charLength) {
561895
562013
  return (charLength / 1024).toFixed(1);
561896
562014
  }
562015
+ var EXCLUDED_DIRECTORIES = /* @__PURE__ */ new Set([
562016
+ // Version control
562017
+ ".git",
562018
+ // Dependency directories
562019
+ "vendor",
562020
+ "node_modules",
562021
+ "Pods",
562022
+ // Python environments and caches
562023
+ ".venv",
562024
+ "venv",
562025
+ "__pycache__",
562026
+ ".tox",
562027
+ ".mypy_cache",
562028
+ ".pytest_cache",
562029
+ ".ruff_cache",
562030
+ // Build output directories
562031
+ "build",
562032
+ "dist",
562033
+ "out",
562034
+ "target",
562035
+ "bin",
562036
+ "obj",
562037
+ // Build tool caches
562038
+ ".gradle",
562039
+ ".mvn",
562040
+ // Framework build caches
562041
+ ".next",
562042
+ ".nuxt",
562043
+ ".cache",
562044
+ // IDE directories
562045
+ ".idea",
562046
+ ".vscode",
562047
+ ".eclipse",
562048
+ // Language-specific tool caches
562049
+ ".dart_tool",
562050
+ ".swiftpm"
562051
+ ]);
561897
562052
  var EXCLUDED_FILE_PATTERNS = [
561898
562053
  // Documentation / generated reference
561899
562054
  /(?:^|\/)reference\.md$/i,
@@ -562490,34 +562645,37 @@ var require_AutoVersioningService = __commonJS({
562490
562645
  */
562491
562646
  async replaceMagicVersion(workingDirectory, mappedMagicVersion, finalVersion) {
562492
562647
  this.logger.debug(`Replacing placeholder version ${mappedMagicVersion} with final version: ${finalVersion}`);
562493
- const sedCommand = `s/${this.escapeForSed(mappedMagicVersion)}/${this.escapeForSed(finalVersion)}/g`;
562494
- let isGNUSed = false;
562495
- try {
562496
- await (0, logging_execa_1.loggingExeca)(this.logger, "sed", ["--version"], {
562497
- doNotPipeOutput: true
562498
- });
562499
- isGNUSed = true;
562500
- } catch {
562501
- isGNUSed = false;
562502
- }
562503
- let command3;
562504
- if (isGNUSed) {
562505
- command3 = `find "${workingDirectory}" -type f -not -path "*/.git/*" -exec sed -i '${sedCommand}' {} +`;
562506
- } else {
562507
- command3 = `find "${workingDirectory}" -type f -not -path "*/.git/*" -exec sed -i '' '${sedCommand}' {} +`;
562508
- }
562648
+ const files = await this.walkDirectory(workingDirectory, () => true);
562649
+ const replaceInFile = async (filePath) => {
562650
+ if (await this.isBinaryFile(filePath)) {
562651
+ return false;
562652
+ }
562653
+ const content5 = await (0, promises_1.readFile)(filePath, "utf-8");
562654
+ if (!content5.includes(mappedMagicVersion)) {
562655
+ return false;
562656
+ }
562657
+ const updated = content5.split(mappedMagicVersion).join(finalVersion);
562658
+ await (0, promises_1.writeFile)(filePath, updated, "utf-8");
562659
+ return true;
562660
+ };
562661
+ const results = await this.processInParallel(files, replaceInFile);
562662
+ const replacedCount = results.filter(Boolean).length;
562663
+ this.logger.debug(`Placeholder version replaced successfully in ${replacedCount} file(s)`);
562664
+ }
562665
+ async isBinaryFile(filePath) {
562666
+ const fileHandle = await (0, promises_1.open)(filePath, "r");
562509
562667
  try {
562510
- await (0, logging_execa_1.loggingExeca)(this.logger, "bash", ["-c", command3], {
562511
- cwd: workingDirectory,
562512
- doNotPipeOutput: true
562513
- });
562514
- } catch (error50) {
562515
- throw new task_context_1.CliError({
562516
- message: `Failed to replace placeholder version in generated files: ${(0, core_utils_1.extractErrorMessage)(error50)}`,
562517
- code: task_context_1.CliError.Code.UserError
562518
- });
562668
+ const header = Buffer.alloc(8192);
562669
+ const { bytesRead } = await fileHandle.read(header, 0, 8192, 0);
562670
+ for (let i5 = 0; i5 < bytesRead; i5++) {
562671
+ if (header[i5] === 0) {
562672
+ return true;
562673
+ }
562674
+ }
562675
+ return false;
562676
+ } finally {
562677
+ await fileHandle.close();
562519
562678
  }
562520
- this.logger.debug("Placeholder version replaced successfully");
562521
562679
  }
562522
562680
  /**
562523
562681
  * Adds /vN suffix to Go module paths and import statements when the computed
@@ -562606,9 +562764,12 @@ var require_AutoVersioningService = __commonJS({
562606
562764
  const entries24 = await (0, promises_1.readdir)(dir);
562607
562765
  for (const entry of entries24) {
562608
562766
  const fullPath = (0, path_1.join)(dir, entry);
562609
- const entryStat = await (0, promises_1.stat)(fullPath);
562767
+ const entryStat = await (0, promises_1.lstat)(fullPath);
562768
+ if (entryStat.isSymbolicLink()) {
562769
+ continue;
562770
+ }
562610
562771
  if (entryStat.isDirectory()) {
562611
- if (entry === ".git" || entry === "vendor") {
562772
+ if (EXCLUDED_DIRECTORIES.has(entry)) {
562612
562773
  continue;
562613
562774
  }
562614
562775
  const subResults = await this.walkDirectory(fullPath, filter8);
@@ -562619,14 +562780,22 @@ var require_AutoVersioningService = __commonJS({
562619
562780
  }
562620
562781
  return results;
562621
562782
  }
562783
+ static CONCURRENCY_LIMIT = 32;
562784
+ async processInParallel(items, fn2) {
562785
+ const results = [];
562786
+ for (let i5 = 0; i5 < items.length; i5 += _AutoVersioningService.CONCURRENCY_LIMIT) {
562787
+ const batch = items.slice(i5, i5 + _AutoVersioningService.CONCURRENCY_LIMIT);
562788
+ const batchResults = await Promise.all(batch.map(fn2));
562789
+ results.push(...batchResults);
562790
+ }
562791
+ return results;
562792
+ }
562622
562793
  /**
562623
562794
  * Adds a version suffix to import paths in all .go files in the repository.
562624
562795
  */
562625
562796
  async addSuffixToGoFiles(repoRoot, modulePath, suffix) {
562626
562797
  const goFiles = await this.walkDirectory(repoRoot, (filePath) => (0, path_1.extname)(filePath) === ".go");
562627
- for (const filePath of goFiles) {
562628
- await this.addSuffixToGoFile(filePath, modulePath, suffix);
562629
- }
562798
+ await this.processInParallel(goFiles, (filePath) => this.addSuffixToGoFile(filePath, modulePath, suffix));
562630
562799
  }
562631
562800
  /**
562632
562801
  * Adds a version suffix to import paths in a single .go file.
@@ -562666,12 +562835,6 @@ var require_AutoVersioningService = __commonJS({
562666
562835
  this.logger.debug(`Updated Go imports in ${filePath}`);
562667
562836
  }
562668
562837
  }
562669
- /**
562670
- * Escapes special characters for use in sed command.
562671
- */
562672
- escapeForSed(str2) {
562673
- return str2.replace(/[/&]/g, "\\$&");
562674
- }
562675
562838
  /**
562676
562839
  * Extracts the file path from a diff file section.
562677
562840
  * Parses the "diff --git a/path b/path" header line.
@@ -563622,8 +563785,8 @@ var init_types191 = __esm({
563622
563785
  });
563623
563786
 
563624
563787
  // ../ai/lib/index.js
563625
- var lib_exports15 = {};
563626
- __export(lib_exports15, {
563788
+ var lib_exports14 = {};
563789
+ __export(lib_exports14, {
563627
563790
  VersionBump: () => VersionBump2,
563628
563791
  loadBamlDependencies: () => loadBamlDependencies
563629
563792
  });
@@ -563721,7 +563884,7 @@ var require_AutoVersionStep = __commonJS({
563721
563884
  const { service, language, mappedMagicVersion, commit } = params2;
563722
563885
  const initialVersion = this.config.baseVersion ?? (mappedMagicVersion.startsWith("v") ? "v0.0.1" : "0.0.1");
563723
563886
  if (!(0, index_1.isValidSemver)(initialVersion)) {
563724
- const errorMessage = `AutoVersionStep: baseVersion ${JSON.stringify(initialVersion)} is not a valid semver string (expected e.g. "1.2.3" or "v1.2.3"). Refusing to run to avoid shell injection into the placeholder-rewrite step.`;
563887
+ const errorMessage = `AutoVersionStep: baseVersion ${JSON.stringify(initialVersion)} is not a valid semver string (expected e.g. "1.2.3" or "v1.2.3"). Refusing to run.`;
563725
563888
  this.logger.error(errorMessage);
563726
563889
  return {
563727
563890
  executed: true,
@@ -564328,7 +564491,7 @@ ${newBlock}${remainder}`;
564328
564491
  if (this.config.ai == null) {
564329
564492
  throw new Error("AutoVersionStep: ai config is missing. Set autoVersion.ai to a BAML provider+model pair.");
564330
564493
  }
564331
- const { loadBamlDependencies: loadBamlDependencies2, VersionBump: VersionBump3 } = await Promise.resolve().then(() => __importStar2((init_lib69(), __toCommonJS(lib_exports15))));
564494
+ const { loadBamlDependencies: loadBamlDependencies2, VersionBump: VersionBump3 } = await Promise.resolve().then(() => __importStar2((init_lib69(), __toCommonJS(lib_exports14))));
564332
564495
  const { BamlClient, configureBamlClient: configureBamlClient2 } = await loadBamlDependencies2();
564333
564496
  const registry2 = configureBamlClient2(this.config.ai);
564334
564497
  return {
@@ -580044,7 +580207,7 @@ var require_GithubStep = __commonJS({
580044
580207
  exports2.shouldPushGenerationBaseTag = shouldPushGenerationBaseTag;
580045
580208
  exports2.resolveBranchAction = resolveBranchAction;
580046
580209
  var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
580047
- var github_1 = (init_lib11(), __toCommonJS(lib_exports5));
580210
+ var github_1 = (init_lib11(), __toCommonJS(lib_exports4));
580048
580211
  var rest_1 = (init_dist_src9(), __toCommonJS(dist_src_exports));
580049
580212
  var promises_1 = require("fs/promises");
580050
580213
  var path_1 = require("path");
@@ -580587,7 +580750,7 @@ var require_VerificationStep = __commonJS({
580587
580750
  Object.defineProperty(exports2, "__esModule", { value: true });
580588
580751
  exports2.VerificationStep = void 0;
580589
580752
  var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
580590
- var docker_utils_1 = (init_lib68(), __toCommonJS(lib_exports14));
580753
+ var docker_utils_1 = (init_lib68(), __toCommonJS(lib_exports13));
580591
580754
  var logger_1 = (init_lib5(), __toCommonJS(lib_exports2));
580592
580755
  var fs_1 = require("fs");
580593
580756
  var path_1 = require("path");
@@ -607555,7 +607718,7 @@ var require_ReadmeGenerator = __commonJS({
607555
607718
  "use strict";
607556
607719
  Object.defineProperty(exports2, "__esModule", { value: true });
607557
607720
  exports2.ReadmeGenerator = void 0;
607558
- var github_1 = (init_lib11(), __toCommonJS(lib_exports5));
607721
+ var github_1 = (init_lib11(), __toCommonJS(lib_exports4));
607559
607722
  var compat_1 = require_compat2();
607560
607723
  var string_1 = require_string3();
607561
607724
  var index_js_1 = require_sdk();
@@ -608548,8 +608711,8 @@ var require_GitHub = __commonJS({
608548
608711
  "use strict";
608549
608712
  Object.defineProperty(exports2, "__esModule", { value: true });
608550
608713
  exports2.GitHub = void 0;
608551
- var fs_utils_1 = (init_lib8(), __toCommonJS(lib_exports4));
608552
- var github_1 = (init_lib11(), __toCommonJS(lib_exports5));
608714
+ var fs_utils_1 = (init_lib8(), __toCommonJS(lib_exports3));
608715
+ var github_1 = (init_lib11(), __toCommonJS(lib_exports4));
608553
608716
  var rest_1 = (init_dist_src9(), __toCommonJS(dist_src_exports));
608554
608717
  var GitHub = class {
608555
608718
  githubConfig;
@@ -608740,7 +608903,7 @@ var require_replay_init = __commonJS({
608740
608903
  Object.defineProperty(exports2, "__esModule", { value: true });
608741
608904
  exports2.replayInit = replayInit3;
608742
608905
  exports2.formatBootstrapSummary = formatBootstrapSummary3;
608743
- var github_1 = (init_lib11(), __toCommonJS(lib_exports5));
608906
+ var github_1 = (init_lib11(), __toCommonJS(lib_exports4));
608744
608907
  var replay_1 = require_dist24();
608745
608908
  var fs_1 = require("fs");
608746
608909
  var path_1 = require("path");
@@ -611050,8 +611213,8 @@ var require_Fetcher3 = __commonJS({
611050
611213
  const fetchFn = runtime_1.RUNTIME.type === "node" ? (
611051
611214
  // `.default` is required due to this issue:
611052
611215
  // https://github.com/node-fetch/node-fetch/issues/450#issuecomment-387045223
611053
- (init_lib18(), __toCommonJS(lib_exports6)).default
611054
- ) : typeof fetch == "function" ? fetch : (init_lib18(), __toCommonJS(lib_exports6)).default;
611216
+ (init_lib18(), __toCommonJS(lib_exports5)).default
611217
+ ) : typeof fetch == "function" ? fetch : (init_lib18(), __toCommonJS(lib_exports5)).default;
611055
611218
  const makeRequest3 = () => __awaiter36(this, void 0, void 0, function* () {
611056
611219
  const controller = new AbortController();
611057
611220
  let abortId = void 0;
@@ -686793,7 +686956,7 @@ var AccessTokenPosthogManager = class {
686793
686956
  properties: {
686794
686957
  ...event,
686795
686958
  ...event.properties,
686796
- version: "5.55.0",
686959
+ version: "5.55.1",
686797
686960
  usingAccessToken: true,
686798
686961
  ...getRunIdProperties()
686799
686962
  }
@@ -686859,7 +687022,7 @@ var UserPosthogManager = class {
686859
687022
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
686860
687023
  event: "CLI",
686861
687024
  properties: {
686862
- version: "5.55.0",
687025
+ version: "5.55.1",
686863
687026
  ...event,
686864
687027
  ...event.properties,
686865
687028
  usingAccessToken: false,
@@ -864646,7 +864809,7 @@ var MdxParseValidator = class {
864646
864809
  navigation: parsedConfig.navigation
864647
864810
  });
864648
864811
  const filesToCheck = Array.from(new Set(allPages));
864649
- const { parseMarkdownToTree: parseMarkdownToTree2 } = await Promise.resolve().then(() => (init_lib64(), lib_exports11));
864812
+ const { parseMarkdownToTree: parseMarkdownToTree2 } = await Promise.resolve().then(() => (init_lib64(), lib_exports10));
864650
864813
  const errorOrNulls = await Promise.all(filesToCheck.map(async (filepath) => {
864651
864814
  const content5 = await (0, import_promises89.readFile)(filepath, "utf-8");
864652
864815
  try {
@@ -867953,7 +868116,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
867953
868116
  var LOGS_FOLDER_NAME = "logs";
867954
868117
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
867955
868118
  function getCliSource() {
867956
- const version7 = "5.55.0";
868119
+ const version7 = "5.55.1";
867957
868120
  return `cli@${version7}`;
867958
868121
  }
867959
868122
  var DebugLogger = class {
@@ -871602,10 +871765,24 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
871602
871765
  translatedNavbarLinks = localeNavOverlay.navbarLinks;
871603
871766
  }
871604
871767
  }
871768
+ const baseApis = docsDefinition.apis;
871605
871769
  const localeApis = translatedApiDefinitions?.[locale];
871606
- const translatedApis = localeApis != null ? { ...docsDefinition.apis, ...localeApis } : docsDefinition.apis;
871770
+ let servedLocaleApis = localeApis;
871771
+ let rewritableApiIds;
871607
871772
  if (localeApis != null && updatedRoot != null) {
871608
- updatedRoot = applyTranslatedApiTitlesToNavTree(updatedRoot, docsDefinition.apis, localeApis);
871773
+ const incompatibleApiIds = findIncompatibleTranslatedApiIds(updatedRoot, baseApis, localeApis);
871774
+ if (incompatibleApiIds.size > 0) {
871775
+ context3.logger.warn(`Translated API definition(s) [${Array.from(incompatibleApiIds).join(", ")}] for locale "${locale}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`);
871776
+ servedLocaleApis = Object.fromEntries(Object.entries(localeApis).filter(([apiId]) => !incompatibleApiIds.has(apiId)));
871777
+ }
871778
+ rewritableApiIds = new Set(Object.keys(localeApis).filter((apiId) => !incompatibleApiIds.has(apiId)));
871779
+ }
871780
+ const hasServedLocaleApis = servedLocaleApis != null && Object.keys(servedLocaleApis).length > 0;
871781
+ const translatedApis = hasServedLocaleApis ? { ...docsDefinition.apis, ...servedLocaleApis } : docsDefinition.apis;
871782
+ if (localeApis != null && Object.keys(localeApis).length > 0 && updatedRoot != null) {
871783
+ updatedRoot = applyTranslatedApiTitlesToNavTree(updatedRoot, baseApis, localeApis, {
871784
+ rewritableApiIds
871785
+ });
871609
871786
  }
871610
871787
  const translatedDefinition = {
871611
871788
  ...docsDefinition,
@@ -898783,8 +898960,19 @@ async function buildAllTranslationInputs({ docsDefinition, git, apiDefinitions,
898783
898960
  }
898784
898961
  }
898785
898962
  }
898963
+ const incompatibleApiIds = findIncompatibleTranslatedApiIds(translatedDefinition.config.root, baseReadApis, translatedApisForTitles);
898964
+ if (incompatibleApiIds.size > 0) {
898965
+ context3.logger.warn(`Translated API definition(s) [${Array.from(incompatibleApiIds).join(", ")}] for locale "${locale}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`);
898966
+ for (const apiId of incompatibleApiIds) {
898967
+ const baseDef = apiDefinitions.get(apiId);
898968
+ if (baseDef != null) {
898969
+ localeApiDefinitions.set(apiId, baseDef);
898970
+ }
898971
+ }
898972
+ }
898973
+ const rewritableApiIds = new Set(Object.keys(translatedApisForTitles).filter((apiId) => !incompatibleApiIds.has(apiId)));
898786
898974
  if (Object.keys(translatedApisForTitles).length > 0) {
898787
- translatedDefinition.config.root = applyTranslatedApiTitlesToNavTree(translatedDefinition.config.root, baseReadApis, translatedApisForTitles);
898975
+ translatedDefinition.config.root = applyTranslatedApiTitlesToNavTree(translatedDefinition.config.root, baseReadApis, translatedApisForTitles, { rewritableApiIds });
898788
898976
  }
898789
898977
  }
898790
898978
  }
@@ -899528,8 +899716,16 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
899528
899716
  translatedApisForTitles[baseApiId] = translatedRead;
899529
899717
  }
899530
899718
  }
899531
- updatedRoot = Object.keys(translatedApisForTitles).length > 0 ? applyTranslatedApiTitlesToNavTree(updatedRoot, baseApisForTitles, translatedApisForTitles) : structuredClone(updatedRoot);
899719
+ const incompatibleApiIds = findIncompatibleTranslatedApiIds(updatedRoot, baseApisForTitles, translatedApisForTitles);
899720
+ if (incompatibleApiIds.size > 0) {
899721
+ context3.logger.warn(`Translated API definition(s) [${Array.from(incompatibleApiIds).join(", ")}] for locale "${locale}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`);
899722
+ }
899723
+ const rewritableApiIds = new Set(Object.keys(translatedApisForTitles).filter((apiId) => !incompatibleApiIds.has(apiId)));
899724
+ updatedRoot = Object.keys(translatedApisForTitles).length > 0 ? applyTranslatedApiTitlesToNavTree(updatedRoot, baseApisForTitles, translatedApisForTitles, { rewritableApiIds }) : structuredClone(updatedRoot);
899532
899725
  for (const [baseApiId, translatedApiId] of localeApiIdMap) {
899726
+ if (incompatibleApiIds.has(baseApiId)) {
899727
+ continue;
899728
+ }
899533
899729
  updateApiDefinitionIdInTree(updatedRoot, baseApiId, translatedApiId);
899534
899730
  }
899535
899731
  }
@@ -900173,11 +900369,13 @@ async function runRemoteGenerationForDocsWorkspace({ organization, apiWorkspaces
900173
900369
  context3.failAndThrow(`More than one docs instances. Please specify one (e.g. --instance ${instances2[0]?.url})`, void 0, { code: CliError.Code.ConfigError });
900174
900370
  return;
900175
900371
  }
900176
- const maybeInstance = instances2.find((instance) => instance.url === instanceUrl) ?? instances2[0];
900372
+ const maybeInstance = instanceUrl != null ? instances2.find((instance) => instance.url === instanceUrl) : instances2[0];
900177
900373
  if (maybeInstance == null) {
900178
- context3.failAndThrow(`No docs instance with url ${instanceUrl}. Failed to register.`, void 0, {
900179
- code: CliError.Code.ConfigError
900180
- });
900374
+ const available = instances2.map((inst) => ` - ${inst.url}`).join("\n");
900375
+ context3.failAndThrow(instanceUrl != null ? `No docs instance found matching '${instanceUrl}'.
900376
+
900377
+ Available instances:
900378
+ ${available}` : `No docs instance found. Failed to register.`, void 0, { code: CliError.Code.ConfigError });
900181
900379
  return;
900182
900380
  }
900183
900381
  const customDomains = (typeof maybeInstance.customDomain === "string" ? [maybeInstance.customDomain] : maybeInstance.customDomain ?? []).map(stripCustomDomainProtocol);
@@ -900272,7 +900470,7 @@ var LegacyDocsPublisher = class {
900272
900470
  previewId,
900273
900471
  disableTemplates: void 0,
900274
900472
  skipUpload,
900275
- cliVersion: "5.55.0",
900473
+ cliVersion: "5.55.1",
900276
900474
  loginCommand: "fern auth login"
900277
900475
  });
900278
900476
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -966541,7 +966739,7 @@ function getAutomationContextFromEnv() {
966541
966739
  config_branch: process.env.FERN_CONFIG_BRANCH,
966542
966740
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
966543
966741
  trigger: process.env.GITHUB_EVENT_NAME,
966544
- cli_version: "5.55.0"
966742
+ cli_version: "5.55.1"
966545
966743
  };
966546
966744
  }
966547
966745
  function isAutomationMode() {
@@ -967373,7 +967571,7 @@ var CliContext = class _CliContext {
967373
967571
  if (false) {
967374
967572
  this.logger.error("CLI_VERSION is not defined");
967375
967573
  }
967376
- return "5.55.0";
967574
+ return "5.55.1";
967377
967575
  }
967378
967576
  getCliName() {
967379
967577
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.55.0",
2
+ "version": "5.55.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",