@fern-api/fern-api-dev 3.64.3 → 3.64.4-5-g33f845f43de

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 +27 -16
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1427240,7 +1427240,7 @@ var AccessTokenPosthogManager = class {
1427240
1427240
  properties: {
1427241
1427241
  ...event,
1427242
1427242
  ...event.properties,
1427243
- version: "3.64.3",
1427243
+ version: "3.64.4-5-g33f845f43de",
1427244
1427244
  usingAccessToken: true
1427245
1427245
  }
1427246
1427246
  });
@@ -1427339,7 +1427339,7 @@ var UserPosthogManager = class {
1427339
1427339
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1427340
1427340
  event: "CLI",
1427341
1427341
  properties: {
1427342
- version: "3.64.3",
1427342
+ version: "3.64.4-5-g33f845f43de",
1427343
1427343
  ...event,
1427344
1427344
  ...event.properties,
1427345
1427345
  usingAccessToken: false,
@@ -1553616,7 +1553616,6 @@ var ExampleConverter = class _ExampleConverter extends AbstractConverter {
1553616
1553616
  });
1553617
1553617
  return exampleConverter.convert();
1553618
1553618
  });
1553619
- const isValid3 = resultsByKey.every((entry) => entry.result.isValid) && allOfResults.every((result) => result.isValid);
1553620
1553619
  const usedProvidedExample = this.example !== void 0 && (resultsByKey.some(({ result }) => result.usedProvidedExample) || allOfResults.some((result) => result.usedProvidedExample));
1553621
1553620
  let example = Object.fromEntries(resultsByKey.map(({ key: key2, result }) => [key2, result.validExample]).filter(([_15, value]) => value !== void 0));
1553622
1553621
  for (const result of allOfResults) {
@@ -1553650,27 +1553649,38 @@ var ExampleConverter = class _ExampleConverter extends AbstractConverter {
1553650
1553649
  }
1553651
1553650
  });
1553652
1553651
  });
1553653
- } else {
1553652
+ } else if (resolvedSchema.additionalProperties === true || resolvedSchema.additionalProperties === void 0) {
1553654
1553653
  additionalPropertyKeys.forEach((key2) => {
1553655
- const breadcrumbPath = [...this.breadcrumbs, key2].join(".");
1553656
- const warningError = {
1553657
- message: `Additional property ${key2} is not allowed`,
1553658
- path: [...this.breadcrumbs, key2]
1553659
- };
1553660
1553654
  additionalPropertiesResults.push({
1553661
1553655
  key: key2,
1553662
1553656
  result: {
1553663
1553657
  isValid: true,
1553664
- // Keep as valid since additional properties are allowed
1553665
1553658
  coerced: false,
1553666
1553659
  usedProvidedExample: true,
1553667
- validExample: void 0,
1553668
- // Don't provide a valid example to avoid further validation
1553669
- errors: [warningError]
1553670
- // Include as warning error
1553660
+ validExample: exampleObj[key2],
1553661
+ errors: []
1553671
1553662
  }
1553672
1553663
  });
1553673
1553664
  });
1553665
+ } else {
1553666
+ const additionalPropsSchema = resolvedSchema.additionalProperties;
1553667
+ additionalPropertyKeys.forEach((key2) => {
1553668
+ const exampleConverter = new _ExampleConverter({
1553669
+ breadcrumbs: [...this.breadcrumbs, key2],
1553670
+ context: this.context,
1553671
+ schema: additionalPropsSchema,
1553672
+ example: exampleObj[key2],
1553673
+ depth: this.depth + 1,
1553674
+ generateOptionalProperties: this.generateOptionalProperties,
1553675
+ exampleGenerationStrategy: this.exampleGenerationStrategy,
1553676
+ seenRefs: this.getMaybeUpdatedSeenRefs()
1553677
+ });
1553678
+ const result = exampleConverter.convert();
1553679
+ additionalPropertiesResults.push({
1553680
+ key: key2,
1553681
+ result
1553682
+ });
1553683
+ });
1553674
1553684
  }
1553675
1553685
  }
1553676
1553686
  for (const { key: key2, result } of additionalPropertiesResults) {
@@ -1553678,6 +1553688,7 @@ var ExampleConverter = class _ExampleConverter extends AbstractConverter {
1553678
1553688
  example[key2] = result.validExample;
1553679
1553689
  }
1553680
1553690
  }
1553691
+ const isValid3 = resultsByKey.every((entry) => entry.result.isValid) && allOfResults.every((result) => result.isValid) && additionalPropertiesResults.every(({ result }) => result.isValid);
1553681
1553692
  if (Object.keys(example).length === 0) {
1553682
1553693
  const firstValidNonObject = allOfResults.find((result) => result.validExample !== void 0 && (typeof result.validExample !== "object" || result.validExample === null));
1553683
1553694
  if (firstValidNonObject) {
@@ -1713604,7 +1713615,7 @@ var CliContext = class {
1713604
1713615
  if (false) {
1713605
1713616
  this.logger.error("CLI_VERSION is not defined");
1713606
1713617
  }
1713607
- return "3.64.3";
1713618
+ return "3.64.4-5-g33f845f43de";
1713608
1713619
  }
1713609
1713620
  getCliName() {
1713610
1713621
  if (false) {
@@ -1716718,7 +1716729,7 @@ var import_path56 = __toESM(require("path"), 1);
1716718
1716729
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1716719
1716730
  var LOGS_FOLDER_NAME = "logs";
1716720
1716731
  function getCliSource() {
1716721
- const version7 = "3.64.3";
1716732
+ const version7 = "3.64.4-5-g33f845f43de";
1716722
1716733
  return `cli@${version7}`;
1716723
1716734
  }
1716724
1716735
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.64.3",
2
+ "version": "3.64.4-5-g33f845f43de",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",