@extrahorizon/exh-cli 1.8.2-feat-77-849c330 → 1.8.2-feat-79-bdd67ef

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.
@@ -85,6 +85,10 @@ async function syncRoleWithPermissions(sdk, taskName, roleName, targetPermission
85
85
  const roleDescription = `A role created by the CLI for the execution of the task ${taskName}`;
86
86
  role = await userRepository.createGlobalRole(sdk, roleName, roleDescription);
87
87
  console.log(chalk.white('⚙️ Assigning permissions to the role'));
88
+ if (targetPermissions.length === 0) {
89
+ console.log(chalk.yellow('⚠️ No permissions defined for the role'));
90
+ return role;
91
+ }
88
92
  await userRepository.addPermissionsToGlobalRole(sdk, roleName, targetPermissions);
89
93
  console.log(chalk.green('✅ Successfully assigned permissions to the role'));
90
94
  return role;
@@ -112,7 +116,7 @@ async function assignRoleToUser(sdk, userId, roleId) {
112
116
  async function createOAuth1Tokens(sdk, email, password) {
113
117
  console.log(chalk.white('⚙️ Creating OAuth1 tokens for the user', email));
114
118
  const response = await authRepository.createOAuth1Tokens(sdk, email, password);
115
- const { token, tokenSecret } = response.data;
119
+ const { token, tokenSecret } = response;
116
120
  console.log(chalk.green('✅ Successfully created OAuth1 tokens for the user', email));
117
121
  return { token, tokenSecret };
118
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/exh-cli",
3
- "version": "1.8.2-feat-77-849c330",
3
+ "version": "1.8.2-feat-79-bdd67ef",
4
4
  "main": "build/index.js",
5
5
  "exports": "./build/index.js",
6
6
  "license": "MIT",