@lightdash/cli 1.241.0 → 1.242.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/dist/.tsbuildinfo +1 -1
- package/dist/analytics/analytics.d.ts +13 -3
- package/dist/analytics/analytics.d.ts.map +1 -1
- package/dist/handlers/download.d.ts +2 -0
- package/dist/handlers/download.d.ts.map +1 -1
- package/dist/handlers/download.js +81 -21
- package/dist/handlers/download.test.js +98 -1
- package/package.json +3 -3
|
@@ -212,6 +212,18 @@ type CliLogin = BaseTrack & {
|
|
|
212
212
|
url: string;
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
+
export type ProjectContentAsCodeCounts = {
|
|
216
|
+
chartsNum?: number;
|
|
217
|
+
dashboardsNum?: number;
|
|
218
|
+
spacesNum?: number;
|
|
219
|
+
virtualViewsNum?: number;
|
|
220
|
+
agentsNum?: number;
|
|
221
|
+
appsNum?: number;
|
|
222
|
+
alertsNum?: number;
|
|
223
|
+
scheduledDeliveriesNum?: number;
|
|
224
|
+
googleSheetsNum?: number;
|
|
225
|
+
externalConnectionsNum?: number;
|
|
226
|
+
};
|
|
215
227
|
type CliContentAsCode = BaseTrack & ({
|
|
216
228
|
event: 'download.started' | 'upload.started';
|
|
217
229
|
properties: {
|
|
@@ -225,10 +237,8 @@ type CliContentAsCode = BaseTrack & ({
|
|
|
225
237
|
userId?: string;
|
|
226
238
|
organizationId?: string;
|
|
227
239
|
projectId: string;
|
|
228
|
-
chartsNum?: number;
|
|
229
|
-
dashboardsNum?: number;
|
|
230
240
|
timeToCompleted: number;
|
|
231
|
-
};
|
|
241
|
+
} & ProjectContentAsCodeCounts;
|
|
232
242
|
} | {
|
|
233
243
|
event: 'download.error' | 'upload.error';
|
|
234
244
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/analytics/analytics.ts"],"names":[],"mappings":"AAmDA,MAAM,WAAW,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,sBAAsB,GACtB,WAAW,GACX,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,2BAA2B,GAC3B,6BAA6B,GAC7B,yBAAyB,GACzB,QAAQ,GACR,gBAAgB,GAChB,wBAAwB,GACxB,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,cAAc,GACd,kBAAkB,GAClB,mBAAmB,CAAC;AAa1B,eAAO,MAAM,eAAe,UAAW,OAAO,KAAG,MAehD,CAAC;AAEF,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,MAAM,CAAC,WAAW;IAM1B,OAAa,KAAK,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAiChD;IAED,OAAa,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBpE;CACJ"}
|
|
@@ -97,6 +97,7 @@ declare const downloadAiAgents: (projectId: string, ids: string[], implicit: boo
|
|
|
97
97
|
declare const readAiAgentFiles: (customPath?: string) => Promise<AgentAsCode[]>;
|
|
98
98
|
declare const upsertAiAgents: (projectId: string, slugs: string[], changes: Record<string, number>, force: boolean, customPath?: string, implicit?: boolean) => Promise<Record<string, number>>;
|
|
99
99
|
export declare const downloadHandler: (options: DownloadHandlerOptions) => Promise<void>;
|
|
100
|
+
declare const countChangeDelta: (before: Record<string, number>, after: Record<string, number>) => number;
|
|
100
101
|
declare const summarizeUploadChanges: (before: Record<string, number>, after: Record<string, number>) => {
|
|
101
102
|
detail: string;
|
|
102
103
|
variant?: ContentAsCodeOutputVariant;
|
|
@@ -117,6 +118,7 @@ declare const isFilteredWithNoDashboards: (hasFilters: boolean, dashboardSlugs:
|
|
|
117
118
|
export declare const uploadHandler: (options: DownloadHandlerOptions) => Promise<void>;
|
|
118
119
|
export declare const testHelpers: {
|
|
119
120
|
assertUniqueSpacePaths: typeof assertUniqueSpacePaths;
|
|
121
|
+
countChangeDelta: typeof countChangeDelta;
|
|
120
122
|
downloadLinkedVirtualViews: typeof downloadLinkedVirtualViews;
|
|
121
123
|
downloadSpaces: typeof downloadSpaces;
|
|
122
124
|
extractAppSlugsFromDashboards: typeof extractAppSlugsFromDashboards;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,WAAW,EA0BX,WAAW,EAGX,eAAe,EAEf,wBAAwB,EAgBxB,KAAK,WAAW,EACnB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,WAAW,EA0BX,WAAW,EAGX,eAAe,EAEf,wBAAwB,EAgBxB,KAAK,WAAW,EACnB,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAIH,KAAK,0BAA0B,EAClC,MAAM,iCAAiC,CAAC;AAgEzC,OAAO,EACH,sBAAsB,EAGtB,cAAc,EACd,qBAAqB,EAKrB,cAAc,EACd,cAAc,EACd,8BAA8B,EAC9B,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EAElB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IAC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OAAO,CAAC,MAAM,EAAE,CAId,CAAC;AAIN,QAAA,MAAM,0BAA0B,eAChB,OAAO,kBACH,MAAM,EAAE,KACzB,OAAoD,CAAC;AAExD,eAAO,MAAM,aAAa,YACb,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAs8Bd,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC"}
|
|
@@ -1032,9 +1032,7 @@ const downloadHandler = async (options) => {
|
|
|
1032
1032
|
body: undefined,
|
|
1033
1033
|
});
|
|
1034
1034
|
const projectName = (0, common_1.generateSlug)(project.name);
|
|
1035
|
-
|
|
1036
|
-
let chartTotal;
|
|
1037
|
-
let dashboardTotal;
|
|
1035
|
+
const counts = {};
|
|
1038
1036
|
const start = Date.now();
|
|
1039
1037
|
await analytics_1.LightdashAnalytics.track({
|
|
1040
1038
|
event: 'download.started',
|
|
@@ -1061,6 +1059,7 @@ const downloadHandler = async (options) => {
|
|
|
1061
1059
|
output.startItem('Spaces');
|
|
1062
1060
|
try {
|
|
1063
1061
|
const spaceTotal = await (0, spacesAsCode_1.downloadSpaces)(projectId, projectName, options.path, options.nested, options.rootSpaces);
|
|
1062
|
+
counts.spacesNum = spaceTotal;
|
|
1064
1063
|
output.completeItem(`${spaceTotal} downloaded`);
|
|
1065
1064
|
}
|
|
1066
1065
|
catch (error) {
|
|
@@ -1080,7 +1079,11 @@ const downloadHandler = async (options) => {
|
|
|
1080
1079
|
options.virtualViews.length > 0) {
|
|
1081
1080
|
await output.runItem({
|
|
1082
1081
|
label: 'Virtual views',
|
|
1083
|
-
action: () =>
|
|
1082
|
+
action: async () => {
|
|
1083
|
+
const total = await downloadVirtualViews(projectId, options.virtualViews, options.path);
|
|
1084
|
+
counts.virtualViewsNum = total;
|
|
1085
|
+
return total;
|
|
1086
|
+
},
|
|
1084
1087
|
detail: (total) => `${total} downloaded`,
|
|
1085
1088
|
});
|
|
1086
1089
|
}
|
|
@@ -1105,7 +1108,7 @@ const downloadHandler = async (options) => {
|
|
|
1105
1108
|
detail: ({ total }) => `${total} downloaded`,
|
|
1106
1109
|
});
|
|
1107
1110
|
allMetadataEntries = [...allMetadataEntries, ...sqlChartMeta];
|
|
1108
|
-
|
|
1111
|
+
counts.chartsNum = regularChartTotal + sqlChartTotal;
|
|
1109
1112
|
}
|
|
1110
1113
|
}
|
|
1111
1114
|
// Download dashboards
|
|
@@ -1118,7 +1121,7 @@ const downloadHandler = async (options) => {
|
|
|
1118
1121
|
let appSlugs = [];
|
|
1119
1122
|
let dashMeta;
|
|
1120
1123
|
({
|
|
1121
|
-
total:
|
|
1124
|
+
total: counts.dashboardsNum,
|
|
1122
1125
|
chartSlugs,
|
|
1123
1126
|
appSlugs,
|
|
1124
1127
|
metadataEntries: dashMeta,
|
|
@@ -1155,6 +1158,9 @@ const downloadHandler = async (options) => {
|
|
|
1155
1158
|
output.completeItem('not available on this server', 'warning');
|
|
1156
1159
|
}
|
|
1157
1160
|
else {
|
|
1161
|
+
counts.virtualViewsNum =
|
|
1162
|
+
(counts.virtualViewsNum ?? 0) +
|
|
1163
|
+
linkedVirtualViews;
|
|
1158
1164
|
output.completeItem(`${linkedVirtualViews} downloaded`);
|
|
1159
1165
|
}
|
|
1160
1166
|
}
|
|
@@ -1169,7 +1175,11 @@ const downloadHandler = async (options) => {
|
|
|
1169
1175
|
options.agents.length === 0;
|
|
1170
1176
|
await output.runItem({
|
|
1171
1177
|
label: 'AI agents',
|
|
1172
|
-
action: () =>
|
|
1178
|
+
action: async () => {
|
|
1179
|
+
const total = await downloadAiAgents(projectId, options.agents, implicit, options.path);
|
|
1180
|
+
counts.agentsNum = total;
|
|
1181
|
+
return total;
|
|
1182
|
+
},
|
|
1173
1183
|
detail: (total) => `${total} downloaded`,
|
|
1174
1184
|
});
|
|
1175
1185
|
}
|
|
@@ -1178,7 +1188,11 @@ const downloadHandler = async (options) => {
|
|
|
1178
1188
|
options.alerts.length > 0) {
|
|
1179
1189
|
await output.runItem({
|
|
1180
1190
|
label: 'Alerts',
|
|
1181
|
-
action: () =>
|
|
1191
|
+
action: async () => {
|
|
1192
|
+
const total = await downloadScheduledContent(projectId, options.alerts, common_1.ContentAsCodeType.ALERT, options.path);
|
|
1193
|
+
counts.alertsNum = total;
|
|
1194
|
+
return total;
|
|
1195
|
+
},
|
|
1182
1196
|
detail: (total) => `${total} downloaded`,
|
|
1183
1197
|
});
|
|
1184
1198
|
}
|
|
@@ -1187,7 +1201,11 @@ const downloadHandler = async (options) => {
|
|
|
1187
1201
|
options.scheduledDeliveries.length > 0) {
|
|
1188
1202
|
await output.runItem({
|
|
1189
1203
|
label: 'Scheduled deliveries',
|
|
1190
|
-
action: () =>
|
|
1204
|
+
action: async () => {
|
|
1205
|
+
const total = await downloadScheduledContent(projectId, options.scheduledDeliveries, common_1.ContentAsCodeType.SCHEDULED_DELIVERY, options.path);
|
|
1206
|
+
counts.scheduledDeliveriesNum = total;
|
|
1207
|
+
return total;
|
|
1208
|
+
},
|
|
1191
1209
|
detail: (total) => `${total} downloaded`,
|
|
1192
1210
|
});
|
|
1193
1211
|
}
|
|
@@ -1196,7 +1214,11 @@ const downloadHandler = async (options) => {
|
|
|
1196
1214
|
options.googleSheets.length > 0) {
|
|
1197
1215
|
await output.runItem({
|
|
1198
1216
|
label: 'Google Sheets syncs',
|
|
1199
|
-
action: () =>
|
|
1217
|
+
action: async () => {
|
|
1218
|
+
const total = await downloadScheduledContent(projectId, options.googleSheets, common_1.ContentAsCodeType.GOOGLE_SHEETS_SYNC, options.path);
|
|
1219
|
+
counts.googleSheetsNum = total;
|
|
1220
|
+
return total;
|
|
1221
|
+
},
|
|
1200
1222
|
detail: (total) => `${total} downloaded`,
|
|
1201
1223
|
});
|
|
1202
1224
|
}
|
|
@@ -1210,7 +1232,11 @@ const downloadHandler = async (options) => {
|
|
|
1210
1232
|
options.externalConnections.length === 0;
|
|
1211
1233
|
await output.runItem({
|
|
1212
1234
|
label: 'External connections',
|
|
1213
|
-
action: () =>
|
|
1235
|
+
action: async () => {
|
|
1236
|
+
const total = await downloadExternalConnections(projectId, options.externalConnections, implicit, options.path);
|
|
1237
|
+
counts.externalConnectionsNum = total;
|
|
1238
|
+
return total;
|
|
1239
|
+
},
|
|
1214
1240
|
detail: (total) => `${total} downloaded`,
|
|
1215
1241
|
});
|
|
1216
1242
|
}
|
|
@@ -1273,6 +1299,7 @@ const downloadHandler = async (options) => {
|
|
|
1273
1299
|
];
|
|
1274
1300
|
}
|
|
1275
1301
|
if (appRefsToDownload.length === 0) {
|
|
1302
|
+
counts.appsNum = 0;
|
|
1276
1303
|
if (appListingError === null) {
|
|
1277
1304
|
output.completeItem('0 found');
|
|
1278
1305
|
}
|
|
@@ -1298,6 +1325,7 @@ const downloadHandler = async (options) => {
|
|
|
1298
1325
|
onProgress: (processed, total) => output.updateActive(`${processed} of ${total} processed`),
|
|
1299
1326
|
});
|
|
1300
1327
|
const summary = (0, appsDownload_1.appsDownloadSummary)(successCount, appRefsToDownload.length, failures, appsDir, skippedNotBuiltCount);
|
|
1328
|
+
counts.appsNum = successCount;
|
|
1301
1329
|
output.completeItem(`${successCount} downloaded${skippedNotBuiltCount > 0
|
|
1302
1330
|
? `, ${skippedNotBuiltCount} skipped`
|
|
1303
1331
|
: ''}${failures.length > 0 ? `, ${failures.length} failed` : ''}`, summary.ok ? undefined : 'warning');
|
|
@@ -1331,6 +1359,7 @@ const downloadHandler = async (options) => {
|
|
|
1331
1359
|
onProgress: (processed, total) => output.updateActive(`${processed} of ${total} processed`),
|
|
1332
1360
|
});
|
|
1333
1361
|
const linkedSummary = (0, appsDownload_1.appsDownloadSummary)(outcome.successCount, linkedAppSlugs.length, outcome.failures, appsDir, outcome.skippedNotBuiltCount);
|
|
1362
|
+
counts.appsNum = (counts.appsNum ?? 0) + outcome.successCount;
|
|
1334
1363
|
output.completeItem(`${outcome.successCount} downloaded${outcome.skippedNotBuiltCount > 0
|
|
1335
1364
|
? `, ${outcome.skippedNotBuiltCount} skipped`
|
|
1336
1365
|
: ''}${outcome.failures.length > 0
|
|
@@ -1371,8 +1400,7 @@ const downloadHandler = async (options) => {
|
|
|
1371
1400
|
userId: config.user?.userUuid,
|
|
1372
1401
|
organizationId: config.user?.organizationUuid,
|
|
1373
1402
|
projectId,
|
|
1374
|
-
|
|
1375
|
-
dashboardsNum: dashboardTotal,
|
|
1403
|
+
...counts,
|
|
1376
1404
|
timeToCompleted: (end - start) / 1000,
|
|
1377
1405
|
},
|
|
1378
1406
|
});
|
|
@@ -1423,6 +1451,10 @@ const UPLOAD_CHANGE_SUFFIXES = [
|
|
|
1423
1451
|
'skipped',
|
|
1424
1452
|
'failed',
|
|
1425
1453
|
];
|
|
1454
|
+
const countChangeDelta = (before, after) => Object.entries(after).reduce((total, [key, value]) => {
|
|
1455
|
+
const difference = value - (before[key] ?? 0);
|
|
1456
|
+
return difference > 0 ? total + difference : total;
|
|
1457
|
+
}, 0);
|
|
1426
1458
|
const summarizeUploadChanges = (before, after) => {
|
|
1427
1459
|
const totals = new Map();
|
|
1428
1460
|
Object.entries(after).forEach(([key, value]) => {
|
|
@@ -1441,12 +1473,13 @@ const summarizeUploadChanges = (before, after) => {
|
|
|
1441
1473
|
const hasFailures = [...totals.keys()].some((label) => label === 'with errors' || label === 'failed');
|
|
1442
1474
|
return { detail, variant: hasFailures ? 'warning' : undefined };
|
|
1443
1475
|
};
|
|
1444
|
-
const runUploadChangesPhase = async ({ output, label, changes, action, }) => {
|
|
1476
|
+
const runUploadChangesPhase = async ({ output, label, changes, action, onCount, }) => {
|
|
1445
1477
|
const before = { ...changes };
|
|
1446
1478
|
output.startItem(label);
|
|
1447
1479
|
const updatedChanges = await action();
|
|
1448
1480
|
const summary = summarizeUploadChanges(before, updatedChanges);
|
|
1449
1481
|
output.completeItem(summary.detail, summary.variant);
|
|
1482
|
+
onCount?.(countChangeDelta(before, updatedChanges));
|
|
1450
1483
|
return updatedChanges;
|
|
1451
1484
|
};
|
|
1452
1485
|
// SQL charts have 'sql' field instead of 'tableName'/'metricQuery'
|
|
@@ -1739,9 +1772,7 @@ const uploadHandler = async (options) => {
|
|
|
1739
1772
|
// Log current project info
|
|
1740
1773
|
(0, selectProject_1.logSelectedProject)(projectSelection, config, 'Uploading to');
|
|
1741
1774
|
let changes = {};
|
|
1742
|
-
|
|
1743
|
-
let chartTotal;
|
|
1744
|
-
let dashboardTotal;
|
|
1775
|
+
const counts = {};
|
|
1745
1776
|
const start = Date.now();
|
|
1746
1777
|
await analytics_1.LightdashAnalytics.track({
|
|
1747
1778
|
event: 'upload.started',
|
|
@@ -1777,6 +1808,9 @@ const uploadHandler = async (options) => {
|
|
|
1777
1808
|
label: 'Spaces',
|
|
1778
1809
|
changes,
|
|
1779
1810
|
action: () => (0, spacesAsCode_1.upsertSpaces)(projectId, spaceFiles, changes, options.skipSpaceCreate, options.public, options.skipSpaceAccess),
|
|
1811
|
+
onCount: (count) => {
|
|
1812
|
+
counts.spacesNum = count;
|
|
1813
|
+
},
|
|
1780
1814
|
});
|
|
1781
1815
|
}
|
|
1782
1816
|
else if (hasFilters) {
|
|
@@ -1789,6 +1823,7 @@ const uploadHandler = async (options) => {
|
|
|
1789
1823
|
userId: config.user?.userUuid,
|
|
1790
1824
|
organizationId: config.user?.organizationUuid,
|
|
1791
1825
|
projectId,
|
|
1826
|
+
...counts,
|
|
1792
1827
|
timeToCompleted: (Date.now() - start) / 1000,
|
|
1793
1828
|
},
|
|
1794
1829
|
});
|
|
@@ -1855,6 +1890,9 @@ const uploadHandler = async (options) => {
|
|
|
1855
1890
|
label: 'Virtual views',
|
|
1856
1891
|
changes,
|
|
1857
1892
|
action: () => upsertVirtualViews(projectId, options.virtualViews, changes, options.force, uploadPermissions.virtualViews, options.path, virtualViewCandidates),
|
|
1893
|
+
onCount: (count) => {
|
|
1894
|
+
counts.virtualViewsNum = count;
|
|
1895
|
+
},
|
|
1858
1896
|
});
|
|
1859
1897
|
}
|
|
1860
1898
|
}
|
|
@@ -1870,6 +1908,9 @@ const uploadHandler = async (options) => {
|
|
|
1870
1908
|
label: 'External connections',
|
|
1871
1909
|
changes,
|
|
1872
1910
|
action: () => upsertExternalConnections(projectId, options.externalConnections, changes, options.force, uploadPermissions.externalConnections, options.path),
|
|
1911
|
+
onCount: (count) => {
|
|
1912
|
+
counts.externalConnectionsNum = count;
|
|
1913
|
+
},
|
|
1873
1914
|
});
|
|
1874
1915
|
}
|
|
1875
1916
|
}
|
|
@@ -1891,6 +1932,7 @@ const uploadHandler = async (options) => {
|
|
|
1891
1932
|
let eeAppRoutesUnavailable = false;
|
|
1892
1933
|
const changesBeforeApps = { ...changes };
|
|
1893
1934
|
if (shouldUploadApps && !uploadPermissions.dataApps) {
|
|
1935
|
+
counts.appsNum = 0;
|
|
1894
1936
|
output.startItem('Data apps');
|
|
1895
1937
|
globalState_1.default.log(styles.warning(`Skipping data apps: create:DataApp or manage:DataApp permission is required for this project (the create:DataApp@preview and manage:DataApp@preview scopes only cover preview projects you created). Dashboard tiles will resolve only if their apps already exist in this project.`));
|
|
1896
1938
|
output.completeItem('permission denied', 'warning');
|
|
@@ -2156,6 +2198,12 @@ const uploadHandler = async (options) => {
|
|
|
2156
2198
|
changes['data apps failed'] = appsFailed;
|
|
2157
2199
|
if (appsSkipped > 0)
|
|
2158
2200
|
changes['data apps skipped'] = appsSkipped;
|
|
2201
|
+
counts.appsNum =
|
|
2202
|
+
appsCreated +
|
|
2203
|
+
appsUpdated +
|
|
2204
|
+
appsUnchanged +
|
|
2205
|
+
appsFailed +
|
|
2206
|
+
appsSkipped;
|
|
2159
2207
|
const appSummary = summarizeUploadChanges(changesBeforeApps, changes);
|
|
2160
2208
|
if (eeAppRoutesUnavailable) {
|
|
2161
2209
|
output.completeItem('not available on this server', 'warning');
|
|
@@ -2187,7 +2235,7 @@ const uploadHandler = async (options) => {
|
|
|
2187
2235
|
return changes;
|
|
2188
2236
|
}
|
|
2189
2237
|
const result = await upsertResources('charts', projectId, changes, options.force, chartSlugs, uploadPermissions.charts, options.path, options.skipSpaceCreate, options.public, options.validate, concurrency, looseFiles.charts, spaceNames);
|
|
2190
|
-
|
|
2238
|
+
counts.chartsNum = result.total;
|
|
2191
2239
|
return result.changes;
|
|
2192
2240
|
},
|
|
2193
2241
|
});
|
|
@@ -2201,7 +2249,7 @@ const uploadHandler = async (options) => {
|
|
|
2201
2249
|
return changes;
|
|
2202
2250
|
}
|
|
2203
2251
|
const result = await upsertResources('dashboards', projectId, changes, options.force, options.dashboards, uploadPermissions.dashboards, options.path, options.skipSpaceCreate, options.public, options.validate, concurrency, looseFiles.dashboards, spaceNames);
|
|
2204
|
-
|
|
2252
|
+
counts.dashboardsNum = result.total;
|
|
2205
2253
|
return result.changes;
|
|
2206
2254
|
},
|
|
2207
2255
|
});
|
|
@@ -2216,6 +2264,9 @@ const uploadHandler = async (options) => {
|
|
|
2216
2264
|
label: 'AI agents',
|
|
2217
2265
|
changes,
|
|
2218
2266
|
action: () => upsertAiAgents(projectId, options.agents, changes, options.force, options.path, options.agents.length === 0),
|
|
2267
|
+
onCount: (count) => {
|
|
2268
|
+
counts.agentsNum = count;
|
|
2269
|
+
},
|
|
2219
2270
|
});
|
|
2220
2271
|
}
|
|
2221
2272
|
catch (error) {
|
|
@@ -2233,6 +2284,9 @@ const uploadHandler = async (options) => {
|
|
|
2233
2284
|
label: 'Alerts',
|
|
2234
2285
|
changes,
|
|
2235
2286
|
action: () => upsertScheduledContent(projectId, options.alerts, changes, options.force, common_1.ContentAsCodeType.ALERT, uploadPermissions.alerts, options.path),
|
|
2287
|
+
onCount: (count) => {
|
|
2288
|
+
counts.alertsNum = count;
|
|
2289
|
+
},
|
|
2236
2290
|
});
|
|
2237
2291
|
}
|
|
2238
2292
|
}
|
|
@@ -2246,6 +2300,9 @@ const uploadHandler = async (options) => {
|
|
|
2246
2300
|
label: 'Scheduled deliveries',
|
|
2247
2301
|
changes,
|
|
2248
2302
|
action: () => upsertScheduledContent(projectId, options.scheduledDeliveries, changes, options.force, common_1.ContentAsCodeType.SCHEDULED_DELIVERY, uploadPermissions.scheduledDeliveries, options.path),
|
|
2303
|
+
onCount: (count) => {
|
|
2304
|
+
counts.scheduledDeliveriesNum = count;
|
|
2305
|
+
},
|
|
2249
2306
|
});
|
|
2250
2307
|
}
|
|
2251
2308
|
}
|
|
@@ -2259,6 +2316,9 @@ const uploadHandler = async (options) => {
|
|
|
2259
2316
|
label: 'Google Sheets syncs',
|
|
2260
2317
|
changes,
|
|
2261
2318
|
action: () => upsertScheduledContent(projectId, options.googleSheets, changes, options.force, common_1.ContentAsCodeType.GOOGLE_SHEETS_SYNC, uploadPermissions.googleSheets, options.path),
|
|
2319
|
+
onCount: (count) => {
|
|
2320
|
+
counts.googleSheetsNum = count;
|
|
2321
|
+
},
|
|
2262
2322
|
});
|
|
2263
2323
|
}
|
|
2264
2324
|
}
|
|
@@ -2269,8 +2329,7 @@ const uploadHandler = async (options) => {
|
|
|
2269
2329
|
userId: config.user?.userUuid,
|
|
2270
2330
|
organizationId: config.user?.organizationUuid,
|
|
2271
2331
|
projectId,
|
|
2272
|
-
|
|
2273
|
-
dashboardsNum: dashboardTotal,
|
|
2332
|
+
...counts,
|
|
2274
2333
|
timeToCompleted: (end - start) / 1000, // in seconds
|
|
2275
2334
|
},
|
|
2276
2335
|
});
|
|
@@ -2295,6 +2354,7 @@ const uploadHandler = async (options) => {
|
|
|
2295
2354
|
exports.uploadHandler = uploadHandler;
|
|
2296
2355
|
exports.testHelpers = {
|
|
2297
2356
|
assertUniqueSpacePaths: spacesAsCode_1.assertUniqueSpacePaths,
|
|
2357
|
+
countChangeDelta,
|
|
2298
2358
|
downloadLinkedVirtualViews,
|
|
2299
2359
|
downloadSpaces: spacesAsCode_1.downloadSpaces,
|
|
2300
2360
|
extractAppSlugsFromDashboards,
|
|
@@ -6,6 +6,7 @@ const fs_1 = require("fs");
|
|
|
6
6
|
const os = tslib_1.__importStar(require("os"));
|
|
7
7
|
const path = tslib_1.__importStar(require("path"));
|
|
8
8
|
const vitest_1 = require("vitest");
|
|
9
|
+
const analytics_1 = require("../analytics/analytics");
|
|
9
10
|
const globalState_1 = tslib_1.__importDefault(require("../globalState"));
|
|
10
11
|
const appsDownload_1 = require("./apps/appsDownload");
|
|
11
12
|
const apiClient_1 = require("./dbt/apiClient");
|
|
@@ -38,7 +39,7 @@ vitest_1.vi.mock('./dbt/apiClient', async (importOriginal) => ({
|
|
|
38
39
|
getContentAsCodeUploadPermissions: vitest_1.vi.fn(),
|
|
39
40
|
lightdashApi: vitest_1.vi.fn(),
|
|
40
41
|
}));
|
|
41
|
-
const { assertUniqueSpacePaths, downloadLinkedVirtualViews, downloadSpaces, extractChartTableNames, getDashboardAppSlugs, getDashboardChartSlugs, getFlatSpaceFileNames, hasContentFilters, isAiAgentsUnavailableError, isExternalConnectionsUnavailableError, isVirtualViewsUnavailableError, downloadAiAgents, isFilteredWithNoDashboards, readAiAgentFiles, readSpaceFiles, readSpaceNames, sanitizeChartForDownload, shouldFallBackToEmbeddedSpaces, shouldDownloadAiAgents, summarizeUploadChanges, upsertAiAgents, upsertExternalConnections, upsertSpaces, upsertVirtualViews, validateSpaceIdentity, writeSpaceFiles, } = download_1.testHelpers;
|
|
42
|
+
const { assertUniqueSpacePaths, downloadLinkedVirtualViews, downloadSpaces, extractChartTableNames, getDashboardAppSlugs, getDashboardChartSlugs, getFlatSpaceFileNames, hasContentFilters, isAiAgentsUnavailableError, isExternalConnectionsUnavailableError, isVirtualViewsUnavailableError, countChangeDelta, downloadAiAgents, isFilteredWithNoDashboards, readAiAgentFiles, readSpaceFiles, readSpaceNames, sanitizeChartForDownload, shouldFallBackToEmbeddedSpaces, shouldDownloadAiAgents, summarizeUploadChanges, upsertAiAgents, upsertExternalConnections, upsertSpaces, upsertVirtualViews, validateSpaceIdentity, writeSpaceFiles, } = download_1.testHelpers;
|
|
42
43
|
const makeDownloadHandlerOptions = (overrides = {}) => ({
|
|
43
44
|
verbose: false,
|
|
44
45
|
charts: [],
|
|
@@ -802,6 +803,90 @@ describe('AI agent downloads', () => {
|
|
|
802
803
|
await expect(downloadAiAgents('project-uuid', [], false)).rejects.toBe(unavailableError);
|
|
803
804
|
});
|
|
804
805
|
});
|
|
806
|
+
describe('countChangeDelta', () => {
|
|
807
|
+
it('sums positive deltas across change keys', () => {
|
|
808
|
+
expect(countChangeDelta({ 'AI agents created': 1, 'charts skipped': 2 }, {
|
|
809
|
+
'AI agents created': 3,
|
|
810
|
+
'AI agents updated': 1,
|
|
811
|
+
'charts skipped': 2,
|
|
812
|
+
})).toBe(3);
|
|
813
|
+
});
|
|
814
|
+
it('returns 0 when nothing changed', () => {
|
|
815
|
+
expect(countChangeDelta({ 'charts created': 1 }, { 'charts created': 1 })).toBe(0);
|
|
816
|
+
});
|
|
817
|
+
});
|
|
818
|
+
describe('downloadHandler analytics', () => {
|
|
819
|
+
beforeEach(() => {
|
|
820
|
+
vitest_1.vi.mocked(analytics_1.LightdashAnalytics.track).mockClear();
|
|
821
|
+
vitest_1.vi.mocked(apiClient_1.lightdashApi).mockReset();
|
|
822
|
+
});
|
|
823
|
+
it('records per-type counts on download.completed, including agents', async () => {
|
|
824
|
+
const tmpDir = await fs_1.promises.mkdtemp(path.join(os.tmpdir(), 'agents-download-analytics-'));
|
|
825
|
+
vitest_1.vi.mocked(apiClient_1.lightdashApi).mockImplementation(async ({ url }) => {
|
|
826
|
+
if (url.startsWith('/api/v1/health')) {
|
|
827
|
+
return { version: '0.0.0' };
|
|
828
|
+
}
|
|
829
|
+
if (url === '/api/v1/projects/project-uuid') {
|
|
830
|
+
return { name: 'Test project' };
|
|
831
|
+
}
|
|
832
|
+
if (url.includes('/code/aiAgents')) {
|
|
833
|
+
return {
|
|
834
|
+
agents: [
|
|
835
|
+
{
|
|
836
|
+
contentType: common_1.ContentAsCodeType.AI_AGENT,
|
|
837
|
+
version: 1,
|
|
838
|
+
agentVersion: 2,
|
|
839
|
+
slug: 'sales-agent',
|
|
840
|
+
name: 'Sales agent',
|
|
841
|
+
description: null,
|
|
842
|
+
imageUrl: null,
|
|
843
|
+
instruction: null,
|
|
844
|
+
tags: null,
|
|
845
|
+
enableDataAccess: true,
|
|
846
|
+
enableSelfImprovement: false,
|
|
847
|
+
enableContentTools: false,
|
|
848
|
+
enableUserContext: false,
|
|
849
|
+
modelConfig: null,
|
|
850
|
+
},
|
|
851
|
+
],
|
|
852
|
+
missingIds: [],
|
|
853
|
+
offset: 1,
|
|
854
|
+
total: 1,
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
throw new Error(`Unexpected request: ${url}`);
|
|
858
|
+
});
|
|
859
|
+
try {
|
|
860
|
+
await (0, download_1.downloadHandler)(makeDownloadHandlerOptions({
|
|
861
|
+
includeAgents: true,
|
|
862
|
+
skipAlerts: true,
|
|
863
|
+
skipGoogleSheets: true,
|
|
864
|
+
skipScheduledDeliveries: true,
|
|
865
|
+
skipVirtualViews: true,
|
|
866
|
+
skipExternalConnections: true,
|
|
867
|
+
path: tmpDir,
|
|
868
|
+
project: 'project-uuid',
|
|
869
|
+
}));
|
|
870
|
+
expect(analytics_1.LightdashAnalytics.track).toHaveBeenCalledWith(expect.objectContaining({
|
|
871
|
+
event: 'download.completed',
|
|
872
|
+
properties: expect.objectContaining({
|
|
873
|
+
projectId: 'project-uuid',
|
|
874
|
+
agentsNum: 1,
|
|
875
|
+
}),
|
|
876
|
+
}));
|
|
877
|
+
expect(analytics_1.LightdashAnalytics.track).toHaveBeenCalledWith(expect.objectContaining({
|
|
878
|
+
event: 'download.completed',
|
|
879
|
+
properties: expect.not.objectContaining({
|
|
880
|
+
chartsNum: expect.anything(),
|
|
881
|
+
dashboardsNum: expect.anything(),
|
|
882
|
+
}),
|
|
883
|
+
}));
|
|
884
|
+
}
|
|
885
|
+
finally {
|
|
886
|
+
await fs_1.promises.rm(tmpDir, { recursive: true, force: true });
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
});
|
|
805
890
|
describe('downloadHandler failures', () => {
|
|
806
891
|
const unavailableError = new common_1.LightdashError({
|
|
807
892
|
message: "Unable to initialize service 'aiAgentCoderService' - no factory or provider.",
|
|
@@ -857,6 +942,18 @@ describe('downloadHandler failures', () => {
|
|
|
857
942
|
expect(vitest_1.vi.mocked(apiClient_1.lightdashApi)).toHaveBeenCalledWith(expect.objectContaining({
|
|
858
943
|
url: expect.stringContaining('/code/scheduledDeliveries'),
|
|
859
944
|
}));
|
|
945
|
+
expect(analytics_1.LightdashAnalytics.track).toHaveBeenCalledWith(expect.objectContaining({
|
|
946
|
+
event: 'download.completed',
|
|
947
|
+
properties: expect.objectContaining({
|
|
948
|
+
agentsNum: 0,
|
|
949
|
+
alertsNum: 0,
|
|
950
|
+
scheduledDeliveriesNum: 0,
|
|
951
|
+
googleSheetsNum: 0,
|
|
952
|
+
virtualViewsNum: 0,
|
|
953
|
+
externalConnectionsNum: 0,
|
|
954
|
+
appsNum: 0,
|
|
955
|
+
}),
|
|
956
|
+
}));
|
|
860
957
|
}
|
|
861
958
|
finally {
|
|
862
959
|
await fs_1.promises.rm(tmpDir, { recursive: true, force: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.242.0",
|
|
4
4
|
"description": "Lightdash CLI tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"unique-names-generator": "4.7.1",
|
|
46
46
|
"uuid": "11.1.1",
|
|
47
47
|
"yaml": "2.8.3",
|
|
48
|
-
"@lightdash/common": "1.
|
|
49
|
-
"@lightdash/warehouses": "1.
|
|
48
|
+
"@lightdash/common": "1.242.0",
|
|
49
|
+
"@lightdash/warehouses": "1.242.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/inquirer": "8.2.4",
|