Updates
This commit is contained in:
Vendored
+3
@@ -1,2 +1,5 @@
|
||||
#!/usr/bin/env bun
|
||||
declare global {
|
||||
var REDEPLOYMENTS: number;
|
||||
}
|
||||
export {};
|
||||
|
||||
Vendored
+1
@@ -9,6 +9,7 @@ const path_1 = __importDefault(require("path"));
|
||||
const console_colors_1 = __importDefault(require("./utils/console-colors"));
|
||||
const start_1 = __importDefault(require("./utils/start"));
|
||||
const WORK_DIR = process.cwd();
|
||||
global.REDEPLOYMENTS = 0;
|
||||
function run() {
|
||||
try {
|
||||
const configText = fs_1.default.readFileSync(path_1.default.join(WORK_DIR, "buncid.config.json"), "utf-8");
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-2
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = run;
|
||||
const child_process_1 = require("child_process");
|
||||
const console_colors_1 = __importDefault(require("./console-colors"));
|
||||
let redeployments = 0;
|
||||
const KILL_SIGNAL = "SIGTERM";
|
||||
/**
|
||||
* ## Preflight Function
|
||||
@@ -27,7 +26,7 @@ function run(command) {
|
||||
stdio: "inherit",
|
||||
killSignal: KILL_SIGNAL,
|
||||
});
|
||||
redeployments++;
|
||||
global.REDEPLOYMENTS = global.REDEPLOYMENTS + 1;
|
||||
return newChildProcess;
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Vendored
+3
-3
@@ -9,7 +9,6 @@ const console_colors_1 = __importDefault(require("./console-colors"));
|
||||
const preflight_1 = __importDefault(require("./preflight"));
|
||||
const run_1 = __importDefault(require("./run"));
|
||||
const kill_child_1 = __importDefault(require("./kill-child"));
|
||||
let redeployments = 0;
|
||||
let childProcess = null;
|
||||
const pTitle = "buncid";
|
||||
process.title = pTitle;
|
||||
@@ -41,11 +40,12 @@ function startProcess({ command, preflight, postflight, redeploy_file, port, fir
|
||||
console.log("Watching", redeploy_file);
|
||||
fs_1.default.watchFile(redeploy_file, { interval: 100 }, (curr, prev) => {
|
||||
console.log(`${console_colors_1.default.BgBlue}File Changed${console_colors_1.default.Reset}`);
|
||||
if (redeployments == 0)
|
||||
if (global.REDEPLOYMENTS == 0) {
|
||||
return;
|
||||
}
|
||||
if (childProcess) {
|
||||
console.log("******************************");
|
||||
console.log(`******** ${console_colors_1.default.FgBlue}Rebuilding ${console_colors_1.default.FgMagenta}${redeployments}${console_colors_1.default.Reset} ********`);
|
||||
console.log(`******** ${console_colors_1.default.FgBlue}Rebuilding ${console_colors_1.default.FgMagenta}${global.REDEPLOYMENTS}${console_colors_1.default.Reset} ********`);
|
||||
console.log("******************************");
|
||||
try {
|
||||
const runPreflight = (0, preflight_1.default)(preflight);
|
||||
|
||||
Reference in New Issue
Block a user