@fern-api/fern-api-dev 5.10.2 → 5.10.3-3-g561dcaed21b

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 +199 -95
  2. package/package.json +2 -2
package/cli.cjs CHANGED
@@ -357065,18 +357065,18 @@ var require_VersionUtils = __commonJS({
357065
357065
  exports2.MAX_AI_DIFF_BYTES = 4e4;
357066
357066
  exports2.MAX_CHUNKS = 40;
357067
357067
  exports2.MAX_RAW_DIFF_BYTES = 1e7;
357068
- var VersionBump2;
357069
- (function(VersionBump3) {
357070
- VersionBump3["MAJOR"] = "MAJOR";
357071
- VersionBump3["MINOR"] = "MINOR";
357072
- VersionBump3["PATCH"] = "PATCH";
357073
- VersionBump3["NO_CHANGE"] = "NO_CHANGE";
357074
- })(VersionBump2 || (exports2.VersionBump = VersionBump2 = {}));
357068
+ var VersionBump3;
357069
+ (function(VersionBump4) {
357070
+ VersionBump4["MAJOR"] = "MAJOR";
357071
+ VersionBump4["MINOR"] = "MINOR";
357072
+ VersionBump4["PATCH"] = "PATCH";
357073
+ VersionBump4["NO_CHANGE"] = "NO_CHANGE";
357074
+ })(VersionBump3 || (exports2.VersionBump = VersionBump3 = {}));
357075
357075
  var VERSION_BUMP_RANK = {
357076
- [VersionBump2.MAJOR]: 3,
357077
- [VersionBump2.MINOR]: 2,
357078
- [VersionBump2.PATCH]: 1,
357079
- [VersionBump2.NO_CHANGE]: 0
357076
+ [VersionBump3.MAJOR]: 3,
357077
+ [VersionBump3.MINOR]: 2,
357078
+ [VersionBump3.PATCH]: 1,
357079
+ [VersionBump3.NO_CHANGE]: 0
357080
357080
  };
357081
357081
  function maxVersionBump3(a3, b8) {
357082
357082
  return (VERSION_BUMP_RANK[a3] ?? 0) >= (VERSION_BUMP_RANK[b8] ?? 0) ? a3 : b8;
@@ -357100,16 +357100,16 @@ var require_VersionUtils = __commonJS({
357100
357100
  const preRelease = matcher[5];
357101
357101
  const buildMetadata = matcher[6];
357102
357102
  let preserveMetadata = false;
357103
- if (versionBump === VersionBump2.MAJOR) {
357103
+ if (versionBump === VersionBump3.MAJOR) {
357104
357104
  major2++;
357105
357105
  minor = 0;
357106
357106
  patch5 = 0;
357107
- } else if (versionBump === VersionBump2.MINOR) {
357107
+ } else if (versionBump === VersionBump3.MINOR) {
357108
357108
  minor++;
357109
357109
  patch5 = 0;
357110
- } else if (versionBump === VersionBump2.PATCH) {
357110
+ } else if (versionBump === VersionBump3.PATCH) {
357111
357111
  patch5++;
357112
- } else if (versionBump === VersionBump2.NO_CHANGE) {
357112
+ } else if (versionBump === VersionBump3.NO_CHANGE) {
357113
357113
  preserveMetadata = true;
357114
357114
  } else {
357115
357115
  throw new AutoVersioningService_js_1.AutoVersioningException("Unknown version bump type: " + versionBump);
@@ -357628,11 +357628,11 @@ var VersionBump;
357628
357628
  var init_types5 = __esm({
357629
357629
  "../ai/lib/baml_client/types.js"() {
357630
357630
  "use strict";
357631
- (function(VersionBump2) {
357632
- VersionBump2["MAJOR"] = "MAJOR";
357633
- VersionBump2["MINOR"] = "MINOR";
357634
- VersionBump2["PATCH"] = "PATCH";
357635
- VersionBump2["NO_CHANGE"] = "NO_CHANGE";
357631
+ (function(VersionBump3) {
357632
+ VersionBump3["MAJOR"] = "MAJOR";
357633
+ VersionBump3["MINOR"] = "MINOR";
357634
+ VersionBump3["PATCH"] = "PATCH";
357635
+ VersionBump3["NO_CHANGE"] = "NO_CHANGE";
357636
357636
  })(VersionBump || (VersionBump = {}));
357637
357637
  }
357638
357638
  });
@@ -357662,6 +357662,24 @@ var init_watchers = __esm({
357662
357662
  });
357663
357663
 
357664
357664
  // ../ai/lib/baml_client/index.js
357665
+ var baml_client_exports = {};
357666
+ __export(baml_client_exports, {
357667
+ BamlClientFinishReasonError: () => import_baml6.BamlClientFinishReasonError,
357668
+ BamlClientHttpError: () => import_baml6.BamlClientHttpError,
357669
+ BamlValidationError: () => import_baml6.BamlValidationError,
357670
+ VersionBump: () => VersionBump,
357671
+ all_succeeded: () => all_succeeded,
357672
+ b: () => b7,
357673
+ flush: () => flush2,
357674
+ get_checks: () => get_checks,
357675
+ onLogEvent: () => onLogEvent,
357676
+ resetBamlEnvVars: () => resetBamlEnvVars,
357677
+ setTags: () => setTags2,
357678
+ traceAsync: () => traceAsync,
357679
+ traceSync: () => traceSync,
357680
+ version: () => version5,
357681
+ watchers: () => watchers_exports
357682
+ });
357665
357683
  var import_baml5, import_baml6, version5;
357666
357684
  var init_baml_client = __esm({
357667
357685
  "../ai/lib/baml_client/index.js"() {
@@ -357679,6 +357697,10 @@ var init_baml_client = __esm({
357679
357697
  });
357680
357698
 
357681
357699
  // ../ai/lib/configureBamlClient.js
357700
+ var configureBamlClient_exports = {};
357701
+ __export(configureBamlClient_exports, {
357702
+ configureBamlClient: () => configureBamlClient
357703
+ });
357682
357704
  function configureBamlClient(config5) {
357683
357705
  const registry2 = new import_baml7.ClientRegistry();
357684
357706
  const clientOptions = {
@@ -357699,31 +357721,59 @@ var init_configureBamlClient = __esm({
357699
357721
  }
357700
357722
  });
357701
357723
 
357724
+ // ../ai/lib/loader.js
357725
+ async function loadBamlDependencies() {
357726
+ try {
357727
+ const [baml, bamlClient, config5] = await Promise.all([
357728
+ import("@boundaryml/baml"),
357729
+ Promise.resolve().then(() => (init_baml_client(), baml_client_exports)),
357730
+ Promise.resolve().then(() => (init_configureBamlClient(), configureBamlClient_exports))
357731
+ ]);
357732
+ return {
357733
+ ClientRegistry: baml.ClientRegistry,
357734
+ BamlClient: bamlClient.b,
357735
+ configureBamlClient: config5.configureBamlClient
357736
+ };
357737
+ } catch (error50) {
357738
+ const original = error50 instanceof Error ? error50.message : String(error50);
357739
+ throw new Error(`${INSTALL_MESSAGE}
357740
+
357741
+ Original error: ${original}`);
357742
+ }
357743
+ }
357744
+ var INSTALL_MESSAGE;
357745
+ var init_loader = __esm({
357746
+ "../ai/lib/loader.js"() {
357747
+ "use strict";
357748
+ INSTALL_MESSAGE = "@boundaryml/baml is required for AI features (auto-versioning, sdk-diff).\nInstall it with:\n npm install @boundaryml/baml\n pnpm add @boundaryml/baml";
357749
+ }
357750
+ });
357751
+
357752
+ // ../ai/lib/types.js
357753
+ var VersionBump2;
357754
+ var init_types6 = __esm({
357755
+ "../ai/lib/types.js"() {
357756
+ "use strict";
357757
+ (function(VersionBump3) {
357758
+ VersionBump3["MAJOR"] = "MAJOR";
357759
+ VersionBump3["MINOR"] = "MINOR";
357760
+ VersionBump3["PATCH"] = "PATCH";
357761
+ VersionBump3["NO_CHANGE"] = "NO_CHANGE";
357762
+ })(VersionBump2 || (VersionBump2 = {}));
357763
+ }
357764
+ });
357765
+
357702
357766
  // ../ai/lib/index.js
357703
357767
  var lib_exports11 = {};
357704
357768
  __export(lib_exports11, {
357705
- BamlClientFinishReasonError: () => import_baml6.BamlClientFinishReasonError,
357706
- BamlClientHttpError: () => import_baml6.BamlClientHttpError,
357707
- BamlValidationError: () => import_baml6.BamlValidationError,
357708
- VersionBump: () => VersionBump,
357709
- all_succeeded: () => all_succeeded,
357710
- b: () => b7,
357711
- configureBamlClient: () => configureBamlClient,
357712
- flush: () => flush2,
357713
- get_checks: () => get_checks,
357714
- onLogEvent: () => onLogEvent,
357715
- resetBamlEnvVars: () => resetBamlEnvVars,
357716
- setTags: () => setTags2,
357717
- traceAsync: () => traceAsync,
357718
- traceSync: () => traceSync,
357719
- version: () => version5,
357720
- watchers: () => watchers_exports
357769
+ VersionBump: () => VersionBump2,
357770
+ loadBamlDependencies: () => loadBamlDependencies
357721
357771
  });
357722
357772
  var init_lib12 = __esm({
357723
357773
  "../ai/lib/index.js"() {
357724
357774
  "use strict";
357725
- init_baml_client();
357726
- init_configureBamlClient();
357775
+ init_loader();
357776
+ init_types6();
357727
357777
  }
357728
357778
  });
357729
357779
 
@@ -358124,9 +358174,9 @@ ${newBlock}${remainder}`;
358124
358174
  return `${message.trimEnd()}${FERN_TRAILER}`;
358125
358175
  }
358126
358176
  async analyzeSingle(cleanedDiff, language, previousVersion) {
358127
- const { client: client3, VersionBump: VersionBump2 } = await this.loadBaml();
358177
+ const { client: client3, VersionBump: VersionBump3 } = await this.loadBaml();
358128
358178
  const result = await client3.AnalyzeSdkDiff(cleanedDiff, language, previousVersion, this.config.priorChangelog ?? "", this.config.specCommitMessage ?? "");
358129
- if (result.version_bump === VersionBump2.NO_CHANGE) {
358179
+ if (result.version_bump === VersionBump3.NO_CHANGE) {
358130
358180
  return null;
358131
358181
  }
358132
358182
  return {
@@ -358137,8 +358187,8 @@ ${newBlock}${remainder}`;
358137
358187
  };
358138
358188
  }
358139
358189
  async analyzeChunks(chunks, language, previousVersion) {
358140
- const { client: client3, VersionBump: VersionBump2 } = await this.loadBaml();
358141
- let bestBump = VersionBump2.NO_CHANGE;
358190
+ const { client: client3, VersionBump: VersionBump3 } = await this.loadBaml();
358191
+ let bestBump = VersionBump3.NO_CHANGE;
358142
358192
  let bestMessage = "";
358143
358193
  let bestVersionBumpReason;
358144
358194
  const changelogEntries = [];
@@ -358148,7 +358198,7 @@ ${newBlock}${remainder}`;
358148
358198
  continue;
358149
358199
  }
358150
358200
  const analysis = await client3.AnalyzeSdkDiff(chunk2, language, previousVersion, this.config.priorChangelog ?? "", this.config.specCommitMessage ?? "");
358151
- if (analysis.version_bump === VersionBump2.NO_CHANGE) {
358201
+ if (analysis.version_bump === VersionBump3.NO_CHANGE) {
358152
358202
  continue;
358153
358203
  }
358154
358204
  const prev = bestBump;
@@ -358162,7 +358212,7 @@ ${newBlock}${remainder}`;
358162
358212
  changelogEntries.push(entry);
358163
358213
  }
358164
358214
  }
358165
- if (bestBump === VersionBump2.NO_CHANGE) {
358215
+ if (bestBump === VersionBump3.NO_CHANGE) {
358166
358216
  return null;
358167
358217
  }
358168
358218
  if (changelogEntries.length <= 1) {
@@ -358203,11 +358253,12 @@ ${newBlock}${remainder}`;
358203
358253
  if (this.config.ai == null) {
358204
358254
  throw new Error("AutoVersionStep: ai config is missing. Set autoVersion.ai to a BAML provider+model pair.");
358205
358255
  }
358206
- const cliAi = await Promise.resolve().then(() => __importStar2((init_lib12(), __toCommonJS(lib_exports11))));
358207
- const registry2 = cliAi.configureBamlClient(this.config.ai);
358256
+ const { loadBamlDependencies: loadBamlDependencies2, VersionBump: VersionBump3 } = await Promise.resolve().then(() => __importStar2((init_lib12(), __toCommonJS(lib_exports11))));
358257
+ const { BamlClient, configureBamlClient: configureBamlClient2 } = await loadBamlDependencies2();
358258
+ const registry2 = configureBamlClient2(this.config.ai);
358208
358259
  return {
358209
- client: cliAi.b.withOptions({ clientRegistry: registry2 }),
358210
- VersionBump: cliAi.VersionBump
358260
+ client: BamlClient.withOptions({ clientRegistry: registry2 }),
358261
+ VersionBump: VersionBump3
358211
358262
  };
358212
358263
  }
358213
358264
  /**
@@ -392321,7 +392372,7 @@ var init_NodeWebSocketTransport = __esm({
392321
392372
 
392322
392373
  // ../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js
392323
392374
  var Browser3, BrowserPlatform, BrowserTag, ChromeReleaseChannel;
392324
- var init_types6 = __esm({
392375
+ var init_types7 = __esm({
392325
392376
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js"() {
392326
392377
  "use strict";
392327
392378
  (function(Browser5) {
@@ -419518,7 +419569,7 @@ var init_chrome = __esm({
419518
419569
  import_node_path28 = __toESM(require("path"), 1);
419519
419570
  import_semver14 = __toESM(require_semver2(), 1);
419520
419571
  init_httpUtil();
419521
- init_types6();
419572
+ init_types7();
419522
419573
  baseVersionUrl = "https://googlechromelabs.github.io/chrome-for-testing";
419523
419574
  WINDOWS_ENV_PARAM_NAMES = [
419524
419575
  "PROGRAMFILES",
@@ -419574,7 +419625,7 @@ var init_chrome_headless_shell = __esm({
419574
419625
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js"() {
419575
419626
  "use strict";
419576
419627
  import_node_path29 = __toESM(require("path"), 1);
419577
- init_types6();
419628
+ init_types7();
419578
419629
  init_chrome();
419579
419630
  }
419580
419631
  });
@@ -419619,7 +419670,7 @@ var init_chromedriver = __esm({
419619
419670
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js"() {
419620
419671
  "use strict";
419621
419672
  import_node_path30 = __toESM(require("path"), 1);
419622
- init_types6();
419673
+ init_types7();
419623
419674
  init_chrome();
419624
419675
  }
419625
419676
  });
@@ -419684,7 +419735,7 @@ var init_chromium = __esm({
419684
419735
  "use strict";
419685
419736
  import_node_path31 = __toESM(require("path"), 1);
419686
419737
  init_httpUtil();
419687
- init_types6();
419738
+ init_types7();
419688
419739
  }
419689
419740
  });
419690
419741
 
@@ -420034,7 +420085,7 @@ var init_firefox = __esm({
420034
420085
  import_node_fs21 = __toESM(require("fs"), 1);
420035
420086
  import_node_path32 = __toESM(require("path"), 1);
420036
420087
  init_httpUtil();
420037
- init_types6();
420088
+ init_types7();
420038
420089
  (function(FirefoxChannel2) {
420039
420090
  FirefoxChannel2["STABLE"] = "stable";
420040
420091
  FirefoxChannel2["ESR"] = "esr";
@@ -420207,7 +420258,7 @@ var init_browser_data = __esm({
420207
420258
  init_chromedriver();
420208
420259
  init_chromium();
420209
420260
  init_firefox();
420210
- init_types6();
420261
+ init_types7();
420211
420262
  downloadUrls = {
420212
420263
  [Browser3.CHROMEDRIVER]: resolveDownloadUrl3,
420213
420264
  [Browser3.CHROMEHEADLESSSHELL]: resolveDownloadUrl2,
@@ -424686,7 +424737,7 @@ var init_main = __esm({
424686
424737
  init_browser_data();
424687
424738
  init_CLI();
424688
424739
  init_Cache();
424689
- init_types6();
424740
+ init_types7();
424690
424741
  init_DefaultProvider();
424691
424742
  init_provider();
424692
424743
  }
@@ -623221,7 +623272,7 @@ var AccessTokenPosthogManager = class {
623221
623272
  properties: {
623222
623273
  ...event,
623223
623274
  ...event.properties,
623224
- version: "5.10.2",
623275
+ version: "5.10.3-3-g561dcaed21b",
623225
623276
  usingAccessToken: true
623226
623277
  }
623227
623278
  });
@@ -623275,7 +623326,7 @@ var UserPosthogManager = class {
623275
623326
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
623276
623327
  event: "CLI",
623277
623328
  properties: {
623278
- version: "5.10.2",
623329
+ version: "5.10.3-3-g561dcaed21b",
623279
623330
  ...event,
623280
623331
  ...event.properties,
623281
623332
  usingAccessToken: false,
@@ -805267,14 +805318,18 @@ function applyChildOverlays(children2, parent, overlay) {
805267
805318
  });
805268
805319
  }
805269
805320
  if (parentType === "tabbed") {
805321
+ const orderedTabIds = collectOrderedTabIds(overlay);
805322
+ let tabIndex = 0;
805270
805323
  return children2.map((child) => {
805271
805324
  const childObj = child;
805272
805325
  if (childObj == null || typeof childObj !== "object") {
805273
805326
  return walkAndApply(child, overlay);
805274
805327
  }
805275
805328
  if (childObj["type"] === "tab") {
805329
+ const positionalTabId = orderedTabIds[tabIndex];
805330
+ tabIndex++;
805276
805331
  const walked = walkAndApply(child, overlay);
805277
- return applyTabOverlayToNode(walked, overlay);
805332
+ return applyTabOverlayToNode(walked, overlay, positionalTabId);
805278
805333
  }
805279
805334
  return walkAndApply(child, overlay);
805280
805335
  });
@@ -805360,20 +805415,29 @@ function applyVersionOverlayToNode(node4, versionOverlay) {
805360
805415
  }
805361
805416
  return node4;
805362
805417
  }
805363
- function applyTabOverlayToNode(node4, overlay) {
805418
+ function applyTabOverlayToNode(node4, overlay, positionalTabId) {
805364
805419
  const tabSlug = extractLastSlugSegment(node4["slug"]);
805420
+ let appliedTabId;
805365
805421
  if (overlay.tabs != null && tabSlug != null) {
805366
805422
  for (const [tabId, tabOverlay] of Object.entries(overlay.tabs)) {
805367
805423
  const isMatch = tabId === tabSlug || tabOverlay.slug != null && tabOverlay.slug === tabSlug;
805368
805424
  if (isMatch && tabOverlay.displayName != null) {
805369
805425
  node4["title"] = tabOverlay.displayName;
805426
+ appliedTabId = tabId;
805370
805427
  break;
805371
805428
  }
805372
805429
  }
805373
805430
  }
805374
- const tabNavOverlay = findTabNavOverlay(tabSlug, overlay);
805431
+ if (appliedTabId == null && positionalTabId != null && overlay.tabs != null) {
805432
+ const tabOverlayEntry = overlay.tabs[positionalTabId];
805433
+ if (tabOverlayEntry?.displayName != null) {
805434
+ node4["title"] = tabOverlayEntry.displayName;
805435
+ appliedTabId = positionalTabId;
805436
+ }
805437
+ }
805438
+ const tabNavOverlay = findTabNavOverlay(tabSlug, overlay, positionalTabId);
805375
805439
  if (tabNavOverlay != null) {
805376
- if (overlay.tabs != null) {
805440
+ if (overlay.tabs != null && appliedTabId == null) {
805377
805441
  const tabOverlayEntry = overlay.tabs[tabNavOverlay.tabId];
805378
805442
  if (tabOverlayEntry?.displayName != null) {
805379
805443
  node4["title"] = tabOverlayEntry.displayName;
@@ -805402,7 +805466,7 @@ function applyTabOverlayToNode(node4, overlay) {
805402
805466
  }
805403
805467
  return walkAndApply(node4, overlay);
805404
805468
  }
805405
- function findTabNavOverlay(tabSlug, overlay) {
805469
+ function findTabNavOverlay(tabSlug, overlay, positionalTabId) {
805406
805470
  if (overlay.navigation == null) {
805407
805471
  return void 0;
805408
805472
  }
@@ -805420,8 +805484,27 @@ function findTabNavOverlay(tabSlug, overlay) {
805420
805484
  }
805421
805485
  }
805422
805486
  }
805487
+ if (positionalTabId != null) {
805488
+ for (const navItem of overlay.navigation) {
805489
+ if (navItem.type === "tab" && navItem.tabId === positionalTabId) {
805490
+ return navItem;
805491
+ }
805492
+ }
805493
+ }
805423
805494
  return void 0;
805424
805495
  }
805496
+ function collectOrderedTabIds(overlay) {
805497
+ if (overlay.navigation != null) {
805498
+ const fromNavigation = overlay.navigation.filter((item) => item.type === "tab").map((item) => item.tabId);
805499
+ if (fromNavigation.length > 0) {
805500
+ return fromNavigation;
805501
+ }
805502
+ }
805503
+ if (overlay.tabs != null) {
805504
+ return Object.keys(overlay.tabs);
805505
+ }
805506
+ return [];
805507
+ }
805425
805508
  function collectFlatNavigationOverlays(overlay) {
805426
805509
  if (overlay.navigation == null) {
805427
805510
  return [];
@@ -848194,7 +848277,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
848194
848277
  var LOGS_FOLDER_NAME = "logs";
848195
848278
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
848196
848279
  function getCliSource() {
848197
- const version7 = "5.10.2";
848280
+ const version7 = "5.10.3-3-g561dcaed21b";
848198
848281
  return `cli@${version7}`;
848199
848282
  }
848200
848283
  var DebugLogger = class {
@@ -850043,9 +850126,13 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
850043
850126
  let updatedRoot = applyTranslatedFrontmatterToNavTree(docsDefinition.config.root, localePages, context3);
850044
850127
  const localeNavOverlay = translationNavigationOverlays?.[locale];
850045
850128
  let translatedAnnouncement = docsDefinition.config.announcement;
850129
+ let translatedNavbarLinks = docsDefinition.config.navbarLinks;
850046
850130
  if (localeNavOverlay != null) {
850047
850131
  updatedRoot = applyTranslatedNavigationOverlays(updatedRoot, localeNavOverlay);
850048
850132
  translatedAnnouncement = getTranslatedAnnouncement(localeNavOverlay) ?? translatedAnnouncement;
850133
+ if (localeNavOverlay.navbarLinks != null) {
850134
+ translatedNavbarLinks = localeNavOverlay.navbarLinks;
850135
+ }
850049
850136
  }
850050
850137
  const translatedDefinition = {
850051
850138
  ...docsDefinition,
@@ -850053,7 +850140,8 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
850053
850140
  config: {
850054
850141
  ...docsDefinition.config,
850055
850142
  root: updatedRoot,
850056
- announcement: translatedAnnouncement
850143
+ announcement: translatedAnnouncement,
850144
+ navbarLinks: translatedNavbarLinks
850057
850145
  }
850058
850146
  };
850059
850147
  translations.set(locale, translatedDefinition);
@@ -858403,7 +858491,7 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
858403
858491
  await startJob({ intermediateRepresentation, job, context: context3, generatorInvocation, irVersionOverride });
858404
858492
  return job;
858405
858493
  }
858406
- async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, loginCommand }) {
858494
+ async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, loginCommand }) {
858407
858495
  const remoteGenerationService = createFiddleService({ token: token.value });
858408
858496
  const generatorConfig = {
858409
858497
  id: generatorInvocation.name,
@@ -858412,7 +858500,7 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858412
858500
  customConfig: generatorInvocation.config,
858413
858501
  publishMetadata: generatorInvocation.publishMetadata
858414
858502
  };
858415
- const createResponse = await remoteGenerationService.remoteGen.createJobV3({
858503
+ const createJobRequest = {
858416
858504
  apiName: workspace.definition.rootApiFile.contents.name,
858417
858505
  version: version7,
858418
858506
  organizationName: organization,
@@ -858424,6 +858512,7 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858424
858512
  shouldLogS3Url
858425
858513
  }),
858426
858514
  whitelabel,
858515
+ replay: replay != null ? { enabled: replay.enabled } : void 0,
858427
858516
  // fiddlePreview overrides what we send to Fiddle as `preview`.
858428
858517
  // For sdk preview: fiddlePreview=false so Fiddle doesn't set dryRun=true
858429
858518
  // (Fiddle uses `dryRun = generatePreview`, so preview=false → actual publish).
@@ -858441,7 +858530,8 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858441
858530
  // runId: process.env.FERN_RUN_ID
858442
858531
  // Fiddle will use these for separate PRs, automerge, run_id correlation,
858443
858532
  // and breaking change handling. (skipIfNoDiff is forwarded above — see fern-api/fiddle#708.)
858444
- });
858533
+ };
858534
+ const createResponse = await remoteGenerationService.remoteGen.createJobV3(createJobRequest);
858445
858535
  if (!createResponse.ok) {
858446
858536
  const rawError = createResponse.error;
858447
858537
  if (rawError?.content?.reason === "status-code" && rawError.content.statusCode === 429) {
@@ -860851,7 +860941,7 @@ var LegacyDocsPublisher = class {
860851
860941
  previewId,
860852
860942
  disableTemplates: void 0,
860853
860943
  skipUpload,
860854
- cliVersion: "5.10.2",
860944
+ cliVersion: "5.10.3-3-g561dcaed21b",
860855
860945
  loginCommand: "fern auth login"
860856
860946
  });
860857
860947
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -912693,7 +912783,7 @@ var LocalTaskHandler = class {
912693
912783
  const cleanedDiffBytes = Buffer.byteLength(cleanedDiff, "utf-8");
912694
912784
  if (cleanedDiffBytes > import_autoversion.MAX_RAW_DIFF_BYTES) {
912695
912785
  this.context.logger.warn(`Diff too large for analysis (${(cleanedDiffBytes / 1e6).toFixed(1)}MB, limit ${import_autoversion.MAX_RAW_DIFF_BYTES / 1e6}MB). Falling back to PATCH increment.`);
912696
- const newVersion2 = this.incrementVersion(previousVersion, VersionBump.PATCH);
912786
+ const newVersion2 = this.incrementVersion(previousVersion, VersionBump2.PATCH);
912697
912787
  const fallbackMessage = this.isWhitelabel ? "SDK regeneration" : "SDK regeneration\n\n\u{1F33F} Generated with Fern";
912698
912788
  return {
912699
912789
  version: newVersion2,
@@ -912711,7 +912801,7 @@ var LocalTaskHandler = class {
912711
912801
  if (cappedChunks.length <= 1) {
912712
912802
  analysis = await this.getAnalysis(cleanedDiff, this.generatorLanguage ?? "unknown", previousVersion ?? "0.0.0", priorChangelog, specCommitMessage);
912713
912803
  } else {
912714
- let bestBump = VersionBump.NO_CHANGE;
912804
+ let bestBump = VersionBump2.NO_CHANGE;
912715
912805
  let bestMessage = "";
912716
912806
  let bestVersionBumpReason;
912717
912807
  const allChangelogEntries = [];
@@ -912738,7 +912828,7 @@ var LocalTaskHandler = class {
912738
912828
  }
912739
912829
  this.context.logger.debug(`Chunk ${i9 + 1} result: ${chunkAnalysis.versionBump}` + (bestBump !== prevBest ? ` (new highest: ${bestBump})` : ""));
912740
912830
  }
912741
- if (bestBump === VersionBump.NO_CHANGE) {
912831
+ if (bestBump === VersionBump2.NO_CHANGE) {
912742
912832
  analysis = null;
912743
912833
  } else {
912744
912834
  let changelogEntry2;
@@ -912749,7 +912839,8 @@ var LocalTaskHandler = class {
912749
912839
  try {
912750
912840
  this.context.logger.debug(`Consolidating ${allChangelogEntries.length} changelog entries via AI rollup`);
912751
912841
  const projectedVersion = this.incrementVersion(previousVersion, bestBump);
912752
- const rollup = await b7.withOptions({
912842
+ const { BamlClient } = await loadBamlDependencies();
912843
+ const rollup = await BamlClient.withOptions({
912753
912844
  clientRegistry: await this.getClientRegistry()
912754
912845
  }).ConsolidateChangelog(rawEntries, bestBump, this.generatorLanguage ?? "unknown", previousVersion, projectedVersion);
912755
912846
  changelogEntry2 = rollup.consolidated_changelog?.trim() || rawEntries;
@@ -912775,7 +912866,7 @@ var LocalTaskHandler = class {
912775
912866
  } catch (aiError) {
912776
912867
  const errorMessage = extractErrorMessage(aiError);
912777
912868
  this.context.logger.warn(`AI analysis failed, falling back to PATCH increment. Diff stats: ${cleanedDiff.length.toLocaleString()} chars cleaned (${cleanedDiffSizeKB}KB cleaned, ${rawDiffSizeKB}KB raw), ${cleanedFileCount} files remaining. ` + (cappedChunks.length > 1 ? `The diff was split into ${cappedChunks.length} chunks but analysis still failed. ` : "") + `Error: ${errorMessage}`);
912778
- const newVersion2 = this.incrementVersion(previousVersion, VersionBump.PATCH);
912869
+ const newVersion2 = this.incrementVersion(previousVersion, VersionBump2.PATCH);
912779
912870
  const fallbackMessage = this.isWhitelabel ? "SDK regeneration" : "SDK regeneration\n\n\u{1F33F} Generated with Fern";
912780
912871
  return {
912781
912872
  version: newVersion2,
@@ -912842,9 +912933,10 @@ var LocalTaskHandler = class {
912842
912933
  async getAnalysis(cleanedDiff, language, previousVersion, priorChangelog = "", specCommitMessage = "") {
912843
912934
  const doAnalysis = async () => {
912844
912935
  const clientRegistry = await this.getClientRegistry();
912845
- const bamlClient = b7.withOptions({ clientRegistry });
912936
+ const { BamlClient } = await loadBamlDependencies();
912937
+ const bamlClient = BamlClient.withOptions({ clientRegistry });
912846
912938
  const analysis = await bamlClient.AnalyzeSdkDiff(cleanedDiff, language, previousVersion, priorChangelog, specCommitMessage);
912847
- if (analysis.version_bump === VersionBump.NO_CHANGE) {
912939
+ if (analysis.version_bump === VersionBump2.NO_CHANGE) {
912848
912940
  return null;
912849
912941
  }
912850
912942
  return {
@@ -912877,13 +912969,13 @@ var LocalTaskHandler = class {
912877
912969
  }
912878
912970
  let releaseType;
912879
912971
  switch (versionBump) {
912880
- case VersionBump.MAJOR:
912972
+ case VersionBump2.MAJOR:
912881
912973
  releaseType = "major";
912882
912974
  break;
912883
- case VersionBump.MINOR:
912975
+ case VersionBump2.MINOR:
912884
912976
  releaseType = "minor";
912885
912977
  break;
912886
- case VersionBump.PATCH:
912978
+ case VersionBump2.PATCH:
912887
912979
  releaseType = "patch";
912888
912980
  break;
912889
912981
  default:
@@ -912963,7 +913055,8 @@ var LocalTaskHandler = class {
912963
913055
  });
912964
913056
  }
912965
913057
  this.context.logger.debug(`Using AI service: ${this.ai.provider} with model ${this.ai.model}`);
912966
- return configureBamlClient(this.ai);
913058
+ const { configureBamlClient: configureBamlClient2 } = await loadBamlDependencies();
913059
+ return configureBamlClient2(this.ai);
912967
913060
  }
912968
913061
  addFernBranding(message) {
912969
913062
  const trimmed2 = message.trim();
@@ -935412,7 +935505,7 @@ var CliContext = class _CliContext {
935412
935505
  if (false) {
935413
935506
  this.logger.error("CLI_VERSION is not defined");
935414
935507
  }
935415
- return "5.10.2";
935508
+ return "5.10.3-3-g561dcaed21b";
935416
935509
  }
935417
935510
  getCliName() {
935418
935511
  if (false) {
@@ -952600,7 +952693,8 @@ async function getClientRegistry(context3, project) {
952600
952693
  );
952601
952694
  }
952602
952695
  context3.logger.debug(`Using AI service: ${generatorsConfig.ai.provider} with model ${generatorsConfig.ai.model}`);
952603
- return configureBamlClient(generatorsConfig.ai);
952696
+ const { configureBamlClient: configureBamlClient2 } = await loadBamlDependencies();
952697
+ return configureBamlClient2(generatorsConfig.ai);
952604
952698
  }
952605
952699
  async function sdkDiffCommand({
952606
952700
  context: context3,
@@ -952621,6 +952715,7 @@ async function sdkDiffCommand({
952621
952715
  context3.failWithoutThrowing(`Directory not found: ${toPath4}`, void 0, { code: CliError.Code.ConfigError });
952622
952716
  throw new TaskAbortSignal();
952623
952717
  }
952718
+ const { BamlClient } = await loadBamlDependencies();
952624
952719
  const clientRegistry = await getClientRegistry(context3, project);
952625
952720
  context3.logger.info("Generating diff between directories...");
952626
952721
  const gitDiff = await generateDiff({ context: context3, fromPath, toPath: toPath4 });
@@ -952629,7 +952724,7 @@ async function sdkDiffCommand({
952629
952724
  return {
952630
952725
  message: "No changes detected between the directories",
952631
952726
  changelog_entry: "",
952632
- version_bump: VersionBump.NO_CHANGE,
952727
+ version_bump: VersionBump2.NO_CHANGE,
952633
952728
  version_bump_reason: "No functional changes detected."
952634
952729
  };
952635
952730
  }
@@ -952655,13 +952750,13 @@ async function sdkDiffCommand({
952655
952750
  }
952656
952751
  context3.logger.info("Analyzing diff with LLM...");
952657
952752
  try {
952658
- const bamlClient = b7.withOptions({ clientRegistry });
952753
+ const bamlClient = BamlClient.withOptions({ clientRegistry });
952659
952754
  if (cappedChunks.length <= 1) {
952660
952755
  const analysis = await bamlClient.AnalyzeSdkDiff(cappedChunks[0] ?? gitDiff, "unknown", "0.0.0", "", "");
952661
952756
  context3.logger.debug("Analysis complete");
952662
952757
  return analysis;
952663
952758
  }
952664
- let bestBump = VersionBump.NO_CHANGE;
952759
+ let bestBump = VersionBump2.NO_CHANGE;
952665
952760
  let bestMessage = "";
952666
952761
  let bestVersionBumpReason = "";
952667
952762
  const allChangelogEntries = [];
@@ -952674,7 +952769,7 @@ async function sdkDiffCommand({
952674
952769
  `Analyzing chunk ${i9 + 1}/${cappedChunks.length} (${Buffer.byteLength(chunk2, "utf-8")} bytes)`
952675
952770
  );
952676
952771
  const chunkAnalysis = await bamlClient.AnalyzeSdkDiff(chunk2, "unknown", "0.0.0", "", "");
952677
- if (chunkAnalysis.version_bump === VersionBump.NO_CHANGE) {
952772
+ if (chunkAnalysis.version_bump === VersionBump2.NO_CHANGE) {
952678
952773
  context3.logger.debug(`Chunk ${i9 + 1} result: NO_CHANGE`);
952679
952774
  continue;
952680
952775
  }
@@ -952693,9 +952788,9 @@ async function sdkDiffCommand({
952693
952788
  );
952694
952789
  }
952695
952790
  context3.logger.debug("Multi-chunk analysis complete");
952696
- if (bestBump === VersionBump.NO_CHANGE) {
952791
+ if (bestBump === VersionBump2.NO_CHANGE) {
952697
952792
  return {
952698
- version_bump: VersionBump.NO_CHANGE,
952793
+ version_bump: VersionBump2.NO_CHANGE,
952699
952794
  message: "No changes detected between the directories",
952700
952795
  changelog_entry: "",
952701
952796
  version_bump_reason: "No functional changes detected."
@@ -954156,11 +954251,13 @@ async function validateWorkspaces({
954156
954251
  brokenLinks,
954157
954252
  errorOnBrokenLinks,
954158
954253
  isLocal,
954159
- directFromOpenapi
954254
+ directFromOpenapi,
954255
+ commandLineApiWorkspace
954160
954256
  }) {
954161
954257
  const apiResults = [];
954162
954258
  let docsResult;
954163
954259
  let hasAnyErrors = false;
954260
+ const apiWorkspacesToValidate = commandLineApiWorkspace != null ? project.apiWorkspaces.filter((workspace) => workspace.workspaceName === commandLineApiWorkspace) : project.apiWorkspaces;
954164
954261
  const docsWorkspace = project.docsWorkspaces;
954165
954262
  if (docsWorkspace != null) {
954166
954263
  const excludeRules = brokenLinks || errorOnBrokenLinks ? [] : ["valid-markdown-links"];
@@ -954187,7 +954284,7 @@ async function validateWorkspaces({
954187
954284
  }
954188
954285
  }
954189
954286
  await Promise.all(
954190
- project.apiWorkspaces.map(async (workspace) => {
954287
+ apiWorkspacesToValidate.map(async (workspace) => {
954191
954288
  if (workspace.generatorsConfiguration?.groups.length === 0 && workspace.type !== "fern") {
954192
954289
  return;
954193
954290
  }
@@ -956633,16 +956730,23 @@ function addValidateCommand(cli, cliContext) {
956633
956730
  default: false
956634
956731
  }),
956635
956732
  async (argv) => {
956733
+ const project = await loadProjectAndRegisterWorkspacesWithContext(cliContext, {
956734
+ commandLineApiWorkspace: void 0,
956735
+ defaultToAllApiWorkspaces: true
956736
+ });
956737
+ if (argv.api != null && !project.apiWorkspaces.some((ws5) => ws5.workspaceName === argv.api)) {
956738
+ cliContext.failAndThrow(`API does not exist: ${argv.api}`, void 0, {
956739
+ code: CliError.Code.ConfigError
956740
+ });
956741
+ }
956636
956742
  await validateWorkspaces({
956637
- project: await loadProjectAndRegisterWorkspacesWithContext(cliContext, {
956638
- commandLineApiWorkspace: argv.api,
956639
- defaultToAllApiWorkspaces: true
956640
- }),
956743
+ project,
956641
956744
  cliContext,
956642
956745
  logWarnings: argv.warnings,
956643
956746
  brokenLinks: argv.brokenLinks,
956644
956747
  errorOnBrokenLinks: argv.strictBrokenLinks,
956645
- directFromOpenapi: argv.fromOpenapi
956748
+ directFromOpenapi: argv.fromOpenapi,
956749
+ commandLineApiWorkspace: argv.api
956646
956750
  });
956647
956751
  }
956648
956752
  );
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.10.2",
2
+ "version": "5.10.3-3-g561dcaed21b",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "cli.cjs"
10
10
  ],
11
- "dependencies": {
11
+ "optionalDependencies": {
12
12
  "@boundaryml/baml": "^0.219.0"
13
13
  },
14
14
  "name": "@fern-api/fern-api-dev",