@fern-api/fern-api-dev 3.64.0 → 3.64.1

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 +28 -48
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1426227,7 +1426227,7 @@ var AccessTokenPosthogManager = class {
1426227
1426227
  properties: {
1426228
1426228
  ...event,
1426229
1426229
  ...event.properties,
1426230
- version: "3.64.0",
1426230
+ version: "3.64.1",
1426231
1426231
  usingAccessToken: true
1426232
1426232
  }
1426233
1426233
  });
@@ -1426326,7 +1426326,7 @@ var UserPosthogManager = class {
1426326
1426326
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1426327
1426327
  event: "CLI",
1426328
1426328
  properties: {
1426329
- version: "3.64.0",
1426329
+ version: "3.64.1",
1426330
1426330
  ...event,
1426331
1426331
  ...event.properties,
1426332
1426332
  usingAccessToken: false,
@@ -1554238,29 +1554238,23 @@ var SchemaConverter = class _SchemaConverter extends AbstractConverter {
1554238
1554238
  const userSpecifiedExamples = {};
1554239
1554239
  for (const [index3, example] of examples.entries()) {
1554240
1554240
  const resolvedExample = this.context.resolveExample(example);
1554241
+ const exampleName = `${this.id}_example_${index3}`;
1554241
1554242
  const convertedExample = this.generateOrValidateExample({
1554242
- example: resolvedExample
1554243
+ example: resolvedExample,
1554244
+ exampleName
1554243
1554245
  });
1554244
- userSpecifiedExamples[`${this.id}_example_${index3}`] = convertedExample;
1554246
+ userSpecifiedExamples[exampleName] = convertedExample;
1554245
1554247
  }
1554246
1554248
  return userSpecifiedExamples;
1554247
1554249
  }
1554248
- generateOrValidateExample({ example, ignoreErrors }) {
1554250
+ generateOrValidateExample({ example }) {
1554249
1554251
  const exampleConverter = new ExampleConverter({
1554250
1554252
  breadcrumbs: this.breadcrumbs,
1554251
1554253
  context: this.context,
1554252
1554254
  schema: this.schema,
1554253
1554255
  example
1554254
1554256
  });
1554255
- const { validExample: convertedExample, errors: errors4 } = exampleConverter.convert();
1554256
- if (!ignoreErrors) {
1554257
- errors4.forEach((error49) => {
1554258
- this.context.errorCollector.collect({
1554259
- message: error49.message,
1554260
- path: error49.path
1554261
- });
1554262
- });
1554263
- }
1554257
+ const { validExample: convertedExample } = exampleConverter.convert();
1554264
1554258
  return convertedExample;
1554265
1554259
  }
1554266
1554260
  };
@@ -1554526,7 +1554520,8 @@ var AbstractMediaTypeObjectConverter = class extends AbstractConverter {
1554526
1554520
  v2Examples.userSpecifiedExamples[exampleName] = this.generateOrValidateExample({
1554527
1554521
  schema: schema2,
1554528
1554522
  example: resolvedExample,
1554529
- exampleGenerationStrategy
1554523
+ exampleGenerationStrategy,
1554524
+ exampleName
1554530
1554525
  });
1554531
1554526
  } else {
1554532
1554527
  v2Examples.userSpecifiedExamples[exampleName] = resolvedExample;
@@ -1554534,18 +1554529,19 @@ var AbstractMediaTypeObjectConverter = class extends AbstractConverter {
1554534
1554529
  }
1554535
1554530
  }
1554536
1554531
  if (Object.keys(v2Examples.userSpecifiedExamples).length === 0 && schema2 != null) {
1554537
- const exampleName = camelCase_default(`${[...this.group, this.method].join("_")}_example`);
1554538
- v2Examples.autogeneratedExamples[exampleName] = this.generateOrValidateExample({
1554532
+ const autoExampleName = camelCase_default(`${[...this.group, this.method].join("_")}_example`);
1554533
+ v2Examples.autogeneratedExamples[autoExampleName] = this.generateOrValidateExample({
1554539
1554534
  schema: schema2,
1554540
1554535
  example: void 0,
1554541
1554536
  ignoreErrors: true,
1554542
1554537
  generateOptionalProperties,
1554543
- exampleGenerationStrategy
1554538
+ exampleGenerationStrategy,
1554539
+ exampleName: autoExampleName
1554544
1554540
  });
1554545
1554541
  }
1554546
1554542
  return v2Examples;
1554547
1554543
  }
1554548
- generateOrValidateExample({ schema: schema2, example, ignoreErrors, generateOptionalProperties, exampleGenerationStrategy }) {
1554544
+ generateOrValidateExample({ schema: schema2, example, generateOptionalProperties, exampleGenerationStrategy }) {
1554549
1554545
  const resolvedSchema = this.context.resolveMaybeReference({
1554550
1554546
  schemaOrReference: schema2,
1554551
1554547
  breadcrumbs: this.breadcrumbs,
@@ -1554566,15 +1554562,7 @@ var AbstractMediaTypeObjectConverter = class extends AbstractConverter {
1554566
1554562
  generateOptionalProperties: generateOptionalProperties ?? false,
1554567
1554563
  exampleGenerationStrategy
1554568
1554564
  });
1554569
- const { validExample: convertedExample, errors: errors4 } = exampleConverter.convert();
1554570
- if (!ignoreErrors) {
1554571
- errors4.forEach((error49) => {
1554572
- this.context.errorCollector.collect({
1554573
- message: error49.message,
1554574
- path: error49.path
1554575
- });
1554576
- });
1554577
- }
1554565
+ const { validExample: convertedExample } = exampleConverter.convert();
1554578
1554566
  return convertedExample;
1554579
1554567
  }
1554580
1554568
  };
@@ -1554680,7 +1554668,8 @@ var AbstractParameterConverter = class extends AbstractConverter {
1554680
1554668
  if (resolvedExample != null) {
1554681
1554669
  v2Examples.userSpecifiedExamples[key2] = this.generateOrValidateExample({
1554682
1554670
  schema: schema2,
1554683
- example: resolvedExample
1554671
+ example: resolvedExample,
1554672
+ exampleName: key2
1554684
1554673
  });
1554685
1554674
  }
1554686
1554675
  }
@@ -1554691,7 +1554680,8 @@ var AbstractParameterConverter = class extends AbstractConverter {
1554691
1554680
  });
1554692
1554681
  v2Examples.userSpecifiedExamples[parameterExampleName] = this.generateOrValidateExample({
1554693
1554682
  schema: schema2,
1554694
- example: parameterExample
1554683
+ example: parameterExample,
1554684
+ exampleName: parameterExampleName
1554695
1554685
  });
1554696
1554686
  }
1554697
1554687
  if (Object.keys(v2Examples.userSpecifiedExamples).length === 0) {
@@ -1554699,27 +1554689,20 @@ var AbstractParameterConverter = class extends AbstractConverter {
1554699
1554689
  v2Examples.autogeneratedExamples[exampleName] = this.generateOrValidateExample({
1554700
1554690
  schema: schema2,
1554701
1554691
  example: void 0,
1554702
- ignoreErrors: true
1554692
+ ignoreErrors: true,
1554693
+ exampleName
1554703
1554694
  });
1554704
1554695
  }
1554705
1554696
  return v2Examples;
1554706
1554697
  }
1554707
- generateOrValidateExample({ schema: schema2, ignoreErrors, example }) {
1554698
+ generateOrValidateExample({ schema: schema2, example }) {
1554708
1554699
  const exampleConverter = new ExampleConverter({
1554709
1554700
  breadcrumbs: this.breadcrumbs,
1554710
1554701
  context: this.context,
1554711
1554702
  schema: schema2,
1554712
1554703
  example
1554713
1554704
  });
1554714
- const { validExample: convertedExample, errors: errors4 } = exampleConverter.convert();
1554715
- if (!ignoreErrors) {
1554716
- errors4.forEach((error49) => {
1554717
- this.context.errorCollector.collect({
1554718
- message: error49.message,
1554719
- path: error49.path
1554720
- });
1554721
- });
1554722
- }
1554705
+ const { validExample: convertedExample } = exampleConverter.convert();
1554723
1554706
  return convertedExample;
1554724
1554707
  }
1554725
1554708
  /**
@@ -1561698,13 +1561681,10 @@ var OSSWorkspace = class _OSSWorkspace extends BaseOpenAPIWorkspace {
1561698
1561681
  const errorStats = errorCollector.getErrorStats();
1561699
1561682
  const specInfo = errorCollector.relativeFilepathToSpec ? ` for ${errorCollector.relativeFilepathToSpec}` : "";
1561700
1561683
  if (errorStats.numErrors > 0) {
1561701
- context2.logger.log("error", `API validation${specInfo} completed with ${errorStats.numErrors} errors and ${errorStats.numWarnings} warnings.`);
1561702
- } else if (errorStats.numWarnings > 0) {
1561684
+ context2.logger.log("error", `API validation${specInfo} completed with ${errorStats.numErrors} errors.`);
1561685
+ } else if (errorStats.numWarnings > 0 && logWarnings) {
1561703
1561686
  context2.logger.log("warn", `API validation${specInfo} completed with ${errorStats.numWarnings} warnings.`);
1561704
- } else {
1561705
- context2.logger.log("info", `All checks passed when parsing OpenAPI${specInfo}.`);
1561706
1561687
  }
1561707
- context2.logger.log("info", "");
1561708
1561688
  await errorCollector.logErrors({ logWarnings });
1561709
1561689
  }
1561710
1561690
  }
@@ -1712141,7 +1712121,7 @@ var CliContext = class {
1712141
1712121
  if (false) {
1712142
1712122
  this.logger.error("CLI_VERSION is not defined");
1712143
1712123
  }
1712144
- return "3.64.0";
1712124
+ return "3.64.1";
1712145
1712125
  }
1712146
1712126
  getCliName() {
1712147
1712127
  if (false) {
@@ -1715255,7 +1715235,7 @@ var import_path56 = __toESM(require("path"), 1);
1715255
1715235
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1715256
1715236
  var LOGS_FOLDER_NAME = "logs";
1715257
1715237
  function getCliSource() {
1715258
- const version7 = "3.64.0";
1715238
+ const version7 = "3.64.1";
1715259
1715239
  return `cli@${version7}`;
1715260
1715240
  }
1715261
1715241
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.64.0",
2
+ "version": "3.64.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",