nuxt-discord 0.0.1 → 0.0.3

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
@@ -285,7 +285,7 @@ Here's what's planned for future releases:
285
285
  [npm-version-src]: https://img.shields.io/npm/v/nuxt-discord/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
286
286
  [npm-version-href]: https://npmjs.com/package/nuxt-discord
287
287
 
288
- [license-src]: https://img.shields.io/github/license/zojize/nuxt-discord.svg?style=flat&colorA=18181B&colorB=28CF8D
288
+ [license-src]: https://img.shields.io/github/license/zojize/nuxt-discord?style=flat&colorA=18181B&colorB=28CF8D
289
289
  [license-href]: https://github.com/zojize/nuxt-discord/blob/main/LICENSE
290
290
 
291
291
  [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
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.3",
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.3",
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,14 +67,21 @@
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",
71
79
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
72
- "release": "pnpm run lint && pnpm run test && pnpm run prepack && changelogen --release && pnpm publish && git push --follow-tags",
80
+ "release": "pnpm run lint && pnpm run test && pnpm run prepack && changelogen --release && pnpm publish --force && git push --follow-tags",
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
  }