@forsakringskassan/docs-generator 3.10.0 → 3.10.1

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/index.mjs CHANGED
@@ -19,7 +19,7 @@ import { parse, compileScript as compileScript$1, compileTemplate } from 'vue/co
19
19
  import { parse as parse$2 } from 'vue-docgen-api';
20
20
  import fs__default, { existsSync, readFileSync, copyFileSync } from 'node:fs';
21
21
  import { fileURLToPath } from 'node:url';
22
- import { compileStringAsync, NodePackageImporter } from 'sass';
22
+ import { compileAsync, NodePackageImporter } from 'sass';
23
23
  import { t as tsconfigPath } from './tsconfig-path-bG7G_cK8.mjs';
24
24
  import esbuild$1, { build } from 'esbuild';
25
25
  import { Worker } from 'node:worker_threads';
@@ -2871,8 +2871,8 @@ async function partialFileReader(filePath) {
2871
2871
  return parseFile(filePath, content);
2872
2872
  }
2873
2873
 
2874
- async function compileSassString(dst, style) {
2875
- const result = await compileStringAsync(style, {
2874
+ async function compileSassString(dst, filePath) {
2875
+ const result = await compileAsync(filePath, {
2876
2876
  style: "expanded",
2877
2877
  importers: [new NodePackageImporter(), moduleImporter()]
2878
2878
  });
@@ -2883,8 +2883,8 @@ async function compileSassString(dst, style) {
2883
2883
  async function compileStyle(assetFolder, name, src) {
2884
2884
  try {
2885
2885
  const outfile = path.join("temp", `asset-${name}.css`);
2886
- const source = await fs.readFile(src, "utf8");
2887
- await compileSassString(outfile, source);
2886
+ const filePath = typeof src === "string" ? src : fileURLToPath(src);
2887
+ await compileSassString(outfile, filePath);
2888
2888
  const content = await fs.readFile(outfile, "utf8");
2889
2889
  const fingerprint = getFingerprint(content);
2890
2890
  const integrity = getIntegrity(content);