UNPKG

sfdx-hardis

Version:

Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards

40 lines 1.54 kB
import { buildGenericMarkdownTable } from "../utils/flowVisualiser/nodeFormatUtils.js"; import { DocBuilderRoot } from "./docBuilderRoot.js"; export class DocBuilderPage extends DocBuilderRoot { docType = "Page"; promptKey = "PROMPT_DESCRIBE_PAGE"; placeholder = "<!-- Page description -->"; xmlRootKey = "FlexiPage"; static buildIndexTable(prefix, pageDescriptions, filterObject = null) { const filteredPages = filterObject ? pageDescriptions.filter(page => page.impactedObjects.includes(filterObject)) : pageDescriptions; if (filteredPages.length === 0) { return []; } const lines = []; lines.push(...[ filterObject ? "## Related Lightning Pages" : "## Lightning Pages", "", "| Lightning Page | Type |", "| :---- | :--: | " ]); for (const page of filteredPages) { const pageNameCell = `[${page.name}](${prefix}${page.name}.md)`; lines.push(...[ `| ${pageNameCell} | ${page.type} |` ]); } lines.push(""); return lines; } async buildInitialMarkdownLines() { return [ `## ${this.metadataName}`, '', buildGenericMarkdownTable(this.parsedXmlObject, ["sobjectType", "type", "masterLabel", "template"], "## Lightning Page attributes", []), '', '<!-- Page description -->', '', ]; } } //# sourceMappingURL=docBuilderPage.js.map