@fern-api/fern-api-dev 5.50.5 → 5.51.0
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 +41 -16
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -81214,6 +81214,7 @@ var init_IntermediateRepresentation2 = __esm({
|
|
|
81214
81214
|
IntermediateRepresentation = schemas_exports3.objectWithoutOptionalProperties({
|
|
81215
81215
|
fdrApiDefinitionId: schemas_exports3.string().optional(),
|
|
81216
81216
|
apiVersion: ApiVersionScheme2.optional(),
|
|
81217
|
+
specVersion: schemas_exports3.string().optional(),
|
|
81217
81218
|
apiName: NameOrString,
|
|
81218
81219
|
apiDisplayName: schemas_exports3.string().optional(),
|
|
81219
81220
|
apiDocs: schemas_exports3.string().optional(),
|
|
@@ -139019,6 +139020,7 @@ var init_OpenApiIntermediateRepresentation2 = __esm({
|
|
|
139019
139020
|
init_WebsocketChannel2();
|
|
139020
139021
|
OpenApiIntermediateRepresentation = schemas_exports9.objectWithoutOptionalProperties({
|
|
139021
139022
|
apiVersion: schemas_exports9.unknown().optional(),
|
|
139023
|
+
specVersion: schemas_exports9.string().optional(),
|
|
139022
139024
|
title: schemas_exports9.string().optional(),
|
|
139023
139025
|
description: schemas_exports9.string().optional(),
|
|
139024
139026
|
basePath: schemas_exports9.string().optional(),
|
|
@@ -149711,7 +149713,8 @@ var init_FernDefinitionConverter = __esm({
|
|
|
149711
149713
|
}
|
|
149712
149714
|
},
|
|
149713
149715
|
packageMarkers: {},
|
|
149714
|
-
importedDefinitions: {}
|
|
149716
|
+
importedDefinitions: {},
|
|
149717
|
+
specVersion: ir3.specVersion ?? void 0
|
|
149715
149718
|
};
|
|
149716
149719
|
}
|
|
149717
149720
|
};
|
|
@@ -166399,6 +166402,7 @@ function generateIr({ openApi, taskContext, options: options2, source: source2,
|
|
|
166399
166402
|
context: context3,
|
|
166400
166403
|
document: openApi
|
|
166401
166404
|
}),
|
|
166405
|
+
specVersion: openApi.info.version != null && openApi.info.version.length > 0 ? openApi.info.version : void 0,
|
|
166402
166406
|
basePath: (() => {
|
|
166403
166407
|
const parsed = getFernBasePath(openApi);
|
|
166404
166408
|
return parsed?.basePath;
|
|
@@ -166633,6 +166637,7 @@ var init_generateIr = __esm({
|
|
|
166633
166637
|
function parse8({ context: context3, documents, options: options2 }) {
|
|
166634
166638
|
let ir3 = {
|
|
166635
166639
|
apiVersion: void 0,
|
|
166640
|
+
specVersion: void 0,
|
|
166636
166641
|
title: void 0,
|
|
166637
166642
|
description: void 0,
|
|
166638
166643
|
basePath: void 0,
|
|
@@ -166849,6 +166854,7 @@ function merge6(ir1, ir22, options2) {
|
|
|
166849
166854
|
if (!shouldGroupEnvironments) {
|
|
166850
166855
|
return {
|
|
166851
166856
|
apiVersion: ir1.apiVersion ?? ir22.apiVersion,
|
|
166857
|
+
specVersion: ir1.specVersion ?? ir22.specVersion,
|
|
166852
166858
|
title: ir1.title ?? ir22.title,
|
|
166853
166859
|
description: ir1.description ?? ir22.description,
|
|
166854
166860
|
basePath: ir1.basePath ?? ir22.basePath,
|
|
@@ -166980,6 +166986,7 @@ function merge6(ir1, ir22, options2) {
|
|
|
166980
166986
|
mergedEndpoints = [...ir1EndpointsWithApiTag, ...ir2EndpointsWithApiTag];
|
|
166981
166987
|
return {
|
|
166982
166988
|
apiVersion: ir1.apiVersion ?? ir22.apiVersion,
|
|
166989
|
+
specVersion: ir1.specVersion ?? ir22.specVersion,
|
|
166983
166990
|
title: ir1.title ?? ir22.title,
|
|
166984
166991
|
description: ir1.description ?? ir22.description,
|
|
166985
166992
|
basePath: ir1.basePath ?? ir22.basePath,
|
|
@@ -167033,6 +167040,7 @@ function merge6(ir1, ir22, options2) {
|
|
|
167033
167040
|
}
|
|
167034
167041
|
return {
|
|
167035
167042
|
apiVersion: ir1.apiVersion ?? ir22.apiVersion,
|
|
167043
|
+
specVersion: ir1.specVersion ?? ir22.specVersion,
|
|
167036
167044
|
title: ir1.title ?? ir22.title,
|
|
167037
167045
|
description: ir1.description ?? ir22.description,
|
|
167038
167046
|
basePath: ir1.basePath ?? ir22.basePath,
|
|
@@ -266375,6 +266383,7 @@ function mergeIntermediateRepresentation(ir1, ir22, casingsGenerator) {
|
|
|
266375
266383
|
apiName: ir1.apiName,
|
|
266376
266384
|
basePath: ir1.basePath,
|
|
266377
266385
|
selfHosted: ir1.selfHosted && ir22.selfHosted,
|
|
266386
|
+
specVersion: ir1.specVersion ?? ir22.specVersion,
|
|
266378
266387
|
apiDisplayName: ir1.apiDisplayName ?? ir22.apiDisplayName,
|
|
266379
266388
|
apiDocs: ir1.apiDocs ?? ir22.apiDocs,
|
|
266380
266389
|
auth: {
|
|
@@ -275614,6 +275623,7 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
275614
275623
|
file: rootApiFileContext,
|
|
275615
275624
|
rawApiFileSchema: workspace.definition.rootApiFile.contents
|
|
275616
275625
|
}),
|
|
275626
|
+
specVersion: workspace.definition.specVersion,
|
|
275617
275627
|
apiName: casingsGenerator.generateName(workspace.definition.rootApiFile.contents.name),
|
|
275618
275628
|
apiDisplayName: workspace.definition.rootApiFile.contents["display-name"],
|
|
275619
275629
|
apiDocs: formatDocs(workspace.definition.rootApiFile.contents.docs),
|
|
@@ -341170,7 +341180,8 @@ var init_AbstractSpecConverter = __esm({
|
|
|
341170
341180
|
audiences: void 0,
|
|
341171
341181
|
generationMetadata: void 0,
|
|
341172
341182
|
apiPlayground: void 0,
|
|
341173
|
-
casingsConfig: void 0
|
|
341183
|
+
casingsConfig: void 0,
|
|
341184
|
+
specVersion: void 0
|
|
341174
341185
|
};
|
|
341175
341186
|
}
|
|
341176
341187
|
removeXFernIgnores({ document: document4, breadcrumbs = [] }) {
|
|
@@ -686370,7 +686381,7 @@ var AccessTokenPosthogManager = class {
|
|
|
686370
686381
|
properties: {
|
|
686371
686382
|
...event,
|
|
686372
686383
|
...event.properties,
|
|
686373
|
-
version: "5.
|
|
686384
|
+
version: "5.51.0",
|
|
686374
686385
|
usingAccessToken: true,
|
|
686375
686386
|
...getRunIdProperties()
|
|
686376
686387
|
}
|
|
@@ -686436,7 +686447,7 @@ var UserPosthogManager = class {
|
|
|
686436
686447
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
686437
686448
|
event: "CLI",
|
|
686438
686449
|
properties: {
|
|
686439
|
-
version: "5.
|
|
686450
|
+
version: "5.51.0",
|
|
686440
686451
|
...event,
|
|
686441
686452
|
...event.properties,
|
|
686442
686453
|
usingAccessToken: false,
|
|
@@ -867498,7 +867509,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
867498
867509
|
var LOGS_FOLDER_NAME = "logs";
|
|
867499
867510
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
867500
867511
|
function getCliSource() {
|
|
867501
|
-
const version7 = "5.
|
|
867512
|
+
const version7 = "5.51.0";
|
|
867502
867513
|
return `cli@${version7}`;
|
|
867503
867514
|
}
|
|
867504
867515
|
var DebugLogger = class {
|
|
@@ -897837,7 +897848,7 @@ function mapIntegrations(integrations) {
|
|
|
897837
897848
|
intercom: integrations.intercom
|
|
897838
897849
|
};
|
|
897839
897850
|
}
|
|
897840
|
-
function mapDocsConfigToLedgerConfig({ docsConfig, fileManifest, fileIdToPath }) {
|
|
897851
|
+
function mapDocsConfigToLedgerConfig({ docsConfig, fileManifest, fileIdToPath, editThisPage }) {
|
|
897841
897852
|
return {
|
|
897842
897853
|
title: docsConfig.title,
|
|
897843
897854
|
defaultLanguage: docsConfig.defaultLanguage,
|
|
@@ -897863,6 +897874,12 @@ function mapDocsConfigToLedgerConfig({ docsConfig, fileManifest, fileIdToPath })
|
|
|
897863
897874
|
aiChatConfig: docsConfig.aiChatConfig,
|
|
897864
897875
|
pageActions: docsConfig.pageActions,
|
|
897865
897876
|
editThisPageLaunch: docsConfig.editThisPageLaunch,
|
|
897877
|
+
editThisPageGithub: editThisPage?.github != null ? {
|
|
897878
|
+
owner: editThisPage.github.owner,
|
|
897879
|
+
repo: editThisPage.github.repo,
|
|
897880
|
+
branch: editThisPage.github.branch ?? "main",
|
|
897881
|
+
host: editThisPage.github.host ?? "https://github.com"
|
|
897882
|
+
} : void 0,
|
|
897866
897883
|
integrations: mapIntegrations(docsConfig.integrations),
|
|
897867
897884
|
header: docsConfig.header,
|
|
897868
897885
|
footer: docsConfig.footer
|
|
@@ -897935,7 +897952,7 @@ function jsonBlobRef(value2) {
|
|
|
897935
897952
|
buf
|
|
897936
897953
|
};
|
|
897937
897954
|
}
|
|
897938
|
-
function buildLedgerInput({ docsDefinition, git, apiDefinitions, fileManifest, fileIdToPath, locale = "en" }) {
|
|
897955
|
+
function buildLedgerInput({ docsDefinition, git, apiDefinitions, fileManifest, fileIdToPath, editThisPage, locale = "en" }) {
|
|
897939
897956
|
const blobs = /* @__PURE__ */ new Map();
|
|
897940
897957
|
const pages = {};
|
|
897941
897958
|
for (const [pageId, page] of Object.entries(docsDefinition.pages)) {
|
|
@@ -897957,7 +897974,8 @@ function buildLedgerInput({ docsDefinition, git, apiDefinitions, fileManifest, f
|
|
|
897957
897974
|
const ledgerConfig = mapDocsConfigToLedgerConfig({
|
|
897958
897975
|
docsConfig: docsDefinition.config,
|
|
897959
897976
|
fileManifest,
|
|
897960
|
-
fileIdToPath
|
|
897977
|
+
fileIdToPath,
|
|
897978
|
+
editThisPage
|
|
897961
897979
|
});
|
|
897962
897980
|
let apiManifestRef = null;
|
|
897963
897981
|
if (apiDefinitions.size > 0) {
|
|
@@ -897985,13 +898003,14 @@ function buildLedgerInput({ docsDefinition, git, apiDefinitions, fileManifest, f
|
|
|
897985
898003
|
};
|
|
897986
898004
|
return { localeEntry, blobs };
|
|
897987
898005
|
}
|
|
897988
|
-
async function publishDocsViaLedger({ docsDefinition, organization, domain: domain3, basepath, previewId, customDomains, git, token, fdrOrigin, headers: headers2, context: context3, apiDefinitions, fileManifest, filePaths, fileIdToPath, resolver: resolver2 }) {
|
|
898006
|
+
async function publishDocsViaLedger({ docsDefinition, organization, domain: domain3, basepath, previewId, customDomains, git, token, fdrOrigin, headers: headers2, context: context3, apiDefinitions, fileManifest, filePaths, fileIdToPath, editThisPage, resolver: resolver2 }) {
|
|
897989
898007
|
const { localeEntry: baseLocale, blobs } = buildLedgerInput({
|
|
897990
898008
|
docsDefinition,
|
|
897991
898009
|
git,
|
|
897992
898010
|
apiDefinitions,
|
|
897993
898011
|
fileManifest,
|
|
897994
|
-
fileIdToPath
|
|
898012
|
+
fileIdToPath,
|
|
898013
|
+
editThisPage
|
|
897995
898014
|
});
|
|
897996
898015
|
const builtTranslations = await buildAllTranslationInputs({
|
|
897997
898016
|
docsDefinition,
|
|
@@ -897999,6 +898018,7 @@ async function publishDocsViaLedger({ docsDefinition, organization, domain: doma
|
|
|
897999
898018
|
apiDefinitions,
|
|
898000
898019
|
fileManifest,
|
|
898001
898020
|
fileIdToPath,
|
|
898021
|
+
editThisPage,
|
|
898002
898022
|
resolver: resolver2,
|
|
898003
898023
|
context: context3
|
|
898004
898024
|
});
|
|
@@ -898138,7 +898158,7 @@ function buildLocaleApiDefinitions({ baseApiDefinitions, translatedSpecs, contex
|
|
|
898138
898158
|
}
|
|
898139
898159
|
return localeApiDefs;
|
|
898140
898160
|
}
|
|
898141
|
-
async function buildAllTranslationInputs({ docsDefinition, git, apiDefinitions, fileManifest, fileIdToPath, resolver: resolver2, context: context3 }) {
|
|
898161
|
+
async function buildAllTranslationInputs({ docsDefinition, git, apiDefinitions, fileManifest, fileIdToPath, editThisPage, resolver: resolver2, context: context3 }) {
|
|
898142
898162
|
if (resolver2 == null) {
|
|
898143
898163
|
return [];
|
|
898144
898164
|
}
|
|
@@ -898199,6 +898219,7 @@ async function buildAllTranslationInputs({ docsDefinition, git, apiDefinitions,
|
|
|
898199
898219
|
apiDefinitions: localeApiDefinitions,
|
|
898200
898220
|
fileManifest,
|
|
898201
898221
|
fileIdToPath,
|
|
898222
|
+
editThisPage,
|
|
898202
898223
|
locale
|
|
898203
898224
|
});
|
|
898204
898225
|
return { locale, localePages, translatedDefinition, localeEntry, blobs };
|
|
@@ -898207,13 +898228,14 @@ async function buildAllTranslationInputs({ docsDefinition, git, apiDefinitions,
|
|
|
898207
898228
|
|
|
898208
898229
|
// ../generation/remote-generation/remote-workspace-runner/lib/publishDocsLedgerPreview.js
|
|
898209
898230
|
init_orpc_client();
|
|
898210
|
-
async function publishDocsViaLedgerPreview({ docsDefinition, organization, basePath, previewId, git, token, fdrOrigin, headers: headers2, context: context3, apiDefinitions, fileManifest, filePaths, fileIdToPath, resolver: resolver2 }) {
|
|
898231
|
+
async function publishDocsViaLedgerPreview({ docsDefinition, organization, basePath, previewId, git, token, fdrOrigin, headers: headers2, context: context3, apiDefinitions, fileManifest, filePaths, fileIdToPath, editThisPage, resolver: resolver2 }) {
|
|
898211
898232
|
const { localeEntry: baseLocale, blobs } = buildLedgerInput({
|
|
898212
898233
|
docsDefinition,
|
|
898213
898234
|
git,
|
|
898214
898235
|
apiDefinitions,
|
|
898215
898236
|
fileManifest,
|
|
898216
|
-
fileIdToPath
|
|
898237
|
+
fileIdToPath,
|
|
898238
|
+
editThisPage
|
|
898217
898239
|
});
|
|
898218
898240
|
const builtTranslations = await buildAllTranslationInputs({
|
|
898219
898241
|
docsDefinition,
|
|
@@ -898221,6 +898243,7 @@ async function publishDocsViaLedgerPreview({ docsDefinition, organization, baseP
|
|
|
898221
898243
|
apiDefinitions,
|
|
898222
898244
|
fileManifest,
|
|
898223
898245
|
fileIdToPath,
|
|
898246
|
+
editThisPage,
|
|
898224
898247
|
resolver: resolver2,
|
|
898225
898248
|
context: context3
|
|
898226
898249
|
});
|
|
@@ -898749,6 +898772,7 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
898749
898772
|
fileManifest: Object.keys(ledgerFileManifest).length > 0 ? ledgerFileManifest : void 0,
|
|
898750
898773
|
filePaths: ledgerFilePaths.size > 0 ? ledgerFilePaths : void 0,
|
|
898751
898774
|
fileIdToPath: ledgerFileIdToPath.size > 0 ? ledgerFileIdToPath : void 0,
|
|
898775
|
+
editThisPage,
|
|
898752
898776
|
resolver: resolver2
|
|
898753
898777
|
});
|
|
898754
898778
|
if (deployMode === "ledger") {
|
|
@@ -898772,6 +898796,7 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
898772
898796
|
fileManifest: Object.keys(ledgerFileManifest).length > 0 ? ledgerFileManifest : void 0,
|
|
898773
898797
|
filePaths: ledgerFilePaths.size > 0 ? ledgerFilePaths : void 0,
|
|
898774
898798
|
fileIdToPath: ledgerFileIdToPath.size > 0 ? ledgerFileIdToPath : void 0,
|
|
898799
|
+
editThisPage,
|
|
898775
898800
|
resolver: resolver2
|
|
898776
898801
|
});
|
|
898777
898802
|
context3.logger.info(`[ledger] Deployment ${ledgerResult.reusedDeployment ? "reused" : "created"}: ${ledgerResult.deploymentId}`);
|
|
@@ -899672,7 +899697,7 @@ var LegacyDocsPublisher = class {
|
|
|
899672
899697
|
previewId,
|
|
899673
899698
|
disableTemplates: void 0,
|
|
899674
899699
|
skipUpload,
|
|
899675
|
-
cliVersion: "5.
|
|
899700
|
+
cliVersion: "5.51.0",
|
|
899676
899701
|
loginCommand: "fern auth login"
|
|
899677
899702
|
});
|
|
899678
899703
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -965807,7 +965832,7 @@ function getAutomationContextFromEnv() {
|
|
|
965807
965832
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
965808
965833
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
965809
965834
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
965810
|
-
cli_version: "5.
|
|
965835
|
+
cli_version: "5.51.0"
|
|
965811
965836
|
};
|
|
965812
965837
|
}
|
|
965813
965838
|
function isAutomationMode() {
|
|
@@ -966639,7 +966664,7 @@ var CliContext = class _CliContext {
|
|
|
966639
966664
|
if (false) {
|
|
966640
966665
|
this.logger.error("CLI_VERSION is not defined");
|
|
966641
966666
|
}
|
|
966642
|
-
return "5.
|
|
966667
|
+
return "5.51.0";
|
|
966643
966668
|
}
|
|
966644
966669
|
getCliName() {
|
|
966645
966670
|
if (false) {
|
package/package.json
CHANGED