@vibedx/vibekit 0.8.6 → 0.8.7
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
CHANGED
|
@@ -13,26 +13,20 @@ import { getTicketsDir, getConfig, getNextTicketId, createSlug } from '../../uti
|
|
|
13
13
|
function createSampleTicket(title, description, priority = "medium", status = "open") {
|
|
14
14
|
const configPath = path.join(process.cwd(), ".vibe", "config.yml");
|
|
15
15
|
const templatePath = path.join(process.cwd(), ".vibe", ".templates", "default.md");
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
if (!fs.existsSync(configPath) || !fs.existsSync(templatePath)) {
|
|
18
18
|
console.error("❌ Missing config.yml or default.md template.");
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
const config = yaml.load(fs.readFileSync(configPath, "utf-8"));
|
|
23
23
|
const template = fs.readFileSync(templatePath, "utf-8");
|
|
24
24
|
const ticketDir = path.join(process.cwd(), config.tickets?.path || ".vibe/tickets");
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
.map(f => f.match(/^TKT-(\\d+)/))
|
|
29
|
-
.filter(Boolean)
|
|
30
|
-
.map(match => parseInt(match[1], 10));
|
|
31
|
-
const nextId = Math.max(0, ...ticketNumbers) + 1;
|
|
32
|
-
const paddedId = String(nextId).padStart(3, "0");
|
|
25
|
+
|
|
26
|
+
const ticketId = getNextTicketId();
|
|
27
|
+
const paddedId = ticketId.replace('TKT-', '');
|
|
33
28
|
const now = new Date().toISOString();
|
|
34
|
-
|
|
35
|
-
const ticketId = `TKT-${paddedId}`;
|
|
29
|
+
|
|
36
30
|
const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
37
31
|
const filename = `${ticketId}-${slug}.md`;
|
|
38
32
|
|
package/src/utils/git.js
CHANGED
|
@@ -49,7 +49,7 @@ function branchExistsLocally(branchName) {
|
|
|
49
49
|
*/
|
|
50
50
|
function branchExistsRemotely(branchName) {
|
|
51
51
|
try {
|
|
52
|
-
const result = execSync(`git ls-remote --heads origin ${branchName}`, { encoding: 'utf-8' });
|
|
52
|
+
const result = execSync(`git ls-remote --heads origin ${branchName}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] });
|
|
53
53
|
return result.trim() !== '';
|
|
54
54
|
} catch (error) {
|
|
55
55
|
return false;
|
|
@@ -158,7 +158,7 @@ function getMainWorktreeRoot() {
|
|
|
158
158
|
|
|
159
159
|
function getRepoName() {
|
|
160
160
|
try {
|
|
161
|
-
const remoteUrl = execSync('git remote get-url origin', { encoding: 'utf-8' }).trim();
|
|
161
|
+
const remoteUrl = execSync('git remote get-url origin', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();
|
|
162
162
|
// Handle git@github.com:org/repo.git
|
|
163
163
|
let match = remoteUrl.match(/[:/]([^/]+?)(?:\.git)?$/);
|
|
164
164
|
if (match) return match[1];
|
package/src/utils/git.test.js
CHANGED
|
@@ -134,7 +134,7 @@ describe('git utilities', () => {
|
|
|
134
134
|
|
|
135
135
|
// Assert
|
|
136
136
|
expect(result).toBe(true);
|
|
137
|
-
expect(mockExecSync).toHaveBeenCalledWith('git ls-remote --heads origin feature/test', { encoding: 'utf-8' });
|
|
137
|
+
expect(mockExecSync).toHaveBeenCalledWith('git ls-remote --heads origin feature/test', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] });
|
|
138
138
|
});
|
|
139
139
|
|
|
140
140
|
it('should return false when branch does not exist remotely', () => {
|