@fern-api/fern-api-dev 5.62.2 → 5.63.0

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 +69 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -73781,9 +73781,11 @@ var init_OAuth2 = __esm({
73781
73781
  "use strict";
73782
73782
  init_core2();
73783
73783
  init_Name4();
73784
+ init_NamedParameter2();
73784
73785
  OAuth = schemas_exports3.objectWithoutOptionalProperties({
73785
73786
  clientId: Name2,
73786
- clientSecret: Name2
73787
+ clientSecret: Name2,
73788
+ customProperties: schemas_exports3.list(NamedParameter).optional()
73787
73789
  });
73788
73790
  }
73789
73791
  });
@@ -73885,7 +73887,8 @@ var init_OAuthValues3 = __esm({
73885
73887
  init_core2();
73886
73888
  OAuthValues = schemas_exports3.objectWithoutOptionalProperties({
73887
73889
  clientId: schemas_exports3.string(),
73888
- clientSecret: schemas_exports3.string()
73890
+ clientSecret: schemas_exports3.string(),
73891
+ customPropertyValues: schemas_exports3.record(schemas_exports3.string(), schemas_exports3.unknown()).optional()
73889
73892
  });
73890
73893
  }
73891
73894
  });
@@ -271326,6 +271329,12 @@ var init_version6 = __esm({
271326
271329
  });
271327
271330
 
271328
271331
  // ../generation/ir-generator/lib/dynamic-snippets/DynamicSnippetsConverter.js
271332
+ function isExcludedOAuthProperty(typeReference2) {
271333
+ if (typeReference2.type !== "container") {
271334
+ return false;
271335
+ }
271336
+ return typeReference2.container.type === "literal" || typeReference2.container.type === "optional";
271337
+ }
271329
271338
  var import_url_join8, DynamicSnippetsConverter;
271330
271339
  var init_DynamicSnippetsConverter = __esm({
271331
271340
  "../generation/ir-generator/lib/dynamic-snippets/DynamicSnippetsConverter.js"() {
@@ -271812,11 +271821,14 @@ var init_DynamicSnippetsConverter = __esm({
271812
271821
  variable: void 0
271813
271822
  }
271814
271823
  });
271815
- case "oauth":
271824
+ case "oauth": {
271825
+ const customProperties = this.getOAuthCustomProperties(scheme);
271816
271826
  return dynamic_exports.Auth.oauth({
271817
271827
  clientId: this.fullCasingsGenerator.generateName("clientId"),
271818
- clientSecret: this.fullCasingsGenerator.generateName("clientSecret")
271828
+ clientSecret: this.fullCasingsGenerator.generateName("clientSecret"),
271829
+ customProperties: customProperties.length > 0 ? customProperties : void 0
271819
271830
  });
271831
+ }
271820
271832
  case "inferred":
271821
271833
  return dynamic_exports.Auth.inferred({
271822
271834
  parameters: this.getInferredAuthParameters(scheme)
@@ -271844,11 +271856,14 @@ var init_DynamicSnippetsConverter = __esm({
271844
271856
  return dynamic_exports.AuthValues.header({
271845
271857
  value: scheme.headerPlaceholder ?? "<value>"
271846
271858
  });
271847
- case "oauth":
271859
+ case "oauth": {
271860
+ const customPropertyValues = this.getOAuthCustomPropertyValues(scheme);
271848
271861
  return dynamic_exports.AuthValues.oauth({
271849
271862
  clientId: "<clientId>",
271850
- clientSecret: "<clientSecret>"
271863
+ clientSecret: "<clientSecret>",
271864
+ customPropertyValues: Object.keys(customPropertyValues).length > 0 ? customPropertyValues : void 0
271851
271865
  });
271866
+ }
271852
271867
  case "inferred":
271853
271868
  return dynamic_exports.AuthValues.inferred({
271854
271869
  values: this.getInferredAuthValues(scheme)
@@ -271930,6 +271945,48 @@ var init_DynamicSnippetsConverter = __esm({
271930
271945
  }
271931
271946
  return properties7;
271932
271947
  }
271948
+ getOAuthCustomProperties(scheme) {
271949
+ const parameters2 = [];
271950
+ const customProperties = scheme.configuration.tokenEndpoint.requestProperties.customProperties ?? [];
271951
+ for (const customProperty of customProperties) {
271952
+ if (isExcludedOAuthProperty(customProperty.property.valueType)) {
271953
+ continue;
271954
+ }
271955
+ parameters2.push({
271956
+ name: this.inflateNameAndWireValue(customProperty.property.name),
271957
+ typeReference: this.convertTypeReference(customProperty.property.valueType),
271958
+ propertyAccess: void 0,
271959
+ variable: void 0
271960
+ });
271961
+ }
271962
+ const scopes = scheme.configuration.tokenEndpoint.requestProperties.scopes;
271963
+ if (scopes != null && !isExcludedOAuthProperty(scopes.property.valueType)) {
271964
+ parameters2.push({
271965
+ name: this.inflateNameAndWireValue(scopes.property.name),
271966
+ typeReference: this.convertTypeReference(scopes.property.valueType),
271967
+ propertyAccess: void 0,
271968
+ variable: void 0
271969
+ });
271970
+ }
271971
+ return parameters2;
271972
+ }
271973
+ getOAuthCustomPropertyValues(scheme) {
271974
+ const values2 = {};
271975
+ const customProperties = scheme.configuration.tokenEndpoint.requestProperties.customProperties ?? [];
271976
+ for (const customProperty of customProperties) {
271977
+ if (isExcludedOAuthProperty(customProperty.property.valueType)) {
271978
+ continue;
271979
+ }
271980
+ const wireValue = getWireValue(customProperty.property.name);
271981
+ values2[wireValue] = `<${wireValue}>`;
271982
+ }
271983
+ const scopes = scheme.configuration.tokenEndpoint.requestProperties.scopes;
271984
+ if (scopes != null && !isExcludedOAuthProperty(scopes.property.valueType)) {
271985
+ const wireValue = getWireValue(scopes.property.name);
271986
+ values2[wireValue] = `<${wireValue}>`;
271987
+ }
271988
+ return values2;
271989
+ }
271933
271990
  convertEnvironments(environmentsConfig) {
271934
271991
  return {
271935
271992
  defaultEnvironment: environmentsConfig.defaultEnvironment,
@@ -687170,7 +687227,7 @@ var AccessTokenPosthogManager = class {
687170
687227
  properties: {
687171
687228
  ...event,
687172
687229
  ...event.properties,
687173
- version: "5.62.2",
687230
+ version: "5.63.0",
687174
687231
  usingAccessToken: true,
687175
687232
  ...getRunIdProperties()
687176
687233
  }
@@ -687236,7 +687293,7 @@ var UserPosthogManager = class {
687236
687293
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
687237
687294
  event: "CLI",
687238
687295
  properties: {
687239
- version: "5.62.2",
687296
+ version: "5.63.0",
687240
687297
  ...event,
687241
687298
  ...event.properties,
687242
687299
  usingAccessToken: false,
@@ -868331,7 +868388,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
868331
868388
  var LOGS_FOLDER_NAME = "logs";
868332
868389
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
868333
868390
  function getCliSource() {
868334
- const version7 = "5.62.2";
868391
+ const version7 = "5.63.0";
868335
868392
  return `cli@${version7}`;
868336
868393
  }
868337
868394
  var DebugLogger = class {
@@ -900828,7 +900885,7 @@ var LegacyDocsPublisher = class {
900828
900885
  previewId,
900829
900886
  disableTemplates: void 0,
900830
900887
  skipUpload,
900831
- cliVersion: "5.62.2",
900888
+ cliVersion: "5.63.0",
900832
900889
  loginCommand: "fern auth login"
900833
900890
  });
900834
900891
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -967108,7 +967165,7 @@ function getAutomationContextFromEnv() {
967108
967165
  config_branch: process.env.FERN_CONFIG_BRANCH,
967109
967166
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
967110
967167
  trigger: process.env.GITHUB_EVENT_NAME,
967111
- cli_version: "5.62.2"
967168
+ cli_version: "5.63.0"
967112
967169
  };
967113
967170
  }
967114
967171
  function isAutomationMode() {
@@ -967940,7 +967997,7 @@ var CliContext = class _CliContext {
967940
967997
  if (false) {
967941
967998
  this.logger.error("CLI_VERSION is not defined");
967942
967999
  }
967943
- return "5.62.2";
968000
+ return "5.63.0";
967944
968001
  }
967945
968002
  getCliName() {
967946
968003
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.62.2",
2
+ "version": "5.63.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",