@pnp/cli-microsoft365 5.0.0-beta.6d4dbfb → 5.0.0-beta.77249d9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/devcontainer.json +12 -9
- package/.eslintrc.js +1 -0
- package/.mocharc.json +9 -0
- package/README.md +2 -2
- package/dist/Auth.js +22 -9
- package/dist/Command.js +1 -1
- package/dist/api.d.ts +13 -0
- package/dist/api.js +17 -0
- package/dist/cli/Cli.js +19 -4
- package/dist/m365/aad/commands/app/app-add.js +43 -7
- package/dist/m365/aad/commands/app/app-delete.js +123 -0
- package/dist/m365/aad/commands/app/app-get.js +56 -11
- package/dist/m365/aad/commands/app/app-set.js +98 -3
- package/dist/m365/aad/commands/group/group-list.js +14 -1
- package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +41 -0
- package/dist/m365/aad/commands.js +2 -0
- package/dist/m365/cli/commands/config/config-set.js +1 -0
- package/dist/m365/outlook/commands/room/room-list.js +43 -0
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +25 -0
- package/dist/m365/outlook/commands.js +2 -0
- package/dist/m365/planner/commands/task/task-get.js +1 -1
- package/dist/m365/planner/commands/task/task-list.js +37 -7
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.14.0-beta.5.js → upgrade-1.14.0.js} +25 -25
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +25 -6
- package/dist/m365/spo/commands/group/group-user-add.js +15 -8
- package/dist/m365/teams/commands/app/app-install.js +75 -21
- package/dist/m365/teams/commands/app/app-update.js +54 -12
- package/dist/m365/teams/commands/channel/channel-get.js +29 -7
- package/dist/m365/teams/commands/chat/chat-message-send.js +225 -0
- package/dist/m365/teams/commands.js +1 -0
- package/dist/settingsNames.js +7 -6
- package/docs/docs/cmd/aad/app/app-delete.md +51 -0
- package/docs/docs/cmd/aad/app/app-get.md +12 -1
- package/docs/docs/cmd/aad/app/app-set.md +21 -0
- package/docs/docs/cmd/aad/group/group-list.md +9 -0
- package/docs/docs/cmd/aad/o365group/o365group-conversation-list.md +24 -0
- package/docs/docs/cmd/outlook/room/room-list.md +30 -0
- package/docs/docs/cmd/outlook/roomlist/roomlist-list.md +21 -0
- package/docs/docs/cmd/planner/task/task-get.md +5 -0
- package/docs/docs/cmd/planner/task/task-list.md +5 -0
- package/docs/docs/cmd/search/externalconnection/externalconnection-add.md +3 -3
- package/docs/docs/cmd/spfx/project/project-upgrade.md +8 -8
- package/docs/docs/cmd/spo/group/group-user-add.md +4 -0
- package/docs/docs/cmd/teams/app/app-install.md +22 -4
- package/docs/docs/cmd/teams/app/app-update.md +12 -3
- package/docs/docs/cmd/teams/channel/channel-get.md +10 -1
- package/docs/docs/cmd/teams/chat/chat-message-send.md +55 -0
- package/npm-shrinkwrap.json +36 -3
- package/package.json +8 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Utils_1 = require("../../../../Utils");
|
|
4
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class AadO365GroupConversationListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.O365GROUP_CONVERSATION_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists conversations for the specified Microsoft 365 group';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['topic', 'lastDeliveredDateTime', 'id'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
this
|
|
18
|
+
.getAllItems(`${this.resource}/v1.0/groups/${args.options.groupId}/conversations`, logger, true)
|
|
19
|
+
.then(() => {
|
|
20
|
+
logger.log(this.items);
|
|
21
|
+
cb();
|
|
22
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
23
|
+
}
|
|
24
|
+
options() {
|
|
25
|
+
const options = [
|
|
26
|
+
{
|
|
27
|
+
option: '-i, --groupId <groupId>'
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
const parentOptions = super.options();
|
|
31
|
+
return options.concat(parentOptions);
|
|
32
|
+
}
|
|
33
|
+
validate(args) {
|
|
34
|
+
if (!Utils_1.default.isValidGuid(args.options.groupId)) {
|
|
35
|
+
return `${args.options.groupId} is not a valid GUID`;
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
module.exports = new AadO365GroupConversationListCommand();
|
|
41
|
+
//# sourceMappingURL=o365group-conversation-list.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const prefix = 'aad';
|
|
4
4
|
exports.default = {
|
|
5
5
|
APP_ADD: `${prefix} app add`,
|
|
6
|
+
APP_DELETE: `${prefix} app delete`,
|
|
6
7
|
APP_GET: `${prefix} app get`,
|
|
7
8
|
APP_SET: `${prefix} app set`,
|
|
8
9
|
APP_ROLE_ADD: `${prefix} app role add`,
|
|
@@ -22,6 +23,7 @@ exports.default = {
|
|
|
22
23
|
O365GROUP_ADD: `${prefix} o365group add`,
|
|
23
24
|
O365GROUP_GET: `${prefix} o365group get`,
|
|
24
25
|
O365GROUP_LIST: `${prefix} o365group list`,
|
|
26
|
+
O365GROUP_CONVERSATION_LIST: `${prefix} o365group conversation list`,
|
|
25
27
|
O365GROUP_RECYCLEBINITEM_CLEAR: `${prefix} o365group recyclebinitem clear`,
|
|
26
28
|
O365GROUP_RECYCLEBINITEM_LIST: `${prefix} o365group recyclebinitem list`,
|
|
27
29
|
O365GROUP_RECYCLEBINITEM_RESTORE: `${prefix} o365group recyclebinitem restore`,
|
|
@@ -19,6 +19,7 @@ class CliConfigSetCommand extends AnonymousCommand_1.default {
|
|
|
19
19
|
commandAction(logger, args, cb) {
|
|
20
20
|
let value = undefined;
|
|
21
21
|
switch (args.options.key) {
|
|
22
|
+
case settingsNames_1.settingsNames.autoOpenBrowserOnLogin:
|
|
22
23
|
case settingsNames_1.settingsNames.showHelpOnFailure:
|
|
23
24
|
case settingsNames_1.settingsNames.printErrorsAsPlainText:
|
|
24
25
|
case settingsNames_1.settingsNames.csvHeader:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
4
|
+
const commands_1 = require("../../commands");
|
|
5
|
+
class OutlookRoomListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
6
|
+
get name() {
|
|
7
|
+
return commands_1.default.ROOM_LIST;
|
|
8
|
+
}
|
|
9
|
+
get description() {
|
|
10
|
+
return 'Get a collection of all available rooms';
|
|
11
|
+
}
|
|
12
|
+
getTelemetryProperties(args) {
|
|
13
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
14
|
+
telemetryProps.roomlistEmail = typeof args.options.roomlistEmail !== 'undefined';
|
|
15
|
+
return telemetryProps;
|
|
16
|
+
}
|
|
17
|
+
defaultProperties() {
|
|
18
|
+
return ['id', 'displayName', 'phone', 'emailAddress'];
|
|
19
|
+
}
|
|
20
|
+
commandAction(logger, args, cb) {
|
|
21
|
+
let endpoint = `${this.resource}/v1.0/places/microsoft.graph.room`;
|
|
22
|
+
if (args.options.roomlistEmail) {
|
|
23
|
+
endpoint = `${this.resource}/v1.0/places/${args.options.roomlistEmail}/microsoft.graph.roomlist/rooms`;
|
|
24
|
+
}
|
|
25
|
+
this
|
|
26
|
+
.getAllItems(endpoint, logger, true)
|
|
27
|
+
.then(() => {
|
|
28
|
+
logger.log(this.items);
|
|
29
|
+
cb();
|
|
30
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
31
|
+
}
|
|
32
|
+
options() {
|
|
33
|
+
const options = [
|
|
34
|
+
{
|
|
35
|
+
option: '--roomlistEmail [roomlistEmail]'
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
const parentOptions = super.options();
|
|
39
|
+
return options.concat(parentOptions);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
module.exports = new OutlookRoomListCommand();
|
|
43
|
+
//# sourceMappingURL=room-list.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
4
|
+
const commands_1 = require("../../commands");
|
|
5
|
+
class OutlookRoomListListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
6
|
+
get name() {
|
|
7
|
+
return commands_1.default.ROOMLIST_LIST;
|
|
8
|
+
}
|
|
9
|
+
get description() {
|
|
10
|
+
return 'Get a collection of available roomlists';
|
|
11
|
+
}
|
|
12
|
+
defaultProperties() {
|
|
13
|
+
return ['id', 'displayName', 'phone', 'emailAddress'];
|
|
14
|
+
}
|
|
15
|
+
commandAction(logger, args, cb) {
|
|
16
|
+
this
|
|
17
|
+
.getAllItems(`${this.resource}/v1.0/places/microsoft.graph.roomlist`, logger, true)
|
|
18
|
+
.then(() => {
|
|
19
|
+
logger.log(this.items);
|
|
20
|
+
cb();
|
|
21
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
module.exports = new OutlookRoomListListCommand();
|
|
25
|
+
//# sourceMappingURL=roomlist-list.js.map
|
|
@@ -16,6 +16,8 @@ exports.default = {
|
|
|
16
16
|
REPORT_MAILBOXUSAGEMAILBOXCOUNT: `${prefix} report mailboxusagemailboxcount`,
|
|
17
17
|
REPORT_MAILBOXUSAGEQUOTASTATUSMAILBOXCOUNTS: `${prefix} report mailboxusagequotastatusmailboxcounts`,
|
|
18
18
|
REPORT_MAILBOXUSAGESTORAGE: `${prefix} report mailboxusagestorage`,
|
|
19
|
+
ROOM_LIST: `${prefix} room list`,
|
|
20
|
+
ROOMLIST_LIST: `${prefix} roomlist list`,
|
|
19
21
|
SENDMAIL: `${prefix} sendmail`
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=commands.js.map
|
|
@@ -12,7 +12,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
12
12
|
}
|
|
13
13
|
commandAction(logger, args, cb) {
|
|
14
14
|
const requestOptions = {
|
|
15
|
-
url: `${this.resource}/
|
|
15
|
+
url: `${this.resource}/beta/planner/tasks/${encodeURIComponent(args.options.id)}`,
|
|
16
16
|
headers: {
|
|
17
17
|
accept: 'application/json;odata.metadata=none'
|
|
18
18
|
},
|
|
@@ -25,25 +25,40 @@ class PlannerTaskListCommand extends GraphItemsListCommand_1.GraphItemsListComma
|
|
|
25
25
|
return ['id', 'title', 'startDateTime', 'dueDateTime', 'completedDateTime'];
|
|
26
26
|
}
|
|
27
27
|
commandAction(logger, args, cb) {
|
|
28
|
-
const bucketId = args.options.bucketId;
|
|
29
28
|
const bucketName = args.options.bucketName;
|
|
30
|
-
|
|
29
|
+
let bucketId = args.options.bucketId;
|
|
31
30
|
const planName = args.options.planName;
|
|
31
|
+
let planId = args.options.planId;
|
|
32
|
+
let taskItems = [];
|
|
32
33
|
if (bucketId || bucketName) {
|
|
33
34
|
this
|
|
34
35
|
.getBucketId(args)
|
|
35
|
-
.then((
|
|
36
|
+
.then((retrievedBucketId) => {
|
|
37
|
+
bucketId = retrievedBucketId;
|
|
38
|
+
return this.getAllItems(`${this.resource}/v1.0/planner/buckets/${bucketId}/tasks`, logger, true);
|
|
39
|
+
})
|
|
36
40
|
.then(() => {
|
|
37
|
-
|
|
41
|
+
taskItems = this.items;
|
|
42
|
+
return this.getAllItems(`${this.resource}/beta/planner/buckets/${bucketId}/tasks`, logger, true);
|
|
43
|
+
})
|
|
44
|
+
.then(() => {
|
|
45
|
+
logger.log(this.mergeTaskPriority(taskItems, this.items));
|
|
38
46
|
cb();
|
|
39
47
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
40
48
|
}
|
|
41
49
|
else if (planId || planName) {
|
|
42
50
|
this
|
|
43
51
|
.getPlanId(args)
|
|
44
|
-
.then((
|
|
52
|
+
.then((retrievedPlanId) => {
|
|
53
|
+
planId = retrievedPlanId;
|
|
54
|
+
return this.getAllItems(`${this.resource}/v1.0/planner/plans/${planId}/tasks`, logger, true);
|
|
55
|
+
})
|
|
56
|
+
.then(() => {
|
|
57
|
+
taskItems = this.items;
|
|
58
|
+
return this.getAllItems(`${this.resource}/beta/planner/plans/${planId}/tasks`, logger, true);
|
|
59
|
+
})
|
|
45
60
|
.then(() => {
|
|
46
|
-
logger.log(this.items);
|
|
61
|
+
logger.log(this.mergeTaskPriority(taskItems, this.items));
|
|
47
62
|
cb();
|
|
48
63
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
49
64
|
}
|
|
@@ -51,7 +66,11 @@ class PlannerTaskListCommand extends GraphItemsListCommand_1.GraphItemsListComma
|
|
|
51
66
|
this
|
|
52
67
|
.getAllItems(`${this.resource}/v1.0/me/planner/tasks`, logger, true)
|
|
53
68
|
.then(() => {
|
|
54
|
-
|
|
69
|
+
taskItems = this.items;
|
|
70
|
+
return this.getAllItems(`${this.resource}/beta/me/planner/tasks`, logger, true);
|
|
71
|
+
})
|
|
72
|
+
.then(() => {
|
|
73
|
+
logger.log(this.mergeTaskPriority(taskItems, this.items));
|
|
55
74
|
cb();
|
|
56
75
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
57
76
|
}
|
|
@@ -125,6 +144,17 @@ class PlannerTaskListCommand extends GraphItemsListCommand_1.GraphItemsListComma
|
|
|
125
144
|
return Promise.resolve(group.id);
|
|
126
145
|
});
|
|
127
146
|
}
|
|
147
|
+
mergeTaskPriority(taskItems, betaTaskItems) {
|
|
148
|
+
const findBetaTask = (id) => betaTaskItems.find(task => task.id === id);
|
|
149
|
+
taskItems.forEach(task => {
|
|
150
|
+
const betaTaskItem = findBetaTask(task.id);
|
|
151
|
+
if (betaTaskItem) {
|
|
152
|
+
const { priority } = betaTaskItem;
|
|
153
|
+
Object.assign(task, { priority });
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
return taskItems;
|
|
157
|
+
}
|
|
128
158
|
options() {
|
|
129
159
|
const options = [
|
|
130
160
|
{
|
|
@@ -28,32 +28,32 @@ const FN006006_CFG_PS_features_1 = require("./rules/FN006006_CFG_PS_features");
|
|
|
28
28
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
29
29
|
const FN014008_CODE_launch_hostedWorkbench_type_1 = require("./rules/FN014008_CODE_launch_hostedWorkbench_type");
|
|
30
30
|
module.exports = [
|
|
31
|
-
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.14.0
|
|
32
|
-
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.14.0
|
|
33
|
-
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.14.0
|
|
34
|
-
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.14.0
|
|
35
|
-
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.14.0
|
|
36
|
-
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.14.0
|
|
37
|
-
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.14.0
|
|
38
|
-
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.14.0
|
|
39
|
-
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.14.0
|
|
40
|
-
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.14.0
|
|
41
|
-
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.14.0
|
|
42
|
-
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.14.0
|
|
43
|
-
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.14.0
|
|
44
|
-
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.14.0
|
|
45
|
-
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.14.0
|
|
46
|
-
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.14.0
|
|
47
|
-
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.14.0
|
|
48
|
-
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.14.0
|
|
49
|
-
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.14.0
|
|
50
|
-
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0
|
|
51
|
-
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0
|
|
52
|
-
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0
|
|
53
|
-
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0
|
|
31
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.14.0'),
|
|
32
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.14.0'),
|
|
33
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.14.0'),
|
|
34
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.14.0'),
|
|
35
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.14.0'),
|
|
36
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.14.0'),
|
|
37
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.14.0'),
|
|
38
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.14.0'),
|
|
39
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.14.0'),
|
|
40
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.14.0'),
|
|
41
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.14.0'),
|
|
42
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.14.0'),
|
|
43
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.14.0'),
|
|
44
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.14.0'),
|
|
45
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.14.0'),
|
|
46
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.14.0'),
|
|
47
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.14.0'),
|
|
48
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.14.0'),
|
|
49
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.14.0'),
|
|
50
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0'),
|
|
51
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0'),
|
|
52
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0'),
|
|
53
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0'),
|
|
54
54
|
new FN006005_CFG_PS_metadata_1.FN006005_CFG_PS_metadata(),
|
|
55
55
|
new FN006006_CFG_PS_features_1.FN006006_CFG_PS_features(),
|
|
56
|
-
new FN010001_YORC_version_1.FN010001_YORC_version('1.14.0
|
|
56
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.14.0'),
|
|
57
57
|
new FN014008_CODE_launch_hostedWorkbench_type_1.FN014008_CODE_launch_hostedWorkbench_type('pwa-chrome')
|
|
58
58
|
];
|
|
59
|
-
//# sourceMappingURL=upgrade-1.14.0
|
|
59
|
+
//# sourceMappingURL=upgrade-1.14.0.js.map
|
|
@@ -3,8 +3,6 @@ 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");
|
|
8
6
|
const Command_1 = require("../../../../Command");
|
|
9
7
|
const commands_1 = require("../../commands");
|
|
10
8
|
const base_project_command_1 = require("./base-project-command");
|
|
@@ -45,7 +43,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
45
43
|
'1.12.1',
|
|
46
44
|
'1.13.0',
|
|
47
45
|
'1.13.1',
|
|
48
|
-
'1.14.0
|
|
46
|
+
'1.14.0'
|
|
49
47
|
];
|
|
50
48
|
}
|
|
51
49
|
get name() {
|
|
@@ -58,9 +56,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
58
56
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
59
57
|
telemetryProps.toVersion = args.options.toVersion || this.supportedVersions[this.supportedVersions.length - 1];
|
|
60
58
|
// uncomment to support upgrading to preview releases
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
}
|
|
59
|
+
// if (prerelease(telemetryProps.toVersion) && !args.options.preview) {
|
|
60
|
+
// telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
61
|
+
// }
|
|
64
62
|
telemetryProps.packageManager = args.options.packageManager || 'npm';
|
|
65
63
|
telemetryProps.shell = args.options.shell || 'bash';
|
|
66
64
|
telemetryProps.preview = args.options.preview;
|
|
@@ -74,15 +72,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
74
72
|
}
|
|
75
73
|
this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
|
|
76
74
|
// uncomment to support upgrading to preview releases
|
|
77
|
-
if (!args.options.toVersion &&
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
75
|
+
// if (!args.options.toVersion &&
|
|
76
|
+
// !args.options.preview &&
|
|
77
|
+
// prerelease(this.toVersion)) {
|
|
78
|
+
// // no version and no preview specified while the current version to
|
|
79
|
+
// // upgrade to is a prerelease so let's grab the first non-preview version
|
|
80
|
+
// // since we're supporting only one preview version, it's sufficient for
|
|
81
|
+
// // us to take second to last version
|
|
82
|
+
// this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
83
|
+
// }
|
|
86
84
|
this.packageManager = args.options.packageManager || 'npm';
|
|
87
85
|
this.shell = args.options.shell || 'bash';
|
|
88
86
|
if (this.supportedVersions.indexOf(this.toVersion) < 0) {
|
|
@@ -406,8 +406,8 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
406
406
|
fix: 'Install Node.js v12 or v14'
|
|
407
407
|
},
|
|
408
408
|
react: {
|
|
409
|
-
range: '16.9.
|
|
410
|
-
fix: 'npm i react@16.9.
|
|
409
|
+
range: '16.9.36',
|
|
410
|
+
fix: 'npm i react@16.9.36'
|
|
411
411
|
},
|
|
412
412
|
sp: SharePointVersion.SPO,
|
|
413
413
|
yo: {
|
|
@@ -425,8 +425,8 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
425
425
|
fix: 'Install Node.js v12 or v14'
|
|
426
426
|
},
|
|
427
427
|
react: {
|
|
428
|
-
range: '16.9.
|
|
429
|
-
fix: 'npm i react@16.9.
|
|
428
|
+
range: '16.9.51',
|
|
429
|
+
fix: 'npm i react@16.9.51'
|
|
430
430
|
},
|
|
431
431
|
sp: SharePointVersion.SPO,
|
|
432
432
|
yo: {
|
|
@@ -444,8 +444,27 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
444
444
|
fix: 'Install Node.js v12 or v14'
|
|
445
445
|
},
|
|
446
446
|
react: {
|
|
447
|
-
range: '16.9.
|
|
448
|
-
fix: 'npm i react@16.9.
|
|
447
|
+
range: '16.9.51',
|
|
448
|
+
fix: 'npm i react@16.9.51'
|
|
449
|
+
},
|
|
450
|
+
sp: SharePointVersion.SPO,
|
|
451
|
+
yo: {
|
|
452
|
+
range: '^4',
|
|
453
|
+
fix: 'npm i -g yo@4'
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
'1.14.0': {
|
|
457
|
+
gulp: {
|
|
458
|
+
range: '^4',
|
|
459
|
+
fix: 'npm i -g gulp@4'
|
|
460
|
+
},
|
|
461
|
+
node: {
|
|
462
|
+
range: '^12 || ^14',
|
|
463
|
+
fix: 'Install Node.js v12 or v14'
|
|
464
|
+
},
|
|
465
|
+
react: {
|
|
466
|
+
range: '16.9.51',
|
|
467
|
+
fix: 'npm i react@16.9.51'
|
|
449
468
|
},
|
|
450
469
|
sp: SharePointVersion.SPO,
|
|
451
470
|
yo: {
|
|
@@ -22,7 +22,7 @@ class SpoGroupUserAddCommand extends SpoCommand_1.default {
|
|
|
22
22
|
.getGroupId(args)
|
|
23
23
|
.then((_groupId) => {
|
|
24
24
|
groupId = _groupId;
|
|
25
|
-
return this.
|
|
25
|
+
return this.getValidUsers(args, logger);
|
|
26
26
|
})
|
|
27
27
|
.then((resolvedUsernameList) => {
|
|
28
28
|
if (this.verbose) {
|
|
@@ -73,13 +73,15 @@ class SpoGroupUserAddCommand extends SpoCommand_1.default {
|
|
|
73
73
|
return groupId;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
getValidUsers(args, logger) {
|
|
77
77
|
if (this.verbose) {
|
|
78
|
-
logger.logToStderr(`
|
|
78
|
+
logger.logToStderr(`Checking if the specified users exist`);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const validUserNames = [];
|
|
81
|
+
const invalidUserNames = [];
|
|
81
82
|
const userInfo = args.options.userName ? args.options.userName : args.options.email;
|
|
82
|
-
return Promise
|
|
83
|
+
return Promise
|
|
84
|
+
.all(userInfo.split(',').map(singleUserName => {
|
|
83
85
|
const options = {
|
|
84
86
|
output: 'json',
|
|
85
87
|
debug: args.options.debug,
|
|
@@ -91,20 +93,25 @@ class SpoGroupUserAddCommand extends SpoCommand_1.default {
|
|
|
91
93
|
else {
|
|
92
94
|
options.email = singleUserName.trim();
|
|
93
95
|
}
|
|
94
|
-
return cli_1.Cli
|
|
96
|
+
return cli_1.Cli
|
|
97
|
+
.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
|
|
95
98
|
.then((getUserGetOutput) => {
|
|
96
99
|
if (this.debug) {
|
|
97
100
|
logger.logToStderr(getUserGetOutput.stderr);
|
|
98
101
|
}
|
|
99
|
-
|
|
102
|
+
validUserNames.push(JSON.parse(getUserGetOutput.stdout).userPrincipalName);
|
|
100
103
|
}, (err) => {
|
|
101
104
|
if (this.debug) {
|
|
102
105
|
logger.logToStderr(err.stderr);
|
|
103
106
|
}
|
|
107
|
+
invalidUserNames.push(singleUserName);
|
|
104
108
|
});
|
|
105
109
|
}))
|
|
106
110
|
.then(() => {
|
|
107
|
-
|
|
111
|
+
if (invalidUserNames.length > 0) {
|
|
112
|
+
return Promise.reject(`Users not added to the group because the following users don't exist: ${invalidUserNames.join(', ')}`);
|
|
113
|
+
}
|
|
114
|
+
return Promise.resolve(validUserNames);
|
|
108
115
|
});
|
|
109
116
|
}
|
|
110
117
|
getFormattedUserList(activeUserList) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../../cli");
|
|
3
4
|
const request_1 = require("../../../../request");
|
|
4
5
|
const Utils_1 = require("../../../../Utils");
|
|
6
|
+
const AadUserGetCommand = require("../../../aad/commands/user/user-get");
|
|
5
7
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
8
|
const commands_1 = require("../../commands");
|
|
7
9
|
class TeamsAppInstallCommand extends GraphCommand_1.default {
|
|
@@ -9,33 +11,70 @@ class TeamsAppInstallCommand extends GraphCommand_1.default {
|
|
|
9
11
|
return commands_1.default.APP_INSTALL;
|
|
10
12
|
}
|
|
11
13
|
get description() {
|
|
12
|
-
return 'Installs
|
|
14
|
+
return 'Installs a Microsoft Teams team app from the catalog in the specified team or for the specified user';
|
|
13
15
|
}
|
|
14
16
|
commandAction(logger, args, cb) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
responseType: 'json',
|
|
23
|
-
data: {
|
|
24
|
-
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${args.options.appId}`
|
|
17
|
+
this
|
|
18
|
+
.validateUser(args, logger)
|
|
19
|
+
.then(_ => {
|
|
20
|
+
var _a;
|
|
21
|
+
let url = `${this.resource}/v1.0`;
|
|
22
|
+
if (args.options.teamId) {
|
|
23
|
+
url += `/teams/${encodeURIComponent(args.options.teamId)}/installedApps`;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
else {
|
|
26
|
+
url += `/users/${encodeURIComponent(((_a = args.options.userId) !== null && _a !== void 0 ? _a : args.options.userName))}/teamwork/installedApps`;
|
|
27
|
+
}
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: url,
|
|
30
|
+
headers: {
|
|
31
|
+
'content-type': 'application/json;odata=nometadata',
|
|
32
|
+
'accept': 'application/json;odata.metadata=none'
|
|
33
|
+
},
|
|
34
|
+
responseType: 'json',
|
|
35
|
+
data: {
|
|
36
|
+
'teamsApp@odata.bind': `${this.resource}/v1.0/appCatalogs/teamsApps/${args.options.appId}`
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return request_1.default.post(requestOptions);
|
|
40
|
+
})
|
|
29
41
|
.then(_ => cb(), (res) => this.handleRejectedODataJsonPromise(res, logger, cb));
|
|
30
42
|
}
|
|
43
|
+
// we need this method, because passing an invalid user ID to the API
|
|
44
|
+
// won't cause an error
|
|
45
|
+
validateUser(args, logger) {
|
|
46
|
+
if (!args.options.userId) {
|
|
47
|
+
return Promise.resolve(true);
|
|
48
|
+
}
|
|
49
|
+
if (this.verbose) {
|
|
50
|
+
logger.logToStderr(`Checking if user ${args.options.userId} exists...`);
|
|
51
|
+
}
|
|
52
|
+
const options = {
|
|
53
|
+
id: args.options.userId,
|
|
54
|
+
output: 'json',
|
|
55
|
+
debug: args.options.debug,
|
|
56
|
+
verbose: args.options.verbose
|
|
57
|
+
};
|
|
58
|
+
return cli_1.Cli
|
|
59
|
+
.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
|
|
60
|
+
.then((res) => {
|
|
61
|
+
if (this.verbose) {
|
|
62
|
+
logger.logToStderr(res.stderr);
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
}, (err) => {
|
|
66
|
+
if (this.verbose) {
|
|
67
|
+
logger.logToStderr(err.stderr);
|
|
68
|
+
}
|
|
69
|
+
return Promise.reject(`User with ID ${args.options.userId} not found. Original error: ${err.error.message}`);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
31
72
|
options() {
|
|
32
73
|
const options = [
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
option: '--teamId <teamId>'
|
|
38
|
-
}
|
|
74
|
+
{ option: '--appId <appId>' },
|
|
75
|
+
{ option: '--teamId [teamId' },
|
|
76
|
+
{ option: '--userId [userId]' },
|
|
77
|
+
{ option: '--userName [userName]' }
|
|
39
78
|
];
|
|
40
79
|
const parentOptions = super.options();
|
|
41
80
|
return options.concat(parentOptions);
|
|
@@ -44,9 +83,24 @@ class TeamsAppInstallCommand extends GraphCommand_1.default {
|
|
|
44
83
|
if (!Utils_1.default.isValidGuid(args.options.appId)) {
|
|
45
84
|
return `${args.options.appId} is not a valid GUID`;
|
|
46
85
|
}
|
|
47
|
-
if (!
|
|
86
|
+
if (!args.options.teamId &&
|
|
87
|
+
!args.options.userId &&
|
|
88
|
+
!args.options.userName) {
|
|
89
|
+
return `Specify either teamId, userId or userName`;
|
|
90
|
+
}
|
|
91
|
+
if ((args.options.teamId && args.options.userId) ||
|
|
92
|
+
(args.options.teamId && args.options.userName) ||
|
|
93
|
+
(args.options.userId && args.options.userName)) {
|
|
94
|
+
return `Specify either teamId, userId or userName but not multiple`;
|
|
95
|
+
}
|
|
96
|
+
if (args.options.teamId &&
|
|
97
|
+
!Utils_1.default.isValidGuid(args.options.teamId)) {
|
|
48
98
|
return `${args.options.teamId} is not a valid GUID`;
|
|
49
99
|
}
|
|
100
|
+
if (args.options.userId &&
|
|
101
|
+
!Utils_1.default.isValidGuid(args.options.userId)) {
|
|
102
|
+
return `${args.options.userId} is not a valid GUID`;
|
|
103
|
+
}
|
|
50
104
|
return true;
|
|
51
105
|
}
|
|
52
106
|
}
|