@fern-api/fern-api-dev 5.23.3-455-g1d7e39af516 → 5.23.3-459-gc7f48c6da37

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 -16
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -669562,7 +669562,7 @@ var AccessTokenPosthogManager = class {
669562
669562
  properties: {
669563
669563
  ...event,
669564
669564
  ...event.properties,
669565
- version: "5.23.3-455-g1d7e39af516",
669565
+ version: "5.23.3-459-gc7f48c6da37",
669566
669566
  usingAccessToken: true,
669567
669567
  ...getRunIdProperties()
669568
669568
  }
@@ -669626,7 +669626,7 @@ var UserPosthogManager = class {
669626
669626
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
669627
669627
  event: "CLI",
669628
669628
  properties: {
669629
- version: "5.23.3-455-g1d7e39af516",
669629
+ version: "5.23.3-459-gc7f48c6da37",
669630
669630
  ...event,
669631
669631
  ...event.properties,
669632
669632
  usingAccessToken: false,
@@ -861367,7 +861367,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
861367
861367
  var LOGS_FOLDER_NAME = "logs";
861368
861368
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
861369
861369
  function getCliSource() {
861370
- const version7 = "5.23.3-455-g1d7e39af516";
861370
+ const version7 = "5.23.3-459-gc7f48c6da37";
861371
861371
  return `cli@${version7}`;
861372
861372
  }
861373
861373
  var DebugLogger = class {
@@ -892459,7 +892459,7 @@ var LegacyDocsPublisher = class {
892459
892459
  previewId,
892460
892460
  disableTemplates: void 0,
892461
892461
  skipUpload,
892462
- cliVersion: "5.23.3-455-g1d7e39af516",
892462
+ cliVersion: "5.23.3-459-gc7f48c6da37",
892463
892463
  loginCommand: "fern auth login"
892464
892464
  });
892465
892465
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -925028,14 +925028,25 @@ var EndpointSnippetGenerator5 = class {
925028
925028
  getMethodArgsForBodyRequest({ request: request7, snippet: snippet2 }) {
925029
925029
  const args = [];
925030
925030
  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));
925031
+ const irPathParameters = this.context.ir.pathParameters ?? [];
925032
+ const requiredIrPathParameters = irPathParameters.filter((p14) => p14.variable == null);
925033
+ const optionalIrPathParameters = irPathParameters.filter((p14) => p14.variable != null);
925034
+ const requiredPathParameters = [...requiredIrPathParameters, ...request7.pathParameters ?? []];
925035
+ if (requiredPathParameters.length > 0) {
925036
+ args.push(...this.getPathParameters({ namedParameters: requiredPathParameters, snippet: snippet2 }).map((field5) => field5.value));
925034
925037
  }
925035
925038
  this.context.errors.unscope();
925036
925039
  this.context.errors.scope(Scope4.RequestBody);
925037
925040
  if (request7.body != null) {
925038
- args.push(this.getBodyRequestArg({ body: request7.body, value: snippet2.requestBody }));
925041
+ const bodyArg = this.getBodyRequestArg({ body: request7.body, value: snippet2.requestBody });
925042
+ if (!php_exports.TypeLiteral.isNop(bodyArg)) {
925043
+ args.push(bodyArg);
925044
+ }
925045
+ }
925046
+ this.context.errors.unscope();
925047
+ this.context.errors.scope(Scope4.PathParameters);
925048
+ if (optionalIrPathParameters.length > 0) {
925049
+ args.push(...this.getPathParameters({ namedParameters: optionalIrPathParameters, snippet: snippet2 }).map((field5) => field5.value));
925039
925050
  }
925040
925051
  this.context.errors.unscope();
925041
925052
  return args;
@@ -925062,17 +925073,25 @@ var EndpointSnippetGenerator5 = class {
925062
925073
  const args = [];
925063
925074
  const inlinePathParameters = this.context.customConfig?.inlinePathParameters ?? false;
925064
925075
  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
- }
925076
+ const irPathParameters = this.context.ir.pathParameters ?? [];
925077
+ const requiredIrPathParameters = irPathParameters.filter((p14) => p14.variable == null);
925078
+ const optionalIrPathParameters = irPathParameters.filter((p14) => p14.variable != null);
925079
+ const requiredPathParameterFields = [];
925080
+ const requiredPathParams = [...requiredIrPathParameters, ...request7.pathParameters ?? []];
925081
+ if (requiredPathParams.length > 0) {
925082
+ requiredPathParameterFields.push(...this.getPathParameters({ namedParameters: requiredPathParams, snippet: snippet2 }));
925083
+ }
925084
+ const optionalPathParameterFields = [];
925085
+ if (optionalIrPathParameters.length > 0) {
925086
+ optionalPathParameterFields.push(...this.getPathParameters({ namedParameters: optionalIrPathParameters, snippet: snippet2 }));
925087
+ }
925088
+ const pathParameterFields = [...requiredPathParameterFields, ...optionalPathParameterFields];
925070
925089
  this.context.errors.unscope();
925071
925090
  this.context.errors.scope(Scope4.RequestBody);
925072
925091
  const filePropertyInfo = this.getFilePropertyInfo({ request: request7, snippet: snippet2 });
925073
925092
  this.context.errors.unscope();
925074
925093
  if (!this.context.includePathParametersInWrappedRequest({ request: request7, inlinePathParameters })) {
925075
- args.push(...pathParameterFields.map((field5) => field5.value));
925094
+ args.push(...requiredPathParameterFields.map((field5) => field5.value));
925076
925095
  }
925077
925096
  if (this.context.needsRequestParameter({
925078
925097
  request: request7,
@@ -925090,6 +925109,9 @@ var EndpointSnippetGenerator5 = class {
925090
925109
  filePropertyInfo
925091
925110
  }));
925092
925111
  }
925112
+ if (!this.context.includePathParametersInWrappedRequest({ request: request7, inlinePathParameters })) {
925113
+ args.push(...optionalPathParameterFields.map((field5) => field5.value));
925114
+ }
925093
925115
  return args;
925094
925116
  }
925095
925117
  getFilePropertyInfo({ request: request7, snippet: snippet2 }) {
@@ -957598,7 +957620,7 @@ function getAutomationContextFromEnv() {
957598
957620
  config_branch: process.env.FERN_CONFIG_BRANCH,
957599
957621
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
957600
957622
  trigger: process.env.GITHUB_EVENT_NAME,
957601
- cli_version: "5.23.3-455-g1d7e39af516"
957623
+ cli_version: "5.23.3-459-gc7f48c6da37"
957602
957624
  };
957603
957625
  }
957604
957626
  function isAutomationMode() {
@@ -958424,7 +958446,7 @@ var CliContext = class _CliContext {
958424
958446
  if (false) {
958425
958447
  this.logger.error("CLI_VERSION is not defined");
958426
958448
  }
958427
- return "5.23.3-455-g1d7e39af516";
958449
+ return "5.23.3-459-gc7f48c6da37";
958428
958450
  }
958429
958451
  getCliName() {
958430
958452
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.3-455-g1d7e39af516",
2
+ "version": "5.23.3-459-gc7f48c6da37",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",