typedoc 0.24.0 → 0.24.2
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 +2 -3
- package/dist/index.js +2 -3
- package/dist/lib/application.js +2 -1
- package/dist/lib/converter/comments/parser.js +1 -1
- package/dist/lib/converter/plugins/ImplementsPlugin.js +16 -6
- package/dist/lib/converter/plugins/PackagePlugin.js +1 -1
- package/dist/lib/converter/plugins/SourcePlugin.js +2 -3
- package/dist/lib/converter/types.js +3 -1
- package/dist/lib/models/comments/comment.js +6 -1
- package/dist/lib/models/reflections/abstract.d.ts +5 -2
- package/dist/lib/models/reflections/abstract.js +0 -11
- package/dist/lib/models/reflections/container.d.ts +0 -8
- package/dist/lib/models/reflections/container.js +0 -8
- package/dist/lib/models/reflections/declaration.d.ts +0 -8
- package/dist/lib/models/reflections/declaration.js +0 -8
- package/dist/lib/models/reflections/kind.d.ts +2 -0
- package/dist/lib/models/reflections/kind.js +5 -0
- package/dist/lib/models/reflections/parameter.d.ts +0 -8
- package/dist/lib/models/reflections/parameter.js +0 -9
- package/dist/lib/models/reflections/project.d.ts +5 -0
- package/dist/lib/models/reflections/project.js +40 -9
- package/dist/lib/models/reflections/signature.d.ts +0 -8
- package/dist/lib/models/reflections/signature.js +0 -9
- package/dist/lib/models/reflections/type-parameter.d.ts +2 -1
- package/dist/lib/models/reflections/type-parameter.js +3 -0
- package/dist/lib/models/types.d.ts +15 -4
- package/dist/lib/models/types.js +20 -3
- package/dist/lib/output/themes/MarkedPlugin.js +4 -3
- package/dist/lib/output/themes/default/DefaultTheme.js +3 -9
- package/dist/lib/output/themes/default/layouts/default.js +1 -1
- package/dist/lib/output/themes/default/partials/icon.js +1 -1
- package/dist/lib/output/themes/default/partials/member.declaration.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/member.signature.title.js +26 -13
- package/dist/lib/output/themes/default/partials/navigation.js +1 -1
- package/dist/lib/output/themes/default/partials/parameter.js +5 -5
- package/dist/lib/output/themes/default/partials/type.js +44 -31
- package/dist/lib/output/themes/default/partials/typeParameters.js +1 -1
- package/dist/lib/output/themes/lib.d.ts +2 -0
- package/dist/lib/output/themes/lib.js +13 -2
- package/dist/lib/serialization/schema.d.ts +1 -1
- package/dist/lib/serialization/schema.js +0 -1
- package/dist/lib/utils/entry-point.js +6 -16
- package/dist/lib/utils/fs.d.ts +1 -7
- package/dist/lib/utils/fs.js +19 -17
- package/dist/lib/utils/html-entities.json +2233 -0
- package/dist/lib/utils/html.d.ts +1 -0
- package/dist/lib/utils/html.js +28 -0
- package/dist/lib/utils/index.d.ts +3 -2
- package/dist/lib/utils/index.js +3 -2
- package/dist/lib/utils/jsx.js +8 -7
- package/dist/lib/utils/map.d.ts +1 -0
- package/dist/lib/utils/map.js +3 -0
- package/dist/lib/utils/options/declaration.d.ts +30 -29
- package/dist/lib/utils/options/index.d.ts +1 -1
- package/dist/lib/utils/options/readers/tsconfig.js +2 -2
- package/dist/lib/utils/options/readers/typedoc.js +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +6 -0
- package/dist/lib/utils/paths.d.ts +7 -0
- package/dist/lib/utils/paths.js +15 -6
- package/dist/lib/utils/sort.d.ts +1 -1
- package/dist/lib/utils/sort.js +9 -1
- package/package.json +9 -9
- package/static/main.js +3 -3
- package/static/style.css +217 -91
package/dist/lib/utils/fs.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
export declare function isFile(file: string): boolean;
|
|
2
2
|
export declare function isDir(path: string): boolean;
|
|
3
|
+
export declare function deriveRootDir(globPaths: string[]): string;
|
|
3
4
|
/**
|
|
4
5
|
* Get the longest directory path common to all files.
|
|
5
6
|
*/
|
|
6
7
|
export declare function getCommonDirectory(files: readonly string[]): string;
|
|
7
|
-
/**
|
|
8
|
-
* Normalize the given path.
|
|
9
|
-
*
|
|
10
|
-
* @param path The path that should be normalized.
|
|
11
|
-
* @returns The normalized path.
|
|
12
|
-
*/
|
|
13
|
-
export declare function normalizePath(path: string): string;
|
|
14
8
|
/**
|
|
15
9
|
* Load the given file and return its contents.
|
|
16
10
|
*
|
package/dist/lib/utils/fs.js
CHANGED
|
@@ -23,12 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.findPackageForPath = exports.discoverPackageJson = exports.discoverInParentDirExactMatch = exports.discoverInParentDir = exports.hasTsExtension = exports.glob = exports.copySync = exports.copy = exports.writeFile = exports.writeFileSync = exports.readFile = exports.
|
|
26
|
+
exports.findPackageForPath = exports.discoverPackageJson = exports.discoverInParentDirExactMatch = exports.discoverInParentDir = exports.hasTsExtension = exports.glob = exports.copySync = exports.copy = exports.writeFile = exports.writeFileSync = exports.readFile = exports.getCommonDirectory = exports.deriveRootDir = exports.isDir = exports.isFile = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const fs_1 = require("fs");
|
|
29
29
|
const minimatch_1 = require("minimatch");
|
|
30
30
|
const path_1 = require("path");
|
|
31
31
|
const validation_1 = require("./validation");
|
|
32
|
+
const paths_1 = require("./paths");
|
|
33
|
+
const array_1 = require("./array");
|
|
32
34
|
function isFile(file) {
|
|
33
35
|
try {
|
|
34
36
|
return fs.statSync(file).isFile();
|
|
@@ -47,6 +49,16 @@ function isDir(path) {
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
exports.isDir = isDir;
|
|
52
|
+
function deriveRootDir(globPaths) {
|
|
53
|
+
const globs = (0, paths_1.createMinimatch)(globPaths);
|
|
54
|
+
const rootPaths = globs.flatMap((glob) => (0, array_1.filterMap)(glob.set, (set) => {
|
|
55
|
+
const stop = set.findIndex((part) => typeof part !== "string");
|
|
56
|
+
const path = stop === -1 ? set : set.slice(0, stop);
|
|
57
|
+
return `/${path.join("/").replace(/^\//, "")}`;
|
|
58
|
+
}));
|
|
59
|
+
return getCommonDirectory(rootPaths);
|
|
60
|
+
}
|
|
61
|
+
exports.deriveRootDir = deriveRootDir;
|
|
50
62
|
/**
|
|
51
63
|
* Get the longest directory path common to all files.
|
|
52
64
|
*/
|
|
@@ -65,16 +77,6 @@ function getCommonDirectory(files) {
|
|
|
65
77
|
return roots[0].slice(0, i).join("/");
|
|
66
78
|
}
|
|
67
79
|
exports.getCommonDirectory = getCommonDirectory;
|
|
68
|
-
/**
|
|
69
|
-
* Normalize the given path.
|
|
70
|
-
*
|
|
71
|
-
* @param path The path that should be normalized.
|
|
72
|
-
* @returns The normalized path.
|
|
73
|
-
*/
|
|
74
|
-
function normalizePath(path) {
|
|
75
|
-
return path.replace(/\\/g, "/");
|
|
76
|
-
}
|
|
77
|
-
exports.normalizePath = normalizePath;
|
|
78
80
|
/**
|
|
79
81
|
* Load the given file and return its contents.
|
|
80
82
|
*
|
|
@@ -118,8 +120,8 @@ exports.readFile = readFile;
|
|
|
118
120
|
* @param data The contents of the file.
|
|
119
121
|
*/
|
|
120
122
|
function writeFileSync(fileName, data) {
|
|
121
|
-
fs.mkdirSync((0, path_1.dirname)(normalizePath(fileName)), { recursive: true });
|
|
122
|
-
fs.writeFileSync(normalizePath(fileName), data);
|
|
123
|
+
fs.mkdirSync((0, path_1.dirname)((0, paths_1.normalizePath)(fileName)), { recursive: true });
|
|
124
|
+
fs.writeFileSync((0, paths_1.normalizePath)(fileName), data);
|
|
123
125
|
}
|
|
124
126
|
exports.writeFileSync = writeFileSync;
|
|
125
127
|
/**
|
|
@@ -131,10 +133,10 @@ exports.writeFileSync = writeFileSync;
|
|
|
131
133
|
* @param data The contents of the file.
|
|
132
134
|
*/
|
|
133
135
|
async function writeFile(fileName, data) {
|
|
134
|
-
await fs_1.promises.mkdir((0, path_1.dirname)(normalizePath(fileName)), {
|
|
136
|
+
await fs_1.promises.mkdir((0, path_1.dirname)((0, paths_1.normalizePath)(fileName)), {
|
|
135
137
|
recursive: true,
|
|
136
138
|
});
|
|
137
|
-
await fs_1.promises.writeFile(normalizePath(fileName), data);
|
|
139
|
+
await fs_1.promises.writeFile((0, paths_1.normalizePath)(fileName), data);
|
|
138
140
|
}
|
|
139
141
|
exports.writeFile = writeFile;
|
|
140
142
|
/**
|
|
@@ -175,8 +177,8 @@ exports.copySync = copySync;
|
|
|
175
177
|
*/
|
|
176
178
|
function glob(pattern, root, options = {}) {
|
|
177
179
|
const result = [];
|
|
178
|
-
const mini = new minimatch_1.Minimatch(normalizePath(pattern));
|
|
179
|
-
const dirs = [normalizePath(root).split("/")];
|
|
180
|
+
const mini = new minimatch_1.Minimatch((0, paths_1.normalizePath)(pattern));
|
|
181
|
+
const dirs = [(0, paths_1.normalizePath)(root).split("/")];
|
|
180
182
|
// cache of real paths to avoid infinite recursion
|
|
181
183
|
const symlinkTargetsSeen = new Set();
|
|
182
184
|
// cache of fs.realpathSync results to avoid extra I/O
|