@nuxt/scripts 1.0.0-beta.26 → 1.0.0-beta.27
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 +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{DjhmCJlE.js → CwXQ1Eqw.js} +3 -3
- package/dist/client/_nuxt/{TJ5JFHov.js → JXDRhrZp.js} +1 -1
- package/dist/client/_nuxt/{C-7nRtzO.js → KCxg59bo.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/d0d06e27-af53-4f1a-b7ae-18727423b3ed.json +1 -0
- package/dist/client/_nuxt/{D5k4eN9O.js → viP3Pc9X.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +38 -8
- package/dist/registry.mjs +2 -2
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +4 -2
- package/dist/runtime/server/gravatar-proxy.d.ts +1 -1
- package/dist/runtime/server/gravatar-proxy.js +0 -1
- package/dist/stats.d.mts +82 -11
- package/dist/stats.d.ts +82 -11
- package/dist/stats.mjs +670 -314
- package/package.json +6 -4
- package/dist/client/_nuxt/builds/meta/33e1ac0e-aba1-4856-8beb-775c426be236.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,o as s,c as a,a as t,t as r}from"./
|
|
1
|
+
import{_ as o,o as s,c as a,a as t,t as r}from"./CwXQ1Eqw.js";import{u as i}from"./KCxg59bo.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(h,m)=>(s(),a("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-a4e5aa55"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,f as s,h as u,i as r,g as h}from"./
|
|
1
|
+
import{u as a,f as s,h as u,i as r,g as h}from"./CwXQ1Eqw.js";function i(t){const e=t||s();return e.ssrContext?.head||e.runWithContext(()=>{if(u()){const n=r(h);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function d(t,e={}){const n=e.head||i(e.nuxt);return a(t,{head:n,...e})}export{d as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"d0d06e27-af53-4f1a-b7ae-18727423b3ed","timestamp":1773925113341}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"d0d06e27-af53-4f1a-b7ae-18727423b3ed","timestamp":1773925113341,"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,o as a,c as i,a as t,t as n,b as u,w as c,d as l,e as d}from"./
|
|
1
|
+
import{_ as s,o as a,c as i,a as t,t as n,b as u,w as c,d as l,e as d}from"./CwXQ1Eqw.js";import{u as f}from"./KCxg59bo.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=d;return a(),i("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[u(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:c(()=>[l(n(e.backHome),1)]),_:1})])])])}}},N=s(y,[["__scopeId","data-v-f04d276c"]]);export{N as default};
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.C5SUNdim.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.C5SUNdim.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CwXQ1Eqw.js"><script type="module" src="/__nuxt-scripts/_nuxt/CwXQ1Eqw.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{"nuxt-scripts":{version:"",defaultScriptOptions:{trigger:"onNuxtReady"},googleStaticMapsProxy:"",endpoints:{}}},app:{baseURL:"/__nuxt-scripts",buildId:"d0d06e27-af53-4f1a-b7ae-18727423b3ed",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1773925118838,false]</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { FetchOptions } from 'ofetch';
|
|
3
|
-
import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
|
|
4
3
|
import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
|
|
4
|
+
import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Global privacy override for all first-party proxy requests.
|
package/dist/module.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { FetchOptions } from 'ofetch';
|
|
3
|
-
import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
|
|
4
3
|
import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
|
|
4
|
+
import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Global privacy override for all first-party proxy requests.
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -21,6 +21,22 @@ import { hash } from 'ohash';
|
|
|
21
21
|
import { registry } from './registry.mjs';
|
|
22
22
|
import { g as getAllProxyConfigs, r as routesToInterceptRules } from './shared/scripts.ViOoYQXH.mjs';
|
|
23
23
|
|
|
24
|
+
function generatePartytownResolveUrl(interceptRules) {
|
|
25
|
+
const rulesJson = JSON.stringify(interceptRules);
|
|
26
|
+
return `function(url, location, type) {
|
|
27
|
+
var rules = ${rulesJson};
|
|
28
|
+
for (var i = 0; i < rules.length; i++) {
|
|
29
|
+
var rule = rules[i];
|
|
30
|
+
if (url.hostname === rule.pattern || url.hostname.endsWith('.' + rule.pattern)) {
|
|
31
|
+
if (rule.pathPrefix && !url.pathname.startsWith(rule.pathPrefix)) continue;
|
|
32
|
+
var path = rule.pathPrefix ? url.pathname.slice(rule.pathPrefix.length) : url.pathname;
|
|
33
|
+
var newPath = rule.target + (path.startsWith('/') ? '' : '/') + path + url.search;
|
|
34
|
+
return new URL(newPath, location.origin);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
const logger = useLogger("@nuxt/scripts");
|
|
25
41
|
|
|
26
42
|
function generateInterceptPluginContents(interceptRules) {
|
|
@@ -255,13 +271,14 @@ Options:
|
|
|
255
271
|
See: https://scripts.nuxt.com/docs/guides/first-party#static-hosting`
|
|
256
272
|
);
|
|
257
273
|
}
|
|
274
|
+
let devtools;
|
|
258
275
|
if (nuxtOptions.dev) {
|
|
259
276
|
const allDomains = /* @__PURE__ */ new Set();
|
|
260
277
|
for (const s of devtoolsScripts) {
|
|
261
278
|
for (const d of s.domains)
|
|
262
279
|
allDomains.add(d);
|
|
263
280
|
}
|
|
264
|
-
|
|
281
|
+
devtools = {
|
|
265
282
|
enabled: true,
|
|
266
283
|
proxyPrefix,
|
|
267
284
|
privacyMode: privacyLabel,
|
|
@@ -270,6 +287,7 @@ See: https://scripts.nuxt.com/docs/guides/first-party#static-hosting`
|
|
|
270
287
|
totalDomains: allDomains.size
|
|
271
288
|
};
|
|
272
289
|
}
|
|
290
|
+
return { interceptRules, devtools };
|
|
273
291
|
}
|
|
274
292
|
|
|
275
293
|
const renderedScript = /* @__PURE__ */ new Map();
|
|
@@ -639,7 +657,7 @@ function resolveCalleeTarget(callee, scopeTracker) {
|
|
|
639
657
|
return "Image";
|
|
640
658
|
return null;
|
|
641
659
|
}
|
|
642
|
-
function rewriteScriptUrlsAST(content, filename, rewrites, postProcess) {
|
|
660
|
+
function rewriteScriptUrlsAST(content, filename, rewrites, postProcess, options) {
|
|
643
661
|
const s = new MagicString(content);
|
|
644
662
|
function needsLeadingSpace(start) {
|
|
645
663
|
const prev = content[start - 1];
|
|
@@ -689,7 +707,7 @@ function rewriteScriptUrlsAST(content, filename, rewrites, postProcess) {
|
|
|
689
707
|
s.overwrite(node.start, firstQuasi.end, `${needsLeadingSpace(node.start)}self.location.origin+\`${rewritten}`);
|
|
690
708
|
}
|
|
691
709
|
}
|
|
692
|
-
if (node.type === "CallExpression") {
|
|
710
|
+
if (node.type === "CallExpression" && !options?.skipApiRewrites) {
|
|
693
711
|
const callee = node.callee;
|
|
694
712
|
const canvasPropName = callee?.type === "MemberExpression" ? callee.computed ? callee.property?.type === "Literal" && typeof callee.property.value === "string" ? callee.property.value : null : callee.property?.name : null;
|
|
695
713
|
if (canvasPropName === "toDataURL" && callee.object) {
|
|
@@ -729,7 +747,7 @@ function rewriteScriptUrlsAST(content, filename, rewrites, postProcess) {
|
|
|
729
747
|
}
|
|
730
748
|
}
|
|
731
749
|
}
|
|
732
|
-
if (node.type === "NewExpression") {
|
|
750
|
+
if (node.type === "NewExpression" && !options?.skipApiRewrites) {
|
|
733
751
|
const callee = node.callee;
|
|
734
752
|
if (callee?.type === "Identifier" && callee.name === "XMLHttpRequest") {
|
|
735
753
|
if (!scopeTracker.getDeclaration("XMLHttpRequest"))
|
|
@@ -798,7 +816,7 @@ function normalizeScriptData(src, assetsBaseURL = "/_scripts/assets") {
|
|
|
798
816
|
return { url: src };
|
|
799
817
|
}
|
|
800
818
|
async function downloadScript(opts, renderedScript, fetchOptions, cacheMaxAge) {
|
|
801
|
-
const { src, url, filename, forceDownload, integrity, proxyRewrites, postProcess } = opts;
|
|
819
|
+
const { src, url, filename, forceDownload, integrity, proxyRewrites, postProcess, skipApiRewrites } = opts;
|
|
802
820
|
if (src === url || !filename) {
|
|
803
821
|
return;
|
|
804
822
|
}
|
|
@@ -836,7 +854,7 @@ async function downloadScript(opts, renderedScript, fetchOptions, cacheMaxAge) {
|
|
|
836
854
|
await storage.setItemRaw(`bundle:${filename}`, res);
|
|
837
855
|
if (proxyRewrites?.length && res) {
|
|
838
856
|
const content = res.toString("utf-8");
|
|
839
|
-
const rewritten = rewriteScriptUrlsAST(content, filename || "script.js", proxyRewrites, postProcess);
|
|
857
|
+
const rewritten = rewriteScriptUrlsAST(content, filename || "script.js", proxyRewrites, postProcess, { skipApiRewrites });
|
|
840
858
|
res = Buffer.from(rewritten, "utf-8");
|
|
841
859
|
logger.debug(`Rewrote ${proxyRewrites.length} URL patterns in ${filename}`);
|
|
842
860
|
}
|
|
@@ -1039,10 +1057,11 @@ function NuxtScriptBundleTransformer(options = {
|
|
|
1039
1057
|
const proxyConfig = !firstPartyOptOut && proxyConfigKey ? options.proxyConfigs?.[proxyConfigKey] : void 0;
|
|
1040
1058
|
const proxyRewrites = proxyConfig?.rewrite;
|
|
1041
1059
|
const postProcess = proxyConfig?.postProcess;
|
|
1060
|
+
const skipApiRewrites = !!(registryKey && options.partytownScripts?.has(registryKey));
|
|
1042
1061
|
deferredOps.push(async () => {
|
|
1043
1062
|
let url = _url;
|
|
1044
1063
|
try {
|
|
1045
|
-
await downloadScript({ src, url, filename, forceDownload, proxyRewrites, postProcess, integrity: options.integrity }, renderedScript, options.fetchOptions, options.cacheMaxAge);
|
|
1064
|
+
await downloadScript({ src, url, filename, forceDownload, proxyRewrites, postProcess, integrity: options.integrity, skipApiRewrites }, renderedScript, options.fetchOptions, options.cacheMaxAge);
|
|
1046
1065
|
} catch (e) {
|
|
1047
1066
|
if (options.fallbackOnSrcOnBundleFail) {
|
|
1048
1067
|
logger.warn(`[Nuxt Scripts: Bundle Transformer] Failed to bundle ${src}. Fallback to remote loading.`);
|
|
@@ -1570,7 +1589,7 @@ const module$1 = defineNuxtModule({
|
|
|
1570
1589
|
}
|
|
1571
1590
|
const { renderedScript } = setupPublicAssetStrategy(config.assets);
|
|
1572
1591
|
if (firstParty.enabled) {
|
|
1573
|
-
const devtoolsData = finalizeFirstParty({
|
|
1592
|
+
const { interceptRules, devtools: devtoolsData } = finalizeFirstParty({
|
|
1574
1593
|
firstParty,
|
|
1575
1594
|
registry: config.registry,
|
|
1576
1595
|
registryScripts,
|
|
@@ -1579,6 +1598,16 @@ const module$1 = defineNuxtModule({
|
|
|
1579
1598
|
if (devtoolsData) {
|
|
1580
1599
|
nuxt.options.runtimeConfig.public["nuxt-scripts-devtools"] = devtoolsData;
|
|
1581
1600
|
}
|
|
1601
|
+
if (config.partytown?.length && hasNuxtModule("@nuxtjs/partytown") && interceptRules.length) {
|
|
1602
|
+
const partytownConfig = nuxt.options.partytown || {};
|
|
1603
|
+
if (!partytownConfig.resolveUrl) {
|
|
1604
|
+
partytownConfig.resolveUrl = generatePartytownResolveUrl(interceptRules);
|
|
1605
|
+
nuxt.options.partytown = partytownConfig;
|
|
1606
|
+
logger.info("[partytown] Auto-configured resolveUrl for first-party proxy");
|
|
1607
|
+
} else {
|
|
1608
|
+
logger.warn("[partytown] Custom resolveUrl already set \u2014 first-party proxy URLs will not be auto-rewritten in Partytown worker. Add first-party proxy rules to your resolveUrl manually.");
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1582
1611
|
}
|
|
1583
1612
|
const moduleInstallPromises = /* @__PURE__ */ new Map();
|
|
1584
1613
|
addBuildPlugin(NuxtScriptsCheckScripts(), {
|
|
@@ -1589,6 +1618,7 @@ const module$1 = defineNuxtModule({
|
|
|
1589
1618
|
registryConfig: nuxt.options.runtimeConfig.public.scripts,
|
|
1590
1619
|
defaultBundle: firstParty.enabled || config.defaultScriptOptions?.bundle,
|
|
1591
1620
|
proxyConfigs: firstParty.proxyConfigs,
|
|
1621
|
+
partytownScripts: new Set(config.partytown || []),
|
|
1592
1622
|
moduleDetected(module) {
|
|
1593
1623
|
if (nuxt.options.dev && module !== "@nuxt/scripts" && !moduleInstallPromises.has(module) && !hasNuxtModule(module))
|
|
1594
1624
|
moduleInstallPromises.set(module, () => installNuxtModule(module));
|
package/dist/registry.mjs
CHANGED
|
@@ -43,12 +43,12 @@ const LOGOS = {
|
|
|
43
43
|
dark: `<svg height="30" width="35" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter id="a" height="138.7%" width="131.4%" x="-15.7%" y="-15.1%"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dy="1" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1"/><feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07 0"/></filter><path id="b" d="M14.23 20.46l-9.65 1.1L3 5.12 30.07 2l1.58 16.46-9.37 1.07-3.5 5.72-4.55-4.8z"/></defs><g fill="none" fill-rule="evenodd"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill="#fff" stroke="#fff" stroke-width="2" xlink:href="#b"/></g></svg>`
|
|
44
44
|
},
|
|
45
45
|
npm: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="#C12127" d="M0 256V0h256v256z"/><path fill="#FFF" d="M48 48h160v160h-32V80h-48v128H48z"/></svg>`,
|
|
46
|
-
googleRecaptcha: `<svg xmlns="http://www.w3.org/2000/svg"
|
|
46
|
+
googleRecaptcha: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 262"><path fill="#4285F4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34A853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#FBBC05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"/><path fill="#EB4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/></svg>`,
|
|
47
47
|
googleSignIn: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 262"><path fill="#4285F4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34A853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#FBBC05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"/><path fill="#EB4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/></svg>`,
|
|
48
48
|
googleTagManager: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="#8AB4F8" d="m150.262 245.516l-44.437-43.331l95.433-97.454l46.007 45.091z"/><path fill="#4285F4" d="M150.45 53.938L106.176 8.731L9.36 104.629c-12.48 12.48-12.48 32.713 0 45.207l95.36 95.986l45.09-42.182l-72.654-76.407z"/><path fill="#8AB4F8" d="m246.625 105.37l-96-96c-12.494-12.494-32.756-12.494-45.25 0c-12.495 12.495-12.495 32.757 0 45.252l96 96c12.494 12.494 32.756 12.494 45.25 0c12.495-12.495 12.495-32.757 0-45.251"/><circle cx="127.265" cy="224.731" r="31.273" fill="#246FDB"/></svg>`,
|
|
49
49
|
googleAnalytics: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="192px" height="192px" viewBox="0 0 192 192" enable-background="new 0 0 192 192" xml:space="preserve"><rect x="0" y="0" fill="none" width="192" height="192"/><g><g><path fill="#F9AB00" d="M130,29v132c0,14.77,10.19,23,21,23c10,0,21-7,21-23V30c0-13.54-10-22-21-22S130,17.33,130,29z"/></g><g><path fill="#E37400" d="M75,96v65c0,14.77,10.19,23,21,23c10,0,21-7,21-23V97c0-13.54-10-22-21-22S75,84.33,75,96z"/></g><g><circle fill="#E37400" cx="41" cy="163" r="21"/></g></g></svg>`,
|
|
50
50
|
umamiAnalytics: `<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 24 24"><path fill="currentColor" d="M2.203 8.611H.857a.845.845 0 0 0-.841.841v.858a13 13 0 0 0-.016.6c0 6.627 5.373 12 12 12c6.527 0 11.837-5.212 11.996-11.701c0-.025.004-.05.004-.075V9.452a.845.845 0 0 0-.841-.841h-1.346c-1.159-4.329-5.112-7.521-9.805-7.521S3.363 4.282 2.203 8.611m18.444 0H3.37c1.127-3.702 4.57-6.399 8.638-6.399c4.069 0 7.512 2.697 8.639 6.399"/></svg>`,
|
|
51
|
-
gravatar: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0
|
|
51
|
+
gravatar: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 27 27"><path fill="#1d4fc4" d="M10.8 2.699v9.45a2.699 2.699 0 005.398 0V5.862a8.101 8.101 0 11-8.423 1.913 2.702 2.702 0 00-3.821-3.821A13.5 13.5 0 1013.499 0 2.699 2.699 0 0010.8 2.699z"/></svg>`,
|
|
52
52
|
bingUet: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="#F25022" d="M0 0h121.5v121.5H0z"/><path fill="#7FBA00" d="M134.5 0H256v121.5H134.5z"/><path fill="#00A4EF" d="M0 134.5h121.5V256H0z"/><path fill="#FFB900" d="M134.5 134.5H256V256H134.5z"/></svg>`,
|
|
53
53
|
snapchatPixel: `<svg width="50" height="50" viewBox="147.353 39.286 514.631 514.631" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><path style="fill:#FFFC00;" d="M147.553,423.021v0.023c0.308,11.424,0.403,22.914,2.33,34.268 c2.042,12.012,4.961,23.725,10.53,34.627c7.529,14.756,17.869,27.217,30.921,37.396c9.371,7.309,19.608,13.111,30.94,16.771 c16.524,5.33,33.571,7.373,50.867,7.473c10.791,0.068,21.575,0.338,32.37,0.293c78.395-0.33,156.792,0.566,235.189-0.484 c10.403-0.141,20.636-1.41,30.846-3.277c19.569-3.582,36.864-11.932,51.661-25.133c17.245-15.381,28.88-34.205,34.132-56.924 c3.437-14.85,4.297-29.916,4.444-45.035v-3.016c0-1.17-0.445-256.892-0.486-260.272c-0.115-9.285-0.799-18.5-2.54-27.636 c-2.117-11.133-5.108-21.981-10.439-32.053c-5.629-10.641-12.68-20.209-21.401-28.57c-13.359-12.81-28.775-21.869-46.722-26.661 c-16.21-4.327-32.747-5.285-49.405-5.27c-0.027-0.004-0.09-0.173-0.094-0.255H278.56c-0.005,0.086-0.008,0.172-0.014,0.255 c-9.454,0.173-18.922,0.102-28.328,1.268c-10.304,1.281-20.509,3.21-30.262,6.812c-15.362,5.682-28.709,14.532-40.11,26.347 c-12.917,13.386-22.022,28.867-26.853,46.894c-4.31,16.084-5.248,32.488-5.271,49.008"/><path style="fill:#FFFFFF;" d="M407.001,473.488c-1.068,0-2.087-0.039-2.862-0.076c-0.615,0.053-1.25,0.076-1.886,0.076 c-22.437,0-37.439-10.607-50.678-19.973c-9.489-6.703-18.438-13.031-28.922-14.775c-5.149-0.854-10.271-1.287-15.22-1.287 c-8.917,0-15.964,1.383-21.109,2.389c-3.166,0.617-5.896,1.148-8.006,1.148c-2.21,0-4.895-0.49-6.014-4.311 c-0.887-3.014-1.523-5.934-2.137-8.746c-1.536-7.027-2.65-11.316-5.281-11.723c-28.141-4.342-44.768-10.738-48.08-18.484 c-0.347-0.814-0.541-1.633-0.584-2.443c-0.129-2.309,1.501-4.334,3.777-4.711c22.348-3.68,42.219-15.492,59.064-35.119 c13.049-15.195,19.457-29.713,20.145-31.316c0.03-0.072,0.065-0.148,0.101-0.217c3.247-6.588,3.893-12.281,1.926-16.916 c-3.626-8.551-15.635-12.361-23.58-14.882c-1.976-0.625-3.845-1.217-5.334-1.808c-7.043-2.782-18.626-8.66-17.083-16.773 c1.124-5.916,8.949-10.036,15.273-10.036c1.756,0,3.312,0.308,4.622,0.923c7.146,3.348,13.575,5.045,19.104,5.045 c6.876,0,10.197-2.618,11-3.362c-0.198-3.668-0.44-7.546-0.674-11.214c0-0.004-0.005-0.048-0.005-0.048 c-1.614-25.675-3.627-57.627,4.546-75.95c24.462-54.847,76.339-59.112,91.651-59.112c0.408,0,6.674-0.062,6.674-0.062 c0.283-0.005,0.59-0.009,0.908-0.009c15.354,0,67.339,4.27,91.816,59.15c8.173,18.335,6.158,50.314,4.539,76.016l-0.076,1.23 c-0.222,3.49-0.427,6.793-0.6,9.995c0.756,0.696,3.795,3.096,9.978,3.339c5.271-0.202,11.328-1.891,17.998-5.014 c2.062-0.968,4.345-1.169,5.895-1.169c2.343,0,4.727,0.456,6.714,1.285l0.106,0.041c5.66,2.009,9.367,6.024,9.447,10.242 c0.071,3.932-2.851,9.809-17.223,15.485c-1.472,0.583-3.35,1.179-5.334,1.808c-7.952,2.524-19.951,6.332-23.577,14.878 c-1.97,4.635-1.322,10.326,1.926,16.912c0.036,0.072,0.067,0.145,0.102,0.221c1,2.344,25.205,57.535,79.209,66.432 c2.275,0.379,3.908,2.406,3.778,4.711c-0.048,0.828-0.248,1.656-0.598,2.465c-3.289,7.703-19.915,14.09-48.064,18.438 c-2.642,0.408-3.755,4.678-5.277,11.668c-0.63,2.887-1.271,5.717-2.146,8.691c-0.819,2.797-2.641,4.164-5.567,4.164h-0.441 c-1.905,0-4.604-0.346-8.008-1.012c-5.95-1.158-12.623-2.236-21.109-2.236c-4.948,0-10.069,0.434-15.224,1.287 c-10.473,1.744-19.421,8.062-28.893,14.758C444.443,462.88,429.436,473.488,407.001,473.488"/><path style="fill:#020202;" d="M408.336,124.235c14.455,0,64.231,3.883,87.688,56.472c7.724,17.317,5.744,48.686,4.156,73.885 c-0.248,3.999-0.494,7.875-0.694,11.576l-0.084,1.591l1.062,1.185c0.429,0.476,4.444,4.672,13.374,5.017l0.144,0.008l0.15-0.003 c5.904-0.225,12.554-2.059,19.776-5.442c1.064-0.498,2.48-0.741,3.978-0.741c1.707,0,3.521,0.321,5.017,0.951l0.226,0.09 c3.787,1.327,6.464,3.829,6.505,6.093c0.022,1.28-0.935,5.891-14.359,11.194c-1.312,0.518-3.039,1.069-5.041,1.7 c-8.736,2.774-21.934,6.96-26.376,17.427c-2.501,5.896-1.816,12.854,2.034,20.678c1.584,3.697,26.52,59.865,82.631,69.111 c-0.011,0.266-0.079,0.557-0.229,0.9c-0.951,2.24-6.996,9.979-44.612,15.783c-5.886,0.902-7.328,7.5-9,15.17 c-0.604,2.746-1.218,5.518-2.062,8.381c-0.258,0.865-0.306,0.914-1.233,0.914c-0.128,0-0.278,0-0.442,0 c-1.668,0-4.2-0.346-7.135-0.922c-5.345-1.041-12.647-2.318-21.982-2.318c-5.21,0-10.577,0.453-15.962,1.352 c-11.511,1.914-20.872,8.535-30.786,15.543c-13.314,9.408-27.075,19.143-48.071,19.143c-0.917,0-1.812-0.031-2.709-0.076 l-0.236-0.01l-0.237,0.018c-0.515,0.045-1.034,0.068-1.564,0.068c-20.993,0-34.76-9.732-48.068-19.143 c-9.916-7.008-19.282-13.629-30.791-15.543c-5.38-0.896-10.752-1.352-15.959-1.352c-9.333,0-16.644,1.428-21.978,2.471 c-2.935,0.574-5.476,1.066-7.139,1.066c-1.362,0-1.388-0.08-1.676-1.064c-0.844-2.865-1.461-5.703-2.062-8.445 c-1.676-7.678-3.119-14.312-9.002-15.215c-37.613-5.809-43.659-13.561-44.613-15.795c-0.149-0.352-0.216-0.652-0.231-0.918 c56.11-9.238,81.041-65.408,82.63-69.119c3.857-7.818,4.541-14.775,2.032-20.678c-4.442-10.461-17.638-14.653-26.368-17.422 c-2.007-0.635-3.735-1.187-5.048-1.705c-11.336-4.479-14.823-8.991-14.305-11.725c0.601-3.153,6.067-6.359,10.837-6.359 c1.072,0,2.012,0.173,2.707,0.498c7.747,3.631,14.819,5.472,21.022,5.472c9.751,0,14.091-4.537,14.557-5.055l1.057-1.182 l-0.085-1.583c-0.197-3.699-0.44-7.574-0.696-11.565c-1.583-25.205-3.563-56.553,4.158-73.871 c23.37-52.396,72.903-56.435,87.525-56.435c0.36,0,6.717-0.065,6.717-0.065C407.744,124.239,408.033,124.235,408.336,124.235 M408.336,115.197h-0.017c-0.333,0-0.646,0-0.944,0.004c-2.376,0.024-6.282,0.062-6.633,0.066c-8.566,0-25.705,1.21-44.115,9.336 c-10.526,4.643-19.994,10.921-28.14,18.66c-9.712,9.221-17.624,20.59-23.512,33.796c-8.623,19.336-6.576,51.905-4.932,78.078 l0.006,0.041c0.176,2.803,0.361,5.73,0.53,8.582c-1.265,0.581-3.316,1.194-6.339,1.194c-4.864,0-10.648-1.555-17.187-4.619 c-1.924-0.896-4.12-1.349-6.543-1.349c-3.893,0-7.997,1.146-11.557,3.239c-4.479,2.63-7.373,6.347-8.159,10.468 c-0.518,2.726-0.493,8.114,5.492,13.578c3.292,3.008,8.128,5.782,14.37,8.249c1.638,0.645,3.582,1.261,5.641,1.914 c7.145,2.271,17.959,5.702,20.779,12.339c1.429,3.365,0.814,7.793-1.823,13.145c-0.069,0.146-0.138,0.289-0.201,0.439 c-0.659,1.539-6.807,15.465-19.418,30.152c-7.166,8.352-15.059,15.332-23.447,20.752c-10.238,6.617-21.316,10.943-32.923,12.855 c-4.558,0.748-7.813,4.809-7.559,9.424c0.078,1.33,0.39,2.656,0.931,3.939c0.004,0.008,0.009,0.016,0.013,0.023 c1.843,4.311,6.116,7.973,13.063,11.203c8.489,3.943,21.185,7.26,37.732,9.855c0.836,1.59,1.704,5.586,2.305,8.322 c0.629,2.908,1.285,5.898,2.22,9.074c1.009,3.441,3.626,7.553,10.349,7.553c2.548,0,5.478-0.574,8.871-1.232 c4.969-0.975,11.764-2.305,20.245-2.305c4.702,0,9.575,0.414,14.48,1.229c9.455,1.574,17.606,7.332,27.037,14 c13.804,9.758,29.429,20.803,53.302,20.803c0.651,0,1.304-0.021,1.949-0.066c0.789,0.037,1.767,0.066,2.799,0.066 c23.88,0,39.501-11.049,53.29-20.799l0.022-0.02c9.433-6.66,17.575-12.41,27.027-13.984c4.903-0.814,9.775-1.229,14.479-1.229 c8.102,0,14.517,1.033,20.245,2.15c3.738,0.736,6.643,1.09,8.872,1.09l0.218,0.004h0.226c4.917,0,8.53-2.699,9.909-7.422 c0.916-3.109,1.57-6.029,2.215-8.986c0.562-2.564,1.46-6.674,2.296-8.281c16.558-2.6,29.249-5.91,37.739-9.852 c6.931-3.215,11.199-6.873,13.053-11.166c0.556-1.287,0.881-2.621,0.954-3.979c0.261-4.607-2.999-8.676-7.56-9.424 c-51.585-8.502-74.824-61.506-75.785-63.758c-0.062-0.148-0.132-0.295-0.205-0.438c-2.637-5.354-3.246-9.777-1.816-13.148 c2.814-6.631,13.621-10.062,20.771-12.332c2.07-0.652,4.021-1.272,5.646-1.914c7.039-2.78,12.07-5.796,15.389-9.221 c3.964-4.083,4.736-7.995,4.688-10.555c-0.121-6.194-4.856-11.698-12.388-14.393c-2.544-1.052-5.445-1.607-8.399-1.607 c-2.011,0-4.989,0.276-7.808,1.592c-6.035,2.824-11.441,4.368-16.082,4.588c-2.468-0.125-4.199-0.66-5.32-1.171 c0.141-2.416,0.297-4.898,0.458-7.486l0.067-1.108c1.653-26.19,3.707-58.784-4.92-78.134c-5.913-13.253-13.853-24.651-23.604-33.892 c-8.178-7.744-17.678-14.021-28.242-18.661C434.052,116.402,416.914,115.197,408.336,115.197"/><rect x="147.553" y="39.443" style="fill:none;" width="514.231" height="514.23"/></svg>`
|
|
54
54
|
};
|
|
@@ -43,7 +43,8 @@ const advancedMarkerElement = useGoogleMapsResource({
|
|
|
43
43
|
const marker = new mapsApi.marker.AdvancedMarkerElement(props.options);
|
|
44
44
|
setupEventListeners(marker);
|
|
45
45
|
if (markerClustererContext?.markerClusterer.value) {
|
|
46
|
-
markerClustererContext.markerClusterer.value.addMarker(marker);
|
|
46
|
+
markerClustererContext.markerClusterer.value.addMarker(marker, true);
|
|
47
|
+
markerClustererContext.requestRerender();
|
|
47
48
|
} else {
|
|
48
49
|
marker.map = map;
|
|
49
50
|
}
|
|
@@ -52,7 +53,8 @@ const advancedMarkerElement = useGoogleMapsResource({
|
|
|
52
53
|
cleanup(marker, { mapsApi }) {
|
|
53
54
|
mapsApi.event.clearInstanceListeners(marker);
|
|
54
55
|
if (markerClustererContext?.markerClusterer.value) {
|
|
55
|
-
markerClustererContext.markerClusterer.value.removeMarker(marker);
|
|
56
|
+
markerClustererContext.markerClusterer.value.removeMarker(marker, true);
|
|
57
|
+
markerClustererContext.requestRerender();
|
|
56
58
|
} else {
|
|
57
59
|
marker.map = null;
|
|
58
60
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
|
|
2
2
|
export default _default;
|
package/dist/stats.d.mts
CHANGED
|
@@ -54,17 +54,49 @@ interface ScriptApis {
|
|
|
54
54
|
performanceObserver: boolean;
|
|
55
55
|
intersectionObserver: boolean;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
type PrivacyGrade = 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
|
|
58
|
+
interface PrivacyRating {
|
|
59
|
+
/** Overall letter grade */
|
|
60
|
+
grade: PrivacyGrade;
|
|
58
61
|
/** 0–100, higher = more invasive */
|
|
59
62
|
score: number;
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
/** Breakdown by privacy concern category */
|
|
64
|
+
breakdown: {
|
|
65
|
+
/** Browser fingerprinting APIs — entropy-weighted per AmIUnique/Panopticlick research (0–30) */
|
|
66
|
+
fingerprinting: {
|
|
67
|
+
score: number;
|
|
68
|
+
apis: string[];
|
|
69
|
+
};
|
|
70
|
+
/** Persistent storage + cookie tracking (0–25) */
|
|
71
|
+
persistence: {
|
|
72
|
+
score: number;
|
|
73
|
+
thirdPartyCookies: number;
|
|
74
|
+
longLivedCookies: number;
|
|
75
|
+
storageApis: string[];
|
|
76
|
+
};
|
|
77
|
+
/** Cross-domain data exfiltration & tracking network (0–25) */
|
|
78
|
+
network: {
|
|
79
|
+
score: number;
|
|
80
|
+
domains: number;
|
|
81
|
+
outboundBytes: number;
|
|
82
|
+
trackingPixels: number;
|
|
83
|
+
};
|
|
84
|
+
/** Behavioral observation APIs (0–10) */
|
|
85
|
+
monitoring: {
|
|
86
|
+
score: number;
|
|
87
|
+
apis: string[];
|
|
88
|
+
};
|
|
89
|
+
/** Data collection scope — what types of data are tracked (0–10) */
|
|
90
|
+
dataScope: {
|
|
91
|
+
score: number;
|
|
92
|
+
types: string[];
|
|
93
|
+
};
|
|
94
|
+
/** Fingerprint exfiltration — heavy FP APIs combined with outbound channels (0–25) */
|
|
95
|
+
fpExfiltration: {
|
|
96
|
+
score: number;
|
|
97
|
+
heavyApis: string[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
68
100
|
}
|
|
69
101
|
interface ScriptCookie {
|
|
70
102
|
name: string;
|
|
@@ -102,6 +134,44 @@ interface PerformanceSummary {
|
|
|
102
134
|
scriptDurationMs: number;
|
|
103
135
|
heapDeltaKb: number;
|
|
104
136
|
}
|
|
137
|
+
type PerformanceGrade = 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
|
|
138
|
+
interface PerformanceRating {
|
|
139
|
+
/** Overall letter grade */
|
|
140
|
+
grade: PerformanceGrade;
|
|
141
|
+
/** 0–100, higher = worse performance impact */
|
|
142
|
+
score: number;
|
|
143
|
+
/** Breakdown by impact area */
|
|
144
|
+
breakdown: {
|
|
145
|
+
/** Network cost — transfer size relative to performance budgets (0–30) */
|
|
146
|
+
networkCost: {
|
|
147
|
+
score: number;
|
|
148
|
+
transferKb: number;
|
|
149
|
+
};
|
|
150
|
+
/** Main thread blocking — task duration that delays interactivity (0–30) */
|
|
151
|
+
mainThread: {
|
|
152
|
+
score: number;
|
|
153
|
+
taskDurationMs: number;
|
|
154
|
+
scriptDurationMs: number;
|
|
155
|
+
};
|
|
156
|
+
/** Memory pressure — heap allocation impact (0–20) */
|
|
157
|
+
memory: {
|
|
158
|
+
score: number;
|
|
159
|
+
heapDeltaKb: number;
|
|
160
|
+
};
|
|
161
|
+
/** Connection overhead — additional HTTP requests (0–10) */
|
|
162
|
+
connections: {
|
|
163
|
+
score: number;
|
|
164
|
+
requestCount: number;
|
|
165
|
+
};
|
|
166
|
+
/** CWV risk — estimated Core Web Vitals impact (0–10) */
|
|
167
|
+
cwvRisk: {
|
|
168
|
+
score: number;
|
|
169
|
+
lcpImpactMs: number;
|
|
170
|
+
clsRisk: boolean;
|
|
171
|
+
inpRiskLevel: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
}
|
|
105
175
|
interface ScriptStats {
|
|
106
176
|
id: string;
|
|
107
177
|
label: string;
|
|
@@ -112,10 +182,11 @@ interface ScriptStats {
|
|
|
112
182
|
trackedData: TrackedDataType[];
|
|
113
183
|
collectsWebVitals: boolean;
|
|
114
184
|
apis: ScriptApis;
|
|
115
|
-
|
|
185
|
+
privacyRating: PrivacyRating;
|
|
116
186
|
cookies: ScriptCookie[];
|
|
117
187
|
network: NetworkSummary;
|
|
118
188
|
performance: PerformanceSummary;
|
|
189
|
+
performanceRating: PerformanceRating;
|
|
119
190
|
cwvEstimate: CwvEstimate;
|
|
120
191
|
hasBundling: boolean;
|
|
121
192
|
hasProxy: boolean;
|
|
@@ -128,4 +199,4 @@ interface ScriptStats {
|
|
|
128
199
|
declare function getScriptStats(): Promise<ScriptStats[]>;
|
|
129
200
|
|
|
130
201
|
export { getScriptStats };
|
|
131
|
-
export type {
|
|
202
|
+
export type { CwvEstimate, NetworkSummary, PerformanceGrade, PerformanceRating, PerformanceSummary, PrivacyGrade, PrivacyRating, ScriptApis, ScriptCookie, ScriptPrivacy, ScriptSizeDetail, ScriptStats, TrackedDataType };
|
package/dist/stats.d.ts
CHANGED
|
@@ -54,17 +54,49 @@ interface ScriptApis {
|
|
|
54
54
|
performanceObserver: boolean;
|
|
55
55
|
intersectionObserver: boolean;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
type PrivacyGrade = 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
|
|
58
|
+
interface PrivacyRating {
|
|
59
|
+
/** Overall letter grade */
|
|
60
|
+
grade: PrivacyGrade;
|
|
58
61
|
/** 0–100, higher = more invasive */
|
|
59
62
|
score: number;
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
/** Breakdown by privacy concern category */
|
|
64
|
+
breakdown: {
|
|
65
|
+
/** Browser fingerprinting APIs — entropy-weighted per AmIUnique/Panopticlick research (0–30) */
|
|
66
|
+
fingerprinting: {
|
|
67
|
+
score: number;
|
|
68
|
+
apis: string[];
|
|
69
|
+
};
|
|
70
|
+
/** Persistent storage + cookie tracking (0–25) */
|
|
71
|
+
persistence: {
|
|
72
|
+
score: number;
|
|
73
|
+
thirdPartyCookies: number;
|
|
74
|
+
longLivedCookies: number;
|
|
75
|
+
storageApis: string[];
|
|
76
|
+
};
|
|
77
|
+
/** Cross-domain data exfiltration & tracking network (0–25) */
|
|
78
|
+
network: {
|
|
79
|
+
score: number;
|
|
80
|
+
domains: number;
|
|
81
|
+
outboundBytes: number;
|
|
82
|
+
trackingPixels: number;
|
|
83
|
+
};
|
|
84
|
+
/** Behavioral observation APIs (0–10) */
|
|
85
|
+
monitoring: {
|
|
86
|
+
score: number;
|
|
87
|
+
apis: string[];
|
|
88
|
+
};
|
|
89
|
+
/** Data collection scope — what types of data are tracked (0–10) */
|
|
90
|
+
dataScope: {
|
|
91
|
+
score: number;
|
|
92
|
+
types: string[];
|
|
93
|
+
};
|
|
94
|
+
/** Fingerprint exfiltration — heavy FP APIs combined with outbound channels (0–25) */
|
|
95
|
+
fpExfiltration: {
|
|
96
|
+
score: number;
|
|
97
|
+
heavyApis: string[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
68
100
|
}
|
|
69
101
|
interface ScriptCookie {
|
|
70
102
|
name: string;
|
|
@@ -102,6 +134,44 @@ interface PerformanceSummary {
|
|
|
102
134
|
scriptDurationMs: number;
|
|
103
135
|
heapDeltaKb: number;
|
|
104
136
|
}
|
|
137
|
+
type PerformanceGrade = 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
|
|
138
|
+
interface PerformanceRating {
|
|
139
|
+
/** Overall letter grade */
|
|
140
|
+
grade: PerformanceGrade;
|
|
141
|
+
/** 0–100, higher = worse performance impact */
|
|
142
|
+
score: number;
|
|
143
|
+
/** Breakdown by impact area */
|
|
144
|
+
breakdown: {
|
|
145
|
+
/** Network cost — transfer size relative to performance budgets (0–30) */
|
|
146
|
+
networkCost: {
|
|
147
|
+
score: number;
|
|
148
|
+
transferKb: number;
|
|
149
|
+
};
|
|
150
|
+
/** Main thread blocking — task duration that delays interactivity (0–30) */
|
|
151
|
+
mainThread: {
|
|
152
|
+
score: number;
|
|
153
|
+
taskDurationMs: number;
|
|
154
|
+
scriptDurationMs: number;
|
|
155
|
+
};
|
|
156
|
+
/** Memory pressure — heap allocation impact (0–20) */
|
|
157
|
+
memory: {
|
|
158
|
+
score: number;
|
|
159
|
+
heapDeltaKb: number;
|
|
160
|
+
};
|
|
161
|
+
/** Connection overhead — additional HTTP requests (0–10) */
|
|
162
|
+
connections: {
|
|
163
|
+
score: number;
|
|
164
|
+
requestCount: number;
|
|
165
|
+
};
|
|
166
|
+
/** CWV risk — estimated Core Web Vitals impact (0–10) */
|
|
167
|
+
cwvRisk: {
|
|
168
|
+
score: number;
|
|
169
|
+
lcpImpactMs: number;
|
|
170
|
+
clsRisk: boolean;
|
|
171
|
+
inpRiskLevel: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
}
|
|
105
175
|
interface ScriptStats {
|
|
106
176
|
id: string;
|
|
107
177
|
label: string;
|
|
@@ -112,10 +182,11 @@ interface ScriptStats {
|
|
|
112
182
|
trackedData: TrackedDataType[];
|
|
113
183
|
collectsWebVitals: boolean;
|
|
114
184
|
apis: ScriptApis;
|
|
115
|
-
|
|
185
|
+
privacyRating: PrivacyRating;
|
|
116
186
|
cookies: ScriptCookie[];
|
|
117
187
|
network: NetworkSummary;
|
|
118
188
|
performance: PerformanceSummary;
|
|
189
|
+
performanceRating: PerformanceRating;
|
|
119
190
|
cwvEstimate: CwvEstimate;
|
|
120
191
|
hasBundling: boolean;
|
|
121
192
|
hasProxy: boolean;
|
|
@@ -128,4 +199,4 @@ interface ScriptStats {
|
|
|
128
199
|
declare function getScriptStats(): Promise<ScriptStats[]>;
|
|
129
200
|
|
|
130
201
|
export { getScriptStats };
|
|
131
|
-
export type {
|
|
202
|
+
export type { CwvEstimate, NetworkSummary, PerformanceGrade, PerformanceRating, PerformanceSummary, PrivacyGrade, PrivacyRating, ScriptApis, ScriptCookie, ScriptPrivacy, ScriptSizeDetail, ScriptStats, TrackedDataType };
|