fern-api 0.37.9 → 0.37.10

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 +22 -8
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -1215398,7 +1215398,7 @@ var AccessTokenPosthogManager = class {
1215398
1215398
  properties: {
1215399
1215399
  ...event,
1215400
1215400
  ...event.properties,
1215401
- version: "0.37.9",
1215401
+ version: "0.37.10",
1215402
1215402
  usingAccessToken: true
1215403
1215403
  }
1215404
1215404
  });
@@ -1215460,7 +1215460,7 @@ var UserPosthogManager = class {
1215460
1215460
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1215461
1215461
  event: "CLI",
1215462
1215462
  properties: {
1215463
- version: "0.37.9",
1215463
+ version: "0.37.10",
1215464
1215464
  ...event,
1215465
1215465
  ...event.properties
1215466
1215466
  }
@@ -1244417,10 +1244417,10 @@ var CliContext = class {
1244417
1244417
  return "fern-api";
1244418
1244418
  }
1244419
1244419
  getPackageVersion() {
1244420
- if ("0.37.9" == null) {
1244420
+ if ("0.37.10" == null) {
1244421
1244421
  this.logger.error("CLI_VERSION is not defined");
1244422
1244422
  }
1244423
- return "0.37.9";
1244423
+ return "0.37.10";
1244424
1244424
  }
1244425
1244425
  getCliName() {
1244426
1244426
  if ("fern" == null) {
@@ -1250261,9 +1250261,9 @@ var IrGraph = class {
1250261
1250261
  });
1250262
1250262
  }
1250263
1250263
  }
1250264
- markEnvironmentForAudiences(environment, audiences) {
1250264
+ markEnvironmentForAudiences(environment, audiences, ignoreAudiences) {
1250265
1250265
  if (environment) {
1250266
- if (this.hasAudience(audiences)) {
1250266
+ if (this.hasAudience(audiences) || ignoreAudiences) {
1250267
1250267
  this.environmentsNeededForAudience.add(environment.id);
1250268
1250268
  }
1250269
1250269
  }
@@ -1252090,12 +1252090,26 @@ async function generateIntermediateRepresentation({ fdrApiDefinitionId, workspac
1252090
1252090
  });
1252091
1252091
  intermediateRepresentation.serviceTypeReferenceInfo = computeServiceTypeReferenceInfo(irGraph);
1252092
1252092
  const intermediateRepresentationWithGeneratedExamples = new ExampleGenerator(intermediateRepresentation).enrichWithAutogeneratedExamples();
1252093
+ const workspaceDefinitionRootApiFileContents = workspace.definition.rootApiFile.contents;
1252093
1252094
  const environments = convertEnvironments({
1252094
1252095
  casingsGenerator,
1252095
- rawApiFileSchema: workspace.definition.rootApiFile.contents
1252096
+ rawApiFileSchema: workspaceDefinitionRootApiFileContents
1252097
+ });
1252098
+ const ignoreAudiences = environments == null ? void 0 : environments.environments._visit({
1252099
+ singleBaseUrl: (value) => {
1252100
+ return value.environments.filter((environment) => {
1252101
+ return getAudienceForEnvironment(environment.id, workspaceDefinitionRootApiFileContents.environments) != null;
1252102
+ }).length === 0;
1252103
+ },
1252104
+ multipleBaseUrls: (value) => {
1252105
+ return value.environments.filter((environment) => {
1252106
+ return getAudienceForEnvironment(environment.id, workspaceDefinitionRootApiFileContents.environments) != null;
1252107
+ }).length === 0;
1252108
+ },
1252109
+ _other: () => false
1252096
1252110
  });
1252097
1252111
  environments == null ? void 0 : environments.environments.environments.forEach((environment) => {
1252098
- irGraph.markEnvironmentForAudiences(environment, getAudienceForEnvironment(environment.id, workspace.definition.rootApiFile.contents.environments) ?? []);
1252112
+ irGraph.markEnvironmentForAudiences(environment, getAudienceForEnvironment(environment.id, workspaceDefinitionRootApiFileContents.environments) ?? [], ignoreAudiences);
1252099
1252113
  });
1252100
1252114
  const filteredIr = !irGraph.hasNoAudiences() ? irGraph.build() : void 0;
1252101
1252115
  const intermediateRepresentationForAudiences = filterIntermediateRepresentationForAudiences(intermediateRepresentationWithGeneratedExamples, filteredIr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.37.9",
3
+ "version": "0.37.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",