@fern-api/fern-api-dev 5.101.1 → 5.102.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 +322 -93
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -265878,82 +265878,6 @@ var init_convertEnvironments = __esm({
|
|
|
265878
265878
|
}
|
|
265879
265879
|
});
|
|
265880
265880
|
|
|
265881
|
-
// ../../commons/ir-utils/lib/hashJSON.js
|
|
265882
|
-
function hashJSON(obj) {
|
|
265883
|
-
let hash5 = 2166136261;
|
|
265884
|
-
function feedChar(char) {
|
|
265885
|
-
hash5 ^= char;
|
|
265886
|
-
hash5 += (hash5 << 1) + (hash5 << 4) + (hash5 << 7) + (hash5 << 8) + (hash5 << 24);
|
|
265887
|
-
hash5 >>>= 0;
|
|
265888
|
-
}
|
|
265889
|
-
function feedString(str2) {
|
|
265890
|
-
for (let i5 = 0, len = str2.length; i5 < len; i5++) {
|
|
265891
|
-
feedChar(str2.charCodeAt(i5));
|
|
265892
|
-
}
|
|
265893
|
-
}
|
|
265894
|
-
function traverse(value2, currentDepth) {
|
|
265895
|
-
if (typeof value2 === "object" && value2 != null) {
|
|
265896
|
-
if (currentDepth > MAX_DEPTH) {
|
|
265897
|
-
feedString("[MaxDepthExceeded]");
|
|
265898
|
-
return;
|
|
265899
|
-
}
|
|
265900
|
-
if (Array.isArray(value2)) {
|
|
265901
|
-
feedChar(91);
|
|
265902
|
-
for (let i5 = 0; i5 < value2.length; i5++) {
|
|
265903
|
-
if (i5 > 0) {
|
|
265904
|
-
feedChar(44);
|
|
265905
|
-
}
|
|
265906
|
-
traverse(value2[i5], currentDepth + 1);
|
|
265907
|
-
}
|
|
265908
|
-
feedChar(93);
|
|
265909
|
-
} else {
|
|
265910
|
-
feedChar(123);
|
|
265911
|
-
const keys25 = Object.keys(value2).sort();
|
|
265912
|
-
const klen = keys25.length;
|
|
265913
|
-
for (let i5 = 0; i5 < klen; i5++) {
|
|
265914
|
-
if (i5 > 0) {
|
|
265915
|
-
feedChar(44);
|
|
265916
|
-
}
|
|
265917
|
-
feedString(keys25[i5] ?? "");
|
|
265918
|
-
feedChar(58);
|
|
265919
|
-
traverse(value2[keys25[i5] ?? ""], currentDepth + 1);
|
|
265920
|
-
}
|
|
265921
|
-
feedChar(125);
|
|
265922
|
-
}
|
|
265923
|
-
} else {
|
|
265924
|
-
feedString(String(value2));
|
|
265925
|
-
}
|
|
265926
|
-
}
|
|
265927
|
-
traverse(obj, 0);
|
|
265928
|
-
return hash5.toString(16);
|
|
265929
|
-
}
|
|
265930
|
-
var MAX_DEPTH;
|
|
265931
|
-
var init_hashJSON = __esm({
|
|
265932
|
-
"../../commons/ir-utils/lib/hashJSON.js"() {
|
|
265933
|
-
"use strict";
|
|
265934
|
-
MAX_DEPTH = 64;
|
|
265935
|
-
}
|
|
265936
|
-
});
|
|
265937
|
-
|
|
265938
|
-
// ../../commons/ir-utils/lib/utils/isTypeReferenceOptional.js
|
|
265939
|
-
function isTypeReferenceOptional({ typeReference: typeReference2, typeDeclarations }) {
|
|
265940
|
-
if (typeReference2.type === "container" && typeReference2.container.type === "optional") {
|
|
265941
|
-
return true;
|
|
265942
|
-
}
|
|
265943
|
-
if (typeReference2.type === "named") {
|
|
265944
|
-
const typeDeclaration2 = typeDeclarations?.[typeReference2.typeId];
|
|
265945
|
-
if (typeDeclaration2?.shape.type === "alias" && typeDeclaration2?.shape.resolvedType.type === "container" && typeDeclaration2?.shape.resolvedType.container.type === "optional") {
|
|
265946
|
-
return true;
|
|
265947
|
-
}
|
|
265948
|
-
}
|
|
265949
|
-
return false;
|
|
265950
|
-
}
|
|
265951
|
-
var init_isTypeReferenceOptional = __esm({
|
|
265952
|
-
"../../commons/ir-utils/lib/utils/isTypeReferenceOptional.js"() {
|
|
265953
|
-
"use strict";
|
|
265954
|
-
}
|
|
265955
|
-
});
|
|
265956
|
-
|
|
265957
265881
|
// ../../commons/casings-generator/lib/reserved.js
|
|
265958
265882
|
var RESERVED_KEYWORDS;
|
|
265959
265883
|
var init_reserved = __esm({
|
|
@@ -266849,6 +266773,82 @@ var init_namesUtils = __esm({
|
|
|
266849
266773
|
}
|
|
266850
266774
|
});
|
|
266851
266775
|
|
|
266776
|
+
// ../../commons/ir-utils/lib/hashJSON.js
|
|
266777
|
+
function hashJSON(obj) {
|
|
266778
|
+
let hash5 = 2166136261;
|
|
266779
|
+
function feedChar(char) {
|
|
266780
|
+
hash5 ^= char;
|
|
266781
|
+
hash5 += (hash5 << 1) + (hash5 << 4) + (hash5 << 7) + (hash5 << 8) + (hash5 << 24);
|
|
266782
|
+
hash5 >>>= 0;
|
|
266783
|
+
}
|
|
266784
|
+
function feedString(str2) {
|
|
266785
|
+
for (let i5 = 0, len = str2.length; i5 < len; i5++) {
|
|
266786
|
+
feedChar(str2.charCodeAt(i5));
|
|
266787
|
+
}
|
|
266788
|
+
}
|
|
266789
|
+
function traverse(value2, currentDepth) {
|
|
266790
|
+
if (typeof value2 === "object" && value2 != null) {
|
|
266791
|
+
if (currentDepth > MAX_DEPTH) {
|
|
266792
|
+
feedString("[MaxDepthExceeded]");
|
|
266793
|
+
return;
|
|
266794
|
+
}
|
|
266795
|
+
if (Array.isArray(value2)) {
|
|
266796
|
+
feedChar(91);
|
|
266797
|
+
for (let i5 = 0; i5 < value2.length; i5++) {
|
|
266798
|
+
if (i5 > 0) {
|
|
266799
|
+
feedChar(44);
|
|
266800
|
+
}
|
|
266801
|
+
traverse(value2[i5], currentDepth + 1);
|
|
266802
|
+
}
|
|
266803
|
+
feedChar(93);
|
|
266804
|
+
} else {
|
|
266805
|
+
feedChar(123);
|
|
266806
|
+
const keys25 = Object.keys(value2).sort();
|
|
266807
|
+
const klen = keys25.length;
|
|
266808
|
+
for (let i5 = 0; i5 < klen; i5++) {
|
|
266809
|
+
if (i5 > 0) {
|
|
266810
|
+
feedChar(44);
|
|
266811
|
+
}
|
|
266812
|
+
feedString(keys25[i5] ?? "");
|
|
266813
|
+
feedChar(58);
|
|
266814
|
+
traverse(value2[keys25[i5] ?? ""], currentDepth + 1);
|
|
266815
|
+
}
|
|
266816
|
+
feedChar(125);
|
|
266817
|
+
}
|
|
266818
|
+
} else {
|
|
266819
|
+
feedString(String(value2));
|
|
266820
|
+
}
|
|
266821
|
+
}
|
|
266822
|
+
traverse(obj, 0);
|
|
266823
|
+
return hash5.toString(16);
|
|
266824
|
+
}
|
|
266825
|
+
var MAX_DEPTH;
|
|
266826
|
+
var init_hashJSON = __esm({
|
|
266827
|
+
"../../commons/ir-utils/lib/hashJSON.js"() {
|
|
266828
|
+
"use strict";
|
|
266829
|
+
MAX_DEPTH = 64;
|
|
266830
|
+
}
|
|
266831
|
+
});
|
|
266832
|
+
|
|
266833
|
+
// ../../commons/ir-utils/lib/utils/isTypeReferenceOptional.js
|
|
266834
|
+
function isTypeReferenceOptional({ typeReference: typeReference2, typeDeclarations }) {
|
|
266835
|
+
if (typeReference2.type === "container" && typeReference2.container.type === "optional") {
|
|
266836
|
+
return true;
|
|
266837
|
+
}
|
|
266838
|
+
if (typeReference2.type === "named") {
|
|
266839
|
+
const typeDeclaration2 = typeDeclarations?.[typeReference2.typeId];
|
|
266840
|
+
if (typeDeclaration2?.shape.type === "alias" && typeDeclaration2?.shape.resolvedType.type === "container" && typeDeclaration2?.shape.resolvedType.container.type === "optional") {
|
|
266841
|
+
return true;
|
|
266842
|
+
}
|
|
266843
|
+
}
|
|
266844
|
+
return false;
|
|
266845
|
+
}
|
|
266846
|
+
var init_isTypeReferenceOptional = __esm({
|
|
266847
|
+
"../../commons/ir-utils/lib/utils/isTypeReferenceOptional.js"() {
|
|
266848
|
+
"use strict";
|
|
266849
|
+
}
|
|
266850
|
+
});
|
|
266851
|
+
|
|
266852
266852
|
// ../../commons/ir-utils/lib/examples/v1/generateContainerExample.js
|
|
266853
266853
|
function generateContainerExample({ fieldName, containerType, maxDepth, currentDepth, typeDeclarations, skipOptionalProperties, visitedTypes }) {
|
|
266854
266854
|
if (currentDepth >= maxDepth) {
|
|
@@ -268446,8 +268446,8 @@ function generateEndpointExample({ ir: ir3, endpoint: endpoint3, service, typeDe
|
|
|
268446
268446
|
return { type: "failure", message: `Parse failure with exceptions ${e2}` };
|
|
268447
268447
|
}
|
|
268448
268448
|
}
|
|
268449
|
-
function getUrlForExample(endpoint3, example) {
|
|
268450
|
-
const pathParameters = {};
|
|
268449
|
+
function getUrlForExample(endpoint3, example, fallbackPathParameterValues = {}) {
|
|
268450
|
+
const pathParameters = { ...fallbackPathParameterValues };
|
|
268451
268451
|
[...example.rootPathParameters, ...example.servicePathParameters, ...example.endpointPathParameters].forEach((examplePathParameter) => {
|
|
268452
268452
|
const value2 = examplePathParameter.value.jsonExample;
|
|
268453
268453
|
const stringValue = typeof value2 === "string" ? value2 : JSON.stringify(value2);
|
|
@@ -268478,6 +268478,87 @@ var init_generateEndpointExample = __esm({
|
|
|
268478
268478
|
}
|
|
268479
268479
|
});
|
|
268480
268480
|
|
|
268481
|
+
// ../../commons/ir-utils/lib/examples/backfillMissingPathParameterExamples.js
|
|
268482
|
+
function backfillMissingPathParameterExamples({ ir: ir3 }) {
|
|
268483
|
+
for (const service of Object.values(ir3.services)) {
|
|
268484
|
+
for (const endpoint3 of service.endpoints) {
|
|
268485
|
+
for (const userSpecifiedExample of endpoint3.userSpecifiedExamples) {
|
|
268486
|
+
if (userSpecifiedExample.example == null) {
|
|
268487
|
+
continue;
|
|
268488
|
+
}
|
|
268489
|
+
backfillExample({
|
|
268490
|
+
typeDeclarations: ir3.types,
|
|
268491
|
+
rootPathParameters: ir3.pathParameters,
|
|
268492
|
+
service,
|
|
268493
|
+
endpoint: endpoint3,
|
|
268494
|
+
example: userSpecifiedExample.example
|
|
268495
|
+
});
|
|
268496
|
+
}
|
|
268497
|
+
}
|
|
268498
|
+
}
|
|
268499
|
+
return ir3;
|
|
268500
|
+
}
|
|
268501
|
+
function backfillExample({ typeDeclarations, rootPathParameters, service, endpoint: endpoint3, example }) {
|
|
268502
|
+
const buckets = [
|
|
268503
|
+
{ declared: rootPathParameters, examples: example.rootPathParameters },
|
|
268504
|
+
{ declared: service.pathParameters, examples: example.servicePathParameters },
|
|
268505
|
+
{ declared: endpoint3.pathParameters, examples: example.endpointPathParameters }
|
|
268506
|
+
];
|
|
268507
|
+
const suppliedNames = new Set(buckets.flatMap((bucket) => bucket.examples.map((pathParameter) => getOriginalName(pathParameter.name))));
|
|
268508
|
+
let anyMissing = false;
|
|
268509
|
+
const clientDefaultValues = {};
|
|
268510
|
+
for (const bucket of buckets) {
|
|
268511
|
+
for (const pathParameter of bucket.declared) {
|
|
268512
|
+
if (suppliedNames.has(getOriginalName(pathParameter.name))) {
|
|
268513
|
+
continue;
|
|
268514
|
+
}
|
|
268515
|
+
anyMissing = true;
|
|
268516
|
+
if (pathParameter.clientDefault != null) {
|
|
268517
|
+
clientDefaultValues[getOriginalName(pathParameter.name)] = literalToString(pathParameter.clientDefault);
|
|
268518
|
+
continue;
|
|
268519
|
+
}
|
|
268520
|
+
const pathParameterExample = generateExample({ pathParameter, typeDeclarations });
|
|
268521
|
+
if (pathParameterExample == null) {
|
|
268522
|
+
continue;
|
|
268523
|
+
}
|
|
268524
|
+
bucket.examples.push(pathParameterExample);
|
|
268525
|
+
}
|
|
268526
|
+
}
|
|
268527
|
+
if (anyMissing) {
|
|
268528
|
+
example.url = getUrlForExample(endpoint3, example, clientDefaultValues);
|
|
268529
|
+
}
|
|
268530
|
+
}
|
|
268531
|
+
function generateExample({ pathParameter, typeDeclarations }) {
|
|
268532
|
+
const generated = generatePathParameterExamples2([pathParameter], {
|
|
268533
|
+
typeDeclarations,
|
|
268534
|
+
skipOptionalRequestProperties: true,
|
|
268535
|
+
maxDepth: 1
|
|
268536
|
+
});
|
|
268537
|
+
if (generated.type === "failure") {
|
|
268538
|
+
return void 0;
|
|
268539
|
+
}
|
|
268540
|
+
return generated.example[0];
|
|
268541
|
+
}
|
|
268542
|
+
function literalToString(literal3) {
|
|
268543
|
+
switch (literal3.type) {
|
|
268544
|
+
case "string":
|
|
268545
|
+
return literal3.string;
|
|
268546
|
+
case "boolean":
|
|
268547
|
+
return String(literal3.boolean);
|
|
268548
|
+
default:
|
|
268549
|
+
assertNever(literal3);
|
|
268550
|
+
}
|
|
268551
|
+
}
|
|
268552
|
+
var init_backfillMissingPathParameterExamples = __esm({
|
|
268553
|
+
"../../commons/ir-utils/lib/examples/backfillMissingPathParameterExamples.js"() {
|
|
268554
|
+
"use strict";
|
|
268555
|
+
init_lib4();
|
|
268556
|
+
init_namesUtils();
|
|
268557
|
+
init_generateEndpointExample();
|
|
268558
|
+
init_generateParameterExamples();
|
|
268559
|
+
}
|
|
268560
|
+
});
|
|
268561
|
+
|
|
268481
268562
|
// ../../commons/ir-utils/lib/examples/v1/generateWebSocketExample.js
|
|
268482
268563
|
function generateWebSocketExample({ ir: ir3, channel: channel3, typeDeclarations, skipOptionalRequestProperties }) {
|
|
268483
268564
|
const result = {
|
|
@@ -272308,6 +272389,7 @@ var init_lib22 = __esm({
|
|
|
272308
272389
|
init_convertApiAuth();
|
|
272309
272390
|
init_constructHttpPath();
|
|
272310
272391
|
init_convertEnvironments();
|
|
272392
|
+
init_backfillMissingPathParameterExamples();
|
|
272311
272393
|
init_injectAutogeneratedExamples();
|
|
272312
272394
|
init_generateEndpointExample();
|
|
272313
272395
|
init_filterIntermediateRepresentationForAudiences();
|
|
@@ -282040,6 +282122,7 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
282040
282122
|
resolveGlobalParameterApplicability(intermediateRepresentation, {
|
|
282041
282123
|
onWarning: (message) => context3.logger.warn(message)
|
|
282042
282124
|
});
|
|
282125
|
+
backfillMissingPathParameterExamples({ ir: intermediateRepresentation });
|
|
282043
282126
|
const intermediateRepresentationWithGeneratedExamples = exampleGeneration.disabled ? intermediateRepresentation : injectAutogeneratedExamples({ ir: intermediateRepresentation, exampleGeneration });
|
|
282044
282127
|
const workspaceDefinitionRootApiFileContents = workspace.definition.rootApiFile.contents;
|
|
282045
282128
|
const ignoreAudiences = environments2?.environments._visit({
|
|
@@ -347875,6 +347958,7 @@ var init_AbstractSpecConverter = __esm({
|
|
|
347875
347958
|
if (!this.irGraph.hasNoAudiences()) {
|
|
347876
347959
|
ir3 = this.filterIrForAudiences(ir3);
|
|
347877
347960
|
}
|
|
347961
|
+
backfillMissingPathParameterExamples({ ir: ir3 });
|
|
347878
347962
|
const exampleGeneration = this.context.exampleGenerationArgs;
|
|
347879
347963
|
const irWithV2Examples = injectAutogeneratedV2Examples({ ir: ir3, exampleGeneration, logger: this.context.logger });
|
|
347880
347964
|
if (this.context.generateV1Examples) {
|
|
@@ -357798,7 +357882,7 @@ var init_OperationConverter = __esm({
|
|
|
357798
357882
|
return void 0;
|
|
357799
357883
|
}
|
|
357800
357884
|
const { group, method: method8 } = this.computeGroupNameAndLocationFromExtensions() ?? this.computeGroupNameFromTagAndOperationId();
|
|
357801
|
-
const
|
|
357885
|
+
const groupDisplayName2 = this.getGroupDisplayName(group);
|
|
357802
357886
|
const { headers: headers2, pathParameters, queryParameters } = this.convertParameters({
|
|
357803
357887
|
breadcrumbs: [...this.breadcrumbs, "parameters"]
|
|
357804
357888
|
});
|
|
@@ -357948,7 +358032,7 @@ var init_OperationConverter = __esm({
|
|
|
357948
358032
|
return {
|
|
357949
358033
|
audiences,
|
|
357950
358034
|
group,
|
|
357951
|
-
groupDisplayName,
|
|
358035
|
+
groupDisplayName: groupDisplayName2,
|
|
357952
358036
|
errors: topLevelErrors,
|
|
357953
358037
|
endpoint: {
|
|
357954
358038
|
...baseEndpoint,
|
|
@@ -703346,7 +703430,7 @@ var AccessTokenPosthogManager = class {
|
|
|
703346
703430
|
properties: {
|
|
703347
703431
|
...event,
|
|
703348
703432
|
...event.properties,
|
|
703349
|
-
version: "5.
|
|
703433
|
+
version: "5.102.0",
|
|
703350
703434
|
usingAccessToken: true,
|
|
703351
703435
|
...getRunIdProperties()
|
|
703352
703436
|
}
|
|
@@ -703412,7 +703496,7 @@ var UserPosthogManager = class {
|
|
|
703412
703496
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703413
703497
|
event: "CLI",
|
|
703414
703498
|
properties: {
|
|
703415
|
-
version: "5.
|
|
703499
|
+
version: "5.102.0",
|
|
703416
703500
|
...event,
|
|
703417
703501
|
...event.properties,
|
|
703418
703502
|
usingAccessToken: false,
|
|
@@ -884794,7 +884878,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884794
884878
|
var LOGS_FOLDER_NAME = "logs";
|
|
884795
884879
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884796
884880
|
function getCliSource() {
|
|
884797
|
-
const version7 = "5.
|
|
884881
|
+
const version7 = "5.102.0";
|
|
884798
884882
|
return `cli@${version7}`;
|
|
884799
884883
|
}
|
|
884800
884884
|
var DebugLogger = class {
|
|
@@ -903846,6 +903930,104 @@ function renderCompoundPage(compound, meta5) {
|
|
|
903846
903930
|
}
|
|
903847
903931
|
}
|
|
903848
903932
|
|
|
903933
|
+
// ../library-docs-generator/lib/cpp/src/renderers/GroupPageRenderer.js
|
|
903934
|
+
function isNamedMember(member) {
|
|
903935
|
+
return member.path.trim().length > 0;
|
|
903936
|
+
}
|
|
903937
|
+
function collectEntries(items) {
|
|
903938
|
+
return items.filter(isNamedMember).map((item) => ({ displayName: item.path, linkPath: buildLinkPath(item.path) })).sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
|
|
903939
|
+
}
|
|
903940
|
+
function collectFunctionEntries(functions2) {
|
|
903941
|
+
const seen = /* @__PURE__ */ new Set();
|
|
903942
|
+
const entries24 = [];
|
|
903943
|
+
for (const func2 of functions2) {
|
|
903944
|
+
if (!isNamedMember(func2)) {
|
|
903945
|
+
continue;
|
|
903946
|
+
}
|
|
903947
|
+
const stripped = stripTemplateArgs(func2.path);
|
|
903948
|
+
if (seen.has(stripped)) {
|
|
903949
|
+
continue;
|
|
903950
|
+
}
|
|
903951
|
+
seen.add(stripped);
|
|
903952
|
+
entries24.push({ displayName: func2.path, linkPath: buildLinkPath(stripped) });
|
|
903953
|
+
}
|
|
903954
|
+
return entries24.sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
|
|
903955
|
+
}
|
|
903956
|
+
function collectGroupSections(group) {
|
|
903957
|
+
const classes = group.classes ?? [];
|
|
903958
|
+
const sections = [
|
|
903959
|
+
{ heading: "Classes", entries: collectEntries(classes.filter((cls) => cls.kind !== "struct")) },
|
|
903960
|
+
{ heading: "Structs", entries: collectEntries(classes.filter((cls) => cls.kind === "struct")) },
|
|
903961
|
+
{ heading: "Functions", entries: collectFunctionEntries(group.functions ?? []) },
|
|
903962
|
+
{ heading: "Enumerations", entries: collectEntries(group.enums ?? []) },
|
|
903963
|
+
{ heading: "Type Definitions", entries: collectEntries(group.typedefs ?? []) },
|
|
903964
|
+
{ heading: "Variables", entries: collectEntries(group.variables ?? []) }
|
|
903965
|
+
];
|
|
903966
|
+
return sections.filter((section) => section.entries.length > 0);
|
|
903967
|
+
}
|
|
903968
|
+
function groupHasContent(group, visited = /* @__PURE__ */ new Set()) {
|
|
903969
|
+
if (visited.has(group.id)) {
|
|
903970
|
+
return false;
|
|
903971
|
+
}
|
|
903972
|
+
visited.add(group.id);
|
|
903973
|
+
const hasMembers = [group.classes, group.functions, group.enums, group.typedefs, group.variables].some((members) => members != null && members.some(isNamedMember));
|
|
903974
|
+
return hasMembers || group.subgroups.some((subgroup) => groupHasContent(subgroup, visited));
|
|
903975
|
+
}
|
|
903976
|
+
function renderEntries(entries24, lines) {
|
|
903977
|
+
for (const entry of entries24) {
|
|
903978
|
+
if (entry.linkPath) {
|
|
903979
|
+
lines.push(`- [\`${entry.displayName}\`](${entry.linkPath})`);
|
|
903980
|
+
} else {
|
|
903981
|
+
lines.push(`- \`${entry.displayName}\``);
|
|
903982
|
+
}
|
|
903983
|
+
}
|
|
903984
|
+
}
|
|
903985
|
+
function renderGroupPage(group, sections, subgroupEntries) {
|
|
903986
|
+
const lines = [];
|
|
903987
|
+
const docstring = group.docstring;
|
|
903988
|
+
const title2 = group.title || group.name;
|
|
903989
|
+
const summaryText = docstring ? renderSegmentsPlainText(docstring.summary) : "";
|
|
903990
|
+
const description = summaryText.length > 0 ? summaryText : `Members of the ${title2} group.`;
|
|
903991
|
+
lines.push(...renderFrontmatter(title2, description));
|
|
903992
|
+
if (docstring?.summary && docstring.summary.length > 0) {
|
|
903993
|
+
const summary = renderSegmentsTrimmed(docstring.summary);
|
|
903994
|
+
if (summary) {
|
|
903995
|
+
lines.push("", summary);
|
|
903996
|
+
}
|
|
903997
|
+
}
|
|
903998
|
+
if (docstring?.description && docstring.description.length > 0) {
|
|
903999
|
+
const desc = renderDescriptionBlocksDeduped(docstring.description, docstring.summary);
|
|
904000
|
+
if (desc) {
|
|
904001
|
+
lines.push("", desc);
|
|
904002
|
+
}
|
|
904003
|
+
}
|
|
904004
|
+
for (const section of sections) {
|
|
904005
|
+
lines.push("", `## ${section.heading}`, "");
|
|
904006
|
+
renderEntries(section.entries, lines);
|
|
904007
|
+
}
|
|
904008
|
+
if (subgroupEntries.length > 0) {
|
|
904009
|
+
lines.push("", "## Subgroups", "");
|
|
904010
|
+
for (const entry of subgroupEntries) {
|
|
904011
|
+
lines.push(`- [${entry.displayName}](${entry.linkPath})`);
|
|
904012
|
+
}
|
|
904013
|
+
}
|
|
904014
|
+
trimTrailingBlankLines(lines);
|
|
904015
|
+
return lines.join("\n") + "\n";
|
|
904016
|
+
}
|
|
904017
|
+
function renderGroupsIndexPage(entries24, libraryTitle) {
|
|
904018
|
+
const lines = [];
|
|
904019
|
+
const library = libraryTitle.trim();
|
|
904020
|
+
const title2 = library.length > 0 ? `${library} \u2014 Groups` : "Groups";
|
|
904021
|
+
const description = library.length > 0 ? `Documentation groups in ${library}.` : "Documentation groups in this library.";
|
|
904022
|
+
lines.push(...renderFrontmatter(title2, description));
|
|
904023
|
+
lines.push("");
|
|
904024
|
+
for (const entry of entries24) {
|
|
904025
|
+
lines.push(`- [${entry.displayName}](${entry.linkPath})`);
|
|
904026
|
+
}
|
|
904027
|
+
trimTrailingBlankLines(lines);
|
|
904028
|
+
return lines.join("\n") + "\n";
|
|
904029
|
+
}
|
|
904030
|
+
|
|
903849
904031
|
// ../library-docs-generator/lib/cpp/src/renderers/IndexPageRenderer.js
|
|
903850
904032
|
function collectClassEntries(classes, kind) {
|
|
903851
904033
|
return classes.filter((cls) => cls.kind === kind).map((cls) => ({
|
|
@@ -903859,7 +904041,7 @@ function collectEntityEntries(items) {
|
|
|
903859
904041
|
linkPath: buildLinkPath(item.path)
|
|
903860
904042
|
})).sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
|
|
903861
904043
|
}
|
|
903862
|
-
function
|
|
904044
|
+
function collectFunctionEntries2(functions2) {
|
|
903863
904045
|
const seen = /* @__PURE__ */ new Set();
|
|
903864
904046
|
const entries24 = [];
|
|
903865
904047
|
for (const func2 of functions2) {
|
|
@@ -903894,7 +904076,7 @@ var ENTITY_CATEGORIES = [
|
|
|
903894
904076
|
{
|
|
903895
904077
|
folderName: "functions",
|
|
903896
904078
|
heading: "Functions",
|
|
903897
|
-
collectEntries: (ns2) =>
|
|
904079
|
+
collectEntries: (ns2) => collectFunctionEntries2(ns2.functions)
|
|
903898
904080
|
},
|
|
903899
904081
|
{
|
|
903900
904082
|
folderName: "enums",
|
|
@@ -903919,7 +904101,7 @@ function namespaceHasEntities(ns2) {
|
|
|
903919
904101
|
}
|
|
903920
904102
|
return ns2.namespaces.some((child) => namespaceHasEntities(child));
|
|
903921
904103
|
}
|
|
903922
|
-
function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLastSegment) {
|
|
904104
|
+
function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLastSegment, hasGroups = false) {
|
|
903923
904105
|
const lines = [];
|
|
903924
904106
|
const descriptionSubject = title2.endsWith(" API Reference") ? title2.replace(/ API Reference$/, "") : title2;
|
|
903925
904107
|
const description = `API reference for the ${descriptionSubject} namespace.`;
|
|
@@ -903931,6 +904113,9 @@ function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLast
|
|
|
903931
904113
|
if (hasChildNamespaces) {
|
|
903932
904114
|
lines.push(`- [Namespaces](${nsLastSegment}/namespaces)`);
|
|
903933
904115
|
}
|
|
904116
|
+
if (hasGroups) {
|
|
904117
|
+
lines.push(`- [Groups](${nsLastSegment}/groups)`);
|
|
904118
|
+
}
|
|
903934
904119
|
trimTrailingBlankLines(lines);
|
|
903935
904120
|
return lines.join("\n") + "\n";
|
|
903936
904121
|
}
|
|
@@ -904023,13 +904208,15 @@ function generateCpp(options2) {
|
|
|
904023
904208
|
const content5 = renderCompoundPage(entry.collected.compound, meta5);
|
|
904024
904209
|
writer2.writePage(entry.pageKey, content5);
|
|
904025
904210
|
}
|
|
904211
|
+
const groups2 = (ir3.groups ?? []).filter((group) => groupHasContent(group));
|
|
904026
904212
|
const slugBaseName = slug.includes("/") ? slug.split("/").pop() ?? slug : slug;
|
|
904027
904213
|
const libraryNs = ir3.rootNamespace.namespaces.find((child) => child.name === slugBaseName);
|
|
904028
904214
|
if (libraryNs) {
|
|
904029
904215
|
const title2 = LIBRARY_TITLES[libraryNs.name] ?? `${libraryNs.name} API Reference`;
|
|
904030
904216
|
const outputFolderSlug = slugifySegment(outputDir.split("/").pop() || slug);
|
|
904031
|
-
generateIndexPages(libraryNs, title2, writer2, rootNsName, outputFolderSlug);
|
|
904217
|
+
generateIndexPages(libraryNs, title2, writer2, rootNsName, outputFolderSlug, groups2.length > 0);
|
|
904032
904218
|
}
|
|
904219
|
+
generateGroupPages(groups2, writer2, repo.trim() || (rootNsName ?? slug));
|
|
904033
904220
|
return writer2.result();
|
|
904034
904221
|
} finally {
|
|
904035
904222
|
clearEntityRegistry();
|
|
@@ -904268,7 +904455,7 @@ var LIBRARY_TITLES = {
|
|
|
904268
904455
|
thrust: "Thrust API Reference",
|
|
904269
904456
|
cuda: "libcudacxx API Reference"
|
|
904270
904457
|
};
|
|
904271
|
-
function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug) {
|
|
904458
|
+
function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug, hasGroups) {
|
|
904272
904459
|
if (!namespaceHasEntities(ns2)) {
|
|
904273
904460
|
return;
|
|
904274
904461
|
}
|
|
@@ -904290,7 +904477,7 @@ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug)
|
|
|
904290
904477
|
entries: cat.collectEntries(ns2)
|
|
904291
904478
|
}));
|
|
904292
904479
|
const nsLastSegment = nsDir ? slugifySegment(nsDir.split("/").pop() || ns2.name) : outputFolderSlug;
|
|
904293
|
-
const indexContent = renderNamespaceIndexPage(title2, categoriesForNsIndex, childrenWithEntities.length > 0, nsLastSegment);
|
|
904480
|
+
const indexContent = renderNamespaceIndexPage(title2, categoriesForNsIndex, childrenWithEntities.length > 0, nsLastSegment, hasGroups);
|
|
904294
904481
|
writer2.writePage(nsIndexPageKey, indexContent);
|
|
904295
904482
|
for (const category of nonEmptyCategories) {
|
|
904296
904483
|
const catPageKey = nsDir ? `${nsDir}/${category.folderName}/index.mdx` : `${category.folderName}/index.mdx`;
|
|
@@ -904315,7 +904502,49 @@ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug)
|
|
|
904315
904502
|
writer2.writePage(nsListPageKey, namespacesContent);
|
|
904316
904503
|
}
|
|
904317
904504
|
for (const child of ns2.namespaces) {
|
|
904318
|
-
generateIndexPages(child, `Namespace ${child.path}`, writer2, rootNsName, outputFolderSlug);
|
|
904505
|
+
generateIndexPages(child, `Namespace ${child.path}`, writer2, rootNsName, outputFolderSlug, false);
|
|
904506
|
+
}
|
|
904507
|
+
}
|
|
904508
|
+
var GROUPS_FOLDER = "groups";
|
|
904509
|
+
function groupFolderName(group) {
|
|
904510
|
+
return sanitizeForFilename(group.name || group.title);
|
|
904511
|
+
}
|
|
904512
|
+
function groupDisplayName(group) {
|
|
904513
|
+
return group.title || group.name;
|
|
904514
|
+
}
|
|
904515
|
+
function generateGroupPages(renderable, writer2, libraryTitle) {
|
|
904516
|
+
if (renderable.length === 0) {
|
|
904517
|
+
return;
|
|
904518
|
+
}
|
|
904519
|
+
const indexPageKey = `${GROUPS_FOLDER}/index.mdx`;
|
|
904520
|
+
setCurrentPageSlugPath(pageKeyToSlugPath(indexPageKey));
|
|
904521
|
+
const entries24 = renderable.map((group) => ({
|
|
904522
|
+
displayName: groupDisplayName(group),
|
|
904523
|
+
linkPath: `${GROUPS_FOLDER}/${slugifySegment(groupFolderName(group))}`
|
|
904524
|
+
}));
|
|
904525
|
+
writer2.writePage(indexPageKey, renderGroupsIndexPage(entries24, libraryTitle));
|
|
904526
|
+
const written = /* @__PURE__ */ new Set();
|
|
904527
|
+
for (const group of renderable) {
|
|
904528
|
+
writeGroupPage(group, `${GROUPS_FOLDER}/${groupFolderName(group)}`, writer2, written);
|
|
904529
|
+
}
|
|
904530
|
+
}
|
|
904531
|
+
function writeGroupPage(group, dir, writer2, written) {
|
|
904532
|
+
if (written.has(group.id)) {
|
|
904533
|
+
return;
|
|
904534
|
+
}
|
|
904535
|
+
written.add(group.id);
|
|
904536
|
+
const pageKey = `${dir}/index.mdx`;
|
|
904537
|
+
setCurrentPageSlugPath(pageKeyToSlugPath(pageKey));
|
|
904538
|
+
const sections = collectGroupSections(group);
|
|
904539
|
+
const subgroups = group.subgroups.filter((subgroup) => !written.has(subgroup.id) && groupHasContent(subgroup));
|
|
904540
|
+
const dirSegment = slugifySegment(dir.split("/").pop() ?? "");
|
|
904541
|
+
const subgroupEntries = subgroups.map((subgroup) => ({
|
|
904542
|
+
displayName: groupDisplayName(subgroup),
|
|
904543
|
+
linkPath: `${dirSegment}/${slugifySegment(groupFolderName(subgroup))}`
|
|
904544
|
+
}));
|
|
904545
|
+
writer2.writePage(pageKey, renderGroupPage(group, sections, subgroupEntries));
|
|
904546
|
+
for (const subgroup of subgroups) {
|
|
904547
|
+
writeGroupPage(subgroup, `${dir}/${groupFolderName(subgroup)}`, writer2, written);
|
|
904319
904548
|
}
|
|
904320
904549
|
}
|
|
904321
904550
|
|
|
@@ -910714,7 +910943,7 @@ var LegacyDocsPublisher = class {
|
|
|
910714
910943
|
previewId,
|
|
910715
910944
|
disableTemplates: void 0,
|
|
910716
910945
|
skipUpload,
|
|
910717
|
-
cliVersion: "5.
|
|
910946
|
+
cliVersion: "5.102.0",
|
|
910718
910947
|
loginCommand: "fern auth login"
|
|
910719
910948
|
});
|
|
910720
910949
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -978085,7 +978314,7 @@ function getAutomationContextFromEnv() {
|
|
|
978085
978314
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
978086
978315
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
978087
978316
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
978088
|
-
cli_version: "5.
|
|
978317
|
+
cli_version: "5.102.0"
|
|
978089
978318
|
};
|
|
978090
978319
|
}
|
|
978091
978320
|
function isAutomationMode() {
|
|
@@ -978917,7 +979146,7 @@ var CliContext = class _CliContext {
|
|
|
978917
979146
|
if (false) {
|
|
978918
979147
|
this.logger.error("CLI_VERSION is not defined");
|
|
978919
979148
|
}
|
|
978920
|
-
return "5.
|
|
979149
|
+
return "5.102.0";
|
|
978921
979150
|
}
|
|
978922
979151
|
getCliName() {
|
|
978923
979152
|
if (false) {
|
package/package.json
CHANGED