bakit 2.0.0-alpha.26 → 2.0.0-alpha.28
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/cli.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { config } from 'dotenv';
|
|
2
3
|
import { program } from 'commander';
|
|
3
4
|
import { fork } from 'child_process';
|
|
@@ -5,7 +6,6 @@ import path, { resolve } from 'path';
|
|
|
5
6
|
import chokidar from 'chokidar';
|
|
6
7
|
import { RPC } from 'bakit';
|
|
7
8
|
|
|
8
|
-
// src/cli/bin.ts
|
|
9
9
|
var DevProcessManager = class {
|
|
10
10
|
constructor(options) {
|
|
11
11
|
this.options = options;
|
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("
|
|
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);
|