@microsoft/api-documenter 7.26.13 → 7.26.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +36 -0
- package/CHANGELOG.md +11 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/cli/BaseAction.js +17 -7
- package/lib/cli/BaseAction.js.map +1 -1
- package/lib/cli/GenerateAction.js +17 -7
- package/lib/cli/GenerateAction.js.map +1 -1
- package/lib/documenters/DocumenterConfig.js +17 -7
- package/lib/documenters/DocumenterConfig.js.map +1 -1
- package/lib/documenters/MarkdownDocumenter.js +17 -7
- package/lib/documenters/MarkdownDocumenter.js.map +1 -1
- package/lib/documenters/OfficeYamlDocumenter.js +17 -7
- package/lib/documenters/OfficeYamlDocumenter.js.map +1 -1
- package/lib/documenters/YamlDocumenter.js +17 -7
- package/lib/documenters/YamlDocumenter.js.map +1 -1
- package/lib/plugin/PluginLoader.js +17 -7
- package/lib/plugin/PluginLoader.js.map +1 -1
- package/lib/start.js +17 -7
- package/lib/start.js.map +1 -1
- package/lib/utils/ToSdpConvertHelper.js +21 -7
- package/lib/utils/ToSdpConvertHelper.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/api-documenter",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "7.26.15",
|
|
6
|
+
"tag": "@microsoft/api-documenter_v7.26.15",
|
|
7
|
+
"date": "Tue, 11 Mar 2025 02:12:33 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"dependency": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.4`"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "Updating dependency \"@rushstack/node-core-library\" to `5.12.0`"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"comment": "Updating dependency \"@rushstack/terminal\" to `0.15.1`"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.6`"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.70.0`"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"version": "7.26.14",
|
|
30
|
+
"tag": "@microsoft/api-documenter_v7.26.14",
|
|
31
|
+
"date": "Tue, 11 Mar 2025 00:11:25 GMT",
|
|
32
|
+
"comments": {
|
|
33
|
+
"dependency": [
|
|
34
|
+
{
|
|
35
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.69.3`"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
4
40
|
{
|
|
5
41
|
"version": "7.26.13",
|
|
6
42
|
"tag": "@microsoft/api-documenter_v7.26.13",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Change Log - @microsoft/api-documenter
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 11 Mar 2025 02:12:33 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 7.26.15
|
|
6
|
+
Tue, 11 Mar 2025 02:12:33 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 7.26.14
|
|
11
|
+
Tue, 11 Mar 2025 00:11:25 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
4
14
|
|
|
5
15
|
## 7.26.13
|
|
6
16
|
Sat, 01 Mar 2025 05:00:09 GMT
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/cli/BaseAction.js
CHANGED
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
38
|
exports.BaseAction = void 0;
|
|
29
39
|
const path = __importStar(require("path"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAction.js","sourceRoot":"","sources":["../../src/cli/BaseAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D
|
|
1
|
+
{"version":3,"file":"BaseAction.js","sourceRoot":"","sources":["../../src/cli/BaseAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAG7B,gEAIoC;AACpC,oEAA0D;AAC1D,wEAMwC;AACxC,kDAA+C;AAQ/C,MAAsB,UAAW,SAAQ,mCAAiB;IAIxD,YAAsB,OAAkC;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;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AAQ,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,kBAAkB,CAAC,gBAAkC,EAAE,gBAAkC;QAC/F,gBAAgB,CAAC,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAC;QAClE,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;QAE9D,gBAAgB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,KAAK,MAAM,KAAK,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAC5C,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,MAAM,SAAS,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;YACpD,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC;QACD,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;QAE9D,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC;IAC7C,CAAC;CACF;AAjHD,gCAiHC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\nimport type * as tsdoc from '@microsoft/tsdoc';\n\nimport {\n CommandLineAction,\n type CommandLineStringParameter,\n type ICommandLineActionOptions\n} from '@rushstack/ts-command-line';\nimport { FileSystem } from '@rushstack/node-core-library';\nimport {\n ApiModel,\n type ApiItem,\n ApiItemContainerMixin,\n ApiDocumentedItem,\n type IResolveDeclarationReferenceResult\n} from '@microsoft/api-extractor-model';\nimport { Colorize } from '@rushstack/terminal';\n\nexport interface IBuildApiModelResult {\n apiModel: ApiModel;\n inputFolder: string;\n outputFolder: string;\n}\n\nexport abstract class BaseAction extends CommandLineAction {\n private readonly _inputFolderParameter: CommandLineStringParameter;\n private readonly _outputFolderParameter: CommandLineStringParameter;\n\n protected constructor(options: ICommandLineActionOptions) {\n super(options);\n\n // override\n this._inputFolderParameter = this.defineStringParameter({\n parameterLongName: '--input-folder',\n parameterShortName: '-i',\n argumentName: 'FOLDER1',\n description:\n `Specifies the input folder containing the *.api.json files to be processed.` +\n ` If omitted, the default is \"./input\"`\n });\n\n this._outputFolderParameter = this.defineStringParameter({\n parameterLongName: '--output-folder',\n parameterShortName: '-o',\n argumentName: 'FOLDER2',\n description:\n `Specifies the output folder where the documentation will be written.` +\n ` ANY EXISTING CONTENTS WILL BE DELETED!` +\n ` If omitted, the default is \"./${this.actionName}\"`\n });\n }\n\n protected buildApiModel(): IBuildApiModelResult {\n const apiModel: ApiModel = new ApiModel();\n\n const inputFolder: string = this._inputFolderParameter.value || './input';\n if (!FileSystem.exists(inputFolder)) {\n throw new Error('The input folder does not exist: ' + inputFolder);\n }\n\n const outputFolder: string = this._outputFolderParameter.value || `./${this.actionName}`;\n FileSystem.ensureFolder(outputFolder);\n\n for (const filename of FileSystem.readFolderItemNames(inputFolder)) {\n if (filename.match(/\\.api\\.json$/i)) {\n console.log(`Reading ${filename}`);\n const filenamePath: string = path.join(inputFolder, filename);\n apiModel.loadPackage(filenamePath);\n }\n }\n\n this._applyInheritDoc(apiModel, apiModel);\n\n return { apiModel, inputFolder, outputFolder };\n }\n\n // TODO: This is a temporary workaround. The long term plan is for API Extractor's DocCommentEnhancer\n // to apply all @inheritDoc tags before the .api.json file is written.\n // See DocCommentEnhancer._applyInheritDoc() for more info.\n private _applyInheritDoc(apiItem: ApiItem, apiModel: ApiModel): void {\n if (apiItem instanceof ApiDocumentedItem) {\n if (apiItem.tsdocComment) {\n const inheritDocTag: tsdoc.DocInheritDocTag | undefined = apiItem.tsdocComment.inheritDocTag;\n\n if (inheritDocTag && inheritDocTag.declarationReference) {\n // Attempt to resolve the declaration reference\n const result: IResolveDeclarationReferenceResult = apiModel.resolveDeclarationReference(\n inheritDocTag.declarationReference,\n apiItem\n );\n\n if (result.errorMessage) {\n console.log(\n Colorize.yellow(\n `Warning: Unresolved @inheritDoc tag for ${apiItem.displayName}: ` + result.errorMessage\n )\n );\n } else {\n if (\n result.resolvedApiItem instanceof ApiDocumentedItem &&\n result.resolvedApiItem.tsdocComment &&\n result.resolvedApiItem !== apiItem\n ) {\n this._copyInheritedDocs(apiItem.tsdocComment, result.resolvedApiItem.tsdocComment);\n }\n }\n }\n }\n }\n\n // Recurse members\n if (ApiItemContainerMixin.isBaseClassOf(apiItem)) {\n for (const member of apiItem.members) {\n this._applyInheritDoc(member, apiModel);\n }\n }\n }\n\n /**\n * Copy the content from `sourceDocComment` to `targetDocComment`.\n * This code is borrowed from DocCommentEnhancer as a temporary workaround.\n */\n private _copyInheritedDocs(targetDocComment: tsdoc.DocComment, sourceDocComment: tsdoc.DocComment): void {\n targetDocComment.summarySection = sourceDocComment.summarySection;\n targetDocComment.remarksBlock = sourceDocComment.remarksBlock;\n\n targetDocComment.params.clear();\n for (const param of sourceDocComment.params) {\n targetDocComment.params.add(param);\n }\n for (const typeParam of sourceDocComment.typeParams) {\n targetDocComment.typeParams.add(typeParam);\n }\n targetDocComment.returnsBlock = sourceDocComment.returnsBlock;\n\n targetDocComment.inheritDocTag = undefined;\n }\n}\n"]}
|
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
38
|
exports.GenerateAction = void 0;
|
|
29
39
|
const path = __importStar(require("path"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateAction.js","sourceRoot":"","sources":["../../src/cli/GenerateAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D
|
|
1
|
+
{"version":3,"file":"GenerateAction.js","sourceRoot":"","sources":["../../src/cli/GenerateAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAG7B,6CAA0C;AAC1C,sEAAmE;AACnE,0FAAuF;AAEvF,oEAA0D;AAC1D,0EAAuE;AAEvE,MAAa,cAAe,SAAQ,uBAAU;IAC5C,YAAmB,MAAgC;QACjD,KAAK,CAAC;YACJ,UAAU,EAAE,UAAU;YACtB,OAAO,EAAE,cAAc;YACvB,aAAa,EACX,6FAA6F;gBAC7F,gGAAgG;SACnG,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAAC,SAAS;QACvB,WAAW;QACX,oDAAoD;QAEpD,IAAI,cAAc,GAAW,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,mCAAgB,CAAC,QAAQ,CAAC,CAAC;QAEjF,+BAA+B;QAC/B,IAAI,CAAC,8BAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACvC,gDAAgD;YAChD,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,mCAAgB,CAAC,QAAQ,CAAC,CAAC;YAC/E,IAAI,CAAC,8BAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;gBACvC,MAAM,IAAI,KAAK,CACb,kBAAkB,mCAAgB,CAAC,QAAQ,mDAAmD,CAC/F,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,gBAAgB,GAAqB,mCAAgB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAErF,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAExD,IAAI,gBAAgB,CAAC,UAAU,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;YAC5D,MAAM,kBAAkB,GAAuB,IAAI,uCAAkB,CAAC;gBACpE,QAAQ;gBACR,gBAAgB;gBAChB,YAAY;aACb,CAAC,CAAC;YACH,kBAAkB,CAAC,aAAa,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,MAAM,cAAc,GAA+B,IAAI,uDAA0B,CAC/E,QAAQ,EACR,gBAAgB,CACjB,CAAC;YACF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF;AA/CD,wCA+CC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\n\nimport type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';\nimport { BaseAction } from './BaseAction';\nimport { DocumenterConfig } from '../documenters/DocumenterConfig';\nimport { ExperimentalYamlDocumenter } from '../documenters/ExperimentalYamlDocumenter';\n\nimport { FileSystem } from '@rushstack/node-core-library';\nimport { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';\n\nexport class GenerateAction extends BaseAction {\n public constructor(parser: ApiDocumenterCommandLine) {\n super({\n actionName: 'generate',\n summary: 'EXPERIMENTAL',\n documentation:\n 'EXPERIMENTAL - This action is a prototype of a new config file driven mode of operation for' +\n ' API Documenter. It is not ready for general usage yet. Its design may change in the future.'\n });\n }\n\n protected async onExecute(): Promise<void> {\n // override\n // Look for the config file under the current folder\n\n let configFilePath: string = path.join(process.cwd(), DocumenterConfig.FILENAME);\n\n // First try the current folder\n if (!FileSystem.exists(configFilePath)) {\n // Otherwise try the standard \"config\" subfolder\n configFilePath = path.join(process.cwd(), 'config', DocumenterConfig.FILENAME);\n if (!FileSystem.exists(configFilePath)) {\n throw new Error(\n `Unable to find ${DocumenterConfig.FILENAME} in the current folder or in a \"config\" subfolder`\n );\n }\n }\n\n const documenterConfig: DocumenterConfig = DocumenterConfig.loadFile(configFilePath);\n\n const { apiModel, outputFolder } = this.buildApiModel();\n\n if (documenterConfig.configFile.outputTarget === 'markdown') {\n const markdownDocumenter: MarkdownDocumenter = new MarkdownDocumenter({\n apiModel,\n documenterConfig,\n outputFolder\n });\n markdownDocumenter.generateFiles();\n } else {\n const yamlDocumenter: ExperimentalYamlDocumenter = new ExperimentalYamlDocumenter(\n apiModel,\n documenterConfig\n );\n yamlDocumenter.generateFiles(outputFolder);\n }\n }\n}\n"]}
|
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
38
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumenterConfig.js","sourceRoot":"","sources":["../../src/documenters/DocumenterConfig.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D
|
|
1
|
+
{"version":3,"file":"DocumenterConfig.js","sourceRoot":"","sources":["../../src/documenters/DocumenterConfig.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAAiF;AAEjF,uGAAwE;AAExE;;;;GAIG;AACH,MAAa,gBAAgB;IAoB3B,YAAoB,QAAgB,EAAE,UAAuB;QAC3D,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,QAAQ,UAAU,CAAC,WAAW,EAAE,CAAC;YAC/B,KAAK,IAAI;gBACP,IAAI,CAAC,WAAW,GAAG,+BAAW,CAAC,EAAE,CAAC;gBAClC,MAAM;YACR,KAAK,IAAI;gBACP,IAAI,CAAC,WAAW,GAAG,+BAAW,CAAC,SAAS,CAAC;gBACzC,MAAM;YACR;gBACE,IAAI,CAAC,WAAW,GAAG,+BAAW,CAAC,IAAI,CAAC;gBACpC,MAAM;QACV,CAAC;IACH,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,QAAQ,CAAC,cAAsB;QAC3C,MAAM,UAAU,GAAgB,4BAAQ,CAAC,eAAe,CAAC,cAAc,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAEtG,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;IACxE,CAAC;;AA5CH,4CA6CC;AAnCC;;GAEG;AACoB,2BAAU,GAAe,8BAAU,CAAC,gBAAgB,CAAC,oCAAmB,CAAC,CAAC;AAEjG;;GAEG;AACoB,yBAAQ,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\nimport { JsonSchema, JsonFile, NewlineKind } from '@rushstack/node-core-library';\nimport type { IConfigFile } from './IConfigFile';\nimport apiDocumenterSchema from '../schemas/api-documenter.schema.json';\n\n/**\n * Helper for loading the api-documenter.json file format. Later when the schema is more mature,\n * this class will be used to represent the validated and normalized configuration, whereas `IConfigFile`\n * represents the raw JSON file structure.\n */\nexport class DocumenterConfig {\n public readonly configFilePath: string;\n public readonly configFile: IConfigFile;\n\n /**\n * Specifies what type of newlines API Documenter should use when writing output files. By default, the output files\n * will be written with Windows-style newlines.\n */\n public readonly newlineKind: NewlineKind;\n\n /**\n * The JSON Schema for API Documenter config file (api-documenter.schema.json).\n */\n public static readonly jsonSchema: JsonSchema = JsonSchema.fromLoadedObject(apiDocumenterSchema);\n\n /**\n * The config file name \"api-documenter.json\".\n */\n public static readonly FILENAME: string = 'api-documenter.json';\n\n private constructor(filePath: string, configFile: IConfigFile) {\n this.configFilePath = filePath;\n this.configFile = configFile;\n\n switch (configFile.newlineKind) {\n case 'lf':\n this.newlineKind = NewlineKind.Lf;\n break;\n case 'os':\n this.newlineKind = NewlineKind.OsDefault;\n break;\n default:\n this.newlineKind = NewlineKind.CrLf;\n break;\n }\n }\n\n /**\n * Load and validate an api-documenter.json file.\n */\n public static loadFile(configFilePath: string): DocumenterConfig {\n const configFile: IConfigFile = JsonFile.loadAndValidate(configFilePath, DocumenterConfig.jsonSchema);\n\n return new DocumenterConfig(path.resolve(configFilePath), configFile);\n }\n}\n"]}
|
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
38
|
exports.MarkdownDocumenter = void 0;
|
|
29
39
|
const path = __importStar(require("path"));
|