bonzai-burn 1.0.5 โ 1.0.6
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/package.json +1 -1
- package/src/btrim.js +4 -10
package/package.json
CHANGED
package/src/btrim.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execSync, spawn } from 'child_process';
|
|
3
|
+
import crypto from 'crypto';
|
|
3
4
|
import fs from 'fs';
|
|
4
5
|
import { join } from 'path';
|
|
5
6
|
|
|
@@ -218,16 +219,9 @@ async function burn() {
|
|
|
218
219
|
console.log(`โ Work saved on ${originalBranch}\n`);
|
|
219
220
|
}
|
|
220
221
|
|
|
221
|
-
//
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
// Delete existing burn branch if it exists
|
|
225
|
-
try {
|
|
226
|
-
exec(`git branch -D ${burnBranch}`);
|
|
227
|
-
console.log(`๐งน Cleaned up old ${burnBranch} branch\n`);
|
|
228
|
-
} catch {
|
|
229
|
-
// Branch doesn't exist, that's fine
|
|
230
|
-
}
|
|
222
|
+
// Generate unique branch name with short UUID
|
|
223
|
+
const shortId = crypto.randomUUID().slice(0, 8);
|
|
224
|
+
const burnBranch = `bonzai-burn-${shortId}`;
|
|
231
225
|
|
|
232
226
|
console.log(`๐ Starting from: ${originalBranch}`);
|
|
233
227
|
console.log(`๐ฟ Creating: ${burnBranch}\n`);
|