@fern-api/fern-api-dev 3.57.1 → 3.59.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 +159 -40
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1435488,9 +1435488,47 @@ var ApiSpecSchema = external_exports.union([
|
|
|
1435488
1435488
|
OpenRpcSpecSchema
|
|
1435489
1435489
|
]);
|
|
1435490
1435490
|
|
|
1435491
|
+
// ../config/lib/schemas/AuthSchemesSchema.js
|
|
1435492
|
+
var AuthSchemesSchema = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
1435493
|
+
|
|
1435494
|
+
// ../config/lib/schemas/MultipleBaseUrlEnvironmentSchema.js
|
|
1435495
|
+
var MultipleBaseUrlsEnvironmentSchema = external_exports.object({
|
|
1435496
|
+
urls: external_exports.record(external_exports.string(), external_exports.string()),
|
|
1435497
|
+
docs: external_exports.string().optional()
|
|
1435498
|
+
});
|
|
1435499
|
+
|
|
1435500
|
+
// ../config/lib/schemas/SingleBaseUrlEnvironmentSchema.js
|
|
1435501
|
+
var SingleBaseUrlEnvironmentSchema = external_exports.object({
|
|
1435502
|
+
url: external_exports.string(),
|
|
1435503
|
+
docs: external_exports.string().optional()
|
|
1435504
|
+
});
|
|
1435505
|
+
|
|
1435506
|
+
// ../config/lib/schemas/EnvironmentSchema.js
|
|
1435507
|
+
var EnvironmentSchema = external_exports.union([
|
|
1435508
|
+
external_exports.string(),
|
|
1435509
|
+
SingleBaseUrlEnvironmentSchema,
|
|
1435510
|
+
MultipleBaseUrlsEnvironmentSchema
|
|
1435511
|
+
]);
|
|
1435512
|
+
|
|
1435513
|
+
// ../config/lib/schemas/HeaderConfigSchema.js
|
|
1435514
|
+
var HeaderConfigSchema = external_exports.object({
|
|
1435515
|
+
name: external_exports.string().optional(),
|
|
1435516
|
+
env: external_exports.string().optional(),
|
|
1435517
|
+
docs: external_exports.string().optional()
|
|
1435518
|
+
});
|
|
1435519
|
+
|
|
1435520
|
+
// ../config/lib/schemas/HeaderSchema.js
|
|
1435521
|
+
var HeaderSchema = external_exports.union([external_exports.string(), HeaderConfigSchema]);
|
|
1435522
|
+
|
|
1435491
1435523
|
// ../config/lib/schemas/ApiDefinitionSchema.js
|
|
1435492
1435524
|
var ApiDefinitionSchema = external_exports.object({
|
|
1435493
|
-
specs: external_exports.array(ApiSpecSchema)
|
|
1435525
|
+
specs: external_exports.array(ApiSpecSchema),
|
|
1435526
|
+
auth: external_exports.string().optional(),
|
|
1435527
|
+
defaultUrl: external_exports.string().optional(),
|
|
1435528
|
+
defaultEnvironment: external_exports.string().optional(),
|
|
1435529
|
+
environments: external_exports.record(external_exports.string(), EnvironmentSchema).optional(),
|
|
1435530
|
+
headers: external_exports.record(external_exports.string(), HeaderSchema).optional(),
|
|
1435531
|
+
authSchemes: AuthSchemesSchema.optional()
|
|
1435494
1435532
|
});
|
|
1435495
1435533
|
|
|
1435496
1435534
|
// ../config/lib/schemas/ApisSchema.js
|
|
@@ -1436849,8 +1436887,17 @@ var ApiDefinitionConverter = class {
|
|
|
1436849
1436887
|
specs: api.specs,
|
|
1436850
1436888
|
sourced: sourcedApi.specs
|
|
1436851
1436889
|
});
|
|
1436890
|
+
const apiDefinition = {
|
|
1436891
|
+
specs,
|
|
1436892
|
+
auth: api.auth,
|
|
1436893
|
+
authSchemes: api.authSchemes,
|
|
1436894
|
+
defaultUrl: api.defaultUrl,
|
|
1436895
|
+
defaultEnvironment: api.defaultEnvironment,
|
|
1436896
|
+
environments: api.environments,
|
|
1436897
|
+
headers: api.headers
|
|
1436898
|
+
};
|
|
1436852
1436899
|
return {
|
|
1436853
|
-
[DEFAULT_API_NAME]:
|
|
1436900
|
+
[DEFAULT_API_NAME]: apiDefinition
|
|
1436854
1436901
|
};
|
|
1436855
1436902
|
}
|
|
1436856
1436903
|
async convertApis({ absoluteFernYmlPath, apis, sourcedApis }) {
|
|
@@ -1436868,7 +1436915,15 @@ var ApiDefinitionConverter = class {
|
|
|
1436868
1436915
|
specs: apiDef.specs,
|
|
1436869
1436916
|
sourced: sourcedApiDef.specs
|
|
1436870
1436917
|
});
|
|
1436871
|
-
result[apiName] = {
|
|
1436918
|
+
result[apiName] = {
|
|
1436919
|
+
specs,
|
|
1436920
|
+
auth: apiDef.auth,
|
|
1436921
|
+
authSchemes: apiDef.authSchemes,
|
|
1436922
|
+
defaultUrl: apiDef.defaultUrl,
|
|
1436923
|
+
defaultEnvironment: apiDef.defaultEnvironment,
|
|
1436924
|
+
environments: apiDef.environments,
|
|
1436925
|
+
headers: apiDef.headers
|
|
1436926
|
+
};
|
|
1436872
1436927
|
}
|
|
1436873
1436928
|
return result;
|
|
1436874
1436929
|
}
|
|
@@ -1437971,7 +1438026,7 @@ __export(serialization_exports2, {
|
|
|
1437971
1438026
|
EnumSchema: () => EnumSchema,
|
|
1437972
1438027
|
EnumValue: () => EnumValue,
|
|
1437973
1438028
|
EnumValueSchema: () => EnumValueSchema,
|
|
1437974
|
-
EnvironmentSchema: () =>
|
|
1438029
|
+
EnvironmentSchema: () => EnvironmentSchema2,
|
|
1437975
1438030
|
ErrorDeclarationSchema: () => ErrorDeclarationSchema,
|
|
1437976
1438031
|
ErrorDiscriminationSchema: () => ErrorDiscriminationSchema,
|
|
1437977
1438032
|
ExampleBodyResponseSchema: () => ExampleBodyResponseSchema,
|
|
@@ -1438021,7 +1438076,7 @@ __export(serialization_exports2, {
|
|
|
1438021
1438076
|
InferredGetTokenEndpointSchemaObject: () => InferredGetTokenEndpointSchemaObject,
|
|
1438022
1438077
|
ListValidationSchema: () => ListValidationSchema,
|
|
1438023
1438078
|
MapValidationSchema: () => MapValidationSchema,
|
|
1438024
|
-
MultipleBaseUrlsEnvironmentSchema: () =>
|
|
1438079
|
+
MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema2,
|
|
1438025
1438080
|
Navigation: () => Navigation,
|
|
1438026
1438081
|
NumberValidationSchema: () => NumberValidationSchema,
|
|
1438027
1438082
|
OAuthAccessTokenRequestPropertiesSchema: () => OAuthAccessTokenRequestPropertiesSchema,
|
|
@@ -1438057,7 +1438112,7 @@ __export(serialization_exports2, {
|
|
|
1438057
1438112
|
RetriesDisabledSchema: () => RetriesDisabledSchema,
|
|
1438058
1438113
|
RootApiFileSchema: () => RootApiFileSchema,
|
|
1438059
1438114
|
ServiceTransport: () => ServiceTransport,
|
|
1438060
|
-
SingleBaseUrlEnvironmentSchema: () =>
|
|
1438115
|
+
SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema2,
|
|
1438061
1438116
|
SingleUndiscriminatedUnionTypeDetailedSchema: () => SingleUndiscriminatedUnionTypeDetailedSchema,
|
|
1438062
1438117
|
SingleUndiscriminatedUnionTypeSchema: () => SingleUndiscriminatedUnionTypeSchema,
|
|
1438063
1438118
|
SingleUnionTypeDetailedSchema: () => SingleUnionTypeDetailedSchema,
|
|
@@ -1439817,34 +1439872,34 @@ var EncodingSchema = schemas_exports5.object({
|
|
|
1439817
1439872
|
// ../fern-definition/schema/lib/schemas/serialization/resources/environments/index.js
|
|
1439818
1439873
|
var environments_exports3 = {};
|
|
1439819
1439874
|
__export(environments_exports3, {
|
|
1439820
|
-
EnvironmentSchema: () =>
|
|
1439821
|
-
MultipleBaseUrlsEnvironmentSchema: () =>
|
|
1439822
|
-
SingleBaseUrlEnvironmentSchema: () =>
|
|
1439875
|
+
EnvironmentSchema: () => EnvironmentSchema2,
|
|
1439876
|
+
MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema2,
|
|
1439877
|
+
SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema2,
|
|
1439823
1439878
|
WithEnvironmentsSchema: () => WithEnvironmentsSchema
|
|
1439824
1439879
|
});
|
|
1439825
1439880
|
|
|
1439826
1439881
|
// ../fern-definition/schema/lib/schemas/serialization/resources/environments/types/MultipleBaseUrlsEnvironmentSchema.js
|
|
1439827
|
-
var
|
|
1439882
|
+
var MultipleBaseUrlsEnvironmentSchema2 = schemas_exports5.object({
|
|
1439828
1439883
|
urls: schemas_exports5.record(schemas_exports5.string(), schemas_exports5.string())
|
|
1439829
1439884
|
}).extend(WithAudiences).extend(WithDocsSchema);
|
|
1439830
1439885
|
|
|
1439831
1439886
|
// ../fern-definition/schema/lib/schemas/serialization/resources/environments/types/SingleBaseUrlEnvironmentSchema.js
|
|
1439832
|
-
var
|
|
1439887
|
+
var SingleBaseUrlEnvironmentSchema2 = schemas_exports5.object({
|
|
1439833
1439888
|
url: schemas_exports5.string()
|
|
1439834
1439889
|
}).extend(WithAudiences).extend(WithDocsSchema);
|
|
1439835
1439890
|
|
|
1439836
1439891
|
// ../fern-definition/schema/lib/schemas/serialization/resources/environments/types/EnvironmentSchema.js
|
|
1439837
|
-
var
|
|
1439892
|
+
var EnvironmentSchema2 = schemas_exports5.undiscriminatedUnion([
|
|
1439838
1439893
|
schemas_exports5.string(),
|
|
1439839
|
-
|
|
1439840
|
-
|
|
1439894
|
+
SingleBaseUrlEnvironmentSchema2,
|
|
1439895
|
+
MultipleBaseUrlsEnvironmentSchema2
|
|
1439841
1439896
|
]);
|
|
1439842
1439897
|
|
|
1439843
1439898
|
// ../fern-definition/schema/lib/schemas/serialization/resources/environments/types/WithEnvironmentsSchema.js
|
|
1439844
1439899
|
var WithEnvironmentsSchema = schemas_exports5.object({
|
|
1439845
1439900
|
"default-url": schemas_exports5.string().optional(),
|
|
1439846
1439901
|
"default-environment": schemas_exports5.string().optional(),
|
|
1439847
|
-
environments: schemas_exports5.record(schemas_exports5.string(),
|
|
1439902
|
+
environments: schemas_exports5.record(schemas_exports5.string(), EnvironmentSchema2).optional()
|
|
1439848
1439903
|
});
|
|
1439849
1439904
|
|
|
1439850
1439905
|
// ../fern-definition/schema/lib/schemas/serialization/resources/errors/index.js
|
|
@@ -1469780,7 +1469835,7 @@ __export(fernDefinition_exports2, {
|
|
|
1469780
1469835
|
EncodingSchema: () => EncodingSchema2,
|
|
1469781
1469836
|
EndpointSecuritySchema: () => EndpointSecuritySchema2,
|
|
1469782
1469837
|
EndpointSecuritySchemaDetails: () => EndpointSecuritySchemaDetails2,
|
|
1469783
|
-
EnvironmentSchema: () =>
|
|
1469838
|
+
EnvironmentSchema: () => EnvironmentSchema3,
|
|
1469784
1469839
|
HeaderAuthSchemeSchema: () => HeaderAuthSchemeSchema2,
|
|
1469785
1469840
|
HttpHeaderSchema: () => HttpHeaderSchema2,
|
|
1469786
1469841
|
InferredAuthenticatedRequestHeader: () => InferredAuthenticatedRequestHeader3,
|
|
@@ -1469789,7 +1469844,7 @@ __export(fernDefinition_exports2, {
|
|
|
1469789
1469844
|
InferredGetTokenEndpointSchemaObject: () => InferredGetTokenEndpointSchemaObject2,
|
|
1469790
1469845
|
ListValidationSchema: () => ListValidationSchema2,
|
|
1469791
1469846
|
MapValidationSchema: () => MapValidationSchema2,
|
|
1469792
|
-
MultipleBaseUrlsEnvironmentSchema: () =>
|
|
1469847
|
+
MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema3,
|
|
1469793
1469848
|
NumberValidationSchema: () => NumberValidationSchema2,
|
|
1469794
1469849
|
OAuthAccessTokenRequestPropertiesSchema: () => OAuthAccessTokenRequestPropertiesSchema2,
|
|
1469795
1469850
|
OAuthAccessTokenResponsePropertiesSchema: () => OAuthAccessTokenResponsePropertiesSchema2,
|
|
@@ -1469799,7 +1469854,7 @@ __export(fernDefinition_exports2, {
|
|
|
1469799
1469854
|
OAuthRefreshTokenResponsePropertiesSchema: () => OAuthRefreshTokenResponsePropertiesSchema2,
|
|
1469800
1469855
|
OAuthSchemeSchema: () => OAuthSchemeSchema2,
|
|
1469801
1469856
|
ProtobufTypeSchema: () => ProtobufTypeSchema2,
|
|
1469802
|
-
SingleBaseUrlEnvironmentSchema: () =>
|
|
1469857
|
+
SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema3,
|
|
1469803
1469858
|
StringValidationSchema: () => StringValidationSchema2,
|
|
1469804
1469859
|
TokenBearerAuthSchema: () => TokenBearerAuthSchema2,
|
|
1469805
1469860
|
TypeReferenceDeclarationWithEnvOverride: () => TypeReferenceDeclarationWithEnvOverride2,
|
|
@@ -1470072,34 +1470127,34 @@ var EncodingSchema2 = schemas_exports10.object({
|
|
|
1470072
1470127
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/environments/index.js
|
|
1470073
1470128
|
var environments_exports5 = {};
|
|
1470074
1470129
|
__export(environments_exports5, {
|
|
1470075
|
-
EnvironmentSchema: () =>
|
|
1470076
|
-
MultipleBaseUrlsEnvironmentSchema: () =>
|
|
1470077
|
-
SingleBaseUrlEnvironmentSchema: () =>
|
|
1470130
|
+
EnvironmentSchema: () => EnvironmentSchema3,
|
|
1470131
|
+
MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema3,
|
|
1470132
|
+
SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema3,
|
|
1470078
1470133
|
WithEnvironmentsSchema: () => WithEnvironmentsSchema2
|
|
1470079
1470134
|
});
|
|
1470080
1470135
|
|
|
1470081
1470136
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/environments/types/MultipleBaseUrlsEnvironmentSchema.js
|
|
1470082
|
-
var
|
|
1470137
|
+
var MultipleBaseUrlsEnvironmentSchema3 = schemas_exports10.object({
|
|
1470083
1470138
|
urls: schemas_exports10.record(schemas_exports10.string(), schemas_exports10.string())
|
|
1470084
1470139
|
}).extend(WithAudiences2).extend(WithDocsSchema2);
|
|
1470085
1470140
|
|
|
1470086
1470141
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/environments/types/SingleBaseUrlEnvironmentSchema.js
|
|
1470087
|
-
var
|
|
1470142
|
+
var SingleBaseUrlEnvironmentSchema3 = schemas_exports10.object({
|
|
1470088
1470143
|
url: schemas_exports10.string()
|
|
1470089
1470144
|
}).extend(WithAudiences2).extend(WithDocsSchema2);
|
|
1470090
1470145
|
|
|
1470091
1470146
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/environments/types/EnvironmentSchema.js
|
|
1470092
|
-
var
|
|
1470147
|
+
var EnvironmentSchema3 = schemas_exports10.undiscriminatedUnion([
|
|
1470093
1470148
|
schemas_exports10.string(),
|
|
1470094
|
-
|
|
1470095
|
-
|
|
1470149
|
+
SingleBaseUrlEnvironmentSchema3,
|
|
1470150
|
+
MultipleBaseUrlsEnvironmentSchema3
|
|
1470096
1470151
|
]);
|
|
1470097
1470152
|
|
|
1470098
1470153
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/environments/types/WithEnvironmentsSchema.js
|
|
1470099
1470154
|
var WithEnvironmentsSchema2 = schemas_exports10.object({
|
|
1470100
1470155
|
"default-url": schemas_exports10.string().optional(),
|
|
1470101
1470156
|
"default-environment": schemas_exports10.string().optional(),
|
|
1470102
|
-
environments: schemas_exports10.record(schemas_exports10.string(),
|
|
1470157
|
+
environments: schemas_exports10.record(schemas_exports10.string(), EnvironmentSchema3).optional()
|
|
1470103
1470158
|
});
|
|
1470104
1470159
|
|
|
1470105
1470160
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/fernDefinition/resources/file/index.js
|
|
@@ -1659007,6 +1659062,7 @@ var DocsDefinitionResolver = class {
|
|
|
1659007
1659062
|
markdownFilesToSidebarTitle = /* @__PURE__ */ new Map();
|
|
1659008
1659063
|
markdownFilesToNoIndex = /* @__PURE__ */ new Map();
|
|
1659009
1659064
|
markdownFilesToTags = /* @__PURE__ */ new Map();
|
|
1659065
|
+
markdownFilesToAvailability = /* @__PURE__ */ new Map();
|
|
1659010
1659066
|
rawMarkdownFiles = {};
|
|
1659011
1659067
|
referencedMarkdownFiles = [];
|
|
1659012
1659068
|
async resolve() {
|
|
@@ -1659222,7 +1659278,7 @@ var DocsDefinitionResolver = class {
|
|
|
1659222
1659278
|
return relative3(this.docsWorkspace.absoluteFilePath, filepath);
|
|
1659223
1659279
|
}
|
|
1659224
1659280
|
/**
|
|
1659225
|
-
* Extracts all frontmatter data (slug, sidebar-title, noindex, tags) from pages in a single pass.
|
|
1659281
|
+
* Extracts all frontmatter data (slug, sidebar-title, noindex, tags, availability) from pages in a single pass.
|
|
1659226
1659282
|
* This is more efficient than parsing frontmatter multiple times for each field.
|
|
1659227
1659283
|
* @param pages - the pages to extract frontmatter from
|
|
1659228
1659284
|
*/
|
|
@@ -1659253,6 +1659309,38 @@ var DocsDefinitionResolver = class {
|
|
|
1659253
1659309
|
} else if (Array.isArray(tags)) {
|
|
1659254
1659310
|
this.markdownFilesToTags.set(absolutePath, tags);
|
|
1659255
1659311
|
}
|
|
1659312
|
+
const availability = frontmatter.data.availability;
|
|
1659313
|
+
if (typeof availability === "string") {
|
|
1659314
|
+
const parsedAvailability = this.parseAvailabilityFromFrontmatter(availability);
|
|
1659315
|
+
if (parsedAvailability != null) {
|
|
1659316
|
+
this.markdownFilesToAvailability.set(absolutePath, parsedAvailability);
|
|
1659317
|
+
}
|
|
1659318
|
+
}
|
|
1659319
|
+
}
|
|
1659320
|
+
}
|
|
1659321
|
+
/**
|
|
1659322
|
+
* Parses an availability string from frontmatter into the Availability enum value.
|
|
1659323
|
+
* @param value - the availability string from frontmatter
|
|
1659324
|
+
* @returns the Availability enum value, or undefined if the value is not valid
|
|
1659325
|
+
*/
|
|
1659326
|
+
parseAvailabilityFromFrontmatter(value) {
|
|
1659327
|
+
const normalizedValue = value.toLowerCase().trim();
|
|
1659328
|
+
switch (normalizedValue) {
|
|
1659329
|
+
case "stable":
|
|
1659330
|
+
return "stable";
|
|
1659331
|
+
case "generally-available":
|
|
1659332
|
+
return "generally-available";
|
|
1659333
|
+
case "in-development":
|
|
1659334
|
+
return "in-development";
|
|
1659335
|
+
case "pre-release":
|
|
1659336
|
+
return "pre-release";
|
|
1659337
|
+
case "deprecated":
|
|
1659338
|
+
return "deprecated";
|
|
1659339
|
+
case "beta":
|
|
1659340
|
+
return "beta";
|
|
1659341
|
+
default:
|
|
1659342
|
+
this.taskContext.logger.warn(`Invalid availability value "${value}" in frontmatter. Valid values are: stable, generally-available, in-development, pre-release, deprecated, beta`);
|
|
1659343
|
+
return void 0;
|
|
1659256
1659344
|
}
|
|
1659257
1659345
|
}
|
|
1659258
1659346
|
/**
|
|
@@ -1659907,6 +1659995,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1659907
1659995
|
fullSlug: this.markdownFilesToFullSlugs.get(item.absolutePath)?.split("/")
|
|
1659908
1659996
|
});
|
|
1659909
1659997
|
const id2 = this.#idgen.get(pageId);
|
|
1659998
|
+
const frontmatterAvailability = this.markdownFilesToAvailability.get(item.absolutePath);
|
|
1659910
1659999
|
return {
|
|
1659911
1660000
|
id: id2,
|
|
1659912
1660001
|
type: "page",
|
|
@@ -1659920,7 +1660009,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1659920
1660009
|
authed: void 0,
|
|
1659921
1660010
|
noindex: item.noindex || this.markdownFilesToNoIndex.get(item.absolutePath),
|
|
1659922
1660011
|
featureFlags: item.featureFlags,
|
|
1659923
|
-
availability: item.availability ?? parentAvailability
|
|
1660012
|
+
availability: frontmatterAvailability ?? item.availability ?? parentAvailability
|
|
1659924
1660013
|
};
|
|
1659925
1660014
|
}
|
|
1659926
1660015
|
async toSectionNode({ prefix: prefix2, item, parentSlug, hideChildren, parentAvailability }) {
|
|
@@ -1659933,6 +1660022,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1659933
1660022
|
skipUrlSlug: item.skipUrlSlug
|
|
1659934
1660023
|
});
|
|
1659935
1660024
|
const noindex = item.overviewAbsolutePath != null ? this.markdownFilesToNoIndex.get(item.overviewAbsolutePath) : void 0;
|
|
1660025
|
+
const frontmatterAvailability = item.overviewAbsolutePath != null ? this.markdownFilesToAvailability.get(item.overviewAbsolutePath) : void 0;
|
|
1659936
1660026
|
const hiddenSection = hideChildren || item.hidden;
|
|
1659937
1660027
|
const children2 = await Promise.all(item.contents.map((child) => this.toNavigationChild({
|
|
1659938
1660028
|
prefix: id2,
|
|
@@ -1659964,7 +1660054,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1659964
1660054
|
pointsTo: void 0,
|
|
1659965
1660055
|
noindex,
|
|
1659966
1660056
|
featureFlags: item.featureFlags,
|
|
1659967
|
-
availability: item.availability ?? parentAvailability
|
|
1660057
|
+
availability: frontmatterAvailability ?? item.availability ?? parentAvailability
|
|
1659968
1660058
|
};
|
|
1659969
1660059
|
}
|
|
1659970
1660060
|
async convertTabbedNavigation(prefix2, items, parentSlug) {
|
|
@@ -1671594,7 +1671684,7 @@ var LegacyFernWorkspaceAdapter = class {
|
|
|
1671594
1671684
|
* Supports three mutually exclusive modes:
|
|
1671595
1671685
|
* - Fern definition: Uses LazyFernWorkspace
|
|
1671596
1671686
|
* - Conjure definition: Uses ConjureWorkspace
|
|
1671597
|
-
* - OpenAPI/AsyncAPI/Protobuf: Uses OSSWorkspace (can be mixed together)
|
|
1671687
|
+
* - OpenAPI/AsyncAPI/Protobuf/OpenRPC: Uses OSSWorkspace (can be mixed together)
|
|
1671598
1671688
|
*
|
|
1671599
1671689
|
* Note: Spec combination validation is performed earlier in ApiDefinitionConverter.
|
|
1671600
1671690
|
*/
|
|
@@ -1671607,7 +1671697,7 @@ var LegacyFernWorkspaceAdapter = class {
|
|
|
1671607
1671697
|
if (conjureSpec != null) {
|
|
1671608
1671698
|
return this.adaptConjureSpec(conjureSpec);
|
|
1671609
1671699
|
}
|
|
1671610
|
-
return this.adaptOssSpecs(definition3
|
|
1671700
|
+
return this.adaptOssSpecs(definition3);
|
|
1671611
1671701
|
}
|
|
1671612
1671702
|
async adaptFernSpec(spec) {
|
|
1671613
1671703
|
const workspaceRoot = dirname4(spec.fern);
|
|
@@ -1671633,8 +1671723,8 @@ var LegacyFernWorkspaceAdapter = class {
|
|
|
1671633
1671723
|
});
|
|
1671634
1671724
|
return conjureWorkspace.toFernWorkspace({ context: this.taskContext });
|
|
1671635
1671725
|
}
|
|
1671636
|
-
async adaptOssSpecs(
|
|
1671637
|
-
const ossSpecs = specs.filter((spec) => !isFernSpec(spec) && !isConjureSpec(spec));
|
|
1671726
|
+
async adaptOssSpecs(definition3) {
|
|
1671727
|
+
const ossSpecs = definition3.specs.filter((spec) => !isFernSpec(spec) && !isConjureSpec(spec));
|
|
1671638
1671728
|
const specAdapter = new LegacyApiSpecAdapter({ context: this.context });
|
|
1671639
1671729
|
const v1Specs = specAdapter.convertAll(ossSpecs);
|
|
1671640
1671730
|
const filteredSpecs = v1Specs.filter((spec) => {
|
|
@@ -1671652,17 +1671742,46 @@ var LegacyFernWorkspaceAdapter = class {
|
|
|
1671652
1671742
|
}
|
|
1671653
1671743
|
return true;
|
|
1671654
1671744
|
});
|
|
1671745
|
+
const apiConfig = this.buildApiConfiguration(definition3);
|
|
1671655
1671746
|
const ossWorkspace = new OSSWorkspace({
|
|
1671656
1671747
|
specs: filteredSpecs,
|
|
1671657
1671748
|
allSpecs,
|
|
1671658
1671749
|
absoluteFilePath: this.context.cwd,
|
|
1671659
1671750
|
cliVersion: this.cliVersion,
|
|
1671751
|
+
generatorsConfiguration: apiConfig != null ? this.buildGeneratorsConfiguration(apiConfig) : void 0,
|
|
1671660
1671752
|
workspaceName: void 0,
|
|
1671661
|
-
generatorsConfiguration: void 0,
|
|
1671662
1671753
|
changelog: void 0
|
|
1671663
1671754
|
});
|
|
1671664
1671755
|
return ossWorkspace.toFernWorkspace({ context: this.taskContext });
|
|
1671665
1671756
|
}
|
|
1671757
|
+
buildApiConfiguration(definition3) {
|
|
1671758
|
+
if (definition3.auth == null && definition3.authSchemes == null && definition3.environments == null && definition3.headers == null && definition3.defaultUrl == null && definition3.defaultEnvironment == null) {
|
|
1671759
|
+
return void 0;
|
|
1671760
|
+
}
|
|
1671761
|
+
return {
|
|
1671762
|
+
type: "singleNamespace",
|
|
1671763
|
+
definitions: [],
|
|
1671764
|
+
auth: definition3.auth,
|
|
1671765
|
+
"auth-schemes": definition3.authSchemes,
|
|
1671766
|
+
"default-url": definition3.defaultUrl,
|
|
1671767
|
+
"default-environment": definition3.defaultEnvironment,
|
|
1671768
|
+
environments: definition3.environments,
|
|
1671769
|
+
headers: definition3.headers
|
|
1671770
|
+
};
|
|
1671771
|
+
}
|
|
1671772
|
+
buildGeneratorsConfiguration(apiConfig) {
|
|
1671773
|
+
return {
|
|
1671774
|
+
absolutePathToConfiguration: AbsoluteFilePath2.of(this.context.cwd),
|
|
1671775
|
+
api: apiConfig,
|
|
1671776
|
+
defaultGroup: void 0,
|
|
1671777
|
+
groupAliases: {},
|
|
1671778
|
+
reviewers: void 0,
|
|
1671779
|
+
groups: [],
|
|
1671780
|
+
whitelabel: void 0,
|
|
1671781
|
+
ai: void 0,
|
|
1671782
|
+
rawConfiguration: {}
|
|
1671783
|
+
};
|
|
1671784
|
+
}
|
|
1671666
1671785
|
};
|
|
1671667
1671786
|
|
|
1671668
1671787
|
// ../cli-v2/lib/sdk/adapter/LegacyGeneratorInvocationAdapter.js
|
|
@@ -1678733,7 +1678852,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1678733
1678852
|
properties: {
|
|
1678734
1678853
|
...event,
|
|
1678735
1678854
|
...event.properties,
|
|
1678736
|
-
version: "3.
|
|
1678855
|
+
version: "3.59.0",
|
|
1678737
1678856
|
usingAccessToken: true
|
|
1678738
1678857
|
}
|
|
1678739
1678858
|
});
|
|
@@ -1678783,7 +1678902,7 @@ var UserPosthogManager = class {
|
|
|
1678783
1678902
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1678784
1678903
|
event: "CLI",
|
|
1678785
1678904
|
properties: {
|
|
1678786
|
-
version: "3.
|
|
1678905
|
+
version: "3.59.0",
|
|
1678787
1678906
|
...event,
|
|
1678788
1678907
|
...event.properties,
|
|
1678789
1678908
|
usingAccessToken: false,
|
|
@@ -1710705,7 +1710824,7 @@ var CliContext = class {
|
|
|
1710705
1710824
|
if (false) {
|
|
1710706
1710825
|
this.logger.error("CLI_VERSION is not defined");
|
|
1710707
1710826
|
}
|
|
1710708
|
-
return "3.
|
|
1710827
|
+
return "3.59.0";
|
|
1710709
1710828
|
}
|
|
1710710
1710829
|
getCliName() {
|
|
1710711
1710830
|
if (false) {
|
|
@@ -1713819,7 +1713938,7 @@ var import_path56 = __toESM(require("path"), 1);
|
|
|
1713819
1713938
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1713820
1713939
|
var LOGS_FOLDER_NAME = "logs";
|
|
1713821
1713940
|
function getCliSource() {
|
|
1713822
|
-
const version7 = "3.
|
|
1713941
|
+
const version7 = "3.59.0";
|
|
1713823
1713942
|
return `cli@${version7}`;
|
|
1713824
1713943
|
}
|
|
1713825
1713944
|
var DebugLogger = class {
|
|
@@ -1741264,7 +1741383,7 @@ async function runCli() {
|
|
|
1741264
1741383
|
await exit3();
|
|
1741265
1741384
|
}
|
|
1741266
1741385
|
async function tryRunCli(cliContext) {
|
|
1741267
|
-
const cli = yargs_default2(hideBin(process.argv)).scriptName(cliContext.environment.cliName).version(false).fail((message, error49, argv) => {
|
|
1741386
|
+
const cli = yargs_default2(hideBin(process.argv)).scriptName(cliContext.environment.cliName).version(false).completion("completion", "Generate shell completion script").fail((message, error49, argv) => {
|
|
1741268
1741387
|
if (error49 == null) {
|
|
1741269
1741388
|
argv.showHelp();
|
|
1741270
1741389
|
cliContext.logger.error(message);
|
package/package.json
CHANGED