fern-api 0.30.8-rc4 → 0.30.8-rc5
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/bundle.cjs +328 -252
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -22002,7 +22002,7 @@ var init_NavigationItem = __esm({
|
|
|
22002
22002
|
NavigationItem = schemas_exports.undiscriminatedUnion([
|
|
22003
22003
|
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).PageConfiguration),
|
|
22004
22004
|
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).SectionConfiguration),
|
|
22005
|
-
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22005
|
+
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceConfiguration),
|
|
22006
22006
|
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).LinkConfiguration)
|
|
22007
22007
|
]);
|
|
22008
22008
|
}
|
|
@@ -22198,19 +22198,19 @@ var init_SectionConfiguration = __esm({
|
|
|
22198
22198
|
}
|
|
22199
22199
|
});
|
|
22200
22200
|
|
|
22201
|
-
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22202
|
-
var
|
|
22203
|
-
var
|
|
22204
|
-
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22201
|
+
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceConfiguration.js
|
|
22202
|
+
var ApiReferenceConfiguration;
|
|
22203
|
+
var init_ApiReferenceConfiguration = __esm({
|
|
22204
|
+
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceConfiguration.js"() {
|
|
22205
22205
|
init_core();
|
|
22206
|
-
|
|
22206
|
+
ApiReferenceConfiguration = schemas_exports.object({
|
|
22207
22207
|
api: schemas_exports.string(),
|
|
22208
22208
|
apiName: schemas_exports.property("api-name", schemas_exports.string().optional()),
|
|
22209
22209
|
audiences: schemas_exports.list(schemas_exports.string()).optional(),
|
|
22210
22210
|
displayErrors: schemas_exports.property("display-errors", schemas_exports.boolean().optional()),
|
|
22211
22211
|
snippets: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).SnippetsConfiguration).optional(),
|
|
22212
22212
|
summary: schemas_exports.string().optional(),
|
|
22213
|
-
layout: schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22213
|
+
layout: schemas_exports.list(schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceLayoutItem)).optional(),
|
|
22214
22214
|
icon: schemas_exports.string().optional(),
|
|
22215
22215
|
slug: schemas_exports.string().optional(),
|
|
22216
22216
|
hidden: schemas_exports.boolean().optional(),
|
|
@@ -22222,30 +22222,18 @@ var init_ApiSectionConfiguration = __esm({
|
|
|
22222
22222
|
}
|
|
22223
22223
|
});
|
|
22224
22224
|
|
|
22225
|
-
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22226
|
-
var
|
|
22227
|
-
var
|
|
22228
|
-
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22225
|
+
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceLayoutItem.js
|
|
22226
|
+
var ApiReferenceLayoutItem;
|
|
22227
|
+
var init_ApiReferenceLayoutItem = __esm({
|
|
22228
|
+
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceLayoutItem.js"() {
|
|
22229
22229
|
init_core();
|
|
22230
|
-
|
|
22230
|
+
ApiReferenceLayoutItem = schemas_exports.undiscriminatedUnion([
|
|
22231
22231
|
schemas_exports.string(),
|
|
22232
|
-
schemas_exports.record(schemas_exports.string(), schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22233
|
-
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).PageConfiguration),
|
|
22234
|
-
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).LinkConfiguration),
|
|
22232
|
+
schemas_exports.record(schemas_exports.string(), schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferencePackageConfiguration)),
|
|
22235
22233
|
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceSectionConfiguration),
|
|
22236
|
-
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22237
|
-
|
|
22238
|
-
|
|
22239
|
-
});
|
|
22240
|
-
|
|
22241
|
-
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/SubpackageOrSubpackages.js
|
|
22242
|
-
var SubpackageOrSubpackages;
|
|
22243
|
-
var init_SubpackageOrSubpackages = __esm({
|
|
22244
|
-
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/SubpackageOrSubpackages.js"() {
|
|
22245
|
-
init_core();
|
|
22246
|
-
SubpackageOrSubpackages = schemas_exports.undiscriminatedUnion([
|
|
22247
|
-
schemas_exports.string(),
|
|
22248
|
-
schemas_exports.list(schemas_exports.string())
|
|
22234
|
+
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceEndpointConfiguration),
|
|
22235
|
+
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).PageConfiguration),
|
|
22236
|
+
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).LinkConfiguration)
|
|
22249
22237
|
]);
|
|
22250
22238
|
}
|
|
22251
22239
|
});
|
|
@@ -22257,9 +22245,9 @@ var init_ApiReferenceSectionConfiguration = __esm({
|
|
|
22257
22245
|
init_core();
|
|
22258
22246
|
ApiReferenceSectionConfiguration = schemas_exports.object({
|
|
22259
22247
|
section: schemas_exports.string(),
|
|
22260
|
-
|
|
22248
|
+
referencedPackages: schemas_exports.property("referenced-packages", schemas_exports.list(schemas_exports.string()).optional()),
|
|
22261
22249
|
summary: schemas_exports.string().optional(),
|
|
22262
|
-
contents: schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22250
|
+
contents: schemas_exports.list(schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceLayoutItem)).optional(),
|
|
22263
22251
|
slug: schemas_exports.string().optional(),
|
|
22264
22252
|
icon: schemas_exports.string().optional(),
|
|
22265
22253
|
hidden: schemas_exports.boolean().optional(),
|
|
@@ -22273,10 +22261,22 @@ var ApiReferencePackageConfiguration;
|
|
|
22273
22261
|
var init_ApiReferencePackageConfiguration = __esm({
|
|
22274
22262
|
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferencePackageConfiguration.js"() {
|
|
22275
22263
|
init_core();
|
|
22276
|
-
ApiReferencePackageConfiguration = schemas_exports.
|
|
22277
|
-
|
|
22264
|
+
ApiReferencePackageConfiguration = schemas_exports.undiscriminatedUnion([
|
|
22265
|
+
schemas_exports.list(schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceLayoutItem)),
|
|
22266
|
+
schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferencePackageConfigurationWithOptions)
|
|
22267
|
+
]);
|
|
22268
|
+
}
|
|
22269
|
+
});
|
|
22270
|
+
|
|
22271
|
+
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferencePackageConfigurationWithOptions.js
|
|
22272
|
+
var ApiReferencePackageConfigurationWithOptions;
|
|
22273
|
+
var init_ApiReferencePackageConfigurationWithOptions = __esm({
|
|
22274
|
+
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferencePackageConfigurationWithOptions.js"() {
|
|
22275
|
+
init_core();
|
|
22276
|
+
ApiReferencePackageConfigurationWithOptions = schemas_exports.object({
|
|
22277
|
+
title: schemas_exports.string().optional(),
|
|
22278
22278
|
summary: schemas_exports.string().optional(),
|
|
22279
|
-
contents: schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).
|
|
22279
|
+
contents: schemas_exports.list(schemas_exports.lazy(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).ApiReferenceLayoutItem)).optional(),
|
|
22280
22280
|
slug: schemas_exports.string().optional(),
|
|
22281
22281
|
icon: schemas_exports.string().optional(),
|
|
22282
22282
|
hidden: schemas_exports.boolean().optional(),
|
|
@@ -22285,12 +22285,18 @@ var init_ApiReferencePackageConfiguration = __esm({
|
|
|
22285
22285
|
}
|
|
22286
22286
|
});
|
|
22287
22287
|
|
|
22288
|
-
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22289
|
-
var
|
|
22290
|
-
var
|
|
22291
|
-
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/
|
|
22288
|
+
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceEndpointConfiguration.js
|
|
22289
|
+
var ApiReferenceEndpointConfiguration;
|
|
22290
|
+
var init_ApiReferenceEndpointConfiguration = __esm({
|
|
22291
|
+
"pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/ApiReferenceEndpointConfiguration.js"() {
|
|
22292
22292
|
init_core();
|
|
22293
|
-
|
|
22293
|
+
ApiReferenceEndpointConfiguration = schemas_exports.object({
|
|
22294
|
+
endpoint: schemas_exports.string(),
|
|
22295
|
+
title: schemas_exports.string().optional(),
|
|
22296
|
+
slug: schemas_exports.string().optional(),
|
|
22297
|
+
icon: schemas_exports.string().optional(),
|
|
22298
|
+
hidden: schemas_exports.boolean().optional()
|
|
22299
|
+
});
|
|
22294
22300
|
}
|
|
22295
22301
|
});
|
|
22296
22302
|
|
|
@@ -22627,12 +22633,12 @@ var init_types = __esm({
|
|
|
22627
22633
|
init_FontConfigVariant();
|
|
22628
22634
|
init_PageConfiguration();
|
|
22629
22635
|
init_SectionConfiguration();
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
init_SubpackageOrSubpackages();
|
|
22636
|
+
init_ApiReferenceConfiguration();
|
|
22637
|
+
init_ApiReferenceLayoutItem();
|
|
22633
22638
|
init_ApiReferenceSectionConfiguration();
|
|
22634
22639
|
init_ApiReferencePackageConfiguration();
|
|
22635
|
-
|
|
22640
|
+
init_ApiReferencePackageConfigurationWithOptions();
|
|
22641
|
+
init_ApiReferenceEndpointConfiguration();
|
|
22636
22642
|
init_LinkConfiguration();
|
|
22637
22643
|
init_VersionedSnippetLanguageConfiguration();
|
|
22638
22644
|
init_SnippetLanguageConfiguration();
|
|
@@ -22661,11 +22667,12 @@ var init_types = __esm({
|
|
|
22661
22667
|
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/index.js
|
|
22662
22668
|
var docs_exports3 = {};
|
|
22663
22669
|
__export(docs_exports3, {
|
|
22664
|
-
|
|
22665
|
-
|
|
22670
|
+
ApiReferenceConfiguration: () => ApiReferenceConfiguration,
|
|
22671
|
+
ApiReferenceEndpointConfiguration: () => ApiReferenceEndpointConfiguration,
|
|
22672
|
+
ApiReferenceLayoutItem: () => ApiReferenceLayoutItem,
|
|
22666
22673
|
ApiReferencePackageConfiguration: () => ApiReferencePackageConfiguration,
|
|
22674
|
+
ApiReferencePackageConfigurationWithOptions: () => ApiReferencePackageConfigurationWithOptions,
|
|
22667
22675
|
ApiReferenceSectionConfiguration: () => ApiReferenceSectionConfiguration,
|
|
22668
|
-
ApiSectionConfiguration: () => ApiSectionConfiguration,
|
|
22669
22676
|
AudiencesConfig: () => AudiencesConfig,
|
|
22670
22677
|
BackgroundImageConfiguration: () => BackgroundImageConfiguration,
|
|
22671
22678
|
BackgroundImageThemedConfig: () => BackgroundImageThemedConfig,
|
|
@@ -22709,7 +22716,6 @@ __export(docs_exports3, {
|
|
|
22709
22716
|
SidebarOrHeaderPlacement: () => SidebarOrHeaderPlacement4,
|
|
22710
22717
|
SnippetLanguageConfiguration: () => SnippetLanguageConfiguration,
|
|
22711
22718
|
SnippetsConfiguration: () => SnippetsConfiguration,
|
|
22712
|
-
SubpackageOrSubpackages: () => SubpackageOrSubpackages,
|
|
22713
22719
|
TabConfig: () => TabConfig,
|
|
22714
22720
|
TabId: () => TabId2,
|
|
22715
22721
|
TabbedNavigationConfig: () => TabbedNavigationConfig,
|
|
@@ -22738,11 +22744,12 @@ var init_resources = __esm({
|
|
|
22738
22744
|
// pnp:/home/circleci/project/packages/cli/configuration/lib/docs-yml/schemas/sdk/serialization/index.js
|
|
22739
22745
|
var serialization_exports = {};
|
|
22740
22746
|
__export(serialization_exports, {
|
|
22741
|
-
|
|
22742
|
-
|
|
22747
|
+
ApiReferenceConfiguration: () => ApiReferenceConfiguration,
|
|
22748
|
+
ApiReferenceEndpointConfiguration: () => ApiReferenceEndpointConfiguration,
|
|
22749
|
+
ApiReferenceLayoutItem: () => ApiReferenceLayoutItem,
|
|
22743
22750
|
ApiReferencePackageConfiguration: () => ApiReferencePackageConfiguration,
|
|
22751
|
+
ApiReferencePackageConfigurationWithOptions: () => ApiReferencePackageConfigurationWithOptions,
|
|
22744
22752
|
ApiReferenceSectionConfiguration: () => ApiReferenceSectionConfiguration,
|
|
22745
|
-
ApiSectionConfiguration: () => ApiSectionConfiguration,
|
|
22746
22753
|
AudiencesConfig: () => AudiencesConfig,
|
|
22747
22754
|
BackgroundImageConfiguration: () => BackgroundImageConfiguration,
|
|
22748
22755
|
BackgroundImageThemedConfig: () => BackgroundImageThemedConfig,
|
|
@@ -22786,7 +22793,6 @@ __export(serialization_exports, {
|
|
|
22786
22793
|
SidebarOrHeaderPlacement: () => SidebarOrHeaderPlacement4,
|
|
22787
22794
|
SnippetLanguageConfiguration: () => SnippetLanguageConfiguration,
|
|
22788
22795
|
SnippetsConfiguration: () => SnippetsConfiguration,
|
|
22789
|
-
SubpackageOrSubpackages: () => SubpackageOrSubpackages,
|
|
22790
22796
|
TabConfig: () => TabConfig,
|
|
22791
22797
|
TabId: () => TabId2,
|
|
22792
22798
|
TabbedNavigationConfig: () => TabbedNavigationConfig,
|
|
@@ -1049723,7 +1049729,7 @@ async function getAllPages({ navigation, absolutePathToFernFolder }) {
|
|
|
1049723
1049729
|
async function getAllPagesFromNavigationItem({ item, absolutePathToFernFolder }) {
|
|
1049724
1049730
|
switch (item.type) {
|
|
1049725
1049731
|
case "apiSection": {
|
|
1049726
|
-
const toRet = combineMaps(await Promise.all(item.navigation.map((apiNavigation) =>
|
|
1049732
|
+
const toRet = combineMaps(await Promise.all(item.navigation.map((apiNavigation) => getAllPagesFromApiReferenceLayoutItem({ item: apiNavigation, absolutePathToFernFolder }))));
|
|
1049727
1049733
|
if (item.summaryAbsolutePath != null) {
|
|
1049728
1049734
|
toRet[await relativize(absolutePathToFernFolder, item.summaryAbsolutePath)] = (await (0, import_promises7.readFile)(item.summaryAbsolutePath)).toString();
|
|
1049729
1049735
|
}
|
|
@@ -1049746,14 +1049752,14 @@ async function getAllPagesFromNavigationItem({ item, absolutePathToFernFolder })
|
|
|
1049746
1049752
|
function combineMaps(maps) {
|
|
1049747
1049753
|
return maps.reduce((acc, record4) => ({ ...acc, ...record4 }), {});
|
|
1049748
1049754
|
}
|
|
1049749
|
-
async function
|
|
1049755
|
+
async function getAllPagesFromApiReferenceLayoutItem({ item, absolutePathToFernFolder }) {
|
|
1049750
1049756
|
if (item.type === "page") {
|
|
1049751
1049757
|
return {
|
|
1049752
1049758
|
[await relativize(absolutePathToFernFolder, item.absolutePath)]: (await (0, import_promises7.readFile)(item.absolutePath)).toString()
|
|
1049753
1049759
|
};
|
|
1049754
|
-
} else if (item.type === "package") {
|
|
1049760
|
+
} else if (item.type === "package" || item.type === "section") {
|
|
1049755
1049761
|
const toRet = combineMaps(await Promise.all(item.contents.map(async (subItem) => {
|
|
1049756
|
-
return await
|
|
1049762
|
+
return await getAllPagesFromApiReferenceLayoutItem({ item: subItem, absolutePathToFernFolder });
|
|
1049757
1049763
|
})));
|
|
1049758
1049764
|
if (item.summaryAbsolutePath != null) {
|
|
1049759
1049765
|
toRet[await relativize(absolutePathToFernFolder, item.summaryAbsolutePath)] = (await (0, import_promises7.readFile)(item.summaryAbsolutePath)).toString();
|
|
@@ -1050233,7 +1050239,7 @@ async function convertNavigationItem({ rawConfig, absolutePathToFernFolder, abso
|
|
|
1050233
1050239
|
audiences: rawConfig.audiences != null ? { type: "select", audiences: rawConfig.audiences } : { type: "all" },
|
|
1050234
1050240
|
showErrors: rawConfig.displayErrors ?? false,
|
|
1050235
1050241
|
snippetsConfiguration: rawConfig.snippets != null ? convertSnippetsConfiguration({ rawConfig: rawConfig.snippets }) : void 0,
|
|
1050236
|
-
navigation: ((_a5 = rawConfig.layout) == null ? void 0 : _a5.flatMap((item) =>
|
|
1050242
|
+
navigation: ((_a5 = rawConfig.layout) == null ? void 0 : _a5.flatMap((item) => parseApiReferenceLayoutItem(item, absolutePathToConfig))) ?? [],
|
|
1050237
1050243
|
summaryAbsolutePath: resolveFilepath(rawConfig.summary, absolutePathToConfig),
|
|
1050238
1050244
|
hidden: rawConfig.hidden ?? void 0,
|
|
1050239
1050245
|
slug: rawConfig.slug,
|
|
@@ -1050253,7 +1050259,8 @@ async function convertNavigationItem({ rawConfig, absolutePathToFernFolder, abso
|
|
|
1050253
1050259
|
}
|
|
1050254
1050260
|
assertNever(rawConfig);
|
|
1050255
1050261
|
}
|
|
1050256
|
-
function
|
|
1050262
|
+
function parseApiReferenceLayoutItem(item, absolutePathToConfig) {
|
|
1050263
|
+
var _a5;
|
|
1050257
1050264
|
if (typeof item === "string") {
|
|
1050258
1050265
|
return [{ type: "item", value: item }];
|
|
1050259
1050266
|
}
|
|
@@ -1050281,40 +1050288,55 @@ function parseApiNavigationItem(item, absolutePathToConfig) {
|
|
|
1050281
1050288
|
return [
|
|
1050282
1050289
|
{
|
|
1050283
1050290
|
type: "section",
|
|
1050284
|
-
|
|
1050285
|
-
|
|
1050291
|
+
title: item.section,
|
|
1050292
|
+
referencedSubpackages: item.referencedPackages ?? [],
|
|
1050286
1050293
|
summaryAbsolutePath: resolveFilepath(item.summary, absolutePathToConfig),
|
|
1050287
|
-
contents: item.contents.flatMap((value) =>
|
|
1050294
|
+
contents: ((_a5 = item.contents) == null ? void 0 : _a5.flatMap((value) => parseApiReferenceLayoutItem(value, absolutePathToConfig))) ?? [],
|
|
1050288
1050295
|
slug: item.slug,
|
|
1050289
1050296
|
hidden: item.hidden,
|
|
1050290
1050297
|
skipUrlSlug: item.skipSlug,
|
|
1050291
1050298
|
icon: item.icon
|
|
1050292
1050299
|
}
|
|
1050293
1050300
|
];
|
|
1050294
|
-
} else if (
|
|
1050301
|
+
} else if (isRawApiRefEndpointConfiguration(item)) {
|
|
1050295
1050302
|
return [
|
|
1050296
1050303
|
{
|
|
1050297
|
-
type: "
|
|
1050298
|
-
|
|
1050299
|
-
|
|
1050300
|
-
|
|
1050304
|
+
type: "endpoint",
|
|
1050305
|
+
endpoint: item.endpoint,
|
|
1050306
|
+
title: item.title,
|
|
1050307
|
+
icon: item.icon,
|
|
1050301
1050308
|
slug: item.slug,
|
|
1050302
|
-
hidden: item.hidden
|
|
1050303
|
-
skipUrlSlug: item.skipSlug,
|
|
1050304
|
-
icon: item.icon
|
|
1050309
|
+
hidden: item.hidden
|
|
1050305
1050310
|
}
|
|
1050306
1050311
|
];
|
|
1050307
1050312
|
}
|
|
1050308
|
-
return Object.entries(item).map(([key2,
|
|
1050309
|
-
|
|
1050310
|
-
|
|
1050311
|
-
|
|
1050312
|
-
|
|
1050313
|
-
|
|
1050314
|
-
|
|
1050315
|
-
|
|
1050316
|
-
|
|
1050317
|
-
|
|
1050313
|
+
return Object.entries(item).map(([key2, value]) => {
|
|
1050314
|
+
var _a6;
|
|
1050315
|
+
if (isRawApiRefPackageConfiguration(value)) {
|
|
1050316
|
+
return {
|
|
1050317
|
+
type: "package",
|
|
1050318
|
+
title: value.title,
|
|
1050319
|
+
package: key2,
|
|
1050320
|
+
summaryAbsolutePath: resolveFilepath(value.summary, absolutePathToConfig),
|
|
1050321
|
+
contents: ((_a6 = value.contents) == null ? void 0 : _a6.flatMap((value2) => parseApiReferenceLayoutItem(value2, absolutePathToConfig))) ?? [],
|
|
1050322
|
+
slug: value.slug,
|
|
1050323
|
+
hidden: value.hidden,
|
|
1050324
|
+
skipUrlSlug: value.skipSlug,
|
|
1050325
|
+
icon: value.icon
|
|
1050326
|
+
};
|
|
1050327
|
+
}
|
|
1050328
|
+
return {
|
|
1050329
|
+
type: "package",
|
|
1050330
|
+
title: void 0,
|
|
1050331
|
+
package: key2,
|
|
1050332
|
+
summaryAbsolutePath: void 0,
|
|
1050333
|
+
contents: value.flatMap((value2) => parseApiReferenceLayoutItem(value2, absolutePathToConfig)),
|
|
1050334
|
+
hidden: false,
|
|
1050335
|
+
slug: void 0,
|
|
1050336
|
+
skipUrlSlug: false,
|
|
1050337
|
+
icon: void 0
|
|
1050338
|
+
};
|
|
1050339
|
+
});
|
|
1050318
1050340
|
}
|
|
1050319
1050341
|
function convertSnippetsConfiguration({ rawConfig }) {
|
|
1050320
1050342
|
return {
|
|
@@ -1050334,13 +1050356,17 @@ function isRawApiSectionConfig(item) {
|
|
|
1050334
1050356
|
return item.api != null;
|
|
1050335
1050357
|
}
|
|
1050336
1050358
|
function isRawLinkConfig(item) {
|
|
1050359
|
+
api_exports4;
|
|
1050337
1050360
|
return isPlainObject(item) && typeof item.link === "string" && typeof item.href === "string";
|
|
1050338
1050361
|
}
|
|
1050339
1050362
|
function isRawApiRefSectionConfiguration(item) {
|
|
1050340
1050363
|
return isPlainObject(item) && typeof item.section === "string" && Array.isArray(item.contents);
|
|
1050341
1050364
|
}
|
|
1050365
|
+
function isRawApiRefEndpointConfiguration(item) {
|
|
1050366
|
+
return isPlainObject(item) && typeof item.endpoint === "string";
|
|
1050367
|
+
}
|
|
1050342
1050368
|
function isRawApiRefPackageConfiguration(item) {
|
|
1050343
|
-
return
|
|
1050369
|
+
return !Array.isArray(item);
|
|
1050344
1050370
|
}
|
|
1050345
1050371
|
function resolveFilepath(unresolvedFilepath, absoluteFilepathToDocsConfig) {
|
|
1050346
1050372
|
if (unresolvedFilepath == null) {
|
|
@@ -1054342,7 +1054368,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1054342
1054368
|
properties: {
|
|
1054343
1054369
|
...event,
|
|
1054344
1054370
|
...event.properties,
|
|
1054345
|
-
version: "0.30.8-
|
|
1054371
|
+
version: "0.30.8-rc5",
|
|
1054346
1054372
|
usingAccessToken: true
|
|
1054347
1054373
|
}
|
|
1054348
1054374
|
});
|
|
@@ -1054404,7 +1054430,7 @@ var UserPosthogManager = class {
|
|
|
1054404
1054430
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1054405
1054431
|
event: "CLI",
|
|
1054406
1054432
|
properties: {
|
|
1054407
|
-
version: "0.30.8-
|
|
1054433
|
+
version: "0.30.8-rc5",
|
|
1054408
1054434
|
...event,
|
|
1054409
1054435
|
...event.properties
|
|
1054410
1054436
|
}
|
|
@@ -1080347,10 +1080373,10 @@ var CliContext = class {
|
|
|
1080347
1080373
|
return "fern-api";
|
|
1080348
1080374
|
}
|
|
1080349
1080375
|
getPackageVersion() {
|
|
1080350
|
-
if ("0.30.8-
|
|
1080376
|
+
if ("0.30.8-rc5" == null) {
|
|
1080351
1080377
|
this.logger.error("CLI_VERSION is not defined");
|
|
1080352
1080378
|
}
|
|
1080353
|
-
return "0.30.8-
|
|
1080379
|
+
return "0.30.8-rc5";
|
|
1080354
1080380
|
}
|
|
1080355
1080381
|
getCliName() {
|
|
1080356
1080382
|
if ("fern" == null) {
|
|
@@ -1087657,7 +1087683,7 @@ function stringifyEndpointPathParts22(path42) {
|
|
|
1087657
1087683
|
}
|
|
1087658
1087684
|
|
|
1087659
1087685
|
// pnp:/home/circleci/project/packages/cli/docs-resolver/lib/ApiDefinitionHolder.js
|
|
1087660
|
-
var ROOT_PACKAGE_ID = "
|
|
1087686
|
+
var ROOT_PACKAGE_ID = "__package__";
|
|
1087661
1087687
|
var _endpoints2, _webSockets2, _webhooks2, _endpointsInverted, _webSocketsInverted, _webhooksInverted, _subpackages, _endpointsByLocator, _webSocketsByLocator, _webhooksByLocator, _subpackagesByLocator, _constructSubpackageLocators, constructSubpackageLocators_fn;
|
|
1087662
1087688
|
var _ApiDefinitionHolder2 = class {
|
|
1087663
1087689
|
constructor(api, context) {
|
|
@@ -1087742,13 +1087768,6 @@ var _ApiDefinitionHolder2 = class {
|
|
|
1087742
1087768
|
pkg2.webhooks.forEach((webhook) => {
|
|
1087743
1087769
|
subpackageHolder.webhooks.set(webhook.id, webhook);
|
|
1087744
1087770
|
__privateGet(this, _webhooks2).set(_ApiDefinitionHolder2.createWebhookId(webhook, subpackageId), webhook);
|
|
1087745
|
-
const locators = [];
|
|
1087746
|
-
locators.push(`${webhook.method} ${urlJoin22("/", ...webhook.path)}`);
|
|
1087747
|
-
locators.forEach((locator) => {
|
|
1087748
|
-
var _a5;
|
|
1087749
|
-
(_a5 = this.context) == null ? void 0 : _a5.logger.debug(`Registering webhook locator: ${locator}`);
|
|
1087750
|
-
__privateGet(this, _webhooksByLocator).set(locator, webhook);
|
|
1087751
|
-
});
|
|
1087752
1087771
|
});
|
|
1087753
1087772
|
});
|
|
1087754
1087773
|
__privateGet(this, _endpoints2).forEach((endpoint, endpointId) => {
|
|
@@ -1087807,6 +1087826,9 @@ var _ApiDefinitionHolder2 = class {
|
|
|
1087807
1087826
|
get subpackages() {
|
|
1087808
1087827
|
return __privateGet(this, _subpackages);
|
|
1087809
1087828
|
}
|
|
1087829
|
+
get subpackagesByLocator() {
|
|
1087830
|
+
return __privateGet(this, _subpackagesByLocator);
|
|
1087831
|
+
}
|
|
1087810
1087832
|
getEndpointId(endpoint) {
|
|
1087811
1087833
|
return __privateGet(this, _endpointsInverted).get(endpoint);
|
|
1087812
1087834
|
}
|
|
@@ -1087844,27 +1087866,42 @@ constructSubpackageLocators_fn = function(pkg2, parents) {
|
|
|
1087844
1087866
|
return;
|
|
1087845
1087867
|
}
|
|
1087846
1087868
|
const packageList = isSubpackage2(pkg2) ? [...parents, pkg2.name] : parents;
|
|
1087847
|
-
|
|
1087869
|
+
const path42 = packageList.length === 0 ? [ROOT_PACKAGE_ID] : packageList;
|
|
1087870
|
+
const locators = [path42.join("."), path42.join("/"), `${path42.join(".")}.yml`];
|
|
1087871
|
+
locators.forEach((locator) => {
|
|
1087872
|
+
var _a5;
|
|
1087873
|
+
(_a5 = this.context) == null ? void 0 : _a5.logger.debug(`Registering subpackage locator: ${locator}`);
|
|
1087874
|
+
__privateGet(this, _subpackagesByLocator).set(locator, pkg2);
|
|
1087875
|
+
});
|
|
1087848
1087876
|
if (pkg2.pointsTo != null) {
|
|
1087849
1087877
|
return __privateMethod(this, _constructSubpackageLocators, constructSubpackageLocators_fn).call(this, this.api.subpackages[pkg2.pointsTo], packageList);
|
|
1087850
1087878
|
}
|
|
1087851
1087879
|
pkg2.endpoints.forEach((endpoint) => {
|
|
1087852
|
-
|
|
1087853
|
-
const
|
|
1087854
|
-
(
|
|
1087855
|
-
|
|
1087880
|
+
const path43 = [...packageList, endpoint.id];
|
|
1087881
|
+
const locators2 = [path43.join("."), path43.join("/")];
|
|
1087882
|
+
locators2.forEach((locator) => {
|
|
1087883
|
+
var _a5;
|
|
1087884
|
+
(_a5 = this.context) == null ? void 0 : _a5.logger.debug(`Registering endpoint locator: ${locator}`);
|
|
1087885
|
+
__privateGet(this, _endpointsByLocator).set(locator, endpoint);
|
|
1087886
|
+
});
|
|
1087856
1087887
|
});
|
|
1087857
1087888
|
pkg2.websockets.forEach((webSocket) => {
|
|
1087858
|
-
|
|
1087859
|
-
const
|
|
1087860
|
-
(
|
|
1087861
|
-
|
|
1087889
|
+
const path43 = [...packageList, webSocket.id];
|
|
1087890
|
+
const locators2 = [path43.join("."), path43.join("/")];
|
|
1087891
|
+
locators2.forEach((locator) => {
|
|
1087892
|
+
var _a5;
|
|
1087893
|
+
(_a5 = this.context) == null ? void 0 : _a5.logger.debug(`Registering websocket locator: ${locator}`);
|
|
1087894
|
+
__privateGet(this, _webSocketsByLocator).set(locator, webSocket);
|
|
1087895
|
+
});
|
|
1087862
1087896
|
});
|
|
1087863
1087897
|
pkg2.webhooks.forEach((webhook) => {
|
|
1087864
|
-
|
|
1087865
|
-
const
|
|
1087866
|
-
(
|
|
1087867
|
-
|
|
1087898
|
+
const path43 = [...packageList, webhook.id];
|
|
1087899
|
+
const locators2 = [path43.join("."), path43.join("/")];
|
|
1087900
|
+
locators2.forEach((locator) => {
|
|
1087901
|
+
var _a5;
|
|
1087902
|
+
(_a5 = this.context) == null ? void 0 : _a5.logger.debug(`Registering webhook locator: ${locator}`);
|
|
1087903
|
+
__privateGet(this, _webhooksByLocator).set(locator, webhook);
|
|
1087904
|
+
});
|
|
1087868
1087905
|
});
|
|
1087869
1087906
|
pkg2.subpackages.forEach((subpackageId) => {
|
|
1087870
1087907
|
__privateMethod(this, _constructSubpackageLocators, constructSubpackageLocators_fn).call(this, this.api.subpackages[subpackageId], packageList);
|
|
@@ -1088052,14 +1088089,18 @@ var NodeIdGenerator2 = class {
|
|
|
1088052
1088089
|
};
|
|
1088053
1088090
|
|
|
1088054
1088091
|
// pnp:/home/circleci/project/packages/cli/docs-resolver/lib/ApiReferenceNodeConverter.js
|
|
1088055
|
-
var _holder2, _visitedEndpoints2, _visitedWebSockets2, _visitedWebhooks2, _visitedSubpackages2, _nodeIdToSubpackageId, _children, _overviewPageId, _slug,
|
|
1088092
|
+
var _holder2, _visitedEndpoints2, _visitedWebSockets2, _visitedWebhooks2, _visitedSubpackages2, _nodeIdToSubpackageId, _children, _overviewPageId, _slug, _convertApiReferenceLayoutItems, convertApiReferenceLayoutItems_fn, _convertPackage, convertPackage_fn, _convertSection, convertSection_fn, _convertUnknownIdentifier, convertUnknownIdentifier_fn, _convertEndpoint, convertEndpoint_fn, _mergeAndFilterChildren, mergeAndFilterChildren_fn, _convertApiPackageChild, convertApiPackageChild_fn, _convertApiDefinitionPackage, convertApiDefinitionPackage_fn, _convertApiDefinitionPackageId, convertApiDefinitionPackageId_fn;
|
|
1088056
1088093
|
var ApiReferenceNodeConverter = class {
|
|
1088057
1088094
|
constructor(apiSection, api, parentSlug, workspace, docsWorkspace, taskContext, markdownFilesToFullSlugs) {
|
|
1088058
|
-
__privateAdd(this,
|
|
1088095
|
+
__privateAdd(this, _convertApiReferenceLayoutItems);
|
|
1088059
1088096
|
__privateAdd(this, _convertPackage);
|
|
1088060
1088097
|
__privateAdd(this, _convertSection);
|
|
1088061
|
-
__privateAdd(this, _convertApiDefinitionPackage);
|
|
1088062
1088098
|
__privateAdd(this, _convertUnknownIdentifier);
|
|
1088099
|
+
__privateAdd(this, _convertEndpoint);
|
|
1088100
|
+
__privateAdd(this, _mergeAndFilterChildren);
|
|
1088101
|
+
__privateAdd(this, _convertApiPackageChild);
|
|
1088102
|
+
__privateAdd(this, _convertApiDefinitionPackage);
|
|
1088103
|
+
__privateAdd(this, _convertApiDefinitionPackageId);
|
|
1088063
1088104
|
__publicField(this, "apiSection");
|
|
1088064
1088105
|
__publicField(this, "workspace");
|
|
1088065
1088106
|
__publicField(this, "docsWorkspace");
|
|
@@ -1088091,9 +1088132,9 @@ var ApiReferenceNodeConverter = class {
|
|
|
1088091
1088132
|
urlSlug: this.apiSection.slug ?? kebabCase_default2(this.apiSection.title)
|
|
1088092
1088133
|
}));
|
|
1088093
1088134
|
if (this.apiSection.navigation != null) {
|
|
1088094
|
-
__privateSet(this, _children, __privateMethod(this,
|
|
1088135
|
+
__privateSet(this, _children, __privateMethod(this, _convertApiReferenceLayoutItems, convertApiReferenceLayoutItems_fn).call(this, this.apiSection.navigation, __privateGet(this, _holder2).api.rootPackage, __privateGet(this, _slug), idgen));
|
|
1088095
1088136
|
}
|
|
1088096
|
-
__privateSet(this, _children, __privateMethod(this,
|
|
1088137
|
+
__privateSet(this, _children, __privateMethod(this, _mergeAndFilterChildren, mergeAndFilterChildren_fn).call(this, __privateGet(this, _children).map((child) => __privateMethod(this, _convertApiPackageChild, convertApiPackageChild_fn).call(this, child, __privateGet(this, _slug), idgen)), __privateMethod(this, _convertApiDefinitionPackage, convertApiDefinitionPackage_fn).call(this, __privateGet(this, _holder2).api.rootPackage, __privateGet(this, _slug), idgen)));
|
|
1088097
1088138
|
}
|
|
1088098
1088139
|
get() {
|
|
1088099
1088140
|
const pointsTo = navigation_exports2.utils.followRedirects(__privateGet(this, _children));
|
|
@@ -1088162,8 +1088203,8 @@ _nodeIdToSubpackageId = new WeakMap();
|
|
|
1088162
1088203
|
_children = new WeakMap();
|
|
1088163
1088204
|
_overviewPageId = new WeakMap();
|
|
1088164
1088205
|
_slug = new WeakMap();
|
|
1088165
|
-
|
|
1088166
|
-
|
|
1088206
|
+
_convertApiReferenceLayoutItems = new WeakSet();
|
|
1088207
|
+
convertApiReferenceLayoutItems_fn = function(navigation, apiDefinitionPackage, parentSlug, idgen) {
|
|
1088167
1088208
|
apiDefinitionPackage = __privateGet(this, _holder2).resolveSubpackage(apiDefinitionPackage);
|
|
1088168
1088209
|
const apiDefinitionPackageId = apiDefinitionPackage != null ? ApiDefinitionHolder2.getSubpackageId(apiDefinitionPackage) : void 0;
|
|
1088169
1088210
|
return navigation.map((item) => visitDiscriminatedUnion2(item)._visit({
|
|
@@ -1088177,22 +1088218,24 @@ convertApiNavigationItems_fn = function(navigation, apiDefinitionPackage, parent
|
|
|
1088177
1088218
|
page: (page) => {
|
|
1088178
1088219
|
var _a5;
|
|
1088179
1088220
|
const pageId = navigation_exports2.PageId(this.toRelativeFilepath(page.absolutePath));
|
|
1088221
|
+
const pageSlug = parentSlug.apply({
|
|
1088222
|
+
fullSlug: (_a5 = this.markdownFilesToFullSlugs.get(page.absolutePath)) == null ? void 0 : _a5.split("/"),
|
|
1088223
|
+
urlSlug: page.slug ?? kebabCase_default2(page.title)
|
|
1088224
|
+
});
|
|
1088180
1088225
|
return {
|
|
1088181
1088226
|
id: idgen.append(`page:${pageId}`).get(),
|
|
1088182
1088227
|
type: "page",
|
|
1088183
1088228
|
pageId,
|
|
1088184
1088229
|
title: page.title,
|
|
1088185
|
-
slug:
|
|
1088186
|
-
fullSlug: (_a5 = this.markdownFilesToFullSlugs.get(page.absolutePath)) == null ? void 0 : _a5.split("/"),
|
|
1088187
|
-
urlSlug: page.slug ?? kebabCase_default2(page.title)
|
|
1088188
|
-
}).get(),
|
|
1088230
|
+
slug: pageSlug.get(),
|
|
1088189
1088231
|
icon: page.icon,
|
|
1088190
1088232
|
hidden: page.hidden
|
|
1088191
1088233
|
};
|
|
1088192
1088234
|
},
|
|
1088193
1088235
|
package: (pkg2) => __privateMethod(this, _convertPackage, convertPackage_fn).call(this, pkg2, parentSlug, idgen),
|
|
1088194
1088236
|
section: (section) => __privateMethod(this, _convertSection, convertSection_fn).call(this, section, parentSlug, idgen),
|
|
1088195
|
-
item: ({ value: unknownIdentifier }) => __privateMethod(this, _convertUnknownIdentifier, convertUnknownIdentifier_fn).call(this, unknownIdentifier, apiDefinitionPackageId, parentSlug, idgen)
|
|
1088237
|
+
item: ({ value: unknownIdentifier }) => __privateMethod(this, _convertUnknownIdentifier, convertUnknownIdentifier_fn).call(this, unknownIdentifier, apiDefinitionPackageId, parentSlug, idgen),
|
|
1088238
|
+
endpoint: (endpoint) => __privateMethod(this, _convertEndpoint, convertEndpoint_fn).call(this, endpoint, apiDefinitionPackageId, parentSlug, idgen)
|
|
1088196
1088239
|
})).filter(isNonNullish);
|
|
1088197
1088240
|
};
|
|
1088198
1088241
|
_convertPackage = new WeakSet();
|
|
@@ -1088203,20 +1088246,23 @@ convertPackage_fn = function(pkg2, parentSlug, idgen) {
|
|
|
1088203
1088246
|
if (subpackage != null) {
|
|
1088204
1088247
|
const subpackageId = ApiDefinitionHolder2.getSubpackageId(subpackage);
|
|
1088205
1088248
|
const subpackageNodeId = idgen.append(subpackageId);
|
|
1088249
|
+
if (__privateGet(this, _visitedSubpackages2).has(subpackageId)) {
|
|
1088250
|
+
this.taskContext.logger.error(`Duplicate subpackage found in the API Reference layout: ${subpackageId}`);
|
|
1088251
|
+
}
|
|
1088206
1088252
|
__privateGet(this, _visitedSubpackages2).add(subpackageId);
|
|
1088207
|
-
__privateGet(this, _nodeIdToSubpackageId).set(subpackageNodeId.get(), subpackageId);
|
|
1088253
|
+
__privateGet(this, _nodeIdToSubpackageId).set(subpackageNodeId.get(), [subpackageId]);
|
|
1088208
1088254
|
const urlSlug = pkg2.slug ?? (isSubpackage2(subpackage) ? subpackage.urlSlug : this.apiSection.slug ?? kebabCase_default2(this.apiSection.title));
|
|
1088209
1088255
|
const slug = parentSlug.apply({
|
|
1088210
1088256
|
fullSlug: maybeFullSlug == null ? void 0 : maybeFullSlug.split("/"),
|
|
1088211
1088257
|
skipUrlSlug: pkg2.skipUrlSlug,
|
|
1088212
1088258
|
urlSlug
|
|
1088213
1088259
|
});
|
|
1088214
|
-
const convertedItems = __privateMethod(this,
|
|
1088260
|
+
const convertedItems = __privateMethod(this, _convertApiReferenceLayoutItems, convertApiReferenceLayoutItems_fn).call(this, pkg2.contents, subpackage, slug, subpackageNodeId);
|
|
1088215
1088261
|
return {
|
|
1088216
1088262
|
id: subpackageNodeId.get(),
|
|
1088217
1088263
|
type: "apiPackage",
|
|
1088218
1088264
|
children: convertedItems,
|
|
1088219
|
-
title: isSubpackage2(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title,
|
|
1088265
|
+
title: pkg2.title ?? (isSubpackage2(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title),
|
|
1088220
1088266
|
slug: slug.get(),
|
|
1088221
1088267
|
icon: pkg2.icon,
|
|
1088222
1088268
|
hidden: pkg2.hidden,
|
|
@@ -1088226,19 +1088272,19 @@ convertPackage_fn = function(pkg2, parentSlug, idgen) {
|
|
|
1088226
1088272
|
pointsTo: void 0
|
|
1088227
1088273
|
};
|
|
1088228
1088274
|
} else {
|
|
1088229
|
-
this.taskContext.logger.
|
|
1088275
|
+
this.taskContext.logger.warn(`Subpackage ${pkg2.package} not found in ${this.apiDefinitionId}, treating it as a section`);
|
|
1088230
1088276
|
const urlSlug = pkg2.slug ?? kebabCase_default2(pkg2.package);
|
|
1088231
1088277
|
const slug = parentSlug.apply({
|
|
1088232
1088278
|
fullSlug: maybeFullSlug == null ? void 0 : maybeFullSlug.split("/"),
|
|
1088233
1088279
|
skipUrlSlug: pkg2.skipUrlSlug,
|
|
1088234
1088280
|
urlSlug
|
|
1088235
1088281
|
});
|
|
1088236
|
-
const convertedItems = __privateMethod(this,
|
|
1088282
|
+
const convertedItems = __privateMethod(this, _convertApiReferenceLayoutItems, convertApiReferenceLayoutItems_fn).call(this, pkg2.contents, void 0, slug, idgen);
|
|
1088237
1088283
|
return {
|
|
1088238
1088284
|
id: idgen.append(kebabCase_default2(pkg2.package)).get(),
|
|
1088239
1088285
|
type: "apiPackage",
|
|
1088240
1088286
|
children: convertedItems,
|
|
1088241
|
-
title: pkg2.package,
|
|
1088287
|
+
title: pkg2.title ?? pkg2.package,
|
|
1088242
1088288
|
slug: slug.get(),
|
|
1088243
1088289
|
icon: pkg2.icon,
|
|
1088244
1088290
|
hidden: pkg2.hidden,
|
|
@@ -1088253,28 +1088299,34 @@ _convertSection = new WeakSet();
|
|
|
1088253
1088299
|
convertSection_fn = function(section, parentSlug, idgen) {
|
|
1088254
1088300
|
const overviewPageId = section.summaryAbsolutePath != null ? navigation_exports2.PageId(this.toRelativeFilepath(section.summaryAbsolutePath)) : void 0;
|
|
1088255
1088301
|
const maybeFullSlug = section.summaryAbsolutePath != null ? this.markdownFilesToFullSlugs.get(section.summaryAbsolutePath) : void 0;
|
|
1088256
|
-
const nodeId = idgen.append(`section:${kebabCase_default2(section.
|
|
1088257
|
-
section.
|
|
1088302
|
+
const nodeId = idgen.append(`section:${kebabCase_default2(section.title)}`);
|
|
1088303
|
+
const subpackages = section.referencedSubpackages.filter((subpackageId) => {
|
|
1088258
1088304
|
const subpackage = __privateGet(this, _holder2).getSubpackage(subpackageId);
|
|
1088259
1088305
|
if (subpackage == null) {
|
|
1088260
1088306
|
this.taskContext.logger.error(`Subpackage ${subpackageId} not found in ${this.apiDefinitionId}`);
|
|
1088261
|
-
return;
|
|
1088307
|
+
return false;
|
|
1088308
|
+
}
|
|
1088309
|
+
return true;
|
|
1088310
|
+
});
|
|
1088311
|
+
__privateGet(this, _nodeIdToSubpackageId).set(nodeId.get(), subpackages);
|
|
1088312
|
+
subpackages.forEach((subpackageId) => {
|
|
1088313
|
+
if (__privateGet(this, _visitedSubpackages2).has(subpackageId)) {
|
|
1088314
|
+
this.taskContext.logger.error(`Duplicate subpackage found in the API Reference layout: ${subpackageId}`);
|
|
1088262
1088315
|
}
|
|
1088263
1088316
|
__privateGet(this, _visitedSubpackages2).add(subpackageId);
|
|
1088264
|
-
__privateGet(this, _nodeIdToSubpackageId).set(nodeId.get(), subpackageId);
|
|
1088265
1088317
|
});
|
|
1088266
|
-
const urlSlug = section.slug ?? kebabCase_default2(section.
|
|
1088318
|
+
const urlSlug = section.slug ?? kebabCase_default2(section.title);
|
|
1088267
1088319
|
const slug = parentSlug.apply({
|
|
1088268
1088320
|
fullSlug: maybeFullSlug == null ? void 0 : maybeFullSlug.split("/"),
|
|
1088269
1088321
|
skipUrlSlug: section.skipUrlSlug,
|
|
1088270
1088322
|
urlSlug
|
|
1088271
1088323
|
});
|
|
1088272
|
-
const convertedItems = __privateMethod(this,
|
|
1088324
|
+
const convertedItems = __privateMethod(this, _convertApiReferenceLayoutItems, convertApiReferenceLayoutItems_fn).call(this, section.contents, void 0, slug, idgen);
|
|
1088273
1088325
|
return {
|
|
1088274
1088326
|
id: nodeId.get(),
|
|
1088275
1088327
|
type: "apiPackage",
|
|
1088276
1088328
|
children: convertedItems,
|
|
1088277
|
-
title: section.
|
|
1088329
|
+
title: section.title,
|
|
1088278
1088330
|
slug: slug.get(),
|
|
1088279
1088331
|
icon: section.icon,
|
|
1088280
1088332
|
hidden: section.hidden,
|
|
@@ -1088284,11 +1088336,143 @@ convertSection_fn = function(section, parentSlug, idgen) {
|
|
|
1088284
1088336
|
pointsTo: void 0
|
|
1088285
1088337
|
};
|
|
1088286
1088338
|
};
|
|
1088339
|
+
_convertUnknownIdentifier = new WeakSet();
|
|
1088340
|
+
convertUnknownIdentifier_fn = function(unknownIdentifier, apiDefinitionPackageId, parentSlug, idgen) {
|
|
1088341
|
+
unknownIdentifier = unknownIdentifier.trim();
|
|
1088342
|
+
const subpackage = __privateGet(this, _holder2).getSubpackage(unknownIdentifier);
|
|
1088343
|
+
if (subpackage != null) {
|
|
1088344
|
+
const subpackageId = ApiDefinitionHolder2.getSubpackageId(subpackage);
|
|
1088345
|
+
const subpackageNodeId = idgen.append(subpackageId);
|
|
1088346
|
+
if (__privateGet(this, _visitedSubpackages2).has(subpackageId)) {
|
|
1088347
|
+
this.taskContext.logger.error(`Duplicate subpackage found in the API Reference layout: ${subpackageId}`);
|
|
1088348
|
+
}
|
|
1088349
|
+
__privateGet(this, _visitedSubpackages2).add(subpackageId);
|
|
1088350
|
+
__privateGet(this, _nodeIdToSubpackageId).set(subpackageNodeId.get(), [subpackageId]);
|
|
1088351
|
+
const urlSlug = isSubpackage2(subpackage) ? subpackage.urlSlug : "";
|
|
1088352
|
+
const slug = parentSlug.apply({ urlSlug });
|
|
1088353
|
+
return {
|
|
1088354
|
+
id: subpackageNodeId.get(),
|
|
1088355
|
+
type: "apiPackage",
|
|
1088356
|
+
children: [],
|
|
1088357
|
+
title: isSubpackage2(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title,
|
|
1088358
|
+
slug: slug.get(),
|
|
1088359
|
+
icon: void 0,
|
|
1088360
|
+
hidden: void 0,
|
|
1088361
|
+
overviewPageId: void 0,
|
|
1088362
|
+
availability: void 0,
|
|
1088363
|
+
apiDefinitionId: this.apiDefinitionId,
|
|
1088364
|
+
pointsTo: void 0
|
|
1088365
|
+
};
|
|
1088366
|
+
}
|
|
1088367
|
+
return __privateMethod(this, _convertEndpoint, convertEndpoint_fn).call(this, {
|
|
1088368
|
+
type: "endpoint",
|
|
1088369
|
+
endpoint: unknownIdentifier,
|
|
1088370
|
+
title: void 0,
|
|
1088371
|
+
icon: void 0,
|
|
1088372
|
+
slug: void 0,
|
|
1088373
|
+
hidden: void 0
|
|
1088374
|
+
}, apiDefinitionPackageId, parentSlug, idgen);
|
|
1088375
|
+
};
|
|
1088376
|
+
_convertEndpoint = new WeakSet();
|
|
1088377
|
+
convertEndpoint_fn = function(endpointItem, apiDefinitionPackageId, parentSlug, idgen) {
|
|
1088378
|
+
var _a5, _b4, _c4, _d2;
|
|
1088379
|
+
const endpoint = (apiDefinitionPackageId != null ? (_a5 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _a5.endpoints.get(endpointItem.endpoint) : void 0) ?? __privateGet(this, _holder2).endpointsByLocator.get(endpointItem.endpoint);
|
|
1088380
|
+
if (endpoint != null) {
|
|
1088381
|
+
const endpointId = __privateGet(this, _holder2).getEndpointId(endpoint);
|
|
1088382
|
+
if (endpointId == null) {
|
|
1088383
|
+
throw new Error(`Expected Endpoint ID for ${endpoint.id}. Got undefined.`);
|
|
1088384
|
+
}
|
|
1088385
|
+
if (__privateGet(this, _visitedEndpoints2).has(endpointId)) {
|
|
1088386
|
+
this.taskContext.logger.error(`Duplicate endpoint found in the API Reference layout: ${endpointId}`);
|
|
1088387
|
+
}
|
|
1088388
|
+
__privateGet(this, _visitedEndpoints2).add(endpointId);
|
|
1088389
|
+
return {
|
|
1088390
|
+
id: idgen.append(endpoint.id).get(),
|
|
1088391
|
+
type: "endpoint",
|
|
1088392
|
+
method: endpoint.method,
|
|
1088393
|
+
endpointId,
|
|
1088394
|
+
apiDefinitionId: this.apiDefinitionId,
|
|
1088395
|
+
availability: navigation_exports2.utils.convertAvailability(endpoint.availability),
|
|
1088396
|
+
isResponseStream: ((_b4 = endpoint.response) == null ? void 0 : _b4.type.type) === "stream",
|
|
1088397
|
+
title: endpointItem.title ?? endpoint.name ?? stringifyEndpointPathParts2(endpoint.path.parts),
|
|
1088398
|
+
slug: (endpointItem.slug != null ? parentSlug.append(endpointItem.slug) : parentSlug.apply(endpoint)).get(),
|
|
1088399
|
+
icon: endpointItem.icon,
|
|
1088400
|
+
hidden: endpointItem.hidden
|
|
1088401
|
+
};
|
|
1088402
|
+
}
|
|
1088403
|
+
const webSocket = (apiDefinitionPackageId != null ? (_c4 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _c4.webSockets.get(endpointItem.endpoint) : void 0) ?? __privateGet(this, _holder2).webSocketsByLocator.get(endpointItem.endpoint);
|
|
1088404
|
+
if (webSocket != null) {
|
|
1088405
|
+
const webSocketId = __privateGet(this, _holder2).getWebSocketId(webSocket);
|
|
1088406
|
+
if (webSocketId == null) {
|
|
1088407
|
+
throw new Error(`Expected WebSocket ID for ${webSocket.id}. Got undefined.`);
|
|
1088408
|
+
}
|
|
1088409
|
+
if (__privateGet(this, _visitedWebSockets2).has(webSocketId)) {
|
|
1088410
|
+
this.taskContext.logger.error(`Duplicate web socket found in the API Reference layout: ${webSocketId}`);
|
|
1088411
|
+
}
|
|
1088412
|
+
__privateGet(this, _visitedWebSockets2).add(webSocketId);
|
|
1088413
|
+
return {
|
|
1088414
|
+
id: idgen.append(webSocket.id).get(),
|
|
1088415
|
+
type: "webSocket",
|
|
1088416
|
+
webSocketId,
|
|
1088417
|
+
title: endpointItem.title ?? webSocket.name ?? stringifyEndpointPathParts2(webSocket.path.parts),
|
|
1088418
|
+
slug: (endpointItem.slug != null ? parentSlug.append(endpointItem.slug) : parentSlug.apply(webSocket)).get(),
|
|
1088419
|
+
icon: endpointItem.icon,
|
|
1088420
|
+
hidden: endpointItem.hidden,
|
|
1088421
|
+
apiDefinitionId: this.apiDefinitionId,
|
|
1088422
|
+
availability: navigation_exports2.utils.convertAvailability(webSocket.availability)
|
|
1088423
|
+
};
|
|
1088424
|
+
}
|
|
1088425
|
+
const webhook = (apiDefinitionPackageId != null ? (_d2 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _d2.webhooks.get(endpointItem.endpoint) : void 0) ?? __privateGet(this, _holder2).webhooks.get(navigation_exports2.WebhookId(endpointItem.endpoint));
|
|
1088426
|
+
if (webhook != null) {
|
|
1088427
|
+
const webhookId = __privateGet(this, _holder2).getWebhookId(webhook);
|
|
1088428
|
+
if (webhookId == null) {
|
|
1088429
|
+
throw new Error(`Expected Webhook ID for ${webhook.id}. Got undefined.`);
|
|
1088430
|
+
}
|
|
1088431
|
+
if (__privateGet(this, _visitedWebhooks2).has(webhookId)) {
|
|
1088432
|
+
this.taskContext.logger.error(`Duplicate webhook found in the API Reference layout: ${webhookId}`);
|
|
1088433
|
+
}
|
|
1088434
|
+
__privateGet(this, _visitedWebhooks2).add(webhookId);
|
|
1088435
|
+
return {
|
|
1088436
|
+
id: idgen.append(webhook.id).get(),
|
|
1088437
|
+
type: "webhook",
|
|
1088438
|
+
webhookId,
|
|
1088439
|
+
method: webhook.method,
|
|
1088440
|
+
title: endpointItem.title ?? webhook.name ?? urlJoin22("/", ...webhook.path),
|
|
1088441
|
+
slug: (endpointItem.slug != null ? parentSlug.append(endpointItem.slug) : parentSlug.apply(webhook)).get(),
|
|
1088442
|
+
icon: endpointItem.icon,
|
|
1088443
|
+
hidden: endpointItem.hidden,
|
|
1088444
|
+
apiDefinitionId: this.apiDefinitionId,
|
|
1088445
|
+
availability: void 0
|
|
1088446
|
+
};
|
|
1088447
|
+
}
|
|
1088448
|
+
this.taskContext.logger.error("Unknown identifier in the API Reference layout: ", endpointItem.endpoint);
|
|
1088449
|
+
return;
|
|
1088450
|
+
};
|
|
1088451
|
+
_mergeAndFilterChildren = new WeakSet();
|
|
1088452
|
+
mergeAndFilterChildren_fn = function(left3, right3) {
|
|
1088453
|
+
return this.mergeEndpointPairs([...left3, ...right3], NodeIdGenerator2.init(this.apiDefinitionId)).filter((child) => child.type === "apiPackage" ? child.children.length > 0 : true);
|
|
1088454
|
+
};
|
|
1088455
|
+
_convertApiPackageChild = new WeakSet();
|
|
1088456
|
+
convertApiPackageChild_fn = function(child, parentSlug, idgen) {
|
|
1088457
|
+
if (child.type === "apiPackage") {
|
|
1088458
|
+
const slug = parentSlug.set(child.slug);
|
|
1088459
|
+
const innerIdgen = idgen.append(kebabCase_default2(child.title));
|
|
1088460
|
+
const subpackageIds = __privateGet(this, _nodeIdToSubpackageId).get(child.id) ?? [];
|
|
1088461
|
+
const subpackageChildren = subpackageIds.flatMap((subpackageId) => __privateMethod(this, _convertApiDefinitionPackageId, convertApiDefinitionPackageId_fn).call(this, subpackageId, slug, innerIdgen));
|
|
1088462
|
+
const children2 = __privateMethod(this, _mergeAndFilterChildren, mergeAndFilterChildren_fn).call(this, child.children, subpackageChildren);
|
|
1088463
|
+
return {
|
|
1088464
|
+
...child,
|
|
1088465
|
+
children: children2,
|
|
1088466
|
+
pointsTo: navigation_exports2.utils.followRedirects(children2)
|
|
1088467
|
+
};
|
|
1088468
|
+
}
|
|
1088469
|
+
return child;
|
|
1088470
|
+
};
|
|
1088287
1088471
|
_convertApiDefinitionPackage = new WeakSet();
|
|
1088288
|
-
convertApiDefinitionPackage_fn = function(
|
|
1088289
|
-
const pkg2 = packageId != null ? __privateGet(this, _holder2).resolveSubpackage(__privateGet(this, _holder2).getSubpackage(packageId)) : void 0;
|
|
1088472
|
+
convertApiDefinitionPackage_fn = function(pkg2, parentSlug, idgen) {
|
|
1088290
1088473
|
let additionalChildren = [];
|
|
1088291
|
-
|
|
1088474
|
+
idgen = idgen.append(isSubpackage2(pkg2) ? pkg2.subpackageId : ROOT_PACKAGE_ID);
|
|
1088475
|
+
pkg2.endpoints.forEach((endpoint) => {
|
|
1088292
1088476
|
var _a5;
|
|
1088293
1088477
|
const endpointId = __privateGet(this, _holder2).getEndpointId(endpoint);
|
|
1088294
1088478
|
if (endpointId == null) {
|
|
@@ -1088311,7 +1088495,7 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088311
1088495
|
hidden: void 0
|
|
1088312
1088496
|
});
|
|
1088313
1088497
|
});
|
|
1088314
|
-
pkg2
|
|
1088498
|
+
pkg2.websockets.forEach((webSocket) => {
|
|
1088315
1088499
|
const webSocketId = __privateGet(this, _holder2).getWebSocketId(webSocket);
|
|
1088316
1088500
|
if (webSocketId == null) {
|
|
1088317
1088501
|
throw new Error(`Expected WebSocket ID for ${webSocket.id}. Got undefined.`);
|
|
@@ -1088331,7 +1088515,7 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088331
1088515
|
availability: navigation_exports2.utils.convertAvailability(webSocket.availability)
|
|
1088332
1088516
|
});
|
|
1088333
1088517
|
});
|
|
1088334
|
-
pkg2
|
|
1088518
|
+
pkg2.webhooks.forEach((webhook) => {
|
|
1088335
1088519
|
const webhookId = __privateGet(this, _holder2).getWebhookId(webhook);
|
|
1088336
1088520
|
if (webhookId == null) {
|
|
1088337
1088521
|
throw new Error(`Expected Webhook ID for ${webhook.id}. Got undefined.`);
|
|
@@ -1088344,7 +1088528,7 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088344
1088528
|
type: "webhook",
|
|
1088345
1088529
|
webhookId,
|
|
1088346
1088530
|
method: webhook.method,
|
|
1088347
|
-
title: webhook.name ??
|
|
1088531
|
+
title: webhook.name ?? titleCase(webhook.id),
|
|
1088348
1088532
|
slug: parentSlug.apply(webhook).get(),
|
|
1088349
1088533
|
icon: void 0,
|
|
1088350
1088534
|
hidden: void 0,
|
|
@@ -1088352,7 +1088536,7 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088352
1088536
|
availability: void 0
|
|
1088353
1088537
|
});
|
|
1088354
1088538
|
});
|
|
1088355
|
-
pkg2
|
|
1088539
|
+
pkg2.subpackages.forEach((subpackageId) => {
|
|
1088356
1088540
|
if (__privateGet(this, _visitedSubpackages2).has(subpackageId)) {
|
|
1088357
1088541
|
return;
|
|
1088358
1088542
|
}
|
|
@@ -1088363,7 +1088547,7 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088363
1088547
|
}
|
|
1088364
1088548
|
const subpackageNodeId = idgen.append(subpackageId);
|
|
1088365
1088549
|
const slug = isSubpackage2(subpackage) ? parentSlug.apply(subpackage) : parentSlug;
|
|
1088366
|
-
const subpackageChildren = __privateMethod(this,
|
|
1088550
|
+
const subpackageChildren = __privateMethod(this, _convertApiDefinitionPackageId, convertApiDefinitionPackageId_fn).call(this, subpackageId, slug, subpackageNodeId);
|
|
1088367
1088551
|
additionalChildren.push({
|
|
1088368
1088552
|
id: subpackageNodeId.get(),
|
|
1088369
1088553
|
type: "apiPackage",
|
|
@@ -1088385,124 +1088569,16 @@ convertApiDefinitionPackage_fn = function(packageId, children2, parentSlug, idge
|
|
|
1088385
1088569
|
return aTitle.localeCompare(bTitle);
|
|
1088386
1088570
|
});
|
|
1088387
1088571
|
}
|
|
1088388
|
-
|
|
1088389
|
-
...children2.map((child) => {
|
|
1088390
|
-
if (child.type === "apiPackage") {
|
|
1088391
|
-
const subpackageId = __privateGet(this, _nodeIdToSubpackageId).get(child.id);
|
|
1088392
|
-
const newChildren = __privateMethod(this, _convertApiDefinitionPackage, convertApiDefinitionPackage_fn).call(this, subpackageId, child.children, parentSlug.set(child.slug), idgen.append(subpackageId ?? kebabCase_default2(child.title)));
|
|
1088393
|
-
return {
|
|
1088394
|
-
...child,
|
|
1088395
|
-
children: newChildren,
|
|
1088396
|
-
pointsTo: navigation_exports2.utils.followRedirects(newChildren)
|
|
1088397
|
-
};
|
|
1088398
|
-
}
|
|
1088399
|
-
return child;
|
|
1088400
|
-
}),
|
|
1088401
|
-
...additionalChildren
|
|
1088402
|
-
];
|
|
1088403
|
-
toRet = this.mergeEndpointPairs(toRet, idgen);
|
|
1088404
|
-
return toRet.filter((child) => child.type === "apiPackage" ? child.children.length > 0 : true);
|
|
1088572
|
+
return additionalChildren;
|
|
1088405
1088573
|
};
|
|
1088406
|
-
|
|
1088407
|
-
|
|
1088408
|
-
|
|
1088409
|
-
|
|
1088410
|
-
|
|
1088411
|
-
|
|
1088412
|
-
const subpackageId = ApiDefinitionHolder2.getSubpackageId(subpackage);
|
|
1088413
|
-
const subpackageNodeId = idgen.append(subpackageId);
|
|
1088414
|
-
if (__privateGet(this, _visitedSubpackages2).has(subpackageId)) {
|
|
1088415
|
-
this.taskContext.logger.error(`Duplicate subpackage found in the API Reference layout: ${subpackageId}`);
|
|
1088416
|
-
}
|
|
1088417
|
-
__privateGet(this, _visitedSubpackages2).add(subpackageId);
|
|
1088418
|
-
__privateGet(this, _nodeIdToSubpackageId).set(subpackageNodeId.get(), subpackageId);
|
|
1088419
|
-
const urlSlug = isSubpackage2(subpackage) ? subpackage.urlSlug : "";
|
|
1088420
|
-
const slug = parentSlug.apply({ urlSlug });
|
|
1088421
|
-
return {
|
|
1088422
|
-
id: subpackageNodeId.get(),
|
|
1088423
|
-
type: "apiPackage",
|
|
1088424
|
-
children: [],
|
|
1088425
|
-
title: isSubpackage2(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title,
|
|
1088426
|
-
slug: slug.get(),
|
|
1088427
|
-
icon: void 0,
|
|
1088428
|
-
hidden: void 0,
|
|
1088429
|
-
overviewPageId: void 0,
|
|
1088430
|
-
availability: void 0,
|
|
1088431
|
-
apiDefinitionId: this.apiDefinitionId,
|
|
1088432
|
-
pointsTo: void 0
|
|
1088433
|
-
};
|
|
1088434
|
-
}
|
|
1088435
|
-
const endpoint = (apiDefinitionPackageId != null ? (_a5 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _a5.endpoints.get(unknownIdentifier) : void 0) ?? __privateGet(this, _holder2).endpointsByLocator.get(unknownIdentifier);
|
|
1088436
|
-
if (endpoint != null) {
|
|
1088437
|
-
const endpointId = __privateGet(this, _holder2).getEndpointId(endpoint);
|
|
1088438
|
-
if (endpointId == null) {
|
|
1088439
|
-
throw new Error(`Expected Endpoint ID for ${endpoint.id}. Got undefined.`);
|
|
1088440
|
-
}
|
|
1088441
|
-
if (__privateGet(this, _visitedEndpoints2).has(endpointId)) {
|
|
1088442
|
-
this.taskContext.logger.error(`Duplicate endpoint found in the API Reference layout: ${endpointId}`);
|
|
1088443
|
-
}
|
|
1088444
|
-
__privateGet(this, _visitedEndpoints2).add(endpointId);
|
|
1088445
|
-
return {
|
|
1088446
|
-
id: idgen.append(endpoint.id).get(),
|
|
1088447
|
-
type: "endpoint",
|
|
1088448
|
-
method: endpoint.method,
|
|
1088449
|
-
endpointId,
|
|
1088450
|
-
apiDefinitionId: this.apiDefinitionId,
|
|
1088451
|
-
availability: navigation_exports2.utils.convertAvailability(endpoint.availability),
|
|
1088452
|
-
isResponseStream: ((_b4 = endpoint.response) == null ? void 0 : _b4.type.type) === "stream",
|
|
1088453
|
-
title: endpoint.name ?? stringifyEndpointPathParts2(endpoint.path.parts),
|
|
1088454
|
-
slug: parentSlug.apply(endpoint).get(),
|
|
1088455
|
-
icon: void 0,
|
|
1088456
|
-
hidden: void 0
|
|
1088457
|
-
};
|
|
1088458
|
-
}
|
|
1088459
|
-
const webSocket = (apiDefinitionPackageId != null ? (_c4 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _c4.webSockets.get(unknownIdentifier) : void 0) ?? __privateGet(this, _holder2).webSocketsByLocator.get(unknownIdentifier);
|
|
1088460
|
-
if (webSocket != null) {
|
|
1088461
|
-
const webSocketId = __privateGet(this, _holder2).getWebSocketId(webSocket);
|
|
1088462
|
-
if (webSocketId == null) {
|
|
1088463
|
-
throw new Error(`Expected WebSocket ID for ${webSocket.id}. Got undefined.`);
|
|
1088464
|
-
}
|
|
1088465
|
-
if (__privateGet(this, _visitedWebSockets2).has(webSocketId)) {
|
|
1088466
|
-
this.taskContext.logger.error(`Duplicate web socket found in the API Reference layout: ${webSocketId}`);
|
|
1088467
|
-
}
|
|
1088468
|
-
__privateGet(this, _visitedWebSockets2).add(webSocketId);
|
|
1088469
|
-
return {
|
|
1088470
|
-
id: idgen.append(webSocket.id).get(),
|
|
1088471
|
-
type: "webSocket",
|
|
1088472
|
-
webSocketId,
|
|
1088473
|
-
title: webSocket.name ?? stringifyEndpointPathParts2(webSocket.path.parts),
|
|
1088474
|
-
slug: parentSlug.apply(webSocket).get(),
|
|
1088475
|
-
icon: void 0,
|
|
1088476
|
-
hidden: void 0,
|
|
1088477
|
-
apiDefinitionId: this.apiDefinitionId,
|
|
1088478
|
-
availability: navigation_exports2.utils.convertAvailability(webSocket.availability)
|
|
1088479
|
-
};
|
|
1088480
|
-
}
|
|
1088481
|
-
const webhook = (apiDefinitionPackageId != null ? (_d2 = __privateGet(this, _holder2).subpackages.get(apiDefinitionPackageId)) == null ? void 0 : _d2.webhooks.get(unknownIdentifier) : void 0) ?? __privateGet(this, _holder2).webhooks.get(navigation_exports2.WebhookId(unknownIdentifier));
|
|
1088482
|
-
if (webhook != null) {
|
|
1088483
|
-
const webhookId = __privateGet(this, _holder2).getWebhookId(webhook);
|
|
1088484
|
-
if (webhookId == null) {
|
|
1088485
|
-
throw new Error(`Expected Webhook ID for ${webhook.id}. Got undefined.`);
|
|
1088486
|
-
}
|
|
1088487
|
-
if (__privateGet(this, _visitedWebhooks2).has(webhookId)) {
|
|
1088488
|
-
this.taskContext.logger.error(`Duplicate webhook found in the API Reference layout: ${webhookId}`);
|
|
1088489
|
-
}
|
|
1088490
|
-
__privateGet(this, _visitedWebhooks2).add(webhookId);
|
|
1088491
|
-
return {
|
|
1088492
|
-
id: idgen.append(webhook.id).get(),
|
|
1088493
|
-
type: "webhook",
|
|
1088494
|
-
webhookId,
|
|
1088495
|
-
method: webhook.method,
|
|
1088496
|
-
title: webhook.name ?? urlJoin22("/", ...webhook.path),
|
|
1088497
|
-
slug: parentSlug.apply(webhook).get(),
|
|
1088498
|
-
icon: void 0,
|
|
1088499
|
-
hidden: void 0,
|
|
1088500
|
-
apiDefinitionId: this.apiDefinitionId,
|
|
1088501
|
-
availability: void 0
|
|
1088502
|
-
};
|
|
1088574
|
+
_convertApiDefinitionPackageId = new WeakSet();
|
|
1088575
|
+
convertApiDefinitionPackageId_fn = function(packageId, parentSlug, idgen) {
|
|
1088576
|
+
const pkg2 = packageId != null ? __privateGet(this, _holder2).resolveSubpackage(__privateGet(this, _holder2).getSubpackage(packageId)) : void 0;
|
|
1088577
|
+
if (pkg2 == null) {
|
|
1088578
|
+
this.taskContext.logger.error(`Subpackage ${packageId} not found in ${this.apiDefinitionId}`);
|
|
1088579
|
+
return [];
|
|
1088503
1088580
|
}
|
|
1088504
|
-
this.
|
|
1088505
|
-
return;
|
|
1088581
|
+
return __privateMethod(this, _convertApiDefinitionPackage, convertApiDefinitionPackage_fn).call(this, pkg2, parentSlug, idgen);
|
|
1088506
1088582
|
};
|
|
1088507
1088583
|
|
|
1088508
1088584
|
// pnp:/home/circleci/project/packages/cli/docs-resolver/lib/utils/convertDocsSnippetsConfigToFdr.js
|