@fern-api/fern-api-dev 5.15.0 → 5.15.1
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 +22 -49
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -623533,7 +623533,7 @@ var AccessTokenPosthogManager = class {
|
|
|
623533
623533
|
properties: {
|
|
623534
623534
|
...event,
|
|
623535
623535
|
...event.properties,
|
|
623536
|
-
version: "5.15.
|
|
623536
|
+
version: "5.15.1",
|
|
623537
623537
|
usingAccessToken: true
|
|
623538
623538
|
}
|
|
623539
623539
|
});
|
|
@@ -623582,17 +623582,16 @@ var UserPosthogManager = class {
|
|
|
623582
623582
|
}
|
|
623583
623583
|
}
|
|
623584
623584
|
async sendEvent(event) {
|
|
623585
|
-
const
|
|
623585
|
+
const userEmail = await this.getUserEmail();
|
|
623586
623586
|
this.posthog.capture({
|
|
623587
623587
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
623588
623588
|
event: "CLI",
|
|
623589
623589
|
properties: {
|
|
623590
|
-
version: "5.15.
|
|
623590
|
+
version: "5.15.1",
|
|
623591
623591
|
...event,
|
|
623592
623592
|
...event.properties,
|
|
623593
623593
|
usingAccessToken: false,
|
|
623594
|
-
...userEmail != null ? { userEmail } : {}
|
|
623595
|
-
...orgId != null ? { org_id: orgId } : {}
|
|
623594
|
+
...userEmail != null ? { userEmail } : {}
|
|
623596
623595
|
}
|
|
623597
623596
|
});
|
|
623598
623597
|
}
|
|
@@ -623625,42 +623624,6 @@ var UserPosthogManager = class {
|
|
|
623625
623624
|
this.userEmail = null;
|
|
623626
623625
|
return void 0;
|
|
623627
623626
|
}
|
|
623628
|
-
/**
|
|
623629
|
-
* Cached primary `OrganizationId` for the current user. `null` is the
|
|
623630
|
-
* "tried and gave up" sentinel — distinct from `undefined` (not yet tried)
|
|
623631
|
-
* so subsequent `sendEvent` calls don't repeatedly hit venus when the user
|
|
623632
|
-
* has no orgs or the call failed.
|
|
623633
|
-
*
|
|
623634
|
-
* Picks the first org returned by `getOrgIdsFromToken`. Multi-org users
|
|
623635
|
-
* appear under their first org for adoption metrics — accurate enough for
|
|
623636
|
-
* dashboards, and matches autopilot's distinct-id pattern.
|
|
623637
|
-
*/
|
|
623638
|
-
orgId;
|
|
623639
|
-
async getPrimaryOrgId() {
|
|
623640
|
-
if (this.orgId === null) {
|
|
623641
|
-
return void 0;
|
|
623642
|
-
}
|
|
623643
|
-
if (this.orgId != null) {
|
|
623644
|
-
return this.orgId;
|
|
623645
|
-
}
|
|
623646
|
-
if (this.token == null) {
|
|
623647
|
-
this.orgId = null;
|
|
623648
|
-
return void 0;
|
|
623649
|
-
}
|
|
623650
|
-
try {
|
|
623651
|
-
const response = await createVenusService({ token: this.token.value }).organization.getOrgIdsFromToken();
|
|
623652
|
-
if (response.ok && response.body.length > 0) {
|
|
623653
|
-
const first3 = response.body[0];
|
|
623654
|
-
if (first3 != null) {
|
|
623655
|
-
this.orgId = first3;
|
|
623656
|
-
return this.orgId;
|
|
623657
|
-
}
|
|
623658
|
-
}
|
|
623659
|
-
} catch {
|
|
623660
|
-
}
|
|
623661
|
-
this.orgId = null;
|
|
623662
|
-
return void 0;
|
|
623663
|
-
}
|
|
623664
623627
|
persistedDistinctId;
|
|
623665
623628
|
async getPersistedDistinctId() {
|
|
623666
623629
|
if (this.persistedDistinctId == null) {
|
|
@@ -848575,7 +848538,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
848575
848538
|
var LOGS_FOLDER_NAME = "logs";
|
|
848576
848539
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
848577
848540
|
function getCliSource() {
|
|
848578
|
-
const version7 = "5.15.
|
|
848541
|
+
const version7 = "5.15.1";
|
|
848579
848542
|
return `cli@${version7}`;
|
|
848580
848543
|
}
|
|
848581
848544
|
var DebugLogger = class {
|
|
@@ -859245,11 +859208,16 @@ var RemoteTaskHandler = class {
|
|
|
859245
859208
|
// the dashboard plan — would require structural change.
|
|
859246
859209
|
durationMs: Date.now() - this.taskStartedAtMs
|
|
859247
859210
|
});
|
|
859211
|
+
const propsWithOverlay = {
|
|
859212
|
+
...props,
|
|
859213
|
+
surface: "fiddle",
|
|
859214
|
+
org_id: this.telemetryContext.orgId
|
|
859215
|
+
};
|
|
859248
859216
|
this.context.instrumentPostHogEvent({
|
|
859249
859217
|
command: "replay",
|
|
859250
|
-
properties:
|
|
859218
|
+
properties: propsWithOverlay
|
|
859251
859219
|
});
|
|
859252
|
-
this.context.logger.debug(`[telemetry] replay event sent: ${JSON.stringify(
|
|
859220
|
+
this.context.logger.debug(`[telemetry] replay event sent: ${JSON.stringify(propsWithOverlay)}`);
|
|
859253
859221
|
this.replayEventEmitted = true;
|
|
859254
859222
|
} catch (error50) {
|
|
859255
859223
|
this.context.logger.debug(`[telemetry] failed to send replay event: ${String(error50)}`);
|
|
@@ -859798,6 +859766,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
859798
859766
|
absolutePathToPreview,
|
|
859799
859767
|
telemetryContext: {
|
|
859800
859768
|
cliVersion: workspace.cliVersion,
|
|
859769
|
+
orgId: projectConfig.organization,
|
|
859801
859770
|
automationMode: automationMode === true,
|
|
859802
859771
|
autoMerge: autoMerge === true,
|
|
859803
859772
|
skipIfNoDiff: skipIfNoDiff === true,
|
|
@@ -861374,7 +861343,7 @@ var LegacyDocsPublisher = class {
|
|
|
861374
861343
|
previewId,
|
|
861375
861344
|
disableTemplates: void 0,
|
|
861376
861345
|
skipUpload,
|
|
861377
|
-
cliVersion: "5.15.
|
|
861346
|
+
cliVersion: "5.15.1",
|
|
861378
861347
|
loginCommand: "fern auth login"
|
|
861379
861348
|
});
|
|
861380
861349
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -914211,12 +914180,16 @@ generators:
|
|
|
914211
914180
|
previewMode: selfhostedGithubConfig.previewMode === true,
|
|
914212
914181
|
durationMs: pipelineDurationMs
|
|
914213
914182
|
});
|
|
914214
|
-
const
|
|
914183
|
+
const propsWithOverlay = {
|
|
914184
|
+
...replayTelemetryProps,
|
|
914185
|
+
surface: "cli",
|
|
914186
|
+
org_id: projectConfig.organization
|
|
914187
|
+
};
|
|
914215
914188
|
interactiveTaskContext.instrumentPostHogEvent({
|
|
914216
914189
|
command: "replay",
|
|
914217
|
-
properties:
|
|
914190
|
+
properties: propsWithOverlay
|
|
914218
914191
|
});
|
|
914219
|
-
interactiveTaskContext.logger.debug(`[telemetry] replay event sent: ${JSON.stringify(
|
|
914192
|
+
interactiveTaskContext.logger.debug(`[telemetry] replay event sent: ${JSON.stringify(propsWithOverlay)}`);
|
|
914220
914193
|
} catch (error50) {
|
|
914221
914194
|
interactiveTaskContext.logger.debug(`[telemetry] failed to send replay event: ${String(error50)}`);
|
|
914222
914195
|
}
|
|
@@ -935895,7 +935868,7 @@ var CliContext = class _CliContext {
|
|
|
935895
935868
|
if (false) {
|
|
935896
935869
|
this.logger.error("CLI_VERSION is not defined");
|
|
935897
935870
|
}
|
|
935898
|
-
return "5.15.
|
|
935871
|
+
return "5.15.1";
|
|
935899
935872
|
}
|
|
935900
935873
|
getCliName() {
|
|
935901
935874
|
if (false) {
|
package/package.json
CHANGED