@fern-api/fern-api-dev 4.57.0 → 4.58.0-1-ga7b7d9f6f6a

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 +29 -9
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -507279,7 +507279,8 @@ var GlobalHeader = schemas_exports9.objectWithoutOptionalProperties({
507279
507279
  name: schemas_exports9.string().optional(),
507280
507280
  optional: schemas_exports9.boolean().optional(),
507281
507281
  env: schemas_exports9.string().optional(),
507282
- schema: schemas_exports9.lazy(() => Schema2).optional()
507282
+ schema: schemas_exports9.lazy(() => Schema2).optional(),
507283
+ clientDefault: schemas_exports9.unknown().optional()
507283
507284
  });
507284
507285
 
507285
507286
  // ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/finalIr/types/GlobalSecurity.js
@@ -511419,7 +511420,7 @@ function buildGlobalHeaders(context3) {
511419
511420
  const isOptional = header.optional === true;
511420
511421
  const defaultType = isOptional ? "optional<string>" : "string";
511421
511422
  let schema2 = defaultType;
511422
- if (header.name == null && header.env == null && typeof header.schema === "string") {
511423
+ if (header.name == null && header.env == null && header.clientDefault == null && typeof header.schema === "string") {
511423
511424
  schema2 = header.schema;
511424
511425
  } else if (header != null) {
511425
511426
  const groupName = header.schema ? getGroupNameForSchema(header.schema) : void 0;
@@ -511436,6 +511437,9 @@ function buildGlobalHeaders(context3) {
511436
511437
  declarationDepth: 0
511437
511438
  })) ?? defaultType : defaultType
511438
511439
  };
511440
+ if (typeof header.clientDefault === "string" || typeof header.clientDefault === "boolean") {
511441
+ schema2.default = header.clientDefault;
511442
+ }
511439
511443
  }
511440
511444
  context3.builder.addGlobalHeader({
511441
511445
  name: headerName,
@@ -531568,7 +531572,11 @@ function getGlobalHeaders(document4) {
531568
531572
  const result = [];
531569
531573
  for (const header of globalHeaders ?? []) {
531570
531574
  result.push({
531571
- ...header,
531575
+ header: header.header,
531576
+ name: header.name,
531577
+ optional: header.optional,
531578
+ env: header.env,
531579
+ clientDefault: header["x-fern-default"],
531572
531580
  schema: header.type != null ? getSchemaFromFernType({
531573
531581
  fernType: header.type,
531574
531582
  description: void 0,
@@ -588314,6 +588322,18 @@ var FernGlobalHeadersExtension = class extends AbstractExtension {
588314
588322
  };
588315
588323
 
588316
588324
  // ../api-importers/openapi-to-ir/lib/utils/convertGlobalHeadersExtension.js
588325
+ function convertDefaultToLiteral2(defaultValue) {
588326
+ if (defaultValue == null) {
588327
+ return void 0;
588328
+ }
588329
+ if (typeof defaultValue === "string") {
588330
+ return api_exports.Literal.string(defaultValue);
588331
+ }
588332
+ if (typeof defaultValue === "boolean") {
588333
+ return api_exports.Literal.boolean(defaultValue);
588334
+ }
588335
+ return void 0;
588336
+ }
588317
588337
  function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
588318
588338
  return globalHeaders.map((header) => ({
588319
588339
  name: context3.casingsGenerator.generateNameAndWireValue({
@@ -588325,7 +588345,7 @@ function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
588325
588345
  v2Examples: header.optional ? void 0 : constructGlobalHeaderExample({ header, context: context3 }),
588326
588346
  availability: void 0,
588327
588347
  docs: void 0,
588328
- clientDefault: void 0
588348
+ clientDefault: convertDefaultToLiteral2(header["x-fern-default"])
588329
588349
  }));
588330
588350
  }
588331
588351
  function constructGlobalHeaderExample({ header, context: context3 }) {
@@ -602661,7 +602681,7 @@ var AccessTokenPosthogManager = class {
602661
602681
  properties: {
602662
602682
  ...event,
602663
602683
  ...event.properties,
602664
- version: "4.57.0",
602684
+ version: "4.58.0-1-ga7b7d9f6f6a",
602665
602685
  usingAccessToken: true
602666
602686
  }
602667
602687
  });
@@ -602712,7 +602732,7 @@ var UserPosthogManager = class {
602712
602732
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
602713
602733
  event: "CLI",
602714
602734
  properties: {
602715
- version: "4.57.0",
602735
+ version: "4.58.0-1-ga7b7d9f6f6a",
602716
602736
  ...event,
602717
602737
  ...event.properties,
602718
602738
  usingAccessToken: false,
@@ -839942,7 +839962,7 @@ var import_path54 = __toESM(require("path"), 1);
839942
839962
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
839943
839963
  var LOGS_FOLDER_NAME = "logs";
839944
839964
  function getCliSource() {
839945
- const version7 = "4.57.0";
839965
+ const version7 = "4.58.0-1-ga7b7d9f6f6a";
839946
839966
  return `cli@${version7}`;
839947
839967
  }
839948
839968
  var DebugLogger = class {
@@ -851043,7 +851063,7 @@ var LegacyDocsPublisher = class {
851043
851063
  previewId: void 0,
851044
851064
  disableTemplates: void 0,
851045
851065
  skipUpload,
851046
- cliVersion: "4.57.0"
851066
+ cliVersion: "4.58.0-1-ga7b7d9f6f6a"
851047
851067
  });
851048
851068
  if (taskContext.getResult() === TaskResult.Failure) {
851049
851069
  return { success: false };
@@ -924197,7 +924217,7 @@ var CliContext = class {
924197
924217
  if (false) {
924198
924218
  this.logger.error("CLI_VERSION is not defined");
924199
924219
  }
924200
- return "4.57.0";
924220
+ return "4.58.0-1-ga7b7d9f6f6a";
924201
924221
  }
924202
924222
  getCliName() {
924203
924223
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.57.0",
2
+ "version": "4.58.0-1-ga7b7d9f6f6a",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",