@forsakringskassan/docs-generator 1.33.1 → 2.1.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/README.md CHANGED
@@ -187,23 +187,6 @@ MyAwesomeLiveExampleFile.vue
187
187
  ```
188
188
  ````
189
189
 
190
- #### Diagrams and flowcharts
191
-
192
- You can generate diagrams from text by using [Mermaid](https://mermaidjs.github.io/).
193
- The results are rendered as SVG in the browser.
194
-
195
- ````md
196
- ```mermaid
197
- graph TD;
198
- A-->B;
199
- A-->C;
200
- B-->D;
201
- C-->D;
202
- ```
203
- ````
204
-
205
- You can use the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) to help write your diagrams.
206
-
207
190
  ### Frontmatter
208
191
 
209
192
  #### `status`
@@ -3,11 +3,11 @@
3
3
  var path$1 = require('node:path');
4
4
  var esbuild = require('esbuild');
5
5
  var vue = require('vue');
6
- var vue2 = require('./vue2-BJo6OAwR.js');
7
- var vue3 = require('./vue3-C37GopjU.js');
6
+ var vue3 = require('./vue3-0ybYLno6.js');
8
7
  var path = require('node:path/posix');
9
8
  require('@vue/compiler-sfc');
10
- require('./vendor-DD1glhBC.js');
9
+ require('./vendor-D59s3fBh.js');
10
+ require('typescript');
11
11
  require('node:url');
12
12
  require('fs');
13
13
  require('node:fs');
@@ -23,13 +23,15 @@ require('path');
23
23
  require('readline');
24
24
  require('events');
25
25
  require('child_process');
26
- require('node:buffer');
26
+ require('node:stream/promises');
27
27
  require('node:child_process');
28
+ require('node:util');
28
29
  require('node:process');
29
- require('node:os');
30
+ require('node:tty');
30
31
  require('node:timers/promises');
31
- require('node:util');
32
- require('typescript');
32
+ require('node:os');
33
+ require('node:v8');
34
+ require('node:buffer');
33
35
  require('os');
34
36
  require('http');
35
37
  require('https');
@@ -82,7 +84,9 @@ function stripExtension(filename) {
82
84
  function VuePlugin() {
83
85
  switch (vueMajor) {
84
86
  case 2:
85
- return vue2.export_vuePlugin({ workers: false });
87
+ throw new Error(
88
+ "Vue 2 is no longer supported, upgrade to Vue 3 or downgrade docs-generator"
89
+ );
86
90
  case 3:
87
91
  return vue3.export_vuePlugin();
88
92
  }
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var vendor = require('./vendor-DD1glhBC.js');
3
+ var vendor = require('./vendor-D59s3fBh.js');
4
4
  var path = require('node:path/posix');
5
5
  var path$1 = require('node:path');
6
6
  require('crypto');
7
7
  var crypto = require('node:crypto');
8
+ require('node:child_process');
8
9
 
9
10
  function findDocument(haystack, needle) {
10
11
  const match = haystack.find((it) => {
@@ -170,7 +171,7 @@ function findTestId(tags) {
170
171
  const tag = tags.find((it) => {
171
172
  return it.startsWith(prefix);
172
173
  });
173
- const match = tag == null ? void 0 : tag.match(/^test-id=(?:"([^"]+)"|'([^']+)'|([^'"]+))$/);
174
+ const match = tag?.match(/^test-id=(?:"([^"]+)"|'([^']+)'|([^'"]+))$/);
174
175
  if (!match) {
175
176
  return null;
176
177
  }
@@ -274,7 +275,7 @@ function codePreview(options) {
274
275
  tags: rawTags
275
276
  });
276
277
  const { tags } = example;
277
- const hashContent = `${map == null ? void 0 : map[0]}:${map == null ? void 0 : map[1]}:${info}:${source}`;
278
+ const hashContent = `${map?.[0]}:${map?.[1]}:${info}:${source}`;
278
279
  const fingerprint = getFingerprint(hashContent);
279
280
  const highlightedCode = replaceAtLink(highlight(example));
280
281
  const testId = findTestId(tags);
@@ -401,10 +402,9 @@ function headingLevel(options) {
401
402
  let counter = 1;
402
403
  return function(md) {
403
404
  md.renderer.rules.heading_open = function(tokens, idx, _options, env) {
404
- var _a;
405
405
  const { ids } = env;
406
406
  const { tag } = tokens[idx];
407
- const title = getTokensText(((_a = tokens[idx + 1]) == null ? void 0 : _a.children) ?? []);
407
+ const title = getTokensText(tokens[idx + 1]?.children ?? []);
408
408
  let id = generateId(title);
409
409
  if (ids.has(id)) {
410
410
  id += `--${counter++}`;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export declare type AttributeValue = string | number | boolean | null | {
8
8
  [key: string]: AttributeValue;
9
9
  };
10
10
 
11
+ /* Excluded from this release type: availableProcessors */
12
+
11
13
  /**
12
14
  * @public
13
15
  */
@@ -152,8 +154,8 @@ declare class Generator_2 {
152
154
  private resources;
153
155
  private sourceFiles;
154
156
  constructor(options: GeneratorOptions);
155
- compileScript(name: string, src: string | string[], options?: Partial<CompileOptions>): void;
156
- compileStyle(name: string, src: string, options?: Partial<CompileOptions>): void;
157
+ compileScript(name: string, src: string | URL, options?: Partial<CompileOptions>): void;
158
+ compileStyle(name: string, src: string | URL, options?: Partial<CompileOptions>): void;
157
159
  /**
158
160
  * @param dst - Destination directory relative to asset folder.
159
161
  * @param src - File or directory to copy.
@@ -240,7 +242,7 @@ export declare interface Manifest {
240
242
  *
241
243
  * @public
242
244
  */
243
- export declare function manifestProcessor(options: ManifestProcessorOptions): Processor;
245
+ export declare function manifestProcessor(options?: ManifestProcessorOptions): Processor;
244
246
 
245
247
  /**
246
248
  * Options for {@link manifestProcessor}.
@@ -400,6 +402,8 @@ export declare interface ProcessorHandler {
400
402
  after?: ProcessorStage;
401
403
  name: string;
402
404
  enabled?: boolean;
405
+ /** List of runtime client scripts required by this processor */
406
+ runtime?: ProcessorRuntime[];
403
407
  handler(context: ProcessorContext): void | string[] | Promise<void> | Promise<string[]>;
404
408
  }
405
409
 
@@ -418,6 +422,20 @@ export declare interface ProcessorOptions {
418
422
  enabled?: boolean;
419
423
  }
420
424
 
425
+ /**
426
+ * Describes a runtime client script required by this processor.
427
+ *
428
+ * @public
429
+ */
430
+ export declare interface ProcessorRuntime {
431
+ /** Path (from repo root) to the script entrypoint */
432
+ src: string;
433
+ /** Bundle name (in dist/processors) folder (default: derived from processor name) */
434
+ name?: string;
435
+ }
436
+
437
+ /* Excluded from this release type: processorRuntimeName */
438
+
421
439
  /**
422
440
  * @public
423
441
  */