@nuxt/scripts 1.0.0-beta.30 → 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.
Files changed (37) hide show
  1. package/dist/client/200.html +1 -1
  2. package/dist/client/404.html +1 -1
  3. package/dist/client/_nuxt/{CYlYSSNW.js → CxpRPAAJ.js} +1 -1
  4. package/dist/client/_nuxt/{D5FIkDae.js → D0d_xOOu.js} +1 -1
  5. package/dist/client/_nuxt/{AwAKM0sG.js → DxzaVa0B.js} +1 -1
  6. package/dist/client/_nuxt/builds/latest.json +1 -1
  7. package/dist/client/_nuxt/builds/meta/d7ecb215-eee2-4720-b2bc-f3ad271b9c30.json +1 -0
  8. package/dist/client/_nuxt/entry.esAfLJmC.css +1 -0
  9. package/dist/client/_nuxt/ojT6Btul.js +162 -0
  10. package/dist/client/index.html +1 -1
  11. package/dist/module.d.mts +23 -45
  12. package/dist/module.d.ts +23 -45
  13. package/dist/module.json +1 -1
  14. package/dist/module.mjs +241 -227
  15. package/dist/registry.d.mts +6 -1
  16. package/dist/registry.d.ts +6 -1
  17. package/dist/registry.mjs +150 -11
  18. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +5 -2
  19. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +11 -2
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +5 -2
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +14 -0
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +50 -1
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +14 -0
  24. package/dist/runtime/registry/gravatar.d.ts +1 -1
  25. package/dist/runtime/server/proxy-handler.js +25 -36
  26. package/dist/runtime/server/utils/privacy.d.ts +0 -8
  27. package/dist/runtime/server/utils/privacy.js +7 -7
  28. package/dist/runtime/types.d.ts +71 -13
  29. package/dist/shared/scripts.T4Z99VT8.mjs +37 -0
  30. package/dist/stats.mjs +7 -15
  31. package/dist/types-source.mjs +16 -2
  32. package/dist/types.d.mts +1 -1
  33. package/package.json +2 -2
  34. package/dist/client/_nuxt/Bl23o3st.js +0 -162
  35. package/dist/client/_nuxt/builds/meta/f0b4dd20-8496-4003-b7a3-05cbae515923.json +0 -1
  36. package/dist/client/_nuxt/entry.C5SUNdim.css +0 -1
  37. package/dist/shared/scripts.ViOoYQXH.mjs +0 -381
@@ -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/Bl23o3st.js"><script type="module" src="/__nuxt-scripts/_nuxt/Bl23o3st.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:"f0b4dd20-8496-4003-b7a3-05cbae515923",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774019045969,false]</script></body></html>
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
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { FetchOptions } from 'ofetch';
3
- import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
4
3
  import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
4
+ import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
5
5
 
6
6
  /**
7
7
  * Global privacy override for all first-party proxy requests.
@@ -19,38 +19,14 @@ import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializ
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/ga/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
- * Route third-party scripts through your domain for improved privacy.
25
+ * Proxy configuration for routing third-party scripts through your domain.
50
26
  *
51
- * When enabled, scripts are downloaded at build time and served from your domain.
52
- * Collection endpoints (analytics, pixels) are also routed through your server,
53
- * keeping user IPs private and eliminating third-party cookies.
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
- * **Options:**
62
- * - `true` - Enable for all supported scripts (default)
63
- * - `false` - Disable (scripts load directly from third parties)
64
- * - `{ proxyPrefix: '/_analytics' }` - Enable with custom paths
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.
65
39
  *
66
- * For static hosting, scripts are bundled but proxy endpoints require
67
- * platform rewrites (see docs). A warning is shown for static presets.
68
- *
69
- * @default true
40
+ * @default undefined (auto-inferred from script capabilities)
70
41
  * @see https://scripts.nuxt.com/docs/guides/first-party
71
42
  */
72
- firstParty?: boolean | FirstPartyOptions;
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 { FirstPartyOptions, FirstPartyPrivacy, ModuleHooks, ModuleOptions };
142
+ export type { FirstPartyPrivacy, ModuleHooks, ModuleOptions };
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 { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
4
3
  import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializable, NuxtUseScriptInput } from '../dist/runtime/types.js';
4
+ import { ProxyPrivacyInput } from '../dist/runtime/server/utils/privacy.js';
5
5
 
6
6
  /**
7
7
  * Global privacy override for all first-party proxy requests.
@@ -19,38 +19,14 @@ import { RegistryScripts, NuxtConfigScriptRegistry, NuxtUseScriptOptionsSerializ
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/ga/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
- * Route third-party scripts through your domain for improved privacy.
25
+ * Proxy configuration for routing third-party scripts through your domain.
50
26
  *
51
- * When enabled, scripts are downloaded at build time and served from your domain.
52
- * Collection endpoints (analytics, pixels) are also routed through your server,
53
- * keeping user IPs private and eliminating third-party cookies.
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
- * **Options:**
62
- * - `true` - Enable for all supported scripts (default)
63
- * - `false` - Disable (scripts load directly from third parties)
64
- * - `{ proxyPrefix: '/_analytics' }` - Enable with custom paths
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.
65
39
  *
66
- * For static hosting, scripts are bundled but proxy endpoints require
67
- * platform rewrites (see docs). A warning is shown for static presets.
68
- *
69
- * @default true
40
+ * @default undefined (auto-inferred from script capabilities)
70
41
  * @see https://scripts.nuxt.com/docs/guides/first-party
71
42
  */
72
- firstParty?: boolean | FirstPartyOptions;
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 { FirstPartyOptions, FirstPartyPrivacy, ModuleHooks, ModuleOptions };
142
+ export type { FirstPartyPrivacy, ModuleHooks, ModuleOptions };
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16"
6
6
  },
7
- "version": "1.0.0-beta.30",
7
+ "version": "1.0.0-beta.32",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"