@lightdash/cli 0.1424.0 → 0.1424.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,6 +49,7 @@ const readCodeFiles = async (folder) => {
49
49
  const items = [];
50
50
  try {
51
51
  // Read all files from the lightdash directory
52
+ // if folder does not exist, this throws an error
52
53
  const files = await fs_1.promises.readdir(inputDir);
53
54
  const jsonFiles = files.filter((file) => file.endsWith('.yml'));
54
55
  // Load each JSON file
@@ -75,12 +76,13 @@ const readCodeFiles = async (folder) => {
75
76
  }
76
77
  }
77
78
  catch (error) {
79
+ // Folder does not exist
78
80
  if (error.code === 'ENOENT') {
79
- console.error(`Directory ${inputDir} not found. Run download command first.`);
80
- }
81
- else {
82
- console.error(`Error reading ${inputDir}: ${error}`);
81
+ console.error(styles.warning(`Unable to upload ${folder}, "${inputDir}" folder not found. Run download command first.`));
82
+ return [];
83
83
  }
84
+ // Unknown error
85
+ console.error(styles.error(`Error reading ${inputDir}: ${error}`));
84
86
  throw error;
85
87
  }
86
88
  return items;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.1424.0",
3
+ "version": "0.1424.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "lightdash": "dist/index.js"
@@ -11,8 +11,8 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "@actions/core": "^1.11.1",
14
- "@lightdash/common": "^0.1424.0",
15
- "@lightdash/warehouses": "^0.1424.0",
14
+ "@lightdash/common": "^0.1424.1",
15
+ "@lightdash/warehouses": "^0.1424.1",
16
16
  "@types/columnify": "^1.5.1",
17
17
  "ajv": "^8.11.0",
18
18
  "ajv-formats": "^2.1.1",