@forsakringskassan/docs-generator 2.11.3 → 2.12.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.
@@ -312,8 +312,9 @@ main {
312
312
  .docs-messagebox {
313
313
  border: 2px solid transparent;
314
314
  border-left-width: 1rem;
315
- padding: 1.5rem;
315
+ padding: 1.5rem 1.5rem 1.5rem 2.5rem;
316
316
  margin-bottom: 1rem;
317
+ border-radius: 2px;
317
318
  }
318
319
  .docs-messagebox :last-child {
319
320
  margin-bottom: 0;
@@ -322,18 +323,38 @@ main {
322
323
  font-weight: bold;
323
324
  }
324
325
  .docs-messagebox--details {
325
- border-color: var(--docs-messagebox-details-border);
326
326
  background: var(--docs-messagebox-details-background);
327
+ border-radius: 2px;
328
+ border: 1px solid var(--docs-messagebox-details-border);
327
329
  }
328
330
  .docs-messagebox--details summary {
329
331
  cursor: pointer;
330
- margin: -1.5rem;
331
- padding: 1.5rem;
332
+ margin: -1.5rem -1.5rem -1.5rem -2.5rem;
333
+ padding: 1.5rem 1.5rem 1.5rem 0;
334
+ }
335
+ .docs-messagebox--details summary::before {
336
+ content: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KPHBhdGggZD0iTTQ2Ny42NTggMTk2LjkxM0wyODMuNjU2IDM3Mi45MDdDMjc1LjkyMiAzODAuMzEzIDI2NS45NTMgMzg0IDI1NiAzODRDMjQ2LjA0NyAzODQgMjM2LjA3OCAzODAuMzEzIDIyOC4zNDQgMzcyLjkwN0w0NC4zNDIgMTk2LjkxM0MyOC4zODkgMTgxLjYzMyAyNy44MjYgMTU2LjMyMSA0My4wOTIgMTQwLjM1M0M1OC4zNzMgMTI0LjM1NCA4My42ODYgMTIzLjg1NCA5OS42NTUgMTM5LjEwM0wyNTYgMjg4LjY2TDQxMi4zNDUgMTM5LjEwM0M0MjguMzE0IDEyMy44MjIgNDUzLjYyNyAxMjQuMzg1IDQ2OC45MDggMTQwLjM1M0M0ODQuMTc0IDE1Ni4zMjEgNDgzLjYxMSAxODEuNjMzIDQ2Ny42NTggMTk2LjkxM1oiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K");
337
+ transform: translateY(3px);
338
+ transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
339
+ width: 1rem;
340
+ height: 1rem;
341
+ display: inline-block;
342
+ margin-right: 0.2rem;
332
343
  }
333
344
  .docs-messagebox--details[open] summary {
334
345
  margin-bottom: 0;
335
346
  padding-bottom: 0.75rem;
336
347
  }
348
+ .docs-messagebox--details[open] > summary::before {
349
+ transform: rotate(180deg) translateY(-5px);
350
+ transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
351
+ }
352
+ .docs-messagebox--details summary::marker {
353
+ color: transparent;
354
+ }
355
+ .docs-messagebox--details summary::-webkit-details-marker {
356
+ color: transparent;
357
+ }
337
358
  .docs-messagebox--info {
338
359
  border-color: var(--docs-messagebox-info-border);
339
360
  background: var(--docs-messagebox-info-background);
@@ -346,6 +367,9 @@ main {
346
367
  border-color: var(--docs-messagebox-danger-border);
347
368
  background: var(--docs-messagebox-danger-background);
348
369
  }
370
+ .docs-messagebox code {
371
+ background-color: var(--docs-code-optional-background-color);
372
+ }
349
373
 
350
374
  #sidenav {
351
375
  --header-footer-visible-height: 4.5rem;
@@ -312,8 +312,9 @@ main {
312
312
  .docs-messagebox {
313
313
  border: 2px solid transparent;
314
314
  border-left-width: 1rem;
315
- padding: 1.5rem;
315
+ padding: 1.5rem 1.5rem 1.5rem 2.5rem;
316
316
  margin-bottom: 1rem;
317
+ border-radius: 2px;
317
318
  }
318
319
  .docs-messagebox :last-child {
319
320
  margin-bottom: 0;
@@ -322,18 +323,38 @@ main {
322
323
  font-weight: bold;
323
324
  }
324
325
  .docs-messagebox--details {
325
- border-color: var(--docs-messagebox-details-border);
326
326
  background: var(--docs-messagebox-details-background);
327
+ border-radius: 2px;
328
+ border: 1px solid var(--docs-messagebox-details-border);
327
329
  }
328
330
  .docs-messagebox--details summary {
329
331
  cursor: pointer;
330
- margin: -1.5rem;
331
- padding: 1.5rem;
332
+ margin: -1.5rem -1.5rem -1.5rem -2.5rem;
333
+ padding: 1.5rem 1.5rem 1.5rem 0;
334
+ }
335
+ .docs-messagebox--details summary::before {
336
+ content: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KPHBhdGggZD0iTTQ2Ny42NTggMTk2LjkxM0wyODMuNjU2IDM3Mi45MDdDMjc1LjkyMiAzODAuMzEzIDI2NS45NTMgMzg0IDI1NiAzODRDMjQ2LjA0NyAzODQgMjM2LjA3OCAzODAuMzEzIDIyOC4zNDQgMzcyLjkwN0w0NC4zNDIgMTk2LjkxM0MyOC4zODkgMTgxLjYzMyAyNy44MjYgMTU2LjMyMSA0My4wOTIgMTQwLjM1M0M1OC4zNzMgMTI0LjM1NCA4My42ODYgMTIzLjg1NCA5OS42NTUgMTM5LjEwM0wyNTYgMjg4LjY2TDQxMi4zNDUgMTM5LjEwM0M0MjguMzE0IDEyMy44MjIgNDUzLjYyNyAxMjQuMzg1IDQ2OC45MDggMTQwLjM1M0M0ODQuMTc0IDE1Ni4zMjEgNDgzLjYxMSAxODEuNjMzIDQ2Ny42NTggMTk2LjkxM1oiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K");
337
+ transform: translateY(3px);
338
+ transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
339
+ width: 1rem;
340
+ height: 1rem;
341
+ display: inline-block;
342
+ margin-right: 0.2rem;
332
343
  }
333
344
  .docs-messagebox--details[open] summary {
334
345
  margin-bottom: 0;
335
346
  padding-bottom: 0.75rem;
336
347
  }
348
+ .docs-messagebox--details[open] > summary::before {
349
+ transform: rotate(180deg) translateY(-5px);
350
+ transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
351
+ }
352
+ .docs-messagebox--details summary::marker {
353
+ color: transparent;
354
+ }
355
+ .docs-messagebox--details summary::-webkit-details-marker {
356
+ color: transparent;
357
+ }
337
358
  .docs-messagebox--info {
338
359
  border-color: var(--docs-messagebox-info-border);
339
360
  background: var(--docs-messagebox-info-background);
@@ -346,6 +367,9 @@ main {
346
367
  border-color: var(--docs-messagebox-danger-border);
347
368
  background: var(--docs-messagebox-danger-background);
348
369
  }
370
+ .docs-messagebox code {
371
+ background-color: var(--docs-code-optional-background-color);
372
+ }
349
373
 
350
374
  #sidenav {
351
375
  --header-footer-visible-height: 4.5rem;
@@ -1245,6 +1269,8 @@ kbd {
1245
1269
  --docs-version-hover-color: var(--docs-text-color-default);
1246
1270
  --docs-cookie-background-color: #f5f6fa;
1247
1271
  --docs-cookie-border-color: #4a52b6;
1272
+ --docs-code-background-color: #f4f4f4;
1273
+ --docs-code-optional-background-color: #e5e5e5;
1248
1274
  }
1249
1275
 
1250
1276
  *,
@@ -50,6 +50,8 @@
50
50
  --docs-version-hover-color: var(--docs-text-color-default);
51
51
  --docs-cookie-background-color: #f5f6fa;
52
52
  --docs-cookie-border-color: #4a52b6;
53
+ --docs-code-background-color: #f4f4f4;
54
+ --docs-code-optional-background-color: #e5e5e5;
53
55
  }
54
56
 
55
57
  *,
@@ -16307,6 +16307,69 @@ const glob = Object.assign(glob_, {
16307
16307
  });
16308
16308
  glob.glob = glob;
16309
16309
 
16310
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16311
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16312
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16313
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16314
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16315
+ const dedent = createDedent({});
16316
+ function createDedent(options) {
16317
+ dedent.withOptions = newOptions => createDedent(_objectSpread(_objectSpread({}, options), newOptions));
16318
+ return dedent;
16319
+ function dedent(strings, ...values) {
16320
+ const raw = typeof strings === "string" ? [strings] : strings.raw;
16321
+ const {
16322
+ escapeSpecialCharacters = Array.isArray(strings)
16323
+ } = options;
16324
+
16325
+ // first, perform interpolation
16326
+ let result = "";
16327
+ for (let i = 0; i < raw.length; i++) {
16328
+ let next = raw[i];
16329
+ if (escapeSpecialCharacters) {
16330
+ // handle escaped newlines, backticks, and interpolation characters
16331
+ next = next.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{");
16332
+ }
16333
+ result += next;
16334
+ if (i < values.length) {
16335
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
16336
+ result += values[i];
16337
+ }
16338
+ }
16339
+
16340
+ // now strip indentation
16341
+ const lines = result.split("\n");
16342
+ let mindent = null;
16343
+ for (const l of lines) {
16344
+ const m = l.match(/^(\s+)\S+/);
16345
+ if (m) {
16346
+ const indent = m[1].length;
16347
+ if (!mindent) {
16348
+ // this is the first indented line
16349
+ mindent = indent;
16350
+ } else {
16351
+ mindent = Math.min(mindent, indent);
16352
+ }
16353
+ }
16354
+ }
16355
+ if (mindent !== null) {
16356
+ const m = mindent; // appease TypeScript
16357
+ result = lines
16358
+ // https://github.com/typescript-eslint/typescript-eslint/issues/7140
16359
+ // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
16360
+ .map(l => l[0] === " " || l[0] === "\t" ? l.slice(m) : l).join("\n");
16361
+ }
16362
+
16363
+ // dedent eats leading and trailing whitespace too
16364
+ result = result.trim();
16365
+ if (escapeSpecialCharacters) {
16366
+ // handle escaped newlines at the end to ensure they don't get stripped too
16367
+ result = result.replace(/\\n/g, "\n");
16368
+ }
16369
+ return result;
16370
+ }
16371
+ }
16372
+
16310
16373
  var frontMatter = {exports: {}};
16311
16374
 
16312
16375
  var jsYaml$1 = {};
@@ -24789,12 +24852,18 @@ const getLocalPaths = (localPaths, localPath) => localPaths.at(-1) === localPath
24789
24852
  ? localPaths
24790
24853
  : getLocalPaths([...localPaths, localPath], path$1.resolve(localPath, '..'));
24791
24854
 
24855
+ // When setting `shell: true` under-the-hood, we must manually escape the file and arguments.
24856
+ // This ensures arguments are properly split, and prevents command injection.
24857
+ const applyForceShell = async (file, commandArguments, options) => await shouldForceShell(file, options)
24858
+ ? [escapeFile(file), commandArguments.map(argument => escapeArgument(argument)), {...options, shell: true}]
24859
+ : [file, commandArguments, options];
24860
+
24792
24861
  // On Windows, running most executable files (except *.exe and *.com) requires using a shell.
24793
24862
  // This includes *.cmd and *.bat, which itself includes Node modules binaries.
24794
24863
  // We detect this situation and automatically:
24795
24864
  // - Set the `shell: true` option
24796
24865
  // - Escape shell-specific characters
24797
- const getForcedShell = async (file, {shell, cwd, env = process$1.env}) => process$1.platform === 'win32'
24866
+ const shouldForceShell = async (file, {shell, cwd, env = process$1.env}) => process$1.platform === 'win32'
24798
24867
  && !shell
24799
24868
  && !(await isExe(file, cwd, env));
24800
24869
 
@@ -24847,12 +24916,6 @@ const mIsExe = async (file, cwd, PATH) => {
24847
24916
  // Other file extensions require using a shell
24848
24917
  const exeExtensions = ['.exe', '.com'];
24849
24918
 
24850
- // When setting `shell: true` under-the-hood, we must manually escape the file and arguments.
24851
- // This ensures arguments are properly split, and prevents command injection.
24852
- const escapeArguments = (file, commandArguments, forcedShell) => forcedShell
24853
- ? [escapeFile(file), commandArguments.map(argument => escapeArgument(argument))]
24854
- : [file, commandArguments];
24855
-
24856
24919
  // `cmd.exe` escaping for arguments.
24857
24920
  // Taken from https://github.com/moxystudio/node-cross-spawn
24858
24921
  const escapeArgument = argument => escapeFile(escapeFile(`"${argument
@@ -24894,11 +24957,11 @@ const onStreamError = async stream => {
24894
24957
 
24895
24958
  const checkFailure = ({command}, {exitCode, signalName}) => {
24896
24959
  if (signalName !== undefined) {
24897
- throw new Error(`Command was terminated with ${signalName}: ${command}`);
24960
+ throw new SubprocessError(`Command was terminated with ${signalName}: ${command}`);
24898
24961
  }
24899
24962
 
24900
24963
  if (exitCode !== undefined) {
24901
- throw new Error(`Command failed with exit code ${exitCode}: ${command}`);
24964
+ throw new SubprocessError(`Command failed with exit code ${exitCode}: ${command}`);
24902
24965
  }
24903
24966
  };
24904
24967
 
@@ -24908,9 +24971,13 @@ const getResultError = (error, instance, context) => Object.assign(
24908
24971
  getOutputs(context),
24909
24972
  );
24910
24973
 
24911
- const getErrorInstance = (error, {command}) => error?.message.startsWith('Command ')
24974
+ const getErrorInstance = (error, {command}) => error instanceof SubprocessError
24912
24975
  ? error
24913
- : new Error(`Command failed: ${command}`, {cause: error});
24976
+ : new SubprocessError(`Command failed: ${command}`, {cause: error});
24977
+
24978
+ class SubprocessError extends Error {
24979
+ name = 'SubprocessError';
24980
+ }
24914
24981
 
24915
24982
  const getErrorOutput = ({exitCode, signalCode}) => ({
24916
24983
  // `exitCode` can be a negative number (`errno`) when the `error` event is emitted on the `instance`
@@ -24934,16 +25001,13 @@ const spawnSubprocess = async (file, commandArguments, options, context) => {
24934
25001
  try {
24935
25002
  // When running `node`, keep the current Node version and CLI flags.
24936
25003
  // Not applied with file paths to `.../node` since those indicate a clear intent to use a specific Node version.
25004
+ // This also provides a way to opting out, e.g. using `process.execPath` instead of `node` to discard current CLI flags.
24937
25005
  // Does not work with shebangs, but those don't work cross-platform anyway.
24938
25006
  [file, commandArguments] = ['node', 'node.exe'].includes(file.toLowerCase())
24939
25007
  ? [process$1.execPath, [...process$1.execArgv.filter(flag => !flag.startsWith('--inspect')), ...commandArguments]]
24940
25008
  : [file, commandArguments];
24941
25009
 
24942
- const forcedShell = await getForcedShell(file, options);
24943
- const instance = node_child_process.spawn(...escapeArguments(file, commandArguments, forcedShell), {
24944
- ...options,
24945
- shell: options.shell || forcedShell,
24946
- });
25010
+ const instance = node_child_process.spawn(...await applyForceShell(file, commandArguments, options));
24947
25011
  bufferOutput(instance.stdout, context, 'stdout');
24948
25012
  bufferOutput(instance.stderr, context, 'stderr');
24949
25013
 
@@ -51635,6 +51699,7 @@ var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
51635
51699
  exports.HighlightJS = HighlightJS;
51636
51700
  exports.MarkdownIt = MarkdownIt;
51637
51701
  exports.cliProgress = cliProgress;
51702
+ exports.dedent = dedent;
51638
51703
  exports.deflist_plugin = deflist_plugin;
51639
51704
  exports.fm = fm;
51640
51705
  exports.fse = fse;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('@vue/compiler-sfc');
4
- require('./vendor-DM7XM4qm.js');
4
+ require('./vendor-CJBsNZrh.js');
5
5
 
6
6
  var __create = Object.create;
7
7
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-generator",
3
- "version": "2.11.3",
3
+ "version": "2.12.0",
4
4
  "description": "Documentation generator",
5
5
  "keywords": [
6
6
  "documentation"