@forsakringskassan/docs-generator 3.1.1 → 3.2.0
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/{create-markdown-renderer-castrIfY.mjs → create-markdown-renderer-p3FAbLe1.mjs} +83 -53
- package/dist/create-markdown-renderer-p3FAbLe1.mjs.map +1 -0
- package/dist/{format-code.worker-Cs0VeEOX.mjs → format-code.worker-BRTVVuKa.mjs} +2 -2
- package/dist/{format-code.worker-Cs0VeEOX.mjs.map → format-code.worker-BRTVVuKa.mjs.map} +1 -1
- package/dist/index.d.mts +58 -0
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/dist/markdown.d.mts +50 -0
- package/dist/markdown.mjs +3 -3
- package/dist/processors/selectable-version.mjs +11 -3
- package/dist/runtime.mjs +4619 -4388
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/{vendor-DO1GigtJ.mjs → vendor-DR1Vkbzf.mjs} +8 -5
- package/dist/{vendor-DO1GigtJ.mjs.map → vendor-DR1Vkbzf.mjs.map} +1 -1
- package/dist/{vue3-CnvFixWY.mjs → vue3-B3-18vX3.mjs} +6 -2
- package/dist/vue3-B3-18vX3.mjs.map +1 -0
- package/dist/{worker-DO8E5WXF.mjs → worker-DX8mHsqQ.mjs} +2 -2
- package/dist/{worker-DO8E5WXF.mjs.map → worker-DX8mHsqQ.mjs.map} +1 -1
- package/package.json +9 -1
- package/dist/create-markdown-renderer-castrIfY.mjs.map +0 -1
- package/dist/vue3-CnvFixWY.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import { createRequire as $createRequire } from "node:module";
|
|
|
3
3
|
const require = $createRequire(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import { ApiItemKind, ApiModel } from '@microsoft/api-extractor-model';
|
|
6
|
-
import { t as ts, Z as Ze, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, m as moduleImporter, k as cliProgress, l as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-
|
|
6
|
+
import { t as ts, Z as Ze, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, m as moduleImporter, k as cliProgress, l as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-DR1Vkbzf.mjs';
|
|
7
7
|
import path__default from 'node:path';
|
|
8
8
|
import crypto from 'node:crypto';
|
|
9
9
|
import path from 'node:path/posix';
|
|
10
10
|
import { exec, execSync } from 'node:child_process';
|
|
11
|
-
import { g as generateId, f as formatCode, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, b as parseImport, d as findTag, e as getOutputFilePath, j as htmlencode, k as filePath, c as createMarkdownRenderer, l as generateExample } from './create-markdown-renderer-
|
|
11
|
+
import { g as generateId, f as formatCode, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, b as parseImport, d as findTag, e as getOutputFilePath, j as htmlencode, k as filePath, c as createMarkdownRenderer, l as generateExample } from './create-markdown-renderer-p3FAbLe1.mjs';
|
|
12
12
|
import { DocExcerpt } from '@microsoft/tsdoc';
|
|
13
13
|
import fs from 'node:fs/promises';
|
|
14
14
|
import util, { promisify, styleText } from 'node:util';
|
|
@@ -51,7 +51,7 @@ import 'fs/promises';
|
|
|
51
51
|
import 'process';
|
|
52
52
|
import 'v8';
|
|
53
53
|
import 'vue';
|
|
54
|
-
import './vue3-
|
|
54
|
+
import './vue3-B3-18vX3.mjs';
|
|
55
55
|
|
|
56
56
|
function toArray$2(value) {
|
|
57
57
|
return Array.isArray(value) ? value : [value];
|
|
@@ -97,7 +97,8 @@ function fileMatcher(patterns) {
|
|
|
97
97
|
});
|
|
98
98
|
return memoize((filename, context) => {
|
|
99
99
|
const matches = fileList.filter((file) => {
|
|
100
|
-
|
|
100
|
+
const stem = file.replace(/^(\.\.\/)+/, "");
|
|
101
|
+
return path__default.matchesGlob(stem, `**/${filename}`);
|
|
101
102
|
});
|
|
102
103
|
if (matches.length === 0) {
|
|
103
104
|
const additionalInfo = context ? ` (${context})` : "";
|
|
@@ -3012,7 +3013,8 @@ async function render(doc, docs, options) {
|
|
|
3012
3013
|
exampleFileMatcher,
|
|
3013
3014
|
nav,
|
|
3014
3015
|
templateFolders,
|
|
3015
|
-
vendors
|
|
3016
|
+
vendors,
|
|
3017
|
+
linkResolvers
|
|
3016
3018
|
} = options;
|
|
3017
3019
|
if (!haveOutputFile(fileInfo)) {
|
|
3018
3020
|
return null;
|
|
@@ -3109,7 +3111,8 @@ async function render(doc, docs, options) {
|
|
|
3109
3111
|
handleSoftError(error) {
|
|
3110
3112
|
throw error;
|
|
3111
3113
|
},
|
|
3112
|
-
messagebox: options.markdown.messagebox
|
|
3114
|
+
messagebox: options.markdown.messagebox,
|
|
3115
|
+
linkResolvers
|
|
3113
3116
|
});
|
|
3114
3117
|
njk.addFilter("marked", (content2) => {
|
|
3115
3118
|
return markdownRenderer.render(doc, content2);
|
|
@@ -3228,6 +3231,7 @@ function nunjucksProcessor(options) {
|
|
|
3228
3231
|
templateBlocks: context.getAllTemplateBlocks(),
|
|
3229
3232
|
templateData: context.getAllTemplateData(),
|
|
3230
3233
|
vendors: context.vendors,
|
|
3234
|
+
linkResolvers: options.linkResolvers,
|
|
3231
3235
|
addResource(dst, src) {
|
|
3232
3236
|
context.addResource(dst, src);
|
|
3233
3237
|
}
|
|
@@ -3786,6 +3790,7 @@ class Generator {
|
|
|
3786
3790
|
await i18n.init();
|
|
3787
3791
|
await this._prepareFolders();
|
|
3788
3792
|
await this._copyFonts();
|
|
3793
|
+
const linkResolvers = this.processors.map((it) => it.enabled !== false ? it.resolveLink : void 0).filter((it) => Boolean(it));
|
|
3789
3794
|
const processors = [
|
|
3790
3795
|
fileReaderProcessor(sourceFiles),
|
|
3791
3796
|
redirectProcessor(),
|
|
@@ -3805,6 +3810,7 @@ class Generator {
|
|
|
3805
3810
|
exampleFolders,
|
|
3806
3811
|
templateFolders,
|
|
3807
3812
|
setupPath,
|
|
3813
|
+
linkResolvers,
|
|
3808
3814
|
markdown: markdownOptions ?? {}
|
|
3809
3815
|
}),
|
|
3810
3816
|
...this.processors
|