@lightdash/cli 3.141.0 → 3.142.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/config.js CHANGED
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unsetApiKey = exports.setAnswer = exports.setContext = exports.setDefaultUser = exports.unsetPreviewProject = exports.setPreviewProject = exports.setSource = exports.unsetProject = exports.setProject = exports.getConfig = exports.getRawConfig = exports.writeConfigToFile = exports.ensureConfigFilePermissions = exports.configFilePath = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const compat_1 = require("es-toolkit/compat");
5
6
  const fs_1 = require("fs");
6
7
  const yaml = tslib_1.__importStar(require("js-yaml"));
7
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
8
8
  const os = tslib_1.__importStar(require("os"));
9
9
  const path = tslib_1.__importStar(require("path"));
10
10
  const uuid_1 = require("uuid");
@@ -189,7 +189,7 @@ const setAnswer = async (answer) => {
189
189
  const config = await (0, exports.getRawConfig)();
190
190
  await setConfig({
191
191
  ...config,
192
- answers: lodash_1.default.merge(config.answers, answer),
192
+ answers: (0, compat_1.merge)(config.answers, answer),
193
193
  });
194
194
  };
195
195
  exports.setAnswer = setAnswer;
@@ -4,9 +4,9 @@ exports.dbtList = dbtList;
4
4
  exports.maybeCompileModelsAndJoins = maybeCompileModelsAndJoins;
5
5
  const tslib_1 = require("tslib");
6
6
  const common_1 = require("@lightdash/common");
7
+ const compat_1 = require("es-toolkit/compat");
7
8
  const execa_1 = tslib_1.__importDefault(require("execa"));
8
9
  const fs_1 = require("fs");
9
- const lodash_1 = require("lodash");
10
10
  const path = tslib_1.__importStar(require("path"));
11
11
  const credentials_1 = require("../../credentials");
12
12
  const manifest_1 = require("../../dbt/manifest");
@@ -204,7 +204,7 @@ async function maybeCompileModelsAndJoins(loadManifestOpts, initialOptions) {
204
204
  return [...acc, model.name, ...joinedModelNames];
205
205
  }, []));
206
206
  const requiredModelsNames = Array.from(requiredModels);
207
- const missingJoinedModels = (0, lodash_1.xor)(requiredModelsNames, currCompiledModels.map((model) => model.name));
207
+ const missingJoinedModels = (0, compat_1.xor)(requiredModelsNames, currCompiledModels.map((model) => model.name));
208
208
  if (missingJoinedModels.length > 0) {
209
209
  globalState_1.default.debug(`> Recompile project with missing joined models: ${missingJoinedModels.join(', ')}`);
210
210
  if (options.useDbtList) {
@@ -5,10 +5,10 @@ const tslib_1 = require("tslib");
5
5
  /* eslint-disable no-await-in-loop */
6
6
  /* eslint-disable no-param-reassign */
7
7
  const common_1 = require("@lightdash/common");
8
+ const compat_1 = require("es-toolkit/compat");
8
9
  const fs_1 = require("fs");
9
10
  const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
10
11
  const yaml = tslib_1.__importStar(require("js-yaml"));
11
- const groupBy_1 = tslib_1.__importDefault(require("lodash/groupBy"));
12
12
  const p_limit_1 = tslib_1.__importDefault(require("p-limit"));
13
13
  const path = tslib_1.__importStar(require("path"));
14
14
  const uuid_1 = require("uuid");
@@ -369,7 +369,7 @@ const readLooseCodeFiles = async (customPath) => {
369
369
  };
370
370
  const groupBySpace = (items) => {
371
371
  const itemsWithIndex = items.map((item, index) => ({ item, index }));
372
- return (0, groupBy_1.default)(itemsWithIndex, (entry) => entry.item.spaceSlug);
372
+ return (0, compat_1.groupBy)(itemsWithIndex, (entry) => entry.item.spaceSlug);
373
373
  };
374
374
  const writeSpaceContent = async ({ projectName, spaceSlug, folder, contentType, contentInSpace, contentAsCode, customPath, languageMap, folderScheme, stripPivotSeries, }) => {
375
375
  const outputDir = await createDirForContent(projectName, spaceSlug, folder, customPath, folderScheme);
@@ -2147,7 +2147,7 @@ const upsertResources = async (type, projectId, changes, force, slugs, canUpload
2147
2147
  }
2148
2148
  }
2149
2149
  else {
2150
- const grouped = (0, groupBy_1.default)(uploadableItems, (item) => item.spaceSlug);
2150
+ const grouped = (0, compat_1.groupBy)(uploadableItems, (item) => item.spaceSlug);
2151
2151
  const seedItems = new Set();
2152
2152
  const remainingItems = [];
2153
2153
  Object.values(grouped).forEach((spaceItems) => {
@@ -2170,7 +2170,7 @@ const upsertResources = async (type, projectId, changes, force, slugs, canUpload
2170
2170
  if (type === 'charts') {
2171
2171
  const chartsWithDashboard = remainingItems.filter((item) => 'dashboardSlug' in item &&
2172
2172
  item.dashboardSlug);
2173
- const groupedByDashboard = (0, groupBy_1.default)(chartsWithDashboard, (item) => item.dashboardSlug);
2173
+ const groupedByDashboard = (0, compat_1.groupBy)(chartsWithDashboard, (item) => item.dashboardSlug);
2174
2174
  Object.values(groupedByDashboard).forEach((dashboardItems) => {
2175
2175
  // If no item for this dashboardSlug was already picked as a
2176
2176
  // space seed, pick the first one as a dashboard seed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "3.141.0",
3
+ "version": "3.142.1",
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": "3.141.0",
26
- "@lightdash/warehouses": "3.141.0",
25
+ "@lightdash/common": "3.142.1",
26
+ "@lightdash/warehouses": "3.142.1",
27
27
  "@sidvind/better-ajv-errors": "7.0.0",
28
28
  "@types/columnify": "1.5.1",
29
29
  "ajv": "8.18.0",
@@ -32,12 +32,12 @@
32
32
  "chokidar": "3.6.0",
33
33
  "columnify": "1.6.0",
34
34
  "commander": "9.5.0",
35
+ "es-toolkit": "1.53.1",
35
36
  "execa": "5.1.1",
36
37
  "google-auth-library": "10.7.0",
37
38
  "inquirer": "8.2.7",
38
39
  "inquirer-autocomplete-prompt": "2.0.1",
39
40
  "js-yaml": "4.3.2",
40
- "lodash": "4.18.1",
41
41
  "node-fetch": "2.7.0",
42
42
  "nunjucks": "3.2.4",
43
43
  "openid-client": "5.6.4",
@@ -53,7 +53,6 @@
53
53
  "@types/inquirer": "8.2.4",
54
54
  "@types/inquirer-autocomplete-prompt": "3.0.3",
55
55
  "@types/js-yaml": "4.0.9",
56
- "@types/lodash": "4.14.202",
57
56
  "@types/node-fetch": "2.6.13",
58
57
  "@types/nunjucks": "3.2.1",
59
58
  "@types/parse-node-version": "1.0.0",