fern-api 0.33.0 → 0.33.1

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/bundle.cjs +20 -5
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -1164516,7 +1164516,7 @@ var AccessTokenPosthogManager = class {
1164516
1164516
  properties: {
1164517
1164517
  ...event,
1164518
1164518
  ...event.properties,
1164519
- version: "0.33.0",
1164519
+ version: "0.33.1",
1164520
1164520
  usingAccessToken: true
1164521
1164521
  }
1164522
1164522
  });
@@ -1164578,7 +1164578,7 @@ var UserPosthogManager = class {
1164578
1164578
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1164579
1164579
  event: "CLI",
1164580
1164580
  properties: {
1164581
- version: "0.33.0",
1164581
+ version: "0.33.1",
1164582
1164582
  ...event,
1164583
1164583
  ...event.properties
1164584
1164584
  }
@@ -1188015,9 +1188015,18 @@ var FernDefinitionBuilderImpl = class {
1188015
1188015
  this.rootApiFile.environments[name3] = schema2;
1188016
1188016
  }
1188017
1188017
  getGlobalHeaderNames() {
1188018
- return new Set(Object.keys(this.rootApiFile.headers ?? {}));
1188018
+ const headerNames = Object.keys(this.rootApiFile.headers ?? {});
1188019
+ const maybeVersionHeader = this.getVersionHeader();
1188020
+ if (maybeVersionHeader != null) {
1188021
+ headerNames.push(maybeVersionHeader);
1188022
+ }
1188023
+ return new Set(headerNames);
1188019
1188024
  }
1188020
1188025
  addGlobalHeader({ name: name3, schema: schema2 }) {
1188026
+ const maybeVersionHeader = this.getVersionHeader();
1188027
+ if (maybeVersionHeader != null && maybeVersionHeader === name3) {
1188028
+ return;
1188029
+ }
1188021
1188030
  if (this.rootApiFile.headers == null) {
1188022
1188031
  this.rootApiFile.headers = {};
1188023
1188032
  }
@@ -1188278,6 +1188287,12 @@ var FernDefinitionBuilderImpl = class {
1188278
1188287
  return (_a5 = this.definitionFiles)[file] ?? (_a5[file] = {});
1188279
1188288
  }
1188280
1188289
  }
1188290
+ getVersionHeader() {
1188291
+ if (this.rootApiFile.version == null) {
1188292
+ return void 0;
1188293
+ }
1188294
+ return typeof this.rootApiFile.version.header === "string" ? this.rootApiFile.version.header : this.rootApiFile.version.header.value;
1188295
+ }
1188281
1188296
  };
1188282
1188297
  function getSharedEnvironmentBasePath(rootApiFile) {
1188283
1188298
  if (rootApiFile.environments == null) {
@@ -1192289,10 +1192304,10 @@ var CliContext = class {
1192289
1192304
  return "fern-api";
1192290
1192305
  }
1192291
1192306
  getPackageVersion() {
1192292
- if ("0.33.0" == null) {
1192307
+ if ("0.33.1" == null) {
1192293
1192308
  this.logger.error("CLI_VERSION is not defined");
1192294
1192309
  }
1192295
- return "0.33.0";
1192310
+ return "0.33.1";
1192296
1192311
  }
1192297
1192312
  getCliName() {
1192298
1192313
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",