@fern-api/fern-api-dev 4.38.1-7-g643fa2b4d08 → 4.38.1-9-g7daf4bb89f2
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.
- package/cli.cjs +54 -9
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -600062,7 +600062,7 @@ var AccessTokenPosthogManager = class {
|
|
|
600062
600062
|
properties: {
|
|
600063
600063
|
...event,
|
|
600064
600064
|
...event.properties,
|
|
600065
|
-
version: "4.38.1-
|
|
600065
|
+
version: "4.38.1-9-g7daf4bb89f2",
|
|
600066
600066
|
usingAccessToken: true
|
|
600067
600067
|
}
|
|
600068
600068
|
});
|
|
@@ -600113,7 +600113,7 @@ var UserPosthogManager = class {
|
|
|
600113
600113
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
600114
600114
|
event: "CLI",
|
|
600115
600115
|
properties: {
|
|
600116
|
-
version: "4.38.1-
|
|
600116
|
+
version: "4.38.1-9-g7daf4bb89f2",
|
|
600117
600117
|
...event,
|
|
600118
600118
|
...event.properties,
|
|
600119
600119
|
usingAccessToken: false,
|
|
@@ -619464,8 +619464,8 @@ function getClientOptions(options2, getDefaultIntegrationsImpl) {
|
|
|
619464
619464
|
const tracesSampleRate = getTracesSampleRate(options2.tracesSampleRate);
|
|
619465
619465
|
const mergedOptions = {
|
|
619466
619466
|
...options2,
|
|
619467
|
-
dsn: options2.dsn ??
|
|
619468
|
-
environment: options2.environment ??
|
|
619467
|
+
dsn: options2.dsn ?? "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496",
|
|
619468
|
+
environment: options2.environment ?? "development",
|
|
619469
619469
|
sendClientReports: options2.sendClientReports ?? true,
|
|
619470
619470
|
transport: options2.transport ?? makeNodeTransport,
|
|
619471
619471
|
stackParser: stackParserFromStackParserOptions(options2.stackParser || defaultStackParser),
|
|
@@ -627840,9 +627840,9 @@ var TelemetryClient = class {
|
|
|
627840
627840
|
usingAccessToken: process.env.FERN_TOKEN != null
|
|
627841
627841
|
};
|
|
627842
627842
|
this.posthog = apiKey != null && apiKey.length > 0 && isTelemetryEnabled ? new PostHog2(apiKey) : void 0;
|
|
627843
|
-
const sentryDsn =
|
|
627843
|
+
const sentryDsn = "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";
|
|
627844
627844
|
if (sentryDsn != null && sentryDsn.length > 0 && isTelemetryEnabled) {
|
|
627845
|
-
const sentryEnvironment =
|
|
627845
|
+
const sentryEnvironment = "development";
|
|
627846
627846
|
if (sentryEnvironment == null || sentryEnvironment.length === 0) {
|
|
627847
627847
|
throw new Error("SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured");
|
|
627848
627848
|
}
|
|
@@ -826861,7 +826861,7 @@ var import_path55 = __toESM(require("path"), 1);
|
|
|
826861
826861
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
826862
826862
|
var LOGS_FOLDER_NAME = "logs";
|
|
826863
826863
|
function getCliSource() {
|
|
826864
|
-
const version8 = "4.38.1-
|
|
826864
|
+
const version8 = "4.38.1-9-g7daf4bb89f2";
|
|
826865
826865
|
return `cli@${version8}`;
|
|
826866
826866
|
}
|
|
826867
826867
|
var DebugLogger = class {
|
|
@@ -837676,7 +837676,7 @@ var LegacyDocsPublisher = class {
|
|
|
837676
837676
|
previewId: void 0,
|
|
837677
837677
|
disableTemplates: void 0,
|
|
837678
837678
|
skipUpload,
|
|
837679
|
-
cliVersion: "4.38.1-
|
|
837679
|
+
cliVersion: "4.38.1-9-g7daf4bb89f2"
|
|
837680
837680
|
});
|
|
837681
837681
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
837682
837682
|
return { success: false };
|
|
@@ -909791,6 +909791,44 @@ var esm_default16 = createPrompt((config5, done) => {
|
|
|
909791
909791
|
// src/cli-context/CliContext.ts
|
|
909792
909792
|
init_lodash();
|
|
909793
909793
|
|
|
909794
|
+
// src/telemetry/SentryClient.ts
|
|
909795
|
+
var SentryClient = class {
|
|
909796
|
+
sentry;
|
|
909797
|
+
constructor({ release: release2 }) {
|
|
909798
|
+
const isTelemetryEnabled = process.env.FERN_DISABLE_TELEMETRY !== "true";
|
|
909799
|
+
const sentryDsn = "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";
|
|
909800
|
+
if (isTelemetryEnabled && sentryDsn != null && sentryDsn.length > 0) {
|
|
909801
|
+
const sentryEnvironment = "development";
|
|
909802
|
+
if (sentryEnvironment == null || sentryEnvironment.length === 0) {
|
|
909803
|
+
throw new Error("SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured");
|
|
909804
|
+
}
|
|
909805
|
+
this.sentry = init2({
|
|
909806
|
+
dsn: sentryDsn,
|
|
909807
|
+
release: release2,
|
|
909808
|
+
environment: sentryEnvironment,
|
|
909809
|
+
defaultIntegrations: false,
|
|
909810
|
+
integrations: [rewriteFramesIntegration()],
|
|
909811
|
+
tracesSampleRate: 0
|
|
909812
|
+
});
|
|
909813
|
+
}
|
|
909814
|
+
}
|
|
909815
|
+
async captureException(error50) {
|
|
909816
|
+
if (this.sentry == null) {
|
|
909817
|
+
return;
|
|
909818
|
+
}
|
|
909819
|
+
try {
|
|
909820
|
+
this.sentry.captureException(error50);
|
|
909821
|
+
} catch {
|
|
909822
|
+
}
|
|
909823
|
+
}
|
|
909824
|
+
async flush() {
|
|
909825
|
+
if (this.sentry == null) {
|
|
909826
|
+
return;
|
|
909827
|
+
}
|
|
909828
|
+
await Promise.resolve(this.sentry.flush(2e3)).catch(() => void 0);
|
|
909829
|
+
}
|
|
909830
|
+
};
|
|
909831
|
+
|
|
909794
909832
|
// src/cli-context/StdoutRedirector.ts
|
|
909795
909833
|
var StdoutRedirector = class {
|
|
909796
909834
|
originalWrite;
|
|
@@ -910285,6 +910323,7 @@ async function getLatestVersionOfCli({
|
|
|
910285
910323
|
var WORKSPACE_NAME_COLORS = ["#2E86AB", "#A23B72", "#F18F01", "#C73E1D", "#CCE2A3"];
|
|
910286
910324
|
var CliContext = class {
|
|
910287
910325
|
environment;
|
|
910326
|
+
sentryClient;
|
|
910288
910327
|
didSucceed = true;
|
|
910289
910328
|
numTasks = 0;
|
|
910290
910329
|
ttyAwareLogger;
|
|
@@ -910306,6 +910345,7 @@ var CliContext = class {
|
|
|
910306
910345
|
packageVersion: packageVersion3,
|
|
910307
910346
|
cliName
|
|
910308
910347
|
};
|
|
910348
|
+
this.sentryClient = new SentryClient({ release: `cli@${this.environment.packageVersion}` });
|
|
910309
910349
|
}
|
|
910310
910350
|
getPackageName() {
|
|
910311
910351
|
if (false) {
|
|
@@ -910317,7 +910357,7 @@ var CliContext = class {
|
|
|
910317
910357
|
if (false) {
|
|
910318
910358
|
this.logger.error("CLI_VERSION is not defined");
|
|
910319
910359
|
}
|
|
910320
|
-
return "4.38.1-
|
|
910360
|
+
return "4.38.1-9-g7daf4bb89f2";
|
|
910321
910361
|
}
|
|
910322
910362
|
getCliName() {
|
|
910323
910363
|
if (false) {
|
|
@@ -910375,6 +910415,7 @@ var CliContext = class {
|
|
|
910375
910415
|
this.ttyAwareLogger.finish();
|
|
910376
910416
|
const posthogManager2 = await getPosthogManager();
|
|
910377
910417
|
await posthogManager2.flush();
|
|
910418
|
+
await this.sentryClient.flush();
|
|
910378
910419
|
this.exitProgram({ code: code5 });
|
|
910379
910420
|
}
|
|
910380
910421
|
async nudgeUpgradeIfAvailable() {
|
|
@@ -910456,6 +910497,9 @@ var CliContext = class {
|
|
|
910456
910497
|
(await getPosthogManager()).sendEvent(event);
|
|
910457
910498
|
}
|
|
910458
910499
|
}
|
|
910500
|
+
async captureException(error50) {
|
|
910501
|
+
await this.sentryClient.captureException(error50);
|
|
910502
|
+
}
|
|
910459
910503
|
logger = createLogger4((level, ...args) => this.log(level, ...args));
|
|
910460
910504
|
stderr = createLogger4((level, ...args) => this.logStderr(level, ...args));
|
|
910461
910505
|
constructTaskInitForWorkspace(workspace) {
|
|
@@ -927954,6 +927998,7 @@ async function runCli() {
|
|
|
927954
927998
|
} else if (error50 instanceof LoggableFernCliError) {
|
|
927955
927999
|
cliContext.logger.error(`Failed. ${error50.log}`);
|
|
927956
928000
|
} else {
|
|
928001
|
+
await cliContext.captureException(error50);
|
|
927957
928002
|
cliContext.failWithoutThrowing("Failed.", error50);
|
|
927958
928003
|
}
|
|
927959
928004
|
}
|
package/package.json
CHANGED