@intlayer/engine 9.5.10 → 9.5.12
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/assets/installSkills/skills/bundle-optimization.md +123 -0
- package/dist/assets/installSkills/skills/compat.md +0 -4
- package/dist/assets/installSkills/skills/content.md +8 -2
- package/dist/assets/installSkills/skills/next-js.md +2 -2
- package/dist/assets/installSkills/skills/usage.md +1 -1
- package/dist/cjs/build.cjs +5 -0
- package/dist/cjs/cli.cjs +1 -0
- package/dist/cjs/docReview/alignBlocks.cjs +53 -36
- package/dist/cjs/docReview/alignBlocks.cjs.map +1 -1
- package/dist/cjs/docReview/rebuildDocument.cjs +3 -1
- package/dist/cjs/docReview/rebuildDocument.cjs.map +1 -1
- package/dist/cjs/docReview/segmentDocument.cjs +8 -5
- package/dist/cjs/docReview/segmentDocument.cjs.map +1 -1
- package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs +4 -1
- package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs.map +1 -1
- package/dist/cjs/init/index.cjs +2 -12
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/backendPackages.cjs +15 -0
- package/dist/cjs/init/utils/backendPackages.cjs.map +1 -0
- package/dist/cjs/init/utils/index.cjs +2 -3
- package/dist/cjs/installMCP/installMCP.cjs +1 -1
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +2 -0
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +9 -8
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +3 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +4 -6
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +1 -1
- package/dist/cjs/loadDictionaries/log.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs +19 -12
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/remoteDictionaryClient.cjs +18 -0
- package/dist/cjs/loadDictionaries/remoteDictionaryClient.cjs.map +1 -0
- package/dist/cjs/prepareIntlayerServer.cjs +132 -0
- package/dist/cjs/prepareIntlayerServer.cjs.map +1 -0
- package/dist/cjs/scan/analyzeBundleContent.cjs +26 -12
- package/dist/cjs/scan/analyzeBundleContent.cjs.map +1 -1
- package/dist/cjs/scan/calculateScore.cjs +4 -1
- package/dist/cjs/scan/calculateScore.cjs.map +1 -1
- package/dist/cjs/scan/checks.cjs +394 -221
- package/dist/cjs/scan/checks.cjs.map +1 -1
- package/dist/cjs/scan/detection/checkDetails.cjs +56 -0
- package/dist/cjs/scan/detection/checkDetails.cjs.map +1 -0
- package/dist/cjs/scan/detection/classifyInternalLinks.cjs +47 -0
- package/dist/cjs/scan/detection/classifyInternalLinks.cjs.map +1 -0
- package/dist/cjs/scan/detection/detectRoutingStrategy.cjs +143 -0
- package/dist/cjs/scan/detection/detectRoutingStrategy.cjs.map +1 -0
- package/dist/cjs/scan/detection/detectTechnologies.cjs +89 -0
- package/dist/cjs/scan/detection/detectTechnologies.cjs.map +1 -0
- package/dist/cjs/scan/detection/index.cjs +36 -0
- package/dist/cjs/scan/detection/localeCode.cjs +118 -0
- package/dist/cjs/scan/detection/localeCode.cjs.map +1 -0
- package/dist/cjs/scan/detection/localizedPages.cjs +48 -0
- package/dist/cjs/scan/detection/localizedPages.cjs.map +1 -0
- package/dist/cjs/scan/detection/technologySignatures.cjs +564 -0
- package/dist/cjs/scan/detection/technologySignatures.cjs.map +1 -0
- package/dist/cjs/scan/detection/url.cjs +53 -0
- package/dist/cjs/scan/detection/url.cjs.map +1 -0
- package/dist/cjs/scan/fetchText.cjs +56 -0
- package/dist/cjs/scan/fetchText.cjs.map +1 -0
- package/dist/cjs/scan/index.cjs +59 -3
- package/dist/cjs/scan/parseHtml.cjs +55 -10
- package/dist/cjs/scan/parseHtml.cjs.map +1 -1
- package/dist/cjs/scan/robots.cjs +65 -0
- package/dist/cjs/scan/robots.cjs.map +1 -0
- package/dist/cjs/scan/runScanChecks.cjs +89 -0
- package/dist/cjs/scan/runScanChecks.cjs.map +1 -0
- package/dist/cjs/scan/scanWebsite.cjs +58 -52
- package/dist/cjs/scan/scanWebsite.cjs.map +1 -1
- package/dist/cjs/scan/sitemap.cjs +109 -0
- package/dist/cjs/scan/sitemap.cjs.map +1 -0
- package/dist/cjs/utils/chunkJSON.cjs +24 -9
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -1
- package/dist/cjs/utils/getChunk.cjs +2 -2
- package/dist/cjs/utils/getChunk.cjs.map +1 -1
- package/dist/cjs/utils/getProcessChainCommands.cjs +117 -0
- package/dist/cjs/utils/getProcessChainCommands.cjs.map +1 -0
- package/dist/cjs/utils/index.cjs +2 -0
- package/dist/cjs/utils/runParallel/index.cjs +1 -1
- package/dist/cjs/utils/runParallel/index.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/pidTree.cjs +23 -11
- package/dist/cjs/utils/runParallel/pidTree.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/ps.cjs +8 -3
- package/dist/cjs/utils/runParallel/ps.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/runTask.cjs +2 -1
- package/dist/cjs/utils/runParallel/runTask.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/wmic.cjs +8 -3
- package/dist/cjs/utils/runParallel/wmic.cjs.map +1 -1
- package/dist/cjs/utils/startContentWatcher.cjs +99 -0
- package/dist/cjs/utils/startContentWatcher.cjs.map +1 -0
- package/dist/cjs/watcher.cjs +2 -2
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +7 -4
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +2 -2
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -1
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -1
- package/dist/esm/build.mjs +2 -1
- package/dist/esm/cli.mjs +2 -2
- package/dist/esm/docReview/alignBlocks.mjs +53 -36
- package/dist/esm/docReview/alignBlocks.mjs.map +1 -1
- package/dist/esm/docReview/rebuildDocument.mjs +3 -1
- package/dist/esm/docReview/rebuildDocument.mjs.map +1 -1
- package/dist/esm/docReview/segmentDocument.mjs +8 -5
- package/dist/esm/docReview/segmentDocument.mjs.map +1 -1
- package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs +4 -1
- package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs.map +1 -1
- package/dist/esm/init/index.mjs +1 -11
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/backendPackages.mjs +14 -0
- package/dist/esm/init/utils/backendPackages.mjs.map +1 -0
- package/dist/esm/init/utils/index.mjs +2 -2
- package/dist/esm/installMCP/installMCP.mjs +1 -1
- package/dist/esm/installMCP/installMCP.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +2 -0
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +9 -8
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +3 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +3 -5
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/log.mjs +1 -1
- package/dist/esm/loadDictionaries/log.mjs.map +1 -1
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs +19 -12
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs.map +1 -1
- package/dist/esm/loadDictionaries/remoteDictionaryClient.mjs +16 -0
- package/dist/esm/loadDictionaries/remoteDictionaryClient.mjs.map +1 -0
- package/dist/esm/prepareIntlayerServer.mjs +128 -0
- package/dist/esm/prepareIntlayerServer.mjs.map +1 -0
- package/dist/esm/scan/analyzeBundleContent.mjs +26 -12
- package/dist/esm/scan/analyzeBundleContent.mjs.map +1 -1
- package/dist/esm/scan/calculateScore.mjs +4 -1
- package/dist/esm/scan/calculateScore.mjs.map +1 -1
- package/dist/esm/scan/checks.mjs +387 -220
- package/dist/esm/scan/checks.mjs.map +1 -1
- package/dist/esm/scan/detection/checkDetails.mjs +54 -0
- package/dist/esm/scan/detection/checkDetails.mjs.map +1 -0
- package/dist/esm/scan/detection/classifyInternalLinks.mjs +46 -0
- package/dist/esm/scan/detection/classifyInternalLinks.mjs.map +1 -0
- package/dist/esm/scan/detection/detectRoutingStrategy.mjs +141 -0
- package/dist/esm/scan/detection/detectRoutingStrategy.mjs.map +1 -0
- package/dist/esm/scan/detection/detectTechnologies.mjs +87 -0
- package/dist/esm/scan/detection/detectTechnologies.mjs.map +1 -0
- package/dist/esm/scan/detection/index.mjs +10 -0
- package/dist/esm/scan/detection/localeCode.mjs +108 -0
- package/dist/esm/scan/detection/localeCode.mjs.map +1 -0
- package/dist/esm/scan/detection/localizedPages.mjs +46 -0
- package/dist/esm/scan/detection/localizedPages.mjs.map +1 -0
- package/dist/esm/scan/detection/technologySignatures.mjs +563 -0
- package/dist/esm/scan/detection/technologySignatures.mjs.map +1 -0
- package/dist/esm/scan/detection/url.mjs +47 -0
- package/dist/esm/scan/detection/url.mjs.map +1 -0
- package/dist/esm/scan/fetchText.mjs +55 -0
- package/dist/esm/scan/fetchText.mjs.map +1 -0
- package/dist/esm/scan/index.mjs +15 -3
- package/dist/esm/scan/parseHtml.mjs +52 -11
- package/dist/esm/scan/parseHtml.mjs.map +1 -1
- package/dist/esm/scan/robots.mjs +63 -0
- package/dist/esm/scan/robots.mjs.map +1 -0
- package/dist/esm/scan/runScanChecks.mjs +88 -0
- package/dist/esm/scan/runScanChecks.mjs.map +1 -0
- package/dist/esm/scan/scanWebsite.mjs +59 -53
- package/dist/esm/scan/scanWebsite.mjs.map +1 -1
- package/dist/esm/scan/sitemap.mjs +105 -0
- package/dist/esm/scan/sitemap.mjs.map +1 -0
- package/dist/esm/utils/chunkJSON.mjs +24 -9
- package/dist/esm/utils/chunkJSON.mjs.map +1 -1
- package/dist/esm/utils/getChunk.mjs +2 -2
- package/dist/esm/utils/getChunk.mjs.map +1 -1
- package/dist/esm/utils/getProcessChainCommands.mjs +115 -0
- package/dist/esm/utils/getProcessChainCommands.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +2 -1
- package/dist/esm/utils/runParallel/index.mjs +1 -1
- package/dist/esm/utils/runParallel/index.mjs.map +1 -1
- package/dist/esm/utils/runParallel/pidTree.mjs +23 -11
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -1
- package/dist/esm/utils/runParallel/ps.mjs +8 -3
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -1
- package/dist/esm/utils/runParallel/runTask.mjs +2 -1
- package/dist/esm/utils/runParallel/runTask.mjs.map +1 -1
- package/dist/esm/utils/runParallel/wmic.mjs +8 -3
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -1
- package/dist/esm/utils/startContentWatcher.mjs +98 -0
- package/dist/esm/utils/startContentWatcher.mjs.map +1 -0
- package/dist/esm/watcher.mjs +1 -1
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +7 -4
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +2 -2
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -1
- package/dist/esm/writeJsonIfChanged.mjs +1 -1
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -1
- package/dist/types/build.d.ts +2 -1
- package/dist/types/cli.d.ts +2 -2
- package/dist/types/docReview/rebuildDocument.d.ts.map +1 -1
- package/dist/types/docReview/segmentDocument.d.ts.map +1 -1
- package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts.map +1 -1
- package/dist/types/init/index.d.ts +1 -1
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/backendPackages.d.ts +5 -0
- package/dist/types/init/utils/backendPackages.d.ts.map +1 -0
- package/dist/types/init/utils/index.d.ts +2 -2
- package/dist/types/installSkills/index.d.ts +1 -0
- package/dist/types/installSkills/index.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts.map +1 -1
- package/dist/types/loadDictionaries/remoteDictionaryClient.d.ts +14 -0
- package/dist/types/loadDictionaries/remoteDictionaryClient.d.ts.map +1 -0
- package/dist/types/prepareIntlayerServer.d.ts +67 -0
- package/dist/types/prepareIntlayerServer.d.ts.map +1 -0
- package/dist/types/scan/analyzeBundleContent.d.ts.map +1 -1
- package/dist/types/scan/calculateScore.d.ts +4 -1
- package/dist/types/scan/calculateScore.d.ts.map +1 -1
- package/dist/types/scan/checks.d.ts +114 -21
- package/dist/types/scan/checks.d.ts.map +1 -1
- package/dist/types/scan/detection/checkDetails.d.ts +29 -0
- package/dist/types/scan/detection/checkDetails.d.ts.map +1 -0
- package/dist/types/scan/detection/classifyInternalLinks.d.ts +44 -0
- package/dist/types/scan/detection/classifyInternalLinks.d.ts.map +1 -0
- package/dist/types/scan/detection/detectRoutingStrategy.d.ts +60 -0
- package/dist/types/scan/detection/detectRoutingStrategy.d.ts.map +1 -0
- package/dist/types/scan/detection/detectTechnologies.d.ts +60 -0
- package/dist/types/scan/detection/detectTechnologies.d.ts.map +1 -0
- package/dist/types/scan/detection/index.d.ts +9 -0
- package/dist/types/scan/detection/localeCode.d.ts +49 -0
- package/dist/types/scan/detection/localeCode.d.ts.map +1 -0
- package/dist/types/scan/detection/localizedPages.d.ts +40 -0
- package/dist/types/scan/detection/localizedPages.d.ts.map +1 -0
- package/dist/types/scan/detection/technologySignatures.d.ts +48 -0
- package/dist/types/scan/detection/technologySignatures.d.ts.map +1 -0
- package/dist/types/scan/detection/url.d.ts +27 -0
- package/dist/types/scan/detection/url.d.ts.map +1 -0
- package/dist/types/scan/fetchText.d.ts +30 -0
- package/dist/types/scan/fetchText.d.ts.map +1 -0
- package/dist/types/scan/index.d.ts +16 -4
- package/dist/types/scan/parseHtml.d.ts +17 -0
- package/dist/types/scan/parseHtml.d.ts.map +1 -1
- package/dist/types/scan/robots.d.ts +23 -0
- package/dist/types/scan/robots.d.ts.map +1 -0
- package/dist/types/scan/runScanChecks.d.ts +43 -0
- package/dist/types/scan/runScanChecks.d.ts.map +1 -0
- package/dist/types/scan/scanWebsite.d.ts.map +1 -1
- package/dist/types/scan/sitemap.d.ts +49 -0
- package/dist/types/scan/sitemap.d.ts.map +1 -0
- package/dist/types/scan/types.d.ts +15 -0
- package/dist/types/scan/types.d.ts.map +1 -1
- package/dist/types/utils/chunkJSON.d.ts.map +1 -1
- package/dist/types/utils/getProcessChainCommands.d.ts +35 -0
- package/dist/types/utils/getProcessChainCommands.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/runParallel/pidTree.d.ts.map +1 -1
- package/dist/types/utils/startContentWatcher.d.ts +40 -0
- package/dist/types/utils/startContentWatcher.d.ts.map +1 -0
- package/dist/types/watcher.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -1
- package/package.json +15 -7
- package/dist/cjs/init/utils/devScript.cjs +0 -57
- package/dist/cjs/init/utils/devScript.cjs.map +0 -1
- package/dist/esm/init/utils/devScript.mjs +0 -55
- package/dist/esm/init/utils/devScript.mjs.map +0 -1
- package/dist/types/init/utils/devScript.d.ts +0 -48
- package/dist/types/init/utils/devScript.d.ts.map +0 -1
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
//#region src/scan/detection/technologySignatures.ts
|
|
2
|
+
/**
|
|
3
|
+
* Any string-literal quote. Minifiers such as rolldown / oxc emit template
|
|
4
|
+
* literals (`` `i18next:` ``), so bundle patterns must accept backticks too.
|
|
5
|
+
*/
|
|
6
|
+
const QUOTE = `["'\`]`;
|
|
7
|
+
/** Build a bundle pattern where every `<Q>` placeholder stands for {@link QUOTE}. */
|
|
8
|
+
const quoted = (source, flags) => new RegExp(source.replaceAll("<Q>", QUOTE), flags);
|
|
9
|
+
/** Rendering frameworks and site builders. */
|
|
10
|
+
const frameworkSignatures = [
|
|
11
|
+
{
|
|
12
|
+
id: "nextjs",
|
|
13
|
+
name: "Next.js",
|
|
14
|
+
category: "framework",
|
|
15
|
+
html: [/<script[^>]+id=["']__NEXT_DATA__["']/, /self\.__next_f\b/],
|
|
16
|
+
resourceUrls: [/\/_next\/static\//],
|
|
17
|
+
globals: ["__NEXT_DATA__", "__next_f"],
|
|
18
|
+
versionGlobal: "next.version"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "nuxt",
|
|
22
|
+
name: "Nuxt",
|
|
23
|
+
category: "framework",
|
|
24
|
+
html: [/window\.__NUXT__|id=["']__nuxt["']|data-nuxt-/],
|
|
25
|
+
resourceUrls: [/\/_nuxt\//],
|
|
26
|
+
globals: ["__NUXT__", "useNuxtApp"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "gatsby",
|
|
30
|
+
name: "Gatsby",
|
|
31
|
+
category: "framework",
|
|
32
|
+
html: [/id=["']___gatsby["']/],
|
|
33
|
+
globals: ["___gatsby"]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "remix",
|
|
37
|
+
name: "Remix",
|
|
38
|
+
category: "framework",
|
|
39
|
+
html: [/window\.__remixContext\b/],
|
|
40
|
+
globals: ["__remixContext"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "react-router",
|
|
44
|
+
name: "React Router",
|
|
45
|
+
category: "framework",
|
|
46
|
+
html: [/window\.__reactRouterContext\b/],
|
|
47
|
+
globals: ["__reactRouterContext"]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "tanstack-start",
|
|
51
|
+
name: "TanStack Start",
|
|
52
|
+
category: "framework",
|
|
53
|
+
html: [/\$_TSR\b|__TSR_ROUTER__/],
|
|
54
|
+
globals: ["$_TSR", "__TSR_ROUTER__"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "tanstack-router",
|
|
58
|
+
name: "TanStack Router",
|
|
59
|
+
category: "framework",
|
|
60
|
+
bundle: [/tsr-scroll-restoration/],
|
|
61
|
+
hiddenBy: ["tanstack-start"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "astro",
|
|
65
|
+
name: "Astro",
|
|
66
|
+
category: "framework",
|
|
67
|
+
html: [/<meta[^>]+name=["']generator["'][^>]+content=["']Astro v?([\d.]+)/i, /<astro-(?:island|slot)\b/]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "sveltekit",
|
|
71
|
+
name: "SvelteKit",
|
|
72
|
+
category: "framework",
|
|
73
|
+
html: [/data-sveltekit-|__sveltekit_/],
|
|
74
|
+
resourceUrls: [/\/_app\/immutable\//]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "svelte",
|
|
78
|
+
name: "Svelte",
|
|
79
|
+
category: "framework",
|
|
80
|
+
bundle: [/https:\/\/svelte\.dev\/e\//],
|
|
81
|
+
hiddenBy: ["sveltekit"]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "angular",
|
|
85
|
+
name: "Angular",
|
|
86
|
+
category: "framework",
|
|
87
|
+
html: [/ng-version=["']([\d.]+)/]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "vue",
|
|
91
|
+
name: "Vue.js",
|
|
92
|
+
category: "framework",
|
|
93
|
+
html: [/data-v-app\b/],
|
|
94
|
+
bundle: [/\b__v_isRef\b/],
|
|
95
|
+
globals: ["__VUE__"],
|
|
96
|
+
hiddenBy: ["nuxt"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "solid",
|
|
100
|
+
name: "SolidJS",
|
|
101
|
+
category: "framework",
|
|
102
|
+
html: [/_\$HY\b/],
|
|
103
|
+
bundle: [/\b_\$HY\.done\b/],
|
|
104
|
+
globals: ["_$HY"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "qwik",
|
|
108
|
+
name: "Qwik",
|
|
109
|
+
category: "framework",
|
|
110
|
+
html: [/q:container=/]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "react",
|
|
114
|
+
name: "React",
|
|
115
|
+
category: "framework",
|
|
116
|
+
bundle: [quoted(String.raw`Symbol\.for\(<Q>react\.(?:transitional\.element|forward_ref)<Q>\)`)],
|
|
117
|
+
domMarkers: ["react-fiber"],
|
|
118
|
+
hiddenBy: [
|
|
119
|
+
"nextjs",
|
|
120
|
+
"gatsby",
|
|
121
|
+
"remix",
|
|
122
|
+
"react-router",
|
|
123
|
+
"tanstack-start",
|
|
124
|
+
"tanstack-router"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "wordpress",
|
|
129
|
+
name: "WordPress",
|
|
130
|
+
category: "cms",
|
|
131
|
+
html: [/<meta[^>]+name=["']generator["'][^>]+content=["']WordPress ?([\d.]+)?/i],
|
|
132
|
+
resourceUrls: [/\/wp-(?:content|includes)\//]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "shopify",
|
|
136
|
+
name: "Shopify",
|
|
137
|
+
category: "cms",
|
|
138
|
+
resourceUrls: [/cdn\.shopify\.com\//],
|
|
139
|
+
globals: ["Shopify"]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "webflow",
|
|
143
|
+
name: "Webflow",
|
|
144
|
+
category: "cms",
|
|
145
|
+
html: [/data-wf-page=/]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "wix",
|
|
149
|
+
name: "Wix",
|
|
150
|
+
category: "cms",
|
|
151
|
+
resourceUrls: [/static\.parastorage\.com\/|static\.wixstatic\.com\//]
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
/**
|
|
155
|
+
* Code-level i18n libraries. Bundle patterns target string literals kept by
|
|
156
|
+
* minifiers in production builds (error codes, symbols, cookie names).
|
|
157
|
+
*/
|
|
158
|
+
const i18nLibrarySignatures = [
|
|
159
|
+
{
|
|
160
|
+
id: "intlayer",
|
|
161
|
+
name: "Intlayer",
|
|
162
|
+
category: "i18n-library",
|
|
163
|
+
resourceUrls: [/\/intlayer-(?:shared|index|client)-[\w-]+\.m?js/],
|
|
164
|
+
bundle: [/INTLAYER_(?:NODE_TYPE_|EDITOR_ENABLED|ROUTING_)|intlayer-node-plugin|intlayerQualifierTypes/],
|
|
165
|
+
storageKeys: ["INTLAYER_LOCALE"]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: "next-intl",
|
|
169
|
+
name: "next-intl",
|
|
170
|
+
category: "i18n-library",
|
|
171
|
+
bundle: [quoted("X-NEXT-INTL-LOCALE|<Q>ENVIRONMENT_FALLBACK<Q>", "i")],
|
|
172
|
+
requires: ["nextjs"]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "use-intl",
|
|
176
|
+
name: "use-intl",
|
|
177
|
+
category: "i18n-library",
|
|
178
|
+
bundle: [quoted("<Q>ENVIRONMENT_FALLBACK<Q>")],
|
|
179
|
+
hiddenBy: ["next-intl"]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: "next-i18next",
|
|
183
|
+
name: "next-i18next",
|
|
184
|
+
category: "i18n-library",
|
|
185
|
+
html: [/"_nextI18Next"\s*:/]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "react-i18next",
|
|
189
|
+
name: "react-i18next",
|
|
190
|
+
category: "i18n-library",
|
|
191
|
+
bundle: [/NO_I18NEXT_INSTANCE|USE_T_BEFORE_READY/],
|
|
192
|
+
hiddenBy: ["next-i18next"]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: "i18next",
|
|
196
|
+
name: "i18next",
|
|
197
|
+
category: "i18n-library",
|
|
198
|
+
bundle: [quoted("<Q>backendConnector<Q>|<Q>i18next:<Q>")],
|
|
199
|
+
globals: ["i18next"],
|
|
200
|
+
storageKeys: ["i18nextLng", "i18next"],
|
|
201
|
+
versionGlobal: "i18next.version",
|
|
202
|
+
hiddenBy: ["next-i18next", "react-i18next"]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "react-intl",
|
|
206
|
+
name: "react-intl (FormatJS)",
|
|
207
|
+
category: "i18n-library",
|
|
208
|
+
bundle: [quoted(String.raw`\[React Intl\]|<Q>UNSUPPORTED_FORMATTER<Q>`)]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: "nuxt-i18n",
|
|
212
|
+
name: "@nuxtjs/i18n",
|
|
213
|
+
category: "i18n-library",
|
|
214
|
+
bundle: [/__NUXT_I18N_|nuxt-i18n-slp/],
|
|
215
|
+
storageKeys: ["i18n_redirected"]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: "vue-i18n",
|
|
219
|
+
name: "vue-i18n",
|
|
220
|
+
category: "i18n-library",
|
|
221
|
+
bundle: [/__VUE_I18N_SYMBOL__|intlify-message-/],
|
|
222
|
+
globals: ["__INTLIFY__", "__VUE_I18N__"],
|
|
223
|
+
hiddenBy: ["nuxt-i18n"]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "lingui",
|
|
227
|
+
name: "Lingui",
|
|
228
|
+
category: "i18n-library",
|
|
229
|
+
bundle: [/Lingui: Attempted to call a translation function/]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: "svelte-i18n",
|
|
233
|
+
name: "svelte-i18n",
|
|
234
|
+
category: "i18n-library",
|
|
235
|
+
bundle: [/\[svelte-i18n\]/]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "paraglide",
|
|
239
|
+
name: "Paraglide JS",
|
|
240
|
+
category: "i18n-library",
|
|
241
|
+
bundle: [/PARAGLIDE_LOCALE/],
|
|
242
|
+
storageKeys: ["PARAGLIDE_LOCALE"]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: "ngx-translate",
|
|
246
|
+
name: "ngx-translate",
|
|
247
|
+
category: "i18n-library",
|
|
248
|
+
bundle: [/ngx-translate\/core: /]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "transloco",
|
|
252
|
+
name: "Transloco",
|
|
253
|
+
category: "i18n-library",
|
|
254
|
+
bundle: [/\bTRANSLOCO_[A-Z_]+/]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "angular-localize",
|
|
258
|
+
name: "Angular @angular/localize",
|
|
259
|
+
category: "i18n-library",
|
|
260
|
+
globals: ["$localize"]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "next-translate",
|
|
264
|
+
name: "next-translate",
|
|
265
|
+
category: "i18n-library",
|
|
266
|
+
html: [/"__namespaces"\s*:/],
|
|
267
|
+
bundle: [/\b__NEXT_TRANSLATE__\b/],
|
|
268
|
+
globals: ["__NEXT_TRANSLATE__"]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "next-international",
|
|
272
|
+
name: "next-international",
|
|
273
|
+
category: "i18n-library",
|
|
274
|
+
bundle: [/\bI18nProviderClient\b/],
|
|
275
|
+
requires: ["nextjs"]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: "gt-next",
|
|
279
|
+
name: "gt-next (General Translation)",
|
|
280
|
+
category: "i18n-library",
|
|
281
|
+
bundle: [/\bgt-next\b/],
|
|
282
|
+
requires: ["nextjs"]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
id: "gt-react",
|
|
286
|
+
name: "gt-react (General Translation)",
|
|
287
|
+
category: "i18n-library",
|
|
288
|
+
bundle: [/__generaltranslation|generaltranslation\/react-core|\bgt-react\b/],
|
|
289
|
+
hiddenBy: ["gt-next"]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "lingo-dev",
|
|
293
|
+
name: "Lingo.dev",
|
|
294
|
+
category: "i18n-library",
|
|
295
|
+
bundle: [/__LINGO_DEV_(?:STATE|UPDATE)__|\bLINGO_DEBUG\b/],
|
|
296
|
+
globals: ["__LINGO_DEV_STATE__"]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: "wuchale",
|
|
300
|
+
name: "wuchale",
|
|
301
|
+
category: "i18n-library",
|
|
302
|
+
bundle: [/i18n-404:tag/]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "fluent-vue",
|
|
306
|
+
name: "fluent-vue",
|
|
307
|
+
category: "i18n-library",
|
|
308
|
+
bundle: [/\[fluent-vue\]/]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "fluent",
|
|
312
|
+
name: "Fluent (Project Fluent)",
|
|
313
|
+
category: "i18n-library",
|
|
314
|
+
bundle: [quoted("ReferenceError\\(<Q>Unknown term: ")],
|
|
315
|
+
hiddenBy: ["fluent-vue"]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: "solid-primitives-i18n",
|
|
319
|
+
name: "@solid-primitives/i18n",
|
|
320
|
+
category: "i18n-library",
|
|
321
|
+
bundle: [quoted(String.raw`RegExp\(<Q>\{\{\\\\s\*\$\{\w+\}\\\\s\*\}\}<Q>`)]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: "next-locale",
|
|
325
|
+
name: "Next.js i18n routing",
|
|
326
|
+
category: "i18n-library",
|
|
327
|
+
storageKeys: ["NEXT_LOCALE"],
|
|
328
|
+
requires: ["nextjs"],
|
|
329
|
+
hiddenBy: [
|
|
330
|
+
"intlayer",
|
|
331
|
+
"next-intl",
|
|
332
|
+
"next-i18next",
|
|
333
|
+
"next-translate"
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
id: "polylang",
|
|
338
|
+
name: "Polylang",
|
|
339
|
+
category: "i18n-library",
|
|
340
|
+
html: [/\blang-item-\d+\b/],
|
|
341
|
+
resourceUrls: [/\/wp-content\/plugins\/polylang/],
|
|
342
|
+
storageKeys: ["pll_language"]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: "wpml",
|
|
346
|
+
name: "WPML",
|
|
347
|
+
category: "i18n-library",
|
|
348
|
+
html: [/<meta[^>]+name=["']generator["'][^>]+content=["']WPML ver:([\d.]+)/i, /\bwpml-ls(?:-item|-statics|-legacy)?\b/],
|
|
349
|
+
resourceUrls: [/\/wp-content\/plugins\/sitepress-multilingual-cms/],
|
|
350
|
+
storageKeys: ["wp-wpml_current_language", "_icl_current_language"]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: "translatepress",
|
|
354
|
+
name: "TranslatePress",
|
|
355
|
+
category: "i18n-library",
|
|
356
|
+
html: [/\btrp-language-switcher\b|\bdata-trp-/],
|
|
357
|
+
resourceUrls: [/\/wp-content\/plugins\/translatepress-multilingual/]
|
|
358
|
+
}
|
|
359
|
+
];
|
|
360
|
+
/** Translation management systems (in-context editors and OTA delivery). */
|
|
361
|
+
const tmsSignatures = [
|
|
362
|
+
{
|
|
363
|
+
id: "intlayer-cms",
|
|
364
|
+
name: "Intlayer CMS",
|
|
365
|
+
category: "tms",
|
|
366
|
+
resourceUrls: [/\/\/back\.intlayer\.org\//],
|
|
367
|
+
bundle: [quoted(String.raw`back\.intlayer\.org<Q>,\s*<Q>?port<Q>?:\s*[\w.]+,\s*<Q>?enabled<Q>?:\s*(?:!0|true)`)],
|
|
368
|
+
requires: ["intlayer"]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: "crowdin",
|
|
372
|
+
name: "Crowdin",
|
|
373
|
+
category: "tms",
|
|
374
|
+
resourceUrls: [/(?:^|\.|\/\/)crowdin\.(?:com|net)\//],
|
|
375
|
+
html: [/\b_jipt\s*(?:=\s*\[|\.push\()/],
|
|
376
|
+
bundle: [/distributions\.crowdin\.net|cdn\.crowdin\.com/],
|
|
377
|
+
globals: ["_jipt"]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: "phrase",
|
|
381
|
+
name: "Phrase",
|
|
382
|
+
category: "tms",
|
|
383
|
+
html: [/\bPHRASEAPP_CONFIG\s*=/],
|
|
384
|
+
resourceUrls: [/(?:^|\.|\/\/)(?:phrase|phraseapp)\.com\//],
|
|
385
|
+
bundle: [/ota\.(?:eu|us)\.phrase\.com|PHRASEAPP_CONFIG|phraseapp\.com/],
|
|
386
|
+
globals: ["PHRASEAPP_CONFIG", "phraseApp"]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: "lokalise",
|
|
390
|
+
name: "Lokalise",
|
|
391
|
+
category: "tms",
|
|
392
|
+
html: [/\bLOKALISE_CONFIG\s*=/],
|
|
393
|
+
resourceUrls: [/(?:^|\.|\/\/)lokalise\.(?:com|co)\//],
|
|
394
|
+
bundle: [/ota\.lokalise\.com|app\.lokalise\.com|LOKALISE_CONFIG/],
|
|
395
|
+
globals: ["LOKALISE_CONFIG"]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: "locize",
|
|
399
|
+
name: "locize",
|
|
400
|
+
category: "tms",
|
|
401
|
+
html: [/\blocizer\.init\(/],
|
|
402
|
+
resourceUrls: [/(?:^|\.|\/\/)locize\.(?:app|io|com)\//],
|
|
403
|
+
bundle: [/api\.(?:lite\.)?locize\.(?:app|io)/]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: "transifex",
|
|
407
|
+
name: "Transifex",
|
|
408
|
+
category: "tms",
|
|
409
|
+
html: [/\bliveSettings\s*=\s*\{/],
|
|
410
|
+
resourceUrls: [/(?:^|\.|\/\/)transifex\.(?:com|net)\//],
|
|
411
|
+
bundle: [/cds\.svc\.transifex\.net/],
|
|
412
|
+
globals: ["Transifex", "liveSettings"]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "tolgee",
|
|
416
|
+
name: "Tolgee",
|
|
417
|
+
category: "tms",
|
|
418
|
+
resourceUrls: [/(?:^|\.|\/\/)(?:tolgee\.io|tolg\.ee)\//],
|
|
419
|
+
bundle: [/app\.tolgee\.io|@tolgee\//]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
id: "localazy",
|
|
423
|
+
name: "Localazy",
|
|
424
|
+
category: "tms",
|
|
425
|
+
resourceUrls: [/(?:^|\.|\/\/)localazy\.com\//],
|
|
426
|
+
bundle: [/delivery\.localazy\.com/]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
id: "simplelocalize",
|
|
430
|
+
name: "SimpleLocalize",
|
|
431
|
+
category: "tms",
|
|
432
|
+
resourceUrls: [/(?:^|\.|\/\/)simplelocalize\.io\//],
|
|
433
|
+
bundle: [/cdn\.simplelocalize\.io/]
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: "localizely",
|
|
437
|
+
name: "Localizely",
|
|
438
|
+
category: "tms",
|
|
439
|
+
resourceUrls: [/(?:^|\.|\/\/)localizely\.com\//],
|
|
440
|
+
bundle: [/api\.localizely\.com/]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: "smartling",
|
|
444
|
+
name: "Smartling",
|
|
445
|
+
category: "tms",
|
|
446
|
+
resourceUrls: [/(?:^|\.|\/\/)smartling\.com\//],
|
|
447
|
+
bundle: [/api\.smartling\.com/]
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
id: "poeditor",
|
|
451
|
+
name: "POEditor",
|
|
452
|
+
category: "tms",
|
|
453
|
+
resourceUrls: [/(?:^|\.|\/\/)poeditor\.com\//],
|
|
454
|
+
bundle: [/api\.poeditor\.com/]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: "weblate",
|
|
458
|
+
name: "Weblate",
|
|
459
|
+
category: "tms",
|
|
460
|
+
resourceUrls: [/hosted\.weblate\.org\//],
|
|
461
|
+
bundle: [/hosted\.weblate\.org/]
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
id: "lingohub",
|
|
465
|
+
name: "Lingohub",
|
|
466
|
+
category: "tms",
|
|
467
|
+
resourceUrls: [/(?:^|\.|\/\/)lingohub\.com\//],
|
|
468
|
+
bundle: [/api\.lingohub\.com/]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
id: "loco",
|
|
472
|
+
name: "Loco",
|
|
473
|
+
category: "tms",
|
|
474
|
+
resourceUrls: [/(?:^|\.|\/\/)localise\.biz\//],
|
|
475
|
+
bundle: [/localise\.biz\/api/]
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
id: "gridly",
|
|
479
|
+
name: "Gridly",
|
|
480
|
+
category: "tms",
|
|
481
|
+
resourceUrls: [/(?:^|\.|\/\/)gridly\.com\//],
|
|
482
|
+
bundle: [/cdn\.gridly\.com|api\.gridly\.com/]
|
|
483
|
+
}
|
|
484
|
+
];
|
|
485
|
+
/** Hosted website translation layers (proxy or JS overlay). */
|
|
486
|
+
const translationProxySignatures = [
|
|
487
|
+
{
|
|
488
|
+
id: "weglot",
|
|
489
|
+
name: "Weglot",
|
|
490
|
+
category: "translation-proxy",
|
|
491
|
+
html: [/\bWeglot\.initialize\(|\bdata-wg-notranslate\b/],
|
|
492
|
+
resourceUrls: [/cdn\.weglot\.(?:com|us)\//],
|
|
493
|
+
globals: ["Weglot"]
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
id: "localizejs",
|
|
497
|
+
name: "Localize",
|
|
498
|
+
category: "translation-proxy",
|
|
499
|
+
html: [/\bLocalize\.initialize\(/],
|
|
500
|
+
resourceUrls: [/global\.localizecdn\.com\/|cdn\.localizejs\.com\//],
|
|
501
|
+
globals: ["Localize"]
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
id: "gtranslate",
|
|
505
|
+
name: "GTranslate",
|
|
506
|
+
category: "translation-proxy",
|
|
507
|
+
html: [/\bgtranslateSettings\s*=|\bgtranslate_wrapper\b/],
|
|
508
|
+
resourceUrls: [/cdn\.gtranslate\.net\//],
|
|
509
|
+
globals: ["gtranslateSettings"]
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
id: "google-translate",
|
|
513
|
+
name: "Google Translate widget",
|
|
514
|
+
category: "translation-proxy",
|
|
515
|
+
html: [/\bgoogleTranslateElementInit\b|\bgoogle\.translate\.TranslateElement\(/],
|
|
516
|
+
resourceUrls: [/translate\.google\.com\/translate_a\/element\.js/],
|
|
517
|
+
globals: ["googleTranslateElementInit"]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
id: "conveythis",
|
|
521
|
+
name: "ConveyThis",
|
|
522
|
+
category: "translation-proxy",
|
|
523
|
+
html: [/\bConveyThis_Initializer\.init\(/],
|
|
524
|
+
resourceUrls: [/cdn\.conveythis\.com\//]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
id: "bablic",
|
|
528
|
+
name: "Bablic",
|
|
529
|
+
category: "translation-proxy",
|
|
530
|
+
resourceUrls: [/(?:^|\.|\/\/)bablic\.com\//],
|
|
531
|
+
globals: ["bablic"]
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
id: "linguise",
|
|
535
|
+
name: "Linguise",
|
|
536
|
+
category: "translation-proxy",
|
|
537
|
+
html: [/\blinguise_configs\b/],
|
|
538
|
+
resourceUrls: [/(?:^|\.|\/\/)linguise\.com\//]
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
id: "onelink",
|
|
542
|
+
name: "OneLink (TransPerfect)",
|
|
543
|
+
category: "translation-proxy",
|
|
544
|
+
resourceUrls: [/(?:^|\.|\/\/)onelink(?:js|-edge)?\.com\//]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: "motionpoint",
|
|
548
|
+
name: "MotionPoint",
|
|
549
|
+
category: "translation-proxy",
|
|
550
|
+
resourceUrls: [/(?:^|\.|\/\/)motionpoint\.(?:com|net)\//]
|
|
551
|
+
}
|
|
552
|
+
];
|
|
553
|
+
/** Every known technology fingerprint, in display order. */
|
|
554
|
+
const technologySignatures = [
|
|
555
|
+
...frameworkSignatures,
|
|
556
|
+
...i18nLibrarySignatures,
|
|
557
|
+
...tmsSignatures,
|
|
558
|
+
...translationProxySignatures
|
|
559
|
+
];
|
|
560
|
+
|
|
561
|
+
//#endregion
|
|
562
|
+
export { technologySignatures };
|
|
563
|
+
//# sourceMappingURL=technologySignatures.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"technologySignatures.mjs","names":[],"sources":["../../../../src/scan/detection/technologySignatures.ts"],"sourcesContent":["/**\n * Category of a technology detected on a scanned page.\n *\n * - `framework`: rendering framework (Next.js, Nuxt, Angular…)\n * - `i18n-library`: code-level i18n library (Intlayer, i18next, vue-i18n…)\n * - `tms`: translation management system (Crowdin, Phrase, Lokalise…)\n * - `translation-proxy`: hosted website translation layer (Weglot, Localize…)\n * - `cms`: content management system / site builder\n */\nexport type TechnologyCategory =\n | 'framework'\n | 'i18n-library'\n | 'tms'\n | 'translation-proxy'\n | 'cms';\n\n/**\n * Fingerprint of a technology. Every signal is optional; a technology is\n * detected as soon as one of them matches. Regexes with a first capture group\n * provide the detected version.\n */\nexport type TechnologySignature = {\n /** Stable identifier, e.g. `nextjs`, `crowdin`. */\n id: string;\n /** Human-readable name. */\n name: string;\n category: TechnologyCategory;\n /** Matched against script / stylesheet / iframe / request URLs. */\n resourceUrls?: RegExp[];\n /** Matched against the HTML document, inline scripts included. */\n html?: RegExp[];\n /** Matched against the content of same-origin JavaScript chunks. */\n bundle?: RegExp[];\n /** Window globals, only available when inspecting a live page. */\n globals?: string[];\n /** Cookie / localStorage / sessionStorage keys (case-insensitive). */\n storageKeys?: string[];\n /**\n * Markers only a live DOM exposes, reported by the collector (e.g.\n * `react-fiber` for the `__reactFiber$…` keys React sets on elements).\n */\n domMarkers?: string[];\n /** Dotted window path holding the version, e.g. `next.version`. */\n versionGlobal?: string;\n /** Only reported when every one of these ids is detected too. */\n requires?: string[];\n /** Hidden when any of these ids is detected (e.g. Vue under Nuxt). */\n hiddenBy?: string[];\n};\n\n/**\n * Any string-literal quote. Minifiers such as rolldown / oxc emit template\n * literals (`` `i18next:` ``), so bundle patterns must accept backticks too.\n */\nconst QUOTE = `[\"'\\`]`;\n\n/** Build a bundle pattern where every `<Q>` placeholder stands for {@link QUOTE}. */\nconst quoted = (source: string, flags?: string): RegExp =>\n new RegExp(source.replaceAll('<Q>', QUOTE), flags);\n\n/** Rendering frameworks and site builders. */\nconst frameworkSignatures: TechnologySignature[] = [\n {\n id: 'nextjs',\n name: 'Next.js',\n category: 'framework',\n html: [/<script[^>]+id=[\"']__NEXT_DATA__[\"']/, /self\\.__next_f\\b/],\n resourceUrls: [/\\/_next\\/static\\//],\n globals: ['__NEXT_DATA__', '__next_f'],\n versionGlobal: 'next.version',\n },\n {\n id: 'nuxt',\n name: 'Nuxt',\n category: 'framework',\n html: [/window\\.__NUXT__|id=[\"']__nuxt[\"']|data-nuxt-/],\n resourceUrls: [/\\/_nuxt\\//],\n globals: ['__NUXT__', 'useNuxtApp'],\n },\n {\n id: 'gatsby',\n name: 'Gatsby',\n category: 'framework',\n html: [/id=[\"']___gatsby[\"']/],\n globals: ['___gatsby'],\n },\n {\n id: 'remix',\n name: 'Remix',\n category: 'framework',\n html: [/window\\.__remixContext\\b/],\n globals: ['__remixContext'],\n },\n {\n id: 'react-router',\n name: 'React Router',\n category: 'framework',\n html: [/window\\.__reactRouterContext\\b/],\n globals: ['__reactRouterContext'],\n },\n {\n id: 'tanstack-start',\n name: 'TanStack Start',\n category: 'framework',\n html: [/\\$_TSR\\b|__TSR_ROUTER__/],\n globals: ['$_TSR', '__TSR_ROUTER__'],\n },\n {\n id: 'tanstack-router',\n name: 'TanStack Router',\n category: 'framework',\n bundle: [/tsr-scroll-restoration/],\n hiddenBy: ['tanstack-start'],\n },\n {\n id: 'astro',\n name: 'Astro',\n category: 'framework',\n html: [\n /<meta[^>]+name=[\"']generator[\"'][^>]+content=[\"']Astro v?([\\d.]+)/i,\n /<astro-(?:island|slot)\\b/,\n ],\n },\n {\n id: 'sveltekit',\n name: 'SvelteKit',\n category: 'framework',\n html: [/data-sveltekit-|__sveltekit_/],\n resourceUrls: [/\\/_app\\/immutable\\//],\n },\n {\n id: 'svelte',\n name: 'Svelte',\n category: 'framework',\n bundle: [/https:\\/\\/svelte\\.dev\\/e\\//],\n hiddenBy: ['sveltekit'],\n },\n {\n id: 'angular',\n name: 'Angular',\n category: 'framework',\n html: [/ng-version=[\"']([\\d.]+)/],\n },\n {\n id: 'vue',\n name: 'Vue.js',\n category: 'framework',\n html: [/data-v-app\\b/],\n bundle: [/\\b__v_isRef\\b/],\n globals: ['__VUE__'],\n hiddenBy: ['nuxt'],\n },\n {\n id: 'solid',\n name: 'SolidJS',\n category: 'framework',\n html: [/_\\$HY\\b/],\n bundle: [/\\b_\\$HY\\.done\\b/],\n globals: ['_$HY'],\n },\n {\n id: 'qwik',\n name: 'Qwik',\n category: 'framework',\n html: [/q:container=/],\n },\n {\n // `react.element` alone also appears in deepmerge's isReactElement.\n id: 'react',\n name: 'React',\n category: 'framework',\n bundle: [\n quoted(\n String.raw`Symbol\\.for\\(<Q>react\\.(?:transitional\\.element|forward_ref)<Q>\\)`\n ),\n ],\n domMarkers: ['react-fiber'],\n hiddenBy: [\n 'nextjs',\n 'gatsby',\n 'remix',\n 'react-router',\n 'tanstack-start',\n 'tanstack-router',\n ],\n },\n {\n id: 'wordpress',\n name: 'WordPress',\n category: 'cms',\n html: [\n /<meta[^>]+name=[\"']generator[\"'][^>]+content=[\"']WordPress ?([\\d.]+)?/i,\n ],\n resourceUrls: [/\\/wp-(?:content|includes)\\//],\n },\n {\n id: 'shopify',\n name: 'Shopify',\n category: 'cms',\n resourceUrls: [/cdn\\.shopify\\.com\\//],\n globals: ['Shopify'],\n },\n {\n id: 'webflow',\n name: 'Webflow',\n category: 'cms',\n html: [/data-wf-page=/],\n },\n {\n id: 'wix',\n name: 'Wix',\n category: 'cms',\n resourceUrls: [/static\\.parastorage\\.com\\/|static\\.wixstatic\\.com\\//],\n },\n];\n\n/**\n * Code-level i18n libraries. Bundle patterns target string literals kept by\n * minifiers in production builds (error codes, symbols, cookie names).\n */\nconst i18nLibrarySignatures: TechnologySignature[] = [\n {\n id: 'intlayer',\n name: 'Intlayer',\n category: 'i18n-library',\n resourceUrls: [/\\/intlayer-(?:shared|index|client)-[\\w-]+\\.m?js/],\n bundle: [\n /INTLAYER_(?:NODE_TYPE_|EDITOR_ENABLED|ROUTING_)|intlayer-node-plugin|intlayerQualifierTypes/,\n ],\n storageKeys: ['INTLAYER_LOCALE'],\n },\n {\n id: 'next-intl',\n name: 'next-intl',\n category: 'i18n-library',\n bundle: [quoted('X-NEXT-INTL-LOCALE|<Q>ENVIRONMENT_FALLBACK<Q>', 'i')],\n requires: ['nextjs'],\n },\n {\n id: 'use-intl',\n name: 'use-intl',\n category: 'i18n-library',\n bundle: [quoted('<Q>ENVIRONMENT_FALLBACK<Q>')],\n hiddenBy: ['next-intl'],\n },\n {\n id: 'next-i18next',\n name: 'next-i18next',\n category: 'i18n-library',\n html: [/\"_nextI18Next\"\\s*:/],\n },\n {\n id: 'react-i18next',\n name: 'react-i18next',\n category: 'i18n-library',\n bundle: [/NO_I18NEXT_INSTANCE|USE_T_BEFORE_READY/],\n hiddenBy: ['next-i18next'],\n },\n {\n id: 'i18next',\n name: 'i18next',\n category: 'i18n-library',\n bundle: [quoted('<Q>backendConnector<Q>|<Q>i18next:<Q>')],\n globals: ['i18next'],\n storageKeys: ['i18nextLng', 'i18next'],\n versionGlobal: 'i18next.version',\n hiddenBy: ['next-i18next', 'react-i18next'],\n },\n {\n id: 'react-intl',\n name: 'react-intl (FormatJS)',\n category: 'i18n-library',\n bundle: [quoted(String.raw`\\[React Intl\\]|<Q>UNSUPPORTED_FORMATTER<Q>`)],\n },\n {\n id: 'nuxt-i18n',\n name: '@nuxtjs/i18n',\n category: 'i18n-library',\n bundle: [/__NUXT_I18N_|nuxt-i18n-slp/],\n storageKeys: ['i18n_redirected'],\n },\n {\n id: 'vue-i18n',\n name: 'vue-i18n',\n category: 'i18n-library',\n bundle: [/__VUE_I18N_SYMBOL__|intlify-message-/],\n globals: ['__INTLIFY__', '__VUE_I18N__'],\n hiddenBy: ['nuxt-i18n'],\n },\n {\n id: 'lingui',\n name: 'Lingui',\n category: 'i18n-library',\n bundle: [/Lingui: Attempted to call a translation function/],\n },\n {\n id: 'svelte-i18n',\n name: 'svelte-i18n',\n category: 'i18n-library',\n bundle: [/\\[svelte-i18n\\]/],\n },\n {\n id: 'paraglide',\n name: 'Paraglide JS',\n category: 'i18n-library',\n bundle: [/PARAGLIDE_LOCALE/],\n storageKeys: ['PARAGLIDE_LOCALE'],\n },\n {\n id: 'ngx-translate',\n name: 'ngx-translate',\n category: 'i18n-library',\n bundle: [/ngx-translate\\/core: /],\n },\n {\n id: 'transloco',\n name: 'Transloco',\n category: 'i18n-library',\n bundle: [/\\bTRANSLOCO_[A-Z_]+/],\n },\n {\n id: 'angular-localize',\n name: 'Angular @angular/localize',\n category: 'i18n-library',\n globals: ['$localize'],\n },\n {\n id: 'next-translate',\n name: 'next-translate',\n category: 'i18n-library',\n html: [/\"__namespaces\"\\s*:/],\n bundle: [/\\b__NEXT_TRANSLATE__\\b/],\n globals: ['__NEXT_TRANSLATE__'],\n },\n {\n id: 'next-international',\n name: 'next-international',\n category: 'i18n-library',\n bundle: [/\\bI18nProviderClient\\b/],\n requires: ['nextjs'],\n },\n {\n id: 'gt-next',\n name: 'gt-next (General Translation)',\n category: 'i18n-library',\n bundle: [/\\bgt-next\\b/],\n requires: ['nextjs'],\n },\n {\n id: 'gt-react',\n name: 'gt-react (General Translation)',\n category: 'i18n-library',\n bundle: [\n /__generaltranslation|generaltranslation\\/react-core|\\bgt-react\\b/,\n ],\n hiddenBy: ['gt-next'],\n },\n {\n id: 'lingo-dev',\n name: 'Lingo.dev',\n category: 'i18n-library',\n bundle: [/__LINGO_DEV_(?:STATE|UPDATE)__|\\bLINGO_DEBUG\\b/],\n globals: ['__LINGO_DEV_STATE__'],\n },\n {\n id: 'wuchale',\n name: 'wuchale',\n category: 'i18n-library',\n bundle: [/i18n-404:tag/],\n },\n {\n id: 'fluent-vue',\n name: 'fluent-vue',\n category: 'i18n-library',\n bundle: [/\\[fluent-vue\\]/],\n },\n {\n id: 'fluent',\n name: 'Fluent (Project Fluent)',\n category: 'i18n-library',\n bundle: [quoted('ReferenceError\\\\(<Q>Unknown term: ')],\n hiddenBy: ['fluent-vue'],\n },\n {\n id: 'solid-primitives-i18n',\n name: '@solid-primitives/i18n',\n category: 'i18n-library',\n bundle: [quoted(String.raw`RegExp\\(<Q>\\{\\{\\\\\\\\s\\*\\$\\{\\w+\\}\\\\\\\\s\\*\\}\\}<Q>`)],\n },\n {\n id: 'next-locale',\n name: 'Next.js i18n routing',\n category: 'i18n-library',\n storageKeys: ['NEXT_LOCALE'],\n requires: ['nextjs'],\n hiddenBy: ['intlayer', 'next-intl', 'next-i18next', 'next-translate'],\n },\n {\n id: 'polylang',\n name: 'Polylang',\n category: 'i18n-library',\n // Language switcher items: `lang-item lang-item-2 lang-item-fr`.\n html: [/\\blang-item-\\d+\\b/],\n resourceUrls: [/\\/wp-content\\/plugins\\/polylang/],\n storageKeys: ['pll_language'],\n },\n {\n id: 'wpml',\n name: 'WPML',\n category: 'i18n-library',\n html: [\n /<meta[^>]+name=[\"']generator[\"'][^>]+content=[\"']WPML ver:([\\d.]+)/i,\n /\\bwpml-ls(?:-item|-statics|-legacy)?\\b/,\n ],\n resourceUrls: [/\\/wp-content\\/plugins\\/sitepress-multilingual-cms/],\n storageKeys: ['wp-wpml_current_language', '_icl_current_language'],\n },\n {\n id: 'translatepress',\n name: 'TranslatePress',\n category: 'i18n-library',\n html: [/\\btrp-language-switcher\\b|\\bdata-trp-/],\n resourceUrls: [/\\/wp-content\\/plugins\\/translatepress-multilingual/],\n },\n];\n\n/** Translation management systems (in-context editors and OTA delivery). */\nconst tmsSignatures: TechnologySignature[] = [\n {\n id: 'intlayer-cms',\n name: 'Intlayer CMS',\n category: 'tms',\n resourceUrls: [/\\/\\/back\\.intlayer\\.org\\//],\n // The editor config always embeds the backend URL: require it enabled.\n bundle: [\n quoted(\n String.raw`back\\.intlayer\\.org<Q>,\\s*<Q>?port<Q>?:\\s*[\\w.]+,\\s*<Q>?enabled<Q>?:\\s*(?:!0|true)`\n ),\n ],\n requires: ['intlayer'],\n },\n {\n id: 'crowdin',\n name: 'Crowdin',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)crowdin\\.(?:com|net)\\//],\n // In-context (JIPT) snippet: `var _jipt = []; _jipt.push(['project', …])`.\n html: [/\\b_jipt\\s*(?:=\\s*\\[|\\.push\\()/],\n bundle: [/distributions\\.crowdin\\.net|cdn\\.crowdin\\.com/],\n globals: ['_jipt'],\n },\n {\n id: 'phrase',\n name: 'Phrase',\n category: 'tms',\n html: [/\\bPHRASEAPP_CONFIG\\s*=/],\n resourceUrls: [/(?:^|\\.|\\/\\/)(?:phrase|phraseapp)\\.com\\//],\n bundle: [/ota\\.(?:eu|us)\\.phrase\\.com|PHRASEAPP_CONFIG|phraseapp\\.com/],\n globals: ['PHRASEAPP_CONFIG', 'phraseApp'],\n },\n {\n id: 'lokalise',\n name: 'Lokalise',\n category: 'tms',\n html: [/\\bLOKALISE_CONFIG\\s*=/],\n resourceUrls: [/(?:^|\\.|\\/\\/)lokalise\\.(?:com|co)\\//],\n bundle: [/ota\\.lokalise\\.com|app\\.lokalise\\.com|LOKALISE_CONFIG/],\n globals: ['LOKALISE_CONFIG'],\n },\n {\n id: 'locize',\n name: 'locize',\n category: 'tms',\n html: [/\\blocizer\\.init\\(/],\n resourceUrls: [/(?:^|\\.|\\/\\/)locize\\.(?:app|io|com)\\//],\n bundle: [/api\\.(?:lite\\.)?locize\\.(?:app|io)/],\n },\n {\n id: 'transifex',\n name: 'Transifex',\n category: 'tms',\n // Transifex Live snippet: `window.liveSettings = { api_key: … }`.\n html: [/\\bliveSettings\\s*=\\s*\\{/],\n resourceUrls: [/(?:^|\\.|\\/\\/)transifex\\.(?:com|net)\\//],\n bundle: [/cds\\.svc\\.transifex\\.net/],\n globals: ['Transifex', 'liveSettings'],\n },\n {\n id: 'tolgee',\n name: 'Tolgee',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)(?:tolgee\\.io|tolg\\.ee)\\//],\n bundle: [/app\\.tolgee\\.io|@tolgee\\//],\n },\n {\n id: 'localazy',\n name: 'Localazy',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)localazy\\.com\\//],\n bundle: [/delivery\\.localazy\\.com/],\n },\n {\n id: 'simplelocalize',\n name: 'SimpleLocalize',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)simplelocalize\\.io\\//],\n bundle: [/cdn\\.simplelocalize\\.io/],\n },\n {\n id: 'localizely',\n name: 'Localizely',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)localizely\\.com\\//],\n bundle: [/api\\.localizely\\.com/],\n },\n {\n id: 'smartling',\n name: 'Smartling',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)smartling\\.com\\//],\n bundle: [/api\\.smartling\\.com/],\n },\n {\n id: 'poeditor',\n name: 'POEditor',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)poeditor\\.com\\//],\n bundle: [/api\\.poeditor\\.com/],\n },\n {\n id: 'weblate',\n name: 'Weblate',\n category: 'tms',\n resourceUrls: [/hosted\\.weblate\\.org\\//],\n bundle: [/hosted\\.weblate\\.org/],\n },\n {\n id: 'lingohub',\n name: 'Lingohub',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)lingohub\\.com\\//],\n bundle: [/api\\.lingohub\\.com/],\n },\n {\n id: 'loco',\n name: 'Loco',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)localise\\.biz\\//],\n bundle: [/localise\\.biz\\/api/],\n },\n {\n id: 'gridly',\n name: 'Gridly',\n category: 'tms',\n resourceUrls: [/(?:^|\\.|\\/\\/)gridly\\.com\\//],\n bundle: [/cdn\\.gridly\\.com|api\\.gridly\\.com/],\n },\n];\n\n/** Hosted website translation layers (proxy or JS overlay). */\nconst translationProxySignatures: TechnologySignature[] = [\n {\n id: 'weglot',\n name: 'Weglot',\n category: 'translation-proxy',\n html: [/\\bWeglot\\.initialize\\(|\\bdata-wg-notranslate\\b/],\n resourceUrls: [/cdn\\.weglot\\.(?:com|us)\\//],\n globals: ['Weglot'],\n },\n {\n id: 'localizejs',\n name: 'Localize',\n category: 'translation-proxy',\n html: [/\\bLocalize\\.initialize\\(/],\n resourceUrls: [/global\\.localizecdn\\.com\\/|cdn\\.localizejs\\.com\\//],\n globals: ['Localize'],\n },\n {\n id: 'gtranslate',\n name: 'GTranslate',\n category: 'translation-proxy',\n html: [/\\bgtranslateSettings\\s*=|\\bgtranslate_wrapper\\b/],\n resourceUrls: [/cdn\\.gtranslate\\.net\\//],\n globals: ['gtranslateSettings'],\n },\n {\n id: 'google-translate',\n name: 'Google Translate widget',\n category: 'translation-proxy',\n html: [\n /\\bgoogleTranslateElementInit\\b|\\bgoogle\\.translate\\.TranslateElement\\(/,\n ],\n resourceUrls: [/translate\\.google\\.com\\/translate_a\\/element\\.js/],\n globals: ['googleTranslateElementInit'],\n },\n {\n id: 'conveythis',\n name: 'ConveyThis',\n category: 'translation-proxy',\n html: [/\\bConveyThis_Initializer\\.init\\(/],\n resourceUrls: [/cdn\\.conveythis\\.com\\//],\n },\n {\n id: 'bablic',\n name: 'Bablic',\n category: 'translation-proxy',\n resourceUrls: [/(?:^|\\.|\\/\\/)bablic\\.com\\//],\n globals: ['bablic'],\n },\n {\n id: 'linguise',\n name: 'Linguise',\n category: 'translation-proxy',\n html: [/\\blinguise_configs\\b/],\n resourceUrls: [/(?:^|\\.|\\/\\/)linguise\\.com\\//],\n },\n {\n id: 'onelink',\n name: 'OneLink (TransPerfect)',\n category: 'translation-proxy',\n resourceUrls: [/(?:^|\\.|\\/\\/)onelink(?:js|-edge)?\\.com\\//],\n },\n {\n id: 'motionpoint',\n name: 'MotionPoint',\n category: 'translation-proxy',\n resourceUrls: [/(?:^|\\.|\\/\\/)motionpoint\\.(?:com|net)\\//],\n },\n];\n\n/** Every known technology fingerprint, in display order. */\nexport const technologySignatures: readonly TechnologySignature[] = [\n ...frameworkSignatures,\n ...i18nLibrarySignatures,\n ...tmsSignatures,\n ...translationProxySignatures,\n];\n"],"mappings":";;;;;AAsDA,MAAM,QAAQ;;AAGd,MAAM,UAAU,QAAgB,UAC9B,IAAI,OAAO,OAAO,WAAW,OAAO,KAAK,GAAG,KAAK;;AAGnD,MAAM,sBAA6C;CACjD;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,wCAAwC,kBAAkB;EACjE,cAAc,CAAC,mBAAmB;EAClC,SAAS,CAAC,iBAAiB,UAAU;EACrC,eAAe;CACjB;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,+CAA+C;EACtD,cAAc,CAAC,WAAW;EAC1B,SAAS,CAAC,YAAY,YAAY;CACpC;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,sBAAsB;EAC7B,SAAS,CAAC,WAAW;CACvB;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,0BAA0B;EACjC,SAAS,CAAC,gBAAgB;CAC5B;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,gCAAgC;EACvC,SAAS,CAAC,sBAAsB;CAClC;CACA;EACE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gD;EACvD,cAAc,CAAC,2BAA2B;EAC1C,SAAS,CAAC,QAAQ;CACpB;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,0BAA0B;EACjC,cAAc,CAAC,mDAAmD;EAClE,SAAS,CAAC,UAAU;CACtB;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,iDAAiD;EACxD,cAAc,CAAC,wBAAwB;EACvC,SAAS,CAAC,oBAAoB;CAChC;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CACJ,wEACF;EACA,cAAc,CAAC,kDAAkD;EACjE,SAAS,CAAC,4BAA4B;CACxC;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,kCAAkC;EACzC,cAAc,CAAC,wBAAwB;CACzC;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,cAAc,CAAC,4BAA4B;EAC3C,SAAS,CAAC,QAAQ;CACpB;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,MAAM,CAAC,sBAAsB;EAC7B,cAAc,CAAC,8BAA8B;CAC/C;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,cAAc,CAAC,0CAA0C;CAC3D;CACA;EACE,IAAI;EACJ,MAAM;EACN,UAAU;EACV,cAAc,CAAC,yCAAyC;CAC1D;AACF;;AAGA,MAAa,uBAAuD;CAClE,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/scan/detection/url.ts
|
|
2
|
+
/** URL helpers shared by the scan checks (browser-safe). */
|
|
3
|
+
/** Parse a possibly relative URL, returning `undefined` when it is invalid. */
|
|
4
|
+
const parseUrl = (url, baseUrl) => {
|
|
5
|
+
try {
|
|
6
|
+
return new URL(url, baseUrl);
|
|
7
|
+
} catch {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
/** Strip a leading `www.` so `www.example.com` and `example.com` compare equal. */
|
|
12
|
+
const normalizeHostname = (hostname) => hostname.toLowerCase().replace(/^www\./, "");
|
|
13
|
+
/**
|
|
14
|
+
* Canonical comparable form of a URL: no hash, no trailing slash (except the
|
|
15
|
+
* root), `www.` stripped. Returns the input unchanged when it cannot be parsed.
|
|
16
|
+
*/
|
|
17
|
+
const normalizeUrl = (url, baseUrl) => {
|
|
18
|
+
const parsedUrl = parseUrl(url, baseUrl);
|
|
19
|
+
if (!parsedUrl) return url;
|
|
20
|
+
const pathname = parsedUrl.pathname.length > 1 ? parsedUrl.pathname.replace(/\/+$/, "") : parsedUrl.pathname;
|
|
21
|
+
return `${parsedUrl.protocol}//${normalizeHostname(parsedUrl.host)}${pathname}${parsedUrl.search}`;
|
|
22
|
+
};
|
|
23
|
+
/** First non-empty segment of a URL path (`/fr/about` → `fr`). */
|
|
24
|
+
const getFirstPathSegment = (pathname) => pathname.split("/").find(Boolean);
|
|
25
|
+
/**
|
|
26
|
+
* Whether the URL is fully qualified (`https://host/…`), as hreflang requires.
|
|
27
|
+
* Relative (`/fr`), protocol-relative (`//host/fr`) and non-HTTP URLs are not.
|
|
28
|
+
*/
|
|
29
|
+
const isAbsoluteUrl = (url) => /^https?:\/\/[^/\s?#]+/i.test(url.trim());
|
|
30
|
+
/**
|
|
31
|
+
* Approximate registrable domain of a hostname (`gtm.crowdin.com` →
|
|
32
|
+
* `crowdin.com`, `www.airbnb.co.uk` → `airbnb.co.uk`), without a public
|
|
33
|
+
* suffix list: a short second-level label under a country code is treated as
|
|
34
|
+
* part of the suffix.
|
|
35
|
+
*/
|
|
36
|
+
const getSiteDomain = (hostname) => {
|
|
37
|
+
const labels = normalizeHostname(hostname).split(".");
|
|
38
|
+
if (labels.length <= 2) return labels.join(".");
|
|
39
|
+
const topLevelLabel = labels[labels.length - 1] ?? "";
|
|
40
|
+
const secondLevelLabel = labels[labels.length - 2] ?? "";
|
|
41
|
+
const isCompoundSuffix = topLevelLabel.length === 2 && secondLevelLabel.length <= 3;
|
|
42
|
+
return labels.slice(isCompoundSuffix ? -3 : -2).join(".");
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { getFirstPathSegment, getSiteDomain, isAbsoluteUrl, normalizeHostname, normalizeUrl, parseUrl };
|
|
47
|
+
//# sourceMappingURL=url.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.mjs","names":[],"sources":["../../../../src/scan/detection/url.ts"],"sourcesContent":["/** URL helpers shared by the scan checks (browser-safe). */\n\n/** Parse a possibly relative URL, returning `undefined` when it is invalid. */\nexport const parseUrl = (url: string, baseUrl?: string): URL | undefined => {\n try {\n return new URL(url, baseUrl);\n } catch {\n return undefined;\n }\n};\n\n/** Strip a leading `www.` so `www.example.com` and `example.com` compare equal. */\nexport const normalizeHostname = (hostname: string): string =>\n hostname.toLowerCase().replace(/^www\\./, '');\n\n/**\n * Canonical comparable form of a URL: no hash, no trailing slash (except the\n * root), `www.` stripped. Returns the input unchanged when it cannot be parsed.\n */\nexport const normalizeUrl = (url: string, baseUrl?: string): string => {\n const parsedUrl = parseUrl(url, baseUrl);\n if (!parsedUrl) return url;\n\n const pathname =\n parsedUrl.pathname.length > 1\n ? parsedUrl.pathname.replace(/\\/+$/, '')\n : parsedUrl.pathname;\n\n return `${parsedUrl.protocol}//${normalizeHostname(parsedUrl.host)}${pathname}${parsedUrl.search}`;\n};\n\n/** First non-empty segment of a URL path (`/fr/about` → `fr`). */\nexport const getFirstPathSegment = (pathname: string): string | undefined =>\n pathname.split('/').find(Boolean);\n\n/**\n * Whether the URL is fully qualified (`https://host/…`), as hreflang requires.\n * Relative (`/fr`), protocol-relative (`//host/fr`) and non-HTTP URLs are not.\n */\nexport const isAbsoluteUrl = (url: string): boolean =>\n /^https?:\\/\\/[^/\\s?#]+/i.test(url.trim());\n\n/**\n * Approximate registrable domain of a hostname (`gtm.crowdin.com` →\n * `crowdin.com`, `www.airbnb.co.uk` → `airbnb.co.uk`), without a public\n * suffix list: a short second-level label under a country code is treated as\n * part of the suffix.\n */\nexport const getSiteDomain = (hostname: string): string => {\n const labels = normalizeHostname(hostname).split('.');\n if (labels.length <= 2) return labels.join('.');\n const topLevelLabel = labels[labels.length - 1] ?? '';\n const secondLevelLabel = labels[labels.length - 2] ?? '';\n const isCompoundSuffix =\n topLevelLabel.length === 2 && secondLevelLabel.length <= 3;\n return labels.slice(isCompoundSuffix ? -3 : -2).join('.');\n};\n"],"mappings":";;;AAGA,MAAa,YAAY,KAAa,YAAsC;CAC1E,IAAI;EACF,OAAO,IAAI,IAAI,KAAK,OAAO;CAC7B,QAAQ;EACN;CACF;AACF;;AAGA,MAAa,qBAAqB,aAChC,SAAS,YAAY,CAAC,CAAC,QAAQ,UAAU,EAAE;;;;;AAM7C,MAAa,gBAAgB,KAAa,YAA6B;CACrE,MAAM,YAAY,SAAS,KAAK,OAAO;CACvC,IAAI,CAAC,WAAW,OAAO;CAEvB,MAAM,WACJ,UAAU,SAAS,SAAS,IACxB,UAAU,SAAS,QAAQ,QAAQ,EAAE,IACrC,UAAU;CAEhB,OAAO,GAAG,UAAU,SAAS,IAAI,kBAAkB,UAAU,IAAI,IAAI,WAAW,UAAU;AAC5F;;AAGA,MAAa,uBAAuB,aAClC,SAAS,MAAM,GAAG,CAAC,CAAC,KAAK,OAAO;;;;;AAMlC,MAAa,iBAAiB,QAC5B,yBAAyB,KAAK,IAAI,KAAK,CAAC;;;;;;;AAQ1C,MAAa,iBAAiB,aAA6B;CACzD,MAAM,SAAS,kBAAkB,QAAQ,CAAC,CAAC,MAAM,GAAG;CACpD,IAAI,OAAO,UAAU,GAAG,OAAO,OAAO,KAAK,GAAG;CAC9C,MAAM,gBAAgB,OAAO,OAAO,SAAS,MAAM;CACnD,MAAM,mBAAmB,OAAO,OAAO,SAAS,MAAM;CACtD,MAAM,mBACJ,cAAc,WAAW,KAAK,iBAAiB,UAAU;CAC3D,OAAO,OAAO,MAAM,mBAAmB,KAAK,EAAE,CAAC,CAAC,KAAK,GAAG;AAC1D"}
|