@fern-api/fern-api-dev 3.49.6 → 3.49.7-1-gca137f47802

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 +20 -7
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1325624,6 +1325624,18 @@ var WorkspaceLoader = class {
1325624
1325624
  }
1325625
1325625
  }
1325626
1325626
  }
1325627
+ const defaultGroup = workspace.sdks?.defaultGroup;
1325628
+ if (defaultGroup != null) {
1325629
+ if (!this.defaultGroupExists({ workspace, defaultGroup })) {
1325630
+ this.issues.push(new ValidationIssue({
1325631
+ message: `Default group '${defaultGroup}' is not referenced by any target`,
1325632
+ location: fernYml.sourced.$loc
1325633
+ }));
1325634
+ }
1325635
+ }
1325636
+ }
1325637
+ defaultGroupExists({ workspace, defaultGroup }) {
1325638
+ return workspace.sdks?.targets?.some((target) => target.groups?.includes(defaultGroup)) ?? false;
1325627
1325639
  }
1325628
1325640
  getTargetSourceLocation({ fernYml, targetName }) {
1325629
1325641
  const sourcedSdks = fernYml.sourced.sdks;
@@ -1430929,7 +1430941,7 @@ var AccessTokenPosthogManager = class {
1430929
1430941
  properties: {
1430930
1430942
  ...event,
1430931
1430943
  ...event.properties,
1430932
- version: "3.49.6",
1430944
+ version: "3.49.7-1-gca137f47802",
1430933
1430945
  usingAccessToken: true
1430934
1430946
  }
1430935
1430947
  });
@@ -1431028,7 +1431040,7 @@ var UserPosthogManager = class {
1431028
1431040
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1431029
1431041
  event: "CLI",
1431030
1431042
  properties: {
1431031
- version: "3.49.6",
1431043
+ version: "3.49.7-1-gca137f47802",
1431032
1431044
  ...event,
1431033
1431045
  ...event.properties,
1431034
1431046
  usingAccessToken: false,
@@ -1510463,7 +1510475,7 @@ var CliContext = class {
1510463
1510475
  if (false) {
1510464
1510476
  this.logger.error("CLI_VERSION is not defined");
1510465
1510477
  }
1510466
- return "3.49.6";
1510478
+ return "3.49.7-1-gca137f47802";
1510467
1510479
  }
1510468
1510480
  getCliName() {
1510469
1510481
  if (false) {
@@ -1537986,13 +1537998,14 @@ function extractApiNameFromUrl(url3) {
1537986
1537998
  const parts = hostname3.split(".");
1537987
1537999
  const commonTerms = /* @__PURE__ */ new Set(["api", "www", "service", "services", "example", "com", "org", "net", "io"]);
1537988
1538000
  for (const part of parts) {
1537989
- const cleanPart = part.split("-")[0];
1538001
+ const prefix2 = part.split("-")[0];
1538002
+ const cleanPart = prefix2 && prefix2.length > 2 ? prefix2 : part;
1537990
1538003
  if (cleanPart && !commonTerms.has(cleanPart.toLowerCase()) && cleanPart.length > 2) {
1537991
1538004
  return cleanPart.toLowerCase();
1537992
1538005
  }
1537993
1538006
  }
1537994
- const firstPart = parts[0]?.split("-")[0];
1537995
- return firstPart ? firstPart.toLowerCase() : "api";
1538007
+ const firstPart = parts[0];
1538008
+ return firstPart && firstPart.length > 0 ? firstPart.toLowerCase() : "api";
1537996
1538009
  } catch {
1537997
1538010
  const match3 = url3.match(/https?:\/\/([^./-]+)/);
1537998
1538011
  return match3 && match3[1] ? match3[1].toLowerCase() : "api";
@@ -1611487,7 +1611500,7 @@ var import_path40 = __toESM(require("path"), 1);
1611487
1611500
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1611488
1611501
  var LOGS_FOLDER_NAME = "logs";
1611489
1611502
  function getCliSource() {
1611490
- const version7 = "3.49.6";
1611503
+ const version7 = "3.49.7-1-gca137f47802";
1611491
1611504
  return `cli@${version7}`;
1611492
1611505
  }
1611493
1611506
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.49.6",
2
+ "version": "3.49.7-1-gca137f47802",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",