@duckcodeailabs/dql-cli 1.5.0 → 1.5.1
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/apps-api.d.ts +26 -4
- package/dist/apps-api.d.ts.map +1 -1
- package/dist/apps-api.js +189 -7
- package/dist/apps-api.js.map +1 -1
- package/dist/apps-api.test.js +6 -0
- package/dist/apps-api.test.js.map +1 -1
- package/dist/assets/dql-notebook/assets/index-DZ2X3-OY.js +862 -0
- package/dist/assets/dql-notebook/index.html +1 -1
- package/dist/block-studio-import.d.ts +2 -1
- package/dist/block-studio-import.d.ts.map +1 -1
- package/dist/block-studio-import.js +13 -5
- package/dist/block-studio-import.js.map +1 -1
- package/dist/block-studio-import.test.js +5 -1
- package/dist/block-studio-import.test.js.map +1 -1
- package/dist/commands/app.d.ts.map +1 -1
- package/dist/commands/app.js +6 -0
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +84 -24
- package/dist/commands/init.test.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/local-runtime.d.ts.map +1 -1
- package/dist/local-runtime.js +18 -3
- package/dist/local-runtime.js.map +1 -1
- package/package.json +11 -11
- package/dist/assets/dql-notebook/assets/index-mlfOQ2me.js +0 -857
package/dist/local-runtime.js
CHANGED
|
@@ -412,7 +412,7 @@ export async function startLocalServer(opts) {
|
|
|
412
412
|
tileType: 'aiPin',
|
|
413
413
|
title: item.title ?? pin.title,
|
|
414
414
|
viz: item.viz,
|
|
415
|
-
chartConfig: pin.chartConfig
|
|
415
|
+
chartConfig: mergeDashboardChartConfig(pin.chartConfig, item),
|
|
416
416
|
result: pin.result,
|
|
417
417
|
aiPin: pin,
|
|
418
418
|
citation: {
|
|
@@ -468,7 +468,7 @@ export async function startLocalServer(opts) {
|
|
|
468
468
|
certificationStatus: block.status ?? null,
|
|
469
469
|
title: item.title ?? block.name,
|
|
470
470
|
viz: item.viz,
|
|
471
|
-
chartConfig: plan?.chartConfig
|
|
471
|
+
chartConfig: mergeDashboardChartConfig(plan?.chartConfig, item),
|
|
472
472
|
result: normalizeQueryResult(result),
|
|
473
473
|
citation: {
|
|
474
474
|
kind: 'block',
|
|
@@ -1278,7 +1278,7 @@ export async function startLocalServer(opts) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
if (req.method === 'PATCH' && candidateId && !action) {
|
|
1280
1280
|
const body = await readJSON(req);
|
|
1281
|
-
const reviewStatus = typeof body.reviewStatus === 'string' && ['draft', 'saved', 'rejected'].includes(body.reviewStatus)
|
|
1281
|
+
const reviewStatus = typeof body.reviewStatus === 'string' && ['draft', 'review', 'saved', 'rejected'].includes(body.reviewStatus)
|
|
1282
1282
|
? body.reviewStatus
|
|
1283
1283
|
: undefined;
|
|
1284
1284
|
const candidate = updateBlockStudioImportCandidate(projectRoot, importId, candidateId, {
|
|
@@ -2951,6 +2951,21 @@ function resolveDashboardItemBlock(item, manifest) {
|
|
|
2951
2951
|
const normalizedRef = normalize(item.block.ref).replaceAll('\\', '/');
|
|
2952
2952
|
return Object.values(manifest.blocks).find((b) => normalize(b.filePath).replaceAll('\\', '/') === normalizedRef) ?? null;
|
|
2953
2953
|
}
|
|
2954
|
+
function mergeDashboardChartConfig(base, item) {
|
|
2955
|
+
const options = item.viz.options ?? {};
|
|
2956
|
+
const baseChart = base?.chart;
|
|
2957
|
+
return {
|
|
2958
|
+
...(base ?? {}),
|
|
2959
|
+
...options,
|
|
2960
|
+
chart: dashboardVizToChart(String(options.chart ?? baseChart ?? item.viz.type)),
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
function dashboardVizToChart(value) {
|
|
2964
|
+
const normalized = value.toLowerCase().replace(/_/g, '-');
|
|
2965
|
+
if (normalized === 'single-value')
|
|
2966
|
+
return 'kpi';
|
|
2967
|
+
return normalized;
|
|
2968
|
+
}
|
|
2954
2969
|
export function serializeJSON(value) {
|
|
2955
2970
|
return JSON.stringify(value, (_key, current) => {
|
|
2956
2971
|
if (typeof current === 'bigint') {
|