@luquimbo/bi-superpowers 3.1.1 → 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 +17 -10
- package/bin/cli.js +278 -322
- package/bin/commands/build-desktop.js +35 -16
- package/bin/commands/diff.js +31 -13
- package/bin/commands/install.js +93 -72
- 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/agents.js +19 -0
- package/bin/lib/generators/claude-plugin.js +144 -6
- package/bin/lib/generators/shared.js +29 -33
- package/bin/lib/mcp-config.js +191 -16
- 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 +5 -12
- package/desktop-extension/server.js +34 -25
- package/package.json +6 -10
- 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/add.js +0 -533
- package/bin/commands/add.test.js +0 -77
- package/bin/commands/changelog.js +0 -443
- package/bin/commands/install.test.js +0 -289
- package/bin/commands/lint.test.js +0 -103
- package/bin/commands/pull.js +0 -287
- package/bin/commands/pull.test.js +0 -36
- package/bin/commands/push.js +0 -231
- package/bin/commands/push.test.js +0 -14
- package/bin/commands/search.js +0 -344
- package/bin/commands/search.test.js +0 -115
- package/bin/commands/setup.js +0 -545
- package/bin/commands/setup.test.js +0 -46
- package/bin/commands/sync-profile.js +0 -405
- package/bin/commands/sync-profile.test.js +0 -14
- package/bin/commands/sync-source.js +0 -418
- package/bin/commands/sync-source.test.js +0 -14
- 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/errors.js +0 -159
- package/bin/utils/git.js +0 -298
- package/bin/utils/logger.js +0 -142
- package/bin/utils/mcp-detect.test.js +0 -81
- package/bin/utils/pbix.js +0 -305
- package/bin/utils/pbix.test.js +0 -37
- package/bin/utils/profiles.js +0 -312
- package/bin/utils/projects.js +0 -169
- package/bin/utils/readline.js +0 -206
- package/bin/utils/readline.test.js +0 -47
- package/bin/utils/tui.test.js +0 -127
- package/docs/openrouter-free-models.md +0 -92
- package/library/examples/README.md +0 -151
- package/library/examples/finance-reporting/README.md +0 -351
- package/library/examples/finance-reporting/data-model.md +0 -267
- package/library/examples/finance-reporting/measures.dax +0 -557
- package/library/examples/hr-analytics/README.md +0 -371
- package/library/examples/hr-analytics/data-model.md +0 -315
- package/library/examples/hr-analytics/measures.dax +0 -460
- package/library/examples/marketing-analytics/README.md +0 -37
- package/library/examples/marketing-analytics/data-model.md +0 -62
- package/library/examples/marketing-analytics/measures.dax +0 -110
- package/library/examples/retail-analytics/README.md +0 -439
- package/library/examples/retail-analytics/data-model.md +0 -288
- package/library/examples/retail-analytics/measures.dax +0 -481
- package/library/examples/supply-chain/README.md +0 -37
- package/library/examples/supply-chain/data-model.md +0 -69
- package/library/examples/supply-chain/measures.dax +0 -77
- package/library/examples/udf-library/README.md +0 -228
- package/library/examples/udf-library/functions.dax +0 -571
- package/library/snippets/dax/README.md +0 -292
- package/library/snippets/dax/business-domains.md +0 -576
- package/library/snippets/dax/calculate-patterns.md +0 -276
- package/library/snippets/dax/calculation-groups.md +0 -489
- package/library/snippets/dax/error-handling.md +0 -495
- package/library/snippets/dax/iterators-and-aggregations.md +0 -474
- package/library/snippets/dax/kpis-and-metrics.md +0 -293
- package/library/snippets/dax/rankings-and-topn.md +0 -235
- package/library/snippets/dax/security-patterns.md +0 -413
- package/library/snippets/dax/text-and-formatting.md +0 -316
- package/library/snippets/dax/time-intelligence.md +0 -196
- package/library/snippets/dax/user-defined-functions.md +0 -477
- package/library/snippets/dax/virtual-tables.md +0 -546
- package/library/snippets/excel-formulas/README.md +0 -84
- package/library/snippets/excel-formulas/aggregations.md +0 -330
- package/library/snippets/excel-formulas/dates-and-times.md +0 -361
- package/library/snippets/excel-formulas/dynamic-arrays.md +0 -314
- package/library/snippets/excel-formulas/lookups.md +0 -169
- package/library/snippets/excel-formulas/text-functions.md +0 -363
- package/library/snippets/governance/naming-conventions.md +0 -97
- package/library/snippets/governance/review-checklists.md +0 -107
- package/library/snippets/power-query/README.md +0 -389
- package/library/snippets/power-query/api-integration.md +0 -707
- package/library/snippets/power-query/connections.md +0 -434
- package/library/snippets/power-query/data-cleaning.md +0 -298
- package/library/snippets/power-query/error-handling.md +0 -526
- package/library/snippets/power-query/parameters.md +0 -350
- package/library/snippets/power-query/performance.md +0 -506
- package/library/snippets/power-query/transformations.md +0 -330
- package/library/snippets/report-design/accessibility.md +0 -78
- package/library/snippets/report-design/chart-selection.md +0 -54
- package/library/snippets/report-design/layout-patterns.md +0 -87
- package/library/templates/data-models/README.md +0 -93
- package/library/templates/data-models/finance-model.md +0 -627
- package/library/templates/data-models/retail-star-schema.md +0 -473
- package/library/templates/excel/README.md +0 -83
- package/library/templates/excel/budget-tracker.md +0 -432
- package/library/templates/excel/data-entry-form.md +0 -533
- package/library/templates/power-bi/README.md +0 -72
- package/library/templates/power-bi/finance-report.md +0 -449
- package/library/templates/power-bi/kpi-scorecard.md +0 -461
- package/library/templates/power-bi/sales-dashboard.md +0 -281
- package/library/themes/excel/README.md +0 -436
- package/library/themes/power-bi/README.md +0 -271
- package/library/themes/power-bi/accessible.json +0 -307
- package/library/themes/power-bi/bi-superpowers-default.json +0 -858
- package/library/themes/power-bi/corporate-blue.json +0 -291
- package/library/themes/power-bi/dark-mode.json +0 -291
- package/library/themes/power-bi/minimal.json +0 -292
- package/library/themes/power-bi/print-friendly.json +0 -309
package/README.md
CHANGED
|
@@ -5,62 +5,87 @@
|
|
|
5
5
|
[](https://nodejs.org)
|
|
6
6
|
[](https://powerbi.microsoft.com)
|
|
7
7
|
|
|
8
|
-
Toolkit open-source para trabajar con **Power BI Desktop** desde
|
|
8
|
+
Toolkit open-source para trabajar con **Power BI Desktop** desde Claude Code, GitHub Copilot, Codex, Gemini CLI y Kilo Code.
|
|
9
9
|
|
|
10
|
-
> **Estado:**
|
|
10
|
+
> **Estado:** `v4.0.x`. Incluye 4 skills (`/bi-start` + 3 especialistas) y 2 MCP servers oficiales de Microsoft. `/report-design` genera PBIR via scripts Node propios (no depende de `pbi-cli-tool` para authoring — Windows + Power BI Desktop sí sigue siendo requisito runtime).
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Instalación
|
|
15
|
+
|
|
16
|
+
Elegí el camino según tu agente principal:
|
|
17
|
+
|
|
18
|
+
### 👉 Claude Code (recomendado para usuarios de Claude Code)
|
|
19
|
+
|
|
20
|
+
Dentro de Claude Code, ejecutá:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
/plugin marketplace add luquimbo/bi-superpowers
|
|
24
|
+
/plugin install bi-superpowers
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Eso instala el plugin completo (4 skills + 2 MCPs) en el perfil de Claude Code. Después podés actualizar con `/plugin update bi-superpowers` directamente desde Claude Code — sin pasar por npm.
|
|
28
|
+
|
|
29
|
+
Si también querés el plugin local de proyecto (con slash commands `/project-kickoff`, `/pbi-connect`, `/report-design` en un repo específico), corré `super kickoff` dentro del repo — requiere haber instalado la CLI via el otro path (abajo).
|
|
30
|
+
|
|
31
|
+
### 👉 Otros agentes — Copilot, Codex, Gemini CLI, Kilo Code (o multi-agente)
|
|
15
32
|
|
|
16
33
|
```bash
|
|
17
34
|
# 1. Instalá la CLI
|
|
18
35
|
npm install -g @luquimbo/bi-superpowers
|
|
19
36
|
|
|
20
|
-
# 2. Instalá skills
|
|
37
|
+
# 2. Instalá skills + MCPs en todos tus agentes
|
|
21
38
|
super install
|
|
22
39
|
```
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
El instalador:
|
|
25
42
|
|
|
26
43
|
1. Detecta qué agentes AI tenés instalados (Claude Code, Copilot, Codex, Gemini, Kilo).
|
|
27
44
|
2. Te deja elegir para cuáles instalar (o hace todos con `--all --yes`).
|
|
28
|
-
3. Copia los
|
|
45
|
+
3. Copia los 4 skills en los directorios correctos de cada agente.
|
|
29
46
|
4. Escribe los 2 MCPs en el config file correcto de cada agente (con el formato/schema que cada uno espera).
|
|
30
47
|
|
|
31
|
-
Reiniciá tu agente AI
|
|
48
|
+
Reiniciá tu agente AI y ya tenés bi-superpowers funcionando.
|
|
49
|
+
|
|
50
|
+
> **¿Por qué dos caminos?** El marketplace de Claude Code es la UX más limpia para usuarios de Claude Code — cero dependencias externas, updates nativos. La CLI via npm cubre los otros 4 agentes (que no tienen un marketplace equivalente) y funciona como denominador común cuando querés las mismas skills + MCPs en múltiples agentes. Los dos caminos son compatibles: podés combinar instalación via marketplace en Claude Code con instalación via CLI para los otros.
|
|
32
51
|
|
|
33
52
|
---
|
|
34
53
|
|
|
35
54
|
## Qué viene incluido
|
|
36
55
|
|
|
37
|
-
###
|
|
56
|
+
### 4 Skills
|
|
38
57
|
|
|
39
58
|
| Skill | Para qué |
|
|
40
59
|
|---|---|
|
|
41
|
-
| `
|
|
60
|
+
| `bi-start` | **Arrancar una sesión**: muestra el menú de skills, corre update-check, y (si detecta Power BI Desktop abierto) ofrece conectar vía MCP. Tu entrada por defecto en cada conversación nueva. |
|
|
61
|
+
| `project-kickoff` | Analizá el estado de tu proyecto BI **nuevo** y armá `AGENTS.md` + modelo base |
|
|
42
62
|
| `pbi-connect` | Conectá tu agente AI a Power BI Desktop vía MCP |
|
|
63
|
+
| `report-design` | Generá páginas PBIR vía scripts Node propios (`create-visual.js`, `apply-theme.js`, `validate-pbir.js`), con allowlist de 28 visualTypes nativos |
|
|
64
|
+
|
|
65
|
+
Si no sabés por dónde empezar, decile a tu agente `/bi-start` — te muestra los 4 skills, chequea updates, y rutea al que necesites. `/project-kickoff` está reservado para cuando arrancás un proyecto BI desde cero.
|
|
66
|
+
|
|
67
|
+
`report-design` requiere **Windows + Power BI Desktop** (standalone, no la versión de Microsoft Store). Los scripts Node son portables, pero el ciclo de verificación (relaunch, render) necesita Desktop. `pbi-cli-tool` es opcional y solo se usa para introspección del modelo (preferido: Microsoft Modeling MCP cuando está disponible).
|
|
43
68
|
|
|
44
69
|
### 2 MCP Servers (oficiales de Microsoft)
|
|
45
70
|
|
|
46
71
|
| MCP | Para qué |
|
|
47
72
|
|---|---|
|
|
48
|
-
| `powerbi-modeling` | Conexión local a Power BI Desktop (XMLA). Leer/escribir modelo semántico, ejecutar DAX. |
|
|
73
|
+
| `powerbi-modeling-mcp` | Conexión local a Power BI Desktop (XMLA). Leer/escribir modelo semántico, ejecutar DAX. |
|
|
49
74
|
| `microsoft-learn` | HTTP MCP de Microsoft Learn — docs oficiales de Power BI/DAX/Fabric en contexto de la conversación. |
|
|
50
75
|
|
|
51
76
|
---
|
|
52
77
|
|
|
53
78
|
## Agentes soportados
|
|
54
79
|
|
|
55
|
-
| Agente | Skills | MCP config path |
|
|
56
|
-
|
|
57
|
-
| **Claude Code** | ✅ `~/.claude/skills/` | `~/.claude.json` |
|
|
58
|
-
| **GitHub Copilot** | ✅ `~/.copilot/skills/` | `~/.copilot/mcp-config.json` |
|
|
59
|
-
| **Codex (OpenAI)** | ✅ `~/.agents/skills/` | `~/.codex/config.toml` |
|
|
60
|
-
| **Gemini CLI** | ✅ `~/.gemini/skills/` | `~/.gemini/settings.json` |
|
|
61
|
-
| **Kilo Code** | ✅ `~/.kilo/skills/` | `~/.kilo/mcp_settings.json` |
|
|
80
|
+
| Agente | Skills | MCP config path | Cómo se usa |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| **Claude Code** | ✅ via `/plugin install` o `~/.claude/skills/` | `~/.claude.json` | Lenguaje natural o slash commands si corrés `super kickoff` |
|
|
83
|
+
| **GitHub Copilot** | ✅ `~/.copilot/skills/` | `~/.copilot/mcp-config.json` | Lenguaje natural |
|
|
84
|
+
| **Codex (OpenAI)** | ✅ `~/.agents/skills/` | `~/.codex/config.toml` | Lenguaje natural |
|
|
85
|
+
| **Gemini CLI** | ✅ `~/.gemini/skills/` | `~/.gemini/settings.json` | Lenguaje natural |
|
|
86
|
+
| **Kilo Code** | ✅ `~/.kilo/skills/` | `~/.kilo/mcp_settings.json` | Lenguaje natural |
|
|
62
87
|
|
|
63
|
-
`super install` escribe
|
|
88
|
+
`super install` (npm path) escribe los skills + MCPs automáticamente para todos los agentes detectados.
|
|
64
89
|
|
|
65
90
|
### Instalación selectiva
|
|
66
91
|
|
|
@@ -79,12 +104,35 @@ super install --all --yes
|
|
|
79
104
|
|
|
80
105
|
## Actualizar
|
|
81
106
|
|
|
107
|
+
Dos caminos según cómo instalaste:
|
|
108
|
+
|
|
109
|
+
### Claude Code (instalado via marketplace)
|
|
110
|
+
|
|
111
|
+
Dentro de Claude Code:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
/plugin update bi-superpowers
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Eso trae la última versión publicada en el marketplace. Cero interacción con npm.
|
|
118
|
+
|
|
119
|
+
### npm (todos los otros agentes)
|
|
120
|
+
|
|
82
121
|
```bash
|
|
83
|
-
#
|
|
84
|
-
|
|
122
|
+
# 1. Actualizá la CLI a la última versión
|
|
123
|
+
super upgrade
|
|
85
124
|
|
|
86
|
-
#
|
|
87
|
-
super install --
|
|
125
|
+
# 2. Refrescá skills + MCPs en tus agentes (no se hace automático, es un paso separado)
|
|
126
|
+
super install --yes
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`super upgrade` reinstala el paquete global y al final te imprime un recordatorio con este segundo paso. No lo hace automático a propósito: los usuarios que solo quieren actualizar la CLI (p.ej. desarrollando local) pueden saltarlo.
|
|
130
|
+
|
|
131
|
+
Equivalente manual si `super upgrade` falla:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm install -g @luquimbo/bi-superpowers@latest
|
|
135
|
+
super install --yes
|
|
88
136
|
```
|
|
89
137
|
|
|
90
138
|
---
|
|
@@ -111,7 +159,8 @@ Si ya instalaste los MCPs por alguno de estos caminos, no necesitás correr `sup
|
|
|
111
159
|
## Requisitos
|
|
112
160
|
|
|
113
161
|
- **Node.js ≥ 18**
|
|
114
|
-
- **Power BI Desktop en Windows** (para
|
|
162
|
+
- **Power BI Desktop en Windows** (standalone, no Microsoft Store) para workflows locales contra Desktop (`powerbi-modeling-mcp` y `report-design`)
|
|
163
|
+
- **Python 3.10+**, **`pipx`** y **`pbi-cli-tool`** son **opcionales** — solo hacen falta para introspección del modelo via XMLA cuando el Microsoft Modeling MCP no está disponible. Para authoring de visuales, `report-design` usa scripts Node propios y no depende de esa cadena.
|
|
115
164
|
- Al menos uno de: Claude Code, GitHub Copilot, Codex, Gemini CLI, Kilo Code
|
|
116
165
|
|
|
117
166
|
---
|
|
@@ -119,11 +168,11 @@ Si ya instalaste los MCPs por alguno de estos caminos, no necesitás correr `sup
|
|
|
119
168
|
## Comandos
|
|
120
169
|
|
|
121
170
|
```bash
|
|
122
|
-
super install # Instalá skills + MCPs en tus agentes AI
|
|
123
|
-
super kickoff # Generá el plugin de Claude Code
|
|
171
|
+
super install # Instalá 4 skills + 2 MCPs en tus agentes AI
|
|
172
|
+
super kickoff # Generá el plugin local de Claude Code con slash commands
|
|
124
173
|
super recharge # Regenerá el plugin tras editar skills fuente
|
|
125
174
|
super powers # Listá skills disponibles
|
|
126
|
-
super upgrade # Actualizá la CLI a la última versión
|
|
175
|
+
super upgrade # Actualizá la CLI a la última versión + imprime recordatorio de `super install`
|
|
127
176
|
super help # Ayuda completa
|
|
128
177
|
```
|
|
129
178
|
|
package/bin/build-plugin.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Build the repository-root Claude Code plugin artifacts.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Generates plugin files from the sources in src/content/skills/ and
|
|
7
|
+
* verifies that all critical outputs were created successfully. This
|
|
8
|
+
* script runs as part of the `prepack` hook before `npm publish`.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const fs = require('fs');
|
|
@@ -15,9 +15,9 @@ const { loadSkills } = require('./lib/skills');
|
|
|
15
15
|
const pkg = require('../package.json');
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {string} packageDir -
|
|
20
|
-
* @throws {Error}
|
|
18
|
+
* Verify that every critical plugin output has been generated.
|
|
19
|
+
* @param {string} packageDir - Package root directory
|
|
20
|
+
* @throws {Error} if any critical file is missing
|
|
21
21
|
*/
|
|
22
22
|
function verifyPluginOutputs(packageDir) {
|
|
23
23
|
const criticalFiles = [
|
|
@@ -84,7 +84,14 @@ async function main() {
|
|
|
84
84
|
verifyPluginOutputs(packageDir);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
87
|
+
// Export for unit testing. The script is also invoked directly during
|
|
88
|
+
// `npm run build:plugin` — we only run main() when it's the entry point,
|
|
89
|
+
// otherwise the test suite would trigger a full build on every import.
|
|
90
|
+
module.exports = { verifyPluginOutputs, main };
|
|
91
|
+
|
|
92
|
+
if (require.main === module) {
|
|
93
|
+
main().catch((error) => {
|
|
94
|
+
console.error(error.message);
|
|
95
|
+
process.exit(1);
|
|
96
|
+
});
|
|
97
|
+
}
|