@contrail/cli 3.4.6-alpha.f8f859e → 3.4.6
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/README.md +1 -1
- package/dist/commands/groups/import.js +4 -7
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
|
|
|
17
17
|
$ contrail COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ contrail (--version)
|
|
20
|
-
@contrail/cli/3.4.6
|
|
20
|
+
@contrail/cli/3.4.6 linux-x64 node-v20.20.2
|
|
21
21
|
$ contrail --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ contrail COMMAND
|
|
@@ -152,20 +152,17 @@ async function updateGroup(principals, orgUsers, existingGroup, allGroupsAfterCr
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
async function createGroupPrincipals(group, principals, orgUsers, allGroupsAfterCreate) {
|
|
155
|
-
const
|
|
155
|
+
const principalsToCreate = principals
|
|
156
156
|
.map((x) => groupPrincipalNameToId(x, allGroupsAfterCreate, orgUsers))
|
|
157
157
|
.filter((x) => !!x)
|
|
158
158
|
.map((x) => {
|
|
159
|
-
return `${x.type}:${x.identifier}
|
|
159
|
+
return { principalReference: `${x.type}:${x.identifier}`, groupId: group.id };
|
|
160
160
|
});
|
|
161
|
-
if (
|
|
161
|
+
if (principalsToCreate.length) {
|
|
162
162
|
try {
|
|
163
163
|
await new sdk_1.Entities().batchCreate({
|
|
164
164
|
entityName: 'group-principal',
|
|
165
|
-
objects:
|
|
166
|
-
principalReferences,
|
|
167
|
-
groupIds: [group.id],
|
|
168
|
-
},
|
|
165
|
+
objects: principalsToCreate,
|
|
169
166
|
});
|
|
170
167
|
}
|
|
171
168
|
catch (e) {
|
package/oclif.manifest.json
CHANGED