@fern-api/fern-api-dev 5.33.2 → 5.33.3

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 +33 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -668443,7 +668443,7 @@ var AccessTokenPosthogManager = class {
668443
668443
  properties: {
668444
668444
  ...event,
668445
668445
  ...event.properties,
668446
- version: "5.33.2",
668446
+ version: "5.33.3",
668447
668447
  usingAccessToken: true,
668448
668448
  ...getRunIdProperties()
668449
668449
  }
@@ -668507,7 +668507,7 @@ var UserPosthogManager = class {
668507
668507
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
668508
668508
  event: "CLI",
668509
668509
  properties: {
668510
- version: "5.33.2",
668510
+ version: "5.33.3",
668511
668511
  ...event,
668512
668512
  ...event.properties,
668513
668513
  usingAccessToken: false,
@@ -668555,12 +668555,19 @@ var UserPosthogManager = class {
668555
668555
  persistedDistinctId;
668556
668556
  async getPersistedDistinctId() {
668557
668557
  if (this.persistedDistinctId == null) {
668558
+ const generatedDistinctId = v4_default();
668558
668559
  const pathToFile = join8(AbsoluteFilePath2.of((0, import_os5.homedir)()), RelativeFilePath2.of(LOCAL_STORAGE_FOLDER3), RelativeFilePath2.of(DISTINCT_ID_FILENAME));
668559
- if (!await doesPathExist(pathToFile)) {
668560
- await (0, import_promises44.mkdir)((0, import_path46.dirname)(pathToFile), { recursive: true });
668561
- await (0, import_promises44.writeFile)(pathToFile, v4_default());
668560
+ try {
668561
+ if (!await doesPathExist(pathToFile)) {
668562
+ await (0, import_promises44.mkdir)((0, import_path46.dirname)(pathToFile), { recursive: true });
668563
+ await (0, import_promises44.writeFile)(pathToFile, generatedDistinctId);
668564
+ this.persistedDistinctId = generatedDistinctId;
668565
+ } else {
668566
+ this.persistedDistinctId = (await (0, import_promises44.readFile)(pathToFile)).toString();
668567
+ }
668568
+ } catch {
668569
+ this.persistedDistinctId = generatedDistinctId;
668562
668570
  }
668563
- this.persistedDistinctId = (await (0, import_promises44.readFile)(pathToFile)).toString();
668564
668571
  }
668565
668572
  return this.persistedDistinctId;
668566
668573
  }
@@ -672675,6 +672682,14 @@ var TtyAwareLogger2 = class {
672675
672682
  this.stdout = stdout;
672676
672683
  this.stderr = stderr;
672677
672684
  this.isTTY = stdout.isTTY === true && !import_is_ci3.default;
672685
+ for (const stream5 of [this.stdout, this.stderr]) {
672686
+ stream5.on("error", (error50) => {
672687
+ if (isEpipeError(error50)) {
672688
+ return;
672689
+ }
672690
+ throw error50;
672691
+ });
672692
+ }
672678
672693
  }
672679
672694
  /**
672680
672695
  * Register a paintable. The first registration starts the repaint loop.
@@ -672782,6 +672797,12 @@ var TtyAwareLogger2 = class {
672782
672797
  return paint;
672783
672798
  }
672784
672799
  };
672800
+ function isEpipeError(error50) {
672801
+ return hasErrnoCode(error50) && error50.code === "EPIPE";
672802
+ }
672803
+ function hasErrnoCode(error50) {
672804
+ return "code" in error50 && typeof error50.code === "string";
672805
+ }
672785
672806
 
672786
672807
  // ../cli-v2/lib/api/config/converter/ApiDefinitionConverter.js
672787
672808
  init_lib8();
@@ -822499,7 +822520,7 @@ function convertIrEnvironments({ environmentsConfig, endpoint: endpoint3 }) {
822499
822520
  if (endpointBaseUrl == null) {
822500
822521
  throw new CliError({
822501
822522
  message: `Encountered undefined server name "${baseUrlId}" at endpoint ${endpoint3.method.toUpperCase()} ${endpoint3.path}. Expected environment ${singleBaseUrlEnvironment.id} to contain url for ${baseUrlId}`,
822502
- code: CliError.Code.IrConversionError
822523
+ code: CliError.Code.ValidationError
822503
822524
  });
822504
822525
  }
822505
822526
  return {
@@ -822522,7 +822543,7 @@ function convertIrEnvironments({ environmentsConfig, endpoint: endpoint3 }) {
822522
822543
  if (endpointBaseUrl == null) {
822523
822544
  throw new CliError({
822524
822545
  message: `Encountered undefined server name "${endpointBaseUrlId}" at endpoint ${endpoint3.method.toUpperCase()} ${endpoint3.path.head}. Expected environment ${singleBaseUrlEnvironment.id} to contain url for ${endpointBaseUrlId}`,
822525
- code: CliError.Code.IrConversionError
822546
+ code: CliError.Code.ValidationError
822526
822547
  });
822527
822548
  }
822528
822549
  return {
@@ -860283,7 +860304,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
860283
860304
  var LOGS_FOLDER_NAME = "logs";
860284
860305
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
860285
860306
  function getCliSource() {
860286
- const version7 = "5.33.2";
860307
+ const version7 = "5.33.3";
860287
860308
  return `cli@${version7}`;
860288
860309
  }
860289
860310
  var DebugLogger = class {
@@ -879129,7 +879150,7 @@ var LegacyDocsPublisher = class {
879129
879150
  previewId,
879130
879151
  disableTemplates: void 0,
879131
879152
  skipUpload,
879132
- cliVersion: "5.33.2",
879153
+ cliVersion: "5.33.3",
879133
879154
  loginCommand: "fern auth login"
879134
879155
  });
879135
879156
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -953829,7 +953850,7 @@ function getAutomationContextFromEnv() {
953829
953850
  config_branch: process.env.FERN_CONFIG_BRANCH,
953830
953851
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
953831
953852
  trigger: process.env.GITHUB_EVENT_NAME,
953832
- cli_version: "5.33.2"
953853
+ cli_version: "5.33.3"
953833
953854
  };
953834
953855
  }
953835
953856
  function isAutomationMode() {
@@ -954655,7 +954676,7 @@ var CliContext = class _CliContext {
954655
954676
  if (false) {
954656
954677
  this.logger.error("CLI_VERSION is not defined");
954657
954678
  }
954658
- return "5.33.2";
954679
+ return "5.33.3";
954659
954680
  }
954660
954681
  getCliName() {
954661
954682
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.33.2",
2
+ "version": "5.33.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",