@fern-api/fern-api-dev 5.62.1 → 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 +89 -16
  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
  });
@@ -83633,6 +83636,18 @@ function getUserAgentTemplateFromGeneratorConfig(generatorInvocation) {
83633
83636
  }
83634
83637
  return void 0;
83635
83638
  }
83639
+ function stripCliConfigKeys(config5) {
83640
+ if (typeof config5 !== "object" || config5 === null) {
83641
+ return config5;
83642
+ }
83643
+ const filtered = {};
83644
+ for (const [key2, value2] of Object.entries(config5)) {
83645
+ if (!CLI_ONLY_CONFIG_KEYS.has(key2)) {
83646
+ filtered[key2] = value2;
83647
+ }
83648
+ }
83649
+ return filtered;
83650
+ }
83636
83651
  async function checkVersionDoesNotAlreadyExist({ version: version7, packageName, generatorInvocation, context: context3 }) {
83637
83652
  if (version7 == null) {
83638
83653
  return;
@@ -83786,12 +83801,13 @@ function getRegistryName(language) {
83786
83801
  return language;
83787
83802
  }
83788
83803
  }
83789
- var REGISTRY_TIMEOUT_MS;
83804
+ var CLI_ONLY_CONFIG_KEYS, REGISTRY_TIMEOUT_MS;
83790
83805
  var init_checkVersionExists = __esm({
83791
83806
  "../../commons/api-workspace-commons/lib/checkVersionExists.js"() {
83792
83807
  "use strict";
83793
83808
  init_lib4();
83794
83809
  init_lib6();
83810
+ CLI_ONLY_CONFIG_KEYS = /* @__PURE__ */ new Set(["user-agent"]);
83795
83811
  REGISTRY_TIMEOUT_MS = 5e3;
83796
83812
  }
83797
83813
  });
@@ -271313,6 +271329,12 @@ var init_version6 = __esm({
271313
271329
  });
271314
271330
 
271315
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
+ }
271316
271338
  var import_url_join8, DynamicSnippetsConverter;
271317
271339
  var init_DynamicSnippetsConverter = __esm({
271318
271340
  "../generation/ir-generator/lib/dynamic-snippets/DynamicSnippetsConverter.js"() {
@@ -271799,11 +271821,14 @@ var init_DynamicSnippetsConverter = __esm({
271799
271821
  variable: void 0
271800
271822
  }
271801
271823
  });
271802
- case "oauth":
271824
+ case "oauth": {
271825
+ const customProperties = this.getOAuthCustomProperties(scheme);
271803
271826
  return dynamic_exports.Auth.oauth({
271804
271827
  clientId: this.fullCasingsGenerator.generateName("clientId"),
271805
- clientSecret: this.fullCasingsGenerator.generateName("clientSecret")
271828
+ clientSecret: this.fullCasingsGenerator.generateName("clientSecret"),
271829
+ customProperties: customProperties.length > 0 ? customProperties : void 0
271806
271830
  });
271831
+ }
271807
271832
  case "inferred":
271808
271833
  return dynamic_exports.Auth.inferred({
271809
271834
  parameters: this.getInferredAuthParameters(scheme)
@@ -271831,11 +271856,14 @@ var init_DynamicSnippetsConverter = __esm({
271831
271856
  return dynamic_exports.AuthValues.header({
271832
271857
  value: scheme.headerPlaceholder ?? "<value>"
271833
271858
  });
271834
- case "oauth":
271859
+ case "oauth": {
271860
+ const customPropertyValues = this.getOAuthCustomPropertyValues(scheme);
271835
271861
  return dynamic_exports.AuthValues.oauth({
271836
271862
  clientId: "<clientId>",
271837
- clientSecret: "<clientSecret>"
271863
+ clientSecret: "<clientSecret>",
271864
+ customPropertyValues: Object.keys(customPropertyValues).length > 0 ? customPropertyValues : void 0
271838
271865
  });
271866
+ }
271839
271867
  case "inferred":
271840
271868
  return dynamic_exports.AuthValues.inferred({
271841
271869
  values: this.getInferredAuthValues(scheme)
@@ -271917,6 +271945,48 @@ var init_DynamicSnippetsConverter = __esm({
271917
271945
  }
271918
271946
  return properties7;
271919
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
+ }
271920
271990
  convertEnvironments(environmentsConfig) {
271921
271991
  return {
271922
271992
  defaultEnvironment: environmentsConfig.defaultEnvironment,
@@ -687157,7 +687227,7 @@ var AccessTokenPosthogManager = class {
687157
687227
  properties: {
687158
687228
  ...event,
687159
687229
  ...event.properties,
687160
- version: "5.62.1",
687230
+ version: "5.63.0",
687161
687231
  usingAccessToken: true,
687162
687232
  ...getRunIdProperties()
687163
687233
  }
@@ -687223,7 +687293,7 @@ var UserPosthogManager = class {
687223
687293
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
687224
687294
  event: "CLI",
687225
687295
  properties: {
687226
- version: "5.62.1",
687296
+ version: "5.63.0",
687227
687297
  ...event,
687228
687298
  ...event.properties,
687229
687299
  usingAccessToken: false,
@@ -868318,7 +868388,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
868318
868388
  var LOGS_FOLDER_NAME = "logs";
868319
868389
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
868320
868390
  function getCliSource() {
868321
- const version7 = "5.62.1";
868391
+ const version7 = "5.63.0";
868322
868392
  return `cli@${version7}`;
868323
868393
  }
868324
868394
  var DebugLogger = class {
@@ -889034,6 +889104,7 @@ var GeneratorOccurrenceTracker = class {
889034
889104
  };
889035
889105
 
889036
889106
  // ../generation/remote-generation/remote-workspace-runner/lib/getDynamicGeneratorConfig.js
889107
+ init_lib17();
889037
889108
  init_lib12();
889038
889109
  init_lib4();
889039
889110
  init_lib9();
@@ -889042,7 +889113,7 @@ function getDynamicGeneratorConfig({ apiName, organization, generatorInvocation
889042
889113
  return {
889043
889114
  apiName,
889044
889115
  organization,
889045
- customConfig: generatorInvocation.config,
889116
+ customConfig: stripCliConfigKeys(generatorInvocation.config),
889046
889117
  outputConfig: outputConfig ?? dynamic_exports.GeneratorOutputConfig.local()
889047
889118
  };
889048
889119
  }
@@ -897087,6 +897158,7 @@ init_lib66();
897087
897158
  init_lib6();
897088
897159
 
897089
897160
  // ../generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
897161
+ init_lib17();
897090
897162
  init_lib26();
897091
897163
  init_lib8();
897092
897164
  init_lib6();
@@ -897204,7 +897276,7 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
897204
897276
  id: generatorInvocation.name,
897205
897277
  version: generatorInvocation.version,
897206
897278
  outputMode: generatorInvocation.outputMode,
897207
- customConfig: generatorInvocation.config,
897279
+ customConfig: stripCliConfigKeys(generatorInvocation.config),
897208
897280
  publishMetadata: generatorInvocation.publishMetadata
897209
897281
  };
897210
897282
  const createJobRequest = {
@@ -900813,7 +900885,7 @@ var LegacyDocsPublisher = class {
900813
900885
  previewId,
900814
900886
  disableTemplates: void 0,
900815
900887
  skipUpload,
900816
- cliVersion: "5.62.1",
900888
+ cliVersion: "5.63.0",
900817
900889
  loginCommand: "fern auth login"
900818
900890
  });
900819
900891
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -953100,6 +953172,7 @@ async function generateDynamicSnippetTests({ context: context3, ir: ir3, config:
953100
953172
  }
953101
953173
 
953102
953174
  // ../generation/local-generation/local-workspace-runner/lib/runGenerator.js
953175
+ init_lib17();
953103
953176
  init_lib12();
953104
953177
  init_lib8();
953105
953178
  var import_autoversion3 = __toESM(require_autoversion(), 1);
@@ -954771,7 +954844,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
954771
954844
  const mappedOutputVersionOverride = effectiveOutputVersion != null ? (0, import_autoversion3.mapMagicVersionForLanguage)(effectiveOutputVersion, generatorLanguage) : effectiveOutputVersion;
954772
954845
  const config5 = getGeneratorConfig({
954773
954846
  generatorInvocation,
954774
- customConfig: generatorInvocation.config,
954847
+ customConfig: stripCliConfigKeys(generatorInvocation.config),
954775
954848
  workspaceName: workspace.definition.rootApiFile.contents.name,
954776
954849
  outputVersion: mappedOutputVersionOverride,
954777
954850
  organization,
@@ -967092,7 +967165,7 @@ function getAutomationContextFromEnv() {
967092
967165
  config_branch: process.env.FERN_CONFIG_BRANCH,
967093
967166
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
967094
967167
  trigger: process.env.GITHUB_EVENT_NAME,
967095
- cli_version: "5.62.1"
967168
+ cli_version: "5.63.0"
967096
967169
  };
967097
967170
  }
967098
967171
  function isAutomationMode() {
@@ -967924,7 +967997,7 @@ var CliContext = class _CliContext {
967924
967997
  if (false) {
967925
967998
  this.logger.error("CLI_VERSION is not defined");
967926
967999
  }
967927
- return "5.62.1";
968000
+ return "5.63.0";
967928
968001
  }
967929
968002
  getCliName() {
967930
968003
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.62.1",
2
+ "version": "5.63.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",