@aws-sdk/service-client-documentation-generator
Advanced tools
Comparing version 3.208.0 to 3.292.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const sdk_client_comment_update_1 = require("./sdk-client-comment-update"); | ||
const sdk_client_remove_navigator_1 = require("./sdk-client-remove-navigator"); | ||
const sdk_client_rename_project_1 = require("./sdk-client-rename-project"); | ||
exports.load = void 0; | ||
const typedoc_1 = require("typedoc"); | ||
const sdk_client_toc_plugin_1 = require("./sdk-client-toc-plugin"); | ||
module.exports = function load(pluginHost) { | ||
const application = pluginHost.owner; | ||
application.converter.addComponent("SdkClientCommentUpdatePlugin", new sdk_client_comment_update_1.SdkClientCommentUpdatePlugin(application.converter)); | ||
application.renderer.addComponent("SdkClientTocPlugin", new sdk_client_toc_plugin_1.SdkClientTocPlugin(application.renderer)); | ||
application.renderer.addComponent("SdkClientRenameProjectPlugin", new sdk_client_rename_project_1.SdkClientRenameProjectPlugin(application.renderer)); | ||
application.renderer.addComponent("SdkClientRemoveNavigatorPlugin", new sdk_client_remove_navigator_1.SdkClientRemoveNavigatorPlugin(application.renderer)); | ||
}; | ||
function load(app) { | ||
app.options.addDeclaration({ | ||
name: "defaultGroup", | ||
help: "Default group to place categories as children", | ||
defaultValue: "SDK", | ||
type: typedoc_1.ParameterType.String, | ||
}); | ||
new sdk_client_toc_plugin_1.SdkClientTocPlugin(app.options, app.logger, app.renderer); | ||
} | ||
exports.load = load; |
@@ -6,42 +6,42 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const reflections_1 = require("typedoc/dist/lib/models/reflections"); | ||
const components_1 = require("typedoc/dist/lib/output/components"); | ||
const events_1 = require("typedoc/dist/lib/output/events"); | ||
const NavigationItem_1 = require("typedoc/dist/lib/output/models/NavigationItem"); | ||
const typedoc_1 = require("typedoc"); | ||
const utils_1 = require("./utils"); | ||
let SdkClientTocPlugin = class SdkClientTocPlugin extends components_1.RendererComponent { | ||
initialize() { | ||
const tocPlugin = this.owner.application.renderer.getComponent("toc"); | ||
this.owner.off(events_1.PageEvent.BEGIN, tocPlugin.onRendererBeginPage); | ||
this.listenTo(this.owner, { | ||
[events_1.PageEvent.BEGIN]: this.onRendererBeginPage, | ||
}); | ||
class SdkClientTocPlugin { | ||
constructor(options, logger, renderer) { | ||
this.options = options; | ||
this.logger = logger; | ||
this.renderer = renderer; | ||
this.onEndResolve = (context) => { | ||
var _a; | ||
if (!this.clientDir) | ||
this.clientDir = this.loadClientDir(context.project); | ||
for (const model of Object.values(context.project.reflections)) { | ||
const isEffectiveParent = (model instanceof typedoc_1.ContainerReflection && ((_a = model.children) === null || _a === void 0 ? void 0 : _a.length)) || model.isProject(); | ||
if (!isEffectiveParent || model.kindOf(typedoc_1.ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (!model.groups) { | ||
model.groups = []; | ||
} | ||
let group = model.groups.find((value) => value.title === this.defaultGroup); | ||
if (!group) { | ||
group = new typedoc_1.ReflectionGroup(this.defaultGroup); | ||
model.groups.push(group); | ||
} | ||
group.categories = this.defineCategories(group, model.children); | ||
const modulesIndex = model.groups.findIndex((value) => value.title === "Modules"); | ||
if (modulesIndex >= 0) { | ||
model.groups.splice(modulesIndex, 1); | ||
} | ||
} | ||
}; | ||
this.renderer.application.converter.on(typedoc_1.Converter.EVENT_RESOLVE_END, this.onEndResolve); | ||
} | ||
onRendererBeginPage(page) { | ||
let model = page.model; | ||
if (!model.constructor.name.endsWith("Reflection")) { | ||
return; | ||
} | ||
const trail = []; | ||
while (model.constructor.name !== "ProjectReflection" && !model.kindOf(reflections_1.ReflectionKind.SomeModule)) { | ||
trail.unshift(model); | ||
model = model.parent; | ||
} | ||
const tocRestriction = this.owner.toc; | ||
page.toc = new NavigationItem_1.NavigationItem(model.name); | ||
if (!model.parent && !trail.length) { | ||
this.clientsNavigationItem = new NavigationItem_1.NavigationItem("Clients", void 0, page.toc); | ||
this.commandsNavigationItem = new NavigationItem_1.NavigationItem("Commands", void 0, page.toc); | ||
this.paginatorsNavigationItem = new NavigationItem_1.NavigationItem("Paginators", void 0, page.toc); | ||
this.waitersNavigationItem = new NavigationItem_1.NavigationItem("Waiters", void 0, page.toc); | ||
} | ||
this.buildToc(model, trail, page.toc, tocRestriction); | ||
} | ||
belongsToClientPackage(model) { | ||
var _a, _b; | ||
return this.clientDir && ((_b = (_a = model.sources) === null || _a === void 0 ? void 0 : _a[0].file) === null || _b === void 0 ? void 0 : _b.fullFileName.indexOf(this.clientDir)) === 0; | ||
var _a; | ||
return this.clientDir && ((_a = model.sources) === null || _a === void 0 ? void 0 : _a[0].fullFileName.indexOf(this.clientDir)) === 0; | ||
} | ||
isClient(model) { | ||
const { extendedTypes = [] } = model; | ||
return (model.kindOf(reflections_1.ReflectionKind.Class) && | ||
return (model.kindOf(typedoc_1.ReflectionKind.Class) && | ||
model.getFullName() !== "Client" && | ||
@@ -53,3 +53,3 @@ (model.name.endsWith("Client") || | ||
isCommand(model) { | ||
return (model.kindOf(reflections_1.ReflectionKind.Class) && | ||
return (model.kindOf(typedoc_1.ReflectionKind.Class) && | ||
model.name.endsWith("Command") && | ||
@@ -59,6 +59,6 @@ this.belongsToClientPackage(model)); | ||
isPaginator(model) { | ||
return (model.name.startsWith("paginate") && model.kindOf(reflections_1.ReflectionKind.Function) && this.belongsToClientPackage(model)); | ||
return (model.name.startsWith("paginate") && model.kindOf(typedoc_1.ReflectionKind.Function) && this.belongsToClientPackage(model)); | ||
} | ||
isInputOrOutput(model) { | ||
return (model.kindOf(reflections_1.ReflectionKind.Interface) && | ||
return (model.kindOf(typedoc_1.ReflectionKind.Interface) && | ||
(model.name.endsWith("CommandInput") || model.name.endsWith("CommandOutput")) && | ||
@@ -68,64 +68,61 @@ this.belongsToClientPackage(model)); | ||
isWaiter(model) { | ||
return (model.name.startsWith("waitFor") && model.kindOf(reflections_1.ReflectionKind.Function) && this.belongsToClientPackage(model)); | ||
return (model.name.startsWith("waitFor") && model.kindOf(typedoc_1.ReflectionKind.Function) && this.belongsToClientPackage(model)); | ||
} | ||
buildToc(model, trail, parent, restriction) { | ||
var _a; | ||
const index = trail.indexOf(model); | ||
const children = model["children"] || []; | ||
if (!this.clientDir) | ||
this.clientDir = this.loadClientDir(model); | ||
if (index < trail.length - 1 && children.length > 40) { | ||
const child = trail[index + 1]; | ||
const item = NavigationItem_1.NavigationItem.create(child, parent, true); | ||
item.isInPath = true; | ||
item.isCurrent = false; | ||
this.buildToc(child, trail, item); | ||
} | ||
else { | ||
children.forEach((child) => { | ||
if (restriction && restriction.length > 0 && !restriction.includes(child.name)) { | ||
return; | ||
} | ||
if (child.kindOf(reflections_1.ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (this.isClient(child)) { | ||
NavigationItem_1.NavigationItem.create(child, this.clientsNavigationItem, true); | ||
} | ||
else if (this.isCommand(child)) { | ||
NavigationItem_1.NavigationItem.create(child, this.commandsNavigationItem, true); | ||
} | ||
else if (this.isPaginator(child)) { | ||
NavigationItem_1.NavigationItem.create(child, this.paginatorsNavigationItem, true); | ||
} | ||
else if (this.isInputOrOutput(child)) { | ||
NavigationItem_1.NavigationItem.create(child, this.commandsNavigationItem, true); | ||
} | ||
else if (this.isWaiter(child)) { | ||
NavigationItem_1.NavigationItem.create(child, this.waitersNavigationItem, true); | ||
} | ||
else { | ||
const item = NavigationItem_1.NavigationItem.create(child, parent, true); | ||
if (trail.includes(child)) { | ||
item.isInPath = true; | ||
item.isCurrent = trail[trail.length - 1] === child; | ||
this.buildToc(child, trail, item); | ||
} | ||
} | ||
}); | ||
(_a = this.commandsNavigationItem) === null || _a === void 0 ? void 0 : _a.children.sort((childA, childB) => childA.title.localeCompare(childB.title)); | ||
} | ||
defineCategories(group, reflections) { | ||
const categories = group.categories || []; | ||
if (this.isCategorized(categories)) | ||
return group.categories; | ||
const clients = new typedoc_1.ReflectionCategory("Clients"); | ||
const commands = new typedoc_1.ReflectionCategory("Commands"); | ||
const paginators = new typedoc_1.ReflectionCategory("Paginators"); | ||
const waiters = new typedoc_1.ReflectionCategory("Waiters"); | ||
reflections.forEach((reflection) => { | ||
if (reflection.kindOf(typedoc_1.ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (this.isClient(reflection)) { | ||
clients.children.push(reflection); | ||
reflection.flags.setFlag(typedoc_1.ReflectionFlag.Public, false); | ||
} | ||
else if (this.isCommand(reflection)) { | ||
commands.children.push(reflection); | ||
reflection.flags.setFlag(typedoc_1.ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isPaginator(reflection)) { | ||
paginators.children.push(reflection); | ||
reflection.flags.setFlag(typedoc_1.ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isInputOrOutput(reflection)) { | ||
commands.children.push(reflection); | ||
reflection.flags.setFlag(typedoc_1.ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isWaiter(reflection)) { | ||
waiters.children.push(reflection); | ||
reflection.flags.setFlag(typedoc_1.ReflectionFlag.Protected, true); | ||
} | ||
}); | ||
commands.children.sort((childA, childB) => childA.name.localeCompare(childB.name)); | ||
categories.push(...[clients, commands, paginators, waiters]); | ||
return categories; | ||
} | ||
loadClientDir(model) { | ||
let projectModel = model; | ||
while (projectModel.constructor.name !== "ProjectReflection" && !projectModel.kindOf(reflections_1.ReflectionKind.SomeModule)) { | ||
projectModel = projectModel.parent; | ||
} | ||
const clientsDirectory = (0, utils_1.getCurrentClientDirectory)({ project: projectModel }); | ||
return (0, path_1.dirname)((0, path_1.dirname)(clientsDirectory === null || clientsDirectory === void 0 ? void 0 : clientsDirectory.directories.src.files.find((file) => file.name.endsWith("Client.ts")).fullFileName)); | ||
isCategorized(categories) { | ||
const childrenNames = categories.map((child) => child.title); | ||
return (childrenNames.includes("Clients") && | ||
childrenNames.includes("Commands") && | ||
childrenNames.includes("Paginators") && | ||
childrenNames.includes("Waiters")); | ||
} | ||
}; | ||
SdkClientTocPlugin = tslib_1.__decorate([ | ||
(0, components_1.Component)({ name: "SdkClientTocPlugin" }) | ||
], SdkClientTocPlugin); | ||
loadClientDir(project) { | ||
const children = Object.values(project.reflections).filter(utils_1.isClientModel); | ||
const fullFileName = children.find((child) => child.sources[0].fileName.endsWith("Client.ts")).sources[0] | ||
.fullFileName; | ||
return (0, path_1.dirname)((0, path_1.dirname)(fullFileName)); | ||
} | ||
} | ||
tslib_1.__decorate([ | ||
(0, typedoc_1.BindOption)("defaultGroup") | ||
], SdkClientTocPlugin.prototype, "defaultGroup", void 0); | ||
tslib_1.__decorate([ | ||
(0, typedoc_1.BindOption)("defaultCategory") | ||
], SdkClientTocPlugin.prototype, "defaultCategory", void 0); | ||
exports.SdkClientTocPlugin = SdkClientTocPlugin; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCurrentClientDirectory = void 0; | ||
const getCurrentClientDirectory = (event) => { | ||
const clientsDirectory = event.project.directory.directories["clients"].directories; | ||
return Object.values(clientsDirectory).filter((directory) => { var _a; return (_a = directory === null || directory === void 0 ? void 0 : directory.directories) === null || _a === void 0 ? void 0 : _a.src; })[0]; | ||
}; | ||
exports.getCurrentClientDirectory = getCurrentClientDirectory; | ||
exports.isClientModel = void 0; | ||
const path_1 = require("path"); | ||
const isClientModel = (model) => { var _a, _b; return (_b = (_a = model === null || model === void 0 ? void 0 : model.sources) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.fullFileName.includes(`${path_1.sep}clients${path_1.sep}`); }; | ||
exports.isClientModel = isClientModel; |
@@ -1,11 +0,11 @@ | ||
import { SdkClientCommentUpdatePlugin } from "./sdk-client-comment-update"; | ||
import { SdkClientRemoveNavigatorPlugin } from "./sdk-client-remove-navigator"; | ||
import { SdkClientRenameProjectPlugin } from "./sdk-client-rename-project"; | ||
import { ParameterType } from "typedoc"; | ||
import { SdkClientTocPlugin } from "./sdk-client-toc-plugin"; | ||
module.exports = function load(pluginHost) { | ||
const application = pluginHost.owner; | ||
application.converter.addComponent("SdkClientCommentUpdatePlugin", new SdkClientCommentUpdatePlugin(application.converter)); | ||
application.renderer.addComponent("SdkClientTocPlugin", new SdkClientTocPlugin(application.renderer)); | ||
application.renderer.addComponent("SdkClientRenameProjectPlugin", new SdkClientRenameProjectPlugin(application.renderer)); | ||
application.renderer.addComponent("SdkClientRemoveNavigatorPlugin", new SdkClientRemoveNavigatorPlugin(application.renderer)); | ||
}; | ||
export function load(app) { | ||
app.options.addDeclaration({ | ||
name: "defaultGroup", | ||
help: "Default group to place categories as children", | ||
defaultValue: "SDK", | ||
type: ParameterType.String, | ||
}); | ||
new SdkClientTocPlugin(app.options, app.logger, app.renderer); | ||
} |
import { __decorate } from "tslib"; | ||
import { dirname } from "path"; | ||
import { ReflectionKind, } from "typedoc/dist/lib/models/reflections"; | ||
import { Component, RendererComponent } from "typedoc/dist/lib/output/components"; | ||
import { PageEvent } from "typedoc/dist/lib/output/events"; | ||
import { NavigationItem } from "typedoc/dist/lib/output/models/NavigationItem"; | ||
import { getCurrentClientDirectory } from "./utils"; | ||
let SdkClientTocPlugin = class SdkClientTocPlugin extends RendererComponent { | ||
initialize() { | ||
const tocPlugin = this.owner.application.renderer.getComponent("toc"); | ||
this.owner.off(PageEvent.BEGIN, tocPlugin.onRendererBeginPage); | ||
this.listenTo(this.owner, { | ||
[PageEvent.BEGIN]: this.onRendererBeginPage, | ||
}); | ||
import { BindOption, ContainerReflection, Converter, ReflectionCategory, ReflectionFlag, ReflectionGroup, ReflectionKind, } from "typedoc"; | ||
import { isClientModel } from "./utils"; | ||
export class SdkClientTocPlugin { | ||
constructor(options, logger, renderer) { | ||
this.options = options; | ||
this.logger = logger; | ||
this.renderer = renderer; | ||
this.onEndResolve = (context) => { | ||
if (!this.clientDir) | ||
this.clientDir = this.loadClientDir(context.project); | ||
for (const model of Object.values(context.project.reflections)) { | ||
const isEffectiveParent = (model instanceof ContainerReflection && model.children?.length) || model.isProject(); | ||
if (!isEffectiveParent || model.kindOf(ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (!model.groups) { | ||
model.groups = []; | ||
} | ||
let group = model.groups.find((value) => value.title === this.defaultGroup); | ||
if (!group) { | ||
group = new ReflectionGroup(this.defaultGroup); | ||
model.groups.push(group); | ||
} | ||
group.categories = this.defineCategories(group, model.children); | ||
const modulesIndex = model.groups.findIndex((value) => value.title === "Modules"); | ||
if (modulesIndex >= 0) { | ||
model.groups.splice(modulesIndex, 1); | ||
} | ||
} | ||
}; | ||
this.renderer.application.converter.on(Converter.EVENT_RESOLVE_END, this.onEndResolve); | ||
} | ||
onRendererBeginPage(page) { | ||
let model = page.model; | ||
if (!model.constructor.name.endsWith("Reflection")) { | ||
return; | ||
} | ||
const trail = []; | ||
while (model.constructor.name !== "ProjectReflection" && !model.kindOf(ReflectionKind.SomeModule)) { | ||
trail.unshift(model); | ||
model = model.parent; | ||
} | ||
const tocRestriction = this.owner.toc; | ||
page.toc = new NavigationItem(model.name); | ||
if (!model.parent && !trail.length) { | ||
this.clientsNavigationItem = new NavigationItem("Clients", void 0, page.toc); | ||
this.commandsNavigationItem = new NavigationItem("Commands", void 0, page.toc); | ||
this.paginatorsNavigationItem = new NavigationItem("Paginators", void 0, page.toc); | ||
this.waitersNavigationItem = new NavigationItem("Waiters", void 0, page.toc); | ||
} | ||
this.buildToc(model, trail, page.toc, tocRestriction); | ||
} | ||
belongsToClientPackage(model) { | ||
return this.clientDir && model.sources?.[0].file?.fullFileName.indexOf(this.clientDir) === 0; | ||
return this.clientDir && model.sources?.[0].fullFileName.indexOf(this.clientDir) === 0; | ||
} | ||
@@ -63,61 +62,58 @@ isClient(model) { | ||
} | ||
buildToc(model, trail, parent, restriction) { | ||
const index = trail.indexOf(model); | ||
const children = model["children"] || []; | ||
if (!this.clientDir) | ||
this.clientDir = this.loadClientDir(model); | ||
if (index < trail.length - 1 && children.length > 40) { | ||
const child = trail[index + 1]; | ||
const item = NavigationItem.create(child, parent, true); | ||
item.isInPath = true; | ||
item.isCurrent = false; | ||
this.buildToc(child, trail, item); | ||
} | ||
else { | ||
children.forEach((child) => { | ||
if (restriction && restriction.length > 0 && !restriction.includes(child.name)) { | ||
return; | ||
} | ||
if (child.kindOf(ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (this.isClient(child)) { | ||
NavigationItem.create(child, this.clientsNavigationItem, true); | ||
} | ||
else if (this.isCommand(child)) { | ||
NavigationItem.create(child, this.commandsNavigationItem, true); | ||
} | ||
else if (this.isPaginator(child)) { | ||
NavigationItem.create(child, this.paginatorsNavigationItem, true); | ||
} | ||
else if (this.isInputOrOutput(child)) { | ||
NavigationItem.create(child, this.commandsNavigationItem, true); | ||
} | ||
else if (this.isWaiter(child)) { | ||
NavigationItem.create(child, this.waitersNavigationItem, true); | ||
} | ||
else { | ||
const item = NavigationItem.create(child, parent, true); | ||
if (trail.includes(child)) { | ||
item.isInPath = true; | ||
item.isCurrent = trail[trail.length - 1] === child; | ||
this.buildToc(child, trail, item); | ||
} | ||
} | ||
}); | ||
this.commandsNavigationItem?.children.sort((childA, childB) => childA.title.localeCompare(childB.title)); | ||
} | ||
defineCategories(group, reflections) { | ||
const categories = group.categories || []; | ||
if (this.isCategorized(categories)) | ||
return group.categories; | ||
const clients = new ReflectionCategory("Clients"); | ||
const commands = new ReflectionCategory("Commands"); | ||
const paginators = new ReflectionCategory("Paginators"); | ||
const waiters = new ReflectionCategory("Waiters"); | ||
reflections.forEach((reflection) => { | ||
if (reflection.kindOf(ReflectionKind.SomeModule)) { | ||
return; | ||
} | ||
if (this.isClient(reflection)) { | ||
clients.children.push(reflection); | ||
reflection.flags.setFlag(ReflectionFlag.Public, false); | ||
} | ||
else if (this.isCommand(reflection)) { | ||
commands.children.push(reflection); | ||
reflection.flags.setFlag(ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isPaginator(reflection)) { | ||
paginators.children.push(reflection); | ||
reflection.flags.setFlag(ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isInputOrOutput(reflection)) { | ||
commands.children.push(reflection); | ||
reflection.flags.setFlag(ReflectionFlag.Protected, true); | ||
} | ||
else if (this.isWaiter(reflection)) { | ||
waiters.children.push(reflection); | ||
reflection.flags.setFlag(ReflectionFlag.Protected, true); | ||
} | ||
}); | ||
commands.children.sort((childA, childB) => childA.name.localeCompare(childB.name)); | ||
categories.push(...[clients, commands, paginators, waiters]); | ||
return categories; | ||
} | ||
loadClientDir(model) { | ||
let projectModel = model; | ||
while (projectModel.constructor.name !== "ProjectReflection" && !projectModel.kindOf(ReflectionKind.SomeModule)) { | ||
projectModel = projectModel.parent; | ||
} | ||
const clientsDirectory = getCurrentClientDirectory({ project: projectModel }); | ||
return dirname(dirname(clientsDirectory?.directories.src.files.find((file) => file.name.endsWith("Client.ts")).fullFileName)); | ||
isCategorized(categories) { | ||
const childrenNames = categories.map((child) => child.title); | ||
return (childrenNames.includes("Clients") && | ||
childrenNames.includes("Commands") && | ||
childrenNames.includes("Paginators") && | ||
childrenNames.includes("Waiters")); | ||
} | ||
}; | ||
SdkClientTocPlugin = __decorate([ | ||
Component({ name: "SdkClientTocPlugin" }) | ||
], SdkClientTocPlugin); | ||
export { SdkClientTocPlugin }; | ||
loadClientDir(project) { | ||
const children = Object.values(project.reflections).filter(isClientModel); | ||
const fullFileName = children.find((child) => child.sources[0].fileName.endsWith("Client.ts")).sources[0] | ||
.fullFileName; | ||
return dirname(dirname(fullFileName)); | ||
} | ||
} | ||
__decorate([ | ||
BindOption("defaultGroup") | ||
], SdkClientTocPlugin.prototype, "defaultGroup", void 0); | ||
__decorate([ | ||
BindOption("defaultCategory") | ||
], SdkClientTocPlugin.prototype, "defaultCategory", void 0); |
@@ -1,4 +0,2 @@ | ||
export const getCurrentClientDirectory = (event) => { | ||
const clientsDirectory = event.project.directory.directories["clients"].directories; | ||
return Object.values(clientsDirectory).filter((directory) => directory?.directories?.src)[0]; | ||
}; | ||
import { sep } from "path"; | ||
export const isClientModel = (model) => model?.sources?.[0]?.fullFileName.includes(`${sep}clients${sep}`); |
@@ -1,1 +0,2 @@ | ||
export {}; | ||
import { Application } from "typedoc"; | ||
export declare function load(app: Application): void; |
@@ -1,19 +0,14 @@ | ||
import { Reflection } from "typedoc/dist/lib/models/reflections"; | ||
import { RendererComponent } from "typedoc/dist/lib/output/components"; | ||
import { NavigationItem } from "typedoc/dist/lib/output/models/NavigationItem"; | ||
import { Logger, Options, Renderer } from "typedoc"; | ||
/** | ||
* Group the ToC for easier observability. | ||
*/ | ||
export declare class SdkClientTocPlugin extends RendererComponent { | ||
private commandsNavigationItem?; | ||
private clientsNavigationItem?; | ||
private paginatorsNavigationItem?; | ||
private waitersNavigationItem?; | ||
export declare class SdkClientTocPlugin { | ||
readonly options: Options; | ||
readonly logger: Logger; | ||
private readonly renderer; | ||
private clientDir?; | ||
initialize(): void; | ||
/** | ||
* Generates a table of contents for a page. | ||
* @param page Contains project details and contextual data about the page being rendered. | ||
*/ | ||
private onRendererBeginPage; | ||
readonly defaultGroup: string; | ||
readonly defaultCategory: string; | ||
constructor(options: Options, logger: Logger, renderer: Renderer); | ||
private onEndResolve; | ||
private belongsToClientPackage; | ||
@@ -26,11 +21,11 @@ private isClient; | ||
/** | ||
* Create a toc navigation item structure. | ||
* Define navigation categories in Client, Commands, Paginators and Waiters sections. It will update the | ||
* supplied categories array. | ||
* | ||
* @param model The models whose children should be written to the toc. | ||
* @param trail Defines the active trail of expanded toc entries. | ||
* @param parent The parent [[NavigationItem]] the toc should be appended to. | ||
* @param restriction The restricted table of contents. | ||
* @param group The parent group where the categories will be placed under. | ||
* @param reflections The reflections that should be categorized. | ||
*/ | ||
buildToc(model: Reflection, trail: Reflection[], parent: NavigationItem, restriction?: string[]): void; | ||
private defineCategories; | ||
private isCategorized; | ||
private loadClientDir; | ||
} |
@@ -1,1 +0,2 @@ | ||
export {}; | ||
import { Application } from "typedoc"; | ||
export declare function load(app: Application): void; |
@@ -1,12 +0,11 @@ | ||
import { Reflection } from "typedoc/dist/lib/models/reflections"; | ||
import { RendererComponent } from "typedoc/dist/lib/output/components"; | ||
import { NavigationItem } from "typedoc/dist/lib/output/models/NavigationItem"; | ||
export declare class SdkClientTocPlugin extends RendererComponent { | ||
private commandsNavigationItem?; | ||
private clientsNavigationItem?; | ||
private paginatorsNavigationItem?; | ||
private waitersNavigationItem?; | ||
import { Logger, Options, Renderer } from "typedoc"; | ||
export declare class SdkClientTocPlugin { | ||
readonly options: Options; | ||
readonly logger: Logger; | ||
private readonly renderer; | ||
private clientDir?; | ||
initialize(): void; | ||
private onRendererBeginPage; | ||
readonly defaultGroup: string; | ||
readonly defaultCategory: string; | ||
constructor(options: Options, logger: Logger, renderer: Renderer); | ||
private onEndResolve; | ||
private belongsToClientPackage; | ||
@@ -18,9 +17,5 @@ private isClient; | ||
private isWaiter; | ||
buildToc( | ||
model: Reflection, | ||
trail: Reflection[], | ||
parent: NavigationItem, | ||
restriction?: string[] | ||
): void; | ||
private defineCategories; | ||
private isCategorized; | ||
private loadClientDir; | ||
} |
@@ -1,4 +0,2 @@ | ||
import { ProjectReflection, SourceDirectory } from "typedoc/dist/lib/models"; | ||
export declare const getCurrentClientDirectory: (event: { | ||
project: ProjectReflection; | ||
}) => SourceDirectory; | ||
import { Reflection } from "typedoc"; | ||
export declare const isClientModel: (model: Reflection | undefined) => boolean; |
@@ -1,4 +0,2 @@ | ||
import { ProjectReflection, SourceDirectory } from "typedoc/dist/lib/models"; | ||
export declare const getCurrentClientDirectory: (event: { | ||
project: ProjectReflection; | ||
}) => SourceDirectory; | ||
import { Reflection } from "typedoc"; | ||
export declare const isClientModel: (model: Reflection | undefined) => boolean; |
{ | ||
"name": "@aws-sdk/service-client-documentation-generator", | ||
"version": "3.208.0", | ||
"version": "3.292.0", | ||
"scripts": { | ||
@@ -34,5 +34,7 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"rimraf": "3.0.2", | ||
"typedoc": "0.19.2", | ||
"typescript": "~4.6.2" | ||
}, | ||
"typedoc": { | ||
"entryPoint": "src/index.ts" | ||
}, | ||
"typesVersions": { | ||
@@ -39,0 +41,0 @@ "<4.0": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
6
0
28371
15
334
1