@fern-api/fern-api-dev 4.67.0-6-gf5f83c2ef73 → 4.67.0-7-g952cbd21b82

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 +36 -33
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -554974,14 +554974,6 @@ function joinZodPath(arr) {
554974
554974
  // ../configuration-loader/lib/dependencies-yml/convertDependenciesConfiguration.js
554975
554975
  init_lib6();
554976
554976
 
554977
- // ../task-context/lib/FernCliError.js
554978
- var FernCliError = class _FernCliError extends Error {
554979
- constructor() {
554980
- super();
554981
- Object.setPrototypeOf(this, _FernCliError.prototype);
554982
- }
554983
- };
554984
-
554985
554977
  // ../task-context/lib/LoggableFernCliError.js
554986
554978
  var LoggableFernCliError = class _LoggableFernCliError extends Error {
554987
554979
  log;
@@ -555067,6 +555059,11 @@ function getConsoleLoggerForLevel(level) {
555067
555059
  }
555068
555060
  }
555069
555061
 
555062
+ // ../task-context/lib/TaskAbortSignal.js
555063
+ var TaskAbortSignal = class {
555064
+ __brand = "TaskAbortSignal";
555065
+ };
555066
+
555070
555067
  // ../task-context/lib/TaskContext.js
555071
555068
  var TaskResult;
555072
555069
  (function(TaskResult2) {
@@ -555092,7 +555089,7 @@ function createMockTaskContext({ logger: logger4 = CONSOLE_LOGGER } = {}) {
555092
555089
  if (parts.length > 0) {
555093
555090
  context3.logger.error(...parts);
555094
555091
  }
555095
- throw new FernCliError();
555092
+ throw new TaskAbortSignal();
555096
555093
  },
555097
555094
  failWithoutThrowing: (message, error50) => {
555098
555095
  context3.failAndThrow(message, error50);
@@ -579428,7 +579425,7 @@ function logErrorMessage({ message, error: error50, logger: logger4, logLevel =
579428
579425
  } else if (error50 == null) {
579429
579426
  return;
579430
579427
  }
579431
- if (error50 instanceof FernCliError) {
579428
+ if (error50 instanceof TaskAbortSignal) {
579432
579429
  return;
579433
579430
  }
579434
579431
  if (error50 != null) {
@@ -619352,7 +619349,7 @@ var TaskContextAdapter = class {
619352
619349
  }
619353
619350
  failAndThrow(message, error50) {
619354
619351
  this.failWithoutThrowing(message, error50);
619355
- throw new FernCliError();
619352
+ throw new TaskAbortSignal();
619356
619353
  }
619357
619354
  failWithoutThrowing(message, error50) {
619358
619355
  const fullMessage = this.getFullErrorMessage(message, error50);
@@ -627556,7 +627553,7 @@ var AccessTokenPosthogManager = class {
627556
627553
  properties: {
627557
627554
  ...event,
627558
627555
  ...event.properties,
627559
- version: "4.67.0-6-gf5f83c2ef73",
627556
+ version: "4.67.0-7-g952cbd21b82",
627560
627557
  usingAccessToken: true
627561
627558
  }
627562
627559
  });
@@ -627607,7 +627604,7 @@ var UserPosthogManager = class {
627607
627604
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
627608
627605
  event: "CLI",
627609
627606
  properties: {
627610
- version: "4.67.0-6-gf5f83c2ef73",
627607
+ version: "4.67.0-7-g952cbd21b82",
627611
627608
  ...event,
627612
627609
  ...event.properties,
627613
627610
  usingAccessToken: false,
@@ -632335,7 +632332,7 @@ function handleError(context3, error50) {
632335
632332
  context3.stdout.error(`${Icons.error} ${error50.message}`);
632336
632333
  return;
632337
632334
  }
632338
- if (error50 instanceof FernCliError) {
632335
+ if (error50 instanceof TaskAbortSignal) {
632339
632336
  return;
632340
632337
  }
632341
632338
  if (error50 instanceof CliError) {
@@ -632358,10 +632355,13 @@ function handleError(context3, error50) {
632358
632355
  `);
632359
632356
  }
632360
632357
  function shouldReportToSentry(error50) {
632358
+ if (error50 instanceof TaskAbortSignal) {
632359
+ return false;
632360
+ }
632361
632361
  if (error50 instanceof CliError) {
632362
632362
  return error50.code === "INTERNAL_ERROR";
632363
632363
  }
632364
- if (error50 instanceof ValidationError || error50 instanceof SourcedValidationError || error50 instanceof KeyringUnavailableError || error50 instanceof FernCliError) {
632364
+ if (error50 instanceof ValidationError || error50 instanceof SourcedValidationError || error50 instanceof KeyringUnavailableError) {
632365
632365
  return false;
632366
632366
  }
632367
632367
  return true;
@@ -843865,7 +843865,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
843865
843865
  var LOGS_FOLDER_NAME = "logs";
843866
843866
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
843867
843867
  function getCliSource() {
843868
- const version7 = "4.67.0-6-gf5f83c2ef73";
843868
+ const version7 = "4.67.0-7-g952cbd21b82";
843869
843869
  return `cli@${version7}`;
843870
843870
  }
843871
843871
  var DebugLogger = class {
@@ -855113,7 +855113,7 @@ var LegacyDocsPublisher = class {
855113
855113
  previewId,
855114
855114
  disableTemplates: void 0,
855115
855115
  skipUpload,
855116
- cliVersion: "4.67.0-6-gf5f83c2ef73"
855116
+ cliVersion: "4.67.0-7-g952cbd21b82"
855117
855117
  });
855118
855118
  if (taskContext.getResult() === TaskResult.Failure) {
855119
855119
  return { success: false };
@@ -907608,7 +907608,7 @@ var GenerationRunner = class {
907608
907608
  interactiveTaskContext.logger.info(`Skipping dynamic snippet tests; shouldGenerateDynamicSnippetTests: ${shouldGenerateDynamicSnippetTests}, language: ${generatorInvocation.language}`);
907609
907609
  }
907610
907610
  } catch (error50) {
907611
- if (error50 instanceof FernCliError) {
907611
+ if (error50 instanceof TaskAbortSignal) {
907612
907612
  } else if (error50 instanceof LoggableFernCliError) {
907613
907613
  interactiveTaskContext.failWithoutThrowing(`Generation failed: ${error50.log}`, error50);
907614
907614
  } else {
@@ -928263,7 +928263,7 @@ var TaskContextImpl = class {
928263
928263
  failAndThrow(message, error50) {
928264
928264
  this.failWithoutThrowing(message, error50);
928265
928265
  this.finish();
928266
- throw new FernCliError();
928266
+ throw new TaskAbortSignal();
928267
928267
  }
928268
928268
  failWithoutThrowing(message, error50) {
928269
928269
  logErrorMessage({ message, error: error50, logger: this.logger });
@@ -928711,7 +928711,7 @@ var CliContext = class {
928711
928711
  if (false) {
928712
928712
  this.logger.error("CLI_VERSION is not defined");
928713
928713
  }
928714
- return "4.67.0-6-gf5f83c2ef73";
928714
+ return "4.67.0-7-g952cbd21b82";
928715
928715
  }
928716
928716
  getCliName() {
928717
928717
  if (false) {
@@ -928729,7 +928729,7 @@ var CliContext = class {
928729
928729
  }
928730
928730
  failAndThrow(message, error50) {
928731
928731
  this.failWithoutThrowing(message, error50);
928732
- throw new FernCliError();
928732
+ throw new TaskAbortSignal();
928733
928733
  }
928734
928734
  failWithoutThrowing(message, error50) {
928735
928735
  this.didSucceed = false;
@@ -928834,13 +928834,16 @@ var CliContext = class {
928834
928834
  try {
928835
928835
  result = await run(context3);
928836
928836
  } catch (error50) {
928837
+ if (error50 instanceof TaskAbortSignal) {
928838
+ throw error50;
928839
+ }
928837
928840
  if (error50.message.includes("globalThis")) {
928838
928841
  context3.logger.error(this.USE_NODE_18_OR_ABOVE_MESSAGE);
928839
928842
  context3.failWithoutThrowing();
928840
928843
  } else {
928841
928844
  context3.failWithoutThrowing(void 0, error50);
928842
928845
  }
928843
- throw new FernCliError();
928846
+ throw new TaskAbortSignal();
928844
928847
  } finally {
928845
928848
  context3.finish();
928846
928849
  }
@@ -928976,7 +928979,7 @@ var CliContext = class {
928976
928979
  } catch (error50) {
928977
928980
  if (error50?.name === "ExitPromptError") {
928978
928981
  this.logger.info("\nCancelled by user.");
928979
- throw new FernCliError();
928982
+ throw new TaskAbortSignal();
928980
928983
  }
928981
928984
  throw error50;
928982
928985
  }
@@ -930295,7 +930298,7 @@ async function diff({
930295
930298
  const nextVersion = import_semver17.default.inc(fromVersion, bump);
930296
930299
  if (!nextVersion) {
930297
930300
  context3.failWithoutThrowing(`Invalid current version: ${fromVersion}`);
930298
- throw new FernCliError();
930301
+ throw new TaskAbortSignal();
930299
930302
  }
930300
930303
  return { bump, nextVersion, errors: errors4 };
930301
930304
  }
@@ -930307,13 +930310,13 @@ async function readIr({
930307
930310
  const absoluteFilepath = AbsoluteFilePath2.of(resolve6(cwd(), filepath));
930308
930311
  if (!await doesPathExist(absoluteFilepath, "file")) {
930309
930312
  context3.failWithoutThrowing(`File not found: ${absoluteFilepath}`);
930310
- throw new FernCliError();
930313
+ throw new TaskAbortSignal();
930311
930314
  }
930312
930315
  const ir15 = await streamObjectFromFile(absoluteFilepath);
930313
930316
  const parsed = serialization_exports2.IntermediateRepresentation.parse(ir15);
930314
930317
  if (!parsed.ok) {
930315
930318
  context3.failWithoutThrowing(`Invalid --${flagName}; expected a filepath containing a valid IR`);
930316
- throw new FernCliError();
930319
+ throw new TaskAbortSignal();
930317
930320
  }
930318
930321
  return parsed.value;
930319
930322
  }
@@ -930379,7 +930382,7 @@ function diffGeneratorVersions(context3, generatorVersions) {
930379
930382
  };
930380
930383
  } catch (error50) {
930381
930384
  context3.failWithoutThrowing(`Error diffing generator versions ${from4} and ${to8}: ${error50}`);
930382
- throw new FernCliError();
930385
+ throw new TaskAbortSignal();
930383
930386
  }
930384
930387
  }
930385
930388
  function bumpFromDiff(diff2) {
@@ -940355,11 +940358,11 @@ async function sdkDiffCommand({
940355
940358
  To: ${toPath5}`);
940356
940359
  if (!await doesPathExist(fromPath, "directory")) {
940357
940360
  context3.failWithoutThrowing(`Directory not found: ${fromPath}`);
940358
- throw new FernCliError();
940361
+ throw new TaskAbortSignal();
940359
940362
  }
940360
940363
  if (!await doesPathExist(toPath5, "directory")) {
940361
940364
  context3.failWithoutThrowing(`Directory not found: ${toPath5}`);
940362
- throw new FernCliError();
940365
+ throw new TaskAbortSignal();
940363
940366
  }
940364
940367
  const clientRegistry = await getClientRegistry(context3, project);
940365
940368
  context3.logger.info("Generating diff between directories...");
@@ -940469,7 +940472,7 @@ async function sdkDiffCommand({
940469
940472
  context3.failWithoutThrowing(
940470
940473
  `Failed to analyze SDK diff. Diff stats: ${gitDiff.length.toLocaleString()} chars, ${diffSizeKB}KB, ${fileCount} files changed. ` + (cappedChunks.length > 1 ? `The diff was split into ${cappedChunks.length} chunks but analysis still failed. ` : "") + `Error: ${errorMessage}`
940471
940474
  );
940472
- throw new FernCliError();
940475
+ throw new TaskAbortSignal();
940473
940476
  }
940474
940477
  }
940475
940478
  async function generateDiff({
@@ -946927,10 +946930,10 @@ async function runCli() {
946927
946930
  error: error50
946928
946931
  }
946929
946932
  });
946930
- if (error50?.message.includes("globalThis")) {
946931
- cliContext.logger.error(USE_NODE_18_OR_ABOVE_MESSAGE);
946933
+ if (error50 instanceof TaskAbortSignal) {
946932
946934
  cliContext.failWithoutThrowing();
946933
- } else if (error50 instanceof FernCliError) {
946935
+ } else if (error50?.message.includes("globalThis")) {
946936
+ cliContext.logger.error(USE_NODE_18_OR_ABOVE_MESSAGE);
946934
946937
  cliContext.failWithoutThrowing();
946935
946938
  } else if (error50 instanceof LoggableFernCliError) {
946936
946939
  cliContext.logger.error(`Failed. ${error50.log}`);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.67.0-6-gf5f83c2ef73",
2
+ "version": "4.67.0-7-g952cbd21b82",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",