swarm-tickets 1.0.0 ā 2.0.0
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/LICENSE.txt +0 -0
- package/README.md +307 -61
- package/SKILL.md +222 -46
- package/backup-tickets.sh +0 -0
- package/bug-report-widget.js +536 -0
- package/lib/storage/base-adapter.js +200 -0
- package/lib/storage/index.js +87 -0
- package/lib/storage/json-adapter.js +293 -0
- package/lib/storage/sqlite-adapter.js +552 -0
- package/lib/storage/supabase-adapter.js +614 -0
- package/package.json +21 -12
- package/setup.js +9 -11
- package/ticket-cli.js +0 -0
- package/ticket-server.js +425 -269
- package/ticket-tracker.html +459 -132
- package/tickets.example.json +0 -0
package/setup.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
2
|
const fs = require('fs');
|
|
4
3
|
const path = require('path');
|
|
5
4
|
|
|
6
5
|
console.log('\nš« Setting up Swarm Tickets...\n');
|
|
7
6
|
|
|
8
|
-
// Get the project root
|
|
9
|
-
const projectRoot = process.cwd();
|
|
7
|
+
// Get the project root - use INIT_CWD during npm install, fallback to cwd for manual runs
|
|
8
|
+
const projectRoot = process.env.INIT_CWD || process.cwd();
|
|
10
9
|
|
|
11
|
-
// Create .claude/skills/swarm-tickets directory
|
|
10
|
+
// Create .claude/skills/swarm-tickets directory
|
|
12
11
|
const skillsDir = path.join(projectRoot, '.claude', 'skills', 'swarm-tickets');
|
|
13
12
|
|
|
14
13
|
try {
|
|
15
14
|
// Create directories
|
|
16
15
|
fs.mkdirSync(skillsDir, { recursive: true });
|
|
17
16
|
console.log('ā
Created .claude/skills/swarm-tickets/');
|
|
18
|
-
|
|
17
|
+
|
|
19
18
|
// Copy SKILL.md to the skills directory
|
|
20
19
|
const skillSource = path.join(__dirname, 'SKILL.md');
|
|
21
20
|
const skillDest = path.join(skillsDir, 'SKILL.md');
|
|
@@ -24,7 +23,7 @@ try {
|
|
|
24
23
|
fs.copyFileSync(skillSource, skillDest);
|
|
25
24
|
console.log('ā
Installed swarm skill');
|
|
26
25
|
}
|
|
27
|
-
|
|
26
|
+
|
|
28
27
|
// Copy ticket-tracker.html to project root
|
|
29
28
|
const htmlSource = path.join(__dirname, 'ticket-tracker.html');
|
|
30
29
|
const htmlDest = path.join(projectRoot, 'ticket-tracker.html');
|
|
@@ -35,25 +34,24 @@ try {
|
|
|
35
34
|
} else {
|
|
36
35
|
console.log('ā ļø ticket-tracker.html already exists, skipping');
|
|
37
36
|
}
|
|
38
|
-
|
|
37
|
+
|
|
39
38
|
// Create tickets.json if it doesn't exist
|
|
40
39
|
const ticketsFile = path.join(projectRoot, 'tickets.json');
|
|
40
|
+
|
|
41
41
|
if (!fs.existsSync(ticketsFile)) {
|
|
42
42
|
fs.writeFileSync(ticketsFile, JSON.stringify({ tickets: [] }, null, 2));
|
|
43
43
|
console.log('ā
Created tickets.json');
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
console.log('\nš Setup complete!\n');
|
|
47
47
|
console.log('To start the ticket tracker:');
|
|
48
|
-
console.log('
|
|
48
|
+
console.log(' npx swarm-tickets\n');
|
|
49
49
|
console.log('Then open: http://localhost:3456/ticket-tracker.html\n');
|
|
50
50
|
console.log('The swarm can now access tickets via ./tickets.json');
|
|
51
51
|
console.log('Skill documentation: .claude/skills/swarm-tickets/SKILL.md\n');
|
|
52
|
-
|
|
53
52
|
console.log('š Note: Add these to your .gitignore if you don\'t want to commit tickets:');
|
|
54
53
|
console.log(' tickets.json');
|
|
55
54
|
console.log(' ticket-backups/\n');
|
|
56
|
-
|
|
57
55
|
} catch (error) {
|
|
58
56
|
console.error('ā Setup failed:', error.message);
|
|
59
57
|
process.exit(1);
|
package/ticket-cli.js
CHANGED
|
File without changes
|