nuxt-discord 0.0.1 → 0.0.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-discord",
3
3
  "configKey": "discord",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
@@ -70,7 +70,6 @@ function getRemoteId(command) {
70
70
  }
71
71
  return void 0;
72
72
  }
73
- const toast = useToast();
74
73
  const commands = ref(slashCommands);
75
74
  const {
76
75
  data: diff,
@@ -142,12 +141,7 @@ async function syncCommands() {
142
141
  await $fetch("/api/discord/slash-command/register", { method: "POST" });
143
142
  await refreshDiff();
144
143
  } catch (error) {
145
- toast.add({
146
- title: "Error registering commands",
147
- description: error.statusMessage || "An unknown error occurred",
148
- color: "error",
149
- icon: "i-lucide-triangle-alert"
150
- });
144
+ console.error("Error registering commands:", error);
151
145
  } finally {
152
146
  pendingSync.value = false;
153
147
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-discord",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "A Nuxt module for building Discord bots",
6
6
  "author": "Jize Zou <jeffzou2001@gmail.com> (https://github.com/zojize)",
7
7
  "license": "MIT",
@@ -56,7 +56,9 @@
56
56
  "@vueuse/core": "^13.4.0",
57
57
  "changelogen": "^0.6.1",
58
58
  "eslint": "^9.29.0",
59
+ "lint-staged": "^16.1.2",
59
60
  "nuxt": "^3.17.5",
61
+ "simple-git-hooks": "^2.13.0",
60
62
  "typescript": "~5.8.3",
61
63
  "unbuild": "^3.5.0",
62
64
  "vitest": "^3.2.4",
@@ -65,6 +67,12 @@
65
67
  "resolutions": {
66
68
  "nuxt-discord": "workspace:*"
67
69
  },
70
+ "simple-git-hooks": {
71
+ "pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
72
+ },
73
+ "lint-staged": {
74
+ "*": "eslint --fix"
75
+ },
68
76
  "scripts": {
69
77
  "dev": "pnpm run dev:prepare && nuxi dev playground",
70
78
  "dev:build": "nuxi build playground",
@@ -73,6 +81,7 @@
73
81
  "lint": "eslint .",
74
82
  "test": "vitest run",
75
83
  "test:watch": "vitest watch",
76
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
84
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
85
+ "postinstall": "npx simple-git-hooks"
77
86
  }
78
87
  }