@gscdump/devframe 7.0.0 → 7.1.0

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/README.md CHANGED
@@ -29,20 +29,31 @@ export default defineConfig({
29
29
 
30
30
  ## Nuxt
31
31
 
32
- Nuxt DevTools 4 hosts Vite DevTools docks. Add the plugin to Nuxt's Vite config:
32
+ Nuxt DevTools 4 hosts the Search Console dock. Add the official Nuxt module:
33
33
 
34
34
  ```ts
35
35
  // nuxt.config.ts
36
- import { gscdump } from '@gscdump/devframe/vite'
37
-
38
36
  export default defineNuxtConfig({
37
+ modules: ['@gscdump/devframe/nuxt'],
39
38
  devtools: { enabled: true },
40
- vite: {
41
- plugins: [gscdump({ site: 'example.com' })],
39
+ gscdump: {
40
+ site: 'example.com',
42
41
  },
43
42
  })
44
43
  ```
45
44
 
45
+ Use Nuxt 4.5 or later and Nuxt DevTools 4:
46
+
47
+ ```bash
48
+ pnpm add -D @gscdump/devframe @nuxt/devtools@^4.0.0-beta.3
49
+ ```
50
+
51
+ The module runs during development only. Set `gscdump.enabled: false` to skip it.
52
+ If Nuxt DevTools is disabled, the module skips the dock too.
53
+ Credentials stay on the dev server. Never put them in public runtime config.
54
+
55
+ Setup guides: [Nuxt](https://gscdump.com/google-search-console/nuxt) and [Vite](https://gscdump.com/google-search-console/vite).
56
+
46
57
  ## Any devframe hub
47
58
 
48
59
  `createGscdumpDevframe()` returns a devframe definition for any hub or adapter:
@@ -0,0 +1,17 @@
1
+ import { GscdumpDevframeOptions } from "./index.mjs";
2
+ import { NuxtModule } from "@nuxt/schema";
3
+ export interface ModuleOptions extends GscdumpDevframeOptions {
4
+ /** Set false to skip the Search Console dock. */
5
+ enabled?: boolean;
6
+ }
7
+ declare module '@nuxt/schema' {
8
+ interface NuxtConfig {
9
+ gscdump?: Partial<ModuleOptions>;
10
+ }
11
+ interface NuxtOptions {
12
+ gscdump: ModuleOptions;
13
+ }
14
+ }
15
+ /** Mount the Search Console dock in Nuxt DevTools during development. */
16
+ declare const module: NuxtModule<ModuleOptions>;
17
+ export { module as default };
package/dist/nuxt.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import gscdump from "./vite.mjs";
2
+ import { addVitePlugin, defineNuxtModule } from "@nuxt/kit";
3
+ const module = defineNuxtModule({
4
+ meta: {
5
+ name: "@gscdump/devframe/nuxt",
6
+ configKey: "gscdump",
7
+ compatibility: { nuxt: "^4.5.0" }
8
+ },
9
+ defaults: { enabled: true },
10
+ setup({ enabled, ...options }, nuxt) {
11
+ const devtools = nuxt.options.devtools;
12
+ if (!enabled || !nuxt.options.dev || devtools === false || typeof devtools === "object" && devtools.enabled === false) return;
13
+ addVitePlugin(() => gscdump(options));
14
+ }
15
+ });
16
+ export { module as default };
package/dist/package.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  var name = "@gscdump/devframe";
2
- var version = "7.0.0";
2
+ var version = "7.1.0";
3
3
  var description = "Search Console clicks, impressions, and queries for the page you are developing, in Vite DevTools and any devframe hub.";
4
4
  var homepage = "https://github.com/harlan-zw/gscdump/tree/main/packages/devframe#readme";
5
5
  export { description, homepage, name, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/devframe",
3
3
  "type": "module",
4
- "version": "7.0.0",
4
+ "version": "7.1.0",
5
5
  "description": "Search Console clicks, impressions, and queries for the page you are developing, in Vite DevTools and any devframe hub.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -39,7 +39,12 @@
39
39
  "import": "./dist/vite.mjs",
40
40
  "default": "./dist/vite.mjs"
41
41
  },
42
- "./package.json": "./package.json"
42
+ "./package.json": "./package.json",
43
+ "./nuxt": {
44
+ "types": "./dist/nuxt.d.mts",
45
+ "import": "./dist/nuxt.mjs",
46
+ "default": "./dist/nuxt.mjs"
47
+ }
43
48
  },
44
49
  "types": "./dist/index.d.mts",
45
50
  "files": [
@@ -57,8 +62,10 @@
57
62
  }
58
63
  },
59
64
  "dependencies": {
60
- "@gscdump/contracts": "^7.0.0",
61
- "@gscdump/sdk": "^7.0.0",
65
+ "@gscdump/contracts": "^7.1.0",
66
+ "@gscdump/sdk": "^7.1.0",
67
+ "@nuxt/kit": "4.5.2",
68
+ "@nuxt/schema": "4.5.2",
62
69
  "devframe": "^1.2.0",
63
70
  "zod": "^4.6.5"
64
71
  },