@nuxt/scripts 1.0.0-beta.31 → 1.0.0-beta.32
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/{6CwTUC2b.js → CxpRPAAJ.js} +1 -1
- package/dist/client/_nuxt/{B71AlSZ1.js → D0d_xOOu.js} +1 -1
- package/dist/client/_nuxt/{BYGJV5dd.js → DxzaVa0B.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/d7ecb215-eee2-4720-b2bc-f3ad271b9c30.json +1 -0
- package/dist/client/_nuxt/entry.esAfLJmC.css +1 -0
- package/dist/client/_nuxt/ojT6Btul.js +162 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +22 -44
- package/dist/module.d.ts +22 -44
- package/dist/module.json +1 -1
- package/dist/module.mjs +204 -163
- package/dist/registry.d.mts +6 -1
- package/dist/registry.d.ts +6 -1
- package/dist/registry.mjs +145 -6
- package/dist/runtime/registry/gravatar.d.ts +1 -1
- package/dist/runtime/server/proxy-handler.js +0 -1
- package/dist/runtime/server/utils/privacy.d.ts +0 -8
- package/dist/runtime/server/utils/privacy.js +7 -7
- package/dist/runtime/types.d.ts +71 -13
- package/dist/shared/scripts.T4Z99VT8.mjs +37 -0
- package/dist/stats.mjs +3 -3
- package/dist/types-source.mjs +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +2 -2
- package/dist/client/_nuxt/V4W-T8W6.js +0 -162
- package/dist/client/_nuxt/builds/meta/70b59a3e-a025-4a77-a25a-dfadf5b1749d.json +0 -1
- package/dist/client/_nuxt/entry.C5SUNdim.css +0 -1
- package/dist/shared/scripts.D7e2ENu6.mjs +0 -211
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.
|
|
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.esAfLJmC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/ojT6Btul.js"><script type="module" src="/__nuxt-scripts/_nuxt/ojT6Btul.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:"d7ecb215-eee2-4720-b2bc-f3ad271b9c30",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774074028342,false]</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -19,38 +19,14 @@ import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
|
|
|
19
19
|
* from the per-script default.
|
|
20
20
|
*/
|
|
21
21
|
type FirstPartyPrivacy = ProxyPrivacyInput;
|
|
22
|
-
interface FirstPartyOptions {
|
|
23
|
-
/**
|
|
24
|
-
* Path prefix for proxy endpoints.
|
|
25
|
-
*
|
|
26
|
-
* Analytics collection requests are proxied through these paths.
|
|
27
|
-
* For example, Google Analytics collection goes to `/_scripts/p/www.google-analytics.com/g/collect`.
|
|
28
|
-
* @default '/_scripts/p'
|
|
29
|
-
* @example '/_tracking'
|
|
30
|
-
*/
|
|
31
|
-
proxyPrefix?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Global privacy override for all proxied scripts.
|
|
34
|
-
*
|
|
35
|
-
* By default, each script uses its own privacy controls from the registry.
|
|
36
|
-
* Set this to override all scripts at once:
|
|
37
|
-
*
|
|
38
|
-
* - `true` - Full anonymize for all scripts
|
|
39
|
-
* - `false` - Passthrough for all scripts (still strips sensitive auth headers)
|
|
40
|
-
* - `{ ip: false }` - Selective override (unset flags inherit per-script defaults)
|
|
41
|
-
*
|
|
42
|
-
* @default undefined
|
|
43
|
-
*/
|
|
44
|
-
privacy?: FirstPartyPrivacy;
|
|
45
|
-
}
|
|
46
22
|
|
|
47
23
|
interface ModuleOptions {
|
|
48
24
|
/**
|
|
49
|
-
*
|
|
25
|
+
* Proxy configuration for routing third-party scripts through your domain.
|
|
50
26
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
27
|
+
* By default (undefined), proxy infrastructure is auto-registered when any
|
|
28
|
+
* configured script has `reverseProxyIntercept` capability enabled. Set to
|
|
29
|
+
* `false` to globally disable all proxying.
|
|
54
30
|
*
|
|
55
31
|
* **Benefits:**
|
|
56
32
|
* - User IPs stay private (third parties see your server's IP)
|
|
@@ -58,28 +34,30 @@ interface ModuleOptions {
|
|
|
58
34
|
* - Works with ad blockers (requests appear first-party)
|
|
59
35
|
* - Faster loads (no extra DNS lookups)
|
|
60
36
|
*
|
|
61
|
-
*
|
|
62
|
-
* - `true`
|
|
63
|
-
* - `false` - Disable (scripts load directly from third parties)
|
|
64
|
-
* - `{ proxyPrefix: '/_analytics' }` - Enable with custom paths
|
|
65
|
-
*
|
|
66
|
-
* For static hosting, scripts are bundled but proxy endpoints require
|
|
67
|
-
* platform rewrites (see docs). A warning is shown for static presets.
|
|
37
|
+
* Per-script opt-out: set `reverseProxyIntercept: false` in a script's options.
|
|
38
|
+
* Per-script opt-in for partytown: set `partytown: true` in a script's options.
|
|
68
39
|
*
|
|
69
|
-
* @default
|
|
40
|
+
* @default undefined (auto-inferred from script capabilities)
|
|
70
41
|
* @see https://scripts.nuxt.com/docs/guides/first-party
|
|
71
42
|
*/
|
|
72
|
-
|
|
43
|
+
proxy?: false | {
|
|
44
|
+
/**
|
|
45
|
+
* Path prefix for proxy endpoints.
|
|
46
|
+
* @default '/_scripts/p'
|
|
47
|
+
* @example '/_tracking'
|
|
48
|
+
*/
|
|
49
|
+
prefix?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Global privacy override for all proxied scripts.
|
|
52
|
+
* By default, each script uses its own privacy controls from the registry.
|
|
53
|
+
* @default undefined (per-script defaults)
|
|
54
|
+
*/
|
|
55
|
+
privacy?: FirstPartyPrivacy;
|
|
56
|
+
};
|
|
73
57
|
/**
|
|
74
58
|
* The registry of supported third-party scripts. Loads the scripts in globally using the default script options.
|
|
75
59
|
*/
|
|
76
60
|
registry?: NuxtConfigScriptRegistry;
|
|
77
|
-
/**
|
|
78
|
-
* Registry scripts to load via Partytown (web worker).
|
|
79
|
-
* Shorthand for setting `partytown: true` on individual registry scripts.
|
|
80
|
-
* @example ['googleAnalytics', 'plausible', 'fathom']
|
|
81
|
-
*/
|
|
82
|
-
partytown?: (keyof NuxtConfigScriptRegistry)[];
|
|
83
61
|
/**
|
|
84
62
|
* Default options for scripts.
|
|
85
63
|
*/
|
|
@@ -161,4 +139,4 @@ interface ModuleHooks {
|
|
|
161
139
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
162
140
|
|
|
163
141
|
export { _default as default };
|
|
164
|
-
export type {
|
|
142
|
+
export type { FirstPartyPrivacy, ModuleHooks, ModuleOptions };
|
package/dist/module.d.ts
CHANGED
|
@@ -19,38 +19,14 @@ import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
|
|
|
19
19
|
* from the per-script default.
|
|
20
20
|
*/
|
|
21
21
|
type FirstPartyPrivacy = ProxyPrivacyInput;
|
|
22
|
-
interface FirstPartyOptions {
|
|
23
|
-
/**
|
|
24
|
-
* Path prefix for proxy endpoints.
|
|
25
|
-
*
|
|
26
|
-
* Analytics collection requests are proxied through these paths.
|
|
27
|
-
* For example, Google Analytics collection goes to `/_scripts/p/www.google-analytics.com/g/collect`.
|
|
28
|
-
* @default '/_scripts/p'
|
|
29
|
-
* @example '/_tracking'
|
|
30
|
-
*/
|
|
31
|
-
proxyPrefix?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Global privacy override for all proxied scripts.
|
|
34
|
-
*
|
|
35
|
-
* By default, each script uses its own privacy controls from the registry.
|
|
36
|
-
* Set this to override all scripts at once:
|
|
37
|
-
*
|
|
38
|
-
* - `true` - Full anonymize for all scripts
|
|
39
|
-
* - `false` - Passthrough for all scripts (still strips sensitive auth headers)
|
|
40
|
-
* - `{ ip: false }` - Selective override (unset flags inherit per-script defaults)
|
|
41
|
-
*
|
|
42
|
-
* @default undefined
|
|
43
|
-
*/
|
|
44
|
-
privacy?: FirstPartyPrivacy;
|
|
45
|
-
}
|
|
46
22
|
|
|
47
23
|
interface ModuleOptions {
|
|
48
24
|
/**
|
|
49
|
-
*
|
|
25
|
+
* Proxy configuration for routing third-party scripts through your domain.
|
|
50
26
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
27
|
+
* By default (undefined), proxy infrastructure is auto-registered when any
|
|
28
|
+
* configured script has `reverseProxyIntercept` capability enabled. Set to
|
|
29
|
+
* `false` to globally disable all proxying.
|
|
54
30
|
*
|
|
55
31
|
* **Benefits:**
|
|
56
32
|
* - User IPs stay private (third parties see your server's IP)
|
|
@@ -58,28 +34,30 @@ interface ModuleOptions {
|
|
|
58
34
|
* - Works with ad blockers (requests appear first-party)
|
|
59
35
|
* - Faster loads (no extra DNS lookups)
|
|
60
36
|
*
|
|
61
|
-
*
|
|
62
|
-
* - `true`
|
|
63
|
-
* - `false` - Disable (scripts load directly from third parties)
|
|
64
|
-
* - `{ proxyPrefix: '/_analytics' }` - Enable with custom paths
|
|
65
|
-
*
|
|
66
|
-
* For static hosting, scripts are bundled but proxy endpoints require
|
|
67
|
-
* platform rewrites (see docs). A warning is shown for static presets.
|
|
37
|
+
* Per-script opt-out: set `reverseProxyIntercept: false` in a script's options.
|
|
38
|
+
* Per-script opt-in for partytown: set `partytown: true` in a script's options.
|
|
68
39
|
*
|
|
69
|
-
* @default
|
|
40
|
+
* @default undefined (auto-inferred from script capabilities)
|
|
70
41
|
* @see https://scripts.nuxt.com/docs/guides/first-party
|
|
71
42
|
*/
|
|
72
|
-
|
|
43
|
+
proxy?: false | {
|
|
44
|
+
/**
|
|
45
|
+
* Path prefix for proxy endpoints.
|
|
46
|
+
* @default '/_scripts/p'
|
|
47
|
+
* @example '/_tracking'
|
|
48
|
+
*/
|
|
49
|
+
prefix?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Global privacy override for all proxied scripts.
|
|
52
|
+
* By default, each script uses its own privacy controls from the registry.
|
|
53
|
+
* @default undefined (per-script defaults)
|
|
54
|
+
*/
|
|
55
|
+
privacy?: FirstPartyPrivacy;
|
|
56
|
+
};
|
|
73
57
|
/**
|
|
74
58
|
* The registry of supported third-party scripts. Loads the scripts in globally using the default script options.
|
|
75
59
|
*/
|
|
76
60
|
registry?: NuxtConfigScriptRegistry;
|
|
77
|
-
/**
|
|
78
|
-
* Registry scripts to load via Partytown (web worker).
|
|
79
|
-
* Shorthand for setting `partytown: true` on individual registry scripts.
|
|
80
|
-
* @example ['googleAnalytics', 'plausible', 'fathom']
|
|
81
|
-
*/
|
|
82
|
-
partytown?: (keyof NuxtConfigScriptRegistry)[];
|
|
83
61
|
/**
|
|
84
62
|
* Default options for scripts.
|
|
85
63
|
*/
|
|
@@ -161,4 +139,4 @@ interface ModuleHooks {
|
|
|
161
139
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
162
140
|
|
|
163
141
|
export { _default as default };
|
|
164
|
-
export type {
|
|
142
|
+
export type { FirstPartyPrivacy, ModuleHooks, ModuleOptions };
|