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

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 +89 -156
  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 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 = {}));
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 = {}));
357075
357075
  var VERSION_BUMP_RANK = {
357076
- [VersionBump3.MAJOR]: 3,
357077
- [VersionBump3.MINOR]: 2,
357078
- [VersionBump3.PATCH]: 1,
357079
- [VersionBump3.NO_CHANGE]: 0
357076
+ [VersionBump2.MAJOR]: 3,
357077
+ [VersionBump2.MINOR]: 2,
357078
+ [VersionBump2.PATCH]: 1,
357079
+ [VersionBump2.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 === VersionBump3.MAJOR) {
357103
+ if (versionBump === VersionBump2.MAJOR) {
357104
357104
  major2++;
357105
357105
  minor = 0;
357106
357106
  patch5 = 0;
357107
- } else if (versionBump === VersionBump3.MINOR) {
357107
+ } else if (versionBump === VersionBump2.MINOR) {
357108
357108
  minor++;
357109
357109
  patch5 = 0;
357110
- } else if (versionBump === VersionBump3.PATCH) {
357110
+ } else if (versionBump === VersionBump2.PATCH) {
357111
357111
  patch5++;
357112
- } else if (versionBump === VersionBump3.NO_CHANGE) {
357112
+ } else if (versionBump === VersionBump2.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(VersionBump3) {
357632
- VersionBump3["MAJOR"] = "MAJOR";
357633
- VersionBump3["MINOR"] = "MINOR";
357634
- VersionBump3["PATCH"] = "PATCH";
357635
- VersionBump3["NO_CHANGE"] = "NO_CHANGE";
357631
+ (function(VersionBump2) {
357632
+ VersionBump2["MAJOR"] = "MAJOR";
357633
+ VersionBump2["MINOR"] = "MINOR";
357634
+ VersionBump2["PATCH"] = "PATCH";
357635
+ VersionBump2["NO_CHANGE"] = "NO_CHANGE";
357636
357636
  })(VersionBump || (VersionBump = {}));
357637
357637
  }
357638
357638
  });
@@ -357662,24 +357662,6 @@ 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
- });
357683
357665
  var import_baml5, import_baml6, version5;
357684
357666
  var init_baml_client = __esm({
357685
357667
  "../ai/lib/baml_client/index.js"() {
@@ -357697,10 +357679,6 @@ var init_baml_client = __esm({
357697
357679
  });
357698
357680
 
357699
357681
  // ../ai/lib/configureBamlClient.js
357700
- var configureBamlClient_exports = {};
357701
- __export(configureBamlClient_exports, {
357702
- configureBamlClient: () => configureBamlClient
357703
- });
357704
357682
  function configureBamlClient(config5) {
357705
357683
  const registry2 = new import_baml7.ClientRegistry();
357706
357684
  const clientOptions = {
@@ -357721,59 +357699,31 @@ var init_configureBamlClient = __esm({
357721
357699
  }
357722
357700
  });
357723
357701
 
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
-
357766
357702
  // ../ai/lib/index.js
357767
357703
  var lib_exports11 = {};
357768
357704
  __export(lib_exports11, {
357769
- VersionBump: () => VersionBump2,
357770
- loadBamlDependencies: () => loadBamlDependencies
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
357771
357721
  });
357772
357722
  var init_lib12 = __esm({
357773
357723
  "../ai/lib/index.js"() {
357774
357724
  "use strict";
357775
- init_loader();
357776
- init_types6();
357725
+ init_baml_client();
357726
+ init_configureBamlClient();
357777
357727
  }
357778
357728
  });
357779
357729
 
@@ -358174,9 +358124,9 @@ ${newBlock}${remainder}`;
358174
358124
  return `${message.trimEnd()}${FERN_TRAILER}`;
358175
358125
  }
358176
358126
  async analyzeSingle(cleanedDiff, language, previousVersion) {
358177
- const { client: client3, VersionBump: VersionBump3 } = await this.loadBaml();
358127
+ const { client: client3, VersionBump: VersionBump2 } = await this.loadBaml();
358178
358128
  const result = await client3.AnalyzeSdkDiff(cleanedDiff, language, previousVersion, this.config.priorChangelog ?? "", this.config.specCommitMessage ?? "");
358179
- if (result.version_bump === VersionBump3.NO_CHANGE) {
358129
+ if (result.version_bump === VersionBump2.NO_CHANGE) {
358180
358130
  return null;
358181
358131
  }
358182
358132
  return {
@@ -358187,8 +358137,8 @@ ${newBlock}${remainder}`;
358187
358137
  };
358188
358138
  }
358189
358139
  async analyzeChunks(chunks, language, previousVersion) {
358190
- const { client: client3, VersionBump: VersionBump3 } = await this.loadBaml();
358191
- let bestBump = VersionBump3.NO_CHANGE;
358140
+ const { client: client3, VersionBump: VersionBump2 } = await this.loadBaml();
358141
+ let bestBump = VersionBump2.NO_CHANGE;
358192
358142
  let bestMessage = "";
358193
358143
  let bestVersionBumpReason;
358194
358144
  const changelogEntries = [];
@@ -358198,7 +358148,7 @@ ${newBlock}${remainder}`;
358198
358148
  continue;
358199
358149
  }
358200
358150
  const analysis = await client3.AnalyzeSdkDiff(chunk2, language, previousVersion, this.config.priorChangelog ?? "", this.config.specCommitMessage ?? "");
358201
- if (analysis.version_bump === VersionBump3.NO_CHANGE) {
358151
+ if (analysis.version_bump === VersionBump2.NO_CHANGE) {
358202
358152
  continue;
358203
358153
  }
358204
358154
  const prev = bestBump;
@@ -358212,7 +358162,7 @@ ${newBlock}${remainder}`;
358212
358162
  changelogEntries.push(entry);
358213
358163
  }
358214
358164
  }
358215
- if (bestBump === VersionBump3.NO_CHANGE) {
358165
+ if (bestBump === VersionBump2.NO_CHANGE) {
358216
358166
  return null;
358217
358167
  }
358218
358168
  if (changelogEntries.length <= 1) {
@@ -358253,12 +358203,11 @@ ${newBlock}${remainder}`;
358253
358203
  if (this.config.ai == null) {
358254
358204
  throw new Error("AutoVersionStep: ai config is missing. Set autoVersion.ai to a BAML provider+model pair.");
358255
358205
  }
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);
358206
+ const cliAi = await Promise.resolve().then(() => __importStar2((init_lib12(), __toCommonJS(lib_exports11))));
358207
+ const registry2 = cliAi.configureBamlClient(this.config.ai);
358259
358208
  return {
358260
- client: BamlClient.withOptions({ clientRegistry: registry2 }),
358261
- VersionBump: VersionBump3
358209
+ client: cliAi.b.withOptions({ clientRegistry: registry2 }),
358210
+ VersionBump: cliAi.VersionBump
358262
358211
  };
358263
358212
  }
358264
358213
  /**
@@ -392372,7 +392321,7 @@ var init_NodeWebSocketTransport = __esm({
392372
392321
 
392373
392322
  // ../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js
392374
392323
  var Browser3, BrowserPlatform, BrowserTag, ChromeReleaseChannel;
392375
- var init_types7 = __esm({
392324
+ var init_types6 = __esm({
392376
392325
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js"() {
392377
392326
  "use strict";
392378
392327
  (function(Browser5) {
@@ -419569,7 +419518,7 @@ var init_chrome = __esm({
419569
419518
  import_node_path28 = __toESM(require("path"), 1);
419570
419519
  import_semver14 = __toESM(require_semver2(), 1);
419571
419520
  init_httpUtil();
419572
- init_types7();
419521
+ init_types6();
419573
419522
  baseVersionUrl = "https://googlechromelabs.github.io/chrome-for-testing";
419574
419523
  WINDOWS_ENV_PARAM_NAMES = [
419575
419524
  "PROGRAMFILES",
@@ -419625,7 +419574,7 @@ var init_chrome_headless_shell = __esm({
419625
419574
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js"() {
419626
419575
  "use strict";
419627
419576
  import_node_path29 = __toESM(require("path"), 1);
419628
- init_types7();
419577
+ init_types6();
419629
419578
  init_chrome();
419630
419579
  }
419631
419580
  });
@@ -419670,7 +419619,7 @@ var init_chromedriver = __esm({
419670
419619
  "../../../node_modules/.pnpm/@puppeteer+browsers@2.13.0/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js"() {
419671
419620
  "use strict";
419672
419621
  import_node_path30 = __toESM(require("path"), 1);
419673
- init_types7();
419622
+ init_types6();
419674
419623
  init_chrome();
419675
419624
  }
419676
419625
  });
@@ -419735,7 +419684,7 @@ var init_chromium = __esm({
419735
419684
  "use strict";
419736
419685
  import_node_path31 = __toESM(require("path"), 1);
419737
419686
  init_httpUtil();
419738
- init_types7();
419687
+ init_types6();
419739
419688
  }
419740
419689
  });
419741
419690
 
@@ -420085,7 +420034,7 @@ var init_firefox = __esm({
420085
420034
  import_node_fs21 = __toESM(require("fs"), 1);
420086
420035
  import_node_path32 = __toESM(require("path"), 1);
420087
420036
  init_httpUtil();
420088
- init_types7();
420037
+ init_types6();
420089
420038
  (function(FirefoxChannel2) {
420090
420039
  FirefoxChannel2["STABLE"] = "stable";
420091
420040
  FirefoxChannel2["ESR"] = "esr";
@@ -420258,7 +420207,7 @@ var init_browser_data = __esm({
420258
420207
  init_chromedriver();
420259
420208
  init_chromium();
420260
420209
  init_firefox();
420261
- init_types7();
420210
+ init_types6();
420262
420211
  downloadUrls = {
420263
420212
  [Browser3.CHROMEDRIVER]: resolveDownloadUrl3,
420264
420213
  [Browser3.CHROMEHEADLESSSHELL]: resolveDownloadUrl2,
@@ -424737,7 +424686,7 @@ var init_main = __esm({
424737
424686
  init_browser_data();
424738
424687
  init_CLI();
424739
424688
  init_Cache();
424740
- init_types7();
424689
+ init_types6();
424741
424690
  init_DefaultProvider();
424742
424691
  init_provider();
424743
424692
  }
@@ -623272,7 +623221,7 @@ var AccessTokenPosthogManager = class {
623272
623221
  properties: {
623273
623222
  ...event,
623274
623223
  ...event.properties,
623275
- version: "5.10.3-3-g561dcaed21b",
623224
+ version: "5.10.3",
623276
623225
  usingAccessToken: true
623277
623226
  }
623278
623227
  });
@@ -623326,7 +623275,7 @@ var UserPosthogManager = class {
623326
623275
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
623327
623276
  event: "CLI",
623328
623277
  properties: {
623329
- version: "5.10.3-3-g561dcaed21b",
623278
+ version: "5.10.3",
623330
623279
  ...event,
623331
623280
  ...event.properties,
623332
623281
  usingAccessToken: false,
@@ -848277,7 +848226,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
848277
848226
  var LOGS_FOLDER_NAME = "logs";
848278
848227
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
848279
848228
  function getCliSource() {
848280
- const version7 = "5.10.3-3-g561dcaed21b";
848229
+ const version7 = "5.10.3";
848281
848230
  return `cli@${version7}`;
848282
848231
  }
848283
848232
  var DebugLogger = class {
@@ -858491,7 +858440,7 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
858491
858440
  await startJob({ intermediateRepresentation, job, context: context3, generatorInvocation, irVersionOverride });
858492
858441
  return job;
858493
858442
  }
858494
- async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, replay, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, loginCommand }) {
858443
+ async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version7, context: context3, shouldLogS3Url, token, whitelabel, absolutePathToPreview, fiddlePreview, pushPreviewBranch, fernignoreContents, skipIfNoDiff, loginCommand }) {
858495
858444
  const remoteGenerationService = createFiddleService({ token: token.value });
858496
858445
  const generatorConfig = {
858497
858446
  id: generatorInvocation.name,
@@ -858500,7 +858449,7 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858500
858449
  customConfig: generatorInvocation.config,
858501
858450
  publishMetadata: generatorInvocation.publishMetadata
858502
858451
  };
858503
- const createJobRequest = {
858452
+ const createResponse = await remoteGenerationService.remoteGen.createJobV3({
858504
858453
  apiName: workspace.definition.rootApiFile.contents.name,
858505
858454
  version: version7,
858506
858455
  organizationName: organization,
@@ -858512,7 +858461,6 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858512
858461
  shouldLogS3Url
858513
858462
  }),
858514
858463
  whitelabel,
858515
- replay: replay != null ? { enabled: replay.enabled } : void 0,
858516
858464
  // fiddlePreview overrides what we send to Fiddle as `preview`.
858517
858465
  // For sdk preview: fiddlePreview=false so Fiddle doesn't set dryRun=true
858518
858466
  // (Fiddle uses `dryRun = generatePreview`, so preview=false → actual publish).
@@ -858530,8 +858478,7 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
858530
858478
  // runId: process.env.FERN_RUN_ID
858531
858479
  // Fiddle will use these for separate PRs, automerge, run_id correlation,
858532
858480
  // and breaking change handling. (skipIfNoDiff is forwarded above — see fern-api/fiddle#708.)
858533
- };
858534
- const createResponse = await remoteGenerationService.remoteGen.createJobV3(createJobRequest);
858481
+ });
858535
858482
  if (!createResponse.ok) {
858536
858483
  const rawError = createResponse.error;
858537
858484
  if (rawError?.content?.reason === "status-code" && rawError.content.statusCode === 429) {
@@ -860941,7 +860888,7 @@ var LegacyDocsPublisher = class {
860941
860888
  previewId,
860942
860889
  disableTemplates: void 0,
860943
860890
  skipUpload,
860944
- cliVersion: "5.10.3-3-g561dcaed21b",
860891
+ cliVersion: "5.10.3",
860945
860892
  loginCommand: "fern auth login"
860946
860893
  });
860947
860894
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -912783,7 +912730,7 @@ var LocalTaskHandler = class {
912783
912730
  const cleanedDiffBytes = Buffer.byteLength(cleanedDiff, "utf-8");
912784
912731
  if (cleanedDiffBytes > import_autoversion.MAX_RAW_DIFF_BYTES) {
912785
912732
  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.`);
912786
- const newVersion2 = this.incrementVersion(previousVersion, VersionBump2.PATCH);
912733
+ const newVersion2 = this.incrementVersion(previousVersion, VersionBump.PATCH);
912787
912734
  const fallbackMessage = this.isWhitelabel ? "SDK regeneration" : "SDK regeneration\n\n\u{1F33F} Generated with Fern";
912788
912735
  return {
912789
912736
  version: newVersion2,
@@ -912801,7 +912748,7 @@ var LocalTaskHandler = class {
912801
912748
  if (cappedChunks.length <= 1) {
912802
912749
  analysis = await this.getAnalysis(cleanedDiff, this.generatorLanguage ?? "unknown", previousVersion ?? "0.0.0", priorChangelog, specCommitMessage);
912803
912750
  } else {
912804
- let bestBump = VersionBump2.NO_CHANGE;
912751
+ let bestBump = VersionBump.NO_CHANGE;
912805
912752
  let bestMessage = "";
912806
912753
  let bestVersionBumpReason;
912807
912754
  const allChangelogEntries = [];
@@ -912828,7 +912775,7 @@ var LocalTaskHandler = class {
912828
912775
  }
912829
912776
  this.context.logger.debug(`Chunk ${i9 + 1} result: ${chunkAnalysis.versionBump}` + (bestBump !== prevBest ? ` (new highest: ${bestBump})` : ""));
912830
912777
  }
912831
- if (bestBump === VersionBump2.NO_CHANGE) {
912778
+ if (bestBump === VersionBump.NO_CHANGE) {
912832
912779
  analysis = null;
912833
912780
  } else {
912834
912781
  let changelogEntry2;
@@ -912839,8 +912786,7 @@ var LocalTaskHandler = class {
912839
912786
  try {
912840
912787
  this.context.logger.debug(`Consolidating ${allChangelogEntries.length} changelog entries via AI rollup`);
912841
912788
  const projectedVersion = this.incrementVersion(previousVersion, bestBump);
912842
- const { BamlClient } = await loadBamlDependencies();
912843
- const rollup = await BamlClient.withOptions({
912789
+ const rollup = await b7.withOptions({
912844
912790
  clientRegistry: await this.getClientRegistry()
912845
912791
  }).ConsolidateChangelog(rawEntries, bestBump, this.generatorLanguage ?? "unknown", previousVersion, projectedVersion);
912846
912792
  changelogEntry2 = rollup.consolidated_changelog?.trim() || rawEntries;
@@ -912866,7 +912812,7 @@ var LocalTaskHandler = class {
912866
912812
  } catch (aiError) {
912867
912813
  const errorMessage = extractErrorMessage(aiError);
912868
912814
  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}`);
912869
- const newVersion2 = this.incrementVersion(previousVersion, VersionBump2.PATCH);
912815
+ const newVersion2 = this.incrementVersion(previousVersion, VersionBump.PATCH);
912870
912816
  const fallbackMessage = this.isWhitelabel ? "SDK regeneration" : "SDK regeneration\n\n\u{1F33F} Generated with Fern";
912871
912817
  return {
912872
912818
  version: newVersion2,
@@ -912933,10 +912879,9 @@ var LocalTaskHandler = class {
912933
912879
  async getAnalysis(cleanedDiff, language, previousVersion, priorChangelog = "", specCommitMessage = "") {
912934
912880
  const doAnalysis = async () => {
912935
912881
  const clientRegistry = await this.getClientRegistry();
912936
- const { BamlClient } = await loadBamlDependencies();
912937
- const bamlClient = BamlClient.withOptions({ clientRegistry });
912882
+ const bamlClient = b7.withOptions({ clientRegistry });
912938
912883
  const analysis = await bamlClient.AnalyzeSdkDiff(cleanedDiff, language, previousVersion, priorChangelog, specCommitMessage);
912939
- if (analysis.version_bump === VersionBump2.NO_CHANGE) {
912884
+ if (analysis.version_bump === VersionBump.NO_CHANGE) {
912940
912885
  return null;
912941
912886
  }
912942
912887
  return {
@@ -912969,13 +912914,13 @@ var LocalTaskHandler = class {
912969
912914
  }
912970
912915
  let releaseType;
912971
912916
  switch (versionBump) {
912972
- case VersionBump2.MAJOR:
912917
+ case VersionBump.MAJOR:
912973
912918
  releaseType = "major";
912974
912919
  break;
912975
- case VersionBump2.MINOR:
912920
+ case VersionBump.MINOR:
912976
912921
  releaseType = "minor";
912977
912922
  break;
912978
- case VersionBump2.PATCH:
912923
+ case VersionBump.PATCH:
912979
912924
  releaseType = "patch";
912980
912925
  break;
912981
912926
  default:
@@ -913055,8 +913000,7 @@ var LocalTaskHandler = class {
913055
913000
  });
913056
913001
  }
913057
913002
  this.context.logger.debug(`Using AI service: ${this.ai.provider} with model ${this.ai.model}`);
913058
- const { configureBamlClient: configureBamlClient2 } = await loadBamlDependencies();
913059
- return configureBamlClient2(this.ai);
913003
+ return configureBamlClient(this.ai);
913060
913004
  }
913061
913005
  addFernBranding(message) {
913062
913006
  const trimmed2 = message.trim();
@@ -935505,7 +935449,7 @@ var CliContext = class _CliContext {
935505
935449
  if (false) {
935506
935450
  this.logger.error("CLI_VERSION is not defined");
935507
935451
  }
935508
- return "5.10.3-3-g561dcaed21b";
935452
+ return "5.10.3";
935509
935453
  }
935510
935454
  getCliName() {
935511
935455
  if (false) {
@@ -952693,8 +952637,7 @@ async function getClientRegistry(context3, project) {
952693
952637
  );
952694
952638
  }
952695
952639
  context3.logger.debug(`Using AI service: ${generatorsConfig.ai.provider} with model ${generatorsConfig.ai.model}`);
952696
- const { configureBamlClient: configureBamlClient2 } = await loadBamlDependencies();
952697
- return configureBamlClient2(generatorsConfig.ai);
952640
+ return configureBamlClient(generatorsConfig.ai);
952698
952641
  }
952699
952642
  async function sdkDiffCommand({
952700
952643
  context: context3,
@@ -952715,7 +952658,6 @@ async function sdkDiffCommand({
952715
952658
  context3.failWithoutThrowing(`Directory not found: ${toPath4}`, void 0, { code: CliError.Code.ConfigError });
952716
952659
  throw new TaskAbortSignal();
952717
952660
  }
952718
- const { BamlClient } = await loadBamlDependencies();
952719
952661
  const clientRegistry = await getClientRegistry(context3, project);
952720
952662
  context3.logger.info("Generating diff between directories...");
952721
952663
  const gitDiff = await generateDiff({ context: context3, fromPath, toPath: toPath4 });
@@ -952724,7 +952666,7 @@ async function sdkDiffCommand({
952724
952666
  return {
952725
952667
  message: "No changes detected between the directories",
952726
952668
  changelog_entry: "",
952727
- version_bump: VersionBump2.NO_CHANGE,
952669
+ version_bump: VersionBump.NO_CHANGE,
952728
952670
  version_bump_reason: "No functional changes detected."
952729
952671
  };
952730
952672
  }
@@ -952750,13 +952692,13 @@ async function sdkDiffCommand({
952750
952692
  }
952751
952693
  context3.logger.info("Analyzing diff with LLM...");
952752
952694
  try {
952753
- const bamlClient = BamlClient.withOptions({ clientRegistry });
952695
+ const bamlClient = b7.withOptions({ clientRegistry });
952754
952696
  if (cappedChunks.length <= 1) {
952755
952697
  const analysis = await bamlClient.AnalyzeSdkDiff(cappedChunks[0] ?? gitDiff, "unknown", "0.0.0", "", "");
952756
952698
  context3.logger.debug("Analysis complete");
952757
952699
  return analysis;
952758
952700
  }
952759
- let bestBump = VersionBump2.NO_CHANGE;
952701
+ let bestBump = VersionBump.NO_CHANGE;
952760
952702
  let bestMessage = "";
952761
952703
  let bestVersionBumpReason = "";
952762
952704
  const allChangelogEntries = [];
@@ -952769,7 +952711,7 @@ async function sdkDiffCommand({
952769
952711
  `Analyzing chunk ${i9 + 1}/${cappedChunks.length} (${Buffer.byteLength(chunk2, "utf-8")} bytes)`
952770
952712
  );
952771
952713
  const chunkAnalysis = await bamlClient.AnalyzeSdkDiff(chunk2, "unknown", "0.0.0", "", "");
952772
- if (chunkAnalysis.version_bump === VersionBump2.NO_CHANGE) {
952714
+ if (chunkAnalysis.version_bump === VersionBump.NO_CHANGE) {
952773
952715
  context3.logger.debug(`Chunk ${i9 + 1} result: NO_CHANGE`);
952774
952716
  continue;
952775
952717
  }
@@ -952788,9 +952730,9 @@ async function sdkDiffCommand({
952788
952730
  );
952789
952731
  }
952790
952732
  context3.logger.debug("Multi-chunk analysis complete");
952791
- if (bestBump === VersionBump2.NO_CHANGE) {
952733
+ if (bestBump === VersionBump.NO_CHANGE) {
952792
952734
  return {
952793
- version_bump: VersionBump2.NO_CHANGE,
952735
+ version_bump: VersionBump.NO_CHANGE,
952794
952736
  message: "No changes detected between the directories",
952795
952737
  changelog_entry: "",
952796
952738
  version_bump_reason: "No functional changes detected."
@@ -954251,13 +954193,11 @@ async function validateWorkspaces({
954251
954193
  brokenLinks,
954252
954194
  errorOnBrokenLinks,
954253
954195
  isLocal,
954254
- directFromOpenapi,
954255
- commandLineApiWorkspace
954196
+ directFromOpenapi
954256
954197
  }) {
954257
954198
  const apiResults = [];
954258
954199
  let docsResult;
954259
954200
  let hasAnyErrors = false;
954260
- const apiWorkspacesToValidate = commandLineApiWorkspace != null ? project.apiWorkspaces.filter((workspace) => workspace.workspaceName === commandLineApiWorkspace) : project.apiWorkspaces;
954261
954201
  const docsWorkspace = project.docsWorkspaces;
954262
954202
  if (docsWorkspace != null) {
954263
954203
  const excludeRules = brokenLinks || errorOnBrokenLinks ? [] : ["valid-markdown-links"];
@@ -954284,7 +954224,7 @@ async function validateWorkspaces({
954284
954224
  }
954285
954225
  }
954286
954226
  await Promise.all(
954287
- apiWorkspacesToValidate.map(async (workspace) => {
954227
+ project.apiWorkspaces.map(async (workspace) => {
954288
954228
  if (workspace.generatorsConfiguration?.groups.length === 0 && workspace.type !== "fern") {
954289
954229
  return;
954290
954230
  }
@@ -956730,23 +956670,16 @@ function addValidateCommand(cli, cliContext) {
956730
956670
  default: false
956731
956671
  }),
956732
956672
  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
- }
956742
956673
  await validateWorkspaces({
956743
- project,
956674
+ project: await loadProjectAndRegisterWorkspacesWithContext(cliContext, {
956675
+ commandLineApiWorkspace: argv.api,
956676
+ defaultToAllApiWorkspaces: true
956677
+ }),
956744
956678
  cliContext,
956745
956679
  logWarnings: argv.warnings,
956746
956680
  brokenLinks: argv.brokenLinks,
956747
956681
  errorOnBrokenLinks: argv.strictBrokenLinks,
956748
- directFromOpenapi: argv.fromOpenapi,
956749
- commandLineApiWorkspace: argv.api
956682
+ directFromOpenapi: argv.fromOpenapi
956750
956683
  });
956751
956684
  }
956752
956685
  );
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.10.3-3-g561dcaed21b",
2
+ "version": "5.10.3",
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
- "optionalDependencies": {
11
+ "dependencies": {
12
12
  "@boundaryml/baml": "^0.219.0"
13
13
  },
14
14
  "name": "@fern-api/fern-api-dev",