@fern-api/fern-api-dev 5.65.3 → 5.65.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 +35 -36
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -145267,7 +145267,6 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
145267
145267
  fileContainingReference: declarationFile,
145268
145268
  namespace: maybeEndpointNamespace
145269
145269
  });
145270
- names2.add(pathParameter.name);
145271
145270
  }
145272
145271
  const queryParameters = {};
145273
145272
  for (const queryParameter of endpoint3.queryParameters) {
@@ -674562,7 +674561,7 @@ var NoConflictingRequestWrapperPropertiesRule = {
674562
674561
  }
674563
674562
  violations.push({
674564
674563
  severity: "fatal",
674565
- message: `Multiple request properties have the name ${source_default.bold(name2)}. This is not suitable for code generation. Use the "name" property to deconflict.
674564
+ message: `Multiple request properties have the name ${source_default.bold(name2)}. This is not suitable for code generation. Use the "name" property (or "x-fern-parameter-name" in OpenAPI) to deconflict.
674566
674565
  ` + propertiesWithName.map((property24) => ` - ${convertRequestWrapperPropertyToString(property24)}`).join("\n")
674567
674566
  });
674568
674567
  }
@@ -674598,6 +674597,26 @@ function getRequestWrapperPropertiesByName({ endpoint: endpoint3, service, relat
674598
674597
  });
674599
674598
  }
674600
674599
  }
674600
+ if (service["path-parameters"] != null) {
674601
+ for (const [pathParameterKey, pathParameter] of Object.entries(service["path-parameters"])) {
674602
+ if (isVariablePathParameter(pathParameter)) {
674603
+ continue;
674604
+ }
674605
+ addProperty3(pathParameterKey, {
674606
+ type: "service-path-parameter",
674607
+ pathParameterKey
674608
+ });
674609
+ }
674610
+ }
674611
+ for (const [pathParameterKey, pathParameter] of Object.entries(getEndpointPathParameters(endpoint3))) {
674612
+ if (isVariablePathParameter(pathParameter)) {
674613
+ continue;
674614
+ }
674615
+ addProperty3(pathParameterKey, {
674616
+ type: "endpoint-path-parameter",
674617
+ pathParameterKey
674618
+ });
674619
+ }
674601
674620
  if (service.headers != null) {
674602
674621
  for (const [headerKey, header] of Object.entries(service.headers)) {
674603
674622
  addProperty3(getHeaderName3({ headerKey, header }).name, {
@@ -674653,6 +674672,10 @@ function convertRequestWrapperPropertyToString(property24) {
674653
674672
  switch (property24.type) {
674654
674673
  case "service-header":
674655
674674
  return `Service header "${property24.headerKey}"`;
674675
+ case "service-path-parameter":
674676
+ return `Service path parameter "${property24.pathParameterKey}"`;
674677
+ case "endpoint-path-parameter":
674678
+ return `Path parameter "${property24.pathParameterKey}"`;
674656
674679
  case "endpoint-header":
674657
674680
  return `Endpoint header "${property24.headerKey}"`;
674658
674681
  case "endpoint-query-parameter":
@@ -674688,7 +674711,7 @@ function getCamelCaseNormalizedCollisions(nameToProperties) {
674688
674711
  }
674689
674712
  violations.push({
674690
674713
  severity: "fatal",
674691
- message: `Multiple request properties resolve to the same generated name ${source_default.bold(normalizedName)} after camelCase normalization. This causes broken generated code. Use the "name" property to disambiguate.
674714
+ message: `Multiple request properties resolve to the same generated name ${source_default.bold(normalizedName)} after camelCase normalization. This causes broken generated code. Use the "name" property (or "x-fern-parameter-name" in OpenAPI) to disambiguate.
674692
674715
  ` + entries24.map((entry) => ` - ${convertRequestWrapperPropertyToString(entry.property)} (name: "${entry.rawName}")`).join("\n")
674693
674716
  });
674694
674717
  }
@@ -688415,7 +688438,7 @@ var AccessTokenPosthogManager = class {
688415
688438
  properties: {
688416
688439
  ...event,
688417
688440
  ...event.properties,
688418
- version: "5.65.3",
688441
+ version: "5.65.4",
688419
688442
  usingAccessToken: true,
688420
688443
  ...getRunIdProperties()
688421
688444
  }
@@ -688481,7 +688504,7 @@ var UserPosthogManager = class {
688481
688504
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
688482
688505
  event: "CLI",
688483
688506
  properties: {
688484
- version: "5.65.3",
688507
+ version: "5.65.4",
688485
688508
  ...event,
688486
688509
  ...event.properties,
688487
688510
  usingAccessToken: false,
@@ -869577,7 +869600,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
869577
869600
  var LOGS_FOLDER_NAME = "logs";
869578
869601
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
869579
869602
  function getCliSource() {
869580
- const version7 = "5.65.3";
869603
+ const version7 = "5.65.4";
869581
869604
  return `cli@${version7}`;
869582
869605
  }
869583
869606
  var DebugLogger = class {
@@ -902139,7 +902162,7 @@ var LegacyDocsPublisher = class {
902139
902162
  previewId,
902140
902163
  disableTemplates: void 0,
902141
902164
  skipUpload,
902142
- cliVersion: "5.65.3",
902165
+ cliVersion: "5.65.4",
902143
902166
  loginCommand: "fern auth login"
902144
902167
  });
902145
902168
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -941515,8 +941538,7 @@ var EndpointSnippetGenerator6 = class {
941515
941538
  args.push(...this.getNamedParameterArgs({
941516
941539
  kind: "PathParameters",
941517
941540
  namedParameters: pathParameters,
941518
- values: snippet.pathParameters,
941519
- reservedNames: this.getInlinedBodyPropertyNames({ request: request7 })
941541
+ values: snippet.pathParameters
941520
941542
  }));
941521
941543
  args.push(...this.getNamedParameterArgs({
941522
941544
  kind: "QueryParameters",
@@ -941579,23 +941601,7 @@ var EndpointSnippetGenerator6 = class {
941579
941601
  }
941580
941602
  return args;
941581
941603
  }
941582
- /**
941583
- * Property names of an inlined request body (both Ruby names and wire values). Path
941584
- * parameters that collide with these are renamed in the generated SDK, so snippets
941585
- * must rename them the same way.
941586
- */
941587
- getInlinedBodyPropertyNames({ request: request7 }) {
941588
- const names2 = /* @__PURE__ */ new Set();
941589
- if (request7.body?.type !== "properties") {
941590
- return names2;
941591
- }
941592
- for (const property24 of request7.body.value) {
941593
- names2.add(this.context.getPropertyName(property24.name.name));
941594
- names2.add(property24.name.wireValue);
941595
- }
941596
- return names2;
941597
- }
941598
- getNamedParameterArgs({ kind, namedParameters, values: values2, reservedNames }) {
941604
+ getNamedParameterArgs({ kind, namedParameters, values: values2 }) {
941599
941605
  const args = [];
941600
941606
  this.context.errors.scope(kind);
941601
941607
  if (namedParameters != null) {
@@ -941609,15 +941615,8 @@ var EndpointSnippetGenerator6 = class {
941609
941615
  if (ruby_exports.TypeLiteral.isNop(value2)) {
941610
941616
  continue;
941611
941617
  }
941612
- let name2 = this.context.getPropertyName(parameter6.name.name);
941613
- if (reservedNames != null && reservedNames.has(name2)) {
941614
- name2 = `${name2}_path_param`;
941615
- while (reservedNames.has(name2)) {
941616
- name2 = `${name2}_`;
941617
- }
941618
- }
941619
941618
  args.push(ruby_exports.keywordArgument({
941620
- name: name2,
941619
+ name: this.context.getPropertyName(parameter6.name.name),
941621
941620
  value: value2
941622
941621
  }));
941623
941622
  }
@@ -968473,7 +968472,7 @@ function getAutomationContextFromEnv() {
968473
968472
  config_branch: process.env.FERN_CONFIG_BRANCH,
968474
968473
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
968475
968474
  trigger: process.env.GITHUB_EVENT_NAME,
968476
- cli_version: "5.65.3"
968475
+ cli_version: "5.65.4"
968477
968476
  };
968478
968477
  }
968479
968478
  function isAutomationMode() {
@@ -969305,7 +969304,7 @@ var CliContext = class _CliContext {
969305
969304
  if (false) {
969306
969305
  this.logger.error("CLI_VERSION is not defined");
969307
969306
  }
969308
- return "5.65.3";
969307
+ return "5.65.4";
969309
969308
  }
969310
969309
  getCliName() {
969311
969310
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.65.3",
2
+ "version": "5.65.4",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",