@fern-api/fern-api-dev 4.37.12 → 4.38.0-11-gd5dc5847f4c
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 +66 -10
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -581652,7 +581652,7 @@ var AccessTokenPosthogManager = class {
|
|
|
581652
581652
|
properties: {
|
|
581653
581653
|
...event,
|
|
581654
581654
|
...event.properties,
|
|
581655
|
-
version: "4.
|
|
581655
|
+
version: "4.38.0-11-gd5dc5847f4c",
|
|
581656
581656
|
usingAccessToken: true
|
|
581657
581657
|
}
|
|
581658
581658
|
});
|
|
@@ -581703,7 +581703,7 @@ var UserPosthogManager = class {
|
|
|
581703
581703
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
581704
581704
|
event: "CLI",
|
|
581705
581705
|
properties: {
|
|
581706
|
-
version: "4.
|
|
581706
|
+
version: "4.38.0-11-gd5dc5847f4c",
|
|
581707
581707
|
...event,
|
|
581708
581708
|
...event.properties,
|
|
581709
581709
|
usingAccessToken: false,
|
|
@@ -787806,7 +787806,7 @@ var import_path51 = __toESM(require("path"), 1);
|
|
|
787806
787806
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
787807
787807
|
var LOGS_FOLDER_NAME = "logs";
|
|
787808
787808
|
function getCliSource() {
|
|
787809
|
-
const version8 = "4.
|
|
787809
|
+
const version8 = "4.38.0-11-gd5dc5847f4c";
|
|
787810
787810
|
return `cli@${version8}`;
|
|
787811
787811
|
}
|
|
787812
787812
|
var DebugLogger = class {
|
|
@@ -797720,15 +797720,23 @@ async function calculateFileHash(absoluteFilePath) {
|
|
|
797720
797720
|
function sanitizeRelativePathForS3(relativeFilePath) {
|
|
797721
797721
|
return relativeFilePath.replace(/\.\.\//g, "_dot_dot_/");
|
|
797722
797722
|
}
|
|
797723
|
-
async function publishDocs({ token, organization, docsWorkspace, domain: domain3, customDomains, apiWorkspaces, ossWorkspaces, context: context2, preview, previewId, editThisPage, isPrivate = false, disableTemplates = false, skipUpload = false, withAiExamples = true, excludeApis = false, targetAudiences, docsUrl, cliVersion }) {
|
|
797723
|
+
async function publishDocs({ token, organization, docsWorkspace, domain: domain3, customDomains, apiWorkspaces, ossWorkspaces, context: context2, preview, previewId, editThisPage, isPrivate = false, disableTemplates = false, skipUpload = false, withAiExamples = true, excludeApis = false, targetAudiences, docsUrl, cliVersion, ciSource }) {
|
|
797724
797724
|
const fdrOrigin = "https://registry-dev2.buildwithfern.com";
|
|
797725
797725
|
const isAirGapped = await detectAirGappedMode(`${fdrOrigin}/health`, context2.logger);
|
|
797726
797726
|
if (isAirGapped) {
|
|
797727
797727
|
context2.logger.debug("Detected air-gapped environment - skipping external FDR service calls");
|
|
797728
797728
|
}
|
|
797729
|
+
const headers2 = {};
|
|
797730
|
+
if (cliVersion != null) {
|
|
797731
|
+
headers2["X-CLI-Version"] = cliVersion;
|
|
797732
|
+
}
|
|
797733
|
+
if (ciSource != null) {
|
|
797734
|
+
headers2["X-CI-Source"] = JSON.stringify(ciSource);
|
|
797735
|
+
context2.logger.debug(`CI source detected: ${ciSource.type} (${ciSource.repo ?? "unknown repo"})`);
|
|
797736
|
+
}
|
|
797729
797737
|
const fdr = createFdrService({
|
|
797730
797738
|
token: token.value,
|
|
797731
|
-
...
|
|
797739
|
+
...Object.keys(headers2).length > 0 && { headers: headers2 }
|
|
797732
797740
|
});
|
|
797733
797741
|
const authConfig = isPrivate ? { type: "private", authType: "sso" } : { type: "public" };
|
|
797734
797742
|
if (excludeApis) {
|
|
@@ -798488,7 +798496,7 @@ var PUBLISH_CONFLICT_RETRY_DELAYS_MS = [
|
|
|
798488
798496
|
5 * 60 * 1e3
|
|
798489
798497
|
// 5 minutes
|
|
798490
798498
|
];
|
|
798491
|
-
async function runRemoteGenerationForDocsWorkspace({ organization, apiWorkspaces, ossWorkspaces, docsWorkspace, context: context2, token, instanceUrl, preview, previewId, disableTemplates, skipUpload, cliVersion }) {
|
|
798499
|
+
async function runRemoteGenerationForDocsWorkspace({ organization, apiWorkspaces, ossWorkspaces, docsWorkspace, context: context2, token, instanceUrl, preview, previewId, disableTemplates, skipUpload, cliVersion, ciSource }) {
|
|
798492
798500
|
const shouldSubstituteAsEmpty = preview && !docsWorkspace.config.settings?.substituteEnvVars;
|
|
798493
798501
|
docsWorkspace.config = replaceEnvVariables(
|
|
798494
798502
|
docsWorkspace.config,
|
|
@@ -798542,7 +798550,8 @@ async function runRemoteGenerationForDocsWorkspace({ organization, apiWorkspaces
|
|
|
798542
798550
|
excludeApis: docsWorkspace.config.experimental?.excludeApis ?? false,
|
|
798543
798551
|
targetAudiences: maybeInstance.audiences ? Array.isArray(maybeInstance.audiences) ? maybeInstance.audiences : [maybeInstance.audiences] : void 0,
|
|
798544
798552
|
docsUrl: maybeInstance.url,
|
|
798545
|
-
cliVersion
|
|
798553
|
+
cliVersion,
|
|
798554
|
+
ciSource
|
|
798546
798555
|
});
|
|
798547
798556
|
for (let attempt = 0; ; attempt++) {
|
|
798548
798557
|
try {
|
|
@@ -798601,7 +798610,7 @@ var LegacyDocsPublisher = class {
|
|
|
798601
798610
|
previewId: void 0,
|
|
798602
798611
|
disableTemplates: void 0,
|
|
798603
798612
|
skipUpload,
|
|
798604
|
-
cliVersion: "4.
|
|
798613
|
+
cliVersion: "4.38.0-11-gd5dc5847f4c"
|
|
798605
798614
|
});
|
|
798606
798615
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
798607
798616
|
return { success: false };
|
|
@@ -836922,6 +836931,11 @@ var Attribute2 = class _Attribute extends AstNode7 {
|
|
|
836922
836931
|
args: ["transparent"]
|
|
836923
836932
|
})
|
|
836924
836933
|
};
|
|
836934
|
+
static nonExhaustive() {
|
|
836935
|
+
return new _Attribute({
|
|
836936
|
+
name: "non_exhaustive"
|
|
836937
|
+
});
|
|
836938
|
+
}
|
|
836925
836939
|
};
|
|
836926
836940
|
|
|
836927
836941
|
// ../../../generators/rust/codegen/lib/ast/Client.js
|
|
@@ -871195,7 +871209,7 @@ var CliContext = class {
|
|
|
871195
871209
|
if (false) {
|
|
871196
871210
|
this.logger.error("CLI_VERSION is not defined");
|
|
871197
871211
|
}
|
|
871198
|
-
return "4.
|
|
871212
|
+
return "4.38.0-11-gd5dc5847f4c";
|
|
871199
871213
|
}
|
|
871200
871214
|
getCliName() {
|
|
871201
871215
|
if (false) {
|
|
@@ -880715,6 +880729,47 @@ function resolveGroupNamesForWorkspace(groupName, generatorsConfiguration) {
|
|
|
880715
880729
|
init_js();
|
|
880716
880730
|
|
|
880717
880731
|
// src/utils/environment.ts
|
|
880732
|
+
function detectCISource() {
|
|
880733
|
+
if (process.env.GITHUB_ACTIONS === "true") {
|
|
880734
|
+
const repo = process.env.GITHUB_REPOSITORY;
|
|
880735
|
+
const serverUrl = process.env.GITHUB_SERVER_URL ?? "https://github.com";
|
|
880736
|
+
const runId = process.env.GITHUB_RUN_ID;
|
|
880737
|
+
return {
|
|
880738
|
+
type: "github",
|
|
880739
|
+
repo,
|
|
880740
|
+
runId,
|
|
880741
|
+
runUrl: repo && runId ? `${serverUrl}/${repo}/actions/runs/${runId}` : void 0,
|
|
880742
|
+
commitSha: process.env.GITHUB_SHA,
|
|
880743
|
+
branch: process.env.GITHUB_REF_NAME,
|
|
880744
|
+
actor: process.env.GITHUB_ACTOR
|
|
880745
|
+
};
|
|
880746
|
+
}
|
|
880747
|
+
if (process.env.GITLAB_CI === "true") {
|
|
880748
|
+
return {
|
|
880749
|
+
type: "gitlab",
|
|
880750
|
+
repo: process.env.CI_PROJECT_PATH,
|
|
880751
|
+
runId: process.env.CI_PIPELINE_ID,
|
|
880752
|
+
runUrl: process.env.CI_PIPELINE_URL,
|
|
880753
|
+
commitSha: process.env.CI_COMMIT_SHA,
|
|
880754
|
+
branch: process.env.CI_COMMIT_REF_NAME,
|
|
880755
|
+
actor: process.env.GITLAB_USER_LOGIN
|
|
880756
|
+
};
|
|
880757
|
+
}
|
|
880758
|
+
if (process.env.BITBUCKET_BUILD_NUMBER != null) {
|
|
880759
|
+
const workspace = process.env.BITBUCKET_WORKSPACE;
|
|
880760
|
+
const repoSlug = process.env.BITBUCKET_REPO_SLUG;
|
|
880761
|
+
const buildNumber = process.env.BITBUCKET_BUILD_NUMBER;
|
|
880762
|
+
return {
|
|
880763
|
+
type: "bitbucket",
|
|
880764
|
+
repo: workspace && repoSlug ? `${workspace}/${repoSlug}` : void 0,
|
|
880765
|
+
runId: buildNumber,
|
|
880766
|
+
runUrl: workspace && repoSlug && buildNumber ? `https://bitbucket.org/${workspace}/${repoSlug}/pipelines/results/${buildNumber}` : void 0,
|
|
880767
|
+
commitSha: process.env.BITBUCKET_COMMIT,
|
|
880768
|
+
branch: process.env.BITBUCKET_BRANCH
|
|
880769
|
+
};
|
|
880770
|
+
}
|
|
880771
|
+
return void 0;
|
|
880772
|
+
}
|
|
880718
880773
|
function isCI2() {
|
|
880719
880774
|
return !!(process.env.CI || // Generic CI flag (used by many CI systems)
|
|
880720
880775
|
process.env.CONTINUOUS_INTEGRATION || // Alternative generic flag
|
|
@@ -880868,7 +880923,8 @@ ${source_default.yellow("?")} Are you sure you want to continue?`,
|
|
|
880868
880923
|
previewId,
|
|
880869
880924
|
disableTemplates,
|
|
880870
880925
|
skipUpload,
|
|
880871
|
-
cliVersion: cliContext.environment.packageVersion
|
|
880926
|
+
cliVersion: cliContext.environment.packageVersion,
|
|
880927
|
+
ciSource: detectCISource()
|
|
880872
880928
|
});
|
|
880873
880929
|
const generationTime = performance.now() - generationStart;
|
|
880874
880930
|
context2.logger.debug(`Remote docs generation completed in ${generationTime.toFixed(0)}ms`);
|
package/package.json
CHANGED