@fern-api/fern-api-dev 5.44.12 → 5.44.13

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 +45 -19
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -660747,7 +660747,7 @@ var NoConflictingParameterNamesRule = {
660747
660747
  const mergedParams = mergeParameters(pathLevelParams, operationParams);
660748
660748
  const nameToParams = {};
660749
660749
  for (const param of mergedParams) {
660750
- const normalizedName = toCamelCase3(param.name);
660750
+ const normalizedName = toCamelCase3(param.fernParameterName ?? param.name);
660751
660751
  if (normalizedName === "") {
660752
660752
  continue;
660753
660753
  }
@@ -660762,7 +660762,10 @@ var NoConflictingParameterNamesRule = {
660762
660762
  if (distinctTypes.size <= 1) {
660763
660763
  continue;
660764
660764
  }
660765
- const paramDescriptions = params2.map((p14) => `${p14.in} parameter '${p14.name}'`).join(", ");
660765
+ const paramDescriptions = params2.map((p14) => {
660766
+ const effectiveName = p14.fernParameterName ?? p14.name;
660767
+ return `${p14.in} parameter '${effectiveName}'`;
660768
+ }).join(", ");
660766
660769
  violations.push({
660767
660770
  name: "no-conflicting-parameter-names",
660768
660771
  severity: "error",
@@ -660821,7 +660824,8 @@ function resolveParam(param, api2, visited = /* @__PURE__ */ new Set()) {
660821
660824
  return void 0;
660822
660825
  }
660823
660826
  if (typeof paramObj.in === "string" && typeof paramObj.name === "string") {
660824
- return { in: paramObj.in, name: paramObj.name };
660827
+ const fernParameterName = typeof paramObj["x-fern-parameter-name"] === "string" ? paramObj["x-fern-parameter-name"] : void 0;
660828
+ return { in: paramObj.in, name: paramObj.name, fernParameterName };
660825
660829
  }
660826
660830
  return void 0;
660827
660831
  }
@@ -669562,7 +669566,7 @@ var AccessTokenPosthogManager = class {
669562
669566
  properties: {
669563
669567
  ...event,
669564
669568
  ...event.properties,
669565
- version: "5.44.12",
669569
+ version: "5.44.13",
669566
669570
  usingAccessToken: true,
669567
669571
  ...getRunIdProperties()
669568
669572
  }
@@ -669626,7 +669630,7 @@ var UserPosthogManager = class {
669626
669630
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
669627
669631
  event: "CLI",
669628
669632
  properties: {
669629
- version: "5.44.12",
669633
+ version: "5.44.13",
669630
669634
  ...event,
669631
669635
  ...event.properties,
669632
669636
  usingAccessToken: false,
@@ -861367,7 +861371,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
861367
861371
  var LOGS_FOLDER_NAME = "logs";
861368
861372
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
861369
861373
  function getCliSource() {
861370
- const version7 = "5.44.12";
861374
+ const version7 = "5.44.13";
861371
861375
  return `cli@${version7}`;
861372
861376
  }
861373
861377
  var DebugLogger = class {
@@ -892459,7 +892463,7 @@ var LegacyDocsPublisher = class {
892459
892463
  previewId,
892460
892464
  disableTemplates: void 0,
892461
892465
  skipUpload,
892462
- cliVersion: "5.44.12",
892466
+ cliVersion: "5.44.13",
892463
892467
  loginCommand: "fern auth login"
892464
892468
  });
892465
892469
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -925028,14 +925032,25 @@ var EndpointSnippetGenerator5 = class {
925028
925032
  getMethodArgsForBodyRequest({ request: request7, snippet: snippet2 }) {
925029
925033
  const args = [];
925030
925034
  this.context.errors.scope(Scope4.PathParameters);
925031
- const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
925032
- if (pathParameters.length > 0) {
925033
- args.push(...this.getPathParameters({ namedParameters: pathParameters, snippet: snippet2 }).map((field5) => field5.value));
925035
+ const irPathParameters = this.context.ir.pathParameters ?? [];
925036
+ const requiredIrPathParameters = irPathParameters.filter((p14) => p14.variable == null);
925037
+ const optionalIrPathParameters = irPathParameters.filter((p14) => p14.variable != null);
925038
+ const requiredPathParameters = [...requiredIrPathParameters, ...request7.pathParameters ?? []];
925039
+ if (requiredPathParameters.length > 0) {
925040
+ args.push(...this.getPathParameters({ namedParameters: requiredPathParameters, snippet: snippet2 }).map((field5) => field5.value));
925034
925041
  }
925035
925042
  this.context.errors.unscope();
925036
925043
  this.context.errors.scope(Scope4.RequestBody);
925037
925044
  if (request7.body != null) {
925038
- args.push(this.getBodyRequestArg({ body: request7.body, value: snippet2.requestBody }));
925045
+ const bodyArg = this.getBodyRequestArg({ body: request7.body, value: snippet2.requestBody });
925046
+ if (!php_exports.TypeLiteral.isNop(bodyArg)) {
925047
+ args.push(bodyArg);
925048
+ }
925049
+ }
925050
+ this.context.errors.unscope();
925051
+ this.context.errors.scope(Scope4.PathParameters);
925052
+ if (optionalIrPathParameters.length > 0) {
925053
+ args.push(...this.getPathParameters({ namedParameters: optionalIrPathParameters, snippet: snippet2 }).map((field5) => field5.value));
925039
925054
  }
925040
925055
  this.context.errors.unscope();
925041
925056
  return args;
@@ -925062,17 +925077,25 @@ var EndpointSnippetGenerator5 = class {
925062
925077
  const args = [];
925063
925078
  const inlinePathParameters = this.context.customConfig?.inlinePathParameters ?? false;
925064
925079
  this.context.errors.scope(Scope4.PathParameters);
925065
- const pathParameterFields = [];
925066
- const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
925067
- if (pathParameters.length > 0) {
925068
- pathParameterFields.push(...this.getPathParameters({ namedParameters: pathParameters, snippet: snippet2 }));
925069
- }
925080
+ const irPathParameters = this.context.ir.pathParameters ?? [];
925081
+ const requiredIrPathParameters = irPathParameters.filter((p14) => p14.variable == null);
925082
+ const optionalIrPathParameters = irPathParameters.filter((p14) => p14.variable != null);
925083
+ const requiredPathParameterFields = [];
925084
+ const requiredPathParams = [...requiredIrPathParameters, ...request7.pathParameters ?? []];
925085
+ if (requiredPathParams.length > 0) {
925086
+ requiredPathParameterFields.push(...this.getPathParameters({ namedParameters: requiredPathParams, snippet: snippet2 }));
925087
+ }
925088
+ const optionalPathParameterFields = [];
925089
+ if (optionalIrPathParameters.length > 0) {
925090
+ optionalPathParameterFields.push(...this.getPathParameters({ namedParameters: optionalIrPathParameters, snippet: snippet2 }));
925091
+ }
925092
+ const pathParameterFields = [...requiredPathParameterFields, ...optionalPathParameterFields];
925070
925093
  this.context.errors.unscope();
925071
925094
  this.context.errors.scope(Scope4.RequestBody);
925072
925095
  const filePropertyInfo = this.getFilePropertyInfo({ request: request7, snippet: snippet2 });
925073
925096
  this.context.errors.unscope();
925074
925097
  if (!this.context.includePathParametersInWrappedRequest({ request: request7, inlinePathParameters })) {
925075
- args.push(...pathParameterFields.map((field5) => field5.value));
925098
+ args.push(...requiredPathParameterFields.map((field5) => field5.value));
925076
925099
  }
925077
925100
  if (this.context.needsRequestParameter({
925078
925101
  request: request7,
@@ -925090,6 +925113,9 @@ var EndpointSnippetGenerator5 = class {
925090
925113
  filePropertyInfo
925091
925114
  }));
925092
925115
  }
925116
+ if (!this.context.includePathParametersInWrappedRequest({ request: request7, inlinePathParameters })) {
925117
+ args.push(...optionalPathParameterFields.map((field5) => field5.value));
925118
+ }
925093
925119
  return args;
925094
925120
  }
925095
925121
  getFilePropertyInfo({ request: request7, snippet: snippet2 }) {
@@ -957598,7 +957624,7 @@ function getAutomationContextFromEnv() {
957598
957624
  config_branch: process.env.FERN_CONFIG_BRANCH,
957599
957625
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
957600
957626
  trigger: process.env.GITHUB_EVENT_NAME,
957601
- cli_version: "5.44.12"
957627
+ cli_version: "5.44.13"
957602
957628
  };
957603
957629
  }
957604
957630
  function isAutomationMode() {
@@ -958424,7 +958450,7 @@ var CliContext = class _CliContext {
958424
958450
  if (false) {
958425
958451
  this.logger.error("CLI_VERSION is not defined");
958426
958452
  }
958427
- return "5.44.12";
958453
+ return "5.44.13";
958428
958454
  }
958429
958455
  getCliName() {
958430
958456
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.44.12",
2
+ "version": "5.44.13",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",