@fern-api/fern-api-dev 5.44.9 → 5.44.11

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 +62 -7
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -669562,7 +669562,7 @@ var AccessTokenPosthogManager = class {
669562
669562
  properties: {
669563
669563
  ...event,
669564
669564
  ...event.properties,
669565
- version: "5.44.9",
669565
+ version: "5.44.11",
669566
669566
  usingAccessToken: true,
669567
669567
  ...getRunIdProperties()
669568
669568
  }
@@ -669626,7 +669626,7 @@ var UserPosthogManager = class {
669626
669626
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
669627
669627
  event: "CLI",
669628
669628
  properties: {
669629
- version: "5.44.9",
669629
+ version: "5.44.11",
669630
669630
  ...event,
669631
669631
  ...event.properties,
669632
669632
  usingAccessToken: false,
@@ -823807,6 +823807,15 @@ async function processEndpoint(workItem, enhancer, context3, organizationId, sta
823807
823807
  try {
823808
823808
  const result = await enhancer.enhanceExample(request7);
823809
823809
  circuitBreaker?.recordSuccess();
823810
+ if (result.enhancedRequestExample != null && request7.originalRequestExample != null) {
823811
+ const unwrapped = unwrapLambdaBodyEnvelope(result.enhancedRequestExample);
823812
+ const originalHasBody = isObjectWithKey(request7.originalRequestExample, "body");
823813
+ if (unwrapped.wasWrapped && !originalHasBody) {
823814
+ result.enhancedRequestExample = backfillMissingFields(unwrapped.inner, request7.originalRequestExample);
823815
+ } else {
823816
+ result.enhancedRequestExample = backfillMissingFields(result.enhancedRequestExample, request7.originalRequestExample);
823817
+ }
823818
+ }
823810
823819
  const requestChanged = result.enhancedRequestExample !== request7.originalRequestExample;
823811
823820
  const responseChanged = result.enhancedResponseExample !== request7.originalResponseExample;
823812
823821
  if (requestChanged || responseChanged) {
@@ -824080,6 +824089,39 @@ function extractExampleValue(bodyV3) {
824080
824089
  return bodyV3.value;
824081
824090
  }
824082
824091
  }
824092
+ function isObjectWithKey(value2, key2) {
824093
+ return typeof value2 === "object" && value2 !== null && !Array.isArray(value2) && key2 in value2;
824094
+ }
824095
+ function unwrapLambdaBodyEnvelope(value2) {
824096
+ if (typeof value2 === "object" && value2 !== null && !Array.isArray(value2) && "body" in value2) {
824097
+ return { wasWrapped: true, inner: value2.body };
824098
+ }
824099
+ return { wasWrapped: false, inner: value2 };
824100
+ }
824101
+ function backfillMissingFields(enhanced, original) {
824102
+ if (typeof enhanced !== "object" || enhanced === null || typeof original !== "object" || original === null || Array.isArray(enhanced) || Array.isArray(original)) {
824103
+ return enhanced;
824104
+ }
824105
+ const enhancedObj = enhanced;
824106
+ const originalObj = original;
824107
+ let hasMissing = false;
824108
+ for (const key2 of Object.keys(originalObj)) {
824109
+ if (!(key2 in enhancedObj)) {
824110
+ hasMissing = true;
824111
+ break;
824112
+ }
824113
+ }
824114
+ if (!hasMissing) {
824115
+ return enhanced;
824116
+ }
824117
+ const merged = { ...enhancedObj };
824118
+ for (const [key2, value2] of Object.entries(originalObj)) {
824119
+ if (!(key2 in merged)) {
824120
+ merged[key2] = value2;
824121
+ }
824122
+ }
824123
+ return merged;
824124
+ }
824083
824125
 
824084
824126
  // ../register/lib/ir-to-fdr-converter/convertIrToFdrApi.js
824085
824127
  init_js();
@@ -834353,6 +834395,9 @@ function findRemovedSlugs(publishedEntries, localPageIdToSlugs) {
834353
834395
  }
834354
834396
  const removed = [];
834355
834397
  for (const publishedEntry of publishedEntries) {
834398
+ if (publishedEntry.slug.trim() === "") {
834399
+ continue;
834400
+ }
834356
834401
  const localSlugs = localPageIdToSlugs.get(publishedEntry.pageId);
834357
834402
  if (localSlugs == null) {
834358
834403
  if (activeSlugs.has(publishedEntry.slug)) {
@@ -861322,7 +861367,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
861322
861367
  var LOGS_FOLDER_NAME = "logs";
861323
861368
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
861324
861369
  function getCliSource() {
861325
- const version7 = "5.44.9";
861370
+ const version7 = "5.44.11";
861326
861371
  return `cli@${version7}`;
861327
861372
  }
861328
861373
  var DebugLogger = class {
@@ -892414,7 +892459,7 @@ var LegacyDocsPublisher = class {
892414
892459
  previewId,
892415
892460
  disableTemplates: void 0,
892416
892461
  skipUpload,
892417
- cliVersion: "5.44.9",
892462
+ cliVersion: "5.44.11",
892418
892463
  loginCommand: "fern auth login"
892419
892464
  });
892420
892465
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -918353,6 +918398,7 @@ var BaseJavaCustomConfigSchema = external_exports2.object({
918353
918398
  "base-api-exception-class-name": external_exports2.string().optional(),
918354
918399
  "base-exception-class-name": external_exports2.string().optional(),
918355
918400
  "client-class-name": external_exports2.string().optional(),
918401
+ "exported-client-class-name": external_exports2.string().optional(),
918356
918402
  "inline-file-properties": external_exports2.boolean().optional(),
918357
918403
  "inline-path-parameters": external_exports2.boolean().optional(),
918358
918404
  "package-layout": external_exports2.enum(["flat", "nested"]).optional(),
@@ -920628,13 +920674,22 @@ var DynamicSnippetsGeneratorContext3 = class _DynamicSnippetsGeneratorContext ex
920628
920674
  }
920629
920675
  getRootClientClassReference() {
920630
920676
  return java_exports.classReference({
920631
- name: this.getRootClientClassName(),
920677
+ name: this.getRootClientClassNameForSnippets(),
920632
920678
  packageName: this.getRootPackageName()
920633
920679
  });
920634
920680
  }
920635
920681
  getRootClientClassName() {
920636
920682
  return this.customConfig?.["client-class-name"] ?? `${this.getBaseNamePrefix()}Client`;
920637
920683
  }
920684
+ /**
920685
+ * The client class name surfaced in documentation snippets (dynamic snippets, README, reference.md).
920686
+ * Customers may export the generated root client under a different, hand-written class name; this
920687
+ * accessor reflects that exported name. Falls back to the internal client class name when unset, so
920688
+ * output is unchanged for users who have not configured `exported-client-class-name`.
920689
+ */
920690
+ getRootClientClassNameForSnippets() {
920691
+ return this.customConfig?.["exported-client-class-name"] ?? this.getRootClientClassName();
920692
+ }
920638
920693
  getEnvironmentClassName() {
920639
920694
  return "Environment";
920640
920695
  }
@@ -957501,7 +957556,7 @@ function getAutomationContextFromEnv() {
957501
957556
  config_branch: process.env.FERN_CONFIG_BRANCH,
957502
957557
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
957503
957558
  trigger: process.env.GITHUB_EVENT_NAME,
957504
- cli_version: "5.44.9"
957559
+ cli_version: "5.44.11"
957505
957560
  };
957506
957561
  }
957507
957562
  function isAutomationMode() {
@@ -958327,7 +958382,7 @@ var CliContext = class _CliContext {
958327
958382
  if (false) {
958328
958383
  this.logger.error("CLI_VERSION is not defined");
958329
958384
  }
958330
- return "5.44.9";
958385
+ return "5.44.11";
958331
958386
  }
958332
958387
  getCliName() {
958333
958388
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.44.9",
2
+ "version": "5.44.11",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",