@lightdash/cli 2.305.0 → 2.305.2
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/dist/.tsbuildinfo.build +1 -1
- package/dist/handlers/apps/scaffolding.d.ts.map +1 -1
- package/dist/handlers/apps/scaffolding.js +8 -1
- package/dist/vendor/authoring/AGENTS.md.tmpl +1 -1
- package/dist/vendor/authoring/chart-type/AGENTS.md.tmpl +1 -1
- package/dist/vendor/authoring/chart-type/App.jsx +1 -1
- package/dist/vendor/authoring/chart-type/README.md.tmpl +1 -1
- package/dist/vendor/authoring/developing-chart-types-locally/SKILL.md +1 -1
- package/dist/vendor/template/skill.md +10 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../src/handlers/apps/scaffolding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMzD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAKpE;AA6DD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,gBAChB,MAAM,WACV,MAAM,KAChB,MAAmE,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,eACrB,MAAM,KACnB,MAAM,CAAC,MAAM,EAAE,MAAM,CAevB,CAAC;AAWF,eAAO,MAAM,yBAAyB,eACtB,MAAM,KACnB,eAAe,EAeb,CAAC;AAEN,eAAO,MAAM,yBAAyB,QAAO,eAAe,EAG3D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAO,eAQ1C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,YAAY,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,yBAAyB,SAAU;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B,KAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../src/handlers/apps/scaffolding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMzD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAKpE;AA6DD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,gBAChB,MAAM,WACV,MAAM,KAChB,MAAmE,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,eACrB,MAAM,KACnB,MAAM,CAAC,MAAM,EAAE,MAAM,CAevB,CAAC;AAWF,eAAO,MAAM,yBAAyB,eACtB,MAAM,KACnB,eAAe,EAeb,CAAC;AAEN,eAAO,MAAM,yBAAyB,QAAO,eAAe,EAG3D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAO,eAQ1C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,YAAY,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,yBAAyB,SAAU;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B,KAAG,eAAe,EAsHlB,CAAC"}
|
|
@@ -186,6 +186,13 @@ const buildStaticAuthoringFiles = (args) => {
|
|
|
186
186
|
path: '.gitignore',
|
|
187
187
|
contentBase64: (0, fs_1.readFileSync)(path.join(authoringDir, 'gitignore')).toString('base64'),
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
// 7. Codex discovers skills in .agents/skills, not .claude/skills.
|
|
190
|
+
const agentsSkillMirrors = files
|
|
191
|
+
.filter((file) => file.path.startsWith('.claude/skills/'))
|
|
192
|
+
.map((file) => ({
|
|
193
|
+
...file,
|
|
194
|
+
path: file.path.replace(/^\.claude\//, '.agents/'),
|
|
195
|
+
}));
|
|
196
|
+
return [...files, ...agentsSkillMirrors];
|
|
190
197
|
};
|
|
191
198
|
exports.buildStaticAuthoringFiles = buildStaticAuthoringFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Working on this Lightdash data app
|
|
2
2
|
|
|
3
|
-
Two
|
|
3
|
+
Two bundled skills describe how to edit this app:
|
|
4
4
|
- `lightdash-data-app` — the Lightdash SDK surface (querying data, filters, downloads).
|
|
5
5
|
- `developing-data-apps-locally` — the local workflow: edit `src/`, `lightdash apps validate --build`, `lightdash apps preview`, `lightdash upload --apps <slug> --path ../..`; the SDK is the only data access; `.lightdash/context/` holds the project's semantic layer and theme.
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This folder is a **custom chart type** (a reusable visualization, the `data_app_viz` template) — ONE chart component that receives its data and settings from Lightdash, not a data app. It runs no query, owns no explore, and must not fetch anything itself.
|
|
4
4
|
|
|
5
|
-
Two
|
|
5
|
+
Two bundled skills describe how to edit it:
|
|
6
6
|
- `reusable-visualization` — the contract: the `useVizContext()` hook, the field/option declaration, resolved series colours, pivoted results.
|
|
7
7
|
- `developing-chart-types-locally` — the local workflow: the vizSchema lockstep rule, validate/upload/verify loop, and the path to the official registry.
|
|
8
8
|
|
|
@@ -43,7 +43,7 @@ const token = (name) =>
|
|
|
43
43
|
// mapping from the field names declared in lightdash-app.yml's vizSchema to
|
|
44
44
|
// the query's columns. Everything read here (`category`/`value` fields,
|
|
45
45
|
// `showLabels`/`maxBars` options) is declared there; keep the two in lockstep
|
|
46
|
-
// (see
|
|
46
|
+
// (see the reusable-visualization skill).
|
|
47
47
|
function App() {
|
|
48
48
|
const context = useVizContext();
|
|
49
49
|
const { fieldMapping, rows, options, colorPalette, ready } = context;
|
|
@@ -5,7 +5,7 @@ Created or downloaded with the Lightdash CLI. This is a **custom chart type** (a
|
|
|
5
5
|
## Edit → validate → upload
|
|
6
6
|
Run these commands from this folder under `chart-types/<slug>/`. The upload path `../..` selects the Lightdash content root.
|
|
7
7
|
|
|
8
|
-
1. Edit files under `src/`. The component's contract with Lightdash — the fields it maps and the config options viewers can change — is declared in `lightdash-app.yml` under `vizSchema` and must match what `src/App.jsx` reads (see
|
|
8
|
+
1. Edit files under `src/`. The component's contract with Lightdash — the fields it maps and the config options viewers can change — is declared in `lightdash-app.yml` under `vizSchema` and must match what `src/App.jsx` reads (see the `reusable-visualization` skill).
|
|
9
9
|
2. Run `lightdash apps validate` to check the source and manifest; `lightdash apps validate --build` adds the Cloud-parity Vite production build.
|
|
10
10
|
3. `lightdash upload --chart-types <slug> --path ../..` (the `slug` from `lightdash-app.yml`) — Lightdash rebuilds and serves it.
|
|
11
11
|
4. Open any explore in Lightdash, run a query, and pick this chart type in the chart type picker to see it against real data.
|
|
@@ -9,7 +9,7 @@ You are editing a Lightdash **custom chart type** (a reusable visualization, the
|
|
|
9
9
|
|
|
10
10
|
## The contract is the reusable-visualization skill
|
|
11
11
|
|
|
12
|
-
Read
|
|
12
|
+
Read the `reusable-visualization` skill before editing. It defines everything the component may do: `useVizContext()` is the only channel to the host (data, options, resolved colours), the component runs no query, owns no explore, and never fetches anything itself. App-level SDK APIs (query builder, `useLightdash`, filters, `externalFetch`) do not apply here and must not be introduced.
|
|
13
13
|
|
|
14
14
|
Never hand-build a data-point action menu when `useVizContext().pointMenu.enabled` — call `pointMenu.open({ x, y, row, metric })` and let Lightdash render it; an in-viz menu is only the fallback for hosts that predate the capability.
|
|
15
15
|
|
|
@@ -4,6 +4,16 @@ You are building a React data app that queries the Lightdash semantic layer. Thi
|
|
|
4
4
|
|
|
5
5
|
**Building a single reusable chart rather than an app?** Use the `reusable-visualization` skill before writing any code. A reusable visualization runs no query of its own — the host hands it rows, a field mapping, config option values and a colour palette — so the data and filter APIs below do not apply to it. That skill is the contract for those builds and overrides this guide wherever the two differ. Everything else here (environment, components, visual design) still applies. It says nothing about light/dark mode, and silence is not an override: **following the host's colour scheme is a platform contract that applies to a reusable visualization exactly as it does to an app** — see "Visual Design".
|
|
6
6
|
|
|
7
|
+
## User-facing responses
|
|
8
|
+
|
|
9
|
+
The person using the data app cares about what it shows and how it behaves, not how its code is implemented. For both the first build and follow-up changes, keep progress updates and final replies concise and non-technical unless otherwise asked:
|
|
10
|
+
|
|
11
|
+
- Describe the user-visible UI and behavior: what changed, where to find it, and what the user can do. Refer to controls and sections by their visible labels.
|
|
12
|
+
- Do not include source filenames or paths, line references, code snippets or tokens, component or function names, or other technical implementation details unless the user explicitly asks for them. Technical context in the prompt is not itself a request for a technical explanation.
|
|
13
|
+
- Explain limitations or unfinished work in terms of their effect on the app and any action the user can take, rather than exposing debugging or build details.
|
|
14
|
+
|
|
15
|
+
For example: "The date filter now updates all charts on this page. Use Clear filters to return to the full view."
|
|
16
|
+
|
|
7
17
|
## Iteration mindset
|
|
8
18
|
|
|
9
19
|
This pipeline is built for iteration — the user refines the app with follow-up prompts, and you have the full conversation history on every iteration. **Favor a responsive first build over upfront perfection.** Hit the core ask and ship; let the user tell you what to add.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "2.305.
|
|
3
|
+
"version": "2.305.2",
|
|
4
4
|
"description": "Lightdash CLI tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@actions/core": "1.11.1",
|
|
23
23
|
"@aws-sdk/credential-providers": "3.995.0",
|
|
24
24
|
"@casl/ability": "6.8.0",
|
|
25
|
-
"@lightdash/common": "2.305.
|
|
26
|
-
"@lightdash/warehouses": "2.305.
|
|
25
|
+
"@lightdash/common": "2.305.2",
|
|
26
|
+
"@lightdash/warehouses": "2.305.2",
|
|
27
27
|
"@sidvind/better-ajv-errors": "7.0.0",
|
|
28
28
|
"@types/columnify": "1.5.1",
|
|
29
29
|
"ajv": "8.18.0",
|