docs: update typedoc, convert packages to esm, generate references (#10699)
This commit is contained in:
1 parent
0559d54c18
commit
870cb6e88c
1210 files changed
+746989
-813362
No files matched your search
@@ -22,7 +22,7 @@
|
||||
"react-docgen": "^7.0.1",
|
||||
"resolve": "^1.22.8",
|
||||
"ts-node": "^10.9.1",
|
||||
"typedoc": "^0.26.7",
|
||||
"typedoc": "^0.27.5",
|
||||
"typedoc-plugin-custom": "*",
|
||||
"typescript": "^5.6.2",
|
||||
"utils": "*"
|
||||
@@ -31,6 +31,6 @@
|
||||
"@types/node": "^20.12.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typedoc": "0.26.x"
|
||||
"typedoc": "0.27.x"
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,9 @@
|
||||
import { program } from "commander"
|
||||
import generate from "./commands/generate.js"
|
||||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { getDirname } from "utils"
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
|
||||
program
|
||||
.description("Generate React specs used for documentation purposes.")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Octokit } from "@octokit/core"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { getDirname } from "utils"
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.GH_TOKEN,
|
||||
@@ -17,8 +17,7 @@ type DocsConfig = {
|
||||
}
|
||||
|
||||
function getConfigPath() {
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
return path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { LinearClient } from "@linear/sdk"
|
||||
import { Octokit } from "@octokit/core"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { getDirname } from "utils"
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.GH_TOKEN,
|
||||
@@ -14,8 +14,7 @@ const linearClient = new LinearClient({
|
||||
apiKey: process.env.LINEAR_API_KEY,
|
||||
})
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
|
||||
let freshnessCheckLabelId = ""
|
||||
let documentationTeamId = ""
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"glob": "^10.3.10",
|
||||
"randomcolor": "^0.6.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.6.2"
|
||||
"typescript": "^5.6.2",
|
||||
"utils": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.12.10",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typedoc": "0.26.x"
|
||||
"typedoc": "0.27.x"
|
||||
},
|
||||
"main": "_base.js",
|
||||
"version": "0.0.0",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"dotenv": "^16.3.1",
|
||||
"randomcolor": "^0.6.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"typedoc": "^0.26.7",
|
||||
"typedoc": "^0.27.5",
|
||||
"typedoc-plugin-custom": "*",
|
||||
"typedoc-plugin-markdown-medusa": "*",
|
||||
"typedoc-plugin-rename-defaults": "^0.7.1",
|
||||
@@ -34,7 +34,7 @@
|
||||
"yaml": "^2.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typedoc": "0.26.x"
|
||||
"typedoc": "0.27.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.12.10",
|
||||
|
||||
@@ -52,4 +52,5 @@ export const dmlModules = [
|
||||
"promotion",
|
||||
"stock-location-next",
|
||||
"tax",
|
||||
"fulfillment",
|
||||
]
|
||||
@@ -13,13 +13,14 @@
|
||||
"dist"
|
||||
],
|
||||
"author": "Shahed Nasser",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"watch": "tsc --watch",
|
||||
"lint": "eslint --ext .ts src"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typedoc": "0.26.x"
|
||||
"typedoc": "0.27.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/eslint": "^9.6.1",
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
DeclarationReflection,
|
||||
ReferenceType,
|
||||
} from "typedoc"
|
||||
import { getDmlProperties, isDmlEntity } from "utils"
|
||||
import { getDirname, getDmlProperties, isDmlEntity } from "utils"
|
||||
import { DmlFile } from "types"
|
||||
|
||||
const FILE_NAME_REGEX = /packages\/modules\/(?<module>[a-z-]+)/
|
||||
@@ -51,6 +51,8 @@ function getDescriptionsFromJson(
|
||||
return
|
||||
}
|
||||
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
|
||||
const jsonFilePath = path.resolve(
|
||||
__dirname,
|
||||
path.join(
|
||||
|
||||
@@ -4,7 +4,10 @@ import {
|
||||
Converter,
|
||||
DeclarationReflection,
|
||||
ParameterType,
|
||||
ProjectReflection,
|
||||
ReferenceType,
|
||||
ReflectionKind,
|
||||
UnknownType,
|
||||
} from "typedoc"
|
||||
import { RELATION_NAMES, getDmlProperties, isDmlEntity } from "utils"
|
||||
|
||||
@@ -31,11 +34,6 @@ export class DmlRelationsResolver {
|
||||
defaultValue: false,
|
||||
})
|
||||
|
||||
this.app.converter.on(
|
||||
Converter.EVENT_CREATE_DECLARATION,
|
||||
this.addReflection.bind(this)
|
||||
)
|
||||
|
||||
this.app.converter.on(
|
||||
Converter.EVENT_RESOLVE_BEGIN,
|
||||
this.resolveRelationReferences.bind(this),
|
||||
@@ -43,23 +41,29 @@ export class DmlRelationsResolver {
|
||||
)
|
||||
}
|
||||
|
||||
addReflection(_context: Context, reflection: DeclarationReflection) {
|
||||
if (!this.app.options.getValue("resolveDmlRelations")) {
|
||||
return
|
||||
}
|
||||
if (isDmlEntity(reflection)) {
|
||||
this.dmlReflectionsAndProperties?.push({
|
||||
reflection,
|
||||
properties: getDmlProperties(reflection.type as ReferenceType),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
resolveRelationReferences(context: Context) {
|
||||
if (!this.app.options.getValue("resolveDmlRelations")) {
|
||||
return
|
||||
}
|
||||
|
||||
for (const reflection of context.project.getReflectionsByKind(
|
||||
ReflectionKind.Variable
|
||||
)) {
|
||||
if (
|
||||
!(reflection instanceof DeclarationReflection) ||
|
||||
!isDmlEntity(reflection) ||
|
||||
reflection.type?.type !== "reference"
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
const properties = getDmlProperties(reflection.type)
|
||||
this.dmlReflectionsAndProperties.push({
|
||||
reflection,
|
||||
properties,
|
||||
})
|
||||
}
|
||||
|
||||
this.dmlReflectionsAndProperties.forEach(({ properties }) => {
|
||||
properties.forEach((property) => {
|
||||
if (
|
||||
@@ -74,14 +78,39 @@ export class DmlRelationsResolver {
|
||||
if (
|
||||
relatedReflectionType?.type !== "reflection" ||
|
||||
!relatedReflectionType.declaration.signatures?.length ||
|
||||
relatedReflectionType.declaration.signatures[0].type?.type !==
|
||||
"reference"
|
||||
!relatedReflectionType.declaration.signatures[0].type
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
const reflectionType =
|
||||
relatedReflectionType.declaration.signatures[0].type.type ===
|
||||
"unknown"
|
||||
? this.tryToParseUnknownType(
|
||||
relatedReflectionType.declaration.signatures[0].type,
|
||||
context.project
|
||||
)?.type
|
||||
: relatedReflectionType.declaration.signatures[0].type
|
||||
|
||||
if (
|
||||
reflectionType?.type !== "reference" &&
|
||||
(reflectionType?.type !== "query" ||
|
||||
!(
|
||||
reflectionType.queryType.reflection instanceof
|
||||
DeclarationReflection
|
||||
) ||
|
||||
reflectionType.queryType.reflection.type?.type !== "reference")
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
const relatedReflection = this.findReflectionMatchingProperties(
|
||||
getDmlProperties(relatedReflectionType.declaration.signatures[0].type)
|
||||
getDmlProperties(
|
||||
reflectionType.type === "reference"
|
||||
? reflectionType
|
||||
: ((reflectionType.queryType.reflection as DeclarationReflection)
|
||||
.type as ReferenceType)
|
||||
)
|
||||
)
|
||||
|
||||
if (!relatedReflection) {
|
||||
@@ -118,4 +147,22 @@ export class DmlRelationsResolver {
|
||||
})
|
||||
})?.reflection
|
||||
}
|
||||
|
||||
tryToParseUnknownType(
|
||||
unknownType: UnknownType,
|
||||
project: ProjectReflection
|
||||
): DeclarationReflection | undefined {
|
||||
const regex =
|
||||
/^DmlEntity<DMLEntitySchemaBuilder.+>, "(?<modelName>[a-zA-Z]+)">$/
|
||||
|
||||
const regexMatches = regex.exec(unknownType.name)
|
||||
|
||||
if (!regexMatches?.groups?.modelName) {
|
||||
return
|
||||
}
|
||||
|
||||
const reflection = project.getChildByName(regexMatches.groups.modelName)
|
||||
|
||||
return reflection instanceof DeclarationReflection ? reflection : undefined
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
import { Application } from "typedoc"
|
||||
import { load as resolveReferencesPluginLoad } from "./resolve-references-plugin"
|
||||
import { load as frontmatterPlugin } from "./frontmatter-plugin"
|
||||
import { load as parseOasSchemaPlugin } from "./parse-oas-schema-plugin"
|
||||
import { load as apiIgnorePlugin } from "./api-ignore"
|
||||
import { load as eslintExamplePlugin } from "./eslint-example"
|
||||
import { load as signatureModifierPlugin } from "./signature-modifier"
|
||||
import { MermaidDiagramGenerator } from "./mermaid-diagram-generator"
|
||||
import { load as parentIgnorePlugin } from "./parent-ignore"
|
||||
import { load as generateNamespacePlugin } from "./generate-path-namespaces"
|
||||
import { DmlRelationsResolver } from "./dml-relations-resolver"
|
||||
import { load as dmlTypesNormalizer } from "./dml-types-normalizer"
|
||||
import { MermaidDiagramDMLGenerator } from "./mermaid-diagram-dml-generator"
|
||||
import { load as dmlJsonParser } from "./dml-json-parser"
|
||||
import { GenerateCustomNamespacePlugin } from "./generate-custom-namespaces"
|
||||
import { load as resolveReferencesPluginLoad } from "./resolve-references-plugin.js"
|
||||
import { load as frontmatterPlugin } from "./frontmatter-plugin.js"
|
||||
import { load as parseOasSchemaPlugin } from "./parse-oas-schema-plugin.js"
|
||||
import { load as apiIgnorePlugin } from "./api-ignore.js"
|
||||
import { load as eslintExamplePlugin } from "./eslint-example.js"
|
||||
import { load as signatureModifierPlugin } from "./signature-modifier.js"
|
||||
import { MermaidDiagramGenerator } from "./mermaid-diagram-generator.js"
|
||||
import { load as parentIgnorePlugin } from "./parent-ignore.js"
|
||||
import { load as generateNamespacePlugin } from "./generate-path-namespaces.js"
|
||||
import { DmlRelationsResolver } from "./dml-relations-resolver.js"
|
||||
import { load as dmlTypesNormalizer } from "./dml-types-normalizer.js"
|
||||
import { MermaidDiagramDMLGenerator } from "./mermaid-diagram-dml-generator.js"
|
||||
import { load as dmlJsonParser } from "./dml-json-parser.js"
|
||||
import { GenerateCustomNamespacePlugin } from "./generate-custom-namespaces.js"
|
||||
|
||||
export function load(app: Application) {
|
||||
resolveReferencesPluginLoad(app)
|
||||
|
||||
@@ -13,17 +13,18 @@
|
||||
"dist"
|
||||
],
|
||||
"author": "Shahed Nasser",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc && copyfiles --up 1 ./src/**/*.hbs ./dist/",
|
||||
"lint": "eslint --ext .ts src"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typedoc": "0.26.x"
|
||||
"typedoc": "0.27.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.12.10",
|
||||
"copyfiles": "^2.4.1",
|
||||
"typedoc": "^0.26.7",
|
||||
"typedoc": "^0.27.5",
|
||||
"types": "*",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Application, ParameterType } from "typedoc"
|
||||
import { MarkdownThemeOptionsReader } from "./options-reader"
|
||||
import { MarkdownTheme } from "./theme"
|
||||
import { MarkdownThemeOptionsReader } from "./options-reader.js"
|
||||
import { MarkdownTheme } from "./theme.js"
|
||||
|
||||
export function load(app: Application) {
|
||||
app.renderer.defineTheme("markdown", MarkdownTheme)
|
||||
|
||||
@@ -1,83 +1,86 @@
|
||||
import * as fs from "fs"
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import * as path from "path"
|
||||
import breadcrumbsHelper from "./resources/helpers/breadcrumbs"
|
||||
import commentHelper from "./resources/helpers/comment"
|
||||
import commentsHelper from "./resources/helpers/comments"
|
||||
import declarationTitleHelper from "./resources/helpers/declaration-title"
|
||||
import escapeHelper from "./resources/helpers/escape"
|
||||
import hierarchyHelper from "./resources/helpers/hierarchy"
|
||||
import ifIsReference from "./resources/helpers/if-is-reference"
|
||||
import ifNamedAnchors from "./resources/helpers/if-named-anchors"
|
||||
import ifShowBreadcrumbsHelper from "./resources/helpers/if-show-breadcrumbs"
|
||||
import ifShowNamedAnchorsHelper from "./resources/helpers/if-show-named-anchors"
|
||||
import ifShowPageTitleHelper from "./resources/helpers/if-show-page-title"
|
||||
import ifShowReturnsHelper from "./resources/helpers/if-show-returns"
|
||||
import ifShowTypeHierarchyHelper from "./resources/helpers/if-show-type-hierarchy"
|
||||
import indexSignatureTitleHelper from "./resources/helpers/index-signature-title"
|
||||
import parameterTableHelper from "./resources/helpers/parameter-table"
|
||||
import objectLiteralMemberHelper from "./resources/helpers/type-declaration-members"
|
||||
import referenceMember from "./resources/helpers/reference-member"
|
||||
import reflectionPathHelper from "./resources/helpers/reflection-path"
|
||||
import reflectionTitleHelper from "./resources/helpers/reflection-title"
|
||||
import relativeUrlHelper from "./resources/helpers/relative-url"
|
||||
import returns from "./resources/helpers/returns"
|
||||
import signatureTitleHelper from "./resources/helpers/signature-title"
|
||||
import tocHelper from "./resources/helpers/toc"
|
||||
import typeHelper from "./resources/helpers/type"
|
||||
import typeAndParentHelper from "./resources/helpers/type-and-parent"
|
||||
import typeParameterTableHelper from "./resources/helpers/type-parameter-table"
|
||||
import sectionsHelper from "./resources/helpers/section-enabled"
|
||||
import getFormattingOptionHelper from "./resources/helpers/get-formatting-option"
|
||||
import titleLevelHelper from "./resources/helpers/title-level"
|
||||
import typeParameterListHelper from "./resources/helpers/type-parameter-list"
|
||||
import typeParameterHelper from "./resources/helpers/type-parameter"
|
||||
import parameterListHelper from "./resources/helpers/parameter-list"
|
||||
import parameterHelper from "./resources/helpers/parameter"
|
||||
import debugHelper from "./resources/helpers/debug"
|
||||
import frontmatterHelper from "./resources/helpers/frontmatter"
|
||||
import reflectionDescriptionHelper from "./resources/helpers/reflection-description"
|
||||
import mdxImportsHelper from "./resources/helpers/mdx-imports"
|
||||
import parameterComponentHelper from "./resources/helpers/parameter-component"
|
||||
import typeParameterComponentHelper from "./resources/helpers/type-parameter-component"
|
||||
import showPropertiesAsComponentHelper from "./resources/helpers/show-properties-as-component"
|
||||
import commentTagHelper from "./resources/helpers/comment-tag"
|
||||
import exampleHelper from "./resources/helpers/example"
|
||||
import ifFeatureFlagHelper from "./resources/helpers/if-feature-flag"
|
||||
import featureFlagHelper from "./resources/helpers/feature-flag"
|
||||
import decrementCurrentTitleLevelHelper from "./resources/helpers/decrement-current-title-level"
|
||||
import incrementCurrentTitleLevelHelper from "./resources/helpers/increment-current-title-level"
|
||||
import hasMoreThanOneSignatureHelper from "./resources/helpers/has-more-than-one-signature"
|
||||
import ifCanShowConstructorsTitleHelper from "./resources/helpers/if-can-show-constructors-title"
|
||||
import ifReactQueryTypeHelper from "./resources/helpers/if-react-query-type"
|
||||
import ifHasHookParamsHelper from "./resources/helpers/if-has-hook-params"
|
||||
import reactQueryHookParamsHelper from "./resources/helpers/react-query-hook-params"
|
||||
import ifHasMutationParamsHelper from "./resources/helpers/if-has-mutation-params"
|
||||
import reactQueryMutationParamsHelper from "./resources/helpers/react-query-mutation-params"
|
||||
import ifHasMutationReturnHelper from "./resources/helpers/if-has-mutation-return"
|
||||
import reactQueryMutationReturnHelper from "./resources/helpers/react-query-mutation-return"
|
||||
import ifHasQueryReturnHelper from "./resources/helpers/if-has-query-return"
|
||||
import reactQueryQueryReturnHelper from "./resources/helpers/react-query-query-return"
|
||||
import endSectionsHelper from "./resources/helpers/end-sections"
|
||||
import getDeclarationChildrenHelper from "./resources/helpers/get-declaration-children"
|
||||
import ifShowSeparatorForTitleLevelHelper from "./resources/helpers/if-show-separator-for-title-level"
|
||||
import shouldExpandPropertiesHelper from "./resources/helpers/should-expand-properties"
|
||||
import shouldExpandDeclarationChildrenHelper from "./resources/helpers/should-expand-declaration-children"
|
||||
import startSectionsHelper from "./resources/helpers/start-sections"
|
||||
import ifDmlEntityHelper from "./resources/helpers/if-dml-entity"
|
||||
import dmlPropertiesHelper from "./resources/helpers/dml-properties"
|
||||
import ifWorkflowStepHelper from "./resources/helpers/if-workflow-step"
|
||||
import stepInputHelper from "./resources/helpers/step-input"
|
||||
import stepOutputHelper from "./resources/helpers/step-output"
|
||||
import ifWorkflowHelper from "./resources/helpers/if-workflow"
|
||||
import workflowInputHelper from "./resources/helpers/workflow-input"
|
||||
import workflowOutputHelper from "./resources/helpers/workflow-output"
|
||||
import workflowDiagramHelper from "./resources/helpers/workflow-diagram"
|
||||
import workflowHooksHelper from "./resources/helpers/workflow-hooks"
|
||||
import ifMemberShowTitleHelper from "./resources/helpers/if-member-show-title"
|
||||
import signatureCommentHelper from "./resources/helpers/signature-comment"
|
||||
import versionHelper from "./resources/helpers/version"
|
||||
import { MarkdownTheme } from "./theme"
|
||||
import breadcrumbsHelper from "./resources/helpers/breadcrumbs.js"
|
||||
import commentHelper from "./resources/helpers/comment.js"
|
||||
import commentsHelper from "./resources/helpers/comments.js"
|
||||
import declarationTitleHelper from "./resources/helpers/declaration-title.js"
|
||||
import escapeHelper from "./resources/helpers/escape.js"
|
||||
import hierarchyHelper from "./resources/helpers/hierarchy.js"
|
||||
import ifIsReference from "./resources/helpers/if-is-reference.js"
|
||||
import ifNamedAnchors from "./resources/helpers/if-named-anchors.js"
|
||||
import ifShowBreadcrumbsHelper from "./resources/helpers/if-show-breadcrumbs.js"
|
||||
import ifShowNamedAnchorsHelper from "./resources/helpers/if-show-named-anchors.js"
|
||||
import ifShowPageTitleHelper from "./resources/helpers/if-show-page-title.js"
|
||||
import ifShowReturnsHelper from "./resources/helpers/if-show-returns.js"
|
||||
import ifShowTypeHierarchyHelper from "./resources/helpers/if-show-type-hierarchy.js"
|
||||
import indexSignatureTitleHelper from "./resources/helpers/index-signature-title.js"
|
||||
import parameterTableHelper from "./resources/helpers/parameter-table.js"
|
||||
import objectLiteralMemberHelper from "./resources/helpers/type-declaration-members.js"
|
||||
import referenceMember from "./resources/helpers/reference-member.js"
|
||||
import reflectionPathHelper from "./resources/helpers/reflection-path.js"
|
||||
import reflectionTitleHelper from "./resources/helpers/reflection-title.js"
|
||||
import relativeUrlHelper from "./resources/helpers/relative-url.js"
|
||||
import returns from "./resources/helpers/returns.js"
|
||||
import signatureTitleHelper from "./resources/helpers/signature-title.js"
|
||||
import tocHelper from "./resources/helpers/toc.js"
|
||||
import typeHelper from "./resources/helpers/type.js"
|
||||
import typeAndParentHelper from "./resources/helpers/type-and-parent.js"
|
||||
import typeParameterTableHelper from "./resources/helpers/type-parameter-table.js"
|
||||
import sectionsHelper from "./resources/helpers/section-enabled.js"
|
||||
import getFormattingOptionHelper from "./resources/helpers/get-formatting-option.js"
|
||||
import titleLevelHelper from "./resources/helpers/title-level.js"
|
||||
import typeParameterListHelper from "./resources/helpers/type-parameter-list.js"
|
||||
import typeParameterHelper from "./resources/helpers/type-parameter.js"
|
||||
import parameterListHelper from "./resources/helpers/parameter-list.js"
|
||||
import parameterHelper from "./resources/helpers/parameter.js"
|
||||
import debugHelper from "./resources/helpers/debug.js"
|
||||
import frontmatterHelper from "./resources/helpers/frontmatter.js"
|
||||
import reflectionDescriptionHelper from "./resources/helpers/reflection-description.js"
|
||||
import mdxImportsHelper from "./resources/helpers/mdx-imports.js"
|
||||
import parameterComponentHelper from "./resources/helpers/parameter-component.js"
|
||||
import typeParameterComponentHelper from "./resources/helpers/type-parameter-component.js"
|
||||
import showPropertiesAsComponentHelper from "./resources/helpers/show-properties-as-component.js"
|
||||
import commentTagHelper from "./resources/helpers/comment-tag.js"
|
||||
import exampleHelper from "./resources/helpers/example.js"
|
||||
import ifFeatureFlagHelper from "./resources/helpers/if-feature-flag.js"
|
||||
import featureFlagHelper from "./resources/helpers/feature-flag.js"
|
||||
import decrementCurrentTitleLevelHelper from "./resources/helpers/decrement-current-title-level.js"
|
||||
import incrementCurrentTitleLevelHelper from "./resources/helpers/increment-current-title-level.js"
|
||||
import hasMoreThanOneSignatureHelper from "./resources/helpers/has-more-than-one-signature.js"
|
||||
import ifCanShowConstructorsTitleHelper from "./resources/helpers/if-can-show-constructors-title.js"
|
||||
import ifReactQueryTypeHelper from "./resources/helpers/if-react-query-type.js"
|
||||
import ifHasHookParamsHelper from "./resources/helpers/if-has-hook-params.js"
|
||||
import reactQueryHookParamsHelper from "./resources/helpers/react-query-hook-params.js"
|
||||
import ifHasMutationParamsHelper from "./resources/helpers/if-has-mutation-params.js"
|
||||
import reactQueryMutationParamsHelper from "./resources/helpers/react-query-mutation-params.js"
|
||||
import ifHasMutationReturnHelper from "./resources/helpers/if-has-mutation-return.js"
|
||||
import reactQueryMutationReturnHelper from "./resources/helpers/react-query-mutation-return.js"
|
||||
import ifHasQueryReturnHelper from "./resources/helpers/if-has-query-return.js"
|
||||
import reactQueryQueryReturnHelper from "./resources/helpers/react-query-query-return.js"
|
||||
import endSectionsHelper from "./resources/helpers/end-sections.js"
|
||||
import getDeclarationChildrenHelper from "./resources/helpers/get-declaration-children.js"
|
||||
import ifShowSeparatorForTitleLevelHelper from "./resources/helpers/if-show-separator-for-title-level.js"
|
||||
import shouldExpandPropertiesHelper from "./resources/helpers/should-expand-properties.js"
|
||||
import shouldExpandDeclarationChildrenHelper from "./resources/helpers/should-expand-declaration-children.js"
|
||||
import startSectionsHelper from "./resources/helpers/start-sections.js"
|
||||
import ifDmlEntityHelper from "./resources/helpers/if-dml-entity.js"
|
||||
import dmlPropertiesHelper from "./resources/helpers/dml-properties.js"
|
||||
import ifWorkflowStepHelper from "./resources/helpers/if-workflow-step.js"
|
||||
import stepInputHelper from "./resources/helpers/step-input.js"
|
||||
import stepOutputHelper from "./resources/helpers/step-output.js"
|
||||
import ifWorkflowHelper from "./resources/helpers/if-workflow.js"
|
||||
import workflowInputHelper from "./resources/helpers/workflow-input.js"
|
||||
import workflowOutputHelper from "./resources/helpers/workflow-output.js"
|
||||
import workflowDiagramHelper from "./resources/helpers/workflow-diagram.js"
|
||||
import workflowHooksHelper from "./resources/helpers/workflow-hooks.js"
|
||||
import ifMemberShowTitleHelper from "./resources/helpers/if-member-show-title.js"
|
||||
import signatureCommentHelper from "./resources/helpers/signature-comment.js"
|
||||
import versionHelper from "./resources/helpers/version.js"
|
||||
import { MarkdownTheme } from "./theme.js"
|
||||
import { getDirname } from "utils"
|
||||
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
|
||||
const TEMPLATE_PATH = path.join(__dirname, "resources", "templates")
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getDisplayName } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { getDisplayName } from "../../utils.js"
|
||||
import { escapeChars } from "utils"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { CommentTag } from "typedoc"
|
||||
import { camelToTitleCase } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { camelToTitleCase } from "../../utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as fs from "fs"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { CommentDisplayPart } from "typedoc/dist/lib/models/comments/comment"
|
||||
import Handlebars from "handlebars"
|
||||
import { CommentDisplayPart } from "typedoc"
|
||||
import { escapeChars } from "utils"
|
||||
|
||||
export default function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Comment } from "typedoc"
|
||||
|
||||
const EXCLUDED_TAGS = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper("debug", function (...data: unknown[]) {
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import {
|
||||
DeclarationReflection,
|
||||
LiteralType,
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
ReflectionKind,
|
||||
ReflectionType,
|
||||
} from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { memberSymbol, stripComments } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { memberSymbol, stripComments } from "../../utils.js"
|
||||
import { escapeChars, stripLineBreaks, getType as getTypeUtils } from "utils"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("decrementCurrentTitleLevel", function () {
|
||||
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { DeclarationReflection, ReferenceType } from "typedoc"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { getDmlProperties, isDmlEntity } from "utils"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
"dmlProperties",
|
||||
function (this: DeclarationReflection) {
|
||||
if (!isDmlEntity(this)) {
|
||||
if (!isDmlEntity(this) || this.type?.type !== "reference") {
|
||||
return ""
|
||||
}
|
||||
|
||||
const properties = getDmlProperties(this.type as ReferenceType)
|
||||
const properties = getDmlProperties(this.type)
|
||||
|
||||
// TODO resolve the property types to names/native types
|
||||
return Handlebars.helpers.typeDeclarationMembers.call(properties, {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("endSections", function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { escapeChars } from "utils"
|
||||
|
||||
export default function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Reflection, SignatureReflection } from "typedoc"
|
||||
import { isWorkflow, isWorkflowStep } from "utils"
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Comment } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { stringify } from "yaml"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings.js"
|
||||
import { Reflection } from "typedoc"
|
||||
import { FrontmatterData } from "types"
|
||||
import { getTagComments, getTagsAsArray, getUniqueStrArray } from "utils"
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { getTypeChildren } from "utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import * as Handlebars from "handlebars"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { DeclarationHierarchy } from "typedoc/dist/lib/models"
|
||||
import { spaces } from "../../utils"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationHierarchy } from "typedoc"
|
||||
import { spaces } from "../../utils.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { ReflectionGroup } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { isDmlEntity } from "utils"
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Reflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getHookParams } from "../../utils/react-query-utils"
|
||||
import { getHookParams } from "../../utils/react-query-utils.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getMutationParams } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getMutationParams } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getMutationReturn } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getMutationReturn } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getQueryReturn } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getQueryReturn } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection, ReferenceReflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import {
|
||||
isReactQueryMutation,
|
||||
isReactQueryQuery,
|
||||
} from "../../utils/react-query-utils"
|
||||
} from "../../utils/react-query-utils.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { ReflectionKind, SignatureReflection } from "typedoc"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationHierarchy, DeclarationReflection } from "typedoc"
|
||||
import { PageEvent } from "typedoc"
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { isWorkflowStep } from "utils"
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { isWorkflow } from "utils"
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("incrementCurrentTitleLevel", function () {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("mdxImports", function () {
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { ReflectionParameterType } from "../../types"
|
||||
import { parseParams } from "../../utils/params-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { reflectionComponentFormatter } from "../../utils/reflection-formatter"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import Handlebars from "handlebars"
|
||||
import { ReflectionParameterType } from "../../types.js"
|
||||
import { parseParams } from "../../utils/params-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { reflectionComponentFormatter } from "../../utils/reflection-formatter.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { ReflectionParameterType } from "../../types"
|
||||
import { parseParams } from "../../utils/params-utils"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter"
|
||||
import Handlebars from "handlebars"
|
||||
import { ReflectionParameterType } from "../../types.js"
|
||||
import { parseParams } from "../../utils/params-utils.js"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { parseParams } from "../../utils/params-utils"
|
||||
import { ReflectionParameterType } from "../../types"
|
||||
import Handlebars from "handlebars"
|
||||
import { parseParams } from "../../utils/params-utils.js"
|
||||
import { ReflectionParameterType } from "../../types.js"
|
||||
import {
|
||||
getTableHeaders,
|
||||
reflectionTableFormatter,
|
||||
} from "../../utils/reflection-formatter"
|
||||
} from "../../utils/reflection-formatter.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { ParameterReflection } from "typedoc"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReference } from "typedoc"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
"propertiesComponent",
|
||||
function (this: DeclarationReference) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getHookParams } from "../../utils/react-query-utils"
|
||||
import { getHookParams } from "../../utils/react-query-utils.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getMutationParams } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getMutationParams } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getMutationReturn } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getMutationReturn } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getQueryReturn } from "../../utils/react-query-utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getQueryReturn } from "../../utils/react-query-utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { ReferenceReflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { Reflection } from "typedoc"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { ContainerReflection, ReflectionKind } from "typedoc"
|
||||
import { PageEvent } from "typedoc/dist/lib/output/events"
|
||||
import { PageEvent } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent, ParameterReflection, ReflectionKind } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getDisplayName } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { getDisplayName } from "../../utils.js"
|
||||
import { escapeChars } from "utils"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings"
|
||||
import { replaceTemplateVariables } from "../../utils/reflection-template-strings.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("relativeURL", function (url: string) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Comment, DeclarationReflection, SignatureReflection } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters"
|
||||
import { Parameter } from "../../types"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter.js"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters.js"
|
||||
import { Parameter } from "../../types.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { SectionKey } from "types"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("shouldExpandDeclarationChildren", function () {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("shouldExpandProperties", function (title: string) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import {
|
||||
ParameterReflection,
|
||||
ReflectionKind,
|
||||
SignatureReflection,
|
||||
} from "typedoc"
|
||||
import { memberSymbol } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { memberSymbol } from "../../utils.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { getHTMLChar } from "utils"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper("startSections", function () {
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getStepInputType } from "utils"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getStepOutputType } from "utils"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { Reflection } from "typedoc"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import {
|
||||
DeclarationReflection,
|
||||
ProjectReflection,
|
||||
ReflectionGroup,
|
||||
ReflectionKind,
|
||||
} from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { escapeChars } from "utils"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { ArrayType, ReferenceType } from "typedoc/dist/lib/models/types"
|
||||
import { ArrayType, ReferenceType } from "typedoc"
|
||||
import { escapeChars } from "utils"
|
||||
|
||||
export default function () {
|
||||
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { DeclarationReflection, ReflectionType } from "typedoc"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { parseParams } from "../../utils/params-utils"
|
||||
import { Parameter, ReflectionParameterType } from "../../types"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { parseParams } from "../../utils/params-utils.js"
|
||||
import { Parameter, ReflectionParameterType } from "../../types.js"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter.js"
|
||||
import { escapeChars, stripLineBreaks } from "utils"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { TypeParameterReflection } from "typedoc"
|
||||
import { reflectionComponentFormatter } from "../../utils/reflection-formatter"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { reflectionComponentFormatter } from "../../utils/reflection-formatter.js"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { TypeParameterReflection } from "typedoc"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter"
|
||||
import reflectionFormatter from "../../utils/reflection-formatter.js"
|
||||
|
||||
export default function () {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { TypeParameterReflection } from "typedoc"
|
||||
import {
|
||||
getTableHeaders,
|
||||
reflectionTableFormatter,
|
||||
} from "../../utils/reflection-formatter"
|
||||
} from "../../utils/reflection-formatter.js"
|
||||
import { hasTypes } from "utils"
|
||||
|
||||
export default function () {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import { TypeParameterReflection } from "typedoc"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import {
|
||||
ArrayType,
|
||||
ConditionalType,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import Handlebars from "handlebars"
|
||||
import { Reflection } from "typedoc"
|
||||
|
||||
export default function () {
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import {
|
||||
DocumentReflection,
|
||||
ReflectionKind,
|
||||
SignatureReflection,
|
||||
} from "typedoc"
|
||||
import { formatWorkflowDiagramComponent } from "../../utils/format-workflow-diagram-component"
|
||||
import { formatWorkflowDiagramComponent } from "../../utils/format-workflow-diagram-component.js"
|
||||
import { findReflectionInNamespaces, getProjectChild } from "utils"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { cleanUpHookInput, getProjectChild } from "utils"
|
||||
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getWorkflowInputType } from "utils"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { MarkdownTheme } from "../../theme.js"
|
||||
import Handlebars from "handlebars"
|
||||
import { SignatureReflection } from "typedoc"
|
||||
import { getWorkflowOutputType } from "utils"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters"
|
||||
import { formatParameterComponent } from "../../utils/format-parameter-component.js"
|
||||
import { getReflectionTypeParameters } from "../../utils/reflection-type-parameters.js"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
reflectionTemplate,
|
||||
registerHelpers,
|
||||
registerPartials,
|
||||
} from "./render-utils"
|
||||
import { formatContents } from "./utils"
|
||||
} from "./render-utils.js"
|
||||
import { formatContents } from "./utils.js"
|
||||
|
||||
import type {
|
||||
AllowedProjectDocumentsOption,
|
||||
@@ -27,7 +27,8 @@ import type {
|
||||
FormattingOptionsType,
|
||||
ParameterStyle,
|
||||
} from "types"
|
||||
import { Mapping } from "./types"
|
||||
import { Mapping } from "./types.js"
|
||||
import { getAlias } from "./utils/reflection-template-strings.js"
|
||||
|
||||
export class MarkdownTheme extends Theme {
|
||||
allPropertyReflectionsHaveOwnDocument!: string[]
|
||||
@@ -148,7 +149,7 @@ export class MarkdownTheme extends Theme {
|
||||
reflection.parent && !reflection.parent.isProject()
|
||||
? this.getAliasPath(reflection.parent)
|
||||
: "",
|
||||
reflection.getAlias()
|
||||
getAlias(reflection)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -215,7 +216,7 @@ export class MarkdownTheme extends Theme {
|
||||
directory: string
|
||||
relative?: Reflection
|
||||
}): string {
|
||||
let url = reflection.getAlias()
|
||||
let url = getAlias(reflection)
|
||||
|
||||
if (
|
||||
reflection.parent &&
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Parameter } from "../types"
|
||||
import { Parameter } from "../types.js"
|
||||
|
||||
type FormatParameterComponentProps = {
|
||||
parameterComponent: string | undefined
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc/dist/lib/output/events"
|
||||
import Handlebars from "handlebars"
|
||||
import { PageEvent } from "typedoc"
|
||||
|
||||
export interface FrontMatterVars {
|
||||
[key: string]: string | number | boolean
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { MarkdownTheme } from "../theme"
|
||||
import { MarkdownTheme } from "../theme.js"
|
||||
|
||||
/**
|
||||
* Some reflections are loaded as objects rather than instances
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ReflectionKind } from "typedoc"
|
||||
import { ReflectionParameterType } from "../types"
|
||||
import { ReflectionParameterType } from "../types.js"
|
||||
|
||||
export function flattenParams(
|
||||
current: ReflectionParameterType
|
||||
|
||||
@@ -6,11 +6,11 @@ import {
|
||||
SignatureReflection,
|
||||
SomeType,
|
||||
} from "typedoc"
|
||||
import { Parameter } from "../types"
|
||||
import { Parameter } from "../types.js"
|
||||
import {
|
||||
GetReflectionTypeParametersParams,
|
||||
getReflectionTypeParameters,
|
||||
} from "./reflection-type-parameters"
|
||||
} from "./reflection-type-parameters.js"
|
||||
|
||||
const MUTATION_PARAM_TYPE_NAME = "UseMutationOptions"
|
||||
const MUTATION_RETURN_TYPE_NAME = "UseMutationResult"
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
ReflectionKind,
|
||||
ReflectionType,
|
||||
} from "typedoc"
|
||||
import * as Handlebars from "handlebars"
|
||||
import { stripCode } from "../utils"
|
||||
import { Parameter, ParameterStyle, ReflectionParameterType } from "../types"
|
||||
import Handlebars from "handlebars"
|
||||
import { stripCode } from "../utils.js"
|
||||
import { Parameter, ParameterStyle, ReflectionParameterType } from "../types.js"
|
||||
import {
|
||||
getDmlRelationProperties,
|
||||
getReflectionType,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
isDmlRelation,
|
||||
stripLineBreaks,
|
||||
} from "utils"
|
||||
import { MarkdownTheme } from "../theme"
|
||||
import { MarkdownTheme } from "../theme.js"
|
||||
import { getDmlProperties, isDmlEntity } from "utils"
|
||||
|
||||
const ALLOWED_KINDS: ReflectionKind[] = [
|
||||
|
||||
+15
-5
@@ -9,16 +9,16 @@ export function replaceTemplateVariables(
|
||||
}
|
||||
|
||||
return text
|
||||
.replaceAll("{{alias}}", reflection.getAlias())
|
||||
.replaceAll("{{alias-lower}}", reflection.getAlias().toLowerCase())
|
||||
.replaceAll("{{parent.alias}}", reflection.parent?.getAlias() || "")
|
||||
.replaceAll("{{alias}}", reflection.name)
|
||||
.replaceAll("{{alias-lower}}", reflection.name.toLowerCase())
|
||||
.replaceAll("{{parent.alias}}", reflection.parent?.name || "")
|
||||
.replaceAll(
|
||||
"{{parent.alias-lower}}",
|
||||
reflection.parent?.getAlias().toLowerCase() || ""
|
||||
reflection.parent?.name.toLowerCase() || ""
|
||||
)
|
||||
.replaceAll(
|
||||
"{{parent.parent.alias}}",
|
||||
reflection.parent?.parent?.getAlias() || ""
|
||||
reflection.parent?.parent?.name || ""
|
||||
)
|
||||
.replaceAll("{{kind}}", getKindAsText(reflection.kind))
|
||||
}
|
||||
@@ -33,3 +33,13 @@ export function getKindAsText(kind: ReflectionKind) {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
export function getAlias(reflection: Reflection): string {
|
||||
let alias = reflection.name.replaceAll(" ", "_").replaceAll("/", "_")
|
||||
|
||||
if (reflection.kind === ReflectionKind.Module) {
|
||||
alias = alias.replaceAll("-", "_")
|
||||
}
|
||||
|
||||
return alias
|
||||
}
|
||||
Loaded 100 of 1210 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user