@fern-api/fern-api-dev 5.75.7 → 5.75.8

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 +28 -13
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -168066,8 +168066,13 @@ function getParseAsyncOptions({ options: options2, overrides }) {
168066
168066
  naming: overrides?.naming ?? options2?.asyncApiNaming ?? DEFAULT_PARSE_ASYNCAPI_SETTINGS.naming
168067
168067
  };
168068
168068
  }
168069
+ function getRawEnvironmentName(server) {
168070
+ return String(server.description || server.name || server["x-fern-server-name"] || "default").trim();
168071
+ }
168069
168072
  function getEnvironmentName2(server) {
168070
- const rawName = String(server.description || server.name || server["x-fern-server-name"] || "default").trim();
168073
+ return normalizeEnvironmentName(getRawEnvironmentName(server));
168074
+ }
168075
+ function normalizeEnvironmentName(rawName) {
168071
168076
  const normalized = rawName.toUpperCase();
168072
168077
  if (normalized === "PRODUCTION" || normalized === "PRD" || normalized === "PROD") {
168073
168078
  return "PRD";
@@ -168255,9 +168260,15 @@ function merge6(ir1, ir22, options2) {
168255
168260
  let mergedEndpoints = [];
168256
168261
  const api2Name = extractApiNameFromServers(ir22.servers);
168257
168262
  const environmentMap = /* @__PURE__ */ new Map();
168263
+ const environmentDisplayNames = /* @__PURE__ */ new Map();
168264
+ const api1Name = extractApiNameFromServers(ir1.servers);
168258
168265
  for (const server of ir1.servers) {
168259
168266
  if (server.type === "grouped") {
168260
- const envName = server.name ?? "default";
168267
+ const rawEnvName = server.name ?? "default";
168268
+ const envName = normalizeEnvironmentName(rawEnvName);
168269
+ if (!environmentDisplayNames.has(envName)) {
168270
+ environmentDisplayNames.set(envName, rawEnvName);
168271
+ }
168261
168272
  if (!environmentMap.has(envName)) {
168262
168273
  environmentMap.set(envName, {});
168263
168274
  }
@@ -168268,8 +168279,10 @@ function merge6(ir1, ir22, options2) {
168268
168279
  }
168269
168280
  }
168270
168281
  } else {
168271
- const api1Name = extractApiNameFromUrl(getPreferredUrlForNameExtraction(server));
168272
168282
  const envName = getEnvironmentName2(server);
168283
+ if (!environmentDisplayNames.has(envName)) {
168284
+ environmentDisplayNames.set(envName, getRawEnvironmentName(server));
168285
+ }
168273
168286
  if (!environmentMap.has(envName)) {
168274
168287
  environmentMap.set(envName, {});
168275
168288
  }
@@ -168287,6 +168300,9 @@ function merge6(ir1, ir22, options2) {
168287
168300
  }
168288
168301
  for (const server of ir22.servers) {
168289
168302
  const envName = getEnvironmentName2(server);
168303
+ if (!environmentDisplayNames.has(envName)) {
168304
+ environmentDisplayNames.set(envName, getRawEnvironmentName(server));
168305
+ }
168290
168306
  if (!environmentMap.has(envName)) {
168291
168307
  environmentMap.set(envName, {});
168292
168308
  }
@@ -168302,10 +168318,11 @@ function merge6(ir1, ir22, options2) {
168302
168318
  }
168303
168319
  }
168304
168320
  for (const [envName, urls] of environmentMap.entries()) {
168321
+ const displayName = environmentDisplayNames.get(envName) ?? envName;
168305
168322
  const groupedServer = {
168306
168323
  type: "grouped",
168307
- name: envName,
168308
- description: `${envName} environment`,
168324
+ name: displayName,
168325
+ description: `${displayName} environment`,
168309
168326
  urls
168310
168327
  };
168311
168328
  mergedServers.push(groupedServer);
@@ -168320,8 +168337,6 @@ function merge6(ir1, ir22, options2) {
168320
168337
  servers: [{ name: existingApiName, url: void 0, audiences: void 0 }]
168321
168338
  };
168322
168339
  }
168323
- const firstServer = ir1.servers[0];
168324
- const api1Name = firstServer != null && firstServer.type !== "grouped" ? extractApiNameFromUrl(getPreferredUrlForNameExtraction(firstServer)) : "api";
168325
168340
  return {
168326
168341
  ...endpoint3,
168327
168342
  type: "multi-api",
@@ -691153,7 +691168,7 @@ var AccessTokenPosthogManager = class {
691153
691168
  properties: {
691154
691169
  ...event,
691155
691170
  ...event.properties,
691156
- version: "5.75.7",
691171
+ version: "5.75.8",
691157
691172
  usingAccessToken: true,
691158
691173
  ...getRunIdProperties()
691159
691174
  }
@@ -691219,7 +691234,7 @@ var UserPosthogManager = class {
691219
691234
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
691220
691235
  event: "CLI",
691221
691236
  properties: {
691222
- version: "5.75.7",
691237
+ version: "5.75.8",
691223
691238
  ...event,
691224
691239
  ...event.properties,
691225
691240
  usingAccessToken: false,
@@ -872324,7 +872339,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
872324
872339
  var LOGS_FOLDER_NAME = "logs";
872325
872340
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
872326
872341
  function getCliSource() {
872327
- const version7 = "5.75.7";
872342
+ const version7 = "5.75.8";
872328
872343
  return `cli@${version7}`;
872329
872344
  }
872330
872345
  var DebugLogger = class {
@@ -904977,7 +904992,7 @@ var LegacyDocsPublisher = class {
904977
904992
  previewId,
904978
904993
  disableTemplates: void 0,
904979
904994
  skipUpload,
904980
- cliVersion: "5.75.7",
904995
+ cliVersion: "5.75.8",
904981
904996
  loginCommand: "fern auth login"
904982
904997
  });
904983
904998
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -971890,7 +971905,7 @@ function getAutomationContextFromEnv() {
971890
971905
  config_branch: process.env.FERN_CONFIG_BRANCH,
971891
971906
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
971892
971907
  trigger: process.env.GITHUB_EVENT_NAME,
971893
- cli_version: "5.75.7"
971908
+ cli_version: "5.75.8"
971894
971909
  };
971895
971910
  }
971896
971911
  function isAutomationMode() {
@@ -972722,7 +972737,7 @@ var CliContext = class _CliContext {
972722
972737
  if (false) {
972723
972738
  this.logger.error("CLI_VERSION is not defined");
972724
972739
  }
972725
- return "5.75.7";
972740
+ return "5.75.8";
972726
972741
  }
972727
972742
  getCliName() {
972728
972743
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.75.7",
2
+ "version": "5.75.8",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",