@contrail/cli 1.0.60 → 1.0.61

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.
@@ -147,10 +147,16 @@ async function getFolderPrincipals(folder) {
147
147
  }
148
148
  const workspacePrincipals = await new Entities().get({
149
149
  entityName: 'workspace-principal',
150
- criteria: { workspaceId: folder.id }
150
+ criteria: { workspaceId: folder.id },
151
+ relations: ['principal']
151
152
  });
152
153
  for (const workspacePrincipal of workspacePrincipals) {
153
- principals.push(workspacePrincipal.principalReference);
154
+ if (workspacePrincipal.principal.email) {
155
+ principals.push(workspacePrincipal.principal.email);
156
+ }
157
+ else {
158
+ principals.push(workspacePrincipal.principal.name);
159
+ }
154
160
  }
155
161
  return principals;
156
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -180,11 +180,18 @@ async function getFolderPrincipals(folder) {
180
180
 
181
181
  const workspacePrincipals = await new Entities().get({
182
182
  entityName: 'workspace-principal',
183
- criteria: {workspaceId: folder.id}
183
+ criteria: {workspaceId: folder.id},
184
+ relations: ['principal']
184
185
  });
185
186
 
186
187
  for (const workspacePrincipal of workspacePrincipals) {
187
- principals.push(workspacePrincipal.principalReference);
188
+
189
+ if (workspacePrincipal.principal.email) {
190
+ principals.push(workspacePrincipal.principal.email);
191
+ }
192
+ else {
193
+ principals.push(workspacePrincipal.principal.name);
194
+ }
188
195
  }
189
196
 
190
197
  return principals;