@nuxt/scripts 1.0.0-beta.4 → 1.0.0-beta.5
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/{Ds2G8aQM.js → BdlC6_ZE.js} +1 -1
- package/dist/client/_nuxt/{D-kOnTuH.js → BjwaReHq.js} +3 -3
- package/dist/client/_nuxt/{DdVDSbUA.js → DHQOiKH-.js} +1 -1
- package/dist/client/_nuxt/{CD5B-xvT.js → Yng0Yl3W.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/d7be6a88-31d8-4c91-90c7-54ab7d487a0f.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/registry/posthog.js +3 -1
- package/dist/runtime/utils/pure.js +3 -3
- package/package.json +3 -3
- package/dist/client/_nuxt/builds/meta/cc1ba70f-082b-4dc7-8639-5f076fef2cfa.json +0 -1
|
@@ -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"./BjwaReHq.js";import{u as i}from"./BdlC6_ZE.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)=>(a(),s("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-2367f596"]]);export{x as default};
|
|
@@ -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"./BjwaReHq.js";import{u as f}from"./BdlC6_ZE.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-85347797"]]);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"d7be6a88-31d8-4c91-90c7-54ab7d487a0f","timestamp":1772073969311}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"d7be6a88-31d8-4c91-90c7-54ab7d487a0f","timestamp":1772073969311,"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/BjwaReHq.js"><script type="module" src="/__nuxt-scripts/_nuxt/BjwaReHq.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:""},"nuxt-scripts-sw":{path:"/_nuxt-scripts-sw.js"}},app:{baseURL:"/__nuxt-scripts",buildId:"d7be6a88-31d8-4c91-90c7-54ab7d487a0f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1772073973764,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1203,7 +1203,7 @@ export default defineNuxtPlugin({
|
|
|
1203
1203
|
? parsed.pathname.slice(rule.pathPrefix.length)
|
|
1204
1204
|
: parsed.pathname;
|
|
1205
1205
|
const separator = pathWithoutPrefix.startsWith('/') ? '' : '/';
|
|
1206
|
-
const proxyUrl = rule.target + separator + pathWithoutPrefix + parsed.search;
|
|
1206
|
+
const proxyUrl = window.location.origin + rule.target + separator + pathWithoutPrefix + parsed.search;
|
|
1207
1207
|
|
|
1208
1208
|
return originalBeacon(proxyUrl, data);
|
|
1209
1209
|
}
|
|
@@ -48,7 +48,9 @@ export function useScriptPostHog(_options) {
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
const region = options?.region || "us";
|
|
51
|
-
|
|
51
|
+
let apiHost = options?.apiHost || (region === "eu" ? "https://eu.i.posthog.com" : "https://us.i.posthog.com");
|
|
52
|
+
if (apiHost.startsWith("/"))
|
|
53
|
+
apiHost = window.location.origin + apiHost;
|
|
52
54
|
window.__posthogInitPromise = import("posthog-js").then(({ default: posthog }) => {
|
|
53
55
|
const config = {
|
|
54
56
|
api_host: apiHost,
|
|
@@ -47,7 +47,7 @@ export function rewriteScriptUrls(content, rewrites) {
|
|
|
47
47
|
}
|
|
48
48
|
if (shouldRewrite) {
|
|
49
49
|
const rewritten = rewriteSuffix === "/" || rewriteSuffix.startsWith("?") || rewriteSuffix.startsWith("#") ? to + rewriteSuffix : joinURL(to, rewriteSuffix);
|
|
50
|
-
return quote + rewritten + quote;
|
|
50
|
+
return "self.location.origin+" + quote + rewritten + quote;
|
|
51
51
|
}
|
|
52
52
|
return match;
|
|
53
53
|
});
|
|
@@ -56,11 +56,11 @@ export function rewriteScriptUrls(content, rewrites) {
|
|
|
56
56
|
if (gaRewrite) {
|
|
57
57
|
result = result.replace(
|
|
58
58
|
/"https:\/\/"\+\(.*?\)\+"\.google-analytics\.com\/g\/collect"/g,
|
|
59
|
-
`"${gaRewrite.to}"`
|
|
59
|
+
`self.location.origin+"${gaRewrite.to}"`
|
|
60
60
|
);
|
|
61
61
|
result = result.replace(
|
|
62
62
|
/"https:\/\/"\+\(.*?\)\+"\.analytics\.google\.com\/g\/collect"/g,
|
|
63
|
-
`"${gaRewrite.to}"`
|
|
63
|
+
`self.location.origin+"${gaRewrite.to}"`
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
return result;
|
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.5",
|
|
5
5
|
"description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"knitwork": "^1.3.0",
|
|
126
126
|
"nuxt": "^4.3.1",
|
|
127
127
|
"playwright-core": "^1.58.2",
|
|
128
|
-
"posthog-js": "^1.
|
|
128
|
+
"posthog-js": "^1.354.3",
|
|
129
129
|
"shiki": "^3.23.0",
|
|
130
130
|
"typescript": "5.9.3",
|
|
131
131
|
"vitest": "^4.0.18",
|
|
132
132
|
"vue": "^3.5.29",
|
|
133
133
|
"vue-router": "^5.0.3",
|
|
134
134
|
"vue-tsc": "^3.2.5",
|
|
135
|
-
"@nuxt/scripts": "1.0.0-beta.
|
|
135
|
+
"@nuxt/scripts": "1.0.0-beta.5"
|
|
136
136
|
},
|
|
137
137
|
"resolutions": {
|
|
138
138
|
"@nuxt/scripts": "workspace:*"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"cc1ba70f-082b-4dc7-8639-5f076fef2cfa","timestamp":1772035753039,"prerendered":[]}
|