nuxt-visitors 1.1.1 → 1.1.2

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-visitors",
3
3
  "configKey": "visitors",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -16,9 +16,9 @@
16
16
  * - reconnect: () => void - Function to manually reconnect
17
17
  */
18
18
  export declare function useVisitors(): {
19
- visitors: any;
20
- isLoading: any;
21
- error: any;
22
- isConnected: any;
19
+ visitors: import("vue").Ref<number, number>;
20
+ isLoading: import("vue").Ref<boolean, boolean>;
21
+ error: import("vue").Ref<string | null, string | null>;
22
+ isConnected: import("vue").Ref<boolean, boolean>;
23
23
  reconnect: () => void;
24
24
  };
@@ -1,3 +1,5 @@
1
+ import { ref, onMounted, onBeforeUnmount } from "vue";
2
+ import { useState } from "#imports";
1
3
  export function useVisitors() {
2
4
  const visitors = useState("visitors", () => 0);
3
5
  const isLoading = ref(true);
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, never>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineWebSocketHandler } from "h3";
1
2
  export default defineWebSocketHandler({
2
3
  open(peer) {
3
4
  peer.subscribe("nuxt-visitors");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-visitors",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Add real-time visitor tracking to your Nuxt app with one line of code. WebSocket made easy",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -31,6 +31,7 @@
31
31
  "dev:build": "nuxi build playground",
32
32
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
33
33
  "release": "npm run lint && npm run test && npm run prepack",
34
+ "typecheck": "tsc --noEmit",
34
35
  "lint": "eslint .",
35
36
  "lint:fix": "eslint --fix .",
36
37
  "test": "vitest run",
@@ -38,23 +39,22 @@
38
39
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
39
40
  },
40
41
  "dependencies": {
41
- "@nuxt/kit": "^3.15.3"
42
+ "@nuxt/kit": "3.15.2"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@hrcd/eslint-config": "^2.1.1",
45
46
  "@nuxt/devtools": "^1.7.0",
46
47
  "@nuxt/eslint-config": "^0.7.5",
47
48
  "@nuxt/module-builder": "^0.8.4",
48
- "@nuxt/schema": "^3.15.3",
49
+ "@nuxt/schema": "3.15.2",
49
50
  "@nuxt/test-utils": "^3.15.4",
50
51
  "@types/node": "latest",
51
- "changelogen": "^0.5.7",
52
+ "automd": "^0.3.12",
52
53
  "eslint": "^9.19.0",
53
- "nuxt": "3.15.3",
54
+ "nuxt": "3.15.2",
54
55
  "typescript": "5.6.3",
55
56
  "vitest": "^3.0.4",
56
- "vue-tsc": "^2.2.0",
57
- "automd": "^0.3.12"
57
+ "vue-tsc": "^2.2.0"
58
58
  },
59
- "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
59
+ "packageManager": "pnpm@9.15.4"
60
60
  }