@fern-api/fern-api-dev 3.49.3 → 3.49.4

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 +38 -13
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1430143,7 +1430143,7 @@ var AccessTokenPosthogManager = class {
1430143
1430143
  properties: {
1430144
1430144
  ...event,
1430145
1430145
  ...event.properties,
1430146
- version: "3.49.3",
1430146
+ version: "3.49.4",
1430147
1430147
  usingAccessToken: true
1430148
1430148
  }
1430149
1430149
  });
@@ -1430242,7 +1430242,7 @@ var UserPosthogManager = class {
1430242
1430242
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1430243
1430243
  event: "CLI",
1430244
1430244
  properties: {
1430245
- version: "3.49.3",
1430245
+ version: "3.49.4",
1430246
1430246
  ...event,
1430247
1430247
  ...event.properties,
1430248
1430248
  usingAccessToken: false,
@@ -1509677,7 +1509677,7 @@ var CliContext = class {
1509677
1509677
  if (false) {
1509678
1509678
  this.logger.error("CLI_VERSION is not defined");
1509679
1509679
  }
1509680
- return "3.49.3";
1509680
+ return "3.49.4";
1509681
1509681
  }
1509682
1509682
  getCliName() {
1509683
1509683
  if (false) {
@@ -1557633,7 +1557633,7 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
1557633
1557633
  sdkRequest: void 0,
1557634
1557634
  errors: errors4,
1557635
1557635
  auth: this.computeEndpointAuth(),
1557636
- security: this.operation.security ?? this.context.spec.security ?? this.getDefaultSecurityFromAuthOverrides(),
1557636
+ security: this.computeEndpointSecurity(),
1557637
1557637
  availability: this.context.getAvailability({
1557638
1557638
  node: this.operation,
1557639
1557639
  breadcrumbs: this.breadcrumbs
@@ -1557872,6 +1557872,15 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
1557872
1557872
  }
1557873
1557873
  return this.context.spec.security != null && this.context.spec.security.length > 0 || this.shouldApplyDefaultAuthOverrides();
1557874
1557874
  }
1557875
+ computeEndpointSecurity() {
1557876
+ if (this.operation.security != null && this.operation.security.length === 0) {
1557877
+ return [];
1557878
+ }
1557879
+ if (this.context.authOverrides?.auth != null) {
1557880
+ return this.getDefaultSecurityFromAuthOverrides();
1557881
+ }
1557882
+ return this.operation.security ?? this.context.spec.security;
1557883
+ }
1557875
1557884
  /**
1557876
1557885
  * Converts security scheme IDs to HTTP headers
1557877
1557886
  * @param securitySchemeIds - List of security scheme IDs
@@ -1557889,13 +1557898,24 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
1557889
1557898
  if (!this.context.authOverrides?.auth) {
1557890
1557899
  return void 0;
1557891
1557900
  }
1557892
- const authSchemeName = this.context.authOverrides.auth;
1557893
- if (typeof authSchemeName !== "string") {
1557894
- return void 0;
1557901
+ const authConfig = this.context.authOverrides.auth;
1557902
+ if (typeof authConfig === "string") {
1557903
+ const securityRequirement = {};
1557904
+ securityRequirement[authConfig] = [];
1557905
+ return [securityRequirement];
1557895
1557906
  }
1557896
- const securityRequirement = {};
1557897
- securityRequirement[authSchemeName] = [];
1557898
- return [securityRequirement];
1557907
+ if (typeof authConfig === "object" && "any" in authConfig) {
1557908
+ const anySchemes = authConfig.any;
1557909
+ if (Array.isArray(anySchemes)) {
1557910
+ return anySchemes.map((scheme) => {
1557911
+ const schemeName = typeof scheme === "string" ? scheme : scheme.scheme;
1557912
+ const securityRequirement = {};
1557913
+ securityRequirement[schemeName] = [];
1557914
+ return securityRequirement;
1557915
+ });
1557916
+ }
1557917
+ }
1557918
+ return void 0;
1557899
1557919
  }
1557900
1557920
  authSchemeToHeaders(securitySchemeIds) {
1557901
1557921
  const headers2 = [];
@@ -1599332,7 +1599352,7 @@ function convertService(irService, ir14) {
1599332
1599352
  availability: convertIrAvailability(irEndpoint.availability ?? irService.availability),
1599333
1599353
  auth: irEndpoint.auth,
1599334
1599354
  authV2: convertEndpointSecurity(irEndpoint.security),
1599335
- multiAuth: convertMultiAuth(irEndpoint.security),
1599355
+ multiAuth: convertMultiAuth(irEndpoint.security, ir14.auth),
1599336
1599356
  description: irEndpoint.docs ?? void 0,
1599337
1599357
  method: convertHttpMethod2(irEndpoint.method),
1599338
1599358
  defaultEnvironment: ir14.environments?.defaultEnvironment != null ? FdrAPI_exports.EnvironmentId(ir14.environments.defaultEnvironment) : void 0,
@@ -1599511,8 +1599531,13 @@ function convertEndpointSecurity(security) {
1599511
1599531
  const authSchemeKeys = new Set(security.flatMap((item) => Object.keys(item)));
1599512
1599532
  return Array.from(authSchemeKeys).map((key) => FdrAPI_exports.AuthSchemeId(key));
1599513
1599533
  }
1599514
- function convertMultiAuth(security) {
1599534
+ function convertMultiAuth(security, apiAuth) {
1599515
1599535
  if (security == null) {
1599536
+ if (apiAuth != null && apiAuth.requirement === "ANY" && apiAuth.schemes.length > 0) {
1599537
+ return apiAuth.schemes.map((scheme) => ({
1599538
+ schemes: [FdrAPI_exports.AuthSchemeId(scheme.key)]
1599539
+ }));
1599540
+ }
1599516
1599541
  return void 0;
1599517
1599542
  }
1599518
1599543
  if (security.length === 0) {
@@ -1610892,7 +1610917,7 @@ var import_path40 = __toESM(require("path"), 1);
1610892
1610917
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1610893
1610918
  var LOGS_FOLDER_NAME = "logs";
1610894
1610919
  function getCliSource() {
1610895
- const version7 = "3.49.3";
1610920
+ const version7 = "3.49.4";
1610896
1610921
  return `cli@${version7}`;
1610897
1610922
  }
1610898
1610923
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.49.3",
2
+ "version": "3.49.4",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",