bakit 2.0.0-alpha.26 → 2.0.0-alpha.27

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/hooks.js CHANGED
@@ -11,7 +11,7 @@ function isDevelopment() {
11
11
  return process.env.NODE_ENV === "development";
12
12
  }
13
13
  async function initialize({ port }) {
14
- rpc = new RPC(port), versions = /* @__PURE__ */ new Map(), rpc.on("message", onUnload), isDevelopment() && (esbuild = await import('esbuild'));
14
+ rpc = new RPC(port), versions = /* @__PURE__ */ new Map(), rpc.on("unload", onUnload), isDevelopment() && (esbuild = await import('esbuild'));
15
15
  }
16
16
  async function resolve(specifier, context, nextResolve) {
17
17
  if (shouldSkip(specifier))
package/dist/index.js CHANGED
@@ -1051,6 +1051,10 @@ var HOT_DIRECTORIES = ["listeners", "commands"], SOURCE_ROOT = resolve(process.c
1051
1051
  return chain.some((x) => this.isInHotDirectory(x));
1052
1052
  }
1053
1053
  async onFileRemove(path) {
1054
+ if (APP_ENTRY_POINTS.has(path)) {
1055
+ this.restart();
1056
+ return;
1057
+ }
1054
1058
  if (!isImported(path))
1055
1059
  return;
1056
1060
  let chain = getDependencyChain(path);
@@ -1063,6 +1067,10 @@ var HOT_DIRECTORIES = ["listeners", "commands"], SOURCE_ROOT = resolve(process.c
1063
1067
  await this.unloadModule(path2);
1064
1068
  }
1065
1069
  async onFileChange(path) {
1070
+ if (APP_ENTRY_POINTS.has(path)) {
1071
+ this.restart();
1072
+ return;
1073
+ }
1066
1074
  if (!isImported(path))
1067
1075
  return;
1068
1076
  let chain = getDependencyChain(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bakit",
3
- "version": "2.0.0-alpha.26",
3
+ "version": "2.0.0-alpha.27",
4
4
  "description": "A framework for discord.js",
5
5
  "type": "module",
6
6
  "exports": {