undocs 0.2.12 → 0.2.13
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.
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { join } from 'node:path'
|
|
2
|
+
import { pathToFileURL } from 'node:url'
|
|
1
3
|
import { defineDriver } from 'unstorage'
|
|
2
4
|
import fsDriver from 'unstorage/drivers/fs'
|
|
3
5
|
import { transform, loadConfig } from 'automd'
|
|
@@ -33,7 +35,8 @@ export default (driverOpts) => {
|
|
|
33
35
|
if (!automdConfig) {
|
|
34
36
|
automdConfig = await loadConfig(docsConfig.dir, docsConfig.automd)
|
|
35
37
|
}
|
|
36
|
-
const
|
|
38
|
+
const url = pathToFileURL(join(driverOpts.base, key.replace(/:/g, '/')))
|
|
39
|
+
const res = await transform(val, automdConfig, url)
|
|
37
40
|
if (res.hasChanged && !res.hasIssues) {
|
|
38
41
|
_fs.setItem(key, res.contents).catch(console.error)
|
|
39
42
|
}
|
package/package.json
CHANGED