bonzai-burn 1.0.39 → 1.0.43
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/index.js +36 -12
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -13,6 +13,20 @@ var __export = (target, all) => {
|
|
|
13
13
|
for (var name in all)
|
|
14
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
// src/loops.config.js
|
|
18
|
+
var CHANNELS, channel, ENABLED_LOOPS;
|
|
19
|
+
var init_loops_config = __esm({
|
|
20
|
+
"src/loops.config.js"() {
|
|
21
|
+
CHANNELS = {
|
|
22
|
+
dev: ["burn", "visualization", "backend"],
|
|
23
|
+
beta: ["burn", "visualization"],
|
|
24
|
+
stable: ["burn"]
|
|
25
|
+
};
|
|
26
|
+
channel = "stable";
|
|
27
|
+
ENABLED_LOOPS = CHANNELS[channel];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
16
30
|
function commandExists(cmd) {
|
|
17
31
|
try {
|
|
18
32
|
execSync(`which ${cmd}`, { encoding: "utf-8", stdio: "pipe" });
|
|
@@ -677,9 +691,26 @@ async function main3() {
|
|
|
677
691
|
const configContent = fs4.readFileSync(path2.join(TEMPLATE_DIR, "config.js"), "utf8");
|
|
678
692
|
fs4.writeFileSync(path2.join(bonzaiDir, "config.js"), configContent);
|
|
679
693
|
console.log("Copying handlers...");
|
|
680
|
-
const handlersSrc = path2.join(TEMPLATE_DIR, "handlers");
|
|
681
694
|
const handlersDest = path2.join(bonzaiDir, "handlers");
|
|
682
|
-
|
|
695
|
+
if (!fs4.existsSync(handlersDest)) {
|
|
696
|
+
fs4.mkdirSync(handlersDest, { recursive: true });
|
|
697
|
+
}
|
|
698
|
+
if (ENABLED_LOOPS.includes("visualization")) {
|
|
699
|
+
const vizSrc = path2.join(TEMPLATE_DIR, "loops", "visualization");
|
|
700
|
+
if (fs4.existsSync(vizSrc)) {
|
|
701
|
+
for (const file of fs4.readdirSync(vizSrc)) {
|
|
702
|
+
fs4.copyFileSync(path2.join(vizSrc, file), path2.join(handlersDest, file));
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
if (ENABLED_LOOPS.includes("backend")) {
|
|
707
|
+
const backendSrc = path2.join(TEMPLATE_DIR, "loops", "backend");
|
|
708
|
+
if (fs4.existsSync(backendSrc)) {
|
|
709
|
+
for (const file of fs4.readdirSync(backendSrc)) {
|
|
710
|
+
fs4.copyFileSync(path2.join(backendSrc, file), path2.join(handlersDest, file));
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
683
714
|
console.log("Copying utils...");
|
|
684
715
|
const utilsSrc = path2.join(TEMPLATE_DIR, "utils");
|
|
685
716
|
const utilsDest = path2.join(bonzaiDir, "utils");
|
|
@@ -787,9 +818,10 @@ Server stopped with code ${serverCode}`);
|
|
|
787
818
|
var __filename$1, __dirname$1, TEMPLATE_DIR, _a3, isDirectRun3;
|
|
788
819
|
var init_bconfig = __esm({
|
|
789
820
|
"src/bconfig.js"() {
|
|
821
|
+
init_loops_config();
|
|
790
822
|
__filename$1 = fileURLToPath(import.meta.url);
|
|
791
823
|
__dirname$1 = path2.dirname(__filename$1);
|
|
792
|
-
TEMPLATE_DIR = path2.join(__dirname$1, "
|
|
824
|
+
TEMPLATE_DIR = path2.join(__dirname$1, "graph-templates");
|
|
793
825
|
isDirectRun3 = (_a3 = process.argv[1]) == null ? void 0 : _a3.endsWith("bconfig.js");
|
|
794
826
|
if (isDirectRun3) {
|
|
795
827
|
main3().catch(console.error);
|
|
@@ -797,16 +829,8 @@ var init_bconfig = __esm({
|
|
|
797
829
|
}
|
|
798
830
|
});
|
|
799
831
|
|
|
800
|
-
// src/loops.config.js
|
|
801
|
-
var CHANNELS = {
|
|
802
|
-
dev: ["burn", "visualization", "backend"],
|
|
803
|
-
beta: ["burn", "visualization", "backend"],
|
|
804
|
-
stable: ["burn"]
|
|
805
|
-
};
|
|
806
|
-
var channel = "stable";
|
|
807
|
-
var ENABLED_LOOPS = CHANNELS[channel];
|
|
808
|
-
|
|
809
832
|
// src/index.js
|
|
833
|
+
init_loops_config();
|
|
810
834
|
var __filename2 = fileURLToPath(import.meta.url);
|
|
811
835
|
var __dirname2 = dirname(__filename2);
|
|
812
836
|
var BONZAI_DIR3 = "bonzai";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bonzai-burn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"build": "RELEASE_CHANNEL=stable tsup",
|
|
15
15
|
"build:beta": "RELEASE_CHANNEL=beta tsup",
|
|
16
16
|
"build:dev": "RELEASE_CHANNEL=dev tsup",
|
|
17
|
-
"prepublishOnly": "npm run build"
|
|
17
|
+
"prepublishOnly": "npm run build",
|
|
18
|
+
"release": "npm version patch && npm publish",
|
|
19
|
+
"release:beta": "npm run build:beta && npm publish --tag beta --ignore-scripts",
|
|
20
|
+
"release:dev": "npm run build:dev && npm publish --tag dev --ignore-scripts"
|
|
18
21
|
},
|
|
19
22
|
"keywords": [
|
|
20
23
|
"git",
|