typedoc 0.23.24 → 0.23.25
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/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/lib/application.d.ts +0 -2
- package/dist/lib/application.js +38 -14
- package/dist/lib/converter/comments/discovery.d.ts +1 -1
- package/dist/lib/converter/comments/discovery.js +77 -74
- package/dist/lib/converter/comments/index.d.ts +1 -1
- package/dist/lib/converter/comments/index.js +18 -15
- package/dist/lib/converter/comments/linkResolver.js +6 -3
- package/dist/lib/converter/context.d.ts +2 -2
- package/dist/lib/converter/context.js +6 -3
- package/dist/lib/converter/convert-expression.d.ts +1 -1
- package/dist/lib/converter/convert-expression.js +16 -13
- package/dist/lib/converter/converter.d.ts +1 -1
- package/dist/lib/converter/converter.js +12 -9
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +8 -5
- package/dist/lib/converter/factories/signature.d.ts +1 -1
- package/dist/lib/converter/factories/signature.js +32 -29
- package/dist/lib/converter/jsdoc.d.ts +1 -1
- package/dist/lib/converter/jsdoc.js +18 -15
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +2 -0
- package/dist/lib/converter/plugins/CommentPlugin.js +19 -4
- package/dist/lib/converter/plugins/ImplementsPlugin.js +10 -7
- package/dist/lib/converter/plugins/PackagePlugin.js +25 -2
- package/dist/lib/converter/plugins/SourcePlugin.js +7 -4
- package/dist/lib/converter/symbols.d.ts +1 -1
- package/dist/lib/converter/symbols.js +129 -126
- package/dist/lib/converter/types.d.ts +1 -1
- package/dist/lib/converter/types.js +101 -98
- package/dist/lib/converter/utils/base-path.js +24 -1
- package/dist/lib/converter/utils/nodes.d.ts +1 -1
- package/dist/lib/converter/utils/nodes.js +5 -2
- package/dist/lib/converter/utils/symbols.d.ts +1 -1
- package/dist/lib/converter/utils/symbols.js +5 -2
- package/dist/lib/output/components.js +24 -1
- package/dist/lib/output/events.js +24 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +24 -1
- package/dist/lib/output/renderer.js +25 -2
- package/dist/lib/output/themes/MarkedPlugin.js +26 -3
- package/dist/lib/serialization/index.js +24 -1
- package/dist/lib/utils/entry-point.d.ts +1 -1
- package/dist/lib/utils/entry-point.js +35 -9
- package/dist/lib/utils/fs.js +33 -3
- package/dist/lib/utils/general.js +24 -1
- package/dist/lib/utils/highlighter.js +24 -1
- package/dist/lib/utils/index.js +14 -2
- package/dist/lib/utils/loggers.d.ts +1 -1
- package/dist/lib/utils/loggers.js +9 -6
- package/dist/lib/utils/options/declaration.d.ts +1 -0
- package/dist/lib/utils/options/readers/tsconfig.js +8 -5
- package/dist/lib/utils/options/readers/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/readers/typedoc.js +39 -5
- package/dist/lib/utils/options/sources/typedoc.js +79 -11
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/paths.d.ts +2 -2
- package/dist/lib/utils/plugins.js +25 -2
- package/dist/lib/validation/exports.js +5 -2
- package/package.json +12 -12
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.JavascriptIndexPlugin = void 0;
|
|
10
|
-
const Path = require("path");
|
|
33
|
+
const Path = __importStar(require("path"));
|
|
11
34
|
const lunr_1 = require("lunr");
|
|
12
35
|
const models_1 = require("../../models");
|
|
13
36
|
const plugins_1 = require("../../converter/plugins");
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.Renderer = void 0;
|
|
10
33
|
/**
|
|
@@ -15,8 +38,8 @@ exports.Renderer = void 0;
|
|
|
15
38
|
* series of {@link RendererEvent} events. Instances of {@link BasePlugin} can listen to these events and
|
|
16
39
|
* alter the generated output.
|
|
17
40
|
*/
|
|
18
|
-
const fs = require("fs");
|
|
19
|
-
const path = require("path");
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
20
43
|
const events_1 = require("./events");
|
|
21
44
|
const fs_1 = require("../utils/fs");
|
|
22
45
|
const DefaultTheme_1 = require("./themes/default/DefaultTheme");
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.MarkedPlugin = void 0;
|
|
10
|
-
const fs = require("fs");
|
|
11
|
-
const Path = require("path");
|
|
12
|
-
const Marked = require("marked");
|
|
33
|
+
const fs = __importStar(require("fs"));
|
|
34
|
+
const Path = __importStar(require("path"));
|
|
35
|
+
const Marked = __importStar(require("marked"));
|
|
13
36
|
const components_1 = require("../components");
|
|
14
37
|
const events_1 = require("../events");
|
|
15
38
|
const utils_1 = require("../../utils");
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.JSONOutput = exports.Serializer = exports.SerializeEvent = void 0;
|
|
4
27
|
var events_1 = require("./events");
|
|
5
28
|
Object.defineProperty(exports, "SerializeEvent", { enumerable: true, get: function () { return events_1.SerializeEvent; } });
|
|
6
29
|
var serializer_1 = require("./serializer");
|
|
7
30
|
Object.defineProperty(exports, "Serializer", { enumerable: true, get: function () { return serializer_1.Serializer; } });
|
|
8
|
-
const JSONOutput = require("./schema");
|
|
31
|
+
const JSONOutput = __importStar(require("./schema"));
|
|
9
32
|
exports.JSONOutput = JSONOutput;
|
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.getExpandedEntryPointsForPaths = exports.getWatchEntryPoints = exports.getEntryPoints = exports.EntryPointStrategy = void 0;
|
|
4
30
|
const path_1 = require("path");
|
|
5
|
-
const
|
|
6
|
-
const FS = require("fs");
|
|
7
|
-
const Path = require("path");
|
|
31
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
32
|
+
const FS = __importStar(require("fs"));
|
|
33
|
+
const Path = __importStar(require("path"));
|
|
8
34
|
const package_manifest_1 = require("./package-manifest");
|
|
9
35
|
const paths_1 = require("./paths");
|
|
10
36
|
const fs_1 = require("./fs");
|
|
@@ -117,7 +143,7 @@ function expandGlobs(inputFiles) {
|
|
|
117
143
|
return result;
|
|
118
144
|
}
|
|
119
145
|
function getEntryPrograms(logger, options) {
|
|
120
|
-
const rootProgram =
|
|
146
|
+
const rootProgram = typescript_1.default.createProgram({
|
|
121
147
|
rootNames: options.getFileNames(),
|
|
122
148
|
options: options.getCompilerOptions(),
|
|
123
149
|
projectReferences: options.getProjectReferences(),
|
|
@@ -131,7 +157,7 @@ function getEntryPrograms(logger, options) {
|
|
|
131
157
|
for (const ref of resolvedReferences ?? []) {
|
|
132
158
|
if (!ref)
|
|
133
159
|
continue; // This indicates bad configuration... will be reported later.
|
|
134
|
-
programs.push(
|
|
160
|
+
programs.push(typescript_1.default.createProgram({
|
|
135
161
|
options: options.fixCompilerOptions(ref.commandLine.options),
|
|
136
162
|
rootNames: ref.commandLine.fileNames,
|
|
137
163
|
projectReferences: ref.commandLine.projectReferences,
|
|
@@ -234,15 +260,15 @@ function getEntryPointsForPackages(logger, packageGlobPaths, options) {
|
|
|
234
260
|
if (packageEntryPoint === package_manifest_1.ignorePackage) {
|
|
235
261
|
continue;
|
|
236
262
|
}
|
|
237
|
-
const tsconfigFile =
|
|
263
|
+
const tsconfigFile = typescript_1.default.findConfigFile(packageEntryPoint, typescript_1.default.sys.fileExists, typedocPackageConfig?.tsconfig);
|
|
238
264
|
if (tsconfigFile === undefined) {
|
|
239
265
|
logger.error(`Could not determine tsconfig.json for source file ${packageEntryPoint} (it must be on an ancestor path)`);
|
|
240
266
|
return;
|
|
241
267
|
}
|
|
242
268
|
// Consider deduplicating this with similar code in src/lib/utils/options/readers/tsconfig.ts
|
|
243
269
|
let fatalError = false;
|
|
244
|
-
const parsedCommandLine =
|
|
245
|
-
...
|
|
270
|
+
const parsedCommandLine = typescript_1.default.getParsedCommandLineOfConfigFile(tsconfigFile, {}, {
|
|
271
|
+
...typescript_1.default.sys,
|
|
246
272
|
onUnRecoverableConfigFileDiagnostic: (error) => {
|
|
247
273
|
logger.diagnostic(error);
|
|
248
274
|
fatalError = true;
|
|
@@ -255,7 +281,7 @@ function getEntryPointsForPackages(logger, packageGlobPaths, options) {
|
|
|
255
281
|
if (fatalError) {
|
|
256
282
|
return;
|
|
257
283
|
}
|
|
258
|
-
const program =
|
|
284
|
+
const program = typescript_1.default.createProgram({
|
|
259
285
|
rootNames: parsedCommandLine.fileNames,
|
|
260
286
|
options: options.fixCompilerOptions(parsedCommandLine.options),
|
|
261
287
|
projectReferences: parsedCommandLine.projectReferences,
|
package/dist/lib/utils/fs.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.glob = exports.copySync = exports.copy = exports.writeFile = exports.writeFileSync = exports.readFile = exports.normalizePath = exports.getCommonDirectory = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
5
28
|
const fs_1 = require("fs");
|
|
6
29
|
const minimatch_1 = require("minimatch");
|
|
7
30
|
const path_1 = require("path");
|
|
@@ -140,6 +163,11 @@ function glob(pattern, root, options = {}) {
|
|
|
140
163
|
// cache of fs.realpathSync results to avoid extra I/O
|
|
141
164
|
const realpathCache = new Map();
|
|
142
165
|
const { includeDirectories = false, followSymlinks = false } = options;
|
|
166
|
+
// if we _specifically asked_ for something in node_modules, fine, otherwise ignore it
|
|
167
|
+
// to avoid globs like '**/*.ts' finding all the .d.ts files in node_modules.
|
|
168
|
+
// however, if the pattern is something like `!**/node_modules/**`, this will also
|
|
169
|
+
// cause node_modules to be considered, though it will be discarded by minimatch.
|
|
170
|
+
const shouldIncludeNodeModules = pattern.includes("node_modules");
|
|
143
171
|
let dir = dirs.shift();
|
|
144
172
|
const handleFile = (path) => {
|
|
145
173
|
const childPath = [...dir, path].join("/");
|
|
@@ -200,8 +228,10 @@ function glob(pattern, root, options = {}) {
|
|
|
200
228
|
if (child.isFile()) {
|
|
201
229
|
handleFile(child.name);
|
|
202
230
|
}
|
|
203
|
-
else if (child.isDirectory()
|
|
204
|
-
|
|
231
|
+
else if (child.isDirectory()) {
|
|
232
|
+
if (shouldIncludeNodeModules || child.name !== "node_modules") {
|
|
233
|
+
handleDirectory(child.name);
|
|
234
|
+
}
|
|
205
235
|
}
|
|
206
236
|
else if (followSymlinks && child.isSymbolicLink()) {
|
|
207
237
|
handleSymlink(child.name);
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getLoadedPaths = exports.hasBeenLoadedMultipleTimes = exports.assertNever = void 0;
|
|
4
27
|
const path_1 = require("path");
|
|
5
|
-
const Util = require("util");
|
|
28
|
+
const Util = __importStar(require("util"));
|
|
6
29
|
/**
|
|
7
30
|
* Utility to help type checking ensure that there is no uncovered case.
|
|
8
31
|
*/
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getStyles = exports.highlight = exports.getSupportedLanguages = exports.isSupportedLanguage = exports.loadHighlighter = void 0;
|
|
4
27
|
const assert_1 = require("assert");
|
|
5
28
|
const shiki_1 = require("shiki");
|
|
6
29
|
const array_1 = require("./array");
|
|
7
|
-
const JSX = require("./jsx");
|
|
30
|
+
const JSX = __importStar(require("./jsx"));
|
|
8
31
|
const aliases = new Map();
|
|
9
32
|
for (const lang of shiki_1.BUNDLED_LANGUAGES) {
|
|
10
33
|
for (const alias of lang.aliases || []) {
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -10,9 +10,21 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
13
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
20
|
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
29
|
exports.MinimalSourceFile = exports.Validation = exports.renderElement = exports.Raw = exports.Fragment = exports.JSX = exports.EventHooks = exports.getSortFunction = exports.loadPlugins = exports.discoverPlugins = exports.TypeDocReader = exports.TSConfigReader = exports.ParameterType = exports.ParameterHint = exports.Options = exports.CommentStyle = exports.BindOption = exports.ArgumentsReader = exports.DefaultMap = exports.LogLevel = exports.Logger = exports.ConsoleLogger = exports.CallbackLogger = exports.assertNever = exports.writeFileSync = exports.writeFile = exports.readFile = exports.normalizePath = exports.getCommonDirectory = exports.copySync = exports.copy = exports.EventDispatcher = exports.Event = exports.Component = exports.ChildableComponent = exports.AbstractComponent = exports.unique = exports.removeIfPresent = exports.removeIf = exports.partition = exports.insertPrioritySorted = exports.filterMap = void 0;
|
|
18
30
|
var array_1 = require("./array");
|
|
@@ -63,13 +75,13 @@ Object.defineProperty(exports, "getSortFunction", { enumerable: true, get: funct
|
|
|
63
75
|
var hooks_1 = require("./hooks");
|
|
64
76
|
Object.defineProperty(exports, "EventHooks", { enumerable: true, get: function () { return hooks_1.EventHooks; } });
|
|
65
77
|
__exportStar(require("./entry-point"), exports);
|
|
66
|
-
const JSX = require("./jsx");
|
|
78
|
+
const JSX = __importStar(require("./jsx"));
|
|
67
79
|
exports.JSX = JSX;
|
|
68
80
|
var jsx_1 = require("./jsx");
|
|
69
81
|
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return jsx_1.Fragment; } });
|
|
70
82
|
Object.defineProperty(exports, "Raw", { enumerable: true, get: function () { return jsx_1.Raw; } });
|
|
71
83
|
Object.defineProperty(exports, "renderElement", { enumerable: true, get: function () { return jsx_1.renderElement; } });
|
|
72
|
-
exports.Validation = require("./validation");
|
|
84
|
+
exports.Validation = __importStar(require("./validation"));
|
|
73
85
|
__exportStar(require("./tsutils"), exports);
|
|
74
86
|
var minimalSourceFile_1 = require("./minimalSourceFile");
|
|
75
87
|
Object.defineProperty(exports, "MinimalSourceFile", { enumerable: true, get: function () { return minimalSourceFile_1.MinimalSourceFile; } });
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.CallbackLogger = exports.ConsoleLogger = exports.Logger = exports.LogLevel = void 0;
|
|
4
|
-
const
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
5
8
|
const inspector_1 = require("inspector");
|
|
6
9
|
const path_1 = require("path");
|
|
7
10
|
const paths_1 = require("./paths");
|
|
@@ -151,19 +154,19 @@ class Logger {
|
|
|
151
154
|
* @param diagnostic The TypeScript message that should be logged.
|
|
152
155
|
*/
|
|
153
156
|
diagnostic(diagnostic) {
|
|
154
|
-
const output =
|
|
157
|
+
const output = typescript_1.default.formatDiagnosticsWithColorAndContext([diagnostic], {
|
|
155
158
|
getCanonicalFileName: path_1.resolve,
|
|
156
159
|
getCurrentDirectory: () => process.cwd(),
|
|
157
|
-
getNewLine: () =>
|
|
160
|
+
getNewLine: () => typescript_1.default.sys.newLine,
|
|
158
161
|
});
|
|
159
162
|
switch (diagnostic.category) {
|
|
160
|
-
case
|
|
163
|
+
case typescript_1.default.DiagnosticCategory.Error:
|
|
161
164
|
this.log(output, LogLevel.Error);
|
|
162
165
|
break;
|
|
163
|
-
case
|
|
166
|
+
case typescript_1.default.DiagnosticCategory.Warning:
|
|
164
167
|
this.log(output, LogLevel.Warn);
|
|
165
168
|
break;
|
|
166
|
-
case
|
|
169
|
+
case typescript_1.default.DiagnosticCategory.Message:
|
|
167
170
|
this.log(output, LogLevel.Info);
|
|
168
171
|
}
|
|
169
172
|
}
|
|
@@ -52,6 +52,7 @@ export interface TypeDocOptionMap {
|
|
|
52
52
|
externalPattern: string[];
|
|
53
53
|
excludeExternals: boolean;
|
|
54
54
|
excludeNotDocumented: boolean;
|
|
55
|
+
excludeNotDocumentedKinds: Array<keyof typeof ReflectionKind>;
|
|
55
56
|
excludeInternal: boolean;
|
|
56
57
|
excludePrivate: boolean;
|
|
57
58
|
excludeProtected: boolean;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TSConfigReader = void 0;
|
|
4
7
|
const path_1 = require("path");
|
|
5
8
|
const fs_1 = require("fs");
|
|
6
|
-
const
|
|
9
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
7
10
|
const fs_2 = require("../../fs");
|
|
8
11
|
const assert_1 = require("assert");
|
|
9
12
|
const validation_1 = require("../../validation");
|
|
@@ -60,7 +63,7 @@ class TSConfigReader {
|
|
|
60
63
|
static findConfigFile(file) {
|
|
61
64
|
let fileToRead = file;
|
|
62
65
|
if (isDir(fileToRead)) {
|
|
63
|
-
fileToRead =
|
|
66
|
+
fileToRead = typescript_1.default.findConfigFile(file, isFile);
|
|
64
67
|
}
|
|
65
68
|
if (!fileToRead || !isFile(fileToRead)) {
|
|
66
69
|
return;
|
|
@@ -83,8 +86,8 @@ class TSConfigReader {
|
|
|
83
86
|
}
|
|
84
87
|
fileToRead = (0, fs_2.normalizePath)((0, path_1.resolve)(fileToRead));
|
|
85
88
|
this.addTagsFromTsdocJson(container, logger, (0, path_1.resolve)(fileToRead));
|
|
86
|
-
const parsed =
|
|
87
|
-
...
|
|
89
|
+
const parsed = typescript_1.default.getParsedCommandLineOfConfigFile(fileToRead, {}, {
|
|
90
|
+
...typescript_1.default.sys,
|
|
88
91
|
onUnRecoverableConfigFileDiagnostic: logger.diagnostic.bind(logger),
|
|
89
92
|
});
|
|
90
93
|
if (!parsed) {
|
|
@@ -160,7 +163,7 @@ class TSConfigReader {
|
|
|
160
163
|
return;
|
|
161
164
|
}
|
|
162
165
|
this.seenTsdocPaths.add(path);
|
|
163
|
-
const { config, error } =
|
|
166
|
+
const { config, error } = typescript_1.default.readConfigFile((0, fs_2.normalizePath)(path), typescript_1.default.sys.readFile);
|
|
164
167
|
if (error) {
|
|
165
168
|
logger.error(`Failed to read tsdoc.json file at ${(0, paths_1.nicePath)(path)}.`);
|
|
166
169
|
return;
|
|
@@ -25,7 +25,7 @@ export declare class TypeDocReader implements OptionsReader {
|
|
|
25
25
|
*/
|
|
26
26
|
private readFile;
|
|
27
27
|
/**
|
|
28
|
-
* Search for the
|
|
28
|
+
* Search for the configuration file given path
|
|
29
29
|
*
|
|
30
30
|
* @param path Path to the typedoc.(js|json) file. If path is a directory
|
|
31
31
|
* typedoc file will be attempted to be found at the root of this path
|
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.TypeDocReader = void 0;
|
|
4
30
|
const path_1 = require("path");
|
|
5
|
-
const FS = require("fs");
|
|
6
|
-
const
|
|
31
|
+
const FS = __importStar(require("fs"));
|
|
32
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
7
33
|
const assert_1 = require("assert");
|
|
8
34
|
const paths_1 = require("../../paths");
|
|
9
35
|
const fs_1 = require("../../fs");
|
|
@@ -51,7 +77,7 @@ class TypeDocReader {
|
|
|
51
77
|
seen.add(file);
|
|
52
78
|
let fileContent;
|
|
53
79
|
if (file.endsWith(".json")) {
|
|
54
|
-
const readResult =
|
|
80
|
+
const readResult = typescript_1.default.readConfigFile((0, fs_1.normalizePath)(file), (path) => FS.readFileSync(path, "utf-8"));
|
|
55
81
|
if (readResult.error) {
|
|
56
82
|
logger.error(`Failed to parse ${(0, paths_1.nicePath)(file)}, ensure it exists and contains an object.`);
|
|
57
83
|
return;
|
|
@@ -98,7 +124,7 @@ class TypeDocReader {
|
|
|
98
124
|
}
|
|
99
125
|
}
|
|
100
126
|
/**
|
|
101
|
-
* Search for the
|
|
127
|
+
* Search for the configuration file given path
|
|
102
128
|
*
|
|
103
129
|
* @param path Path to the typedoc.(js|json) file. If path is a directory
|
|
104
130
|
* typedoc file will be attempted to be found at the root of this path
|
|
@@ -110,9 +136,17 @@ class TypeDocReader {
|
|
|
110
136
|
return [
|
|
111
137
|
path,
|
|
112
138
|
(0, path_1.join)(path, "typedoc.json"),
|
|
139
|
+
(0, path_1.join)(path, "typedoc.jsonc"),
|
|
140
|
+
(0, path_1.join)(path, "typedoc.config.js"),
|
|
141
|
+
(0, path_1.join)(path, "typedoc.config.cjs"),
|
|
113
142
|
(0, path_1.join)(path, "typedoc.js"),
|
|
114
|
-
(0, path_1.join)(path, "
|
|
143
|
+
(0, path_1.join)(path, "typedoc.cjs"),
|
|
115
144
|
(0, path_1.join)(path, ".config/typedoc.json"),
|
|
145
|
+
(0, path_1.join)(path, ".config/typedoc.jsonc"),
|
|
146
|
+
(0, path_1.join)(path, ".config/typedoc.config.js"),
|
|
147
|
+
(0, path_1.join)(path, ".config/typedoc.config.cjs"),
|
|
148
|
+
(0, path_1.join)(path, ".config/typedoc.js"),
|
|
149
|
+
(0, path_1.join)(path, ".config/typedoc.cjs"),
|
|
116
150
|
].find((path) => FS.existsSync(path) && FS.statSync(path).isFile());
|
|
117
151
|
}
|
|
118
152
|
}
|