@nuxt/scripts 1.0.0-beta.17 → 1.0.0-beta.19
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/{NbccNBFl.js → 8nZpL1GZ.js} +3 -3
- package/dist/client/_nuxt/{DI7VRsfF.js → BAII0Gd6.js} +1 -1
- package/dist/client/_nuxt/{C8R4dwAP.js → BFIM6xmj.js} +1 -1
- package/dist/client/_nuxt/{BW6d1nfL.js → XsmoCkZQ.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4f48c83d-e40d-436a-afd0-3b8e6ac6f303.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +65 -1
- package/dist/registry.mjs +2 -0
- package/dist/runtime/registry/plausible-analytics.js +5 -6
- package/dist/runtime/types.d.ts +1 -1
- package/package.json +3 -3
- package/dist/client/_nuxt/builds/meta/54747b43-880a-49d1-91ff-d00dbcdf3ad7.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,c as a,o 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,c as a,o as i,a as t,t as n,b as u,w as c,d as l,e as d}from"./8nZpL1GZ.js";import{u as f}from"./XsmoCkZQ.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 i(),a("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-47fa61ef"]]);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,c as s,o as a,a as t,t as r}from"./
|
|
1
|
+
import{_ as o,c as s,o as a,a as t,t as r}from"./8nZpL1GZ.js";import{u as i}from"./XsmoCkZQ.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"},c={class:"max-w-520px text-center"},l=["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)=>(a(),s("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,l),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-c0d7df54"]]);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"./8nZpL1GZ.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":"4f48c83d-e40d-436a-afd0-3b8e6ac6f303","timestamp":1772788253771}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"4f48c83d-e40d-436a-afd0-3b8e6ac6f303","timestamp":1772788253771,"prerendered":[]}
|
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.D45OuV0w.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.D45OuV0w.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/8nZpL1GZ.js"><script type="module" src="/__nuxt-scripts/_nuxt/8nZpL1GZ.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:""}},app:{baseURL:"/__nuxt-scripts",buildId:"4f48c83d-e40d-436a-afd0-3b8e6ac6f303",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1772788258699,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -946,6 +946,35 @@ function fixSelfClosingScriptComponents(nuxt) {
|
|
|
946
946
|
});
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
+
const REGISTRY_ENV_DEFAULTS = {
|
|
950
|
+
clarity: { id: "" },
|
|
951
|
+
cloudflareWebAnalytics: { token: "" },
|
|
952
|
+
crisp: { id: "" },
|
|
953
|
+
databuddyAnalytics: { clientId: "" },
|
|
954
|
+
fathomAnalytics: { site: "" },
|
|
955
|
+
googleAdsense: { client: "" },
|
|
956
|
+
googleAnalytics: { id: "" },
|
|
957
|
+
googleMaps: { apiKey: "" },
|
|
958
|
+
googleRecaptcha: { siteKey: "" },
|
|
959
|
+
googleSignIn: { clientId: "" },
|
|
960
|
+
googleTagManager: { id: "" },
|
|
961
|
+
hotjar: { id: "" },
|
|
962
|
+
intercom: { app_id: "" },
|
|
963
|
+
matomoAnalytics: { matomoUrl: "" },
|
|
964
|
+
metaPixel: { id: "" },
|
|
965
|
+
paypal: { clientId: "" },
|
|
966
|
+
plausibleAnalytics: { domain: "" },
|
|
967
|
+
posthog: { apiKey: "" },
|
|
968
|
+
redditPixel: { id: "" },
|
|
969
|
+
rybbitAnalytics: { siteId: "" },
|
|
970
|
+
segment: { writeKey: "" },
|
|
971
|
+
snapchatPixel: { id: "" },
|
|
972
|
+
stripe: {},
|
|
973
|
+
tiktokPixel: { id: "" },
|
|
974
|
+
umamiAnalytics: { websiteId: "" },
|
|
975
|
+
vercelAnalytics: {},
|
|
976
|
+
xPixel: { id: "" }
|
|
977
|
+
};
|
|
949
978
|
const PARTYTOWN_FORWARDS = {
|
|
950
979
|
googleAnalytics: ["dataLayer.push", "gtag"],
|
|
951
980
|
plausible: ["plausible"],
|
|
@@ -1020,9 +1049,26 @@ const module$1 = defineNuxtModule({
|
|
|
1020
1049
|
};
|
|
1021
1050
|
if (config.registry) {
|
|
1022
1051
|
nuxt.options.runtimeConfig.public = nuxt.options.runtimeConfig.public || {};
|
|
1052
|
+
const registryWithDefaults = {};
|
|
1053
|
+
for (const [key, value] of Object.entries(config.registry)) {
|
|
1054
|
+
if (value && REGISTRY_ENV_DEFAULTS[key]) {
|
|
1055
|
+
const envDefaults = REGISTRY_ENV_DEFAULTS[key];
|
|
1056
|
+
if (value === true || value === "mock") {
|
|
1057
|
+
registryWithDefaults[key] = { ...envDefaults };
|
|
1058
|
+
} else if (typeof value === "object" && !Array.isArray(value)) {
|
|
1059
|
+
registryWithDefaults[key] = defu(value, envDefaults);
|
|
1060
|
+
} else if (Array.isArray(value)) {
|
|
1061
|
+
registryWithDefaults[key] = defu(value[0] || {}, envDefaults);
|
|
1062
|
+
} else {
|
|
1063
|
+
registryWithDefaults[key] = value;
|
|
1064
|
+
}
|
|
1065
|
+
} else {
|
|
1066
|
+
registryWithDefaults[key] = value;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1023
1069
|
nuxt.options.runtimeConfig.public.scripts = defu(
|
|
1024
1070
|
nuxt.options.runtimeConfig.public.scripts || {},
|
|
1025
|
-
|
|
1071
|
+
registryWithDefaults
|
|
1026
1072
|
);
|
|
1027
1073
|
}
|
|
1028
1074
|
if (config.defaultScriptOptions?.bundle !== void 0) {
|
|
@@ -1196,6 +1242,24 @@ const module$1 = defineNuxtModule({
|
|
|
1196
1242
|
if (phConfig && !phConfig.apiHost) {
|
|
1197
1243
|
const region = phConfig.region || "us";
|
|
1198
1244
|
phConfig.apiHost = region === "eu" ? `${firstPartyCollectPrefix}/ph-eu` : `${firstPartyCollectPrefix}/ph`;
|
|
1245
|
+
const rtScripts = nuxt.options.runtimeConfig.public.scripts;
|
|
1246
|
+
if (rtScripts?.posthog && typeof rtScripts.posthog === "object") {
|
|
1247
|
+
const rtPhConfig = Array.isArray(rtScripts.posthog) ? rtScripts.posthog[0] : rtScripts.posthog;
|
|
1248
|
+
if (rtPhConfig)
|
|
1249
|
+
rtPhConfig.apiHost = phConfig.apiHost;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
if (config.registry?.plausibleAnalytics && typeof config.registry.plausibleAnalytics === "object") {
|
|
1254
|
+
const paConfig = Array.isArray(config.registry.plausibleAnalytics) ? config.registry.plausibleAnalytics[0] : config.registry.plausibleAnalytics;
|
|
1255
|
+
if (paConfig && !paConfig.endpoint) {
|
|
1256
|
+
paConfig.endpoint = `${firstPartyCollectPrefix}/plausible/api/event`;
|
|
1257
|
+
const rtScripts = nuxt.options.runtimeConfig.public.scripts;
|
|
1258
|
+
if (rtScripts?.plausibleAnalytics && typeof rtScripts.plausibleAnalytics === "object") {
|
|
1259
|
+
const rtPaConfig = Array.isArray(rtScripts.plausibleAnalytics) ? rtScripts.plausibleAnalytics[0] : rtScripts.plausibleAnalytics;
|
|
1260
|
+
if (rtPaConfig)
|
|
1261
|
+
rtPaConfig.endpoint = paConfig.endpoint;
|
|
1262
|
+
}
|
|
1199
1263
|
}
|
|
1200
1264
|
}
|
|
1201
1265
|
if (unsupportedScripts.length && nuxt.options.dev) {
|
package/dist/registry.mjs
CHANGED
|
@@ -8,6 +8,8 @@ async function registry(resolve) {
|
|
|
8
8
|
proxy: "plausible",
|
|
9
9
|
category: "analytics",
|
|
10
10
|
scriptBundling: (options) => {
|
|
11
|
+
if (options?.scriptId)
|
|
12
|
+
return `https://plausible.io/js/pa-${options.scriptId}.js`;
|
|
11
13
|
const extensions = Array.isArray(options?.extension) ? options.extension.join(".") : [options?.extension];
|
|
12
14
|
return options?.extension ? `https://plausible.io/js/script.${extensions}.js` : "https://plausible.io/js/script.js";
|
|
13
15
|
},
|
|
@@ -67,12 +67,11 @@ export function useScriptPlausibleAnalytics(_options) {
|
|
|
67
67
|
initOptions.autoCapturePageviews = options.autoCapturePageviews;
|
|
68
68
|
if (options?.captureOnLocalhost !== void 0)
|
|
69
69
|
initOptions.captureOnLocalhost = options.captureOnLocalhost;
|
|
70
|
-
const scriptInput =
|
|
71
|
-
|
|
72
|
-
"data-domain"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
};
|
|
70
|
+
const scriptInput = { src: scriptSrc };
|
|
71
|
+
if (!useNewScript && options?.domain)
|
|
72
|
+
scriptInput["data-domain"] = options.domain;
|
|
73
|
+
if (!useNewScript && options?.endpoint)
|
|
74
|
+
scriptInput["data-api"] = options.endpoint;
|
|
76
75
|
return {
|
|
77
76
|
scriptInput,
|
|
78
77
|
schema: import.meta.dev ? PlausibleAnalyticsOptionsSchema : void 0,
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -191,7 +191,7 @@ export interface ScriptRegistry {
|
|
|
191
191
|
export type NuxtConfigScriptRegistryEntry<T> = true | 'mock' | T | [T, NuxtUseScriptOptionsSerializable];
|
|
192
192
|
export type NuxtConfigScriptRegistry<T extends keyof ScriptRegistry = keyof ScriptRegistry> = Partial<{
|
|
193
193
|
[key in T]: NuxtConfigScriptRegistryEntry<ScriptRegistry[key]>;
|
|
194
|
-
}
|
|
194
|
+
}> & Record<string & {}, NuxtConfigScriptRegistryEntry<any>>;
|
|
195
195
|
export type UseFunctionType<T, U> = T extends {
|
|
196
196
|
use: infer V;
|
|
197
197
|
} ? V extends (...args: any) => any ? ReturnType<V> : U : U;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/scripts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.19",
|
|
5
5
|
"description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"@vue/test-utils": "^2.4.6",
|
|
130
130
|
"bumpp": "^10.4.1",
|
|
131
131
|
"eslint": "^10.0.2",
|
|
132
|
-
"eslint-plugin-harlanzw": "^0.5.
|
|
132
|
+
"eslint-plugin-harlanzw": "^0.5.16",
|
|
133
133
|
"happy-dom": "^20.8.3",
|
|
134
134
|
"knitwork": "^1.3.0",
|
|
135
135
|
"nuxt": "^4.3.1",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"vue": "^3.5.29",
|
|
142
142
|
"vue-router": "^5.0.3",
|
|
143
143
|
"vue-tsc": "^3.2.5",
|
|
144
|
-
"@nuxt/scripts": "1.0.0-beta.
|
|
144
|
+
"@nuxt/scripts": "1.0.0-beta.19"
|
|
145
145
|
},
|
|
146
146
|
"resolutions": {
|
|
147
147
|
"@nuxt/scripts": "workspace:*"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"54747b43-880a-49d1-91ff-d00dbcdf3ad7","timestamp":1772765383758,"prerendered":[]}
|