@fern-api/fern-api-dev 4.79.0 → 4.79.1-1-g7bd587c64bb

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 +46 -9
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -14364,7 +14364,7 @@ var require_utils3 = __commonJS({
14364
14364
  field5.resolve = wrapFieldResolver(tracer, getConfig, field5.resolve);
14365
14365
  }
14366
14366
  if (field5.type) {
14367
- const unwrappedTypes = unwrapType(field5.type);
14367
+ const unwrappedTypes = unwrapType2(field5.type);
14368
14368
  for (const unwrappedType of unwrappedTypes) {
14369
14369
  wrapFields(unwrappedType, tracer, getConfig);
14370
14370
  }
@@ -14372,9 +14372,9 @@ var require_utils3 = __commonJS({
14372
14372
  });
14373
14373
  }
14374
14374
  exports2.wrapFields = wrapFields;
14375
- function unwrapType(type8) {
14375
+ function unwrapType2(type8) {
14376
14376
  if ("ofType" in type8) {
14377
- return unwrapType(type8.ofType);
14377
+ return unwrapType2(type8.ofType);
14378
14378
  }
14379
14379
  if (isGraphQLUnionType(type8)) {
14380
14380
  return type8.getTypes();
@@ -522460,9 +522460,10 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
522460
522460
  if (endpointHeaderNames.has(header)) {
522461
522461
  continue;
522462
522462
  }
522463
+ const headerType = info != null && typeof info === "object" ? info.type : typeof info === "string" ? info : void 0;
522463
522464
  namedFullExamples.push({
522464
522465
  name: header,
522465
- value: FullExample.primitive(PrimitiveExample.string(header))
522466
+ value: FullExample.primitive(buildPrimitiveExampleForType(unwrapType(headerType), header))
522466
522467
  });
522467
522468
  }
522468
522469
  example.headers = convertHeaderExamples2({
@@ -522518,6 +522519,42 @@ function convertQueryParameterExample2(namedFullExamples) {
522518
522519
  });
522519
522520
  return result;
522520
522521
  }
522522
+ function unwrapType(type8) {
522523
+ if (type8 == null) {
522524
+ return void 0;
522525
+ }
522526
+ const match3 = type8.match(/^(?:optional|nullable)<(.+)>$/);
522527
+ return match3 != null ? unwrapType(match3[1]) : type8;
522528
+ }
522529
+ function buildPrimitiveExampleForType(headerType, headerName) {
522530
+ switch (headerType) {
522531
+ case "integer":
522532
+ case "int":
522533
+ return PrimitiveExample.int(0);
522534
+ case "int64":
522535
+ case "long":
522536
+ return PrimitiveExample.int64(0);
522537
+ case "uint":
522538
+ return PrimitiveExample.uint(0);
522539
+ case "uint64":
522540
+ return PrimitiveExample.uint64(0);
522541
+ case "float":
522542
+ return PrimitiveExample.float(0);
522543
+ case "double":
522544
+ return PrimitiveExample.double(0);
522545
+ case "boolean":
522546
+ return PrimitiveExample.boolean(true);
522547
+ case "date":
522548
+ return PrimitiveExample.date("2024-01-01");
522549
+ case "date-time":
522550
+ case "datetime":
522551
+ return PrimitiveExample.datetime("2024-01-01T00:00:00Z");
522552
+ case "base64":
522553
+ return PrimitiveExample.base64("SGVsbG8=");
522554
+ default:
522555
+ return PrimitiveExample.string(headerName);
522556
+ }
522557
+ }
522521
522558
  function convertHeaderExamples2({ context: context3, namedFullExamples }) {
522522
522559
  const result = {};
522523
522560
  namedFullExamples.forEach((namedFullExample) => {
@@ -622191,7 +622228,7 @@ var AccessTokenPosthogManager = class {
622191
622228
  properties: {
622192
622229
  ...event,
622193
622230
  ...event.properties,
622194
- version: "4.79.0",
622231
+ version: "4.79.1-1-g7bd587c64bb",
622195
622232
  usingAccessToken: true
622196
622233
  }
622197
622234
  });
@@ -622245,7 +622282,7 @@ var UserPosthogManager = class {
622245
622282
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622246
622283
  event: "CLI",
622247
622284
  properties: {
622248
- version: "4.79.0",
622285
+ version: "4.79.1-1-g7bd587c64bb",
622249
622286
  ...event,
622250
622287
  ...event.properties,
622251
622288
  usingAccessToken: false,
@@ -839472,7 +839509,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
839472
839509
  var LOGS_FOLDER_NAME = "logs";
839473
839510
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
839474
839511
  function getCliSource() {
839475
- const version7 = "4.79.0";
839512
+ const version7 = "4.79.1-1-g7bd587c64bb";
839476
839513
  return `cli@${version7}`;
839477
839514
  }
839478
839515
  var DebugLogger = class {
@@ -850801,7 +850838,7 @@ var LegacyDocsPublisher = class {
850801
850838
  previewId,
850802
850839
  disableTemplates: void 0,
850803
850840
  skipUpload,
850804
- cliVersion: "4.79.0"
850841
+ cliVersion: "4.79.1-1-g7bd587c64bb"
850805
850842
  });
850806
850843
  if (taskContext.getResult() === TaskResult.Failure) {
850807
850844
  return { success: false };
@@ -925874,7 +925911,7 @@ var CliContext = class _CliContext {
925874
925911
  if (false) {
925875
925912
  this.logger.error("CLI_VERSION is not defined");
925876
925913
  }
925877
- return "4.79.0";
925914
+ return "4.79.1-1-g7bd587c64bb";
925878
925915
  }
925879
925916
  getCliName() {
925880
925917
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.79.0",
2
+ "version": "4.79.1-1-g7bd587c64bb",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",