nuxt-link-checker 3.0.2 → 3.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/dist/client/200.html +38 -37
- package/dist/client/404.html +38 -37
- package/dist/client/_nuxt/{D7WeZTai.js → -0RnDExV.js} +1 -1
- package/dist/client/_nuxt/{0ooBkv16.js → B34IPION.js} +1 -1
- package/dist/client/_nuxt/BItQYlyr.js +39 -0
- package/dist/client/_nuxt/BMRpS3Xo.js +1 -0
- package/dist/client/_nuxt/{BVkeqZ59.js → BU6jSTzS.js} +1 -1
- package/dist/client/_nuxt/{1rqFXsGc.js → BUinYsBq.js} +2 -2
- package/dist/client/_nuxt/BXP-NDAE.js +1 -0
- package/dist/client/_nuxt/{CdedUr_-.js → BiVAY1KT.js} +1 -1
- package/dist/client/_nuxt/BpDWT_aG.js +1 -0
- package/dist/client/_nuxt/{BnyYJeap.js → Bpum8voz.js} +1 -1
- package/dist/client/_nuxt/Br9pa-sp.js +1 -0
- package/dist/client/_nuxt/Bym0hRiG.js +1 -0
- package/dist/client/_nuxt/{ECt0lbkd.js → CBks_G0r.js} +1 -1
- package/dist/client/_nuxt/{CFF2d1j6.js → CEQQyXKu.js} +1 -1
- package/dist/client/_nuxt/COBxEbHI.js +1 -0
- package/dist/client/_nuxt/CPw9RxLe.js +1 -0
- package/dist/client/_nuxt/{BXR915QZ.js → CU2HFFmO.js} +1 -1
- package/dist/client/_nuxt/CUHTTYqt.js +6 -0
- package/dist/client/_nuxt/{D33OKbkv.js → C_3e0TF9.js} +1 -1
- package/dist/client/_nuxt/{CJIaz0BQ.js → CxLlwT--.js} +1 -1
- package/dist/client/_nuxt/D46m5Xd3.js +1 -0
- package/dist/client/_nuxt/{DAP_O-zg.js → D47volHK.js} +1 -1
- package/dist/client/_nuxt/D5OoM2Ul.js +1 -0
- package/dist/client/_nuxt/{CX_FIdg1.js → DDK5Hw8n.js} +1 -1
- package/dist/client/_nuxt/{D7us1Eal.js → DGEe2Wb6.js} +1 -1
- package/dist/client/_nuxt/DQ-rpzxz.js +1 -0
- package/dist/client/_nuxt/DV9_Ze0W.js +1 -0
- package/dist/client/_nuxt/DdUjqjK-.js +1 -0
- package/dist/client/_nuxt/{C1yTBzia.js → DuzeNTn4.js} +1 -1
- package/dist/client/_nuxt/EPzMdTgI.js +171 -0
- package/dist/client/_nuxt/{DrnZp123.js → I286KXx1.js} +1 -1
- package/dist/client/_nuxt/{Cq0wM8KE.js → NiuS3JWx.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/3af16b43-4f9f-439e-a21d-22a114ed006f.json +1 -0
- package/dist/client/_nuxt/error-404.Boe7FJkw.css +1 -0
- package/dist/client/_nuxt/error-500.wMnM3ITh.css +1 -0
- package/dist/client/_nuxt/{DGDuLtS6.js → gnwMp1li.js} +1 -1
- package/dist/client/_nuxt/{Bj5xdiaE.js → xuIuMB9j.js} +1 -1
- package/dist/client/index.html +38 -37
- package/dist/module.d.mts +14 -2
- package/dist/module.d.ts +14 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +49 -15
- package/dist/runtime/nitro/composables/content-mock.d.ts +1 -0
- package/dist/runtime/nitro/composables/content-mock.js +3 -0
- package/dist/runtime/nitro/routes/__link-checker__/inspect.d.ts +1 -1
- package/dist/runtime/nitro/routes/__link-checker__/inspect.js +13 -9
- package/dist/runtime/nitro/routes/__link-checker__/links.d.ts +1 -1
- package/dist/runtime/nitro/routes/__link-checker__/links.js +32 -6
- package/dist/runtime/nuxt/plugin/ui.client.js +3 -1
- package/dist/runtime/nuxt/plugin/view/Main.vue +2 -2
- package/dist/runtime/nuxt/plugin/view/client.d.ts +3 -1
- package/dist/runtime/nuxt/plugin/view/client.js +9 -10
- package/dist/runtime/pure/index.d.ts +5 -0
- package/dist/runtime/pure/index.js +12 -0
- package/dist/runtime/pure/inspect.d.ts +2 -20
- package/dist/runtime/pure/inspect.js +12 -11
- package/dist/runtime/pure/inspections/absolute-site-urls.js +3 -4
- package/dist/runtime/pure/inspections/descriptive-link-text.js +1 -0
- package/dist/runtime/pure/inspections/missing-hash.js +1 -0
- package/dist/runtime/pure/inspections/no-baseless.js +1 -0
- package/dist/runtime/pure/inspections/no-error-response-status.js +5 -4
- package/dist/runtime/pure/inspections/no-javascript.js +1 -0
- package/dist/runtime/pure/inspections/trailing-slash.js +1 -0
- package/dist/runtime/pure/redirects.js +1 -0
- package/dist/runtime/types.d.ts +6 -3
- package/package.json +19 -13
- package/dist/client/_nuxt/3ghuYFLd.js +0 -1
- package/dist/client/_nuxt/9B1nZgL-.js +0 -1
- package/dist/client/_nuxt/BYdKNJ10.js +0 -1
- package/dist/client/_nuxt/Bi43K_FX.js +0 -6
- package/dist/client/_nuxt/CBPJd_fO.js +0 -1
- package/dist/client/_nuxt/CETtcHRa.js +0 -1
- package/dist/client/_nuxt/CEfge3mM.js +0 -1
- package/dist/client/_nuxt/CSPeAESR.js +0 -1
- package/dist/client/_nuxt/ChJ1dFAn.js +0 -39
- package/dist/client/_nuxt/DGO8GyiP.js +0 -1
- package/dist/client/_nuxt/DOHBU7tp.js +0 -1
- package/dist/client/_nuxt/DVLwECkk.js +0 -1
- package/dist/client/_nuxt/Du6_OKDb.js +0 -159
- package/dist/client/_nuxt/builds/meta/7bcc0ccc-7abc-4c7a-a38f-10c82bc8da01.json +0 -1
- package/dist/client/_nuxt/eJfcURhx.js +0 -1
- package/dist/client/_nuxt/error-404.CUS9EMVV.css +0 -1
- package/dist/client/_nuxt/error-500.CMkLgjP3.css +0 -1
- package/dist/runtime/nitro/util.d.ts +0 -1
- package/dist/runtime/nitro/util.js +0 -4
- package/dist/runtime/nuxt/plugin/search.nitro.d.ts +0 -2
- package/dist/runtime/nuxt/plugin/search.nitro.js +0 -11
|
@@ -2,16 +2,17 @@ import { defineEventHandler, getHeader, readBody } from "h3";
|
|
|
2
2
|
import { fixSlashes } from "site-config-stack/urls";
|
|
3
3
|
import { parseURL } from "ufo";
|
|
4
4
|
import { resolve } from "pathe";
|
|
5
|
-
import
|
|
6
|
-
import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from "
|
|
7
|
-
import {
|
|
8
|
-
import { isNonFetchableLink } from "../../../pure/inspections/util.js";
|
|
9
|
-
import { isInternalRoute } from "../../util.js";
|
|
10
|
-
import { useNitroApp, useNitroOrigin, useRuntimeConfig, useSiteConfig } from "#imports";
|
|
5
|
+
import Fuse from "fuse.js";
|
|
6
|
+
import { generateFileLinkDiff, generateFileLinkPreviews, getLinkResponse, inspect, isNonFetchableLink, lruFsCache } from "#link-checker/pure";
|
|
7
|
+
import { useNitroOrigin, useRuntimeConfig, useSiteConfig } from "#imports";
|
|
11
8
|
import { serverQueryContent } from "#content/server";
|
|
9
|
+
function isInternalRoute(path) {
|
|
10
|
+
const lastSegment = path.split("/").pop() || path;
|
|
11
|
+
return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
|
|
12
|
+
}
|
|
12
13
|
export default defineEventHandler(async (e) => {
|
|
13
14
|
const { tasks, ids } = await readBody(e);
|
|
14
|
-
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"];
|
|
15
|
+
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
15
16
|
const partialCtx = {
|
|
16
17
|
ids,
|
|
17
18
|
fromPath: fixSlashes(false, parseURL(getHeader(e, "referer") || "/").pathname),
|
|
@@ -24,7 +25,7 @@ export default defineEventHandler(async (e) => {
|
|
|
24
25
|
extraPaths.push(resolve(runtimeConfig.rootDir, "content", contentDocument._file));
|
|
25
26
|
}
|
|
26
27
|
lruFsCache.clear();
|
|
27
|
-
const
|
|
28
|
+
const links = await $fetch("/__link-checker__/links");
|
|
28
29
|
return Promise.all(
|
|
29
30
|
tasks.map(async ({ link, paths, textContent }) => {
|
|
30
31
|
if (isNonFetchableLink(link) || isInternalRoute(link))
|
|
@@ -42,7 +43,10 @@ export default defineEventHandler(async (e) => {
|
|
|
42
43
|
...partialCtx,
|
|
43
44
|
link,
|
|
44
45
|
textContent,
|
|
45
|
-
pageSearch,
|
|
46
|
+
pageSearch: new Fuse(links, {
|
|
47
|
+
keys: ["path", "title"],
|
|
48
|
+
threshold: 0.5
|
|
49
|
+
}),
|
|
46
50
|
response,
|
|
47
51
|
skipInspections: runtimeConfig.skipInspections
|
|
48
52
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
|
@@ -1,15 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRuntimeConfig } from "#imports";
|
|
1
|
+
import { createDefu } from "defu";
|
|
2
|
+
import { defineCachedEventHandler, useRuntimeConfig } from "#imports";
|
|
3
3
|
import pagePaths from "#nuxt-link-checker-sitemap/pages.mjs";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { serverQueryContent } from "#content/server";
|
|
5
|
+
const merger = createDefu((obj, key, value) => {
|
|
6
|
+
if (Array.isArray(obj[key]) && Array.isArray(value))
|
|
7
|
+
obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
|
|
8
|
+
return obj[key];
|
|
9
|
+
});
|
|
10
|
+
function mergeOnKey(arr, key) {
|
|
11
|
+
const res = {};
|
|
12
|
+
arr.forEach((item) => {
|
|
13
|
+
const k = item[key];
|
|
14
|
+
res[k] = merger(item, res[k] || {});
|
|
15
|
+
});
|
|
16
|
+
return Object.values(res);
|
|
17
|
+
}
|
|
18
|
+
export default defineCachedEventHandler(async (e) => {
|
|
19
|
+
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
6
20
|
const linkDb = [
|
|
7
21
|
...pagePaths
|
|
8
22
|
];
|
|
9
23
|
if (runtimeConfig.hasSitemapModule) {
|
|
10
24
|
const sitemapDebug = await $fetch("/__sitemap__/debug.json");
|
|
11
25
|
const entries = sitemapDebug.globalSources.map((source) => source.urls).flat();
|
|
12
|
-
linkDb.push(...entries.map((s) => s.loc));
|
|
26
|
+
linkDb.push(...entries.map((s) => ({ path: s.loc, title: "" })));
|
|
27
|
+
}
|
|
28
|
+
if (serverQueryContent) {
|
|
29
|
+
const contentDocuments = await serverQueryContent(e).find();
|
|
30
|
+
if (contentDocuments) {
|
|
31
|
+
linkDb.push(...contentDocuments.map((doc) => ({
|
|
32
|
+
path: doc._path,
|
|
33
|
+
title: doc.title
|
|
34
|
+
})));
|
|
35
|
+
}
|
|
13
36
|
}
|
|
14
|
-
return
|
|
37
|
+
return mergeOnKey(linkDb, "link");
|
|
38
|
+
}, {
|
|
39
|
+
maxAge: 10
|
|
40
|
+
// avoid thrashing
|
|
15
41
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#imports";
|
|
1
|
+
import { defineNuxtPlugin, useRoute } from "#imports";
|
|
2
2
|
export default defineNuxtPlugin((nuxt) => {
|
|
3
3
|
if (typeof document === "undefined" || typeof window === "undefined")
|
|
4
4
|
return;
|
|
@@ -13,8 +13,10 @@ export default defineNuxtPlugin((nuxt) => {
|
|
|
13
13
|
console.error("Nuxt DevTools: Failed to check parent window");
|
|
14
14
|
console.error(e);
|
|
15
15
|
}
|
|
16
|
+
const route = useRoute();
|
|
16
17
|
import("./view/client.js").then(({ setupLinkCheckerClient }) => {
|
|
17
18
|
setupLinkCheckerClient({
|
|
19
|
+
route,
|
|
18
20
|
nuxt
|
|
19
21
|
});
|
|
20
22
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from 'vue'
|
|
2
|
+
import { type Ref, computed, ref } from 'vue'
|
|
3
3
|
import type { NuxtLinkCheckerClient } from '../../../types'
|
|
4
4
|
import Squiggle from './Squiggle.vue'
|
|
5
5
|
import { useEventListener } from './utils'
|
|
6
6
|
|
|
7
7
|
const props = defineProps<{
|
|
8
8
|
client: NuxtLinkCheckerClient
|
|
9
|
-
highlightedLink: string | null
|
|
9
|
+
highlightedLink: Ref<string | null>
|
|
10
10
|
inspections: NuxtLinkCheckerClient['inspectionEls']
|
|
11
11
|
}>()
|
|
12
12
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { NuxtApp } from 'nuxt/app';
|
|
2
|
-
|
|
2
|
+
import type { useRoute } from '#imports';
|
|
3
|
+
export declare function setupLinkCheckerClient({ nuxt, route }: {
|
|
3
4
|
nuxt: NuxtApp;
|
|
5
|
+
route: ReturnType<typeof useRoute>;
|
|
4
6
|
}): Promise<void>;
|
|
@@ -3,9 +3,12 @@ import { useLocalStorage } from "@vueuse/core";
|
|
|
3
3
|
import { createFilter } from "../../../pure/sharedUtils.js";
|
|
4
4
|
import Main from "./Main.vue";
|
|
5
5
|
import { linkDb } from "./state.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useRuntimeConfig } from "#imports";
|
|
7
7
|
function resolveDevtoolsIframe() {
|
|
8
|
-
|
|
8
|
+
const iframe = document.querySelector("#nuxt-devtools-iframe");
|
|
9
|
+
if (!iframe)
|
|
10
|
+
return;
|
|
11
|
+
return iframe?.contentWindow?.__NUXT_DEVTOOLS__;
|
|
9
12
|
}
|
|
10
13
|
function resolvePathsForEl(el) {
|
|
11
14
|
const parents = [];
|
|
@@ -20,7 +23,7 @@ function resolvePathsForEl(el) {
|
|
|
20
23
|
...new Set(parents.map((p) => p.getAttribute("data-v-inspector")?.split(":")?.[0] || false))
|
|
21
24
|
].filter(Boolean);
|
|
22
25
|
}
|
|
23
|
-
export async function setupLinkCheckerClient({ nuxt }) {
|
|
26
|
+
export async function setupLinkCheckerClient({ nuxt, route }) {
|
|
24
27
|
let queue = [];
|
|
25
28
|
let queueWorkerTimer;
|
|
26
29
|
const inspectionEls = ref([]);
|
|
@@ -30,11 +33,10 @@ export async function setupLinkCheckerClient({ nuxt }) {
|
|
|
30
33
|
let elMap = {};
|
|
31
34
|
let devtoolsClient;
|
|
32
35
|
let isOpeningDevtools = false;
|
|
33
|
-
const route = useRoute();
|
|
34
36
|
let startQueueIdleId;
|
|
35
37
|
let startQueueTimeoutId;
|
|
36
38
|
const showInspections = useLocalStorage("nuxt-link-checker:show-inspections", true);
|
|
37
|
-
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"];
|
|
39
|
+
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
38
40
|
const filter = createFilter({
|
|
39
41
|
exclude: runtimeConfig.excludeLinks
|
|
40
42
|
});
|
|
@@ -150,10 +152,7 @@ export async function setupLinkCheckerClient({ nuxt }) {
|
|
|
150
152
|
}, 250);
|
|
151
153
|
}
|
|
152
154
|
} else {
|
|
153
|
-
|
|
154
|
-
devtoolsClient.host.open();
|
|
155
|
-
else
|
|
156
|
-
devtoolsClient.host.devtools.open();
|
|
155
|
+
devtoolsClient.host.devtools.open();
|
|
157
156
|
const srcPath = new URL(devtoolsClient.host.getIframe().src).pathname;
|
|
158
157
|
if (!srcPath.startsWith("/__nuxt_devtools__/client/modules/custom-nuxt-link-checker")) {
|
|
159
158
|
devtoolsClient.host.getIframe().src = `/__nuxt_devtools__/client/modules/custom-nuxt-link-checker?link=${encodeURIComponent(link)}`;
|
|
@@ -175,7 +174,7 @@ export async function setupLinkCheckerClient({ nuxt }) {
|
|
|
175
174
|
startQueueIdleId = requestIdleCallback(() => {
|
|
176
175
|
client.stopQueueWorker();
|
|
177
176
|
if (!startQueueTimeoutId) {
|
|
178
|
-
startQueueTimeoutId = setTimeout(() => {
|
|
177
|
+
startQueueTimeoutId = window.setTimeout(() => {
|
|
179
178
|
client.scanLinks();
|
|
180
179
|
client.startQueueWorker();
|
|
181
180
|
startQueueTimeoutId = false;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { inspect } from './inspect.js';
|
|
2
|
+
import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from './diff.js';
|
|
3
|
+
import { getLinkResponse } from './crawl.js';
|
|
4
|
+
import { isNonFetchableLink } from './inspections/util.js';
|
|
5
|
+
export { inspect, generateFileLinkDiff, generateFileLinkPreviews, lruFsCache, getLinkResponse, isNonFetchableLink, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { inspect } from "./inspect.js";
|
|
2
|
+
import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from "./diff.js";
|
|
3
|
+
import { getLinkResponse } from "./crawl.js";
|
|
4
|
+
import { isNonFetchableLink } from "./inspections/util.js";
|
|
5
|
+
export {
|
|
6
|
+
inspect,
|
|
7
|
+
generateFileLinkDiff,
|
|
8
|
+
generateFileLinkPreviews,
|
|
9
|
+
lruFsCache,
|
|
10
|
+
getLinkResponse,
|
|
11
|
+
isNonFetchableLink
|
|
12
|
+
};
|
|
@@ -1,21 +1,3 @@
|
|
|
1
1
|
import type { LinkInspectionResult, Rule, RuleTestContext } from '../types.js';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
readonly 'no-error-response': Rule;
|
|
5
|
-
readonly 'no-baseless': Rule;
|
|
6
|
-
readonly 'no-javascript': Rule;
|
|
7
|
-
readonly 'trailing-slash': Rule;
|
|
8
|
-
readonly 'absolute-site-urls': Rule;
|
|
9
|
-
readonly redirects: Rule;
|
|
10
|
-
readonly 'link-text': Rule;
|
|
11
|
-
};
|
|
12
|
-
export declare function inspect(ctx: RuleTestContext, rules?: {
|
|
13
|
-
readonly 'missing-hash': Rule;
|
|
14
|
-
readonly 'no-error-response': Rule;
|
|
15
|
-
readonly 'no-baseless': Rule;
|
|
16
|
-
readonly 'no-javascript': Rule;
|
|
17
|
-
readonly 'trailing-slash': Rule;
|
|
18
|
-
readonly 'absolute-site-urls': Rule;
|
|
19
|
-
readonly redirects: Rule;
|
|
20
|
-
readonly 'link-text': Rule;
|
|
21
|
-
}): Partial<LinkInspectionResult>;
|
|
2
|
+
export declare const AllInspections: Rule[];
|
|
3
|
+
export declare function inspect(ctx: Pick<Required<RuleTestContext>, 'link'> & Omit<Partial<RuleTestContext>, 'link'>, rules?: Rule[]): Partial<LinkInspectionResult>;
|
|
@@ -8,17 +8,18 @@ import RuleRedirects from "./redirects.js";
|
|
|
8
8
|
import RuleNoErrorResponse from "./inspections/no-error-response-status.js";
|
|
9
9
|
import RuleDescriptiveLinkText from "./inspections/descriptive-link-text.js";
|
|
10
10
|
import { isNonFetchableLink } from "./inspections/util.js";
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export function inspect(ctx, rules
|
|
11
|
+
export const AllInspections = [
|
|
12
|
+
RuleMissingHash(),
|
|
13
|
+
RuleNoErrorResponse(),
|
|
14
|
+
RuleNoBaseLess(),
|
|
15
|
+
RuleNoJavascript(),
|
|
16
|
+
RuleTrailingSlash(),
|
|
17
|
+
RuleAbsoluteSiteUrls(),
|
|
18
|
+
RuleRedirects(),
|
|
19
|
+
RuleDescriptiveLinkText()
|
|
20
|
+
];
|
|
21
|
+
export function inspect(ctx, rules) {
|
|
22
|
+
rules = rules || AllInspections;
|
|
22
23
|
const res = { error: [], warning: [], fix: ctx.link, link: ctx.link };
|
|
23
24
|
let link = ctx.link;
|
|
24
25
|
const url = parseURL(link);
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { parseURL } from "ufo";
|
|
2
1
|
import { defineRule } from "./util.js";
|
|
3
2
|
export default function RuleAbsoluteSiteUrls() {
|
|
4
3
|
return defineRule({
|
|
5
|
-
|
|
4
|
+
id: "absolute-site-urls",
|
|
5
|
+
test({ report, link, url, siteConfig }) {
|
|
6
6
|
if (!link.startsWith(siteConfig.url))
|
|
7
7
|
return;
|
|
8
|
-
const $url = parseURL(link);
|
|
9
8
|
report({
|
|
10
9
|
name: "absolute-site-urls",
|
|
11
10
|
scope: "warning",
|
|
12
11
|
message: "Internal links should be relative.",
|
|
13
12
|
tip: "Using internal links that start with / is recommended to avoid issues when deploying your site to different domain names",
|
|
14
|
-
fix:
|
|
13
|
+
fix: url.pathname,
|
|
15
14
|
fixDescription: `Remove ${siteConfig.url}.`
|
|
16
15
|
});
|
|
17
16
|
}
|
|
@@ -3,6 +3,7 @@ import { fixSlashes } from "site-config-stack/urls";
|
|
|
3
3
|
import { defineRule } from "./util.js";
|
|
4
4
|
export default function RuleMissingHash() {
|
|
5
5
|
return defineRule({
|
|
6
|
+
id: "missing-hash",
|
|
6
7
|
test({ link, report, ids, fromPath }) {
|
|
7
8
|
const [path, hash] = link.split("#");
|
|
8
9
|
if (!link.includes("#") || link.endsWith("#top") || fixSlashes(false, path) !== fromPath)
|
|
@@ -2,6 +2,7 @@ import { joinURL } from "ufo";
|
|
|
2
2
|
import { defineRule, isNonFetchableLink } from "./util.js";
|
|
3
3
|
export default function RuleNoBaseLess() {
|
|
4
4
|
return defineRule({
|
|
5
|
+
id: "no-baseless",
|
|
5
6
|
test({ link, fromPath, report }) {
|
|
6
7
|
if (link.startsWith("/") || link.startsWith("http") || isNonFetchableLink(link))
|
|
7
8
|
return;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineRule, isNonFetchableLink } from "./util.js";
|
|
2
2
|
export default function RuleNoErrorResponse() {
|
|
3
3
|
return defineRule({
|
|
4
|
+
id: "no-error-response",
|
|
4
5
|
test({ link, response, report, pageSearch }) {
|
|
5
6
|
if (!response.status || response.status.toString().startsWith("2") || response.status.toString().startsWith("3") || isNonFetchableLink(link))
|
|
6
7
|
return;
|
|
@@ -10,10 +11,10 @@ export default function RuleNoErrorResponse() {
|
|
|
10
11
|
message: `Should not respond with status code ${response.status}${response.statusText ? ` (${response.statusText})` : ""}.`
|
|
11
12
|
};
|
|
12
13
|
if (link.startsWith("/") && pageSearch) {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
payload.fix =
|
|
16
|
-
payload.fixDescription = `Did you mean ${
|
|
14
|
+
const related = pageSearch.search(link)?.[0]?.item;
|
|
15
|
+
if (related?.path && related.path !== link) {
|
|
16
|
+
payload.fix = related.path;
|
|
17
|
+
payload.fixDescription = `Did you mean ${related.path}?`;
|
|
17
18
|
}
|
|
18
19
|
} else {
|
|
19
20
|
payload.canRetry = true;
|
|
@@ -3,6 +3,7 @@ import { parseURL } from "ufo";
|
|
|
3
3
|
import { defineRule } from "./util.js";
|
|
4
4
|
export default function RuleTrailingSlash() {
|
|
5
5
|
return defineRule({
|
|
6
|
+
id: "trailing-slash",
|
|
6
7
|
test({ report, link, siteConfig }) {
|
|
7
8
|
if (!link.startsWith("/") && !link.startsWith(siteConfig.url))
|
|
8
9
|
return;
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { FetchResponse } from 'ofetch';
|
|
2
1
|
import type { SiteConfigResolved } from 'site-config-stack';
|
|
3
2
|
import type Fuse from 'fuse.js';
|
|
4
3
|
import type { ComputedRef, Ref } from 'vue';
|
|
5
4
|
import type { ParsedURL } from 'ufo';
|
|
6
5
|
export interface Rule {
|
|
6
|
+
id: string;
|
|
7
7
|
test: (ctx: RuleTestContext) => void;
|
|
8
8
|
}
|
|
9
9
|
export interface RuleTestContext {
|
|
@@ -12,9 +12,12 @@ export interface RuleTestContext {
|
|
|
12
12
|
textContent: string;
|
|
13
13
|
ids: string[];
|
|
14
14
|
fromPath: string;
|
|
15
|
-
response:
|
|
15
|
+
response: any;
|
|
16
16
|
siteConfig: SiteConfigResolved;
|
|
17
|
-
pageSearch?: Fuse<
|
|
17
|
+
pageSearch?: Fuse<{
|
|
18
|
+
path: string;
|
|
19
|
+
title: string;
|
|
20
|
+
}>;
|
|
18
21
|
report: (report: RuleReport) => void;
|
|
19
22
|
skipInspections?: string[];
|
|
20
23
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-link-checker",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"description": "Find and magically fix links that may be negatively effecting your Nuxt sites SEO.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
"build": {
|
|
29
29
|
"externals": [
|
|
30
30
|
"ofetch",
|
|
31
|
-
"std-env"
|
|
31
|
+
"std-env",
|
|
32
|
+
"unstorage",
|
|
33
|
+
"unstorage/drivers/fs"
|
|
32
34
|
]
|
|
33
35
|
},
|
|
34
36
|
"main": "./dist/module.cjs",
|
|
@@ -38,8 +40,8 @@
|
|
|
38
40
|
],
|
|
39
41
|
"dependencies": {
|
|
40
42
|
"@nuxt/devtools-kit": "^1.3.9",
|
|
41
|
-
"@nuxt/kit": "^3.12.
|
|
42
|
-
"@vueuse/core": "^11.0.0-beta.
|
|
43
|
+
"@nuxt/kit": "^3.12.4",
|
|
44
|
+
"@vueuse/core": "^11.0.0-beta.2",
|
|
43
45
|
"chalk": "^5.3.0",
|
|
44
46
|
"cheerio": "1.0.0-rc.12",
|
|
45
47
|
"diff": "^5.2.0",
|
|
@@ -52,35 +54,39 @@
|
|
|
52
54
|
"radix3": "^1.1.2",
|
|
53
55
|
"sirv": "^2.0.4",
|
|
54
56
|
"site-config-stack": "^2.2.15",
|
|
55
|
-
"ufo": "^1.5.
|
|
57
|
+
"ufo": "^1.5.4"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
|
-
"@antfu/eslint-config": "2.
|
|
59
|
-
"@nuxt/content": "^2.13.
|
|
60
|
+
"@antfu/eslint-config": "^2.23.2",
|
|
61
|
+
"@nuxt/content": "^2.13.2",
|
|
60
62
|
"@nuxt/devtools": "^1.3.9",
|
|
61
63
|
"@nuxt/module-builder": "0.8.1",
|
|
62
64
|
"@nuxt/test-utils": "^3.13.1",
|
|
63
|
-
"@nuxt/ui": "^2.
|
|
65
|
+
"@nuxt/ui": "^2.18.1",
|
|
64
66
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
65
|
-
"@nuxtjs/sitemap": "^5.3.
|
|
67
|
+
"@nuxtjs/sitemap": "^5.3.5",
|
|
66
68
|
"@types/diff": "^5.2.1",
|
|
67
69
|
"bumpp": "^9.4.1",
|
|
68
70
|
"eslint": "9.7.0",
|
|
69
71
|
"execa": "^9.3.0",
|
|
70
|
-
"nuxt": "^3.12.
|
|
71
|
-
"vitest": "^2.0.
|
|
72
|
+
"nuxt": "^3.12.4",
|
|
73
|
+
"vitest": "^2.0.4"
|
|
74
|
+
},
|
|
75
|
+
"resolutions": {
|
|
76
|
+
"nuxt-link-checker": "workspace:*"
|
|
72
77
|
},
|
|
73
78
|
"scripts": {
|
|
74
79
|
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build && npm run client:build",
|
|
75
80
|
"client:build": "nuxi generate client",
|
|
76
|
-
"client:dev": "nuxi dev client --port
|
|
81
|
+
"client:dev": "nuxi dev client --port 3030",
|
|
77
82
|
"dev": "npm run play:dev",
|
|
78
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare client",
|
|
83
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare client && nuxi prepare playground",
|
|
79
84
|
"play:dev": "nuxi dev playground",
|
|
80
85
|
"play:prod": "npm run build && nuxi dev playground",
|
|
81
86
|
"release": "pnpm build && bumpp && pnpm -r publish",
|
|
82
87
|
"lint": "eslint . --fix",
|
|
83
88
|
"test": "vitest run",
|
|
89
|
+
"test:types": "npx nuxi typecheck",
|
|
84
90
|
"test:watch": "vitest watch"
|
|
85
91
|
}
|
|
86
92
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=Object.freeze({displayName:"Bicep",fileTypes:[".bicep"],name:"bicep",patterns:[{include:"#expression"},{include:"#comments"}],repository:{"array-literal":{begin:"\\[(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\bfor\\b)",end:"]",name:"meta.array-literal.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"block-comment":{begin:"/\\*",end:"\\*/",name:"comment.block.bicep"},comments:{patterns:[{include:"#line-comment"},{include:"#block-comment"}]},decorator:{begin:"@(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(?=\\b[_$[:alpha:]][_$[:alnum:]]*\\b)",end:"",name:"meta.decorator.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},directive:{begin:"#\\b[_a-zA-Z-0-9]+\\b",end:"$",name:"meta.directive.bicep",patterns:[{include:"#directive-variable"},{include:"#comments"}]},"directive-variable":{match:"\\b[_a-zA-Z-0-9]+\\b",name:"keyword.control.declaration.bicep"},"escape-character":{match:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",name:"constant.character.escape.bicep"},expression:{patterns:[{include:"#string-literal"},{include:"#string-verbatim"},{include:"#numeric-literal"},{include:"#named-literal"},{include:"#object-literal"},{include:"#array-literal"},{include:"#keyword"},{include:"#identifier"},{include:"#function-call"},{include:"#decorator"},{include:"#lambda-start"},{include:"#directive"}]},"function-call":{begin:"(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\(",beginCaptures:{1:{name:"entity.name.function.bicep"}},end:"\\)",name:"meta.function-call.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},identifier:{match:"\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\()",name:"variable.other.readwrite.bicep"},keyword:{match:"\\b(metadata|targetScope|resource|module|param|var|output|for|in|if|existing|import|as|type|with|using|func|assert|provider)\\b",name:"keyword.control.declaration.bicep"},"lambda-start":{begin:"(\\((?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(,(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*)*\\)|\\((?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\)|(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*)(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>)",beginCaptures:{1:{name:"meta.undefined.bicep",patterns:[{include:"#identifier"},{include:"#comments"}]}},end:"(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>",name:"meta.lambda-start.bicep"},"line-comment":{match:"//.*(?=$)",name:"comment.line.double-slash.bicep"},"named-literal":{match:"\\b(true|false|null)\\b",name:"constant.language.bicep"},"numeric-literal":{match:"[0-9]+",name:"constant.numeric.bicep"},"object-literal":{begin:"{",end:"}",name:"meta.object-literal.bicep",patterns:[{include:"#object-property-key"},{include:"#expression"},{include:"#comments"}]},"object-property-key":{match:"\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*:)",name:"variable.other.property.bicep"},"string-literal":{begin:"'(?!'')",end:"'",name:"string.quoted.single.bicep",patterns:[{include:"#escape-character"},{include:"#string-literal-subst"}]},"string-literal-subst":{begin:"(?<!\\\\)(\\${)",beginCaptures:{1:{name:"punctuation.definition.template-expression.begin.bicep"}},end:"(})",endCaptures:{1:{name:"punctuation.definition.template-expression.end.bicep"}},name:"meta.string-literal-subst.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"string-verbatim":{begin:"'''",end:"'''(?!')",name:"string.quoted.multi.bicep",patterns:[]}},scopeName:"source.bicep"});var n=[e];export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.freeze({colors:{"activityBar.activeBackground":"#BD93F910","activityBar.activeBorder":"#FF79C680","activityBar.background":"#343746","activityBar.foreground":"#f6f6f4","activityBar.inactiveForeground":"#7b7f8b","activityBarBadge.background":"#f286c4","activityBarBadge.foreground":"#f6f6f4","badge.background":"#44475A","badge.foreground":"#f6f6f4","breadcrumb.activeSelectionForeground":"#f6f6f4","breadcrumb.background":"#282A36","breadcrumb.focusForeground":"#f6f6f4","breadcrumb.foreground":"#7b7f8b","breadcrumbPicker.background":"#191A21","button.background":"#44475A","button.foreground":"#f6f6f4","button.secondaryBackground":"#282A36","button.secondaryForeground":"#f6f6f4","button.secondaryHoverBackground":"#343746","debugToolBar.background":"#262626","diffEditor.insertedTextBackground":"#50FA7B20","diffEditor.removedTextBackground":"#FF555550","dropdown.background":"#343746","dropdown.border":"#191A21","dropdown.foreground":"#f6f6f4","editor.background":"#282A36","editor.findMatchBackground":"#FFB86C80","editor.findMatchHighlightBackground":"#FFFFFF40","editor.findRangeHighlightBackground":"#44475A75","editor.foldBackground":"#21222C80","editor.foreground":"#f6f6f4","editor.hoverHighlightBackground":"#8BE9FD50","editor.lineHighlightBorder":"#44475A","editor.rangeHighlightBackground":"#BD93F915","editor.selectionBackground":"#44475A","editor.selectionHighlightBackground":"#424450","editor.snippetFinalTabstopHighlightBackground":"#282A36","editor.snippetFinalTabstopHighlightBorder":"#62e884","editor.snippetTabstopHighlightBackground":"#282A36","editor.snippetTabstopHighlightBorder":"#7b7f8b","editor.wordHighlightBackground":"#8BE9FD50","editor.wordHighlightStrongBackground":"#50FA7B50","editorBracketHighlight.foreground1":"#f6f6f4","editorBracketHighlight.foreground2":"#f286c4","editorBracketHighlight.foreground3":"#97e1f1","editorBracketHighlight.foreground4":"#62e884","editorBracketHighlight.foreground5":"#bf9eee","editorBracketHighlight.foreground6":"#FFB86C","editorBracketHighlight.unexpectedBracket.foreground":"#ee6666","editorCodeLens.foreground":"#7b7f8b","editorError.foreground":"#ee6666","editorGroup.border":"#bf9eee","editorGroup.dropBackground":"#44475A70","editorGroupHeader.tabsBackground":"#191A21","editorGutter.addedBackground":"#50FA7B80","editorGutter.deletedBackground":"#FF555580","editorGutter.modifiedBackground":"#8BE9FD80","editorHoverWidget.background":"#282A36","editorHoverWidget.border":"#7b7f8b","editorIndentGuide.activeBackground":"#FFFFFF45","editorIndentGuide.background":"#FFFFFF1A","editorLineNumber.foreground":"#7b7f8b","editorLink.activeForeground":"#97e1f1","editorMarkerNavigation.background":"#262626","editorOverviewRuler.addedForeground":"#50FA7B80","editorOverviewRuler.border":"#191A21","editorOverviewRuler.currentContentForeground":"#62e884","editorOverviewRuler.deletedForeground":"#FF555580","editorOverviewRuler.errorForeground":"#FF555580","editorOverviewRuler.incomingContentForeground":"#bf9eee","editorOverviewRuler.infoForeground":"#8BE9FD80","editorOverviewRuler.modifiedForeground":"#8BE9FD80","editorOverviewRuler.selectionHighlightForeground":"#FFB86C","editorOverviewRuler.warningForeground":"#FFB86C80","editorOverviewRuler.wordHighlightForeground":"#97e1f1","editorOverviewRuler.wordHighlightStrongForeground":"#62e884","editorRuler.foreground":"#FFFFFF1A","editorSuggestWidget.background":"#262626","editorSuggestWidget.foreground":"#f6f6f4","editorSuggestWidget.selectedBackground":"#44475A","editorWarning.foreground":"#97e1f1","editorWhitespace.foreground":"#FFFFFF1A","editorWidget.background":"#262626",errorForeground:"#ee6666","extensionButton.prominentBackground":"#50FA7B90","extensionButton.prominentForeground":"#f6f6f4","extensionButton.prominentHoverBackground":"#50FA7B60",focusBorder:"#7b7f8b",foreground:"#f6f6f4","gitDecoration.conflictingResourceForeground":"#FFB86C","gitDecoration.deletedResourceForeground":"#ee6666","gitDecoration.ignoredResourceForeground":"#7b7f8b","gitDecoration.modifiedResourceForeground":"#97e1f1","gitDecoration.untrackedResourceForeground":"#62e884","inlineChat.regionHighlight":"#343746","input.background":"#282A36","input.border":"#191A21","input.foreground":"#f6f6f4","input.placeholderForeground":"#7b7f8b","inputOption.activeBorder":"#bf9eee","inputValidation.errorBorder":"#ee6666","inputValidation.infoBorder":"#f286c4","inputValidation.warningBorder":"#FFB86C","list.activeSelectionBackground":"#44475A","list.activeSelectionForeground":"#f6f6f4","list.dropBackground":"#44475A","list.errorForeground":"#ee6666","list.focusBackground":"#44475A75","list.highlightForeground":"#97e1f1","list.hoverBackground":"#44475A75","list.inactiveSelectionBackground":"#44475A75","list.warningForeground":"#FFB86C","listFilterWidget.background":"#343746","listFilterWidget.noMatchesOutline":"#ee6666","listFilterWidget.outline":"#424450","merge.currentHeaderBackground":"#50FA7B90","merge.incomingHeaderBackground":"#BD93F990","panel.background":"#282A36","panel.border":"#bf9eee","panelTitle.activeBorder":"#f286c4","panelTitle.activeForeground":"#f6f6f4","panelTitle.inactiveForeground":"#7b7f8b","peekView.border":"#44475A","peekViewEditor.background":"#282A36","peekViewEditor.matchHighlightBackground":"#F1FA8C80","peekViewResult.background":"#262626","peekViewResult.fileForeground":"#f6f6f4","peekViewResult.lineForeground":"#f6f6f4","peekViewResult.matchHighlightBackground":"#F1FA8C80","peekViewResult.selectionBackground":"#44475A","peekViewResult.selectionForeground":"#f6f6f4","peekViewTitle.background":"#191A21","peekViewTitleDescription.foreground":"#7b7f8b","peekViewTitleLabel.foreground":"#f6f6f4","pickerGroup.border":"#bf9eee","pickerGroup.foreground":"#97e1f1","progressBar.background":"#f286c4","selection.background":"#bf9eee","settings.checkboxBackground":"#262626","settings.checkboxBorder":"#191A21","settings.checkboxForeground":"#f6f6f4","settings.dropdownBackground":"#262626","settings.dropdownBorder":"#191A21","settings.dropdownForeground":"#f6f6f4","settings.headerForeground":"#f6f6f4","settings.modifiedItemIndicator":"#FFB86C","settings.numberInputBackground":"#262626","settings.numberInputBorder":"#191A21","settings.numberInputForeground":"#f6f6f4","settings.textInputBackground":"#262626","settings.textInputBorder":"#191A21","settings.textInputForeground":"#f6f6f4","sideBar.background":"#262626","sideBarSectionHeader.background":"#282A36","sideBarSectionHeader.border":"#191A21","sideBarTitle.foreground":"#f6f6f4","statusBar.background":"#191A21","statusBar.debuggingBackground":"#ee6666","statusBar.debuggingForeground":"#191A21","statusBar.foreground":"#f6f6f4","statusBar.noFolderBackground":"#191A21","statusBar.noFolderForeground":"#f6f6f4","statusBarItem.prominentBackground":"#ee6666","statusBarItem.prominentHoverBackground":"#FFB86C","statusBarItem.remoteBackground":"#bf9eee","statusBarItem.remoteForeground":"#282A36","tab.activeBackground":"#282A36","tab.activeBorderTop":"#FF79C680","tab.activeForeground":"#f6f6f4","tab.border":"#191A21","tab.inactiveBackground":"#262626","tab.inactiveForeground":"#7b7f8b","terminal.ansiBlack":"#262626","terminal.ansiBlue":"#bf9eee","terminal.ansiBrightBlack":"#7b7f8b","terminal.ansiBrightBlue":"#d6b4f7","terminal.ansiBrightCyan":"#adf6f6","terminal.ansiBrightGreen":"#78f09a","terminal.ansiBrightMagenta":"#f49dda","terminal.ansiBrightRed":"#f07c7c","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#f6f6ae","terminal.ansiCyan":"#97e1f1","terminal.ansiGreen":"#62e884","terminal.ansiMagenta":"#f286c4","terminal.ansiRed":"#ee6666","terminal.ansiWhite":"#f6f6f4","terminal.ansiYellow":"#e7ee98","terminal.background":"#282A36","terminal.foreground":"#f6f6f4","titleBar.activeBackground":"#262626","titleBar.activeForeground":"#f6f6f4","titleBar.inactiveBackground":"#191A21","titleBar.inactiveForeground":"#7b7f8b","walkThrough.embeddedEditorBackground":"#262626"},displayName:"Dracula Soft",name:"dracula-soft",semanticHighlighting:!0,tokenColors:[{scope:["emphasis"],settings:{fontStyle:"italic"}},{scope:["strong"],settings:{fontStyle:"bold"}},{scope:["header"],settings:{foreground:"#bf9eee"}},{scope:["meta.diff","meta.diff.header"],settings:{foreground:"#7b7f8b"}},{scope:["markup.inserted"],settings:{foreground:"#62e884"}},{scope:["markup.deleted"],settings:{foreground:"#ee6666"}},{scope:["markup.changed"],settings:{foreground:"#FFB86C"}},{scope:["invalid"],settings:{fontStyle:"underline italic",foreground:"#ee6666"}},{scope:["invalid.deprecated"],settings:{fontStyle:"underline italic",foreground:"#f6f6f4"}},{scope:["entity.name.filename"],settings:{foreground:"#e7ee98"}},{scope:["markup.error"],settings:{foreground:"#ee6666"}},{scope:["markup.underline"],settings:{fontStyle:"underline"}},{scope:["markup.bold"],settings:{fontStyle:"bold",foreground:"#FFB86C"}},{scope:["markup.heading"],settings:{fontStyle:"bold",foreground:"#bf9eee"}},{scope:["markup.italic"],settings:{fontStyle:"italic",foreground:"#e7ee98"}},{scope:["beginning.punctuation.definition.list.markdown","beginning.punctuation.definition.quote.markdown","punctuation.definition.link.restructuredtext"],settings:{foreground:"#97e1f1"}},{scope:["markup.inline.raw","markup.raw.restructuredtext"],settings:{foreground:"#62e884"}},{scope:["markup.underline.link","markup.underline.link.image"],settings:{foreground:"#97e1f1"}},{scope:["meta.link.reference.def.restructuredtext","punctuation.definition.directive.restructuredtext","string.other.link.description","string.other.link.title"],settings:{foreground:"#f286c4"}},{scope:["entity.name.directive.restructuredtext","markup.quote"],settings:{fontStyle:"italic",foreground:"#e7ee98"}},{scope:["meta.separator.markdown"],settings:{foreground:"#7b7f8b"}},{scope:["fenced_code.block.language","markup.raw.inner.restructuredtext","markup.fenced_code.block.markdown punctuation.definition.markdown"],settings:{foreground:"#62e884"}},{scope:["punctuation.definition.constant.restructuredtext"],settings:{foreground:"#bf9eee"}},{scope:["markup.heading.markdown punctuation.definition.string.begin","markup.heading.markdown punctuation.definition.string.end"],settings:{foreground:"#bf9eee"}},{scope:["meta.paragraph.markdown punctuation.definition.string.begin","meta.paragraph.markdown punctuation.definition.string.end"],settings:{foreground:"#f6f6f4"}},{scope:["markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.begin","markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.end"],settings:{foreground:"#e7ee98"}},{scope:["entity.name.type.class","entity.name.class"],settings:{fontStyle:"normal",foreground:"#97e1f1"}},{scope:["keyword.expressions-and-types.swift","keyword.other.this","variable.language","variable.language punctuation.definition.variable.php","variable.other.readwrite.instance.ruby","variable.parameter.function.language.special"],settings:{fontStyle:"italic",foreground:"#bf9eee"}},{scope:["entity.other.inherited-class"],settings:{fontStyle:"italic",foreground:"#97e1f1"}},{scope:["comment","punctuation.definition.comment","unused.comment","wildcard.comment"],settings:{foreground:"#7b7f8b"}},{scope:["comment keyword.codetag.notation","comment.block.documentation keyword","comment.block.documentation storage.type.class"],settings:{foreground:"#f286c4"}},{scope:["comment.block.documentation entity.name.type"],settings:{fontStyle:"italic",foreground:"#97e1f1"}},{scope:["comment.block.documentation entity.name.type punctuation.definition.bracket"],settings:{foreground:"#97e1f1"}},{scope:["comment.block.documentation variable"],settings:{fontStyle:"italic",foreground:"#FFB86C"}},{scope:["constant","variable.other.constant"],settings:{foreground:"#bf9eee"}},{scope:["constant.character.escape","constant.character.string.escape","constant.regexp"],settings:{foreground:"#f286c4"}},{scope:["entity.name.tag"],settings:{foreground:"#f286c4"}},{scope:["entity.other.attribute-name.parent-selector"],settings:{foreground:"#f286c4"}},{scope:["entity.other.attribute-name"],settings:{fontStyle:"italic",foreground:"#62e884"}},{scope:["entity.name.function","meta.function-call.object","meta.function-call.php","meta.function-call.static","meta.method-call.java meta.method","meta.method.groovy","support.function.any-method.lua","keyword.operator.function.infix"],settings:{foreground:"#62e884"}},{scope:["entity.name.variable.parameter","meta.at-rule.function variable","meta.at-rule.mixin variable","meta.function.arguments variable.other.php","meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql","variable.parameter"],settings:{fontStyle:"italic",foreground:"#FFB86C"}},{scope:["meta.decorator variable.other.readwrite","meta.decorator variable.other.property"],settings:{fontStyle:"italic",foreground:"#62e884"}},{scope:["meta.decorator variable.other.object"],settings:{foreground:"#62e884"}},{scope:["keyword","punctuation.definition.keyword"],settings:{foreground:"#f286c4"}},{scope:["keyword.control.new","keyword.operator.new"],settings:{fontStyle:"bold"}},{scope:["meta.selector"],settings:{foreground:"#f286c4"}},{scope:["support"],settings:{fontStyle:"italic",foreground:"#97e1f1"}},{scope:["support.function.magic","support.variable","variable.other.predefined"],settings:{fontStyle:"regular",foreground:"#bf9eee"}},{scope:["support.function","support.type.property-name"],settings:{fontStyle:"regular"}},{scope:["constant.other.symbol.hashkey punctuation.definition.constant.ruby","entity.other.attribute-name.placeholder punctuation","entity.other.attribute-name.pseudo-class punctuation","entity.other.attribute-name.pseudo-element punctuation","meta.group.double.toml","meta.group.toml","meta.object-binding-pattern-variable punctuation.destructuring","punctuation.colon.graphql","punctuation.definition.block.scalar.folded.yaml","punctuation.definition.block.scalar.literal.yaml","punctuation.definition.block.sequence.item.yaml","punctuation.definition.entity.other.inherited-class","punctuation.function.swift","punctuation.separator.dictionary.key-value","punctuation.separator.hash","punctuation.separator.inheritance","punctuation.separator.key-value","punctuation.separator.key-value.mapping.yaml","punctuation.separator.namespace","punctuation.separator.pointer-access","punctuation.separator.slice","string.unquoted.heredoc punctuation.definition.string","support.other.chomping-indicator.yaml","punctuation.separator.annotation"],settings:{foreground:"#f286c4"}},{scope:["keyword.operator.other.powershell","keyword.other.statement-separator.powershell","meta.brace.round","meta.function-call punctuation","punctuation.definition.arguments.begin","punctuation.definition.arguments.end","punctuation.definition.entity.begin","punctuation.definition.entity.end","punctuation.definition.tag.cs","punctuation.definition.type.begin","punctuation.definition.type.end","punctuation.section.scope.begin","punctuation.section.scope.end","punctuation.terminator.expression.php","storage.type.generic.java","string.template meta.brace","string.template punctuation.accessor"],settings:{foreground:"#f6f6f4"}},{scope:["meta.string-contents.quoted.double punctuation.definition.variable","punctuation.definition.interpolation.begin","punctuation.definition.interpolation.end","punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded.begin","punctuation.section.embedded.coffee","punctuation.section.embedded.end","punctuation.section.embedded.end source.php","punctuation.section.embedded.end source.ruby","punctuation.definition.variable.makefile"],settings:{foreground:"#f286c4"}},{scope:["entity.name.function.target.makefile","entity.name.section.toml","entity.name.tag.yaml","variable.other.key.toml"],settings:{foreground:"#97e1f1"}},{scope:["constant.other.date","constant.other.timestamp"],settings:{foreground:"#FFB86C"}},{scope:["variable.other.alias.yaml"],settings:{fontStyle:"italic underline",foreground:"#62e884"}},{scope:["storage","meta.implementation storage.type.objc","meta.interface-or-protocol storage.type.objc","source.groovy storage.type.def"],settings:{fontStyle:"regular",foreground:"#f286c4"}},{scope:["entity.name.type","keyword.primitive-datatypes.swift","keyword.type.cs","meta.protocol-list.objc","meta.return-type.objc","source.go storage.type","source.groovy storage.type","source.java storage.type","source.powershell entity.other.attribute-name","storage.class.std.rust","storage.type.attribute.swift","storage.type.c","storage.type.core.rust","storage.type.cs","storage.type.groovy","storage.type.objc","storage.type.php","storage.type.haskell","storage.type.ocaml"],settings:{fontStyle:"italic",foreground:"#97e1f1"}},{scope:["entity.name.type.type-parameter","meta.indexer.mappedtype.declaration entity.name.type","meta.type.parameters entity.name.type"],settings:{foreground:"#FFB86C"}},{scope:["storage.modifier"],settings:{foreground:"#f286c4"}},{scope:["string.regexp","constant.other.character-class.set.regexp","constant.character.escape.backslash.regexp"],settings:{foreground:"#e7ee98"}},{scope:["punctuation.definition.group.capture.regexp"],settings:{foreground:"#f286c4"}},{scope:["string.regexp punctuation.definition.string.begin","string.regexp punctuation.definition.string.end"],settings:{foreground:"#ee6666"}},{scope:["punctuation.definition.character-class.regexp"],settings:{foreground:"#97e1f1"}},{scope:["punctuation.definition.group.regexp"],settings:{foreground:"#FFB86C"}},{scope:["punctuation.definition.group.assertion.regexp","keyword.operator.negation.regexp"],settings:{foreground:"#ee6666"}},{scope:["meta.assertion.look-ahead.regexp"],settings:{foreground:"#62e884"}},{scope:["string"],settings:{foreground:"#e7ee98"}},{scope:["punctuation.definition.string.begin","punctuation.definition.string.end"],settings:{foreground:"#dee492"}},{scope:["punctuation.support.type.property-name.begin","punctuation.support.type.property-name.end"],settings:{foreground:"#97e2f2"}},{scope:["string.quoted.docstring.multi","string.quoted.docstring.multi.python punctuation.definition.string.begin","string.quoted.docstring.multi.python punctuation.definition.string.end","string.quoted.docstring.multi.python constant.character.escape"],settings:{foreground:"#7b7f8b"}},{scope:["variable","constant.other.key.perl","support.variable.property","variable.other.constant.js","variable.other.constant.ts","variable.other.constant.tsx"],settings:{foreground:"#f6f6f4"}},{scope:["meta.import variable.other.readwrite","meta.variable.assignment.destructured.object.coffee variable"],settings:{fontStyle:"italic",foreground:"#FFB86C"}},{scope:["meta.import variable.other.readwrite.alias","meta.export variable.other.readwrite.alias","meta.variable.assignment.destructured.object.coffee variable variable"],settings:{fontStyle:"normal",foreground:"#f6f6f4"}},{scope:["meta.selectionset.graphql variable"],settings:{foreground:"#e7ee98"}},{scope:["meta.selectionset.graphql meta.arguments variable"],settings:{foreground:"#f6f6f4"}},{scope:["entity.name.fragment.graphql","variable.fragment.graphql"],settings:{foreground:"#97e1f1"}},{scope:["constant.other.symbol.hashkey.ruby","keyword.operator.dereference.java","keyword.operator.navigation.groovy","meta.scope.for-loop.shell punctuation.definition.string.begin","meta.scope.for-loop.shell punctuation.definition.string.end","meta.scope.for-loop.shell string","storage.modifier.import","punctuation.section.embedded.begin.tsx","punctuation.section.embedded.end.tsx","punctuation.section.embedded.begin.jsx","punctuation.section.embedded.end.jsx","punctuation.separator.list.comma.css","constant.language.empty-list.haskell"],settings:{foreground:"#f6f6f4"}},{scope:["source.shell variable.other"],settings:{foreground:"#bf9eee"}},{scope:["support.constant"],settings:{fontStyle:"normal",foreground:"#bf9eee"}},{scope:["meta.scope.prerequisites.makefile"],settings:{foreground:"#e7ee98"}},{scope:["meta.attribute-selector.scss"],settings:{foreground:"#e7ee98"}},{scope:["punctuation.definition.attribute-selector.end.bracket.square.scss","punctuation.definition.attribute-selector.begin.bracket.square.scss"],settings:{foreground:"#f6f6f4"}},{scope:["meta.preprocessor.haskell"],settings:{foreground:"#7b7f8b"}},{scope:["log.error"],settings:{fontStyle:"bold",foreground:"#ee6666"}},{scope:["log.warning"],settings:{fontStyle:"bold",foreground:"#e7ee98"}}],type:"dark"});export{e as default};
|