@fern-api/fern-api-dev 5.23.3-1404-g2a8118ebad0 → 5.23.3-1409-g6e4052806ff

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 +61 -9
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -678867,7 +678867,8 @@ function validateResponseProperty({ endpointId, typeResolver, file: file4, resol
678867
678867
  return violations;
678868
678868
  }
678869
678869
  function isIntegerType({ resolvedType }) {
678870
- return maybePrimitiveType(resolvedType) === "INTEGER";
678870
+ const primitiveType2 = maybePrimitiveType(resolvedType);
678871
+ return primitiveType2 === "INTEGER" || primitiveType2 === "LONG";
678871
678872
  }
678872
678873
  function isStringType({ resolvedType }) {
678873
678874
  return maybePrimitiveType(resolvedType) === "STRING";
@@ -690066,7 +690067,7 @@ var AccessTokenPosthogManager = class {
690066
690067
  properties: {
690067
690068
  ...event,
690068
690069
  ...event.properties,
690069
- version: "5.23.3-1404-g2a8118ebad0",
690070
+ version: "5.23.3-1409-g6e4052806ff",
690070
690071
  usingAccessToken: true,
690071
690072
  ...getRunIdProperties()
690072
690073
  }
@@ -690132,7 +690133,7 @@ var UserPosthogManager = class {
690132
690133
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
690133
690134
  event: "CLI",
690134
690135
  properties: {
690135
- version: "5.23.3-1404-g2a8118ebad0",
690136
+ version: "5.23.3-1409-g6e4052806ff",
690136
690137
  ...event,
690137
690138
  ...event.properties,
690138
690139
  usingAccessToken: false,
@@ -871233,7 +871234,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
871233
871234
  var LOGS_FOLDER_NAME = "logs";
871234
871235
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
871235
871236
  function getCliSource() {
871236
- const version7 = "5.23.3-1404-g2a8118ebad0";
871237
+ const version7 = "5.23.3-1409-g6e4052806ff";
871237
871238
  return `cli@${version7}`;
871238
871239
  }
871239
871240
  var DebugLogger = class {
@@ -903816,7 +903817,7 @@ var LegacyDocsPublisher = class {
903816
903817
  previewId,
903817
903818
  disableTemplates: void 0,
903818
903819
  skipUpload,
903819
- cliVersion: "5.23.3-1404-g2a8118ebad0",
903820
+ cliVersion: "5.23.3-1409-g6e4052806ff",
903820
903821
  loginCommand: "fern auth login"
903821
903822
  });
903822
903823
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -929393,13 +929394,13 @@ var EndpointSnippetGenerator2 = class {
929393
929394
  }
929394
929395
  const args = [];
929395
929396
  for (const param of parameters2) {
929396
- if (param.typeReference.type === "optional" || param.typeReference.type === "literal") {
929397
+ if (this.isInferredAuthConstructorParamSkipped(param.typeReference)) {
929397
929398
  continue;
929398
929399
  }
929399
929400
  const wireValue = param.name.wireValue;
929400
929401
  const value2 = values2.values?.[wireValue] ?? param.name.name.originalName;
929401
929402
  const typeInstantiation = this.context.dynamicTypeInstantiationMapper.convert({
929402
- typeReference: param.typeReference,
929403
+ typeReference: this.getInferredAuthConstructorTypeReference(param.typeReference),
929403
929404
  value: value2
929404
929405
  });
929405
929406
  if (go_exports.TypeInstantiation.isNop(typeInstantiation)) {
@@ -929417,6 +929418,57 @@ var EndpointSnippetGenerator2 = class {
929417
929418
  }
929418
929419
  return args;
929419
929420
  }
929421
+ isInferredAuthConstructorParamSkipped(typeReference2, seen = /* @__PURE__ */ new Set()) {
929422
+ switch (typeReference2.type) {
929423
+ case "optional":
929424
+ case "literal":
929425
+ return true;
929426
+ case "named": {
929427
+ if (seen.has(typeReference2.value)) {
929428
+ return false;
929429
+ }
929430
+ seen.add(typeReference2.value);
929431
+ const named = this.context.resolveNamedType({ typeId: typeReference2.value });
929432
+ return named?.type === "alias" && this.isInferredAuthConstructorParamSkipped(named.typeReference, seen);
929433
+ }
929434
+ case "list":
929435
+ case "map":
929436
+ case "nullable":
929437
+ case "primitive":
929438
+ case "set":
929439
+ case "unknown":
929440
+ return false;
929441
+ default:
929442
+ assertNever(typeReference2);
929443
+ }
929444
+ }
929445
+ getInferredAuthConstructorTypeReference(typeReference2, seen = /* @__PURE__ */ new Set()) {
929446
+ switch (typeReference2.type) {
929447
+ case "nullable":
929448
+ return this.getInferredAuthConstructorTypeReference(typeReference2.value, seen);
929449
+ case "named": {
929450
+ if (seen.has(typeReference2.value)) {
929451
+ return typeReference2;
929452
+ }
929453
+ seen.add(typeReference2.value);
929454
+ const named = this.context.resolveNamedType({ typeId: typeReference2.value });
929455
+ if (named?.type === "alias" && named.typeReference.type === "nullable") {
929456
+ return this.getInferredAuthConstructorTypeReference(named.typeReference, seen);
929457
+ }
929458
+ return typeReference2;
929459
+ }
929460
+ case "list":
929461
+ case "literal":
929462
+ case "map":
929463
+ case "optional":
929464
+ case "primitive":
929465
+ case "set":
929466
+ case "unknown":
929467
+ return typeReference2;
929468
+ default:
929469
+ assertNever(typeReference2);
929470
+ }
929471
+ }
929420
929472
  getConstructorHeaderArgs({ headers: headers2, values: values2 }) {
929421
929473
  const args = [];
929422
929474
  for (const header of headers2) {
@@ -970291,7 +970343,7 @@ function getAutomationContextFromEnv() {
970291
970343
  config_branch: process.env.FERN_CONFIG_BRANCH,
970292
970344
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
970293
970345
  trigger: process.env.GITHUB_EVENT_NAME,
970294
- cli_version: "5.23.3-1404-g2a8118ebad0"
970346
+ cli_version: "5.23.3-1409-g6e4052806ff"
970295
970347
  };
970296
970348
  }
970297
970349
  function isAutomationMode() {
@@ -971123,7 +971175,7 @@ var CliContext = class _CliContext {
971123
971175
  if (false) {
971124
971176
  this.logger.error("CLI_VERSION is not defined");
971125
971177
  }
971126
- return "5.23.3-1404-g2a8118ebad0";
971178
+ return "5.23.3-1409-g6e4052806ff";
971127
971179
  }
971128
971180
  getCliName() {
971129
971181
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.3-1404-g2a8118ebad0",
2
+ "version": "5.23.3-1409-g6e4052806ff",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",