@pnp/cli-microsoft365 4.3.0-beta.014ebf5 → 4.3.0-beta.a75b394

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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/dist/Utils.js +3 -0
  3. package/dist/appInsights.js +3 -2
  4. package/dist/cli/Cli.js +22 -3
  5. package/dist/m365/aad/commands/user/user-get.js +33 -6
  6. package/dist/m365/aad/commands/user/user-password-validate.js +42 -0
  7. package/dist/m365/aad/commands.js +1 -0
  8. package/dist/m365/app/commands/permission/permission-list.js +266 -0
  9. package/dist/m365/app/commands.js +7 -0
  10. package/dist/m365/base/AppCommand.js +76 -0
  11. package/dist/m365/cli/commands/cli-doctor.js +2 -0
  12. package/dist/m365/pa/commands/app/app-list.js +28 -1
  13. package/dist/m365/planner/commands/task/task-add.js +288 -0
  14. package/dist/m365/planner/commands.js +1 -0
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +63 -0
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +60 -0
  17. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0-beta.4.js +57 -0
  18. package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
  19. package/dist/m365/spo/commands/site/site-ensure.js +1 -1
  20. package/dist/request.js +9 -4
  21. package/docs/docs/cmd/_global.md +2 -2
  22. package/docs/docs/cmd/aad/user/user-get.md +13 -4
  23. package/docs/docs/cmd/aad/user/user-password-validate.md +29 -0
  24. package/docs/docs/cmd/app/permission/permission-list.md +36 -0
  25. package/docs/docs/cmd/pa/app/app-list.md +17 -1
  26. package/docs/docs/cmd/planner/task/task-add.md +78 -0
  27. package/docs/docs/cmd/spfx/project/project-externalize.md +1 -1
  28. package/docs/docs/cmd/spfx/project/project-rename.md +1 -1
  29. package/docs/docs/cmd/spfx/spfx-doctor.md +1 -1
  30. package/npm-shrinkwrap.json +601 -741
  31. package/package.json +19 -15
@@ -0,0 +1,288 @@
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 PlannerTaskAddCommand extends GraphCommand_1.default {
8
+ get name() {
9
+ return commands_1.default.TASK_ADD;
10
+ }
11
+ get description() {
12
+ return 'Adds a new Microsoft Planner Task';
13
+ }
14
+ getTelemetryProperties(args) {
15
+ const telemetryProps = super.getTelemetryProperties(args);
16
+ telemetryProps.planId = typeof args.options.planId !== 'undefined';
17
+ telemetryProps.planName = typeof args.options.planName !== 'undefined';
18
+ telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
19
+ telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
20
+ telemetryProps.bucketId = typeof args.options.bucketId !== 'undefined';
21
+ telemetryProps.bucketName = typeof args.options.bucketName !== 'undefined';
22
+ telemetryProps.startDateTime = typeof args.options.startDateTime !== 'undefined';
23
+ telemetryProps.dueDateTime = typeof args.options.dueDateTime !== 'undefined';
24
+ telemetryProps.percentComplete = typeof args.options.percentComplete !== 'undefined';
25
+ telemetryProps.assignedToUserIds = typeof args.options.assignedToUserIds !== 'undefined';
26
+ telemetryProps.assignedToUserNames = typeof args.options.assignedToUserNames !== 'undefined';
27
+ telemetryProps.description = typeof args.options.description !== 'undefined';
28
+ telemetryProps.orderHint = typeof args.options.orderHint !== 'undefined';
29
+ return telemetryProps;
30
+ }
31
+ commandAction(logger, args, cb) {
32
+ this
33
+ .getPlanId(args)
34
+ .then(planId => {
35
+ this.planId = planId;
36
+ return this.getBucketId(args, planId);
37
+ })
38
+ .then(bucketId => {
39
+ this.bucketId = bucketId;
40
+ return this.generateUserAssignments(args);
41
+ })
42
+ .then(assignments => {
43
+ const requestOptions = {
44
+ url: `${this.resource}/v1.0/planner/tasks`,
45
+ headers: {
46
+ 'accept': 'application/json;odata.metadata=none'
47
+ },
48
+ responseType: 'json',
49
+ data: {
50
+ planId: this.planId,
51
+ bucketId: this.bucketId,
52
+ title: args.options.title,
53
+ startDateTime: args.options.startDateTime,
54
+ dueDateTime: args.options.dueDateTime,
55
+ percentComplete: args.options.percentComplete,
56
+ assignments: assignments,
57
+ orderHint: args.options.orderHint
58
+ }
59
+ };
60
+ return request_1.default.post(requestOptions);
61
+ })
62
+ .then(newTask => this.updateTaskDetails(args.options, newTask))
63
+ .then((res) => {
64
+ logger.log(res);
65
+ cb();
66
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
67
+ }
68
+ getTaskDetailsEtag(taskId) {
69
+ const requestOptions = {
70
+ url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(taskId)}/details`,
71
+ headers: {
72
+ accept: 'application/json'
73
+ },
74
+ responseType: 'json'
75
+ };
76
+ return request_1.default
77
+ .get(requestOptions)
78
+ .then((response) => {
79
+ const etag = response ? response['@odata.etag'] : undefined;
80
+ if (!etag) {
81
+ return Promise.reject(`Error fetching task details`);
82
+ }
83
+ return Promise.resolve(etag);
84
+ });
85
+ }
86
+ updateTaskDetails(options, newTask) {
87
+ const taskId = newTask.id;
88
+ if (!options.description) {
89
+ return Promise.resolve(newTask);
90
+ }
91
+ return this
92
+ .getTaskDetailsEtag(taskId)
93
+ .then(etag => {
94
+ const requestOptionsTaskDetails = {
95
+ url: `${this.resource}/v1.0/planner/tasks/${taskId}/details`,
96
+ headers: {
97
+ 'accept': 'application/json;odata.metadata=none',
98
+ 'If-Match': etag,
99
+ 'Prefer': 'return=representation'
100
+ },
101
+ responseType: 'json',
102
+ data: {
103
+ description: options.description
104
+ }
105
+ };
106
+ return request_1.default.patch(requestOptionsTaskDetails);
107
+ })
108
+ .then(taskDetails => {
109
+ return Object.assign(Object.assign({}, newTask), taskDetails);
110
+ });
111
+ }
112
+ generateUserAssignments(args) {
113
+ const assignments = {};
114
+ if (!args.options.assignedToUserIds && !args.options.assignedToUserNames) {
115
+ return Promise.resolve(assignments);
116
+ }
117
+ return this
118
+ .getUserIds(args.options)
119
+ .then((userIds) => {
120
+ userIds.map(x => assignments[x] = {
121
+ '@odata.type': '#microsoft.graph.plannerAssignment',
122
+ orderHint: ' !'
123
+ });
124
+ return Promise.resolve(assignments);
125
+ });
126
+ }
127
+ getBucketId(args, planId) {
128
+ if (args.options.bucketId) {
129
+ return Promise.resolve(args.options.bucketId);
130
+ }
131
+ const requestOptions = {
132
+ url: `${this.resource}/v1.0/planner/plans/${planId}/buckets`,
133
+ headers: {
134
+ accept: 'application/json;odata.metadata=none'
135
+ },
136
+ responseType: 'json'
137
+ };
138
+ return request_1.default
139
+ .get(requestOptions)
140
+ .then((response) => {
141
+ const bucket = response.value.find(val => val.name === args.options.bucketName);
142
+ if (!bucket) {
143
+ return Promise.reject(`The specified bucket does not exist`);
144
+ }
145
+ return Promise.resolve(bucket.id);
146
+ });
147
+ }
148
+ getPlanId(args) {
149
+ if (args.options.planId) {
150
+ return Promise.resolve(args.options.planId);
151
+ }
152
+ return this
153
+ .getGroupId(args)
154
+ .then((groupId) => {
155
+ const requestOptions = {
156
+ url: `${this.resource}/v1.0/planner/plans?$filter=(owner eq '${groupId}')`,
157
+ headers: {
158
+ accept: 'application/json;odata.metadata=none'
159
+ },
160
+ responseType: 'json'
161
+ };
162
+ return request_1.default.get(requestOptions);
163
+ }).then((response) => {
164
+ const plan = response.value.find(val => val.title === args.options.planName);
165
+ if (!plan) {
166
+ return Promise.reject(`The specified plan does not exist`);
167
+ }
168
+ return Promise.resolve(plan.id);
169
+ });
170
+ }
171
+ getGroupId(args) {
172
+ if (args.options.ownerGroupId) {
173
+ return Promise.resolve(args.options.ownerGroupId);
174
+ }
175
+ const requestOptions = {
176
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.ownerGroupName)}'`,
177
+ headers: {
178
+ accept: 'application/json;odata.metadata=none'
179
+ },
180
+ responseType: 'json'
181
+ };
182
+ return request_1.default
183
+ .get(requestOptions)
184
+ .then(response => {
185
+ const group = response.value[0];
186
+ if (!group) {
187
+ return Promise.reject(`The specified owner group does not exist`);
188
+ }
189
+ return Promise.resolve(group.id);
190
+ });
191
+ }
192
+ getUserIds(options) {
193
+ if (options.assignedToUserIds) {
194
+ return Promise.resolve(options.assignedToUserIds.split(','));
195
+ }
196
+ // Hitting this section means assignedToUserNames won't be undefined
197
+ const userNames = options.assignedToUserNames;
198
+ const userArr = userNames.split(',').map(o => o.trim());
199
+ let userIds = [];
200
+ const promises = userArr.map(user => {
201
+ const requestOptions = {
202
+ url: `${this.resource}/v1.0/users?$filter=userPrincipalName eq '${Utils_1.default.encodeQueryParameter(user)}'&$select=id,userPrincipalName`,
203
+ headers: {
204
+ 'content-type': 'application/json'
205
+ },
206
+ responseType: 'json'
207
+ };
208
+ return request_1.default.get(requestOptions);
209
+ });
210
+ return Promise
211
+ .all(promises)
212
+ .then((usersRes) => {
213
+ let userUpns = [];
214
+ userUpns = usersRes.map(res => { var _a; return (_a = res.value[0]) === null || _a === void 0 ? void 0 : _a.userPrincipalName; });
215
+ userIds = usersRes.map(res => { var _a; return (_a = res.value[0]) === null || _a === void 0 ? void 0 : _a.id; });
216
+ // Find the members where no graph response was found
217
+ const invalidUsers = userArr.filter(user => !userUpns.some((upn) => (upn === null || upn === void 0 ? void 0 : upn.toLowerCase()) === user.toLowerCase()));
218
+ if (invalidUsers && invalidUsers.length > 0) {
219
+ return Promise.reject(`Cannot proceed with planner task creation. The following users provided are invalid : ${invalidUsers.join(',')}`);
220
+ }
221
+ return Promise.resolve(userIds);
222
+ });
223
+ }
224
+ options() {
225
+ const options = [
226
+ { option: '-t, --title <title>' },
227
+ { option: '--planId [planId]' },
228
+ { option: '--planName [planName]' },
229
+ { option: '--ownerGroupId [ownerGroupId]' },
230
+ { option: '--ownerGroupName [ownerGroupName]' },
231
+ { option: '--bucketId [bucketId]' },
232
+ { option: '--bucketName [bucketName]' },
233
+ { option: '--startDateTime [startDateTime]' },
234
+ { option: '--dueDateTime [dueDateTime]' },
235
+ { option: '--percentComplete [percentComplete]' },
236
+ { option: '--assignedToUserIds [assignedToUserIds]' },
237
+ { option: '--assignedToUserNames [assignedToUserNames]' },
238
+ { option: '--description [description]' },
239
+ { option: '--orderHint [orderHint]' }
240
+ ];
241
+ const parentOptions = super.options();
242
+ return options.concat(parentOptions);
243
+ }
244
+ validate(args) {
245
+ if (!args.options.planId && !args.options.planName) {
246
+ return 'Specify either planId or planName';
247
+ }
248
+ if (args.options.planId && args.options.planName) {
249
+ return 'Specify either planId or planName but not both';
250
+ }
251
+ if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
252
+ return 'Specify either ownerGroupId or ownerGroupName when using planName';
253
+ }
254
+ if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
255
+ return 'Specify either ownerGroupId or ownerGroupName when using planName but not both';
256
+ }
257
+ if (args.options.ownerGroupId && !Utils_1.default.isValidGuid(args.options.ownerGroupId)) {
258
+ return `${args.options.ownerGroupId} is not a valid GUID`;
259
+ }
260
+ if (!args.options.bucketId && !args.options.bucketName) {
261
+ return 'Specify either bucketId or bucketName';
262
+ }
263
+ if (args.options.bucketId && args.options.bucketName) {
264
+ return 'Specify either bucketId or bucketName but not both';
265
+ }
266
+ if (args.options.startDateTime && !Utils_1.default.isValidISODateTime(args.options.startDateTime)) {
267
+ return 'The startDateTime is not a valid ISO date string';
268
+ }
269
+ if (args.options.dueDateTime && !Utils_1.default.isValidISODateTime(args.options.dueDateTime)) {
270
+ return 'The dueDateTime is not a valid ISO date string';
271
+ }
272
+ if (args.options.percentComplete && isNaN(args.options.percentComplete)) {
273
+ return `percentComplete is not a number`;
274
+ }
275
+ if (args.options.percentComplete && (args.options.percentComplete < 0 || args.options.percentComplete > 100)) {
276
+ return `percentComplete should be between 0 and 100 `;
277
+ }
278
+ if (args.options.assignedToUserIds && !Utils_1.default.isValidGuidArray(args.options.assignedToUserIds.split(','))) {
279
+ return 'assignedToUserIds contains invalid GUID';
280
+ }
281
+ if (args.options.assignedToUserIds && args.options.assignedToUserNames) {
282
+ return 'Specify either assignedToUserIds or assignedToUserNames but not both';
283
+ }
284
+ return true;
285
+ }
286
+ }
287
+ module.exports = new PlannerTaskAddCommand();
288
+ //# sourceMappingURL=task-add.js.map
@@ -7,6 +7,7 @@ exports.default = {
7
7
  PLAN_ADD: `${prefix} plan add`,
8
8
  PLAN_GET: `${prefix} plan get`,
9
9
  PLAN_LIST: `${prefix} plan list`,
10
+ TASK_ADD: `${prefix} task add`,
10
11
  TASK_LIST: `${prefix} task list`
11
12
  };
12
13
  //# sourceMappingURL=commands.js.map
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN006005_CFG_PS_metadata = void 0;
4
+ const JsonRule_1 = require("./JsonRule");
5
+ class FN006005_CFG_PS_metadata extends JsonRule_1.JsonRule {
6
+ constructor() {
7
+ super();
8
+ }
9
+ get id() {
10
+ return 'FN006005';
11
+ }
12
+ get title() {
13
+ return 'package-solution.json metadata';
14
+ }
15
+ get description() {
16
+ return `In package-solution.json add metadata section`;
17
+ }
18
+ get resolution() {
19
+ return '';
20
+ }
21
+ get resolutionType() {
22
+ return 'json';
23
+ }
24
+ get severity() {
25
+ return 'Required';
26
+ }
27
+ get file() {
28
+ return './config/package-solution.json';
29
+ }
30
+ visit(project, findings) {
31
+ var _a;
32
+ if (!project.packageSolutionJson ||
33
+ !project.packageSolutionJson.solution) {
34
+ return;
35
+ }
36
+ if (!project.packageSolutionJson.solution.metadata) {
37
+ const solutionDescription = `${(_a = project.packageJson) === null || _a === void 0 ? void 0 : _a.name} description`;
38
+ const resolution = {
39
+ solution: {
40
+ metadata: {
41
+ shortDescription: {
42
+ default: solutionDescription
43
+ },
44
+ longDescription: {
45
+ default: solutionDescription
46
+ },
47
+ screenshotPaths: [],
48
+ videoUrl: '',
49
+ categories: []
50
+ }
51
+ }
52
+ };
53
+ const node = this.getAstNodeFromFile(project.packageSolutionJson, 'solution');
54
+ this.addFindingWithOccurrences([{
55
+ file: this.file,
56
+ resolution: JSON.stringify(resolution, null, 2),
57
+ position: this.getPositionFromNode(node)
58
+ }], findings);
59
+ }
60
+ }
61
+ }
62
+ exports.FN006005_CFG_PS_metadata = FN006005_CFG_PS_metadata;
63
+ //# sourceMappingURL=FN006005_CFG_PS_metadata.js.map
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN006006_CFG_PS_features = void 0;
4
+ const JsonRule_1 = require("./JsonRule");
5
+ const uuid_1 = require("uuid");
6
+ class FN006006_CFG_PS_features extends JsonRule_1.JsonRule {
7
+ constructor() {
8
+ super();
9
+ }
10
+ get id() {
11
+ return 'FN006006';
12
+ }
13
+ get title() {
14
+ return 'package-solution.json features';
15
+ }
16
+ get description() {
17
+ return `In package-solution.json add features section`;
18
+ }
19
+ get resolution() {
20
+ return '';
21
+ }
22
+ get resolutionType() {
23
+ return 'json';
24
+ }
25
+ get severity() {
26
+ return 'Required';
27
+ }
28
+ get file() {
29
+ return './config/package-solution.json';
30
+ }
31
+ visit(project, findings) {
32
+ var _a, _b;
33
+ if (!project.packageSolutionJson ||
34
+ !project.packageSolutionJson.solution) {
35
+ return;
36
+ }
37
+ if (!project.packageSolutionJson.solution.features) {
38
+ const resolution = {
39
+ solution: {
40
+ features: [
41
+ {
42
+ title: `${(_a = project.packageJson) === null || _a === void 0 ? void 0 : _a.name} Feature`,
43
+ description: `The feature that activates elements of the ${(_b = project.packageJson) === null || _b === void 0 ? void 0 : _b.name} solution.`,
44
+ id: (0, uuid_1.v4)(),
45
+ version: project.packageSolutionJson.solution.version
46
+ }
47
+ ]
48
+ }
49
+ };
50
+ const node = this.getAstNodeFromFile(project.packageSolutionJson, 'solution');
51
+ this.addFindingWithOccurrences([{
52
+ file: this.file,
53
+ resolution: JSON.stringify(resolution, null, 2),
54
+ position: this.getPositionFromNode(node)
55
+ }], findings);
56
+ }
57
+ }
58
+ }
59
+ exports.FN006006_CFG_PS_features = FN006006_CFG_PS_features;
60
+ //# sourceMappingURL=FN006006_CFG_PS_features.js.map
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_microsoft_sp_core_library");
4
+ const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
5
+ const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
6
+ const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
7
+ const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
8
+ const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
9
+ const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
10
+ const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
11
+ const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
12
+ const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
13
+ const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
14
+ const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
15
+ const FN001026_DEP_microsoft_sp_extension_base_1 = require("./rules/FN001026_DEP_microsoft_sp_extension_base");
16
+ const FN001027_DEP_microsoft_sp_http_1 = require("./rules/FN001027_DEP_microsoft_sp_http");
17
+ const FN001028_DEP_microsoft_sp_list_subscription_1 = require("./rules/FN001028_DEP_microsoft_sp_list_subscription");
18
+ const FN001029_DEP_microsoft_sp_loader_1 = require("./rules/FN001029_DEP_microsoft_sp_loader");
19
+ const FN001030_DEP_microsoft_sp_module_interfaces_1 = require("./rules/FN001030_DEP_microsoft_sp_module_interfaces");
20
+ const FN001031_DEP_microsoft_sp_odata_types_1 = require("./rules/FN001031_DEP_microsoft_sp_odata_types");
21
+ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_microsoft_sp_page_context");
22
+ const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
23
+ const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
24
+ const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
25
+ const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
26
+ const FN006005_CFG_PS_metadata_1 = require("./rules/FN006005_CFG_PS_metadata");
27
+ const FN006006_CFG_PS_features_1 = require("./rules/FN006006_CFG_PS_features");
28
+ const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
29
+ module.exports = [
30
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.14.0-beta.4'),
31
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.14.0-beta.4'),
32
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.14.0-beta.4'),
33
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.14.0-beta.4'),
34
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.14.0-beta.4'),
35
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.14.0-beta.4'),
36
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.14.0-beta.4'),
37
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.14.0-beta.4'),
38
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.14.0-beta.4'),
39
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.14.0-beta.4'),
40
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.14.0-beta.4'),
41
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.14.0-beta.4'),
42
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.14.0-beta.4'),
43
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.14.0-beta.4'),
44
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.14.0-beta.4'),
45
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.14.0-beta.4'),
46
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
47
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.14.0-beta.4'),
48
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.14.0-beta.4'),
49
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0-beta.4'),
50
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
51
+ new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0-beta.4'),
52
+ new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0-beta.4'),
53
+ new FN006005_CFG_PS_metadata_1.FN006005_CFG_PS_metadata(),
54
+ new FN006006_CFG_PS_features_1.FN006006_CFG_PS_features(),
55
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.14.0-beta.4')
56
+ ];
57
+ //# sourceMappingURL=upgrade-1.14.0-beta.4.js.map
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const fs = require("fs");
4
4
  const os = require("os");
5
5
  const path = require("path");
6
+ // uncomment to support upgrading to preview releases
7
+ const semver_1 = require("semver");
6
8
  const Command_1 = require("../../../../Command");
7
9
  const commands_1 = require("../../commands");
8
10
  const base_project_command_1 = require("./base-project-command");
@@ -42,7 +44,8 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
42
44
  '1.12.0',
43
45
  '1.12.1',
44
46
  '1.13.0',
45
- '1.13.1'
47
+ '1.13.1',
48
+ '1.14.0-beta.4'
46
49
  ];
47
50
  }
48
51
  get name() {
@@ -55,9 +58,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
55
58
  const telemetryProps = super.getTelemetryProperties(args);
56
59
  telemetryProps.toVersion = args.options.toVersion || this.supportedVersions[this.supportedVersions.length - 1];
57
60
  // uncomment to support upgrading to preview releases
58
- // if (prerelease(telemetryProps.toVersion) && !args.options.preview) {
59
- // telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
60
- // }
61
+ if ((0, semver_1.prerelease)(telemetryProps.toVersion) && !args.options.preview) {
62
+ telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
63
+ }
61
64
  telemetryProps.packageManager = args.options.packageManager || 'npm';
62
65
  telemetryProps.shell = args.options.shell || 'bash';
63
66
  telemetryProps.preview = args.options.preview;
@@ -71,15 +74,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
71
74
  }
72
75
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
73
76
  // uncomment to support upgrading to preview releases
74
- // if (!args.options.toVersion &&
75
- // !args.options.preview &&
76
- // prerelease(this.toVersion)) {
77
- // // no version and no preview specified while the current version to
78
- // // upgrade to is a prerelease so let's grab the first non-preview version
79
- // // since we're supporting only one preview version, it's sufficient for
80
- // // us to take second to last version
81
- // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
82
- // }
77
+ if (!args.options.toVersion &&
78
+ !args.options.preview &&
79
+ (0, semver_1.prerelease)(this.toVersion)) {
80
+ // no version and no preview specified while the current version to
81
+ // upgrade to is a prerelease so let's grab the first non-preview version
82
+ // since we're supporting only one preview version, it's sufficient for
83
+ // us to take second to last version
84
+ this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
85
+ }
83
86
  this.packageManager = args.options.packageManager || 'npm';
84
87
  this.shell = args.options.shell || 'bash';
85
88
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -59,7 +59,7 @@ class SpoSiteEnsureCommand extends SpoCommand_1.default {
59
59
  if (this.debug) {
60
60
  logger.logToStderr(err.stderr);
61
61
  }
62
- if (err.error.message !== 'Request failed with status code 404') {
62
+ if (err.error.message !== '404 FILE NOT FOUND') {
63
63
  return Promise.reject(err);
64
64
  }
65
65
  if (this.verbose) {
package/dist/request.js CHANGED
@@ -16,7 +16,9 @@ class Request {
16
16
  decompress: true,
17
17
  responseType: 'text',
18
18
  /* c8 ignore next */
19
- transformResponse: [data => data]
19
+ transformResponse: [data => data],
20
+ maxBodyLength: Infinity,
21
+ maxContentLength: Infinity
20
22
  });
21
23
  // since we're stubbing requests, request interceptor is never called in
22
24
  // tests, so let's exclude it from coverage
@@ -64,7 +66,7 @@ class Request {
64
66
  });
65
67
  // since we're stubbing requests, response interceptor is never called in
66
68
  // tests, so let's exclude it from coverage
67
- /* c8 ignore next 22 */
69
+ /* c8 ignore next 26 */
68
70
  this.req.interceptors.response.use((response) => {
69
71
  if (this._logger) {
70
72
  this._logger.logToStderr('Response:');
@@ -73,19 +75,22 @@ class Request {
73
75
  response.headers['content-type'].indexOf('json') > -1) {
74
76
  properties.push('data');
75
77
  }
76
- this._logger.logToStderr(JSON.stringify(Utils_1.default.filterObject(response, properties), null, 2));
78
+ this._logger.logToStderr(JSON.stringify(Object.assign({ url: response.config.url }, Utils_1.default.filterObject(response, properties)), null, 2));
77
79
  }
78
80
  return response;
79
81
  }, (error) => {
80
82
  if (this._logger) {
81
83
  const properties = ['status', 'statusText', 'headers'];
82
84
  this._logger.logToStderr('Request error:');
83
- this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({}, Utils_1.default.filterObject(error.response, properties)), { error: error.error }), null, 2));
85
+ this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({ url: error.config.url }, Utils_1.default.filterObject(error.response, properties)), { error: error.error }), null, 2));
84
86
  }
85
87
  throw error;
86
88
  });
87
89
  }
88
90
  }
91
+ get logger() {
92
+ return this._logger;
93
+ }
89
94
  set logger(logger) {
90
95
  this._logger = logger;
91
96
  }
@@ -5,10 +5,10 @@
5
5
  : JMESPath query string. See [http://jmespath.org/](http://jmespath.org/) for more information and examples
6
6
 
7
7
  `-o, --output [output]`
8
- : Output type. `json,text`. Default `text`
8
+ : Output type. `json,text,csv`. Default `json`
9
9
 
10
10
  `--verbose`
11
11
  : Runs command with verbose logging
12
12
 
13
13
  `--debug`
14
- : Runs command with debug logging
14
+ : Runs command with debug logging
@@ -11,10 +11,13 @@ m365 aad user get [options]
11
11
  ## Options
12
12
 
13
13
  `-i, --id [id]`
14
- : The ID of the user to retrieve information for. Specify `id` or `userName` but not both
14
+ : The ID of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
15
15
 
16
16
  `-n, --userName [userName]`
17
- : The name of the user to retrieve information for. Specify `id` or `userName` but not both
17
+ : The name of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
18
+
19
+ `--email [email]`
20
+ : The email of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
18
21
 
19
22
  `-p, --properties [properties]`
20
23
  : Comma-separated list of properties to retrieve
@@ -23,9 +26,9 @@ m365 aad user get [options]
23
26
 
24
27
  ## Remarks
25
28
 
26
- You can retrieve information about a user, either by specifying that user's id or user name (`userPrincipalName`), but not both.
29
+ You can retrieve information about a user, either by specifying that user's id, user name (`userPrincipalName`), or email (`mail`), but not all.
27
30
 
28
- If the user with the specified id or user name doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
31
+ If the user with the specified id, user name, or email doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
29
32
 
30
33
  ## Examples
31
34
 
@@ -41,6 +44,12 @@ Get information about the user with user name _AarifS@contoso.onmicrosoft.com_
41
44
  m365 aad user get --userName AarifS@contoso.onmicrosoft.com
42
45
  ```
43
46
 
47
+ Get information about the user with email _AarifS@contoso.onmicrosoft.com_
48
+
49
+ ```sh
50
+ m365 aad user get --email AarifS@contoso.onmicrosoft.com
51
+ ```
52
+
44
53
  For the user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ retrieve the user name, e-mail address and full name
45
54
 
46
55
  ```sh