@lightdash/cli 0.2629.1 → 0.2629.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAiCA,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAmQF,KAAK,mBAAmB,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;AAkDjE,eAAO,MAAM,eAAe,GACxB,KAAK,MAAM,EAAE,EACb,MAAM,mBAAmB,EACzB,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,aAAa,MAAM,EACnB,cAAa,OAAe,EAC5B,SAAQ,OAAe,KACxB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA2G5B,CAAC;AAEF,eAAO,MAAM,eAAe,GACxB,SAAS,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAuKd,CAAC;
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAiCA,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAmQF,KAAK,mBAAmB,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;AAkDjE,eAAO,MAAM,eAAe,GACxB,KAAK,MAAM,EAAE,EACb,MAAM,mBAAmB,EACzB,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,aAAa,MAAM,EACnB,cAAa,OAAe,EAC5B,SAAQ,OAAe,KACxB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA2G5B,CAAC;AAEF,eAAO,MAAM,eAAe,GACxB,SAAS,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAuKd,CAAC;AA4ZF,eAAO,MAAM,aAAa,GACtB,SAAS,sBAAsB,KAChC,OAAO,CAAC,IAAI,CA4Id,CAAC"}
|
|
@@ -548,7 +548,32 @@ const upsertResources = async (type, projectId, changes, force, slugs, customPat
|
|
|
548
548
|
remainingItems.push(...spaceItems);
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
|
-
//
|
|
551
|
+
// For charts: also seed one item per unique dashboardSlug to avoid
|
|
552
|
+
// concurrent placeholder dashboard creation (duplicate slug bug)
|
|
553
|
+
if (type === 'charts') {
|
|
554
|
+
const chartsWithDashboard = remainingItems.filter((item) => 'dashboardSlug' in item &&
|
|
555
|
+
item.dashboardSlug);
|
|
556
|
+
const groupedByDashboard = (0, groupBy_1.default)(chartsWithDashboard, (item) => item.dashboardSlug);
|
|
557
|
+
Object.values(groupedByDashboard).forEach((dashboardItems) => {
|
|
558
|
+
// If no item for this dashboardSlug was already picked as a
|
|
559
|
+
// space seed, pick the first one as a dashboard seed
|
|
560
|
+
const alreadySeeded = dashboardItems.some((item) => seedItems.has(item));
|
|
561
|
+
if (!alreadySeeded) {
|
|
562
|
+
const seedIndex = force
|
|
563
|
+
? 0
|
|
564
|
+
: dashboardItems.findIndex((i) => i.needsUpdating);
|
|
565
|
+
if (seedIndex >= 0) {
|
|
566
|
+
seedItems.add(dashboardItems[seedIndex]);
|
|
567
|
+
// Remove from remainingItems since it's now a seed
|
|
568
|
+
const idx = remainingItems.indexOf(dashboardItems[seedIndex]);
|
|
569
|
+
if (idx >= 0) {
|
|
570
|
+
remainingItems.splice(idx, 1);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
// Phase 1: Sequential seeding (spaces + dashboard placeholders)
|
|
552
577
|
for (const item of seedItems) {
|
|
553
578
|
// eslint-disable-next-line no-await-in-loop
|
|
554
579
|
await upsertSingleItem(item, type, projectId, changes, force, config, skipSpaceCreate, publicSpaceCreate, validate);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "0.2629.
|
|
3
|
+
"version": "0.2629.2",
|
|
4
4
|
"description": "Lightdash CLI tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"unique-names-generator": "^4.7.1",
|
|
41
41
|
"uuid": "^11.0.3",
|
|
42
42
|
"yaml": "^2.7.0",
|
|
43
|
-
"@lightdash/common": "0.2629.
|
|
44
|
-
"@lightdash/warehouses": "0.2629.
|
|
43
|
+
"@lightdash/common": "0.2629.2",
|
|
44
|
+
"@lightdash/warehouses": "0.2629.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/inquirer": "^8.2.1",
|