@fern-api/fern-api-dev 5.113.2 → 5.113.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 +16 -28
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -147380,10 +147380,7 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
147380
147380
  }
147381
147381
  context3.builder.addError(errorDeclarationFile, {
147382
147382
  name: errorName,
147383
- schema: context3.isErrorUnknownSchema({
147384
- statusCode: parseInt(statusCode),
147385
- namespace: maybeEndpointNamespace
147386
- }) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147383
+ schema: context3.isErrorUnknownSchema(parseInt(statusCode)) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147387
147384
  });
147388
147385
  if (convertedEndpoint.errors == null) {
147389
147386
  convertedEndpoint.errors = [];
@@ -147847,7 +147844,7 @@ function sanitizeEndpointId(operationId) {
147847
147844
  }
147848
147845
  function getUnresolvedEndpointLocation(endpoint3) {
147849
147846
  const namespace = endpoint3.namespace;
147850
- const tag2 = endpoint3.tags.filter((tag3) => !isNamespaceTag(tag3, namespace))[0];
147847
+ const tag2 = endpoint3.tags.filter((tag3) => tag3 !== namespace)[0];
147851
147848
  const operationId = endpoint3.operationId;
147852
147849
  if (operationId == null) {
147853
147850
  if (tag2 != null) {
@@ -147916,9 +147913,6 @@ function getUnresolvedEndpointLocation(endpoint3) {
147916
147913
  tag: tag2
147917
147914
  };
147918
147915
  }
147919
- function isNamespaceTag(tag2, namespace) {
147920
- return namespace != null && tag2.toLowerCase() === namespace.toLowerCase();
147921
- }
147922
147916
  function getEndpointLocation(endpoint3) {
147923
147917
  const tag2 = endpoint3.tags[0];
147924
147918
  if (endpoint3.sdkName != null) {
@@ -149311,9 +149305,6 @@ var init_lib14 = __esm({
149311
149305
  });
149312
149306
 
149313
149307
  // ../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js
149314
- function getErrorKey({ statusCode, namespace }) {
149315
- return namespace != null ? `${namespace}:${statusCode}` : `${statusCode}`;
149316
- }
149317
149308
  var OpenApiIrConverterContext;
149318
149309
  var init_OpenApiIrConverterContext = __esm({
149319
149310
  "../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js"() {
@@ -149323,7 +149314,6 @@ var init_OpenApiIrConverterContext = __esm({
149323
149314
  init_lib13();
149324
149315
  init_ConvertOpenAPIOptions();
149325
149316
  init_State();
149326
- init_getNamespaceFromGroup();
149327
149317
  OpenApiIrConverterContext = class {
149328
149318
  logger;
149329
149319
  taskContext;
@@ -149389,18 +149379,17 @@ var init_OpenApiIrConverterContext = __esm({
149389
149379
  if (ir3.title != null) {
149390
149380
  this.builder.setDisplayName({ displayName: ir3.title });
149391
149381
  }
149392
- const schemaByErrorKey = {};
149382
+ const schemaByStatusCode = {};
149393
149383
  if (!this.enableUniqueErrorsPerEndpoint) {
149394
149384
  for (const endpoint3 of ir3.endpoints) {
149395
- const namespace = getEndpointNamespace(endpoint3.sdkName, endpoint3.namespace);
149396
149385
  for (const [statusCodeString, error50] of Object.entries(endpoint3.errors)) {
149397
- const key2 = getErrorKey({ statusCode: parseInt(statusCodeString), namespace });
149398
- const existingSchema = schemaByErrorKey[key2];
149386
+ const statusCode = parseInt(statusCodeString);
149387
+ const existingSchema = schemaByStatusCode[statusCode];
149399
149388
  if (existingSchema == null && error50.schema != null) {
149400
- schemaByErrorKey[key2] = error50.schema;
149389
+ schemaByStatusCode[statusCode] = error50.schema;
149401
149390
  } else if (existingSchema != null && error50.schema != null && isSchemaEqual(existingSchema, error50.schema)) {
149402
149391
  } else {
149403
- this.unknownSchema.add(key2);
149392
+ this.unknownSchema.add(statusCode);
149404
149393
  }
149405
149394
  }
149406
149395
  }
@@ -149443,11 +149432,10 @@ var init_OpenApiIrConverterContext = __esm({
149443
149432
  return this.urlIdMap.get(serverUrl);
149444
149433
  }
149445
149434
  /**
149446
- * Is error an unknown schema. Errors are shared per status code within a namespace,
149447
- * so a schema mismatch in one namespace does not affect errors in another.
149435
+ * Is error an unknown schema
149448
149436
  */
149449
- isErrorUnknownSchema({ statusCode, namespace }) {
149450
- return this.unknownSchema.has(getErrorKey({ statusCode, namespace }));
149437
+ isErrorUnknownSchema(statusCode) {
149438
+ return this.unknownSchema.has(statusCode);
149451
149439
  }
149452
149440
  /**
149453
149441
  * Returns the current endpoint method being processed
@@ -705548,7 +705536,7 @@ var AccessTokenPosthogManager = class {
705548
705536
  properties: {
705549
705537
  ...event,
705550
705538
  ...event.properties,
705551
- version: "5.113.2",
705539
+ version: "5.113.3",
705552
705540
  usingAccessToken: true,
705553
705541
  ...getRunIdProperties()
705554
705542
  }
@@ -705614,7 +705602,7 @@ var UserPosthogManager = class {
705614
705602
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705615
705603
  event: "CLI",
705616
705604
  properties: {
705617
- version: "5.113.2",
705605
+ version: "5.113.3",
705618
705606
  ...event,
705619
705607
  ...event.properties,
705620
705608
  usingAccessToken: false,
@@ -887290,7 +887278,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
887290
887278
  var LOGS_FOLDER_NAME = "logs";
887291
887279
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
887292
887280
  function getCliSource() {
887293
- const version7 = "5.113.2";
887281
+ const version7 = "5.113.3";
887294
887282
  return `cli@${version7}`;
887295
887283
  }
887296
887284
  var DebugLogger = class {
@@ -914603,7 +914591,7 @@ var LegacyDocsPublisher = class {
914603
914591
  previewId,
914604
914592
  disableTemplates: void 0,
914605
914593
  skipUpload,
914606
- cliVersion: "5.113.2",
914594
+ cliVersion: "5.113.3",
914607
914595
  loginCommand: "fern auth login"
914608
914596
  });
914609
914597
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -981859,7 +981847,7 @@ function getAutomationContextFromEnv() {
981859
981847
  config_branch: process.env.FERN_CONFIG_BRANCH,
981860
981848
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
981861
981849
  trigger: process.env.GITHUB_EVENT_NAME,
981862
- cli_version: "5.113.2"
981850
+ cli_version: "5.113.3"
981863
981851
  };
981864
981852
  }
981865
981853
  function isAutomationMode() {
@@ -982691,7 +982679,7 @@ var CliContext = class _CliContext {
982691
982679
  if (false) {
982692
982680
  this.logger.error("CLI_VERSION is not defined");
982693
982681
  }
982694
- return "5.113.2";
982682
+ return "5.113.3";
982695
982683
  }
982696
982684
  getCliName() {
982697
982685
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.113.2",
2
+ "version": "5.113.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",