fix: various fixes [skip ci]
This commit is contained in:
2
.github/scripts/preview.mjs
vendored
2
.github/scripts/preview.mjs
vendored
@@ -5,7 +5,7 @@ import url from "url"
|
||||
import setup from "../../source/app/metrics/setup.mjs"
|
||||
|
||||
//Paths
|
||||
const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)), "..")
|
||||
const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)), "../..")
|
||||
const __templates = paths.join(paths.join(__metrics, "source/templates/"))
|
||||
const __node_modules = paths.join(paths.join(__metrics, "node_modules"))
|
||||
const __web = paths.join(paths.join(__metrics, "source/app/web/statics"))
|
||||
|
||||
@@ -286,7 +286,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
|
||||
const header = [
|
||||
"<table>",
|
||||
` <tr><th colspan="2"><h3>${meta.name}</h3></th></tr>`,
|
||||
` <tr><td colspan="2" align="center">${(meta.description ?? "").replaceAll("\n", "<br>")}</td></tr>`,
|
||||
` <tr><td colspan="2" align="center">${(meta.description ?? "").replace(/\n/g, "<br>")}</td></tr>`,
|
||||
" <tr>",
|
||||
' <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>',
|
||||
` <td>${Object.entries(compatibility).filter(([_, value]) => value).map(([id]) => `<a href="/source/templates/${id}"><code>${templates[id].name ?? ""}</code></a>`).join(" ")}</td>`,
|
||||
@@ -406,7 +406,7 @@ metadata.template = async function({__templates, name, plugins, logger}) {
|
||||
const header = [
|
||||
"<table>",
|
||||
` <tr><th colspan="2"><h3>${meta.name ?? "(unnamed template)"}</h3></th></tr>`,
|
||||
` <tr><td colspan="2" align="center">${(meta.description ?? "").replaceAll("\n", "<br>")}</td></tr>`,
|
||||
` <tr><td colspan="2" align="center">${(meta.description ?? "").replace(/\n/g, "<br>")}</td></tr>`,
|
||||
" <tr>",
|
||||
' <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>',
|
||||
` <td>${Object.entries(compatibility).filter(([_, value]) => value).map(([id]) => `<a href="/source/plugins/${id}" title="${plugins[id].name}">${plugins[id].icon}</a>`).join(" ")}${meta.formats?.includes("markdown") ? " <code>✓ embed()</code>" : ""}</td>`,
|
||||
|
||||
@@ -369,6 +369,6 @@
|
||||
<!-- Scripts -->
|
||||
<script src="/.js/axios.min.js"></script>
|
||||
<script src="/.js/vue.min.js"></script>
|
||||
<script src="/about/.statics/script.js?v=3.17"></script>
|
||||
<script src="/about/.statics/script.js?v=3.18"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
<script src="/.js/vue.min.js"></script>
|
||||
<script src="/.js/vue.prism.min.js"></script>
|
||||
<script src="/.js/clipboard.min.js"></script>
|
||||
<script src="/.js/app.placeholder.js?v=3.17"></script>
|
||||
<script src="/.js/app.js?v=3.17"></script>
|
||||
<script src="/.js/app.placeholder.js?v=3.18"></script>
|
||||
<script src="/.js/app.js?v=3.18"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -100,7 +100,7 @@ for (const type of ["plugins", "templates"]) {
|
||||
.load(fs.readFileSync(path.join(__dirname, "../tests/cases", `${name}.${type.replace(/s$/, "")}.yml`), "utf8"))
|
||||
?.map(({ name: test, with: inputs, modes = [], timeout }) => {
|
||||
const skip = new Set(Object.entries(metadata.templates).filter(([_, { readme: { compatibility } }]) => !compatibility[name]).map(([template]) => template))
|
||||
if (!(metadata[type][name]?.supports.includes("repository")))
|
||||
if (!(metadata[type][name].supports?.includes("repository")))
|
||||
skip.add("repository")
|
||||
return [test, inputs, { skip: [...skip], modes, timeout }]
|
||||
}) ?? []
|
||||
|
||||
Reference in New Issue
Block a user