@pnp/cli-microsoft365 10.9.0-beta.a81e0f3 → 10.9.0
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/.devcontainer/Dockerfile +1 -1
- package/Dockerfile +3 -3
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/entra/commands/m365group/m365group-get.js +16 -3
- package/dist/m365/entra/commands/m365group/m365group-list.js +7 -1
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +9 -3
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +9 -3
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +9 -3
- package/dist/m365/flow/commands/flow-list.js +14 -7
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/graph/commands/subscription/subscription-add.js +10 -3
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +8 -1
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +9 -2
- package/dist/m365/spo/commands/file/file-move.js +8 -2
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +14 -5
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +9 -2
- package/dist/m365/spo/commands/page/clientsidepages.js +49 -17
- package/dist/m365/spo/commands/tenant/tenant-site-list.js +16 -5
- package/dist/m365/spo/commands/term/term-list.js +10 -3
- package/dist/m365/teams/commands/chat/chat-member-add.js +10 -4
- package/dist/m365/viva/commands/engage/engage-community-remove.js +99 -0
- package/dist/m365/viva/commands/engage/engage-network-list.js +8 -2
- package/dist/m365/viva/commands.js +1 -0
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +8 -5
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +14 -12
- package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +7 -4
- package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +9 -6
- package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +7 -4
- package/docs/docs/cmd/flow/flow-list.mdx +8 -5
- package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +6 -3
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +7 -4
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +7 -4
- package/docs/docs/cmd/spo/file/file-move.mdx +4 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +6 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +7 -4
- package/docs/docs/cmd/spo/list/list-add.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-set.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-site-list.mdx +10 -7
- package/docs/docs/cmd/spo/term/term-list.mdx +7 -4
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +6 -3
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +61 -0
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +7 -4
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _EntraM365GroupGetCommand_instances, _EntraM365GroupGetCommand_initOptions, _EntraM365GroupGetCommand_initValidators, _EntraM365GroupGetCommand_initOptionSets, _EntraM365GroupGetCommand_initTypes;
|
|
6
|
+
var _EntraM365GroupGetCommand_instances, _EntraM365GroupGetCommand_initTelemetry, _EntraM365GroupGetCommand_initOptions, _EntraM365GroupGetCommand_initValidators, _EntraM365GroupGetCommand_initOptionSets, _EntraM365GroupGetCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -19,12 +19,16 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
21
|
_EntraM365GroupGetCommand_instances.add(this);
|
|
22
|
+
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initTelemetry).call(this);
|
|
22
23
|
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initOptions).call(this);
|
|
23
24
|
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initValidators).call(this);
|
|
24
25
|
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initOptionSets).call(this);
|
|
25
26
|
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initTypes).call(this);
|
|
26
27
|
}
|
|
27
28
|
async commandAction(logger, args) {
|
|
29
|
+
if (args.options.includeSiteUrl) {
|
|
30
|
+
await this.warn(logger, `Parameter 'includeSiteUrl' is deprecated. Please use 'withSiteUrl' instead`);
|
|
31
|
+
}
|
|
28
32
|
let group;
|
|
29
33
|
try {
|
|
30
34
|
if (args.options.id) {
|
|
@@ -46,7 +50,7 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
46
50
|
};
|
|
47
51
|
const groupExtended = await request.get(requestExtendedOptions);
|
|
48
52
|
group = { ...group, ...groupExtended };
|
|
49
|
-
if (args.options.includeSiteUrl) {
|
|
53
|
+
if (args.options.includeSiteUrl || args.options.withSiteUrl) {
|
|
50
54
|
const requestOptions = {
|
|
51
55
|
url: `${this.resource}/v1.0/groups/${group.id}/drive?$select=webUrl`,
|
|
52
56
|
headers: {
|
|
@@ -64,13 +68,22 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
|
-
_EntraM365GroupGetCommand_instances = new WeakSet(),
|
|
71
|
+
_EntraM365GroupGetCommand_instances = new WeakSet(), _EntraM365GroupGetCommand_initTelemetry = function _EntraM365GroupGetCommand_initTelemetry() {
|
|
72
|
+
this.telemetry.push((args) => {
|
|
73
|
+
Object.assign(this.telemetryProperties, {
|
|
74
|
+
includeSiteUrl: !!args.options.includeSiteUrl,
|
|
75
|
+
withSiteUrl: !!args.options.withSiteUrl
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}, _EntraM365GroupGetCommand_initOptions = function _EntraM365GroupGetCommand_initOptions() {
|
|
68
79
|
this.options.unshift({
|
|
69
80
|
option: '-i, --id [id]'
|
|
70
81
|
}, {
|
|
71
82
|
option: '-n, --displayName [displayName]'
|
|
72
83
|
}, {
|
|
73
84
|
option: '--includeSiteUrl'
|
|
85
|
+
}, {
|
|
86
|
+
option: '--withSiteUrl'
|
|
74
87
|
});
|
|
75
88
|
}, _EntraM365GroupGetCommand_initValidators = function _EntraM365GroupGetCommand_initValidators() {
|
|
76
89
|
this.validators.push(async (args) => {
|
|
@@ -26,6 +26,9 @@ class EntraM365GroupListCommand extends GraphCommand {
|
|
|
26
26
|
return ['id', 'displayName', 'mailNickname', 'siteUrl'];
|
|
27
27
|
}
|
|
28
28
|
async commandAction(logger, args) {
|
|
29
|
+
if (args.options.includeSiteUrl) {
|
|
30
|
+
await this.warn(logger, `Parameter 'includeSiteUrl' is deprecated. Please use 'withSiteUrl' instead`);
|
|
31
|
+
}
|
|
29
32
|
const groupFilter = `?$filter=groupTypes/any(c:c+eq+'Unified')`;
|
|
30
33
|
const displayNameFilter = args.options.displayName ? ` and startswith(DisplayName,'${formatting.encodeQueryParameter(args.options.displayName)}')` : '';
|
|
31
34
|
const mailNicknameFilter = args.options.mailNickname ? ` and startswith(MailNickname,'${formatting.encodeQueryParameter(args.options.mailNickname)}')` : '';
|
|
@@ -43,7 +46,7 @@ class EntraM365GroupListCommand extends GraphCommand {
|
|
|
43
46
|
});
|
|
44
47
|
groups = orphanedGroups;
|
|
45
48
|
}
|
|
46
|
-
if (args.options.includeSiteUrl) {
|
|
49
|
+
if (args.options.includeSiteUrl || args.options.withSiteUrl) {
|
|
47
50
|
const res = await Promise.all(groups.map(g => this.getGroupSiteUrl(g.id)));
|
|
48
51
|
res.forEach(r => {
|
|
49
52
|
for (let i = 0; i < groups.length; i++) {
|
|
@@ -82,6 +85,7 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
|
|
|
82
85
|
displayName: typeof args.options.displayName !== 'undefined',
|
|
83
86
|
mailNickname: typeof args.options.mailNickname !== 'undefined',
|
|
84
87
|
includeSiteUrl: args.options.includeSiteUrl,
|
|
88
|
+
withSiteUrl: !!args.options.withSiteUrl,
|
|
85
89
|
orphaned: !!args.options.orphaned
|
|
86
90
|
});
|
|
87
91
|
});
|
|
@@ -92,6 +96,8 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
|
|
|
92
96
|
option: '-m, --mailNickname [displayName]'
|
|
93
97
|
}, {
|
|
94
98
|
option: '--includeSiteUrl'
|
|
99
|
+
}, {
|
|
100
|
+
option: '--withSiteUrl'
|
|
95
101
|
}, {
|
|
96
102
|
option: '--orphaned'
|
|
97
103
|
});
|
|
@@ -29,6 +29,9 @@ class EntraPimRoleAssignmentEligibilityListCommand extends GraphCommand {
|
|
|
29
29
|
__classPrivateFieldGet(this, _EntraPimRoleAssignmentEligibilityListCommand_instances, "m", _EntraPimRoleAssignmentEligibilityListCommand_initOptionSets).call(this);
|
|
30
30
|
}
|
|
31
31
|
async commandAction(logger, args) {
|
|
32
|
+
if (args.options.includePrincipalDetails) {
|
|
33
|
+
await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
|
|
34
|
+
}
|
|
32
35
|
if (this.verbose) {
|
|
33
36
|
await logger.logToStderr(`Retrieving list of eligible roles for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
|
|
34
37
|
}
|
|
@@ -40,7 +43,7 @@ class EntraPimRoleAssignmentEligibilityListCommand extends GraphCommand {
|
|
|
40
43
|
queryParameters.push(`$filter=principalId eq '${principalId}'`);
|
|
41
44
|
}
|
|
42
45
|
expands.push('roleDefinition($select=displayName)');
|
|
43
|
-
if (args.options.includePrincipalDetails) {
|
|
46
|
+
if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
|
|
44
47
|
expands.push('principal');
|
|
45
48
|
}
|
|
46
49
|
queryParameters.push(`$expand=${expands.join(',')}`);
|
|
@@ -86,7 +89,8 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
|
|
|
86
89
|
userName: typeof args.options.userName !== 'undefined',
|
|
87
90
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
88
91
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
89
|
-
includePrincipalDetails: !!args.options.includePrincipalDetails
|
|
92
|
+
includePrincipalDetails: !!args.options.includePrincipalDetails,
|
|
93
|
+
withPrincipalDetails: !!args.options.withPrincipalDetails
|
|
90
94
|
});
|
|
91
95
|
});
|
|
92
96
|
}, _EntraPimRoleAssignmentEligibilityListCommand_initOptions = function _EntraPimRoleAssignmentEligibilityListCommand_initOptions() {
|
|
@@ -99,7 +103,9 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
|
|
|
99
103
|
}, {
|
|
100
104
|
option: '--groupName [groupName]'
|
|
101
105
|
}, {
|
|
102
|
-
option: '--includePrincipalDetails
|
|
106
|
+
option: '--includePrincipalDetails'
|
|
107
|
+
}, {
|
|
108
|
+
option: '--withPrincipalDetails'
|
|
103
109
|
});
|
|
104
110
|
}, _EntraPimRoleAssignmentEligibilityListCommand_initValidators = function _EntraPimRoleAssignmentEligibilityListCommand_initValidators() {
|
|
105
111
|
this.validators.push(async (args) => {
|
|
@@ -30,6 +30,9 @@ class EntraPimRoleAssignmentListCommand extends GraphCommand {
|
|
|
30
30
|
const filters = [];
|
|
31
31
|
const expands = [];
|
|
32
32
|
try {
|
|
33
|
+
if (args.options.includePrincipalDetails) {
|
|
34
|
+
await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
|
|
35
|
+
}
|
|
33
36
|
const principalId = await this.getPrincipalId(logger, args.options);
|
|
34
37
|
if (principalId) {
|
|
35
38
|
filters.push(`principalId eq '${principalId}'`);
|
|
@@ -41,7 +44,7 @@ class EntraPimRoleAssignmentListCommand extends GraphCommand {
|
|
|
41
44
|
queryParameters.push(`$filter=${filters.join(' and ')}`);
|
|
42
45
|
}
|
|
43
46
|
expands.push('roleDefinition($select=displayName)');
|
|
44
|
-
if (args.options.includePrincipalDetails) {
|
|
47
|
+
if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
|
|
45
48
|
expands.push('principal');
|
|
46
49
|
}
|
|
47
50
|
queryParameters.push(`$expand=${expands.join(',')}`);
|
|
@@ -82,7 +85,8 @@ _EntraPimRoleAssignmentListCommand_instances = new WeakSet(), _EntraPimRoleAssig
|
|
|
82
85
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
83
86
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
84
87
|
startDateTime: typeof args.options.startDateTime !== 'undefined',
|
|
85
|
-
includePrincipalDetails: !!args.options.includePrincipalDetails
|
|
88
|
+
includePrincipalDetails: !!args.options.includePrincipalDetails,
|
|
89
|
+
withPrincipalDetails: !!args.options.withPrincipalDetails
|
|
86
90
|
});
|
|
87
91
|
});
|
|
88
92
|
}, _EntraPimRoleAssignmentListCommand_initOptions = function _EntraPimRoleAssignmentListCommand_initOptions() {
|
|
@@ -97,7 +101,9 @@ _EntraPimRoleAssignmentListCommand_instances = new WeakSet(), _EntraPimRoleAssig
|
|
|
97
101
|
}, {
|
|
98
102
|
option: "-s, --startDateTime [startDateTime]"
|
|
99
103
|
}, {
|
|
100
|
-
option: "--includePrincipalDetails
|
|
104
|
+
option: "--includePrincipalDetails"
|
|
105
|
+
}, {
|
|
106
|
+
option: "--withPrincipalDetails"
|
|
101
107
|
});
|
|
102
108
|
}, _EntraPimRoleAssignmentListCommand_initValidators = function _EntraPimRoleAssignmentListCommand_initValidators() {
|
|
103
109
|
this.validators.push(async (args) => {
|
|
@@ -30,6 +30,9 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
|
|
|
30
30
|
__classPrivateFieldGet(this, _EntraPimRoleRequestListCommand_instances, "m", _EntraPimRoleRequestListCommand_initOptionSets).call(this);
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
|
+
if (args.options.includePrincipalDetails) {
|
|
34
|
+
await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
|
|
35
|
+
}
|
|
33
36
|
if (this.verbose) {
|
|
34
37
|
await logger.logToStderr(`Retrieving list of PIM roles requests for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
|
|
35
38
|
}
|
|
@@ -51,7 +54,7 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
|
|
|
51
54
|
queryParameters.push(`$filter=${filters.join(' and ')}`);
|
|
52
55
|
}
|
|
53
56
|
expands.push('roleDefinition($select=displayName)');
|
|
54
|
-
if (args.options.includePrincipalDetails) {
|
|
57
|
+
if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
|
|
55
58
|
expands.push('principal');
|
|
56
59
|
}
|
|
57
60
|
queryParameters.push(`$expand=${expands.join(',')}`);
|
|
@@ -100,7 +103,8 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
|
|
|
100
103
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
101
104
|
createdDateTime: typeof args.options.createdDateTime !== 'undefined',
|
|
102
105
|
status: typeof args.options.status !== 'undefined',
|
|
103
|
-
includePrincipalDetails: !!args.options.includePrincipalDetails
|
|
106
|
+
includePrincipalDetails: !!args.options.includePrincipalDetails,
|
|
107
|
+
withPrincipalDetails: !!args.options.withPrincipalDetails
|
|
104
108
|
});
|
|
105
109
|
});
|
|
106
110
|
}, _EntraPimRoleRequestListCommand_initOptions = function _EntraPimRoleRequestListCommand_initOptions() {
|
|
@@ -118,7 +122,9 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
|
|
|
118
122
|
option: '-s, --status [status]',
|
|
119
123
|
autocomplete: this.allowedStatuses
|
|
120
124
|
}, {
|
|
121
|
-
option: '--includePrincipalDetails
|
|
125
|
+
option: '--includePrincipalDetails'
|
|
126
|
+
}, {
|
|
127
|
+
option: '--withPrincipalDetails'
|
|
122
128
|
});
|
|
123
129
|
}, _EntraPimRoleRequestListCommand_initValidators = function _EntraPimRoleRequestListCommand_initValidators() {
|
|
124
130
|
this.validators.push(async (args) => {
|
|
@@ -28,29 +28,33 @@ class FlowListCommand extends PowerAutomateCommand {
|
|
|
28
28
|
__classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initTypes).call(this);
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
|
+
if (args.options.includeSolutions) {
|
|
32
|
+
await this.warn(logger, `Parameter 'includeSolutions' is deprecated. Please use 'withSolutions' instead`);
|
|
33
|
+
}
|
|
31
34
|
if (this.verbose) {
|
|
32
35
|
await logger.logToStderr(`Getting Power Automate flows${args.options.asAdmin ? ' as admin' : ''} in environment '${args.options.environmentName}'...`);
|
|
33
36
|
}
|
|
34
37
|
try {
|
|
35
|
-
const { environmentName, asAdmin, sharingStatus, includeSolutions } = args.options;
|
|
38
|
+
const { environmentName, asAdmin, sharingStatus, includeSolutions, withSolutions } = args.options;
|
|
36
39
|
let items = [];
|
|
40
|
+
const shouldIncludeSolutions = withSolutions || includeSolutions;
|
|
37
41
|
if (sharingStatus === 'personal') {
|
|
38
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
42
|
+
const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'personal');
|
|
39
43
|
items = await odata.getAllItems(url);
|
|
40
44
|
}
|
|
41
45
|
else if (sharingStatus === 'sharedWithMe') {
|
|
42
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
46
|
+
const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'team');
|
|
43
47
|
items = await odata.getAllItems(url);
|
|
44
48
|
}
|
|
45
49
|
else if (sharingStatus === 'all') {
|
|
46
|
-
let url = this.getApiUrl(environmentName, asAdmin,
|
|
50
|
+
let url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'personal');
|
|
47
51
|
items = await odata.getAllItems(url);
|
|
48
|
-
url = this.getApiUrl(environmentName, asAdmin,
|
|
52
|
+
url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'team');
|
|
49
53
|
const teamFlows = await odata.getAllItems(url);
|
|
50
54
|
items = items.concat(teamFlows);
|
|
51
55
|
}
|
|
52
56
|
else {
|
|
53
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
57
|
+
const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions);
|
|
54
58
|
items = await odata.getAllItems(url);
|
|
55
59
|
}
|
|
56
60
|
// Remove duplicates
|
|
@@ -81,6 +85,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
81
85
|
Object.assign(this.telemetryProperties, {
|
|
82
86
|
sharingStatus: typeof args.options.sharingStatus !== 'undefined',
|
|
83
87
|
includeSolutions: !!args.options.includeSolutions,
|
|
88
|
+
withSolutions: !!args.options.withSolutions,
|
|
84
89
|
asAdmin: !!args.options.asAdmin
|
|
85
90
|
});
|
|
86
91
|
});
|
|
@@ -92,6 +97,8 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
92
97
|
autocomplete: this.allowedSharingStatuses
|
|
93
98
|
}, {
|
|
94
99
|
option: '--includeSolutions'
|
|
100
|
+
}, {
|
|
101
|
+
option: '--withSolutions'
|
|
95
102
|
}, {
|
|
96
103
|
option: '--asAdmin'
|
|
97
104
|
});
|
|
@@ -107,7 +114,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
107
114
|
});
|
|
108
115
|
}, _FlowListCommand_initTypes = function _FlowListCommand_initTypes() {
|
|
109
116
|
this.types.string.push('environmentName', 'sharingStatus');
|
|
110
|
-
this.types.boolean.push('includeSolutions', 'asAdmin');
|
|
117
|
+
this.types.boolean.push('includeSolutions', 'withSolutions', 'asAdmin');
|
|
111
118
|
};
|
|
112
119
|
export default new FlowListCommand();
|
|
113
120
|
//# sourceMappingURL=flow-list.js.map
|
|
@@ -28,7 +28,7 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
28
28
|
await logger.logToStderr(`Retrieving information about run ${args.options.name} of Microsoft Flow ${args.options.flowName}...`);
|
|
29
29
|
}
|
|
30
30
|
if (args.options.includeTriggerInformation) {
|
|
31
|
-
await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger instead`);
|
|
31
|
+
await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger' instead`);
|
|
32
32
|
}
|
|
33
33
|
const actionsParameter = args.options.withActions ? '$expand=properties%2Factions&' : '';
|
|
34
34
|
const requestOptions = {
|
|
@@ -49,7 +49,7 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
49
49
|
notificationUrl: args.options.notificationUrl,
|
|
50
50
|
expirationDateTime: await this.getExpirationDateTimeOrDefault(logger, args),
|
|
51
51
|
clientState: args.options.clientState,
|
|
52
|
-
includeResourceData: args.options.includeResourceData,
|
|
52
|
+
includeResourceData: args.options.withResourceData || args.options.includeResourceData,
|
|
53
53
|
encryptionCertificate: args.options.encryptionCertificate,
|
|
54
54
|
encryptionCertificateId: args.options.encryptionCertificateId,
|
|
55
55
|
lifecycleNotificationUrl: args.options.lifecycleNotificationUrl,
|
|
@@ -66,6 +66,9 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
66
66
|
responseType: 'json'
|
|
67
67
|
};
|
|
68
68
|
try {
|
|
69
|
+
if (args.options.includeResourceData) {
|
|
70
|
+
await this.warn(logger, `Parameter 'includeResourceData' is deprecated. Please use 'withResourceData' instead`);
|
|
71
|
+
}
|
|
69
72
|
const res = await request.post(requestOptions);
|
|
70
73
|
await logger.log(res);
|
|
71
74
|
}
|
|
@@ -133,6 +136,7 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
133
136
|
notificationUrlAppId: typeof args.options.notificationUrlAppId !== 'undefined',
|
|
134
137
|
latestTLSVersion: typeof args.options.latestTLSVersion !== 'undefined',
|
|
135
138
|
includeResourceData: !!args.options.includeResourceData,
|
|
139
|
+
withResourceData: !!args.options.withResourceData,
|
|
136
140
|
encryptionCertificate: typeof args.options.encryptionCertificate !== 'undefined',
|
|
137
141
|
encryptionCertificateId: typeof args.options.encryptionCertificateId !== 'undefined'
|
|
138
142
|
});
|
|
@@ -158,6 +162,8 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
158
162
|
autocomplete: this.allowedTlsVersions
|
|
159
163
|
}, {
|
|
160
164
|
option: '--includeResourceData [includeResourceData]'
|
|
165
|
+
}, {
|
|
166
|
+
option: '--withResourceData [withResourceData]'
|
|
161
167
|
}, {
|
|
162
168
|
option: '--encryptionCertificate [encryptionCertificate]'
|
|
163
169
|
}, {
|
|
@@ -187,10 +193,11 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
187
193
|
if (args.options.latestTLSVersion && this.allowedTlsVersions.map(x => x.toLowerCase()).indexOf(args.options.latestTLSVersion.toLowerCase()) === -1) {
|
|
188
194
|
return `${args.options.latestTLSVersion} is not a valid TLS version. Allowed values are ${this.allowedTlsVersions.join(', ')}`;
|
|
189
195
|
}
|
|
190
|
-
|
|
196
|
+
const shouldIncludeResourceData = args.options.includeResourceData || args.options.withResourceData;
|
|
197
|
+
if (shouldIncludeResourceData && !args.options.encryptionCertificate) {
|
|
191
198
|
return `The 'encryptionCertificate' options is required to include the changed resource data`;
|
|
192
199
|
}
|
|
193
|
-
if (
|
|
200
|
+
if (shouldIncludeResourceData && !args.options.encryptionCertificateId) {
|
|
194
201
|
return `The 'encryptionCertificateId' options is required to include the changed resource data`;
|
|
195
202
|
}
|
|
196
203
|
if (args.options.notificationUrlAppId && !validation.isValidGuid(args.options.notificationUrlAppId)) {
|
|
@@ -25,13 +25,17 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _PpSolutionPublisherListCommand_instances, "m", _PpSolutionPublisherListCommand_initOptions).call(this);
|
|
26
26
|
}
|
|
27
27
|
async commandAction(logger, args) {
|
|
28
|
+
if (args.options.includeMicrosoftPublishers) {
|
|
29
|
+
await this.warn(logger, `Parameter 'includeMicrosoftPublishers' is deprecated. Please use 'withMicrosoftPublishers' instead`);
|
|
30
|
+
}
|
|
28
31
|
if (this.verbose) {
|
|
29
32
|
await logger.logToStderr(`Retrieving list of publishers...`);
|
|
30
33
|
}
|
|
31
34
|
try {
|
|
32
35
|
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
36
|
+
const shouldIncludeMicrosoftPublishers = args.options.withMicrosoftPublishers || args.options.includeMicrosoftPublishers;
|
|
33
37
|
const requestOptions = {
|
|
34
|
-
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!
|
|
38
|
+
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!shouldIncludeMicrosoftPublishers ? `&$filter=publisherid ne 'd21aab70-79e7-11dd-8874-00188b01e34f'` : ''}&api-version=9.1`,
|
|
35
39
|
headers: {
|
|
36
40
|
accept: 'application/json;odata.metadata=none'
|
|
37
41
|
},
|
|
@@ -49,6 +53,7 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
|
|
|
49
53
|
this.telemetry.push((args) => {
|
|
50
54
|
Object.assign(this.telemetryProperties, {
|
|
51
55
|
includeMicrosoftPublishers: typeof args.options.includeMicrosoftPublishers !== 'undefined',
|
|
56
|
+
withMicrosoftPublishers: typeof args.options.withMicrosoftPublishers !== 'undefined',
|
|
52
57
|
asAdmin: !!args.options.asAdmin
|
|
53
58
|
});
|
|
54
59
|
});
|
|
@@ -57,6 +62,8 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
|
|
|
57
62
|
option: '-e, --environmentName <environmentName>'
|
|
58
63
|
}, {
|
|
59
64
|
option: '--includeMicrosoftPublishers'
|
|
65
|
+
}, {
|
|
66
|
+
option: '--withMicrosoftPublishers'
|
|
60
67
|
}, {
|
|
61
68
|
option: '--asAdmin'
|
|
62
69
|
});
|
|
@@ -24,11 +24,15 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
|
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
26
|
try {
|
|
27
|
+
if (args.options.includeResults) {
|
|
28
|
+
await this.warn(logger, `Parameter 'includeResults' is deprecated. Please use 'withResults' instead`);
|
|
29
|
+
}
|
|
27
30
|
if (this.verbose) {
|
|
28
31
|
await logger.logToStderr(`Retrieving threat assessment with id ${args.options.id}`);
|
|
29
32
|
}
|
|
33
|
+
const shouldIncludeResults = args.options.includeResults || args.options.withResults;
|
|
30
34
|
const requestOptions = {
|
|
31
|
-
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${
|
|
35
|
+
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${shouldIncludeResults ? '?$expand=results' : ''}`,
|
|
32
36
|
headers: {
|
|
33
37
|
accept: 'application/json;odata.metadata=none'
|
|
34
38
|
},
|
|
@@ -45,7 +49,8 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
|
|
|
45
49
|
_PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAssessmentGetCommand_initTelemetry = function _PurviewThreatAssessmentGetCommand_initTelemetry() {
|
|
46
50
|
this.telemetry.push((args) => {
|
|
47
51
|
Object.assign(this.telemetryProperties, {
|
|
48
|
-
includeResults: !!args.options.includeResults
|
|
52
|
+
includeResults: !!args.options.includeResults,
|
|
53
|
+
withResults: !!args.options.withResults
|
|
49
54
|
});
|
|
50
55
|
});
|
|
51
56
|
}, _PurviewThreatAssessmentGetCommand_initOptions = function _PurviewThreatAssessmentGetCommand_initOptions() {
|
|
@@ -53,6 +58,8 @@ _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAsse
|
|
|
53
58
|
option: '-i, --id <id>'
|
|
54
59
|
}, {
|
|
55
60
|
option: '--includeResults'
|
|
61
|
+
}, {
|
|
62
|
+
option: '--withResults'
|
|
56
63
|
});
|
|
57
64
|
}, _PurviewThreatAssessmentGetCommand_initValidators = function _PurviewThreatAssessmentGetCommand_initValidators() {
|
|
58
65
|
this.validators.push(async (args) => {
|
|
@@ -35,6 +35,9 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
35
35
|
const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
|
|
36
36
|
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
|
|
37
37
|
const destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl);
|
|
38
|
+
if (args.options.includeItemPermissions) {
|
|
39
|
+
await this.warn(logger, `Parameter 'includeItemPermissions' is deprecated. Please use 'withItemPermissions' instead`);
|
|
40
|
+
}
|
|
38
41
|
if (this.verbose) {
|
|
39
42
|
await logger.logToStderr(`Moving file '${sourceServerRelativePath}' to '${args.options.targetUrl}'...`);
|
|
40
43
|
}
|
|
@@ -46,7 +49,7 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
46
49
|
const copyJobResponse = await spo.createFileCopyJob(args.options.webUrl, sourcePath, destinationPath, {
|
|
47
50
|
nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
|
|
48
51
|
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
49
|
-
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
52
|
+
includeItemPermissions: !!args.options.includeItemPermissions || !!args.options.withItemPermissions,
|
|
50
53
|
newName: newName,
|
|
51
54
|
operation: 'move'
|
|
52
55
|
});
|
|
@@ -119,6 +122,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
119
122
|
newName: typeof args.options.newName !== 'undefined',
|
|
120
123
|
nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
|
|
121
124
|
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
125
|
+
withItemPermissions: !!args.options.withItemPermissions,
|
|
122
126
|
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
123
127
|
skipWait: !!args.options.skipWait
|
|
124
128
|
});
|
|
@@ -139,6 +143,8 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
139
143
|
autocomplete: this.nameConflictBehaviorOptions
|
|
140
144
|
}, {
|
|
141
145
|
option: '--includeItemPermissions'
|
|
146
|
+
}, {
|
|
147
|
+
option: '--withItemPermissions'
|
|
142
148
|
}, {
|
|
143
149
|
option: '--bypassSharedLock'
|
|
144
150
|
}, {
|
|
@@ -162,7 +168,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
162
168
|
this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
|
|
163
169
|
}, _SpoFileMoveCommand_initTypes = function _SpoFileMoveCommand_initTypes() {
|
|
164
170
|
this.types.string.push('webUrl', 'sourceUrl', 'sourceId', 'targetUrl', 'newName', 'nameConflictBehavior');
|
|
165
|
-
this.types.boolean.push('includeItemPermissions', 'bypassSharedLock', 'skipWait');
|
|
171
|
+
this.types.boolean.push('includeItemPermissions', 'withItemPermissions', 'bypassSharedLock', 'skipWait');
|
|
166
172
|
};
|
|
167
173
|
export default new SpoFileMoveCommand();
|
|
168
174
|
//# sourceMappingURL=file-move.js.map
|
|
@@ -29,12 +29,20 @@ class SpoHubSiteGetCommand extends SpoCommand {
|
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
32
|
+
if (args.options.includeAssociatedSites) {
|
|
33
|
+
await this.warn(logger, `Parameter 'includeAssociatedSites' is deprecated. Please use 'withAssociatedSites' instead`);
|
|
34
|
+
}
|
|
32
35
|
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|
|
33
36
|
const hubSite = args.options.id ? await this.getHubSiteById(spoUrl, args.options) : await this.getHubSite(spoUrl, args.options);
|
|
34
|
-
if (args.options.includeAssociatedSites && (args.options.output && args.options.output !== 'json')) {
|
|
35
|
-
|
|
37
|
+
if ((args.options.includeAssociatedSites || args.options.withAssociatedSites) && (args.options.output && args.options.output !== 'json')) {
|
|
38
|
+
if (args.options.includeAssociatedSites) {
|
|
39
|
+
throw 'includeAssociatedSites option is only allowed with json output mode';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
throw 'withAssociatedSites option is only allowed with json output mode';
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
|
-
if (args.options.includeAssociatedSites === true && args.options.output && !cli.shouldTrimOutput(args.options.output)) {
|
|
45
|
+
if ((args.options.includeAssociatedSites === true || args.options.withAssociatedSites === true) && args.options.output && !cli.shouldTrimOutput(args.options.output)) {
|
|
38
46
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
39
47
|
const associatedSitesCommandOutput = await this.getAssociatedSites(spoAdminUrl, hubSite.SiteId, logger, args);
|
|
40
48
|
const associatedSites = JSON.parse(associatedSitesCommandOutput.stdout);
|
|
@@ -100,11 +108,12 @@ _SpoHubSiteGetCommand_instances = new WeakSet(), _SpoHubSiteGetCommand_initTelem
|
|
|
100
108
|
id: typeof args.options.id !== 'undefined',
|
|
101
109
|
title: typeof args.options.title !== 'undefined',
|
|
102
110
|
url: typeof args.options.url !== 'undefined',
|
|
103
|
-
includeAssociatedSites: args.options.includeAssociatedSites === true
|
|
111
|
+
includeAssociatedSites: args.options.includeAssociatedSites === true,
|
|
112
|
+
withAssociatedSites: args.options.withAssociatedSites === true
|
|
104
113
|
});
|
|
105
114
|
});
|
|
106
115
|
}, _SpoHubSiteGetCommand_initOptions = function _SpoHubSiteGetCommand_initOptions() {
|
|
107
|
-
this.options.unshift({ option: '-i, --id [id]' }, { option: '-t, --title [title]' }, { option: '-u, --url [url]' }, { option: '--includeAssociatedSites' });
|
|
116
|
+
this.options.unshift({ option: '-i, --id [id]' }, { option: '-t, --title [title]' }, { option: '-u, --url [url]' }, { option: '--includeAssociatedSites' }, { option: '--withAssociatedSites' });
|
|
108
117
|
}, _SpoHubSiteGetCommand_initValidators = function _SpoHubSiteGetCommand_initValidators() {
|
|
109
118
|
this.validators.push(async (args) => {
|
|
110
119
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
@@ -29,10 +29,14 @@ class SpoHubSiteListCommand extends SpoCommand {
|
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
32
|
+
if (args.options.includeAssociatedSites) {
|
|
33
|
+
await this.warn(logger, `Parameter 'includeAssociatedSites' is deprecated. Please use 'withAssociatedSites' instead`);
|
|
34
|
+
}
|
|
32
35
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
33
36
|
const hubSitesResult = await odata.getAllItems(`${spoAdminUrl}/_api/hubsites`);
|
|
34
37
|
const hubSites = hubSitesResult;
|
|
35
|
-
|
|
38
|
+
const shouldIncludeAssociatedSites = args.options.includeAssociatedSites || args.options.withAssociatedSites;
|
|
39
|
+
if (!(shouldIncludeAssociatedSites !== true || args.options.output && args.options.output !== 'json')) {
|
|
36
40
|
if (this.debug) {
|
|
37
41
|
await logger.logToStderr('Retrieving associated sites...');
|
|
38
42
|
await logger.logToStderr('');
|
|
@@ -104,12 +108,15 @@ class SpoHubSiteListCommand extends SpoCommand {
|
|
|
104
108
|
_SpoHubSiteListCommand_instances = new WeakSet(), _SpoHubSiteListCommand_initTelemetry = function _SpoHubSiteListCommand_initTelemetry() {
|
|
105
109
|
this.telemetry.push((args) => {
|
|
106
110
|
Object.assign(this.telemetryProperties, {
|
|
107
|
-
includeAssociatedSites: args.options.includeAssociatedSites === true
|
|
111
|
+
includeAssociatedSites: args.options.includeAssociatedSites === true,
|
|
112
|
+
withAssociatedSites: args.options.withAssociatedSites === true
|
|
108
113
|
});
|
|
109
114
|
});
|
|
110
115
|
}, _SpoHubSiteListCommand_initOptions = function _SpoHubSiteListCommand_initOptions() {
|
|
111
116
|
this.options.unshift({
|
|
112
117
|
option: '-i, --includeAssociatedSites'
|
|
118
|
+
}, {
|
|
119
|
+
option: '--withAssociatedSites'
|
|
113
120
|
});
|
|
114
121
|
};
|
|
115
122
|
export default new SpoHubSiteListCommand();
|