@fern-api/fern-api-dev 4.84.0 → 4.84.1-1-ge2c40f1fb4b

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 +35 -5
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -469637,6 +469637,7 @@ function createMockTaskContext({ logger: logger4 = CONSOLE_LOGGER } = {}) {
469637
469637
  captureException: () => {
469638
469638
  },
469639
469639
  getResult: () => TaskResult.Success,
469640
+ getLastFailureMessage: () => void 0,
469640
469641
  addInteractiveTask: () => {
469641
469642
  throw new Error("Not implemented");
469642
469643
  },
@@ -614771,7 +614772,7 @@ var AccessTokenPosthogManager = class {
614771
614772
  properties: {
614772
614773
  ...event,
614773
614774
  ...event.properties,
614774
- version: "4.84.0",
614775
+ version: "4.84.1-1-ge2c40f1fb4b",
614775
614776
  usingAccessToken: true
614776
614777
  }
614777
614778
  });
@@ -614825,7 +614826,7 @@ var UserPosthogManager = class {
614825
614826
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
614826
614827
  event: "CLI",
614827
614828
  properties: {
614828
- version: "4.84.0",
614829
+ version: "4.84.1-1-ge2c40f1fb4b",
614829
614830
  ...event,
614830
614831
  ...event.properties,
614831
614832
  usingAccessToken: false,
@@ -619830,6 +619831,7 @@ var TaskContextLogger = class {
619830
619831
  // ../cli-v2/lib/context/adapter/TaskContextAdapter.js
619831
619832
  var TaskContextAdapter = class {
619832
619833
  result = TaskResult.Success;
619834
+ lastFailureMessage = void 0;
619833
619835
  context;
619834
619836
  logger;
619835
619837
  constructor({ context: context3, task, logLevel = LogLevel.Warn }) {
@@ -619858,10 +619860,14 @@ var TaskContextAdapter = class {
619858
619860
  }
619859
619861
  const fullMessage = this.getFullErrorMessage(message, error50);
619860
619862
  if (fullMessage != null) {
619863
+ this.lastFailureMessage = fullMessage;
619861
619864
  this.logger.error(fullMessage);
619862
619865
  }
619863
619866
  reportError(this.context, error50, { ...options2, message });
619864
619867
  }
619868
+ getLastFailureMessage() {
619869
+ return this.lastFailureMessage;
619870
+ }
619865
619871
  captureException(error50, code5) {
619866
619872
  const errorCode = resolveErrorCode(error50, code5);
619867
619873
  this.context.telemetry.captureException(error50, { errorCode });
@@ -619884,6 +619890,7 @@ var TaskContextAdapter = class {
619884
619890
  failWithoutThrowing: this.failWithoutThrowing.bind(this),
619885
619891
  captureException: this.captureException.bind(this),
619886
619892
  getResult: () => this.result,
619893
+ getLastFailureMessage: this.getLastFailureMessage.bind(this),
619887
619894
  addInteractiveTask: this.addInteractiveTask.bind(this),
619888
619895
  runInteractiveTask: this.runInteractiveTask.bind(this),
619889
619896
  instrumentPostHogEvent: this.instrumentPostHogEvent.bind(this),
@@ -832317,7 +832324,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
832317
832324
  var LOGS_FOLDER_NAME = "logs";
832318
832325
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
832319
832326
  function getCliSource() {
832320
- const version7 = "4.84.0";
832327
+ const version7 = "4.84.1-1-ge2c40f1fb4b";
832321
832328
  return `cli@${version7}`;
832322
832329
  }
832323
832330
  var DebugLogger = class {
@@ -842867,6 +842874,16 @@ async function generateOne({ generatorInvocation, interactiveTaskContext, projec
842867
842874
  if (automation == null) {
842868
842875
  throw error50;
842869
842876
  }
842877
+ if (error50 instanceof TaskAbortSignal) {
842878
+ automation.recorder.recordFailure({
842879
+ apiName: workspace.workspaceName,
842880
+ groupName: generatorGroup.groupName,
842881
+ generatorName: generatorInvocation.name,
842882
+ errorMessage: interactiveTaskContext.getLastFailureMessage() ?? "Generator failed",
842883
+ durationMs: Date.now() - startedAt
842884
+ });
842885
+ throw error50;
842886
+ }
842870
842887
  const message = extractErrorMessage(error50);
842871
842888
  automation.recorder.recordFailure({
842872
842889
  apiName: workspace.workspaceName,
@@ -843954,7 +843971,7 @@ var LegacyDocsPublisher = class {
843954
843971
  previewId,
843955
843972
  disableTemplates: void 0,
843956
843973
  skipUpload,
843957
- cliVersion: "4.84.0"
843974
+ cliVersion: "4.84.1-1-ge2c40f1fb4b"
843958
843975
  });
843959
843976
  if (taskContext.getResult() === TaskResult.Failure) {
843960
843977
  return { success: false };
@@ -918705,6 +918722,7 @@ var StdoutRedirector = class {
918705
918722
  init_lib4();
918706
918723
  var TaskContextImpl = class {
918707
918724
  result = TaskResult.Success;
918725
+ lastFailureMessage = void 0;
918708
918726
  logImmediately;
918709
918727
  logPrefix;
918710
918728
  title;
@@ -918742,6 +918760,9 @@ var TaskContextImpl = class {
918742
918760
  return this.status !== "notStarted";
918743
918761
  }
918744
918762
  finish() {
918763
+ if (this.status === "finished") {
918764
+ return;
918765
+ }
918745
918766
  this.status = "finished";
918746
918767
  this.flushLogs();
918747
918768
  this.onResult?.(this.getResult());
@@ -918760,9 +918781,15 @@ var TaskContextImpl = class {
918760
918781
  if (error50 instanceof TaskAbortSignal) {
918761
918782
  return;
918762
918783
  }
918784
+ if (message != null) {
918785
+ this.lastFailureMessage = message;
918786
+ }
918763
918787
  logErrorMessage({ message, error: error50, logger: this.logger });
918764
918788
  reportError2(this, error50, { ...options2, message });
918765
918789
  }
918790
+ getLastFailureMessage() {
918791
+ return this.lastFailureMessage;
918792
+ }
918766
918793
  captureException(error50, code5) {
918767
918794
  this.captureExceptionImpl?.(error50, code5);
918768
918795
  }
@@ -918847,6 +918874,9 @@ var InteractiveTaskContextImpl = class extends TaskContextImpl {
918847
918874
  return this.status !== "notStarted";
918848
918875
  }
918849
918876
  finish() {
918877
+ if (this.status === "finished") {
918878
+ return;
918879
+ }
918850
918880
  if (this.result === TaskResult.Success) {
918851
918881
  this.logAtLevelWithOverrides(LogLevel.Info, ["Finished."], {
918852
918882
  omitOnTTY: true
@@ -919231,7 +919261,7 @@ var CliContext = class _CliContext {
919231
919261
  if (false) {
919232
919262
  this.logger.error("CLI_VERSION is not defined");
919233
919263
  }
919234
- return "4.84.0";
919264
+ return "4.84.1-1-ge2c40f1fb4b";
919235
919265
  }
919236
919266
  getCliName() {
919237
919267
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.84.0",
2
+ "version": "4.84.1-1-ge2c40f1fb4b",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",