@forsakringskassan/docs-generator 2.38.5 → 2.38.6

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.
@@ -2,7 +2,7 @@ import { createRequire as $createRequire } from "node:module";
2
2
 
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
- import { r as runAsWorker, f as format2, a as resolveConfig } from './vendor-BnFYrp5U.mjs';
5
+ import { r as runAsWorker, f as format2, a as resolveConfig } from './vendor-DgbU8VP_.mjs';
6
6
  import 'node:url';
7
7
  import 'node:path';
8
8
  import 'fs';
@@ -54,4 +54,4 @@ async function formatCode(source, filepath) {
54
54
  runAsWorker(formatCode);
55
55
 
56
56
  export { formatCode };
57
- //# sourceMappingURL=format-code.worker-i_fzVsDn.mjs.map
57
+ //# sourceMappingURL=format-code.worker-346miAdg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-code.worker-i_fzVsDn.mjs","sources":["../src/utils/format-code.worker.ts"],"sourcesContent":["import { type Options, format as prettier, resolveConfig } from \"prettier\";\nimport { runAsWorker } from \"synckit\";\n\nconst configCache = new Map<string, Options | null>();\n\nasync function getConfig(filepath: string): Promise<Options | null> {\n const cached = configCache.get(filepath);\n if (cached !== undefined) {\n return cached;\n }\n const options = await resolveConfig(filepath);\n configCache.set(filepath, options);\n return options;\n}\n\n/**\n * @internal\n */\nexport async function formatCode(\n source: string,\n filepath: string,\n): Promise<string> {\n const options = await getConfig(filepath);\n const formatted = await prettier(source, { ...options, filepath });\n return formatted.trim();\n}\n\nrunAsWorker(formatCode);\n"],"names":["prettier"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,WAAA,uBAAkB,GAAA,EAA4B;AAEpD,eAAe,UAAU,QAAA,EAA2C;AAChE,EAAA,MAAM,MAAA,GAAS,WAAA,CAAY,GAAA,CAAI,QAAQ,CAAA;AACvC,EAAA,IAAI,WAAW,MAAA,EAAW;AACtB,IAAA,OAAO,MAAA;AAAA,EACX;AACA,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,CAAc,QAAQ,CAAA;AAC5C,EAAA,WAAA,CAAY,GAAA,CAAI,UAAU,OAAO,CAAA;AACjC,EAAA,OAAO,OAAA;AACX;AAKA,eAAsB,UAAA,CAClB,QACA,QAAA,EACe;AACf,EAAA,MAAM,OAAA,GAAU,MAAM,SAAA,CAAU,QAAQ,CAAA;AACxC,EAAA,MAAM,SAAA,GAAY,MAAMA,OAAA,CAAS,MAAA,EAAQ,EAAE,GAAG,OAAA,EAAS,UAAU,CAAA;AACjE,EAAA,OAAO,UAAU,IAAA,EAAK;AAC1B;AAEA,WAAA,CAAY,UAAU,CAAA;;;;"}
1
+ {"version":3,"file":"format-code.worker-346miAdg.mjs","sources":["../src/utils/format-code.worker.ts"],"sourcesContent":["import { type Options, format as prettier, resolveConfig } from \"prettier\";\nimport { runAsWorker } from \"synckit\";\n\nconst configCache = new Map<string, Options | null>();\n\nasync function getConfig(filepath: string): Promise<Options | null> {\n const cached = configCache.get(filepath);\n if (cached !== undefined) {\n return cached;\n }\n const options = await resolveConfig(filepath);\n configCache.set(filepath, options);\n return options;\n}\n\n/**\n * @internal\n */\nexport async function formatCode(\n source: string,\n filepath: string,\n): Promise<string> {\n const options = await getConfig(filepath);\n const formatted = await prettier(source, { ...options, filepath });\n return formatted.trim();\n}\n\nrunAsWorker(formatCode);\n"],"names":["prettier"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,WAAA,uBAAkB,GAAA,EAA4B;AAEpD,eAAe,UAAU,QAAA,EAA2C;AAChE,EAAA,MAAM,MAAA,GAAS,WAAA,CAAY,GAAA,CAAI,QAAQ,CAAA;AACvC,EAAA,IAAI,WAAW,MAAA,EAAW;AACtB,IAAA,OAAO,MAAA;AAAA,EACX;AACA,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,CAAc,QAAQ,CAAA;AAC5C,EAAA,WAAA,CAAY,GAAA,CAAI,UAAU,OAAO,CAAA;AACjC,EAAA,OAAO,OAAA;AACX;AAKA,eAAsB,UAAA,CAClB,QACA,QAAA,EACe;AACf,EAAA,MAAM,OAAA,GAAU,MAAM,SAAA,CAAU,QAAQ,CAAA;AACxC,EAAA,MAAM,SAAA,GAAY,MAAMA,OAAA,CAAS,MAAA,EAAQ,EAAE,GAAG,OAAA,EAAS,UAAU,CAAA;AACjE,EAAA,OAAO,UAAU,IAAA,EAAK;AAC1B;AAEA,WAAA,CAAY,UAAU,CAAA;;;;"}
package/dist/index.d.mts CHANGED
@@ -739,13 +739,6 @@ export declare type TemplateBlockRenderer<T> = {
739
739
  export declare interface TemplateData {
740
740
  }
741
741
 
742
- /**
743
- * Injects a theme selector into the toolbar.
744
- *
745
- * @public
746
- */
747
- export declare function themeSelectProcessor(): Processor;
748
-
749
742
  /**
750
743
  * Single entry for a topnav item.
751
744
  *
package/dist/index.mjs CHANGED
@@ -4,8 +4,8 @@ const require = $createRequire(import.meta.url);
4
4
 
5
5
  import fs from 'node:fs/promises';
6
6
  import path from 'node:path/posix';
7
- import { t as ts, m as minimatch, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, Z as Ze, k as moduleImporter, l as cliProgress, n as tinylr, w as watch, o as createInstance, p as fse, q as inter } from './vendor-BnFYrp5U.mjs';
8
- import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as filePath, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-3vzQq-PG.mjs';
7
+ import { t as ts, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, Z as Ze, m as moduleImporter, k as cliProgress, l as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-DgbU8VP_.mjs';
8
+ import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as filePath, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-B7yrXROV.mjs';
9
9
  import path__default from 'node:path';
10
10
  import crypto from 'node:crypto';
11
11
  import { exec, execSync } from 'node:child_process';
@@ -110,7 +110,9 @@ function fileMatcher(patterns) {
110
110
  ignore: "**/node_modules/**"
111
111
  });
112
112
  return memoize((filename, context) => {
113
- const matches = minimatch.match(fileList, `**/${filename}`);
113
+ const matches = fileList.filter((file) => {
114
+ return path__default.matchesGlob(file, `**/${filename}`);
115
+ });
114
116
  if (matches.length === 0) {
115
117
  const additionalInfo = context ? ` (${context})` : "";
116
118
  const message = `No files matched pattern "${filename}"${additionalInfo}`;
@@ -565,28 +567,6 @@ const versionBannerProcessor = util.deprecate(
565
567
  "versionBannerProcessor() is deprecated, use motdProcessor() instead"
566
568
  );
567
569
 
568
- function themeSelectProcessor() {
569
- return {
570
- name: "theme-select-processor",
571
- after: "generate-docs",
572
- handler(context) {
573
- const sessionKey = "fkds-theme";
574
- const data = {
575
- defaultTheme: "exp",
576
- sessionKey
577
- };
578
- context.addTemplateBlock("head", "theme-render-blocker", {
579
- filename: "partials/theme-render-blocker.html",
580
- data
581
- });
582
- context.addTemplateBlock("toolbar", "theme-select", {
583
- filename: "partials/theme-select.html",
584
- data
585
- });
586
- }
587
- };
588
- }
589
-
590
570
  function dump(value) {
591
571
  return `<pre>${JSON.stringify(value, null, 2)}</pre>`;
592
572
  }
@@ -946,7 +926,6 @@ const availableProcessors = [
946
926
  motdProcessor({ message: "" }),
947
927
  selectableVersionProcessor({ name: "", version: "" }, ""),
948
928
  sourceUrlProcessor({ urlFormat: "" }),
949
- themeSelectProcessor(),
950
929
  topnavProcessor("", ""),
951
930
  versionProcessor({ name: "", version: "", homepage: "" }, "")
952
931
  ];
@@ -3615,5 +3594,5 @@ function searchProcessor() {
3615
3594
  };
3616
3595
  }
3617
3596
 
3618
- export { Generator, availableProcessors, cookieProcessor, defineSources, extractExamplesProcessor, frontMatterFileReader, htmlRedirectProcessor, isRelease, livereloadProcessor, manifestProcessor, matomoProcessor, motdProcessor, navigationFileReader, processorRuntimeName, redirectFileProcessor, searchProcessor, selectableVersionProcessor, sourceUrlProcessor, themeSelectProcessor, topnavProcessor, versionBannerProcessor, versionProcessor, vueFileReader };
3597
+ export { Generator, availableProcessors, cookieProcessor, defineSources, extractExamplesProcessor, frontMatterFileReader, htmlRedirectProcessor, isRelease, livereloadProcessor, manifestProcessor, matomoProcessor, motdProcessor, navigationFileReader, processorRuntimeName, redirectFileProcessor, searchProcessor, selectableVersionProcessor, sourceUrlProcessor, topnavProcessor, versionBannerProcessor, versionProcessor, vueFileReader };
3619
3598
  //# sourceMappingURL=index.mjs.map