@nuxt/scripts 1.0.0-beta.2 → 1.0.0-beta.20

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 (165) hide show
  1. package/README.md +3 -3
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/{B66N9HCo.js → 9LJPrOyI.js} +1 -1
  5. package/dist/client/_nuxt/DFEfk2pB.js +162 -0
  6. package/dist/client/_nuxt/{DvH517bE.js → DMlY-BNa.js} +1 -1
  7. package/dist/client/_nuxt/{DfLgoB--.js → __ZZTkMj.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/8212d4fa-7985-421b-815a-03a886e667d4.json +1 -0
  10. package/dist/client/_nuxt/entry.CACgbLJl.css +1 -0
  11. package/dist/client/_nuxt/error-404.CHeaW3dp.css +1 -0
  12. package/dist/client/_nuxt/error-500.DvOvWme_.css +1 -0
  13. package/dist/client/index.html +1 -1
  14. package/dist/module.d.mts +27 -18
  15. package/dist/module.d.ts +178 -0
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +747 -527
  18. package/dist/registry.d.ts +6 -0
  19. package/dist/registry.mjs +74 -21
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +2 -2
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +7 -7
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +2 -2
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +6 -6
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +7 -7
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +6 -6
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +12 -12
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +6 -6
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +1 -1
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +6 -6
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +1 -1
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +5 -5
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +7 -7
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +7 -7
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +7 -7
  35. package/dist/runtime/components/ScriptCrisp.vue +1 -1
  36. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -1
  37. package/dist/runtime/components/ScriptGravatar.d.vue.ts +22 -0
  38. package/dist/runtime/components/ScriptGravatar.vue +46 -0
  39. package/dist/runtime/components/ScriptGravatar.vue.d.ts +22 -0
  40. package/dist/runtime/components/ScriptInstagramEmbed.vue +1 -1
  41. package/dist/runtime/components/ScriptIntercom.vue +4 -3
  42. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +43 -32
  43. package/dist/runtime/components/ScriptPayPalButtons.vue +48 -79
  44. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +43 -32
  45. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +37 -23
  46. package/dist/runtime/components/ScriptPayPalMessages.vue +46 -50
  47. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +37 -23
  48. package/dist/runtime/components/ScriptStripePricingTable.vue +2 -2
  49. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +9 -0
  50. package/dist/runtime/components/ScriptVimeoPlayer.vue +13 -10
  51. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +9 -0
  52. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +1 -1
  53. package/dist/runtime/components/ScriptXEmbed.vue +1 -1
  54. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +1 -1
  55. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +2 -2
  56. package/dist/runtime/components/ScriptYouTubePlayer.vue +11 -5
  57. package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +2 -2
  58. package/dist/runtime/composables/useScript.js +11 -6
  59. package/dist/runtime/composables/useScriptEventPage.js +2 -2
  60. package/dist/runtime/composables/useScriptTriggerConsent.js +1 -1
  61. package/dist/runtime/composables/useScriptTriggerElement.js +1 -1
  62. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +1 -1
  63. package/dist/runtime/registry/clarity.d.ts +10 -15
  64. package/dist/runtime/registry/clarity.js +22 -31
  65. package/dist/runtime/registry/cloudflare-web-analytics.d.ts +2 -13
  66. package/dist/runtime/registry/cloudflare-web-analytics.js +2 -14
  67. package/dist/runtime/registry/crisp.d.ts +9 -39
  68. package/dist/runtime/registry/crisp.js +2 -33
  69. package/dist/runtime/registry/databuddy-analytics.d.ts +2 -35
  70. package/dist/runtime/registry/databuddy-analytics.js +20 -45
  71. package/dist/runtime/registry/fathom-analytics.d.ts +6 -25
  72. package/dist/runtime/registry/fathom-analytics.js +2 -24
  73. package/dist/runtime/registry/google-adsense.d.ts +2 -10
  74. package/dist/runtime/registry/google-adsense.js +2 -11
  75. package/dist/runtime/registry/google-analytics.d.ts +3 -5
  76. package/dist/runtime/registry/google-analytics.js +3 -8
  77. package/dist/runtime/registry/google-maps.d.ts +3 -9
  78. package/dist/runtime/registry/google-maps.js +2 -8
  79. package/dist/runtime/registry/google-recaptcha.d.ts +2 -6
  80. package/dist/runtime/registry/google-recaptcha.js +4 -12
  81. package/dist/runtime/registry/google-sign-in.d.ts +2 -13
  82. package/dist/runtime/registry/google-sign-in.js +2 -22
  83. package/dist/runtime/registry/google-tag-manager.d.ts +3 -28
  84. package/dist/runtime/registry/google-tag-manager.js +4 -27
  85. package/dist/runtime/registry/gravatar.d.ts +25 -0
  86. package/dist/runtime/registry/gravatar.js +32 -0
  87. package/dist/runtime/registry/hotjar.d.ts +3 -5
  88. package/dist/runtime/registry/hotjar.js +2 -5
  89. package/dist/runtime/registry/instagram-embed.d.ts +2 -17
  90. package/dist/runtime/registry/instagram-embed.js +4 -19
  91. package/dist/runtime/registry/intercom.d.ts +3 -11
  92. package/dist/runtime/registry/intercom.js +2 -12
  93. package/dist/runtime/registry/matomo-analytics.d.ts +2 -11
  94. package/dist/runtime/registry/matomo-analytics.js +3 -12
  95. package/dist/runtime/registry/meta-pixel.d.ts +3 -5
  96. package/dist/runtime/registry/meta-pixel.js +2 -4
  97. package/dist/runtime/registry/npm.d.ts +2 -6
  98. package/dist/runtime/registry/npm.js +2 -9
  99. package/dist/runtime/registry/paypal.d.ts +4 -25
  100. package/dist/runtime/registry/paypal.js +3 -66
  101. package/dist/runtime/registry/plausible-analytics.js +18 -13
  102. package/dist/runtime/registry/posthog.d.ts +10 -11
  103. package/dist/runtime/registry/posthog.js +7 -20
  104. package/dist/runtime/registry/reddit-pixel.d.ts +4 -5
  105. package/dist/runtime/registry/reddit-pixel.js +2 -4
  106. package/dist/runtime/registry/rybbit-analytics.d.ts +2 -14
  107. package/dist/runtime/registry/rybbit-analytics.js +7 -19
  108. package/dist/runtime/registry/schemas.d.ts +946 -0
  109. package/dist/runtime/registry/schemas.js +901 -0
  110. package/dist/runtime/registry/segment.d.ts +2 -5
  111. package/dist/runtime/registry/segment.js +2 -5
  112. package/dist/runtime/registry/snapchat-pixel.d.ts +3 -32
  113. package/dist/runtime/registry/snapchat-pixel.js +2 -20
  114. package/dist/runtime/registry/stripe.d.ts +3 -4
  115. package/dist/runtime/registry/stripe.js +2 -4
  116. package/dist/runtime/registry/tiktok-pixel.d.ts +3 -6
  117. package/dist/runtime/registry/tiktok-pixel.js +2 -6
  118. package/dist/runtime/registry/umami-analytics.d.ts +2 -31
  119. package/dist/runtime/registry/umami-analytics.js +2 -36
  120. package/dist/runtime/registry/vercel-analytics.d.ts +29 -0
  121. package/dist/runtime/registry/vercel-analytics.js +84 -0
  122. package/dist/runtime/registry/vimeo-player.d.ts +2 -2
  123. package/dist/runtime/registry/vimeo-player.js +1 -1
  124. package/dist/runtime/registry/x-embed.d.ts +2 -16
  125. package/dist/runtime/registry/x-embed.js +2 -17
  126. package/dist/runtime/registry/x-pixel.d.ts +3 -6
  127. package/dist/runtime/registry/x-pixel.js +2 -5
  128. package/dist/runtime/registry/youtube-player.d.ts +7 -7
  129. package/dist/runtime/registry/youtube-player.js +1 -1
  130. package/dist/runtime/server/google-static-maps-proxy.js +1 -1
  131. package/dist/runtime/server/{sw-handler.d.ts → gravatar-proxy.d.ts} +1 -1
  132. package/dist/runtime/server/gravatar-proxy.js +62 -0
  133. package/dist/runtime/server/instagram-embed-asset.js +2 -1
  134. package/dist/runtime/server/instagram-embed-image.js +2 -1
  135. package/dist/runtime/server/instagram-embed.js +22 -13
  136. package/dist/runtime/server/proxy-handler.js +161 -117
  137. package/dist/runtime/server/utils/privacy.d.ts +45 -1
  138. package/dist/runtime/server/utils/privacy.js +103 -40
  139. package/dist/runtime/server/x-embed.js +3 -2
  140. package/dist/runtime/types.d.ts +30 -24
  141. package/dist/runtime/utils/pure.d.ts +0 -4
  142. package/dist/runtime/utils/pure.js +0 -67
  143. package/dist/runtime/utils.d.ts +3 -3
  144. package/dist/runtime/utils.js +12 -7
  145. package/dist/shared/scripts.Crpn87WB.mjs +318 -0
  146. package/dist/stats.d.mts +39 -0
  147. package/dist/stats.d.ts +39 -0
  148. package/dist/stats.mjs +772 -0
  149. package/dist/types-source.d.mts +19 -0
  150. package/dist/types-source.d.ts +19 -0
  151. package/dist/types-source.mjs +975 -0
  152. package/package.json +42 -31
  153. package/dist/client/_nuxt/B8XOar-X.js +0 -162
  154. package/dist/client/_nuxt/builds/meta/133a46c5-a5c1-4a63-87d1-037947a5bcdb.json +0 -1
  155. package/dist/client/_nuxt/entry.D45OuV0w.css +0 -1
  156. package/dist/client/_nuxt/error-404.B57D-jUQ.css +0 -1
  157. package/dist/client/_nuxt/error-500.DTHUW7BI.css +0 -1
  158. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +0 -52
  159. package/dist/runtime/components/ScriptPayPalMarks.vue +0 -69
  160. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +0 -52
  161. package/dist/runtime/plugins/sw-register.client.d.ts +0 -2
  162. package/dist/runtime/plugins/sw-register.client.js +0 -12
  163. package/dist/runtime/server/sw-handler.js +0 -25
  164. package/dist/runtime/sw/proxy-sw.template.d.ts +0 -1
  165. package/dist/runtime/sw/proxy-sw.template.js +0 -54
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0-beta.20",
5
5
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
6
6
  "author": {
7
- "website": "https://harlanzw.com",
8
7
  "name": "Harlan Wilton",
9
- "email": "harlan@harlanzw.com"
8
+ "email": "harlan@harlanzw.com",
9
+ "url": "https://harlanzw.com"
10
10
  },
11
11
  "license": "MIT",
12
12
  "repository": {
@@ -22,12 +22,12 @@
22
22
  "types": "./dist/types.d.mts",
23
23
  "import": "./dist/module.mjs"
24
24
  },
25
- "./registry": "./dist/registry.mjs"
25
+ "./registry": "./dist/registry.mjs",
26
+ "./stats": "./dist/stats.mjs",
27
+ "./types-source": "./dist/types-source.mjs"
26
28
  },
27
29
  "main": "./dist/module.mjs",
28
- "files": [
29
- "dist"
30
- ],
30
+ "types": "./dist/types.d.mts",
31
31
  "typesVersions": {
32
32
  "*": {
33
33
  ".": [
@@ -35,9 +35,18 @@
35
35
  ],
36
36
  "registry": [
37
37
  "./dist/registry.d.mts"
38
+ ],
39
+ "stats": [
40
+ "./dist/stats.d.mts"
41
+ ],
42
+ "types-source": [
43
+ "./dist/types-source.d.mts"
38
44
  ]
39
45
  }
40
46
  },
47
+ "files": [
48
+ "dist"
49
+ ],
41
50
  "build": {
42
51
  "externals": [
43
52
  "@unhead/vue",
@@ -67,10 +76,10 @@
67
76
  "@googlemaps/markerclusterer": {
68
77
  "optional": true
69
78
  },
70
- "@stripe/stripe-js": {
79
+ "@paypal/paypal-js": {
71
80
  "optional": true
72
81
  },
73
- "@paypal/paypal-js": {
82
+ "@stripe/stripe-js": {
74
83
  "optional": true
75
84
  },
76
85
  "@types/google.maps": {
@@ -87,70 +96,72 @@
87
96
  }
88
97
  },
89
98
  "dependencies": {
90
- "@nuxt/devtools-kit": "^3.2.1",
99
+ "@nuxt/devtools-kit": "^3.2.3",
91
100
  "@nuxt/kit": "^4.3.1",
92
101
  "@vueuse/core": "^14.2.1",
93
102
  "consola": "^3.4.2",
94
103
  "defu": "^6.1.4",
95
- "h3": "^1.15.5",
104
+ "h3": "^1.15.6",
96
105
  "magic-string": "^0.30.21",
97
106
  "ofetch": "^1.5.1",
98
107
  "ohash": "^2.0.11",
99
- "oxc-parser": "^0.115.0",
108
+ "oxc-parser": "^0.117.0",
100
109
  "oxc-walker": "^0.7.0",
101
110
  "pathe": "^2.0.3",
102
111
  "pkg-types": "^2.3.0",
103
112
  "sirv": "^3.0.2",
104
- "std-env": "^3.10.0",
113
+ "std-env": "^4.0.0",
105
114
  "ufo": "^1.6.3",
106
115
  "unplugin": "^3.0.0",
107
116
  "unstorage": "^1.17.4",
108
117
  "valibot": "^1.2.0"
109
118
  },
110
119
  "devDependencies": {
111
- "@nuxt/devtools-ui-kit": "^3.2.1",
112
- "@nuxt/eslint-config": "^1.15.2",
120
+ "@antfu/eslint-config": "^7.7.0",
121
+ "@nuxt/devtools-ui-kit": "^3.2.3",
113
122
  "@nuxt/module-builder": "^1.0.2",
114
123
  "@nuxt/test-utils": "^4.0.0",
115
124
  "@nuxtjs/partytown": "^2.0.0",
116
- "@paypal/paypal-js": "^9.3.0",
125
+ "@paypal/paypal-js": "^9.4.0",
117
126
  "@types/semver": "^7.7.1",
118
- "@typescript-eslint/typescript-estree": "^8.56.1",
127
+ "@types/youtube": "^0.1.2",
128
+ "@typescript-eslint/typescript-estree": "^8.57.0",
119
129
  "@vue/test-utils": "^2.4.6",
120
130
  "bumpp": "^10.4.1",
121
- "changelogen": "^0.6.2",
122
- "eslint": "^10.0.2",
123
- "eslint-plugin-n": "^17.24.0",
124
- "happy-dom": "^20.7.0",
131
+ "eslint": "^10.0.3",
132
+ "eslint-plugin-harlanzw": "^0.5.17",
133
+ "happy-dom": "^20.8.3",
125
134
  "knitwork": "^1.3.0",
126
135
  "nuxt": "^4.3.1",
127
136
  "playwright-core": "^1.58.2",
128
- "posthog-js": "^1.353.0",
129
- "shiki": "^3.22.0",
130
- "typescript": "5.9.3",
137
+ "posthog-js": "^1.360.0",
138
+ "shiki": "^4.0.2",
139
+ "typescript": "^5.9.3",
131
140
  "vitest": "^4.0.18",
132
- "vue": "^3.5.29",
141
+ "vue": "^3.5.30",
133
142
  "vue-router": "^5.0.3",
134
143
  "vue-tsc": "^3.2.5",
135
- "@nuxt/scripts": "1.0.0-beta.2"
144
+ "@nuxt/scripts": "1.0.0-beta.20"
136
145
  },
137
146
  "resolutions": {
138
147
  "@nuxt/scripts": "workspace:*"
139
148
  },
140
149
  "scripts": {
141
150
  "build": "pnpm dev:prepare && pnpm prepack",
151
+ "generate:types": "pnpm dlx tsx scripts/generate-registry-types.ts",
142
152
  "client:build": "nuxi generate client",
143
153
  "client:dev": "nuxi dev client --port 3300",
144
154
  "dev": "nuxi dev playground",
145
155
  "dev:ssl": "nuxi dev playground --https",
156
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm prepare:fixtures",
146
157
  "prepare:fixtures": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/cdn && nuxi prepare test/fixtures/extend-registry && nuxi prepare test/fixtures/partytown && nuxi prepare test/fixtures/first-party",
147
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm run prepare:fixtures",
148
- "typecheck": "vue-tsc --noEmit",
149
- "bump": "bumpp package.json --commit --push --tag",
150
- "release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\"",
158
+ "typecheck": "nuxt typecheck",
159
+ "release": "pnpm build && bumpp --output=CHANGELOG.md",
151
160
  "lint": "eslint .",
152
161
  "lint:fix": "eslint . --fix",
153
- "test": "pnpm dev:prepare && vitest --run",
162
+ "test": "vitest",
163
+ "test:run": "vitest run",
164
+ "test:e2e-dev": "vitest run --project e2e-dev",
154
165
  "test:types": "vitest run --project typecheck"
155
166
  }
156
167
  }