@forsakringskassan/docs-generator 3.16.0 → 3.17.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-BlUpDhJP.mjs → create-markdown-renderer-DrDHT9bZ.mjs} +4 -3
- package/dist/create-markdown-renderer-DrDHT9bZ.mjs.map +1 -0
- package/dist/{format-code.worker-C_xPgPcX.mjs → format-code.worker-CFQ372Nb.mjs} +2 -2
- package/dist/{format-code.worker-C_xPgPcX.mjs.map → format-code.worker-CFQ372Nb.mjs.map} +1 -1
- package/dist/index.mjs +18 -15
- package/dist/index.mjs.map +1 -1
- package/dist/markdown.mjs +2 -2
- package/dist/runtime-internal.mjs +12596 -15258
- package/dist/{vendor-BLfCdre8.mjs → vendor-i-8GIz5x.mjs} +7 -52
- package/dist/{vendor-BLfCdre8.mjs.map → vendor-i-8GIz5x.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/create-markdown-renderer-BlUpDhJP.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ 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 {
|
|
6
|
+
import { Z as Ze, M as MarkdownItCallable, g as fm, s as strToU8, z as zlibSync, h as strFromU8, d as dedent, i as closest, j as distance, k as isCI, m as moduleImporter, l as cliProgress, t as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-i-8GIz5x.mjs';
|
|
7
7
|
import path__default from 'node:path';
|
|
8
|
+
import fs from 'node:fs/promises';
|
|
8
9
|
import crypto from 'node:crypto';
|
|
9
10
|
import path from 'node:path/posix';
|
|
10
11
|
import { exec, execSync } from 'node:child_process';
|
|
11
|
-
import { g as generateId, f as formatCode, p as parseImport, a as getFingerprint, b as parseInfostring, h as hasTag, d as findTag, e as getOutputFilePath, i as isDocumentPage, j as findDocument, k as getDocumentBody, n as normalizePath, l as htmlencode, c as createMarkdownRenderer } from './create-markdown-renderer-
|
|
12
|
+
import { g as generateId, f as formatCode, p as parseImport, a as getFingerprint, b as parseInfostring, h as hasTag, d as findTag, e as getOutputFilePath, i as isDocumentPage, j as findDocument, k as getDocumentBody, n as normalizePath, l as htmlencode, c as createMarkdownRenderer } from './create-markdown-renderer-DrDHT9bZ.mjs';
|
|
12
13
|
import { DocExcerpt } from '@microsoft/tsdoc';
|
|
13
|
-
import fs from 'node:fs/promises';
|
|
14
14
|
import pkg from '../package.json' with { type: "json" };
|
|
15
15
|
import fs__default, { existsSync, readFileSync, copyFileSync } from 'node:fs';
|
|
16
16
|
import { version } from 'vue';
|
|
@@ -91,15 +91,13 @@ function memoize(callback) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function fileMatcher(patterns, options) {
|
|
95
|
-
const { ignore } = options;
|
|
96
|
-
const fileList =
|
|
97
|
-
posix: true,
|
|
98
|
-
ignore
|
|
99
|
-
});
|
|
94
|
+
async function fileMatcher(patterns, options) {
|
|
95
|
+
const { ignore: exclude } = options;
|
|
96
|
+
const fileList = await Array.fromAsync(fs.glob(patterns, { exclude }));
|
|
100
97
|
return memoize((filename, context) => {
|
|
101
98
|
const matches = fileList.filter((file) => {
|
|
102
|
-
const
|
|
99
|
+
const regex = path__default.sep === "/" ? /^(?:\.\.\/)+/ : /^(?:\.\.\\)+/;
|
|
100
|
+
const stem = file.replace(regex, "");
|
|
103
101
|
return path__default.matchesGlob(stem, `**/${filename}`);
|
|
104
102
|
});
|
|
105
103
|
if (matches.length === 0) {
|
|
@@ -1517,9 +1515,6 @@ function sourceUrlProcessor(...args) {
|
|
|
1517
1515
|
componentFileExtension = "vue"
|
|
1518
1516
|
} = options;
|
|
1519
1517
|
const repository = getRepositoryUrl(pkg) ?? "";
|
|
1520
|
-
const matcher = fileMatcher(sourceFiles, {
|
|
1521
|
-
ignore: ["**/node_modules/**"]
|
|
1522
|
-
});
|
|
1523
1518
|
return {
|
|
1524
1519
|
after: "generate-docs",
|
|
1525
1520
|
name: "source-url-processor",
|
|
@@ -1527,6 +1522,9 @@ function sourceUrlProcessor(...args) {
|
|
|
1527
1522
|
if (!enabled) {
|
|
1528
1523
|
return;
|
|
1529
1524
|
}
|
|
1525
|
+
const matcher = await fileMatcher(sourceFiles, {
|
|
1526
|
+
ignore: ["**/node_modules/**"]
|
|
1527
|
+
});
|
|
1530
1528
|
const hash = await gitCommitHash("full") ?? "";
|
|
1531
1529
|
const short = await gitCommitHash("short") ?? "";
|
|
1532
1530
|
function componentSourceUrl(component) {
|
|
@@ -4382,7 +4380,9 @@ class Generator {
|
|
|
4382
4380
|
...this.processors
|
|
4383
4381
|
];
|
|
4384
4382
|
const examplePatterns = this.exampleFolders.map((it) => `${it}/**/*`);
|
|
4385
|
-
const exampleFileMatcher = fileMatcher(examplePatterns, {
|
|
4383
|
+
const exampleFileMatcher = await fileMatcher(examplePatterns, {
|
|
4384
|
+
ignore: []
|
|
4385
|
+
});
|
|
4386
4386
|
const templateLoader = createTemplateLoader([]);
|
|
4387
4387
|
const context = createContext({
|
|
4388
4388
|
outputFolder: "",
|
|
@@ -4452,10 +4452,13 @@ class Generator {
|
|
|
4452
4452
|
...this.processors
|
|
4453
4453
|
];
|
|
4454
4454
|
compileProcessorRuntime(this, import.meta.url, processors);
|
|
4455
|
+
const exampleFileMatcher = await fileMatcher(examplePatterns, {
|
|
4456
|
+
ignore: []
|
|
4457
|
+
});
|
|
4455
4458
|
const templateLoader = createTemplateLoader(templateFolders);
|
|
4456
4459
|
const context = createContext({
|
|
4457
4460
|
outputFolder,
|
|
4458
|
-
exampleFileMatcher
|
|
4461
|
+
exampleFileMatcher,
|
|
4459
4462
|
templateLoader
|
|
4460
4463
|
});
|
|
4461
4464
|
context.addTemplateBlock("footer:left", "footer:left", {
|