@lightdash/cli 2.158.0 → 2.159.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.
|
@@ -45,6 +45,32 @@ describe('selectProject', () => {
|
|
|
45
45
|
isPreview: true,
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
+
it('uses an explicit --project UUID as-is, without any API call, even when a preview is active', async () => {
|
|
49
|
+
const config = {
|
|
50
|
+
context: {
|
|
51
|
+
project: MAIN_UUID,
|
|
52
|
+
previewProject: PREVIEW_UUID,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
const explicitUuid = '00000000-0000-0000-0000-000000000003';
|
|
56
|
+
const selection = await (0, selectProject_1.selectProject)(config, explicitUuid);
|
|
57
|
+
expect(selection).toEqual({
|
|
58
|
+
projectUuid: explicitUuid,
|
|
59
|
+
isPreview: false,
|
|
60
|
+
});
|
|
61
|
+
expect(mockLightdashApi).not.toHaveBeenCalled();
|
|
62
|
+
});
|
|
63
|
+
it('resolves an explicit --project slug through the org projects list', async () => {
|
|
64
|
+
const config = {
|
|
65
|
+
context: { project: MAIN_UUID },
|
|
66
|
+
};
|
|
67
|
+
mockLightdashApi.mockResolvedValueOnce([
|
|
68
|
+
{ projectUuid: PREVIEW_UUID, slug: 'other', name: 'Other' },
|
|
69
|
+
{ projectUuid: MAIN_UUID, slug: 'jaffle-shop', name: 'Jaffle' },
|
|
70
|
+
]);
|
|
71
|
+
const selection = await (0, selectProject_1.selectProject)(config, 'jaffle-shop');
|
|
72
|
+
expect(selection).toEqual({ projectUuid: MAIN_UUID, isPreview: false });
|
|
73
|
+
});
|
|
48
74
|
it('returns the main project when only the main project is configured', async () => {
|
|
49
75
|
const config = {
|
|
50
76
|
context: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.159.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": "2.
|
|
49
|
-
"@lightdash/warehouses": "2.
|
|
48
|
+
"@lightdash/common": "2.159.0",
|
|
49
|
+
"@lightdash/warehouses": "2.159.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/inquirer": "8.2.4",
|