@pnp/cli-microsoft365 5.2.0-beta.dc50ce6 → 5.2.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/dist/m365/planner/commands/bucket/bucket-set.js +208 -0
- package/dist/m365/planner/commands.js +1 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.15.0-beta.1.js → upgrade-1.15.0-beta.6.js} +27 -27
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -105
- package/dist/m365/teams/commands/channel/channel-member-remove.js +214 -0
- package/dist/m365/teams/commands.js +2 -0
- package/docs/docs/cmd/planner/bucket/bucket-set.md +57 -0
- package/docs/docs/cmd/planner/task/task-set.md +2 -2
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-list.md +2 -2
- package/docs/docs/cmd/teams/channel/channel-member-remove.md +57 -0
- package/package.json +4 -2
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class PlannerBucketSetCommand extends GraphCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.BUCKET_SET;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Updates a Microsoft Planner bucket';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.id = typeof args.options.id !== 'undefined';
|
|
17
|
+
telemetryProps.name = typeof args.options.name !== 'undefined';
|
|
18
|
+
telemetryProps.planId = typeof args.options.planId !== 'undefined';
|
|
19
|
+
telemetryProps.planName = typeof args.options.planName !== 'undefined';
|
|
20
|
+
telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
|
|
21
|
+
telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
|
|
22
|
+
telemetryProps.newName = typeof args.options.newName !== 'undefined';
|
|
23
|
+
telemetryProps.orderHint = typeof args.options.orderHint !== 'undefined';
|
|
24
|
+
return telemetryProps;
|
|
25
|
+
}
|
|
26
|
+
commandAction(logger, args, cb) {
|
|
27
|
+
this
|
|
28
|
+
.getBucket(args)
|
|
29
|
+
.then(bucket => {
|
|
30
|
+
const requestOptions = {
|
|
31
|
+
url: `${this.resource}/v1.0/planner/buckets/${bucket.id}`,
|
|
32
|
+
headers: {
|
|
33
|
+
accept: 'application/json;odata.metadata=none',
|
|
34
|
+
'if-match': bucket['@odata.etag']
|
|
35
|
+
},
|
|
36
|
+
responseType: 'json',
|
|
37
|
+
data: {}
|
|
38
|
+
};
|
|
39
|
+
const { newName, orderHint } = args.options;
|
|
40
|
+
if (newName) {
|
|
41
|
+
requestOptions.data.name = newName;
|
|
42
|
+
}
|
|
43
|
+
if (orderHint) {
|
|
44
|
+
requestOptions.data.orderHint = orderHint;
|
|
45
|
+
}
|
|
46
|
+
return request_1.default.patch(requestOptions);
|
|
47
|
+
})
|
|
48
|
+
.then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
49
|
+
}
|
|
50
|
+
getBucket(args) {
|
|
51
|
+
if (args.options.id) {
|
|
52
|
+
const requestOptions = {
|
|
53
|
+
url: `${this.resource}/v1.0/planner/buckets/${args.options.id}`,
|
|
54
|
+
headers: {
|
|
55
|
+
accept: 'application/json'
|
|
56
|
+
},
|
|
57
|
+
responseType: 'json'
|
|
58
|
+
};
|
|
59
|
+
return request_1.default.get(requestOptions);
|
|
60
|
+
}
|
|
61
|
+
return this
|
|
62
|
+
.getPlanId(args)
|
|
63
|
+
.then(planId => {
|
|
64
|
+
const requestOptions = {
|
|
65
|
+
url: `${this.resource}/v1.0/planner/plans/${planId}/buckets`,
|
|
66
|
+
headers: {
|
|
67
|
+
accept: 'application/json'
|
|
68
|
+
},
|
|
69
|
+
responseType: 'json'
|
|
70
|
+
};
|
|
71
|
+
return request_1.default.get(requestOptions);
|
|
72
|
+
})
|
|
73
|
+
.then(buckets => {
|
|
74
|
+
const filteredBuckets = buckets.value.filter(b => args.options.name.toLowerCase() === b.name.toLowerCase());
|
|
75
|
+
if (!filteredBuckets.length) {
|
|
76
|
+
return Promise.reject(`The specified bucket ${args.options.name} does not exist`);
|
|
77
|
+
}
|
|
78
|
+
if (filteredBuckets.length > 1) {
|
|
79
|
+
return Promise.reject(`Multiple buckets with name ${args.options.name} found: ${filteredBuckets.map(x => x.id)}`);
|
|
80
|
+
}
|
|
81
|
+
return Promise.resolve(filteredBuckets[0]);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
getPlanId(args) {
|
|
85
|
+
const { planId, planName } = args.options;
|
|
86
|
+
if (planId) {
|
|
87
|
+
return Promise.resolve(planId);
|
|
88
|
+
}
|
|
89
|
+
return this
|
|
90
|
+
.getGroupId(args)
|
|
91
|
+
.then(groupId => {
|
|
92
|
+
const requestOptions = {
|
|
93
|
+
url: `${this.resource}/v1.0/planner/plans?$filter=owner eq '${groupId}'`,
|
|
94
|
+
headers: {
|
|
95
|
+
accept: 'application/json;odata.metadata=none'
|
|
96
|
+
},
|
|
97
|
+
responseType: 'json'
|
|
98
|
+
};
|
|
99
|
+
return request_1.default.get(requestOptions);
|
|
100
|
+
})
|
|
101
|
+
.then(plans => {
|
|
102
|
+
const filteredPlans = plans.value.filter(p => p.title.toLowerCase() === planName.toLowerCase());
|
|
103
|
+
if (filteredPlans.length === 0) {
|
|
104
|
+
return Promise.reject(`The specified plan ${planName} does not exist`);
|
|
105
|
+
}
|
|
106
|
+
if (filteredPlans.length > 1) {
|
|
107
|
+
return Promise.reject(`Multiple plans with name ${planName} found: ${filteredPlans.map(x => x.id)}`);
|
|
108
|
+
}
|
|
109
|
+
return Promise.resolve(filteredPlans[0].id);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
getGroupId(args) {
|
|
113
|
+
const { ownerGroupId, ownerGroupName } = args.options;
|
|
114
|
+
if (ownerGroupId) {
|
|
115
|
+
return Promise.resolve(ownerGroupId);
|
|
116
|
+
}
|
|
117
|
+
const requestOptions = {
|
|
118
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(ownerGroupName)}'`,
|
|
119
|
+
headers: {
|
|
120
|
+
accept: 'application/json;odata.metadata=none'
|
|
121
|
+
},
|
|
122
|
+
responseType: 'json'
|
|
123
|
+
};
|
|
124
|
+
return request_1.default
|
|
125
|
+
.get(requestOptions)
|
|
126
|
+
.then(response => {
|
|
127
|
+
if (response.value.length === 0) {
|
|
128
|
+
return Promise.reject(`The specified owner group ${ownerGroupName} does not exist`);
|
|
129
|
+
}
|
|
130
|
+
if (response.value.length > 1) {
|
|
131
|
+
return Promise.reject(`Multiple owner groups with name ${ownerGroupName} found: ${response.value.map(x => x.id)}`);
|
|
132
|
+
}
|
|
133
|
+
return Promise.resolve(response.value[0].id);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
options() {
|
|
137
|
+
const options = [
|
|
138
|
+
{
|
|
139
|
+
option: '-i, --id [id]'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
option: '--name [name]'
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
option: '--planId [planId]'
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
option: '--planName [planName]'
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
option: '--ownerGroupId [ownerGroupId]'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
option: '--ownerGroupName [ownerGroupName]'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
option: '--newName [newName]'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
option: '--orderHint [orderHint]'
|
|
161
|
+
}
|
|
162
|
+
];
|
|
163
|
+
const parentOptions = super.options();
|
|
164
|
+
return options.concat(parentOptions);
|
|
165
|
+
}
|
|
166
|
+
optionSets() {
|
|
167
|
+
return [
|
|
168
|
+
['id', 'name']
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
validate(args) {
|
|
172
|
+
if (args.options.id) {
|
|
173
|
+
if (args.options.planId || args.options.planName || args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
174
|
+
return 'Don\'t specify planId, planName, ownerGroupId or ownerGroupName when using id';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (args.options.name) {
|
|
178
|
+
if (!args.options.planId && !args.options.planName) {
|
|
179
|
+
return 'Specify either planId or planName when using name';
|
|
180
|
+
}
|
|
181
|
+
if (args.options.planId && args.options.planName) {
|
|
182
|
+
return 'Specify either planId or planName when using name but not both';
|
|
183
|
+
}
|
|
184
|
+
if (args.options.planName) {
|
|
185
|
+
if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
186
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planName';
|
|
187
|
+
}
|
|
188
|
+
if (args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
189
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planName but not both';
|
|
190
|
+
}
|
|
191
|
+
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
192
|
+
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (args.options.planId) {
|
|
196
|
+
if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
197
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (!args.options.newName && !args.options.orderHint) {
|
|
202
|
+
return 'Specify either newName or orderHint';
|
|
203
|
+
}
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
module.exports = new PlannerBucketSetCommand();
|
|
208
|
+
//# sourceMappingURL=bucket-set.js.map
|
|
@@ -4,6 +4,7 @@ const prefix = 'planner';
|
|
|
4
4
|
exports.default = {
|
|
5
5
|
BUCKET_ADD: `${prefix} bucket add`,
|
|
6
6
|
BUCKET_LIST: `${prefix} bucket list`,
|
|
7
|
+
BUCKET_SET: `${prefix} bucket set`,
|
|
7
8
|
PLAN_ADD: `${prefix} plan add`,
|
|
8
9
|
PLAN_GET: `${prefix} plan get`,
|
|
9
10
|
PLAN_DETAILS_GET: `${prefix} plan details get`,
|
|
@@ -30,34 +30,34 @@ const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer")
|
|
|
30
30
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
31
31
|
const FN023002_GITIGNORE_heft_1 = require("./rules/FN023002_GITIGNORE_heft");
|
|
32
32
|
module.exports = [
|
|
33
|
-
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-beta.
|
|
34
|
-
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-beta.
|
|
35
|
-
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-beta.
|
|
36
|
-
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-beta.
|
|
37
|
-
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-beta.
|
|
38
|
-
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-beta.
|
|
39
|
-
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-beta.
|
|
40
|
-
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-beta.
|
|
41
|
-
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-beta.
|
|
42
|
-
new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.
|
|
43
|
-
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-beta.
|
|
44
|
-
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-beta.
|
|
45
|
-
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-beta.
|
|
46
|
-
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-beta.
|
|
47
|
-
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-beta.
|
|
48
|
-
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-beta.
|
|
49
|
-
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-beta.
|
|
50
|
-
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-beta.
|
|
51
|
-
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-beta.
|
|
52
|
-
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-beta.
|
|
53
|
-
new FN001033_DEP_tslib_1.FN001033_DEP_tslib('
|
|
54
|
-
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-beta.
|
|
55
|
-
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-beta.
|
|
33
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-beta.6'),
|
|
34
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-beta.6'),
|
|
35
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-beta.6'),
|
|
36
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-beta.6'),
|
|
37
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-beta.6'),
|
|
38
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-beta.6'),
|
|
39
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-beta.6'),
|
|
40
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-beta.6'),
|
|
41
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-beta.6'),
|
|
42
|
+
new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.183.1'),
|
|
43
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-beta.6'),
|
|
44
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-beta.6'),
|
|
45
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-beta.6'),
|
|
46
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-beta.6'),
|
|
47
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-beta.6'),
|
|
48
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-beta.6'),
|
|
49
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-beta.6'),
|
|
50
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
|
|
51
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-beta.6'),
|
|
52
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-beta.6'),
|
|
53
|
+
new FN001033_DEP_tslib_1.FN001033_DEP_tslib('2.3.1'),
|
|
54
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-beta.6'),
|
|
55
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
|
|
56
56
|
new FN002007_DEVDEP_ajv_1.FN002007_DEVDEP_ajv('6.12.5'),
|
|
57
|
-
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.15.0-beta.
|
|
57
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.15.0-beta.6'),
|
|
58
58
|
new FN002013_DEVDEP_types_webpack_env_1.FN002013_DEVDEP_types_webpack_env('1.15.2'),
|
|
59
|
-
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-beta.
|
|
60
|
-
new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-beta.
|
|
59
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-beta.6'),
|
|
60
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-beta.6'),
|
|
61
61
|
new FN023002_GITIGNORE_heft_1.FN023002_GITIGNORE_heft()
|
|
62
62
|
];
|
|
63
|
-
//# sourceMappingURL=upgrade-1.15.0-beta.
|
|
63
|
+
//# sourceMappingURL=upgrade-1.15.0-beta.6.js.map
|
|
@@ -63,10 +63,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
63
63
|
range: '^6',
|
|
64
64
|
fix: 'Install Node.js v6'
|
|
65
65
|
},
|
|
66
|
-
react: {
|
|
67
|
-
range: '^15',
|
|
68
|
-
fix: 'npm i react@15'
|
|
69
|
-
},
|
|
70
66
|
sp: SharePointVersion.All,
|
|
71
67
|
yo: {
|
|
72
68
|
range: '^3',
|
|
@@ -82,10 +78,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
82
78
|
range: '^6',
|
|
83
79
|
fix: 'Install Node.js v6'
|
|
84
80
|
},
|
|
85
|
-
react: {
|
|
86
|
-
range: '^15',
|
|
87
|
-
fix: 'npm i react@15'
|
|
88
|
-
},
|
|
89
81
|
sp: SharePointVersion.All,
|
|
90
82
|
yo: {
|
|
91
83
|
range: '^3',
|
|
@@ -101,10 +93,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
101
93
|
range: '^6',
|
|
102
94
|
fix: 'Install Node.js v6'
|
|
103
95
|
},
|
|
104
|
-
react: {
|
|
105
|
-
range: '^15',
|
|
106
|
-
fix: 'npm i react@15'
|
|
107
|
-
},
|
|
108
96
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
109
97
|
yo: {
|
|
110
98
|
range: '^3',
|
|
@@ -120,10 +108,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
120
108
|
range: '^6',
|
|
121
109
|
fix: 'Install Node.js v6'
|
|
122
110
|
},
|
|
123
|
-
react: {
|
|
124
|
-
range: '^15',
|
|
125
|
-
fix: 'npm i react@15'
|
|
126
|
-
},
|
|
127
111
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
128
112
|
yo: {
|
|
129
113
|
range: '^3',
|
|
@@ -139,10 +123,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
139
123
|
range: '^6 || ^8',
|
|
140
124
|
fix: 'Install Node.js v8'
|
|
141
125
|
},
|
|
142
|
-
react: {
|
|
143
|
-
range: '^15',
|
|
144
|
-
fix: 'npm i react@15'
|
|
145
|
-
},
|
|
146
126
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
147
127
|
yo: {
|
|
148
128
|
range: '^3',
|
|
@@ -158,10 +138,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
158
138
|
range: '^6 || ^8',
|
|
159
139
|
fix: 'Install Node.js v8'
|
|
160
140
|
},
|
|
161
|
-
react: {
|
|
162
|
-
range: '^15',
|
|
163
|
-
fix: 'npm i react@15'
|
|
164
|
-
},
|
|
165
141
|
sp: SharePointVersion.SPO,
|
|
166
142
|
yo: {
|
|
167
143
|
range: '^3',
|
|
@@ -177,10 +153,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
177
153
|
range: '^6 || ^8',
|
|
178
154
|
fix: 'Install Node.js v8'
|
|
179
155
|
},
|
|
180
|
-
react: {
|
|
181
|
-
range: '^15',
|
|
182
|
-
fix: 'npm i react@15'
|
|
183
|
-
},
|
|
184
156
|
sp: SharePointVersion.SPO,
|
|
185
157
|
yo: {
|
|
186
158
|
range: '^3',
|
|
@@ -196,10 +168,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
196
168
|
range: '^6 || ^8',
|
|
197
169
|
fix: 'Install Node.js v8'
|
|
198
170
|
},
|
|
199
|
-
react: {
|
|
200
|
-
range: '^15',
|
|
201
|
-
fix: 'npm i react@15'
|
|
202
|
-
},
|
|
203
171
|
sp: SharePointVersion.SPO,
|
|
204
172
|
yo: {
|
|
205
173
|
range: '^3',
|
|
@@ -215,10 +183,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
215
183
|
range: '^8',
|
|
216
184
|
fix: 'Install Node.js v8'
|
|
217
185
|
},
|
|
218
|
-
react: {
|
|
219
|
-
range: '16.3.2',
|
|
220
|
-
fix: 'npm i react@16.3.2'
|
|
221
|
-
},
|
|
222
186
|
sp: SharePointVersion.SPO,
|
|
223
187
|
yo: {
|
|
224
188
|
range: '^3',
|
|
@@ -234,10 +198,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
234
198
|
range: '^8',
|
|
235
199
|
fix: 'Install Node.js v8'
|
|
236
200
|
},
|
|
237
|
-
react: {
|
|
238
|
-
range: '16.3.2',
|
|
239
|
-
fix: 'npm i react@16.3.2'
|
|
240
|
-
},
|
|
241
201
|
sp: SharePointVersion.SPO,
|
|
242
202
|
yo: {
|
|
243
203
|
range: '^3',
|
|
@@ -253,10 +213,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
253
213
|
range: '^8',
|
|
254
214
|
fix: 'Install Node.js v8'
|
|
255
215
|
},
|
|
256
|
-
react: {
|
|
257
|
-
range: '16.7.0',
|
|
258
|
-
fix: 'npm i react@16.7.0'
|
|
259
|
-
},
|
|
260
216
|
sp: SharePointVersion.SPO,
|
|
261
217
|
yo: {
|
|
262
218
|
range: '^3',
|
|
@@ -272,10 +228,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
272
228
|
range: '^8',
|
|
273
229
|
fix: 'Install Node.js v8'
|
|
274
230
|
},
|
|
275
|
-
react: {
|
|
276
|
-
range: '16.7.0',
|
|
277
|
-
fix: 'npm i react@16.7.0'
|
|
278
|
-
},
|
|
279
231
|
sp: SharePointVersion.SPO,
|
|
280
232
|
yo: {
|
|
281
233
|
range: '^3',
|
|
@@ -291,10 +243,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
291
243
|
range: '^8 || ^10',
|
|
292
244
|
fix: 'Install Node.js v10'
|
|
293
245
|
},
|
|
294
|
-
react: {
|
|
295
|
-
range: '16.7.0',
|
|
296
|
-
fix: 'npm i react@16.7.0'
|
|
297
|
-
},
|
|
298
246
|
sp: SharePointVersion.SPO,
|
|
299
247
|
yo: {
|
|
300
248
|
range: '^3',
|
|
@@ -310,10 +258,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
310
258
|
range: '^8 || ^10',
|
|
311
259
|
fix: 'Install Node.js v10'
|
|
312
260
|
},
|
|
313
|
-
react: {
|
|
314
|
-
range: '16.8.5',
|
|
315
|
-
fix: 'npm i react@16.8.5'
|
|
316
|
-
},
|
|
317
261
|
sp: SharePointVersion.SPO,
|
|
318
262
|
yo: {
|
|
319
263
|
range: '^3',
|
|
@@ -329,10 +273,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
329
273
|
range: '^10',
|
|
330
274
|
fix: 'Install Node.js v10'
|
|
331
275
|
},
|
|
332
|
-
react: {
|
|
333
|
-
range: '16.8.5',
|
|
334
|
-
fix: 'npm i react@16.8.5'
|
|
335
|
-
},
|
|
336
276
|
sp: SharePointVersion.SPO,
|
|
337
277
|
yo: {
|
|
338
278
|
range: '^3',
|
|
@@ -348,10 +288,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
348
288
|
range: '^10',
|
|
349
289
|
fix: 'Install Node.js v10'
|
|
350
290
|
},
|
|
351
|
-
react: {
|
|
352
|
-
range: '16.8.5',
|
|
353
|
-
fix: 'npm i react@16.8.5'
|
|
354
|
-
},
|
|
355
291
|
sp: SharePointVersion.SPO,
|
|
356
292
|
yo: {
|
|
357
293
|
range: '^3',
|
|
@@ -367,10 +303,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
367
303
|
range: '^10',
|
|
368
304
|
fix: 'Install Node.js v10'
|
|
369
305
|
},
|
|
370
|
-
react: {
|
|
371
|
-
range: '16.8.5',
|
|
372
|
-
fix: 'npm i react@16.8.5'
|
|
373
|
-
},
|
|
374
306
|
sp: SharePointVersion.SPO,
|
|
375
307
|
yo: {
|
|
376
308
|
range: '^3',
|
|
@@ -386,10 +318,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
386
318
|
range: '^12',
|
|
387
319
|
fix: 'Install Node.js v12'
|
|
388
320
|
},
|
|
389
|
-
react: {
|
|
390
|
-
range: '16.9.0',
|
|
391
|
-
fix: 'npm i react@16.9.0'
|
|
392
|
-
},
|
|
393
321
|
sp: SharePointVersion.SPO,
|
|
394
322
|
yo: {
|
|
395
323
|
range: '^3',
|
|
@@ -405,10 +333,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
405
333
|
range: '^12 || ^14',
|
|
406
334
|
fix: 'Install Node.js v12 or v14'
|
|
407
335
|
},
|
|
408
|
-
react: {
|
|
409
|
-
range: '16.9.36',
|
|
410
|
-
fix: 'npm i react@16.9.36'
|
|
411
|
-
},
|
|
412
336
|
sp: SharePointVersion.SPO,
|
|
413
337
|
yo: {
|
|
414
338
|
range: '^3',
|
|
@@ -424,10 +348,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
424
348
|
range: '^12 || ^14',
|
|
425
349
|
fix: 'Install Node.js v12 or v14'
|
|
426
350
|
},
|
|
427
|
-
react: {
|
|
428
|
-
range: '16.9.51',
|
|
429
|
-
fix: 'npm i react@16.9.51'
|
|
430
|
-
},
|
|
431
351
|
sp: SharePointVersion.SPO,
|
|
432
352
|
yo: {
|
|
433
353
|
range: '^4',
|
|
@@ -443,10 +363,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
443
363
|
range: '^12 || ^14',
|
|
444
364
|
fix: 'Install Node.js v12 or v14'
|
|
445
365
|
},
|
|
446
|
-
react: {
|
|
447
|
-
range: '16.9.51',
|
|
448
|
-
fix: 'npm i react@16.9.51'
|
|
449
|
-
},
|
|
450
366
|
sp: SharePointVersion.SPO,
|
|
451
367
|
yo: {
|
|
452
368
|
range: '^4',
|
|
@@ -462,10 +378,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
462
378
|
range: '^12 || ^14',
|
|
463
379
|
fix: 'Install Node.js v12 or v14'
|
|
464
380
|
},
|
|
465
|
-
react: {
|
|
466
|
-
range: '16.9.51',
|
|
467
|
-
fix: 'npm i react@16.9.51'
|
|
468
|
-
},
|
|
469
381
|
sp: SharePointVersion.SPO,
|
|
470
382
|
yo: {
|
|
471
383
|
range: '^4',
|
|
@@ -511,7 +423,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
511
423
|
.then(_ => this.checkNodeVersion(prerequisites, fixes, logger))
|
|
512
424
|
.then(_ => this.checkYo(prerequisites, fixes, logger))
|
|
513
425
|
.then(_ => this.checkGulp(prerequisites, fixes, logger))
|
|
514
|
-
.then(_ => this.checkReact(prerequisites, fixes, logger))
|
|
515
426
|
.then(_ => this.checkTypeScript(fixes, logger))
|
|
516
427
|
.then(_ => {
|
|
517
428
|
if (fixes.length > 0) {
|
|
@@ -586,13 +497,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
586
497
|
}
|
|
587
498
|
});
|
|
588
499
|
}
|
|
589
|
-
checkReact(prerequisites, fixes, logger) {
|
|
590
|
-
return this
|
|
591
|
-
.getPackageVersion('react', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
|
|
592
|
-
.then((reactVersion) => {
|
|
593
|
-
this.checkStatus('react', reactVersion, prerequisites.react, OptionalOrRequired.Optional, fixes, logger);
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
500
|
checkTypeScript(fixes, logger) {
|
|
597
501
|
return this
|
|
598
502
|
.getPackageVersion('typescript', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
|
|
@@ -713,15 +617,7 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
713
617
|
return process.version.substr(1);
|
|
714
618
|
}
|
|
715
619
|
checkStatus(what, versionFound, versionCheck, optionalOrRequired, fixes, logger) {
|
|
716
|
-
if (
|
|
717
|
-
// TODO: we might need this code in the future if SPFx introduces required
|
|
718
|
-
// prerequisites with a specific version
|
|
719
|
-
// if (optionalOrRequired === OptionalOrRequired.Required) {
|
|
720
|
-
// logger.log(this.getStatus(CheckStatus.Failure, `${what} not found, v${versionCheck.range} required`));
|
|
721
|
-
// fixes.push(versionCheck.fix);
|
|
722
|
-
// }
|
|
723
|
-
}
|
|
724
|
-
else {
|
|
620
|
+
if (versionFound) {
|
|
725
621
|
if ((0, semver_1.satisfies)(versionFound, versionCheck.range)) {
|
|
726
622
|
logger.log(this.getStatus(CheckStatus.Success, `${what} v${versionFound}`));
|
|
727
623
|
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../../cli");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const utils_1 = require("../../../../utils");
|
|
6
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
|
+
const commands_1 = require("../../commands");
|
|
8
|
+
class TeamsChannelMemberRemoveCommand extends GraphCommand_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.teamId = '';
|
|
12
|
+
this.channelId = '';
|
|
13
|
+
}
|
|
14
|
+
get name() {
|
|
15
|
+
return commands_1.default.CHANNEL_MEMBER_REMOVE;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Updates the role of the specified member in the specified Microsoft Teams private team channel';
|
|
19
|
+
}
|
|
20
|
+
alias() {
|
|
21
|
+
return [commands_1.default.CONVERSATIONMEMBER_REMOVE];
|
|
22
|
+
}
|
|
23
|
+
optionSets() {
|
|
24
|
+
return [
|
|
25
|
+
['teamId', 'teamName'],
|
|
26
|
+
['channelId', 'channelName'],
|
|
27
|
+
['userId', 'userName', 'id']
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
getTelemetryProperties(args) {
|
|
31
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
32
|
+
telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
|
|
33
|
+
telemetryProps.teamName = typeof args.options.teamName !== 'undefined';
|
|
34
|
+
telemetryProps.channelId = typeof args.options.channelId !== 'undefined';
|
|
35
|
+
telemetryProps.channelName = typeof args.options.channelName !== 'undefined';
|
|
36
|
+
telemetryProps.userName = typeof args.options.userName !== 'undefined';
|
|
37
|
+
telemetryProps.userId = typeof args.options.userId !== 'undefined';
|
|
38
|
+
telemetryProps.id = typeof args.options.id !== 'undefined';
|
|
39
|
+
telemetryProps.confirm = (!(!args.options.confirm)).toString();
|
|
40
|
+
return telemetryProps;
|
|
41
|
+
}
|
|
42
|
+
commandAction(logger, args, cb) {
|
|
43
|
+
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_REMOVE, commands_1.default.CHANNEL_MEMBER_REMOVE);
|
|
44
|
+
const removeMember = () => {
|
|
45
|
+
this
|
|
46
|
+
.removeMemberFromChannel(args)
|
|
47
|
+
.then(cb, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
48
|
+
};
|
|
49
|
+
if (args.options.confirm) {
|
|
50
|
+
removeMember();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const userName = args.options.userName || args.options.userId || args.options.id;
|
|
54
|
+
const teamName = args.options.teamName || args.options.teamId;
|
|
55
|
+
const channelName = args.options.channelName || args.options.channelId;
|
|
56
|
+
cli_1.Cli.prompt({
|
|
57
|
+
type: 'confirm',
|
|
58
|
+
name: 'continue',
|
|
59
|
+
default: false,
|
|
60
|
+
message: `Are you sure you want to remove the member ${userName} from the channel ${channelName} in team ${teamName}?`
|
|
61
|
+
}, (result) => {
|
|
62
|
+
if (!result.continue) {
|
|
63
|
+
cb();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
removeMember();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
removeMemberFromChannel(args) {
|
|
72
|
+
return this
|
|
73
|
+
.getTeamId(args)
|
|
74
|
+
.then((teamId) => {
|
|
75
|
+
this.teamId = teamId;
|
|
76
|
+
return this.getChannelId(args);
|
|
77
|
+
})
|
|
78
|
+
.then((channelId) => {
|
|
79
|
+
this.channelId = channelId;
|
|
80
|
+
return this.getMemberId(args);
|
|
81
|
+
})
|
|
82
|
+
.then((memberId) => {
|
|
83
|
+
const requestOptions = {
|
|
84
|
+
url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members/${memberId}`,
|
|
85
|
+
headers: {
|
|
86
|
+
'accept': 'application/json;odata.metadata=none'
|
|
87
|
+
},
|
|
88
|
+
responseType: 'json'
|
|
89
|
+
};
|
|
90
|
+
return request_1.default.delete(requestOptions);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
getTeamId(args) {
|
|
94
|
+
if (args.options.teamId) {
|
|
95
|
+
return Promise.resolve(args.options.teamId);
|
|
96
|
+
}
|
|
97
|
+
const requestOptions = {
|
|
98
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
99
|
+
headers: {
|
|
100
|
+
accept: 'application/json;odata.metadata=none'
|
|
101
|
+
},
|
|
102
|
+
responseType: 'json'
|
|
103
|
+
};
|
|
104
|
+
return request_1.default
|
|
105
|
+
.get(requestOptions)
|
|
106
|
+
.then(response => {
|
|
107
|
+
const groupItem = response.value[0];
|
|
108
|
+
if (!groupItem) {
|
|
109
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
110
|
+
}
|
|
111
|
+
if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
112
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
113
|
+
}
|
|
114
|
+
if (response.value.length > 1) {
|
|
115
|
+
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
|
|
116
|
+
}
|
|
117
|
+
return Promise.resolve(groupItem.id);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
getChannelId(args) {
|
|
121
|
+
if (args.options.channelId) {
|
|
122
|
+
return Promise.resolve(args.options.channelId);
|
|
123
|
+
}
|
|
124
|
+
const requestOptions = {
|
|
125
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.channelName)}'`,
|
|
126
|
+
headers: {
|
|
127
|
+
accept: 'application/json;odata.metadata=none'
|
|
128
|
+
},
|
|
129
|
+
responseType: 'json'
|
|
130
|
+
};
|
|
131
|
+
return request_1.default
|
|
132
|
+
.get(requestOptions)
|
|
133
|
+
.then(response => {
|
|
134
|
+
const channelItem = response.value[0];
|
|
135
|
+
if (!channelItem) {
|
|
136
|
+
return Promise.reject(`The specified channel does not exist in the Microsoft Teams team`);
|
|
137
|
+
}
|
|
138
|
+
return Promise.resolve(channelItem.id);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
getMemberId(args) {
|
|
142
|
+
if (args.options.id) {
|
|
143
|
+
return Promise.resolve(args.options.id);
|
|
144
|
+
}
|
|
145
|
+
const requestOptions = {
|
|
146
|
+
url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members`,
|
|
147
|
+
headers: {
|
|
148
|
+
accept: 'application/json;odata.metadata=none'
|
|
149
|
+
},
|
|
150
|
+
responseType: 'json'
|
|
151
|
+
};
|
|
152
|
+
return request_1.default
|
|
153
|
+
.get(requestOptions)
|
|
154
|
+
.then(response => {
|
|
155
|
+
const conversationMembers = response.value.filter(x => {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
return args.options.userId && ((_a = x.userId) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === args.options.userId.toLocaleLowerCase() ||
|
|
158
|
+
args.options.userName && ((_b = x.email) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) === args.options.userName.toLocaleLowerCase();
|
|
159
|
+
});
|
|
160
|
+
const conversationMember = conversationMembers[0];
|
|
161
|
+
if (!conversationMember) {
|
|
162
|
+
return Promise.reject(`The specified member does not exist in the Microsoft Teams channel`);
|
|
163
|
+
}
|
|
164
|
+
if (conversationMembers.length > 1) {
|
|
165
|
+
return Promise.reject(`Multiple Microsoft Teams channel members with name ${args.options.userName} found: ${response.value.map(x => x.userId)}`);
|
|
166
|
+
}
|
|
167
|
+
return Promise.resolve(conversationMember.id);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
options() {
|
|
171
|
+
const options = [
|
|
172
|
+
{
|
|
173
|
+
option: '--teamId [teamId]'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
option: '--teamName [teamName]'
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
option: '--channelId [channelId]'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
option: '--channelName [channelName]'
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
option: '--userName [userName]'
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
option: '--userId [userId]'
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
option: '--id [id]'
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
option: '--confirm'
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
const parentOptions = super.options();
|
|
198
|
+
return options.concat(parentOptions);
|
|
199
|
+
}
|
|
200
|
+
validate(args) {
|
|
201
|
+
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
202
|
+
return `${args.options.teamId} is not a valid GUID`;
|
|
203
|
+
}
|
|
204
|
+
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
205
|
+
return `${args.options.channelId} is not a valid Teams Channel ID`;
|
|
206
|
+
}
|
|
207
|
+
if (args.options.userId && !utils_1.validation.isValidGuid(args.options.userId)) {
|
|
208
|
+
return `${args.options.userId} is not a valid GUID`;
|
|
209
|
+
}
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
module.exports = new TeamsChannelMemberRemoveCommand();
|
|
214
|
+
//# sourceMappingURL=channel-member-remove.js.map
|
|
@@ -13,6 +13,7 @@ exports.default = {
|
|
|
13
13
|
CHANNEL_LIST: `${prefix} channel list`,
|
|
14
14
|
CHANNEL_MEMBER_ADD: `${prefix} channel member add`,
|
|
15
15
|
CHANNEL_MEMBER_LIST: `${prefix} channel member list`,
|
|
16
|
+
CHANNEL_MEMBER_REMOVE: `${prefix} channel member remove`,
|
|
16
17
|
CHANNEL_MEMBER_SET: `${prefix} channel member set`,
|
|
17
18
|
CHANNEL_REMOVE: `${prefix} channel remove`,
|
|
18
19
|
CHANNEL_SET: `${prefix} channel set`,
|
|
@@ -23,6 +24,7 @@ exports.default = {
|
|
|
23
24
|
CHAT_MESSAGE_SEND: `${prefix} chat message send`,
|
|
24
25
|
CONVERSATIONMEMBER_ADD: `${prefix} conversationmember add`,
|
|
25
26
|
CONVERSATIONMEMBER_LIST: `${prefix} conversationmember list`,
|
|
27
|
+
CONVERSATIONMEMBER_REMOVE: `${prefix} conversationmember remove`,
|
|
26
28
|
FUNSETTINGS_LIST: `${prefix} funsettings list`,
|
|
27
29
|
FUNSETTINGS_SET: `${prefix} funsettings set`,
|
|
28
30
|
GUESTSETTINGS_LIST: `${prefix} guestsettings list`,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# planner bucket set
|
|
2
|
+
|
|
3
|
+
Updates a Microsoft Planner bucket
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner bucket set [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --id [id]`
|
|
14
|
+
: ID of the bucket. Specify either `id` or `name` but not both.
|
|
15
|
+
|
|
16
|
+
`--name [name]`
|
|
17
|
+
: Name of the bucket. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`--planId [planId]`
|
|
20
|
+
: ID of the plan to update the bucket of. Use when referring to bucket using `name`. Specify either `planId` or `planName` but not both.
|
|
21
|
+
|
|
22
|
+
`--planName [planName]`
|
|
23
|
+
: Name of the plan to update the bucket of. Use when referring to bucket using `name`. Specify either `planId` or `planName` but not both.
|
|
24
|
+
|
|
25
|
+
`--ownerGroupId [ownerGroupId]`
|
|
26
|
+
: ID of the group to which the plan belongs. Use when referring to plan using `planName`. Specify `ownerGroupId` or `ownerGroupName`.
|
|
27
|
+
|
|
28
|
+
`--ownerGroupName [ownerGroupName]`
|
|
29
|
+
: Name of the group to which the plan belongs. Use when referring to plan using `planName`. Specify `ownerGroupId` or `ownerGroupName`.
|
|
30
|
+
|
|
31
|
+
`--newName [newName]`
|
|
32
|
+
: New name of the bucket.
|
|
33
|
+
|
|
34
|
+
`--orderHint [orderHint]`
|
|
35
|
+
: Hint used to order items of this type in a list view. The format is defined as outlined [here](https://docs.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0).
|
|
36
|
+
|
|
37
|
+
--8<-- "docs/cmd/_global.md"
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Updates the Microsoft Planner bucket with ID _vncYUXCRBke28qMLB-d4xJcACtNz_
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 planner bucket set --id "vncYUXCRBke28qMLB-d4xJcACtNz" --newName "New bucket name"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group _My Group_
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupName "My Group" --newName "New bucket name"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group with ID _00000000-0000-0000-0000-000000000000_
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupId 00000000-0000-0000-0000-000000000000 --newName "New bucket name"
|
|
57
|
+
```
|
|
@@ -23,10 +23,10 @@ m365 planner task set [options]
|
|
|
23
23
|
: Name of the bucket to move the task to. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
|
|
24
24
|
|
|
25
25
|
`--planId [planId]`
|
|
26
|
-
: ID of the plan to
|
|
26
|
+
: ID of the plan to which the bucket belongs to. Specify either `planId` or `planName` when using `bucketName`.
|
|
27
27
|
|
|
28
28
|
`--planName [planName]`
|
|
29
|
-
: Name of the plan to
|
|
29
|
+
: Name of the plan to which the bucket belongs to. Specify either `planId` or `planName` when using `bucketName`.
|
|
30
30
|
|
|
31
31
|
`--ownerGroupId [ownerGroupId]`
|
|
32
32
|
: ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
@@ -32,7 +32,7 @@ m365 spfx project upgrade [options]
|
|
|
32
32
|
|
|
33
33
|
## Remarks
|
|
34
34
|
|
|
35
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.14.0). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.15.0-beta.
|
|
35
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.14.0). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.15.0-beta.6.
|
|
36
36
|
|
|
37
37
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
38
38
|
|
|
@@ -37,7 +37,7 @@ This commands helps you to verify if your environment meets all prerequisites fo
|
|
|
37
37
|
|
|
38
38
|
The command starts by detecting the version of SharePoint Framework that you want to use. First, it looks at the current project. If you didn't run the command in the context of a SharePoint Framework project, the command will try to determine the SharePoint Framework version based on the SharePoint Framework Yeoman generator that you have installed either in the current directory or globally.
|
|
39
39
|
|
|
40
|
-
Based on the determined version of the SharePoint Framework, the command will look at other dependencies such as Node.js, npm, Yeoman, Gulp
|
|
40
|
+
Based on the determined version of the SharePoint Framework, the command will look at other dependencies such as Node.js, npm, Yeoman, Gulp and TypeScript to verify if their meet the requirements of that particular version of the SharePoint Framework.
|
|
41
41
|
|
|
42
42
|
If you miss any required tools or use a version that doesn't meet the SharePoint Framework requirements, the command will give you a list of recommendation how to address these issues.
|
|
43
43
|
|
|
@@ -13,10 +13,10 @@ m365 spo listitem list [options]
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
14
|
: URL of the site from which the item should be retrieved
|
|
15
15
|
|
|
16
|
-
`-i, --id
|
|
16
|
+
`-i, --id [id]`
|
|
17
17
|
: ID of the list to retrieve items from. Specify `id` or `title` but not both
|
|
18
18
|
|
|
19
|
-
`-t, --title [
|
|
19
|
+
`-t, --title [title]`
|
|
20
20
|
: Title of the list from which to retrieve the item. Specify `id` or `title` but not both
|
|
21
21
|
|
|
22
22
|
`-q, --camlQuery [camlQuery]`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# teams channel member remove
|
|
2
|
+
|
|
3
|
+
Remove the specified member from the specified Microsoft Teams private team channel
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 teams channel member remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Alias
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
m365 teams conversationmember remove [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
`--teamId [teamId]`
|
|
20
|
+
: The Id of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
|
|
21
|
+
|
|
22
|
+
`--teamName [teamName]`
|
|
23
|
+
: The display name of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
|
|
24
|
+
|
|
25
|
+
`--channelId [channelId]`
|
|
26
|
+
: The Id of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
|
|
27
|
+
|
|
28
|
+
`--channelName [channelName]`
|
|
29
|
+
: The display name of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
|
|
30
|
+
|
|
31
|
+
`--userName [userName]`
|
|
32
|
+
: User's UPN (user principal name, e.g. johndoe@example.com). Specify either userName, userId or id but not multiple.
|
|
33
|
+
|
|
34
|
+
`--userId [userId]`
|
|
35
|
+
: User's Azure AD Id. Specify either userName, userId or id but not multiple.
|
|
36
|
+
|
|
37
|
+
`--id [id]`
|
|
38
|
+
: Channel member Id of a user. Specify either userName, userId or id but not multiple.
|
|
39
|
+
|
|
40
|
+
`--confirm`
|
|
41
|
+
: Don't prompt for confirmation
|
|
42
|
+
|
|
43
|
+
--8<-- "docs/cmd/_global.md"
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
Remove the user _johndoe@example.com_ from the Microsoft Teams team with id 00000000-0000-0000-0000-000000000000 and channel id 00:00000000000000000000000000000000@thread.skype
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 teams channel member remove --teamId 00000000-0000-0000-0000-000000000000 --channelId 00:00000000000000000000000000000000@thread.skype --userName "johndoe@example.com"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Remove the user with id 00000000-0000-0000-0000-000000000000 from the Microsoft Teams team with name _Team Name_ and channel with name _Channel Name_
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 teams channel member remove --teamName "Team Name" --channelName "Channel Name" --userId 00000000-0000-0000-0000-000000000000
|
|
57
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "5.2.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
86
|
"contributors": [
|
|
87
|
+
"Abhishek K M <67158080+Sync271@users.noreply.github.com>",
|
|
87
88
|
"Ågren, Simon <simon.agren@sogeti.com>",
|
|
88
89
|
"Akash Karda <akashkarda@gmail.com>",
|
|
89
90
|
"Albany, Bruce <bruce.albany@gmail.com>",
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
"Harding, Phil <pil.harding@platinumdogs.co.uk>",
|
|
112
113
|
"Hawrylak, Paweł <phawrylak@outlook.com>",
|
|
113
114
|
"Holemans, Milan <Milan.Holemans@vanroey.be>",
|
|
115
|
+
"Honen, Nicholas <nickhonen@gmail.com>",
|
|
114
116
|
"Högberg, Joakim <joakim.hogberg@bravero.se>",
|
|
115
117
|
"Hvam, Allan <ahp@delegate.dk>",
|
|
116
118
|
"Jaakke, Robert <robert.jaakke@mavention.nl>",
|
|
@@ -232,4 +234,4 @@
|
|
|
232
234
|
"sinon": "^13.0.1",
|
|
233
235
|
"source-map-support": "^0.5.21"
|
|
234
236
|
}
|
|
235
|
-
}
|
|
237
|
+
}
|