typedoc 0.24.8 → 0.25.1

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.
Files changed (138) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +6 -2
  3. package/dist/index.js +6 -1
  4. package/dist/lib/application.d.ts +13 -11
  5. package/dist/lib/application.js +455 -347
  6. package/dist/lib/cli.js +29 -22
  7. package/dist/lib/converter/comments/blockLexer.js +10 -1
  8. package/dist/lib/converter/comments/declarationReference.js +2 -0
  9. package/dist/lib/converter/comments/declarationReferenceResolver.js +2 -1
  10. package/dist/lib/converter/comments/discovery.js +0 -1
  11. package/dist/lib/converter/comments/linkResolver.d.ts +5 -2
  12. package/dist/lib/converter/comments/linkResolver.js +21 -13
  13. package/dist/lib/converter/comments/parser.js +7 -12
  14. package/dist/lib/converter/comments/tagName.d.ts +8 -0
  15. package/dist/lib/converter/comments/tagName.js +62 -0
  16. package/dist/lib/converter/context.js +1 -2
  17. package/dist/lib/converter/converter.d.ts +12 -10
  18. package/dist/lib/converter/converter.js +440 -309
  19. package/dist/lib/converter/factories/index-signature.js +2 -1
  20. package/dist/lib/converter/factories/signature.js +3 -4
  21. package/dist/lib/converter/plugins/CategoryPlugin.d.ts +8 -8
  22. package/dist/lib/converter/plugins/CategoryPlugin.js +294 -200
  23. package/dist/lib/converter/plugins/CommentPlugin.d.ts +8 -5
  24. package/dist/lib/converter/plugins/CommentPlugin.js +434 -305
  25. package/dist/lib/converter/plugins/GroupPlugin.d.ts +3 -3
  26. package/dist/lib/converter/plugins/GroupPlugin.js +216 -145
  27. package/dist/lib/converter/plugins/ImplementsPlugin.js +240 -192
  28. package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +2 -0
  29. package/dist/lib/converter/plugins/InheritDocPlugin.js +202 -132
  30. package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +1 -1
  31. package/dist/lib/converter/plugins/LinkResolverPlugin.js +111 -43
  32. package/dist/lib/converter/plugins/PackagePlugin.d.ts +6 -4
  33. package/dist/lib/converter/plugins/PackagePlugin.js +192 -96
  34. package/dist/lib/converter/plugins/SourcePlugin.d.ts +6 -5
  35. package/dist/lib/converter/plugins/SourcePlugin.js +239 -132
  36. package/dist/lib/converter/plugins/TypePlugin.js +148 -101
  37. package/dist/lib/converter/symbols.js +16 -4
  38. package/dist/lib/converter/types.js +16 -1
  39. package/dist/lib/converter/utils/nodes.d.ts +2 -2
  40. package/dist/lib/converter/utils/repository.d.ts +15 -5
  41. package/dist/lib/converter/utils/repository.js +29 -12
  42. package/dist/lib/models/ReflectionGroup.d.ts +4 -2
  43. package/dist/lib/models/ReflectionGroup.js +3 -1
  44. package/dist/lib/models/comments/comment.d.ts +9 -2
  45. package/dist/lib/models/comments/comment.js +2 -0
  46. package/dist/lib/models/reflections/ReflectionSymbolId.js +1 -1
  47. package/dist/lib/models/reflections/abstract.d.ts +6 -1
  48. package/dist/lib/models/reflections/abstract.js +15 -2
  49. package/dist/lib/models/reflections/container.d.ts +3 -0
  50. package/dist/lib/models/reflections/container.js +4 -1
  51. package/dist/lib/models/reflections/declaration.d.ts +1 -0
  52. package/dist/lib/models/reflections/declaration.js +1 -0
  53. package/dist/lib/models/reflections/index.d.ts +1 -1
  54. package/dist/lib/models/reflections/kind.d.ts +4 -4
  55. package/dist/lib/models/reflections/kind.js +5 -7
  56. package/dist/lib/models/reflections/parameter.d.ts +3 -0
  57. package/dist/lib/models/reflections/parameter.js +3 -0
  58. package/dist/lib/models/reflections/project.d.ts +1 -0
  59. package/dist/lib/models/reflections/project.js +3 -1
  60. package/dist/lib/models/reflections/reference.d.ts +1 -0
  61. package/dist/lib/models/reflections/reference.js +1 -0
  62. package/dist/lib/models/reflections/signature.d.ts +3 -0
  63. package/dist/lib/models/reflections/signature.js +3 -0
  64. package/dist/lib/models/reflections/type-parameter.d.ts +3 -0
  65. package/dist/lib/models/reflections/type-parameter.js +3 -0
  66. package/dist/lib/models/sources/file.d.ts +2 -0
  67. package/dist/lib/models/sources/file.js +5 -0
  68. package/dist/lib/models/types.d.ts +24 -0
  69. package/dist/lib/models/types.js +21 -0
  70. package/dist/lib/output/components.d.ts +1 -0
  71. package/dist/lib/output/components.js +10 -3
  72. package/dist/lib/output/events.d.ts +2 -2
  73. package/dist/lib/output/index.d.ts +1 -1
  74. package/dist/lib/output/plugins/AssetsPlugin.d.ts +1 -1
  75. package/dist/lib/output/plugins/AssetsPlugin.js +112 -44
  76. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +2 -1
  77. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +174 -99
  78. package/dist/lib/output/plugins/NavigationPlugin.d.ts +6 -0
  79. package/dist/lib/output/plugins/NavigationPlugin.js +109 -0
  80. package/dist/lib/output/plugins/index.d.ts +2 -1
  81. package/dist/lib/output/plugins/index.js +5 -3
  82. package/dist/lib/output/renderer.d.ts +10 -8
  83. package/dist/lib/output/renderer.js +317 -203
  84. package/dist/lib/output/theme.d.ts +1 -1
  85. package/dist/lib/output/theme.js +64 -18
  86. package/dist/lib/output/themes/MarkedPlugin.d.ts +4 -4
  87. package/dist/lib/output/themes/MarkedPlugin.js +224 -145
  88. package/dist/lib/output/themes/default/DefaultTheme.d.ts +14 -1
  89. package/dist/lib/output/themes/default/DefaultTheme.js +68 -0
  90. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +43 -44
  91. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +16 -11
  92. package/dist/lib/output/themes/default/layouts/default.js +2 -0
  93. package/dist/lib/output/themes/default/partials/comment.d.ts +1 -1
  94. package/dist/lib/output/themes/default/partials/comment.js +16 -14
  95. package/dist/lib/output/themes/default/partials/footer.js +1 -1
  96. package/dist/lib/output/themes/default/partials/header.js +2 -2
  97. package/dist/lib/output/themes/default/partials/icon.d.ts +4 -1
  98. package/dist/lib/output/themes/default/partials/icon.js +40 -38
  99. package/dist/lib/output/themes/default/partials/member.js +1 -1
  100. package/dist/lib/output/themes/default/partials/member.signature.body.js +2 -2
  101. package/dist/lib/output/themes/default/partials/navigation.d.ts +1 -1
  102. package/dist/lib/output/themes/default/partials/navigation.js +36 -56
  103. package/dist/lib/output/themes/default/partials/parameter.js +3 -3
  104. package/dist/lib/output/themes/lib.d.ts +1 -2
  105. package/dist/lib/output/themes/lib.js +1 -11
  106. package/dist/lib/serialization/schema.d.ts +37 -1
  107. package/dist/lib/utils/component.d.ts +1 -1
  108. package/dist/lib/utils/component.js +3 -1
  109. package/dist/lib/utils/entry-point.d.ts +0 -6
  110. package/dist/lib/utils/entry-point.js +27 -113
  111. package/dist/lib/utils/events.js +1 -1
  112. package/dist/lib/utils/general.js +1 -1
  113. package/dist/lib/utils/index.d.ts +1 -1
  114. package/dist/lib/utils/index.js +2 -1
  115. package/dist/lib/utils/jsx.d.ts +1 -1
  116. package/dist/lib/utils/jsx.js +24 -15
  117. package/dist/lib/utils/options/declaration.d.ts +5 -1
  118. package/dist/lib/utils/options/declaration.js +1 -1
  119. package/dist/lib/utils/options/index.d.ts +1 -1
  120. package/dist/lib/utils/options/index.js +2 -1
  121. package/dist/lib/utils/options/options.d.ts +22 -9
  122. package/dist/lib/utils/options/options.js +27 -15
  123. package/dist/lib/utils/options/readers/tsconfig.js +2 -7
  124. package/dist/lib/utils/options/readers/typedoc.d.ts +4 -2
  125. package/dist/lib/utils/options/readers/typedoc.js +33 -7
  126. package/dist/lib/utils/options/sources/typedoc.js +25 -4
  127. package/dist/lib/utils/options/tsdoc-defaults.d.ts +1 -1
  128. package/dist/lib/utils/options/tsdoc-defaults.js +4 -0
  129. package/dist/lib/utils/package-manifest.d.ts +0 -25
  130. package/dist/lib/utils/package-manifest.js +7 -148
  131. package/dist/lib/utils/perf.d.ts +1 -1
  132. package/dist/lib/utils/perf.js +36 -31
  133. package/dist/lib/utils/sort.js +0 -1
  134. package/dist/lib/validation/links.js +10 -2
  135. package/package.json +12 -12
  136. package/static/main.js +4 -3
  137. package/static/style.css +26 -10
  138. package/tsdoc.json +16 -0
@@ -15,11 +15,39 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
18
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
19
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
20
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
21
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
22
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
23
+ var _, done = false;
24
+ for (var i = decorators.length - 1; i >= 0; i--) {
25
+ var context = {};
26
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
27
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
28
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
29
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
30
+ if (kind === "accessor") {
31
+ if (result === void 0) continue;
32
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
33
+ if (_ = accept(result.get)) descriptor.get = _;
34
+ if (_ = accept(result.set)) descriptor.set = _;
35
+ if (_ = accept(result.init)) initializers.unshift(_);
36
+ }
37
+ else if (_ = accept(result)) {
38
+ if (kind === "field") initializers.unshift(_);
39
+ else descriptor[key] = _;
40
+ }
41
+ }
42
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
43
+ done = true;
44
+ };
45
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
46
+ var useValue = arguments.length > 2;
47
+ for (var i = 0; i < initializers.length; i++) {
48
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
49
+ }
50
+ return useValue ? value : void 0;
23
51
  };
24
52
  var __importStar = (this && this.__importStar) || function (mod) {
25
53
  if (mod && mod.__esModule) return mod;
@@ -28,6 +56,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
56
  __setModuleDefault(result, mod);
29
57
  return result;
30
58
  };
59
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
60
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
61
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
62
+ };
63
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
64
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
65
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
66
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
67
+ };
68
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
69
+ if (kind === "m") throw new TypeError("Private method is not writable");
70
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
71
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
72
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
73
+ };
31
74
  Object.defineProperty(exports, "__esModule", { value: true });
32
75
  exports.PackagePlugin = void 0;
33
76
  const Path = __importStar(require("path"));
@@ -43,104 +86,157 @@ const path_1 = require("path");
43
86
  * A handler that tries to find the package.json and readme.md files of the
44
87
  * current project.
45
88
  */
46
- let PackagePlugin = exports.PackagePlugin = class PackagePlugin extends components_1.ConverterComponent {
47
- initialize() {
48
- this.listenTo(this.owner, {
49
- [converter_1.Converter.EVENT_BEGIN]: this.onBegin,
50
- [converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
51
- [converter_1.Converter.EVENT_END]: () => {
52
- delete this.readmeFile;
53
- delete this.readmeContents;
54
- delete this.packageJson;
55
- },
56
- });
57
- this.listenTo(this.application, {
58
- [application_events_1.ApplicationEvents.REVIVE]: this.onRevive,
59
- });
60
- }
61
- onRevive(project) {
62
- this.onBegin();
63
- this.addEntries(project);
64
- delete this.readmeFile;
65
- delete this.packageJson;
66
- delete this.readmeContents;
67
- }
68
- onBegin() {
69
- this.readmeFile = undefined;
70
- this.readmeContents = undefined;
71
- this.packageJson = undefined;
72
- const entryFiles = this.entryPointStrategy === utils_1.EntryPointStrategy.Packages
73
- ? this.entryPoints.map((d) => (0, path_1.join)(d, "package.json"))
74
- : this.entryPoints;
75
- const dirName = this.application.options.packageDir ??
76
- Path.resolve((0, fs_1.deriveRootDir)(entryFiles));
77
- this.application.logger.verbose(`Begin readme.md/package.json search at ${(0, paths_1.nicePath)(dirName)}`);
78
- this.packageJson = (0, fs_1.discoverPackageJson)(dirName)?.content;
79
- // Path will be resolved already. This is kind of ugly, but...
80
- if (this.readme.endsWith("none")) {
81
- return; // No readme, we're done
89
+ let PackagePlugin = (() => {
90
+ var _PackagePlugin_readme_accessor_storage, _PackagePlugin_stripYamlFrontmatter_accessor_storage, _PackagePlugin_entryPointStrategy_accessor_storage, _PackagePlugin_entryPoints_accessor_storage, _PackagePlugin_includeVersion_accessor_storage;
91
+ let _classDecorators = [(0, components_1.Component)({ name: "package" })];
92
+ let _classDescriptor;
93
+ let _classExtraInitializers = [];
94
+ let _classThis;
95
+ let _classSuper = components_1.ConverterComponent;
96
+ let _instanceExtraInitializers = [];
97
+ let _readme_decorators;
98
+ let _readme_initializers = [];
99
+ let _stripYamlFrontmatter_decorators;
100
+ let _stripYamlFrontmatter_initializers = [];
101
+ let _entryPointStrategy_decorators;
102
+ let _entryPointStrategy_initializers = [];
103
+ let _entryPoints_decorators;
104
+ let _entryPoints_initializers = [];
105
+ let _includeVersion_decorators;
106
+ let _includeVersion_initializers = [];
107
+ var PackagePlugin = _classThis = class extends _classSuper {
108
+ constructor() {
109
+ super(...arguments);
110
+ _PackagePlugin_readme_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _readme_initializers, void 0)));
111
+ _PackagePlugin_stripYamlFrontmatter_accessor_storage.set(this, __runInitializers(this, _stripYamlFrontmatter_initializers, void 0));
112
+ _PackagePlugin_entryPointStrategy_accessor_storage.set(this, __runInitializers(this, _entryPointStrategy_initializers, void 0));
113
+ _PackagePlugin_entryPoints_accessor_storage.set(this, __runInitializers(this, _entryPoints_initializers, void 0));
114
+ _PackagePlugin_includeVersion_accessor_storage.set(this, __runInitializers(this, _includeVersion_initializers, void 0));
82
115
  }
83
- if (this.readme) {
84
- // Readme path provided, read only that file.
85
- try {
86
- this.readmeContents = (0, utils_1.readFile)(this.readme);
87
- this.readmeFile = this.readme;
116
+ get readme() { return __classPrivateFieldGet(this, _PackagePlugin_readme_accessor_storage, "f"); }
117
+ set readme(value) { __classPrivateFieldSet(this, _PackagePlugin_readme_accessor_storage, value, "f"); }
118
+ get stripYamlFrontmatter() { return __classPrivateFieldGet(this, _PackagePlugin_stripYamlFrontmatter_accessor_storage, "f"); }
119
+ set stripYamlFrontmatter(value) { __classPrivateFieldSet(this, _PackagePlugin_stripYamlFrontmatter_accessor_storage, value, "f"); }
120
+ get entryPointStrategy() { return __classPrivateFieldGet(this, _PackagePlugin_entryPointStrategy_accessor_storage, "f"); }
121
+ set entryPointStrategy(value) { __classPrivateFieldSet(this, _PackagePlugin_entryPointStrategy_accessor_storage, value, "f"); }
122
+ get entryPoints() { return __classPrivateFieldGet(this, _PackagePlugin_entryPoints_accessor_storage, "f"); }
123
+ set entryPoints(value) { __classPrivateFieldSet(this, _PackagePlugin_entryPoints_accessor_storage, value, "f"); }
124
+ get includeVersion() { return __classPrivateFieldGet(this, _PackagePlugin_includeVersion_accessor_storage, "f"); }
125
+ set includeVersion(value) { __classPrivateFieldSet(this, _PackagePlugin_includeVersion_accessor_storage, value, "f"); }
126
+ initialize() {
127
+ this.listenTo(this.owner, {
128
+ [converter_1.Converter.EVENT_BEGIN]: this.onBegin,
129
+ [converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
130
+ [converter_1.Converter.EVENT_END]: () => {
131
+ delete this.readmeFile;
132
+ delete this.readmeContents;
133
+ delete this.packageJson;
134
+ },
135
+ });
136
+ this.listenTo(this.application, {
137
+ [application_events_1.ApplicationEvents.REVIVE]: this.onRevive,
138
+ });
139
+ }
140
+ onRevive(project) {
141
+ this.onBegin();
142
+ this.addEntries(project);
143
+ delete this.readmeFile;
144
+ delete this.packageJson;
145
+ delete this.readmeContents;
146
+ }
147
+ onBegin() {
148
+ this.readmeFile = undefined;
149
+ this.readmeContents = undefined;
150
+ this.packageJson = undefined;
151
+ const entryFiles = this.entryPointStrategy === utils_1.EntryPointStrategy.Packages
152
+ ? this.entryPoints.map((d) => (0, path_1.join)(d, "package.json"))
153
+ : this.entryPoints;
154
+ const dirName = this.application.options.packageDir ??
155
+ Path.resolve((0, fs_1.deriveRootDir)(entryFiles));
156
+ this.application.logger.verbose(`Begin readme.md/package.json search at ${(0, paths_1.nicePath)(dirName)}`);
157
+ this.packageJson = (0, fs_1.discoverPackageJson)(dirName)?.content;
158
+ // Path will be resolved already. This is kind of ugly, but...
159
+ if (this.readme.endsWith("none")) {
160
+ return; // No readme, we're done
88
161
  }
89
- catch {
90
- this.application.logger.error(`Provided README path, ${(0, paths_1.nicePath)(this.readme)} could not be read.`);
162
+ if (this.readme) {
163
+ // Readme path provided, read only that file.
164
+ try {
165
+ this.readmeContents = this.processReadmeContents((0, utils_1.readFile)(this.readme));
166
+ this.readmeFile = this.readme;
167
+ }
168
+ catch {
169
+ this.application.logger.error(`Provided README path, ${(0, paths_1.nicePath)(this.readme)} could not be read.`);
170
+ }
91
171
  }
92
- }
93
- else {
94
- // No readme provided, automatically find the readme
95
- const result = (0, fs_1.discoverInParentDir)("readme.md", dirName, (content) => content);
96
- if (result) {
97
- this.readmeFile = result.file;
98
- this.readmeContents = result.content;
172
+ else {
173
+ // No readme provided, automatically find the readme
174
+ const result = (0, fs_1.discoverInParentDir)("readme.md", dirName, (content) => content);
175
+ if (result) {
176
+ this.readmeFile = result.file;
177
+ this.readmeContents = this.processReadmeContents(result.content);
178
+ }
99
179
  }
100
180
  }
101
- }
102
- onBeginResolve(context) {
103
- this.addEntries(context.project);
104
- }
105
- addEntries(project) {
106
- if (this.readmeFile && this.readmeContents) {
107
- const comment = this.application.converter.parseRawComment(new minimalSourceFile_1.MinimalSourceFile(this.readmeContents, this.readmeFile));
108
- if (comment.blockTags.length || comment.modifierTags.size) {
109
- const ignored = [
110
- ...comment.blockTags.map((tag) => tag.tag),
111
- ...comment.modifierTags,
112
- ];
113
- this.application.logger.warn(`Block and modifier tags will be ignored within the readme:\n\t${ignored.join("\n\t")}`);
181
+ processReadmeContents(contents) {
182
+ if (this.stripYamlFrontmatter) {
183
+ return contents.replace(/^\s*---\r?\n[\s\S]*?\r?\n---\s*?\r?\n\s*/, "");
114
184
  }
115
- project.readme = comment.summary;
185
+ return contents;
116
186
  }
117
- if (this.packageJson) {
118
- project.packageName = this.packageJson.name;
119
- if (!project.name) {
120
- project.name = project.packageName || "Documentation";
187
+ onBeginResolve(context) {
188
+ this.addEntries(context.project);
189
+ }
190
+ addEntries(project) {
191
+ if (this.readmeFile && this.readmeContents) {
192
+ const comment = this.application.converter.parseRawComment(new minimalSourceFile_1.MinimalSourceFile(this.readmeContents, this.readmeFile));
193
+ if (comment.blockTags.length || comment.modifierTags.size) {
194
+ const ignored = [
195
+ ...comment.blockTags.map((tag) => tag.tag),
196
+ ...comment.modifierTags,
197
+ ];
198
+ this.application.logger.warn(`Block and modifier tags will be ignored within the readme:\n\t${ignored.join("\n\t")}`);
199
+ }
200
+ project.readme = comment.summary;
121
201
  }
122
- if (this.includeVersion) {
123
- project.packageVersion = this.packageJson.version?.replace(/^v/, "");
202
+ if (this.packageJson) {
203
+ project.packageName = this.packageJson.name;
204
+ if (!project.name) {
205
+ project.name = project.packageName || "Documentation";
206
+ }
207
+ if (this.includeVersion) {
208
+ project.packageVersion = this.packageJson.version?.replace(/^v/, "");
209
+ }
210
+ }
211
+ else if (!project.name) {
212
+ this.application.logger.warn('The --name option was not specified, and no package.json was found. Defaulting project name to "Documentation".');
213
+ project.name = "Documentation";
124
214
  }
125
215
  }
126
- else if (!project.name) {
127
- this.application.logger.warn('The --name option was not specified, and no package.json was found. Defaulting project name to "Documentation".');
128
- project.name = "Documentation";
129
- }
130
- }
131
- };
132
- __decorate([
133
- (0, utils_1.BindOption)("readme")
134
- ], PackagePlugin.prototype, "readme", void 0);
135
- __decorate([
136
- (0, utils_1.BindOption)("entryPointStrategy")
137
- ], PackagePlugin.prototype, "entryPointStrategy", void 0);
138
- __decorate([
139
- (0, utils_1.BindOption)("entryPoints")
140
- ], PackagePlugin.prototype, "entryPoints", void 0);
141
- __decorate([
142
- (0, utils_1.BindOption)("includeVersion")
143
- ], PackagePlugin.prototype, "includeVersion", void 0);
144
- exports.PackagePlugin = PackagePlugin = __decorate([
145
- (0, components_1.Component)({ name: "package" })
146
- ], PackagePlugin);
216
+ };
217
+ _PackagePlugin_readme_accessor_storage = new WeakMap();
218
+ _PackagePlugin_stripYamlFrontmatter_accessor_storage = new WeakMap();
219
+ _PackagePlugin_entryPointStrategy_accessor_storage = new WeakMap();
220
+ _PackagePlugin_entryPoints_accessor_storage = new WeakMap();
221
+ _PackagePlugin_includeVersion_accessor_storage = new WeakMap();
222
+ __setFunctionName(_classThis, "PackagePlugin");
223
+ (() => {
224
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
225
+ _readme_decorators = [(0, utils_1.Option)("readme")];
226
+ _stripYamlFrontmatter_decorators = [(0, utils_1.Option)("stripYamlFrontmatter")];
227
+ _entryPointStrategy_decorators = [(0, utils_1.Option)("entryPointStrategy")];
228
+ _entryPoints_decorators = [(0, utils_1.Option)("entryPoints")];
229
+ _includeVersion_decorators = [(0, utils_1.Option)("includeVersion")];
230
+ __esDecorate(_classThis, null, _readme_decorators, { kind: "accessor", name: "readme", static: false, private: false, access: { has: obj => "readme" in obj, get: obj => obj.readme, set: (obj, value) => { obj.readme = value; } }, metadata: _metadata }, _readme_initializers, _instanceExtraInitializers);
231
+ __esDecorate(_classThis, null, _stripYamlFrontmatter_decorators, { kind: "accessor", name: "stripYamlFrontmatter", static: false, private: false, access: { has: obj => "stripYamlFrontmatter" in obj, get: obj => obj.stripYamlFrontmatter, set: (obj, value) => { obj.stripYamlFrontmatter = value; } }, metadata: _metadata }, _stripYamlFrontmatter_initializers, _instanceExtraInitializers);
232
+ __esDecorate(_classThis, null, _entryPointStrategy_decorators, { kind: "accessor", name: "entryPointStrategy", static: false, private: false, access: { has: obj => "entryPointStrategy" in obj, get: obj => obj.entryPointStrategy, set: (obj, value) => { obj.entryPointStrategy = value; } }, metadata: _metadata }, _entryPointStrategy_initializers, _instanceExtraInitializers);
233
+ __esDecorate(_classThis, null, _entryPoints_decorators, { kind: "accessor", name: "entryPoints", static: false, private: false, access: { has: obj => "entryPoints" in obj, get: obj => obj.entryPoints, set: (obj, value) => { obj.entryPoints = value; } }, metadata: _metadata }, _entryPoints_initializers, _instanceExtraInitializers);
234
+ __esDecorate(_classThis, null, _includeVersion_decorators, { kind: "accessor", name: "includeVersion", static: false, private: false, access: { has: obj => "includeVersion" in obj, get: obj => obj.includeVersion, set: (obj, value) => { obj.includeVersion = value; } }, metadata: _metadata }, _includeVersion_initializers, _instanceExtraInitializers);
235
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
236
+ PackagePlugin = _classThis = _classDescriptor.value;
237
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
238
+ __runInitializers(_classThis, _classExtraInitializers);
239
+ })();
240
+ return PackagePlugin = _classThis;
241
+ })();
242
+ exports.PackagePlugin = PackagePlugin;
@@ -3,11 +3,12 @@ import { ConverterComponent } from "../components";
3
3
  * A handler that attaches source file information to reflections.
4
4
  */
5
5
  export declare class SourcePlugin extends ConverterComponent {
6
- readonly disableSources: boolean;
7
- readonly gitRevision: string;
8
- readonly gitRemote: string;
9
- readonly sourceLinkTemplate: string;
10
- readonly basePath: string;
6
+ accessor disableSources: boolean;
7
+ accessor gitRevision: string;
8
+ accessor gitRemote: string;
9
+ accessor disableGit: boolean;
10
+ accessor sourceLinkTemplate: string;
11
+ accessor basePath: string;
11
12
  /**
12
13
  * All file names to find the base path from.
13
14
  */