Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions apps/api-documenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
"exports": {
".": {
"types": "./dist/rollup.d.ts",
"node": "./lib-commonjs/index.js",
"import": "./lib-esm/index.js",
"require": "./lib-commonjs/index.js"
},
"./lib/*.schema.json": "./lib-commonjs/*.schema.json",
"./lib/*": {
"types": "./lib-dts/*.d.ts",
"node": "./lib-commonjs/*.js",
"import": "./lib-esm/*.js",
"require": "./lib-commonjs/*.js"
},
Expand Down
6 changes: 3 additions & 3 deletions apps/api-documenter/src/cli/ApiDocumenterCommandLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import { CommandLineParser } from '@rushstack/ts-command-line';

import { MarkdownAction } from './MarkdownAction';
import { YamlAction } from './YamlAction';
import { GenerateAction } from './GenerateAction';
import { MarkdownAction } from './MarkdownAction.ts';
import { YamlAction } from './YamlAction.ts';
import { GenerateAction } from './GenerateAction.ts';

export class ApiDocumenterCommandLine extends CommandLineParser {
public constructor() {
Expand Down
10 changes: 5 additions & 5 deletions apps/api-documenter/src/cli/GenerateAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import * as path from 'node:path';

import { FileSystem } from '@rushstack/node-core-library';

import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { DocumenterConfig } from '../documenters/DocumenterConfig';
import { ExperimentalYamlDocumenter } from '../documenters/ExperimentalYamlDocumenter';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';
import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine.ts';
import { BaseAction } from './BaseAction.ts';
import { DocumenterConfig } from '../documenters/DocumenterConfig.ts';
import { ExperimentalYamlDocumenter } from '../documenters/ExperimentalYamlDocumenter.ts';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter.ts';

export class GenerateAction extends BaseAction {
public constructor(parser: ApiDocumenterCommandLine) {
Expand Down
6 changes: 3 additions & 3 deletions apps/api-documenter/src/cli/MarkdownAction.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';
import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine.ts';
import { BaseAction } from './BaseAction.ts';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter.ts';

export class MarkdownAction extends BaseAction {
public constructor(parser: ApiDocumenterCommandLine) {
Expand Down
8 changes: 4 additions & 4 deletions apps/api-documenter/src/cli/YamlAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import type {
IRequiredCommandLineChoiceParameter
} from '@rushstack/ts-command-line';

import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { YamlDocumenter, type YamlFormat } from '../documenters/YamlDocumenter';
import { OfficeYamlDocumenter } from '../documenters/OfficeYamlDocumenter';
import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine.ts';
import { BaseAction } from './BaseAction.ts';
import { YamlDocumenter, type YamlFormat } from '../documenters/YamlDocumenter.ts';
import { OfficeYamlDocumenter } from '../documenters/OfficeYamlDocumenter.ts';

export class YamlAction extends BaseAction {
private readonly _officeParameter: CommandLineFlagParameter;
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/documenters/DocumenterConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as path from 'node:path';

import { JsonSchema, JsonFile, NewlineKind } from '@rushstack/node-core-library';

import type { IConfigFile } from './IConfigFile';
import type { IConfigFile } from './IConfigFile.ts';
import apiDocumenterSchema from '../schemas/api-documenter.schema.json';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import { type DocComment, DocInlineTag } from '@microsoft/tsdoc';
import { type ApiModel, type ApiItem, ApiItemKind, ApiDocumentedItem } from '@microsoft/api-extractor-model';

import type { IConfigTableOfContents } from './IConfigFile';
import type { IYamlTocItem, IYamlTocFile } from '../yaml/IYamlTocFile';
import { YamlDocumenter } from './YamlDocumenter';
import type { DocumenterConfig } from './DocumenterConfig';
import type { IConfigTableOfContents } from './IConfigFile.ts';
import type { IYamlTocItem, IYamlTocFile } from '../yaml/IYamlTocFile.ts';
import { YamlDocumenter } from './YamlDocumenter.ts';
import type { DocumenterConfig } from './DocumenterConfig.ts';

/**
* EXPERIMENTAL - This documenter is a prototype of a new config file driven mode of operation for
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/documenters/IConfigFile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import type { IYamlTocFile } from '../yaml/IYamlTocFile';
import type { IYamlTocFile } from '../yaml/IYamlTocFile.ts';

/**
* Typescript interface describing the config schema for toc.yml file format.
Expand Down
26 changes: 13 additions & 13 deletions apps/api-documenter/src/documenters/MarkdownDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ import {
type IFindApiItemsResult
} from '@microsoft/api-extractor-model';

import { CustomDocNodes } from '../nodes/CustomDocNodeKind';
import { DocHeading } from '../nodes/DocHeading';
import { DocTable } from '../nodes/DocTable';
import { DocEmphasisSpan } from '../nodes/DocEmphasisSpan';
import { DocTableRow } from '../nodes/DocTableRow';
import { DocTableCell } from '../nodes/DocTableCell';
import { DocNoteBox } from '../nodes/DocNoteBox';
import { Utilities } from '../utils/Utilities';
import { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter';
import { PluginLoader } from '../plugin/PluginLoader';
import { CustomDocNodes } from '../nodes/CustomDocNodeKind.ts';
import { DocHeading } from '../nodes/DocHeading.ts';
import { DocTable } from '../nodes/DocTable.ts';
import { DocEmphasisSpan } from '../nodes/DocEmphasisSpan.ts';
import { DocTableRow } from '../nodes/DocTableRow.ts';
import { DocTableCell } from '../nodes/DocTableCell.ts';
import { DocNoteBox } from '../nodes/DocNoteBox.ts';
import { Utilities } from '../utils/Utilities.ts';
import { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter.ts';
import { PluginLoader } from '../plugin/PluginLoader.ts';
import {
type IMarkdownDocumenterFeatureOnBeforeWritePageArgs,
MarkdownDocumenterFeatureContext
} from '../plugin/MarkdownDocumenterFeature';
import type { DocumenterConfig } from './DocumenterConfig';
import { MarkdownDocumenterAccessor } from '../plugin/MarkdownDocumenterAccessor';
} from '../plugin/MarkdownDocumenterFeature.ts';
import type { DocumenterConfig } from './DocumenterConfig.ts';
import { MarkdownDocumenterAccessor } from '../plugin/MarkdownDocumenterAccessor.ts';

export interface IMarkdownDocumenterOptions {
apiModel: ApiModel;
Expand Down
6 changes: 3 additions & 3 deletions apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import type { ApiModel } from '@microsoft/api-extractor-model';
import { FileSystem } from '@rushstack/node-core-library';
import { Colorize } from '@rushstack/terminal';

import type { IYamlTocItem } from '../yaml/IYamlTocFile';
import type { IYamlItem } from '../yaml/IYamlApiFile';
import { YamlDocumenter } from './YamlDocumenter';
import type { IYamlTocItem } from '../yaml/IYamlTocFile.ts';
import type { IYamlItem } from '../yaml/IYamlApiFile.ts';
import { YamlDocumenter } from './YamlDocumenter.ts';

interface ISnippetsFile {
/**
Expand Down
10 changes: 5 additions & 5 deletions apps/api-documenter/src/documenters/YamlDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ import type {
IYamlReference,
IYamlReferenceSpec,
IYamlInheritanceTree
} from '../yaml/IYamlApiFile';
import type { IYamlTocFile, IYamlTocItem } from '../yaml/IYamlTocFile';
import { Utilities } from '../utils/Utilities';
import { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter';
import { convertUDPYamlToSDP } from '../utils/ToSdpConvertHelper';
} from '../yaml/IYamlApiFile.ts';
import type { IYamlTocFile, IYamlTocItem } from '../yaml/IYamlTocFile.ts';
import { Utilities } from '../utils/Utilities.ts';
import { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter.ts';
import { convertUDPYamlToSDP } from '../utils/ToSdpConvertHelper.ts';
import typescriptSchema from '../yaml/typescript.schema.json';

const yamlApiSchema: JsonSchema = JsonSchema.fromLoadedObject(typescriptSchema);
Expand Down
11 changes: 7 additions & 4 deletions apps/api-documenter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
* @packageDocumentation
*/

export type { IFeatureDefinition, IApiDocumenterPluginManifest } from './plugin/IApiDocumenterPluginManifest';
export { MarkdownDocumenterAccessor } from './plugin/MarkdownDocumenterAccessor';
export type {
IFeatureDefinition,
IApiDocumenterPluginManifest
} from './plugin/IApiDocumenterPluginManifest.ts';
export { MarkdownDocumenterAccessor } from './plugin/MarkdownDocumenterAccessor.ts';
export {
MarkdownDocumenterFeatureContext,
type IMarkdownDocumenterFeatureOnBeforeWritePageArgs,
type IMarkdownDocumenterFeatureOnFinishedArgs,
MarkdownDocumenterFeature
} from './plugin/MarkdownDocumenterFeature';
export { PluginFeature, PluginFeatureContext, PluginFeatureInitialization } from './plugin/PluginFeature';
} from './plugin/MarkdownDocumenterFeature.ts';
export { PluginFeature, PluginFeatureContext, PluginFeatureInitialization } from './plugin/PluginFeature.ts';
16 changes: 8 additions & 8 deletions apps/api-documenter/src/markdown/CustomMarkdownEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import type { DocNode, DocLinkTag, StringBuilder } from '@microsoft/tsdoc';
import type { ApiModel, IResolveDeclarationReferenceResult, ApiItem } from '@microsoft/api-extractor-model';
import { Colorize } from '@rushstack/terminal';

import { CustomDocNodeKind } from '../nodes/CustomDocNodeKind';
import type { DocHeading } from '../nodes/DocHeading';
import type { DocNoteBox } from '../nodes/DocNoteBox';
import type { DocTable } from '../nodes/DocTable';
import type { DocTableCell } from '../nodes/DocTableCell';
import type { DocEmphasisSpan } from '../nodes/DocEmphasisSpan';
import { CustomDocNodeKind } from '../nodes/CustomDocNodeKind.ts';
import type { DocHeading } from '../nodes/DocHeading.ts';
import type { DocNoteBox } from '../nodes/DocNoteBox.ts';
import type { DocTable } from '../nodes/DocTable.ts';
import type { DocTableCell } from '../nodes/DocTableCell.ts';
import type { DocEmphasisSpan } from '../nodes/DocEmphasisSpan.ts';
import {
MarkdownEmitter,
type IMarkdownEmitterContext,
type IMarkdownEmitterOptions
} from './MarkdownEmitter';
import type { IndentedWriter } from '../utils/IndentedWriter';
} from './MarkdownEmitter.ts';
import type { IndentedWriter } from '../utils/IndentedWriter.ts';

export interface ICustomMarkdownEmitterOptions extends IMarkdownEmitterOptions {
contextApiItem: ApiItem | undefined;
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/markdown/MarkdownEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@microsoft/tsdoc';
import { InternalError } from '@rushstack/node-core-library';

import { IndentedWriter } from '../utils/IndentedWriter';
import { IndentedWriter } from '../utils/IndentedWriter.ts';

export interface IMarkdownEmitterOptions {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import {
DocBlockTag
} from '@microsoft/tsdoc';

import { CustomDocNodes } from '../../nodes/CustomDocNodeKind';
import { DocHeading } from '../../nodes/DocHeading';
import { DocEmphasisSpan } from '../../nodes/DocEmphasisSpan';
import { DocTable } from '../../nodes/DocTable';
import { DocTableRow } from '../../nodes/DocTableRow';
import { DocTableCell } from '../../nodes/DocTableCell';
import { CustomMarkdownEmitter } from '../CustomMarkdownEmitter';
import { CustomDocNodes } from '../../nodes/CustomDocNodeKind.ts';
import { DocHeading } from '../../nodes/DocHeading.ts';
import { DocEmphasisSpan } from '../../nodes/DocEmphasisSpan.ts';
import { DocTable } from '../../nodes/DocTable.ts';
import { DocTableRow } from '../../nodes/DocTableRow.ts';
import { DocTableCell } from '../../nodes/DocTableCell.ts';
import { CustomMarkdownEmitter } from '../CustomMarkdownEmitter.ts';
import { ApiModel, type ApiItem } from '@microsoft/api-extractor-model';

test('render Markdown from TSDoc', () => {
Expand Down
12 changes: 6 additions & 6 deletions apps/api-documenter/src/nodes/CustomDocNodeKind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

import { TSDocConfiguration, DocNodeKind } from '@microsoft/tsdoc';

import { DocEmphasisSpan } from './DocEmphasisSpan';
import { DocHeading } from './DocHeading';
import { DocNoteBox } from './DocNoteBox';
import { DocTable } from './DocTable';
import { DocTableCell } from './DocTableCell';
import { DocTableRow } from './DocTableRow';
import { DocEmphasisSpan } from './DocEmphasisSpan.ts';
import { DocHeading } from './DocHeading.ts';
import { DocNoteBox } from './DocNoteBox.ts';
import { DocTable } from './DocTable.ts';
import { DocTableCell } from './DocTableCell.ts';
import { DocTableRow } from './DocTableRow.ts';

/**
* Identifies custom subclasses of {@link DocNode}.
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/nodes/DocEmphasisSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { type DocNode, DocNodeContainer, type IDocNodeContainerParameters } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';

/**
* Constructor parameters for {@link DocEmphasisSpan}.
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/nodes/DocHeading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { type IDocNodeParameters, DocNode } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';

/**
* Constructor parameters for {@link DocHeading}.
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/nodes/DocNoteBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';

/**
* Constructor parameters for {@link DocNoteBox}.
Expand Down
6 changes: 3 additions & 3 deletions apps/api-documenter/src/nodes/DocTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import { type IDocNodeParameters, DocNode } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { DocTableRow } from './DocTableRow';
import type { DocTableCell } from './DocTableCell';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';
import { DocTableRow } from './DocTableRow.ts';
import type { DocTableCell } from './DocTableCell.ts';

/**
* Constructor parameters for {@link DocTable}.
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/nodes/DocTableCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';

/**
* Constructor parameters for {@link DocTableCell}.
Expand Down
4 changes: 2 additions & 2 deletions apps/api-documenter/src/nodes/DocTableRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import { type IDocNodeParameters, DocNode, DocPlainText } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { DocTableCell } from './DocTableCell';
import { CustomDocNodeKind } from './CustomDocNodeKind.ts';
import { DocTableCell } from './DocTableCell.ts';

/**
* Constructor parameters for {@link DocTableRow}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import type { MarkdownDocumenterFeature } from './MarkdownDocumenterFeature';
import type { PluginFeatureInitialization } from './PluginFeature';
import type { MarkdownDocumenterFeature } from './MarkdownDocumenterFeature.ts';
import type { PluginFeatureInitialization } from './PluginFeature.ts';

/**
* Defines a "feature" that is provided by an API Documenter plugin. A feature is a user-defined module
Expand Down
4 changes: 2 additions & 2 deletions apps/api-documenter/src/plugin/MarkdownDocumenterFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model';
import { TypeUuid } from '@rushstack/node-core-library';

import { PluginFeature } from './PluginFeature';
import type { MarkdownDocumenterAccessor } from './MarkdownDocumenterAccessor';
import { PluginFeature } from './PluginFeature.ts';
import type { MarkdownDocumenterAccessor } from './MarkdownDocumenterAccessor.ts';

/**
* Context object for {@link MarkdownDocumenterFeature}.
Expand Down
8 changes: 4 additions & 4 deletions apps/api-documenter/src/plugin/PluginLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import * as path from 'node:path';

import * as resolve from 'resolve';

import type { IApiDocumenterPluginManifest, IFeatureDefinition } from './IApiDocumenterPluginManifest';
import type { IApiDocumenterPluginManifest, IFeatureDefinition } from './IApiDocumenterPluginManifest.ts';
import {
MarkdownDocumenterFeature,
type MarkdownDocumenterFeatureContext
} from './MarkdownDocumenterFeature';
import { PluginFeatureInitialization } from './PluginFeature';
import type { DocumenterConfig } from '../documenters/DocumenterConfig';
} from './MarkdownDocumenterFeature.ts';
import { PluginFeatureInitialization } from './PluginFeature.ts';
import type { DocumenterConfig } from '../documenters/DocumenterConfig.ts';

interface ILoadedPlugin {
packageName: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as os from 'node:os';
import { PackageJsonLookup } from '@rushstack/node-core-library';
import { Colorize } from '@rushstack/terminal';

import { ApiDocumenterCommandLine } from './cli/ApiDocumenterCommandLine';
import { ApiDocumenterCommandLine } from './cli/ApiDocumenterCommandLine.ts';

const myPackageVersion: string = PackageJsonLookup.loadOwnPackageJson(__dirname).version;

Expand Down
4 changes: 2 additions & 2 deletions apps/api-documenter/src/utils/ToSdpConvertHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
IYamlSyntax,
IYamlReferenceSpec,
IYamlReference
} from '../yaml/IYamlApiFile';
} from '../yaml/IYamlApiFile.ts';
import type {
PackageYamlModel,
EnumYamlModel,
Expand All @@ -22,7 +22,7 @@ import type {
FieldYamlModel,
FunctionYamlModel,
CommonYamlModel
} from '../yaml/ISDPYamlFile';
} from '../yaml/ISDPYamlFile.ts';

export function convertUDPYamlToSDP(folderPath: string): void {
convert(folderPath, folderPath);
Expand Down
Loading
Loading