@pnp/cli-microsoft365 7.7.0 → 7.8.0-beta.4a6e6f7
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/cli/cli.js +21 -9
- package/dist/index.js +13 -12
- package/dist/m365/cli/commands/config/config-set.js +4 -0
- package/dist/m365/commands/setup.js +3 -3
- package/dist/m365/entra/commands/app/app-permission-add.js +25 -6
- package/dist/m365/entra/commands/app/app-permission-list.js +17 -5
- package/dist/m365/entra/commands/group/group-add.js +12 -14
- package/dist/m365/entra/commands/group/group-user-add.js +6 -7
- package/dist/m365/entra/commands/m365group/m365group-add.js +4 -2
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +6 -7
- package/dist/m365/flow/commands/run/run-list.js +25 -0
- package/dist/m365/outlook/commands/message/message-list.js +87 -17
- package/dist/m365/planner/commands/bucket/bucket-add.js +4 -7
- package/dist/m365/planner/commands/bucket/bucket-get.js +7 -30
- package/dist/m365/planner/commands/bucket/bucket-list.js +3 -6
- package/dist/m365/planner/commands/bucket/bucket-remove.js +8 -25
- package/dist/m365/planner/commands/bucket/bucket-set.js +12 -34
- package/dist/m365/planner/commands/plan/plan-add.js +17 -7
- package/dist/m365/planner/commands/plan/plan-get.js +12 -22
- package/dist/m365/planner/commands/plan/plan-list.js +1 -2
- package/dist/m365/planner/commands/plan/plan-remove.js +5 -3
- package/dist/m365/planner/commands/plan/plan-set.js +18 -10
- package/dist/m365/planner/commands/roster/roster-add.js +1 -2
- package/dist/m365/planner/commands/task/task-add.js +15 -21
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +1 -1
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +1 -1
- package/dist/m365/planner/commands/task/task-get.js +5 -26
- package/dist/m365/planner/commands/task/task-list.js +11 -37
- package/dist/m365/planner/commands/task/task-reference-remove.js +1 -1
- package/dist/m365/planner/commands/task/task-remove.js +12 -29
- package/dist/m365/planner/commands/task/task-set.js +15 -21
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.19.0-beta.0.js → doctor-1.19.0.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.19.0-beta.0.js → upgrade-1.19.0.js} +22 -22
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +222 -0
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +3 -2
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +3 -2
- package/dist/m365/spo/commands/site/site-add.js +17 -26
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +5 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +3 -2
- package/dist/m365/spo/commands/site/site-remove.js +129 -159
- package/dist/m365/spo/commands/site/site-set.js +9 -13
- package/dist/m365/spo/commands/spo-set.js +6 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +9 -13
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/meeting/meeting-add.js +3 -3
- package/dist/m365/teams/commands/team/team-add.js +22 -16
- package/dist/settingsNames.js +1 -0
- package/dist/utils/planner.js +87 -8
- package/dist/utils/spo.js +209 -278
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/validation.js +8 -5
- package/docs/docs/_clisettings.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +7 -4
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +14 -5
- package/docs/docs/cmd/entra/m365group/m365group-add.mdx +24 -24
- package/docs/docs/cmd/flow/run/run-list.mdx +74 -1
- package/docs/docs/cmd/outlook/message/message-list.mdx +18 -6
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +70 -0
- package/docs/docs/cmd/spo/site/site-remove.mdx +9 -19
- package/npm-shrinkwrap.json +170 -230
- package/package.json +17 -17
|
@@ -81,7 +81,7 @@ class PlannerTaskGetCommand extends GraphCommand {
|
|
|
81
81
|
}
|
|
82
82
|
if (tasks.length > 1) {
|
|
83
83
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', tasks);
|
|
84
|
-
const result =
|
|
84
|
+
const result = await cli.handleMultipleResultsFound(`Multiple tasks with title '${options.title}' found.`, resultAsKeyValuePair);
|
|
85
85
|
return result.id;
|
|
86
86
|
}
|
|
87
87
|
return tasks[0].id;
|
|
@@ -91,46 +91,25 @@ class PlannerTaskGetCommand extends GraphCommand {
|
|
|
91
91
|
return options.bucketId;
|
|
92
92
|
}
|
|
93
93
|
const planId = await this.getPlanId(options);
|
|
94
|
-
|
|
95
|
-
url: `${this.resource}/v1.0/planner/plans/${planId}/buckets?$select=id,name`,
|
|
96
|
-
headers: {
|
|
97
|
-
accept: 'application/json;odata.metadata=none'
|
|
98
|
-
},
|
|
99
|
-
responseType: 'json'
|
|
100
|
-
};
|
|
101
|
-
const response = await request.get(requestOptions);
|
|
102
|
-
const bucketName = options.bucketName;
|
|
103
|
-
const buckets = response.value.filter(val => val.name?.toLocaleLowerCase() === bucketName.toLocaleLowerCase());
|
|
104
|
-
if (!buckets.length) {
|
|
105
|
-
throw `The specified bucket ${options.bucketName} does not exist`;
|
|
106
|
-
}
|
|
107
|
-
if (buckets.length > 1) {
|
|
108
|
-
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', buckets);
|
|
109
|
-
const result = await cli.handleMultipleResultsFound(`Multiple buckets with name '${options.bucketName}' found.`, resultAsKeyValuePair);
|
|
110
|
-
return result.id;
|
|
111
|
-
}
|
|
112
|
-
return buckets[0].id;
|
|
94
|
+
return planner.getBucketIdByTitle(options.bucketName, planId);
|
|
113
95
|
}
|
|
114
96
|
async getPlanId(options) {
|
|
115
97
|
if (options.planId) {
|
|
116
98
|
return options.planId;
|
|
117
99
|
}
|
|
118
100
|
if (options.rosterId) {
|
|
119
|
-
|
|
120
|
-
return plan.id;
|
|
101
|
+
return planner.getPlanIdByRosterId(options.rosterId);
|
|
121
102
|
}
|
|
122
103
|
else {
|
|
123
104
|
const groupId = await this.getGroupId(options);
|
|
124
|
-
|
|
125
|
-
return plan.id;
|
|
105
|
+
return planner.getPlanIdByTitle(options.planTitle, groupId);
|
|
126
106
|
}
|
|
127
107
|
}
|
|
128
108
|
async getGroupId(options) {
|
|
129
109
|
if (options.ownerGroupId) {
|
|
130
110
|
return options.ownerGroupId;
|
|
131
111
|
}
|
|
132
|
-
|
|
133
|
-
return group.id;
|
|
112
|
+
return entraGroup.getGroupIdByDisplayName(options.ownerGroupName);
|
|
134
113
|
}
|
|
135
114
|
}
|
|
136
115
|
_PlannerTaskGetCommand_instances = new WeakSet(), _PlannerTaskGetCommand_initTelemetry = function _PlannerTaskGetCommand_initTelemetry() {
|
|
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _PlannerTaskListCommand_instances, _PlannerTaskListCommand_initTelemetry, _PlannerTaskListCommand_initOptions, _PlannerTaskListCommand_initValidators, _PlannerTaskListCommand_initOptionSets, _PlannerTaskListCommand_initTypes;
|
|
7
|
-
import request from '../../../../request.js';
|
|
8
7
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -37,37 +36,27 @@ class PlannerTaskListCommand extends GraphCommand {
|
|
|
37
36
|
const planTitle = args.options.planTitle;
|
|
38
37
|
let planId = args.options.planId;
|
|
39
38
|
let taskItems = [];
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
try {
|
|
40
|
+
if (bucketId || bucketName) {
|
|
42
41
|
bucketId = await this.getBucketId(args);
|
|
43
42
|
taskItems = await odata.getAllItems(`${this.resource}/v1.0/planner/buckets/${bucketId}/tasks`);
|
|
44
43
|
const betaTasks = await odata.getAllItems(`${this.resource}/beta/planner/buckets/${bucketId}/tasks`);
|
|
45
44
|
await logger.log(this.mergeTaskPriority(taskItems, betaTasks));
|
|
46
45
|
}
|
|
47
|
-
|
|
48
|
-
this.handleRejectedODataJsonPromise(err);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else if (planId || planTitle) {
|
|
52
|
-
try {
|
|
46
|
+
else if (planId || planTitle) {
|
|
53
47
|
planId = await this.getPlanId(args);
|
|
54
48
|
taskItems = await odata.getAllItems(`${this.resource}/v1.0/planner/plans/${planId}/tasks`);
|
|
55
49
|
const betaTasks = await odata.getAllItems(`${this.resource}/beta/planner/plans/${planId}/tasks`);
|
|
56
50
|
await logger.log(this.mergeTaskPriority(taskItems, betaTasks));
|
|
57
51
|
}
|
|
58
|
-
|
|
59
|
-
this.handleRejectedODataJsonPromise(err);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
try {
|
|
52
|
+
else {
|
|
64
53
|
taskItems = await odata.getAllItems(`${this.resource}/v1.0/me/planner/tasks`);
|
|
65
54
|
const betaTasks = await odata.getAllItems(`${this.resource}/beta/me/planner/tasks`);
|
|
66
55
|
await logger.log(this.mergeTaskPriority(taskItems, betaTasks));
|
|
67
56
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedODataJsonPromise(err);
|
|
71
60
|
}
|
|
72
61
|
}
|
|
73
62
|
async getBucketId(args) {
|
|
@@ -75,40 +64,25 @@ class PlannerTaskListCommand extends GraphCommand {
|
|
|
75
64
|
return formatting.encodeQueryParameter(args.options.bucketId);
|
|
76
65
|
}
|
|
77
66
|
const planId = await this.getPlanId(args);
|
|
78
|
-
|
|
79
|
-
url: `${this.resource}/v1.0/planner/plans/${planId}/buckets`,
|
|
80
|
-
headers: {
|
|
81
|
-
accept: 'application/json;odata.metadata=none'
|
|
82
|
-
},
|
|
83
|
-
responseType: 'json'
|
|
84
|
-
};
|
|
85
|
-
const response = await request.get(requestOptions);
|
|
86
|
-
const bucket = response.value.find(val => val.name === args.options.bucketName);
|
|
87
|
-
if (!bucket) {
|
|
88
|
-
throw `The specified bucket does not exist`;
|
|
89
|
-
}
|
|
90
|
-
return bucket.id;
|
|
67
|
+
return planner.getBucketIdByTitle(args.options.bucketName, planId);
|
|
91
68
|
}
|
|
92
69
|
async getPlanId(args) {
|
|
93
70
|
if (args.options.planId) {
|
|
94
71
|
return formatting.encodeQueryParameter(args.options.planId);
|
|
95
72
|
}
|
|
96
73
|
if (args.options.rosterId) {
|
|
97
|
-
|
|
98
|
-
return plan.id;
|
|
74
|
+
return planner.getPlanIdByRosterId(args.options.rosterId);
|
|
99
75
|
}
|
|
100
76
|
else {
|
|
101
77
|
const groupId = await this.getGroupId(args);
|
|
102
|
-
|
|
103
|
-
return plan.id;
|
|
78
|
+
return planner.getPlanIdByTitle(args.options.planTitle, groupId);
|
|
104
79
|
}
|
|
105
80
|
}
|
|
106
81
|
async getGroupId(args) {
|
|
107
82
|
if (args.options.ownerGroupId) {
|
|
108
83
|
return formatting.encodeQueryParameter(args.options.ownerGroupId);
|
|
109
84
|
}
|
|
110
|
-
|
|
111
|
-
return group.id;
|
|
85
|
+
return entraGroup.getGroupIdByDisplayName(args.options.ownerGroupName);
|
|
112
86
|
}
|
|
113
87
|
mergeTaskPriority(taskItems, betaTaskItems) {
|
|
114
88
|
const findBetaTask = (id) => betaTaskItems.find(task => task.id === id);
|
|
@@ -94,7 +94,7 @@ _PlannerTaskReferenceRemoveCommand_instances = new WeakSet(), _PlannerTaskRefere
|
|
|
94
94
|
Object.assign(this.telemetryProperties, {
|
|
95
95
|
url: typeof args.options.url !== 'undefined',
|
|
96
96
|
alias: typeof args.options.alias !== 'undefined',
|
|
97
|
-
force:
|
|
97
|
+
force: !!args.options.force
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
100
|
}, _PlannerTaskReferenceRemoveCommand_initOptions = function _PlannerTaskReferenceRemoveCommand_initOptions() {
|
|
@@ -33,6 +33,9 @@ class PlannerTaskRemoveCommand extends GraphCommand {
|
|
|
33
33
|
const removeTask = async () => {
|
|
34
34
|
try {
|
|
35
35
|
const task = await this.getTask(args.options);
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
await logger.logToStderr(`Removing task '${task.title}' ...`);
|
|
38
|
+
}
|
|
36
39
|
const requestOptions = {
|
|
37
40
|
url: `${this.resource}/v1.0/planner/tasks/${task.id}`,
|
|
38
41
|
headers: {
|
|
@@ -72,15 +75,15 @@ class PlannerTaskRemoveCommand extends GraphCommand {
|
|
|
72
75
|
const bucketId = await this.getBucketId(options);
|
|
73
76
|
// $filter is not working on the buckets/{bucketId}/tasks endpoint, hence it is not being used.
|
|
74
77
|
const tasks = await odata.getAllItems(`${this.resource}/v1.0/planner/buckets/${bucketId}/tasks?$select=title,id`, 'minimal');
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
78
|
+
const filteredTasks = tasks.filter(b => title.toLocaleLowerCase() === b.title.toLocaleLowerCase());
|
|
79
|
+
if (filteredTasks.length === 0) {
|
|
77
80
|
throw `The specified task ${title} does not exist`;
|
|
78
81
|
}
|
|
79
|
-
if (
|
|
80
|
-
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id',
|
|
82
|
+
if (filteredTasks.length > 1) {
|
|
83
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', filteredTasks);
|
|
81
84
|
return await cli.handleMultipleResultsFound(`Multiple tasks with title '${title}' found.`, resultAsKeyValuePair);
|
|
82
85
|
}
|
|
83
|
-
return
|
|
86
|
+
return filteredTasks[0];
|
|
84
87
|
}
|
|
85
88
|
async getBucketId(options) {
|
|
86
89
|
const { bucketId, bucketName } = options;
|
|
@@ -88,24 +91,7 @@ class PlannerTaskRemoveCommand extends GraphCommand {
|
|
|
88
91
|
return bucketId;
|
|
89
92
|
}
|
|
90
93
|
const planId = await this.getPlanId(options);
|
|
91
|
-
|
|
92
|
-
url: `${this.resource}/v1.0/planner/plans/${planId}/buckets?$select=id,name`,
|
|
93
|
-
headers: {
|
|
94
|
-
accept: 'application/json;odata.metadata=none'
|
|
95
|
-
},
|
|
96
|
-
responseType: 'json'
|
|
97
|
-
};
|
|
98
|
-
const buckets = await request.get(requestOptions);
|
|
99
|
-
const filteredBuckets = buckets.value.filter(b => bucketName.toLocaleLowerCase() === b.name.toLocaleLowerCase());
|
|
100
|
-
if (filteredBuckets.length === 0) {
|
|
101
|
-
throw `The specified bucket ${bucketName} does not exist`;
|
|
102
|
-
}
|
|
103
|
-
if (filteredBuckets.length > 1) {
|
|
104
|
-
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', filteredBuckets);
|
|
105
|
-
const result = await cli.handleMultipleResultsFound(`Multiple buckets with name '${bucketName}' found.`, resultAsKeyValuePair);
|
|
106
|
-
return result.id;
|
|
107
|
-
}
|
|
108
|
-
return filteredBuckets[0].id;
|
|
94
|
+
return planner.getBucketIdByTitle(bucketName, planId);
|
|
109
95
|
}
|
|
110
96
|
async getPlanId(options) {
|
|
111
97
|
const { planId, planTitle, rosterId } = options;
|
|
@@ -113,13 +99,11 @@ class PlannerTaskRemoveCommand extends GraphCommand {
|
|
|
113
99
|
return planId;
|
|
114
100
|
}
|
|
115
101
|
if (options.rosterId) {
|
|
116
|
-
|
|
117
|
-
return plan.id;
|
|
102
|
+
return planner.getPlanIdByRosterId(rosterId);
|
|
118
103
|
}
|
|
119
104
|
else {
|
|
120
105
|
const groupId = await this.getGroupId(options);
|
|
121
|
-
|
|
122
|
-
return plan.id;
|
|
106
|
+
return planner.getPlanIdByTitle(planTitle, groupId);
|
|
123
107
|
}
|
|
124
108
|
}
|
|
125
109
|
async getGroupId(options) {
|
|
@@ -127,8 +111,7 @@ class PlannerTaskRemoveCommand extends GraphCommand {
|
|
|
127
111
|
if (ownerGroupId) {
|
|
128
112
|
return ownerGroupId;
|
|
129
113
|
}
|
|
130
|
-
|
|
131
|
-
return group.id;
|
|
114
|
+
return entraGroup.getGroupIdByDisplayName(ownerGroupName);
|
|
132
115
|
}
|
|
133
116
|
}
|
|
134
117
|
_PlannerTaskRemoveCommand_instances = new WeakSet(), _PlannerTaskRemoveCommand_initTelemetry = function _PlannerTaskRemoveCommand_initTelemetry() {
|
|
@@ -154,40 +154,25 @@ class PlannerTaskSetCommand extends GraphCommand {
|
|
|
154
154
|
return undefined;
|
|
155
155
|
}
|
|
156
156
|
const planId = await this.getPlanId(options);
|
|
157
|
-
|
|
158
|
-
url: `${this.resource}/v1.0/planner/plans/${planId}/buckets?$select=id,name`,
|
|
159
|
-
headers: {
|
|
160
|
-
accept: 'application/json;odata.metadata=none'
|
|
161
|
-
},
|
|
162
|
-
responseType: 'json'
|
|
163
|
-
};
|
|
164
|
-
const response = await request.get(requestOptions);
|
|
165
|
-
const bucket = response.value.find(val => val.name === options.bucketName);
|
|
166
|
-
if (!bucket) {
|
|
167
|
-
throw 'The specified bucket does not exist';
|
|
168
|
-
}
|
|
169
|
-
return bucket.id;
|
|
157
|
+
return planner.getBucketIdByTitle(options.bucketName, planId);
|
|
170
158
|
}
|
|
171
159
|
async getPlanId(options) {
|
|
172
160
|
if (options.planId) {
|
|
173
161
|
return options.planId;
|
|
174
162
|
}
|
|
175
163
|
if (options.rosterId) {
|
|
176
|
-
|
|
177
|
-
return plan.id;
|
|
164
|
+
return planner.getPlanIdByRosterId(options.rosterId);
|
|
178
165
|
}
|
|
179
166
|
else {
|
|
180
167
|
const groupId = await this.getGroupId(options);
|
|
181
|
-
|
|
182
|
-
return plan.id;
|
|
168
|
+
return planner.getPlanIdByTitle(options.planTitle, groupId);
|
|
183
169
|
}
|
|
184
170
|
}
|
|
185
171
|
async getGroupId(options) {
|
|
186
172
|
if (options.ownerGroupId) {
|
|
187
173
|
return options.ownerGroupId;
|
|
188
174
|
}
|
|
189
|
-
|
|
190
|
-
return group.id;
|
|
175
|
+
return entraGroup.getGroupIdByDisplayName(options.ownerGroupName);
|
|
191
176
|
}
|
|
192
177
|
mapRequestBody(options, appliedCategories) {
|
|
193
178
|
const requestBody = {};
|
|
@@ -266,8 +251,17 @@ _PlannerTaskSetCommand_instances = new WeakSet(), _PlannerTaskSetCommand_initTel
|
|
|
266
251
|
if (args.options.percentComplete && (args.options.percentComplete < 0 || args.options.percentComplete > 100)) {
|
|
267
252
|
return `percentComplete should be between 0 and 100`;
|
|
268
253
|
}
|
|
269
|
-
if (args.options.assignedToUserIds
|
|
270
|
-
|
|
254
|
+
if (args.options.assignedToUserIds) {
|
|
255
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.assignedToUserIds);
|
|
256
|
+
if (isValidGUIDArrayResult !== true) {
|
|
257
|
+
return `The following GUIDs are invalid for the option 'assignedToUserIds': ${isValidGUIDArrayResult}.`;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (args.options.assignedToUserNames) {
|
|
261
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.assignedToUserNames);
|
|
262
|
+
if (isValidUPNArrayResult !== true) {
|
|
263
|
+
return `The following user principal names are invalid for the option 'assignedToUserNames': ${isValidUPNArrayResult}.`;
|
|
264
|
+
}
|
|
271
265
|
}
|
|
272
266
|
if (args.options.appliedCategories && args.options.appliedCategories.split(',').filter(category => this.allowedAppliedCategories.indexOf(category.toLocaleLowerCase()) < 0).length !== 0) {
|
|
273
267
|
return 'The appliedCategories contains invalid value. Specify either category1, category2, category3, category4, category5 and/or category6 as properties';
|
|
@@ -70,7 +70,7 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
|
|
|
70
70
|
'1.18.0',
|
|
71
71
|
'1.18.1',
|
|
72
72
|
'1.18.2',
|
|
73
|
-
'1.19.0
|
|
73
|
+
'1.19.0'
|
|
74
74
|
];
|
|
75
75
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
|
|
76
76
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
|
|
@@ -24,30 +24,30 @@ import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_D
|
|
|
24
24
|
import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
|
|
25
25
|
import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
|
|
26
26
|
export default [
|
|
27
|
-
new FN001001_DEP_microsoft_sp_core_library('1.19.0
|
|
28
|
-
new FN001002_DEP_microsoft_sp_lodash_subset('1.19.0
|
|
29
|
-
new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.19.0
|
|
30
|
-
new FN001004_DEP_microsoft_sp_webpart_base('1.19.0
|
|
31
|
-
new FN001011_DEP_microsoft_sp_dialog('1.19.0
|
|
32
|
-
new FN001012_DEP_microsoft_sp_application_base('1.19.0
|
|
33
|
-
new FN001014_DEP_microsoft_sp_listview_extensibility('1.19.0
|
|
34
|
-
new FN001021_DEP_microsoft_sp_property_pane('1.19.0
|
|
35
|
-
new FN001023_DEP_microsoft_sp_component_base('1.19.0
|
|
36
|
-
new FN001024_DEP_microsoft_sp_diagnostics('1.19.0
|
|
37
|
-
new FN001025_DEP_microsoft_sp_dynamic_data('1.19.0
|
|
38
|
-
new FN001026_DEP_microsoft_sp_extension_base('1.19.0
|
|
39
|
-
new FN001027_DEP_microsoft_sp_http('1.19.0
|
|
40
|
-
new FN001028_DEP_microsoft_sp_list_subscription('1.19.0
|
|
41
|
-
new FN001029_DEP_microsoft_sp_loader('1.19.0
|
|
42
|
-
new FN001030_DEP_microsoft_sp_module_interfaces('1.19.0
|
|
43
|
-
new FN001031_DEP_microsoft_sp_odata_types('1.19.0
|
|
44
|
-
new FN001032_DEP_microsoft_sp_page_context('1.19.0
|
|
45
|
-
new FN001013_DEP_microsoft_decorators('1.19.0
|
|
46
|
-
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.19.0
|
|
27
|
+
new FN001001_DEP_microsoft_sp_core_library('1.19.0'),
|
|
28
|
+
new FN001002_DEP_microsoft_sp_lodash_subset('1.19.0'),
|
|
29
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.19.0'),
|
|
30
|
+
new FN001004_DEP_microsoft_sp_webpart_base('1.19.0'),
|
|
31
|
+
new FN001011_DEP_microsoft_sp_dialog('1.19.0'),
|
|
32
|
+
new FN001012_DEP_microsoft_sp_application_base('1.19.0'),
|
|
33
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility('1.19.0'),
|
|
34
|
+
new FN001021_DEP_microsoft_sp_property_pane('1.19.0'),
|
|
35
|
+
new FN001023_DEP_microsoft_sp_component_base('1.19.0'),
|
|
36
|
+
new FN001024_DEP_microsoft_sp_diagnostics('1.19.0'),
|
|
37
|
+
new FN001025_DEP_microsoft_sp_dynamic_data('1.19.0'),
|
|
38
|
+
new FN001026_DEP_microsoft_sp_extension_base('1.19.0'),
|
|
39
|
+
new FN001027_DEP_microsoft_sp_http('1.19.0'),
|
|
40
|
+
new FN001028_DEP_microsoft_sp_list_subscription('1.19.0'),
|
|
41
|
+
new FN001029_DEP_microsoft_sp_loader('1.19.0'),
|
|
42
|
+
new FN001030_DEP_microsoft_sp_module_interfaces('1.19.0'),
|
|
43
|
+
new FN001031_DEP_microsoft_sp_odata_types('1.19.0'),
|
|
44
|
+
new FN001032_DEP_microsoft_sp_page_context('1.19.0'),
|
|
45
|
+
new FN001013_DEP_microsoft_decorators('1.19.0'),
|
|
46
|
+
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.19.0'),
|
|
47
47
|
new FN002001_DEVDEP_microsoft_sp_build_web('1.20.1'),
|
|
48
48
|
new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.20.1'),
|
|
49
49
|
new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.20.1'),
|
|
50
50
|
new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.20.1'),
|
|
51
|
-
new FN010001_YORC_version('1.19.0
|
|
51
|
+
new FN010001_YORC_version('1.19.0')
|
|
52
52
|
];
|
|
53
|
-
//# sourceMappingURL=upgrade-1.19.0
|
|
53
|
+
//# sourceMappingURL=upgrade-1.19.0.js.map
|
|
@@ -7,8 +7,6 @@ var _SpfxProjectUpgradeCommand_instances, _a, _SpfxProjectUpgradeCommand_initTel
|
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import os from 'os';
|
|
9
9
|
import path from 'path';
|
|
10
|
-
// uncomment to support upgrading to preview releases
|
|
11
|
-
import { prerelease } from 'semver';
|
|
12
10
|
import { CommandError } from '../../../../Command.js';
|
|
13
11
|
import { fsUtil } from '../../../../utils/fsUtil.js';
|
|
14
12
|
import { packageManager } from '../../../../utils/packageManager.js';
|
|
@@ -74,7 +72,7 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
74
72
|
'1.18.0',
|
|
75
73
|
'1.18.1',
|
|
76
74
|
'1.18.2',
|
|
77
|
-
'1.19.0
|
|
75
|
+
'1.19.0'
|
|
78
76
|
];
|
|
79
77
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
|
|
80
78
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
|
|
@@ -87,15 +85,15 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
87
85
|
}
|
|
88
86
|
this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
|
|
89
87
|
// uncomment to support upgrading to preview releases
|
|
90
|
-
if (!args.options.toVersion &&
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
88
|
+
// if (!args.options.toVersion &&
|
|
89
|
+
// !args.options.preview &&
|
|
90
|
+
// prerelease(this.toVersion)) {
|
|
91
|
+
// // no version and no preview specified while the current version to
|
|
92
|
+
// // upgrade to is a prerelease so let's grab the first non-preview version
|
|
93
|
+
// // since we're supporting only one preview version, it's sufficient for
|
|
94
|
+
// // us to take second to last version
|
|
95
|
+
// this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
96
|
+
// }
|
|
99
97
|
this.packageManager = args.options.packageManager || 'npm';
|
|
100
98
|
this.shell = args.options.shell || 'bash';
|
|
101
99
|
if (this.supportedVersions.indexOf(this.toVersion) < 0) {
|
|
@@ -484,9 +482,9 @@ _a = SpfxProjectUpgradeCommand, _SpfxProjectUpgradeCommand_instances = new WeakS
|
|
|
484
482
|
preview: args.options.preview
|
|
485
483
|
});
|
|
486
484
|
// uncomment to support upgrading to preview releases
|
|
487
|
-
if (prerelease(this.telemetryProperties.toVersion) && !args.options.preview) {
|
|
488
|
-
|
|
489
|
-
}
|
|
485
|
+
// if (prerelease(this.telemetryProperties.toVersion) && !args.options.preview) {
|
|
486
|
+
// this.telemetryProperties.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
487
|
+
// }
|
|
490
488
|
});
|
|
491
489
|
}, _SpfxProjectUpgradeCommand_initOptions = function _SpfxProjectUpgradeCommand_initOptions() {
|
|
492
490
|
this.options.unshift({
|