@dabble/linear-cli 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.mjs +31 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/linear-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Linear CLI with unblocked issue filtering, built for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {
package/postinstall.mjs CHANGED
@@ -28,8 +28,7 @@ try {
28
28
  console.log(`\x1b[33m⚠\x1b[0m Could not install Claude files: ${err.message}`);
29
29
  }
30
30
 
31
- // Add linear permission to settings.json
32
- const PERMISSION = 'Bash(linear:*)';
31
+ // Add permissions to settings.json
33
32
  const settingsPath = join(dest, 'settings.json');
34
33
 
35
34
  try {
@@ -43,11 +42,37 @@ try {
43
42
  settings.permissions = settings.permissions || {};
44
43
  settings.permissions.allow = settings.permissions.allow || [];
45
44
 
46
- // Add permission if not already present
47
- if (!settings.permissions.allow.includes(PERMISSION)) {
48
- settings.permissions.allow.push(PERMISSION);
45
+ // Build list of permissions to add
46
+ const permissions = ['Bash(linear:*)'];
47
+
48
+ // Add Skill permissions for each skill in the skills directory
49
+ const skillsDir = join(src, 'skills');
50
+ if (existsSync(skillsDir)) {
51
+ const skills = readdirSync(skillsDir, { withFileTypes: true })
52
+ .filter((e) => e.isDirectory())
53
+ .map((e) => e.name);
54
+
55
+ for (const skill of skills) {
56
+ permissions.push(`Skill(${skill})`);
57
+ permissions.push(`Skill(${skill}:*)`);
58
+ }
59
+ }
60
+
61
+ // Add permissions if not already present
62
+ const added = [];
63
+ for (const permission of permissions) {
64
+ if (!settings.permissions.allow.includes(permission)) {
65
+ settings.permissions.allow.push(permission);
66
+ added.push(permission);
67
+ }
68
+ }
69
+
70
+ if (added.length > 0) {
49
71
  writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
50
- console.log(`\x1b[32m✓\x1b[0m Added ${PERMISSION} to ~/.claude/settings.json`);
72
+ console.log(`\x1b[32m✓\x1b[0m Added permissions to ~/.claude/settings.json:`);
73
+ for (const permission of added) {
74
+ console.log(` - ${permission}`);
75
+ }
51
76
  }
52
77
  } catch (err) {
53
78
  console.log(`\x1b[33m⚠\x1b[0m Could not update settings: ${err.message}`);