@enplug/scripts 1.11.4-dev46 → 1.11.4-dev48

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.
@@ -116,7 +116,11 @@ async function findCrowdinAppDirectoryId(credentials, crowdinPath, appName) {
116
116
  const directory = resp.data.data.find(d => d.data.name === appName );
117
117
  return directory ? directory.data.id : undefined;
118
118
  } catch (err) {
119
- console.log('ERROR', err);
119
+ if (err.response.status === HTTP_UNAUTHORIZED_STATUS_CODE) {
120
+ console.error(`\n${chalk.red.bold('Provided Crowdin token is invalid')}`);
121
+ console.log(`Check the ${chalk.default.yellow('dev.private.json')} file.`);
122
+ throw new Error('Could not get Crowdin config');
123
+ }
120
124
  }
121
125
  } else if(crowdinPath.startsWith('dashboard')) {
122
126
  const url = `${CROWDIN_PROJECT_URL}/directories?filter=dashboard`;
@@ -66,7 +66,7 @@ async function syncTranslations(s3Client, bucket) {
66
66
  const appName = crowdinPathSections[1];
67
67
  const appDirectoryId = await findCrowdinAppDirectoryId(credentials, crowdinPath, appName);
68
68
  if(appDirectoryId === undefined) {
69
- console(`ERROR could not find app ${chalk.yellow.bold(`[${appName}]`)} directory`)
69
+ console.log(`ERROR could not find app ${chalk.yellow.bold(`[${appName}]`)} directory`)
70
70
  return throwError(error);
71
71
  }
72
72
  if(crowdinPathSections[0] === 'apps' && appDirectoryId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enplug/scripts",
3
- "version": "1.11.4-dev46",
3
+ "version": "1.11.4-dev48",
4
4
  "description": "Enplug scripts",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",