@fern-api/fern-api-dev 5.44.10 → 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 +48 -6
  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.10",
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.10",
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();
@@ -861325,7 +861367,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
861325
861367
  var LOGS_FOLDER_NAME = "logs";
861326
861368
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
861327
861369
  function getCliSource() {
861328
- const version7 = "5.44.10";
861370
+ const version7 = "5.44.11";
861329
861371
  return `cli@${version7}`;
861330
861372
  }
861331
861373
  var DebugLogger = class {
@@ -892417,7 +892459,7 @@ var LegacyDocsPublisher = class {
892417
892459
  previewId,
892418
892460
  disableTemplates: void 0,
892419
892461
  skipUpload,
892420
- cliVersion: "5.44.10",
892462
+ cliVersion: "5.44.11",
892421
892463
  loginCommand: "fern auth login"
892422
892464
  });
892423
892465
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -957514,7 +957556,7 @@ function getAutomationContextFromEnv() {
957514
957556
  config_branch: process.env.FERN_CONFIG_BRANCH,
957515
957557
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
957516
957558
  trigger: process.env.GITHUB_EVENT_NAME,
957517
- cli_version: "5.44.10"
957559
+ cli_version: "5.44.11"
957518
957560
  };
957519
957561
  }
957520
957562
  function isAutomationMode() {
@@ -958340,7 +958382,7 @@ var CliContext = class _CliContext {
958340
958382
  if (false) {
958341
958383
  this.logger.error("CLI_VERSION is not defined");
958342
958384
  }
958343
- return "5.44.10";
958385
+ return "5.44.11";
958344
958386
  }
958345
958387
  getCliName() {
958346
958388
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.44.10",
2
+ "version": "5.44.11",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",