@luquimbo/bi-superpowers 3.2.0 → 4.1.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/.claude-plugin/marketplace.json +5 -3
- package/.claude-plugin/plugin.json +28 -2
- package/.claude-plugin/skill-manifest.json +22 -6
- package/.plugin/plugin.json +1 -1
- package/AGENTS.md +52 -36
- package/CHANGELOG.md +295 -0
- package/README.md +75 -26
- package/bin/build-plugin.js +11 -4
- package/bin/cli.js +113 -16
- package/bin/commands/build-desktop.js +35 -16
- package/bin/commands/diff.js +31 -13
- package/bin/commands/install.js +7 -3
- package/bin/commands/lint.js +40 -26
- package/bin/commands/mcp-setup.js +3 -10
- package/bin/commands/update-check.js +389 -0
- package/bin/lib/generators/claude-plugin.js +144 -6
- package/bin/lib/generators/shared.js +29 -33
- package/bin/lib/mcp-config.js +168 -12
- package/bin/lib/skills.js +115 -27
- package/bin/postinstall.js +4 -2
- package/bin/utils/mcp-detect.js +2 -2
- package/commands/bi-start.md +218 -0
- package/commands/pbi-connect.md +43 -65
- package/commands/project-kickoff.md +393 -673
- package/commands/report-design.md +403 -0
- package/desktop-extension/manifest.json +3 -3
- package/package.json +7 -5
- package/skills/bi-start/SKILL.md +220 -0
- package/skills/bi-start/scripts/update-check.js +389 -0
- package/skills/pbi-connect/SKILL.md +45 -67
- package/skills/pbi-connect/scripts/update-check.js +389 -0
- package/skills/project-kickoff/SKILL.md +395 -675
- package/skills/project-kickoff/scripts/update-check.js +389 -0
- package/skills/report-design/SKILL.md +405 -0
- package/skills/report-design/references/cli-commands.md +184 -0
- package/skills/report-design/references/cli-setup.md +101 -0
- package/skills/report-design/references/close-write-open-pattern.md +80 -0
- package/skills/report-design/references/layouts/finance.md +65 -0
- package/skills/report-design/references/layouts/generic.md +46 -0
- package/skills/report-design/references/layouts/hr.md +48 -0
- package/skills/report-design/references/layouts/marketing.md +45 -0
- package/skills/report-design/references/layouts/operations.md +44 -0
- package/skills/report-design/references/layouts/sales.md +50 -0
- package/skills/report-design/references/native-visuals.md +341 -0
- package/skills/report-design/references/pbi-desktop-installation.md +87 -0
- package/skills/report-design/references/pbir-preview-activation.md +40 -0
- package/skills/report-design/references/slicer.md +89 -0
- package/skills/report-design/references/textbox.md +101 -0
- package/skills/report-design/references/themes/BISuperpowers.json +915 -0
- package/skills/report-design/references/troubleshooting.md +135 -0
- package/skills/report-design/references/visual-types.md +78 -0
- package/skills/report-design/scripts/apply-theme.js +243 -0
- package/skills/report-design/scripts/create-visual.js +878 -0
- package/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
- package/skills/report-design/scripts/update-check.js +389 -0
- package/skills/report-design/scripts/validate-pbir.js +322 -0
- package/src/content/base.md +12 -68
- package/src/content/mcp-requirements.json +0 -25
- package/src/content/routing.md +19 -74
- package/src/content/skills/bi-start.md +191 -0
- package/src/content/skills/pbi-connect.md +22 -65
- package/src/content/skills/project-kickoff.md +372 -673
- package/src/content/skills/report-design/SKILL.md +376 -0
- package/src/content/skills/report-design/references/cli-commands.md +184 -0
- package/src/content/skills/report-design/references/cli-setup.md +101 -0
- package/src/content/skills/report-design/references/close-write-open-pattern.md +80 -0
- package/src/content/skills/report-design/references/layouts/finance.md +65 -0
- package/src/content/skills/report-design/references/layouts/generic.md +46 -0
- package/src/content/skills/report-design/references/layouts/hr.md +48 -0
- package/src/content/skills/report-design/references/layouts/marketing.md +45 -0
- package/src/content/skills/report-design/references/layouts/operations.md +44 -0
- package/src/content/skills/report-design/references/layouts/sales.md +50 -0
- package/src/content/skills/report-design/references/native-visuals.md +341 -0
- package/src/content/skills/report-design/references/pbi-desktop-installation.md +87 -0
- package/src/content/skills/report-design/references/pbir-preview-activation.md +40 -0
- package/src/content/skills/report-design/references/slicer.md +89 -0
- package/src/content/skills/report-design/references/textbox.md +101 -0
- package/src/content/skills/report-design/references/themes/BISuperpowers.json +915 -0
- package/src/content/skills/report-design/references/troubleshooting.md +135 -0
- package/src/content/skills/report-design/references/visual-types.md +78 -0
- package/src/content/skills/report-design/scripts/apply-theme.js +243 -0
- package/src/content/skills/report-design/scripts/create-visual.js +878 -0
- package/src/content/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
- package/src/content/skills/report-design/scripts/validate-pbir.js +322 -0
- package/bin/commands/install.test.js +0 -289
- package/bin/commands/lint.test.js +0 -103
- package/bin/lib/generators/claude-plugin.test.js +0 -111
- package/bin/lib/mcp-config.test.js +0 -310
- package/bin/lib/microsoft-mcp.test.js +0 -115
- package/bin/utils/mcp-detect.test.js +0 -81
- package/bin/utils/tui.test.js +0 -127
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for MCP Detection Utilities
|
|
3
|
-
* @module utils/mcp-detect.test
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const { test, describe } = require('node:test');
|
|
7
|
-
const assert = require('node:assert');
|
|
8
|
-
|
|
9
|
-
const mcpDetect = require('./mcp-detect');
|
|
10
|
-
|
|
11
|
-
describe('MCP Detection Utilities', () => {
|
|
12
|
-
test('exports expected functions', () => {
|
|
13
|
-
assert.strictEqual(typeof mcpDetect.findLocalMcp, 'function');
|
|
14
|
-
assert.strictEqual(typeof mcpDetect.getMcpVersion, 'function');
|
|
15
|
-
assert.strictEqual(typeof mcpDetect.getMcpStatus, 'function');
|
|
16
|
-
assert.strictEqual(typeof mcpDetect.getInstallInstructions, 'function');
|
|
17
|
-
assert.strictEqual(typeof mcpDetect.generateMcpConfig, 'function');
|
|
18
|
-
assert.strictEqual(typeof mcpDetect.getExplicitMcpPath, 'function');
|
|
19
|
-
assert.strictEqual(typeof mcpDetect.getModelingMcpError, 'function');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
test('exports env vars for local MCP path override', () => {
|
|
23
|
-
assert.ok(Array.isArray(mcpDetect.MODELING_MCP_ENV_VARS));
|
|
24
|
-
assert.ok(mcpDetect.MODELING_MCP_ENV_VARS.includes('BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH'));
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
describe('getMcpStatus', () => {
|
|
29
|
-
test('returns expected structure for the local MCP only', () => {
|
|
30
|
-
const status = mcpDetect.getMcpStatus();
|
|
31
|
-
|
|
32
|
-
assert.ok(status.local);
|
|
33
|
-
assert.ok('installed' in status.local);
|
|
34
|
-
assert.ok('path' in status.local);
|
|
35
|
-
assert.ok('version' in status.local);
|
|
36
|
-
assert.ok('platform' in status.local);
|
|
37
|
-
assert.ok('available' in status.local);
|
|
38
|
-
assert.ok(Array.isArray(status.local.envVars));
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
describe('getInstallInstructions', () => {
|
|
43
|
-
test('returns expected structure', () => {
|
|
44
|
-
const instructions = mcpDetect.getInstallInstructions();
|
|
45
|
-
|
|
46
|
-
assert.ok(instructions.title);
|
|
47
|
-
assert.ok(Array.isArray(instructions.options));
|
|
48
|
-
assert.ok(instructions.options.length > 0);
|
|
49
|
-
|
|
50
|
-
instructions.options.forEach((option) => {
|
|
51
|
-
assert.ok(option.name);
|
|
52
|
-
assert.ok(Array.isArray(option.steps));
|
|
53
|
-
assert.ok(option.link);
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
describe('generateMcpConfig', () => {
|
|
59
|
-
test('generates plugin format with 2 official Microsoft MCPs', () => {
|
|
60
|
-
const config = mcpDetect.generateMcpConfig({}, 'plugin');
|
|
61
|
-
|
|
62
|
-
assert.ok(config['powerbi-modeling-mcp']);
|
|
63
|
-
assert.ok(config['microsoft-learn']);
|
|
64
|
-
assert.strictEqual(Object.keys(config).length, 2);
|
|
65
|
-
|
|
66
|
-
assert.strictEqual(config['powerbi-modeling-mcp'].type, 'stdio');
|
|
67
|
-
assert.strictEqual(config['powerbi-modeling-mcp'].command, 'node');
|
|
68
|
-
assert.ok(config['powerbi-modeling-mcp'].args[0].includes('powerbi-modeling-launcher.js'));
|
|
69
|
-
|
|
70
|
-
assert.strictEqual(config['microsoft-learn'].type, 'http');
|
|
71
|
-
assert.strictEqual(config['microsoft-learn'].url, 'https://learn.microsoft.com/api/mcp');
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
test('generates claude format with nested mcpServers object', () => {
|
|
75
|
-
const config = mcpDetect.generateMcpConfig({}, 'claude');
|
|
76
|
-
|
|
77
|
-
assert.ok(config.mcpServers);
|
|
78
|
-
assert.ok(config.mcpServers['powerbi-modeling-mcp']);
|
|
79
|
-
assert.ok(config.mcpServers['microsoft-learn']);
|
|
80
|
-
});
|
|
81
|
-
});
|
package/bin/utils/tui.test.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for the TUI (Terminal UI) utilities
|
|
3
|
-
*
|
|
4
|
-
* Run with: npm test
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { test, describe } = require('node:test');
|
|
8
|
-
const assert = require('node:assert');
|
|
9
|
-
|
|
10
|
-
// Import TUI module if available
|
|
11
|
-
let tui;
|
|
12
|
-
try {
|
|
13
|
-
tui = require('./tui');
|
|
14
|
-
} catch (e) {
|
|
15
|
-
// TUI module may not be available in all environments
|
|
16
|
-
tui = null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
describe('TUI Utilities', () => {
|
|
20
|
-
test('truncate should limit string length', () => {
|
|
21
|
-
// Basic truncation logic
|
|
22
|
-
const truncate = (str, maxLen) => {
|
|
23
|
-
if (str.length <= maxLen) return str;
|
|
24
|
-
return str.substring(0, maxLen - 3) + '...';
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const longText = 'This is a very long text that should be truncated';
|
|
28
|
-
const truncated = truncate(longText, 20);
|
|
29
|
-
|
|
30
|
-
assert.ok(truncated.length <= 20, 'Truncated text should not exceed max length');
|
|
31
|
-
assert.ok(truncated.endsWith('...'), 'Truncated text should end with ellipsis');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
test('formatPath should handle library paths', () => {
|
|
35
|
-
// Basic path formatting logic
|
|
36
|
-
const formatPath = (filePath) => {
|
|
37
|
-
const libraryIndex = filePath.indexOf('library');
|
|
38
|
-
if (libraryIndex !== -1) {
|
|
39
|
-
return filePath.substring(libraryIndex);
|
|
40
|
-
}
|
|
41
|
-
return filePath;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const fullPath = '/Users/test/.bi-superpowers/library/snippets/dax/time-intelligence.md';
|
|
45
|
-
const formatted = formatPath(fullPath);
|
|
46
|
-
|
|
47
|
-
assert.ok(formatted.startsWith('library'), 'Should start with library');
|
|
48
|
-
assert.ok(!formatted.includes('/Users/'), 'Should not include user path');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('icons object should have required icons', () => {
|
|
52
|
-
const requiredIcons = ['success', 'error', 'warning', 'info', 'bullet'];
|
|
53
|
-
|
|
54
|
-
// Mock icons object
|
|
55
|
-
const icons = {
|
|
56
|
-
success: '✓',
|
|
57
|
-
error: '✗',
|
|
58
|
-
warning: '⚠',
|
|
59
|
-
info: 'ℹ',
|
|
60
|
-
bullet: '•',
|
|
61
|
-
watch: '👁',
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
requiredIcons.forEach((icon) => {
|
|
65
|
-
assert.ok(icons[icon], `Should have ${icon} icon`);
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
describe('Table Formatting', () => {
|
|
71
|
-
test('table should have headers and rows', () => {
|
|
72
|
-
const headers = ['Metric', 'Count'];
|
|
73
|
-
const rows = [
|
|
74
|
-
['Files checked', '10'],
|
|
75
|
-
['Errors', '0'],
|
|
76
|
-
['Warnings', '2'],
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
assert.strictEqual(headers.length, 2, 'Should have 2 headers');
|
|
80
|
-
assert.strictEqual(rows.length, 3, 'Should have 3 rows');
|
|
81
|
-
assert.strictEqual(rows[0].length, headers.length, 'Rows should match header count');
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
describe('Color Functions', () => {
|
|
86
|
-
test('color names should be defined', () => {
|
|
87
|
-
const colorNames = ['primary', 'success', 'error', 'warning', 'info', 'muted', 'highlight'];
|
|
88
|
-
|
|
89
|
-
// Mock colors object
|
|
90
|
-
const colors = {
|
|
91
|
-
primary: (s) => s,
|
|
92
|
-
success: (s) => s,
|
|
93
|
-
error: (s) => s,
|
|
94
|
-
warning: (s) => s,
|
|
95
|
-
info: (s) => s,
|
|
96
|
-
muted: (s) => s,
|
|
97
|
-
highlight: (s) => s,
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
colorNames.forEach((color) => {
|
|
101
|
-
assert.ok(typeof colors[color] === 'function', `${color} should be a function`);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
test('color functions should return strings', () => {
|
|
106
|
-
// Mock color function
|
|
107
|
-
const colorFn = (str) => `\x1b[32m${str}\x1b[0m`;
|
|
108
|
-
const result = colorFn('test');
|
|
109
|
-
|
|
110
|
-
assert.strictEqual(typeof result, 'string', 'Color function should return string');
|
|
111
|
-
assert.ok(result.includes('test'), 'Result should include original text');
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
describe('Diff Display', () => {
|
|
116
|
-
test('diff add should format additions', () => {
|
|
117
|
-
const formatAdd = (line) => `+ ${line}`;
|
|
118
|
-
const result = formatAdd('new line');
|
|
119
|
-
assert.ok(result.startsWith('+'), 'Addition should start with +');
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
test('diff remove should format deletions', () => {
|
|
123
|
-
const formatRemove = (line) => `- ${line}`;
|
|
124
|
-
const result = formatRemove('old line');
|
|
125
|
-
assert.ok(result.startsWith('-'), 'Deletion should start with -');
|
|
126
|
-
});
|
|
127
|
-
});
|