@pnp/cli-microsoft365 7.3.0-beta.ca3f7f5 → 7.3.0-beta.e0b37b9
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/Auth.js +3 -4
- package/dist/Command.js +10 -13
- package/dist/api.js +2 -3
- package/dist/autocomplete.js +4 -6
- package/dist/chili/chili.js +1 -2
- package/dist/cli/cli.js +880 -0
- package/dist/index.js +2 -2
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-add.js +137 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-list.js +138 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +2 -2
- package/dist/m365/aad/commands/app/app-get.js +2 -2
- package/dist/m365/aad/commands/app/app-permission-add.js +237 -0
- package/dist/m365/aad/commands/app/app-remove.js +3 -3
- package/dist/m365/aad/commands/app/app-role-add.js +2 -2
- package/dist/m365/aad/commands/app/app-role-list.js +2 -2
- package/dist/m365/aad/commands/app/app-role-remove.js +4 -4
- package/dist/m365/aad/commands/app/app-set.js +2 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +2 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -2
- package/dist/m365/aad/commands/group/group-list.js +2 -2
- package/dist/m365/aad/commands/group/group-remove.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -3
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-teamify.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -2
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -2
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
- package/dist/m365/aad/commands/sp/sp-add.js +2 -2
- package/dist/m365/aad/commands/sp/sp-get.js +2 -2
- package/dist/m365/aad/commands/user/user-get.js +2 -2
- package/dist/m365/aad/commands/user/user-license-remove.js +2 -2
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -2
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -2
- package/dist/m365/aad/commands/user/user-remove.js +2 -2
- package/dist/m365/aad/commands.js +4 -1
- package/dist/m365/app/commands/app-get.js +2 -2
- package/dist/m365/app/commands/app-open.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +2 -2
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/booking/commands/business/business-get.js +2 -2
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands/cli-reconsent.js +2 -2
- package/dist/m365/cli/commands/config/config-get.js +2 -2
- package/dist/m365/cli/commands/config/config-list.js +2 -2
- package/dist/m365/cli/commands/config/config-reset.js +3 -3
- package/dist/m365/cli/commands/config/config-set.js +4 -4
- package/dist/m365/commands/docs.js +2 -2
- package/dist/m365/commands/login.js +4 -4
- package/dist/m365/commands/setup.js +8 -8
- package/dist/m365/context/commands/context-remove.js +2 -2
- package/dist/m365/context/commands/option/option-remove.js +2 -2
- package/dist/m365/external/commands/connection/connection-doctor.js +1 -2
- package/dist/m365/external/commands/connection/connection-remove.js +3 -3
- package/dist/m365/flow/commands/flow-remove.js +2 -2
- package/dist/m365/flow/commands/owner/owner-list.js +2 -2
- package/dist/m365/flow/commands/owner/owner-remove.js +2 -2
- package/dist/m365/flow/commands/run/run-cancel.js +2 -2
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
- package/dist/m365/graph/commands/changelog/changelog-list.js +3 -3
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -2
- package/dist/m365/outlook/commands/message/message-list.js +2 -2
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/pa/commands/app/app-consent-set.js +2 -2
- package/dist/m365/pa/commands/app/app-get.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-remove.js +2 -2
- package/dist/m365/pa/commands/app/app-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +3 -3
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-remove.js +3 -3
- package/dist/m365/planner/commands/roster/roster-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-get.js +3 -3
- package/dist/m365/planner/commands/task/task-reference-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-remove.js +4 -4
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +2 -2
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +3 -3
- package/dist/m365/pp/commands/card/card-clone.js +2 -2
- package/dist/m365/pp/commands/card/card-get.js +2 -2
- package/dist/m365/pp/commands/card/card-remove.js +3 -3
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +2 -2
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +3 -3
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -2
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +2 -2
- package/dist/m365/pp/commands/solution/solution-get.js +2 -2
- package/dist/m365/pp/commands/solution/solution-list.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publish.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +3 -3
- package/dist/m365/pp/commands/solution/solution-remove.js +3 -3
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -2
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -2
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -2
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +2 -2
- package/dist/m365/spo/commands/app/app-add.js +2 -2
- package/dist/m365/spo/commands/app/app-remove.js +2 -2
- package/dist/m365/spo/commands/app/app-retract.js +2 -2
- package/dist/m365/spo/commands/app/app-uninstall.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +3 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -2
- package/dist/m365/spo/commands/commandset/commandset-get.js +2 -2
- package/dist/m365/spo/commands/commandset/commandset-remove.js +3 -3
- package/dist/m365/spo/commands/commandset/commandset-set.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-get.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -3
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +2 -2
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +3 -3
- package/dist/m365/spo/commands/field/field-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +5 -5
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +3 -3
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +3 -3
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +2 -2
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +3 -3
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +2 -2
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -2
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +2 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/group/group-list.js +2 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +9 -9
- package/dist/m365/spo/commands/group/group-remove.js +2 -2
- package/dist/m365/spo/commands/group/group-set.js +2 -2
- package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +3 -3
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -2
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-view-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-list.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -2
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -2
- package/dist/m365/spo/commands/page/page-add.js +4 -4
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-remove.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/page/page-set.js +5 -5
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-set.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -2
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -2
- package/dist/m365/spo/commands/spo-search.js +2 -2
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +4 -4
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -2
- package/dist/m365/spo/commands/term/term-get.js +2 -2
- package/dist/m365/spo/commands/term/term-list.js +2 -2
- package/dist/m365/spo/commands/theme/theme-remove.js +2 -2
- package/dist/m365/spo/commands/user/user-remove.js +2 -2
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -2
- package/dist/m365/spo/commands/web/web-remove.js +2 -2
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -2
- package/dist/m365/teams/commands/app/app-install.js +32 -5
- package/dist/m365/teams/commands/app/app-remove.js +3 -3
- package/dist/m365/teams/commands/app/app-uninstall.js +2 -2
- package/dist/m365/teams/commands/app/app-update.js +2 -2
- package/dist/m365/teams/commands/cache/cache-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -3
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -2
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -2
- package/dist/m365/teams/commands/chat/chat-get.js +3 -3
- package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -2
- package/dist/m365/teams/commands/chat/chat-message-send.js +3 -3
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +2 -2
- package/dist/m365/teams/commands/tab/tab-remove.js +2 -2
- package/dist/m365/teams/commands/team/team-app-list.js +3 -3
- package/dist/m365/teams/commands/team/team-remove.js +2 -2
- package/dist/m365/teams/commands/user/user-app-add.js +23 -5
- package/dist/m365/teams/commands/user/user-app-list.js +2 -2
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +2 -2
- package/dist/m365/todo/commands/list/list-remove.js +2 -2
- package/dist/m365/todo/commands/task/task-get.js +2 -2
- package/dist/m365/todo/commands/task/task-list.js +2 -2
- package/dist/m365/todo/commands/task/task-remove.js +2 -2
- package/dist/m365/viva/commands/connections/connections-app-create.js +2 -2
- package/dist/m365/yammer/commands/group/group-user-remove.js +2 -2
- package/dist/m365/yammer/commands/message/message-like-set.js +2 -2
- package/dist/m365/yammer/commands/message/message-remove.js +2 -2
- package/dist/m365/yammer/commands/yammer-search.js +2 -2
- package/dist/telemetry.js +2 -2
- package/dist/utils/aadAdministrativeUnit.js +2 -2
- package/dist/utils/aadDevice.js +25 -0
- package/dist/utils/aadGroup.js +3 -3
- package/dist/utils/prompt.js +4 -7
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-add.mdx +93 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-list.mdx +312 -0
- package/docs/docs/cmd/aad/app/app-permission-add.mdx +62 -0
- package/docs/docs/cmd/teams/app/app-install.mdx +11 -2
- package/docs/docs/cmd/teams/user/user-app-add.mdx +12 -3
- package/docs/docs/cmd/teams/user/user-app-remove.mdx +2 -2
- package/package.json +1 -1
- package/dist/cli/Cli.js +0 -858
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cli } from "../../../../cli/cli.js";
|
|
2
2
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
3
3
|
import commands from "../../commands.js";
|
|
4
4
|
class CliConfigListCommand extends AnonymousCommand {
|
|
@@ -9,7 +9,7 @@ class CliConfigListCommand extends AnonymousCommand {
|
|
|
9
9
|
return 'List all self set CLI for Microsoft 365 configurations';
|
|
10
10
|
}
|
|
11
11
|
async commandAction(logger) {
|
|
12
|
-
await logger.log(
|
|
12
|
+
await logger.log(cli.getConfig().all);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export default new CliConfigListCommand();
|
|
@@ -4,7 +4,7 @@ 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 _CliConfigResetCommand_instances, _a, _CliConfigResetCommand_initTelemetry, _CliConfigResetCommand_initOptions, _CliConfigResetCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from "../../../../cli/cli.js";
|
|
8
8
|
import { settingsNames } from "../../../../settingsNames.js";
|
|
9
9
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
10
10
|
import commands from "../../commands.js";
|
|
@@ -24,10 +24,10 @@ class CliConfigResetCommand extends AnonymousCommand {
|
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
26
|
if (args.options.key) {
|
|
27
|
-
|
|
27
|
+
cli.getConfig().delete(args.options.key);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
|
|
30
|
+
cli.getConfig().clear();
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -4,7 +4,7 @@ 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 _CliConfigSetCommand_instances, _a, _CliConfigSetCommand_initTelemetry, _CliConfigSetCommand_initOptions, _CliConfigSetCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from "../../../../cli/cli.js";
|
|
8
8
|
import { settingsNames } from "../../../../settingsNames.js";
|
|
9
9
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
10
10
|
import commands from "../../commands.js";
|
|
@@ -41,7 +41,7 @@ class CliConfigSetCommand extends AnonymousCommand {
|
|
|
41
41
|
value = args.options.value;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
cli.getConfig().set(args.options.key, value);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
_a = CliConfigSetCommand, _CliConfigSetCommand_instances = new WeakSet(), _CliConfigSetCommand_initTelemetry = function _CliConfigSetCommand_initTelemetry() {
|
|
@@ -79,8 +79,8 @@ _a = CliConfigSetCommand, _CliConfigSetCommand_instances = new WeakSet(), _CliCo
|
|
|
79
79
|
return `${args.options.value} is not a valid value for the option ${args.options.key}. The number has to be higher than 0.`;
|
|
80
80
|
}
|
|
81
81
|
if (args.options.key === settingsNames.helpMode &&
|
|
82
|
-
|
|
83
|
-
return `${args.options.value} is not a valid value for the option ${args.options.key}. Allowed values: ${
|
|
82
|
+
cli.helpModes.indexOf(args.options.value) === -1) {
|
|
83
|
+
return `${args.options.value} is not a valid value for the option ${args.options.key}. Allowed values: ${cli.helpModes.join(', ')}`;
|
|
84
84
|
}
|
|
85
85
|
const allowedAuthTypes = ['certificate', 'deviceCode', 'password', 'identity', 'browser', 'secret'];
|
|
86
86
|
if (args.options.key === settingsNames.authType &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cli } from '../../cli/cli.js';
|
|
2
2
|
import { settingsNames } from '../../settingsNames.js';
|
|
3
3
|
import { app } from '../../utils/app.js';
|
|
4
4
|
import { browserUtil } from '../../utils/browserUtil.js';
|
|
@@ -13,7 +13,7 @@ class DocsCommand extends AnonymousCommand {
|
|
|
13
13
|
}
|
|
14
14
|
async commandAction(logger) {
|
|
15
15
|
await logger.log(app.packageJson().homepage);
|
|
16
|
-
if (
|
|
16
|
+
if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false) === false) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
await browserUtil.open(app.packageJson().homepage);
|
|
@@ -12,7 +12,7 @@ import { accessToken } from '../../utils/accessToken.js';
|
|
|
12
12
|
import { misc } from '../../utils/misc.js';
|
|
13
13
|
import commands from './commands.js';
|
|
14
14
|
import { settingsNames } from '../../settingsNames.js';
|
|
15
|
-
import {
|
|
15
|
+
import { cli } from '../../cli/cli.js';
|
|
16
16
|
class LoginCommand extends Command {
|
|
17
17
|
get name() {
|
|
18
18
|
return commands.LOGIN;
|
|
@@ -37,7 +37,7 @@ class LoginCommand extends Command {
|
|
|
37
37
|
if (this.verbose) {
|
|
38
38
|
await logger.logToStderr(`Signing in to Microsoft 365...`);
|
|
39
39
|
}
|
|
40
|
-
const authType = args.options.authType ||
|
|
40
|
+
const authType = args.options.authType || cli.getSettingWithDefaultValue(settingsNames.authType, 'deviceCode');
|
|
41
41
|
auth.service.appId = args.options.appId || config.cliAadAppId;
|
|
42
42
|
auth.service.tenant = args.options.tenant || config.tenant;
|
|
43
43
|
switch (authType) {
|
|
@@ -129,7 +129,7 @@ class LoginCommand extends Command {
|
|
|
129
129
|
_a = LoginCommand, _LoginCommand_instances = new WeakSet(), _LoginCommand_initTelemetry = function _LoginCommand_initTelemetry() {
|
|
130
130
|
this.telemetry.push((args) => {
|
|
131
131
|
Object.assign(this.telemetryProperties, {
|
|
132
|
-
authType: args.options.authType ||
|
|
132
|
+
authType: args.options.authType || cli.getSettingWithDefaultValue(settingsNames.authType, 'deviceCode'),
|
|
133
133
|
cloud: args.options.cloud ?? CloudType.Public
|
|
134
134
|
});
|
|
135
135
|
});
|
|
@@ -159,7 +159,7 @@ _a = LoginCommand, _LoginCommand_instances = new WeakSet(), _LoginCommand_initTe
|
|
|
159
159
|
});
|
|
160
160
|
}, _LoginCommand_initValidators = function _LoginCommand_initValidators() {
|
|
161
161
|
this.validators.push(async (args) => {
|
|
162
|
-
const authType = args.options.authType ||
|
|
162
|
+
const authType = args.options.authType || cli.getSettingWithDefaultValue(settingsNames.authType, 'deviceCode');
|
|
163
163
|
if (authType === 'password') {
|
|
164
164
|
if (!args.options.userName) {
|
|
165
165
|
return 'Required option userName missing';
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SetupCommand_instances, _SetupCommand_initTelemetry, _SetupCommand_initOptions, _SetupCommand_initValidators;
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import os from 'os';
|
|
9
|
-
import {
|
|
9
|
+
import { cli } from '../../cli/cli.js';
|
|
10
10
|
import { CheckStatus, formatting } from '../../utils/formatting.js';
|
|
11
11
|
import { pid } from '../../utils/pid.js';
|
|
12
12
|
import AnonymousCommand from '../base/AnonymousCommand.js';
|
|
@@ -43,7 +43,7 @@ class SetupCommand extends AnonymousCommand {
|
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
// stop the spinner. Fixes #5598
|
|
46
|
-
|
|
46
|
+
cli.spinner.stop();
|
|
47
47
|
await logger.logToStderr(`Welcome to the CLI for Microsoft 365 setup!`);
|
|
48
48
|
await logger.logToStderr(`This command will guide you through the process of configuring the CLI for your needs.`);
|
|
49
49
|
await logger.logToStderr(`Please, answer the following questions and we'll define a set of settings to best match how you intend to use the CLI.`);
|
|
@@ -56,13 +56,13 @@ class SetupCommand extends AnonymousCommand {
|
|
|
56
56
|
{ name: 'Scripting', value: 'Scripting' }
|
|
57
57
|
]
|
|
58
58
|
};
|
|
59
|
-
preferences.usageMode = await
|
|
59
|
+
preferences.usageMode = await cli.promptForSelection(usageModeConfig);
|
|
60
60
|
if (preferences.usageMode === 'Scripting') {
|
|
61
61
|
const usedInPowerShellConfig = {
|
|
62
62
|
message: 'Are you going to use the CLI in PowerShell?',
|
|
63
63
|
default: pid.isPowerShell()
|
|
64
64
|
};
|
|
65
|
-
preferences.usedInPowerShell = await
|
|
65
|
+
preferences.usedInPowerShell = await cli.promptForConfirmation(usedInPowerShellConfig);
|
|
66
66
|
}
|
|
67
67
|
const experienceConfig = {
|
|
68
68
|
message: 'How experienced are you in using the CLI?',
|
|
@@ -71,7 +71,7 @@ class SetupCommand extends AnonymousCommand {
|
|
|
71
71
|
{ name: 'Proficient', value: 'Proficient' }
|
|
72
72
|
]
|
|
73
73
|
};
|
|
74
|
-
preferences.experience = await
|
|
74
|
+
preferences.experience = await cli.promptForSelection(experienceConfig);
|
|
75
75
|
const summaryConfig = {
|
|
76
76
|
// invoked by inquirer
|
|
77
77
|
/* c8 ignore next 6 */
|
|
@@ -81,7 +81,7 @@ class SetupCommand extends AnonymousCommand {
|
|
|
81
81
|
return this.getSummaryMessage(settings);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
preferences.summary = await
|
|
84
|
+
preferences.summary = await cli.promptForConfirmation(summaryConfig);
|
|
85
85
|
if (preferences.summary) {
|
|
86
86
|
// used only for testing. Normally, we'd get the settings from the answers
|
|
87
87
|
/* c8 ignore next 3 */
|
|
@@ -92,7 +92,7 @@ class SetupCommand extends AnonymousCommand {
|
|
|
92
92
|
await logger.logToStderr('Configuring settings...');
|
|
93
93
|
await logger.logToStderr('');
|
|
94
94
|
// start the spinner. Fixes #5598
|
|
95
|
-
|
|
95
|
+
cli.spinner.start();
|
|
96
96
|
await this.configureSettings(settings, false, logger);
|
|
97
97
|
if (!this.verbose) {
|
|
98
98
|
await logger.logToStderr('');
|
|
@@ -137,7 +137,7 @@ class SetupCommand extends AnonymousCommand {
|
|
|
137
137
|
await logger.logToStderr(JSON.stringify(settings, null, 2));
|
|
138
138
|
}
|
|
139
139
|
for (const [key, value] of Object.entries(settings)) {
|
|
140
|
-
|
|
140
|
+
cli.getConfig().set(key, value);
|
|
141
141
|
if (!silent) {
|
|
142
142
|
await logger.logToStderr(formatting.getStatus(CheckStatus.Success, `${key}: ${value}`));
|
|
143
143
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _ContextRemoveCommand_instances, _ContextRemoveCommand_initTelemetry, _ContextRemoveCommand_initOptions;
|
|
7
7
|
import fs from 'fs';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../cli/cli.js';
|
|
9
9
|
import { CommandError } from '../../../Command.js';
|
|
10
10
|
import AnonymousCommand from '../../base/AnonymousCommand.js';
|
|
11
11
|
import commands from '../commands.js';
|
|
@@ -27,7 +27,7 @@ class ContextRemoveCommand extends AnonymousCommand {
|
|
|
27
27
|
await this.removeContext();
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
const result = await
|
|
30
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the context?` });
|
|
31
31
|
if (result) {
|
|
32
32
|
await this.removeContext();
|
|
33
33
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _ContextOptionRemoveCommand_instances, _ContextOptionRemoveCommand_initTelemetry, _ContextOptionRemoveCommand_initOptions;
|
|
7
7
|
import fs from 'fs';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import { CommandError } from '../../../../Command.js';
|
|
10
10
|
import ContextCommand from '../../../base/ContextCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
@@ -30,7 +30,7 @@ class ContextOptionRemoveCommand extends ContextCommand {
|
|
|
30
30
|
await this.removeContextOption(args.options.name, logger);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
const result = await
|
|
33
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the context option ${args.options.name}?` });
|
|
34
34
|
if (result) {
|
|
35
35
|
await this.removeContextOption(args.options.name, logger);
|
|
36
36
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _ExternalConnectionDoctorCommand_instances, _a, _ExternalConnectionDoctorCommand_initOptions, _ExternalConnectionDoctorCommand_initValidators;
|
|
7
7
|
import os from 'os';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { settingsNames } from '../../../../settingsNames.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -28,7 +28,6 @@ class ExternalConnectionDoctorCommand extends GraphCommand {
|
|
|
28
28
|
const ux = args.options.ux ?? 'all';
|
|
29
29
|
const output = args.options.output;
|
|
30
30
|
this.checksStatus = [];
|
|
31
|
-
const cli = Cli.getInstance();
|
|
32
31
|
const showSpinner = cli.getSettingWithDefaultValue(settingsNames.showSpinner, true) &&
|
|
33
32
|
output === 'text' &&
|
|
34
33
|
typeof global.it === 'undefined';
|
|
@@ -4,7 +4,7 @@ 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 _ExternalConnectionRemoveCommand_instances, _ExternalConnectionRemoveCommand_initTelemetry, _ExternalConnectionRemoveCommand_initOptions, _ExternalConnectionRemoveCommand_initOptionSets;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -45,7 +45,7 @@ class ExternalConnectionRemoveCommand extends GraphCommand {
|
|
|
45
45
|
throw `The specified connection does not exist`;
|
|
46
46
|
}
|
|
47
47
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
|
|
48
|
-
const result = await
|
|
48
|
+
const result = await cli.handleMultipleResultsFound(`Multiple external connections with name ${args.options.name} found.`, resultAsKeyValuePair);
|
|
49
49
|
return result.id;
|
|
50
50
|
}
|
|
51
51
|
async commandAction(logger, args) {
|
|
@@ -53,7 +53,7 @@ class ExternalConnectionRemoveCommand extends GraphCommand {
|
|
|
53
53
|
await this.removeExternalConnection(args);
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
const result = await
|
|
56
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?` });
|
|
57
57
|
if (result) {
|
|
58
58
|
await this.removeExternalConnection(args);
|
|
59
59
|
}
|
|
@@ -4,7 +4,7 @@ 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 _FlowRemoveCommand_instances, _FlowRemoveCommand_initTelemetry, _FlowRemoveCommand_initOptions, _FlowRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../cli/cli.js';
|
|
8
8
|
import request from '../../../request.js';
|
|
9
9
|
import { formatting } from '../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../utils/validation.js';
|
|
@@ -53,7 +53,7 @@ class FlowRemoveCommand extends AzmgmtCommand {
|
|
|
53
53
|
await removeFlow();
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
const result = await
|
|
56
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the Microsoft Flow ${args.options.name}?` });
|
|
57
57
|
if (result) {
|
|
58
58
|
await removeFlow();
|
|
59
59
|
}
|
|
@@ -4,7 +4,7 @@ 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 _FlowOwnerListCommand_instances, _FlowOwnerListCommand_initTelemetry, _FlowOwnerListCommand_initOptions, _FlowOwnerListCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -33,7 +33,7 @@ class FlowOwnerListCommand extends AzmgmtCommand {
|
|
|
33
33
|
await logger.logToStderr(`Listing owners for flow ${args.options.flowName} in environment ${args.options.environmentName}`);
|
|
34
34
|
}
|
|
35
35
|
const response = await odata.getAllItems(`${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/permissions?api-version=2016-11-01`);
|
|
36
|
-
if (!
|
|
36
|
+
if (!cli.shouldTrimOutput(args.options.output)) {
|
|
37
37
|
await logger.log(response);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
@@ -4,7 +4,7 @@ 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 _FlowOwnerRemoveCommand_instances, _FlowOwnerRemoveCommand_initTelemetry, _FlowOwnerRemoveCommand_initOptions, _FlowOwnerRemoveCommand_initValidators, _FlowOwnerRemoveCommand_initOptionSets;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
10
10
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
@@ -66,7 +66,7 @@ class FlowOwnerRemoveCommand extends AzmgmtCommand {
|
|
|
66
66
|
await removeFlowOwner();
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
const result = await
|
|
69
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove owner '${args.options.groupId || args.options.groupName || args.options.userId || args.options.userName}' from the specified flow?` });
|
|
70
70
|
if (result) {
|
|
71
71
|
await removeFlowOwner();
|
|
72
72
|
}
|
|
@@ -4,7 +4,7 @@ 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 _FlowRunCancelCommand_instances, _FlowRunCancelCommand_initTelemetry, _FlowRunCancelCommand_initOptions, _FlowRunCancelCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -47,7 +47,7 @@ class FlowRunCancelCommand extends AzmgmtCommand {
|
|
|
47
47
|
await cancelFlow();
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
const result = await
|
|
50
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to cancel the flow run ${args.options.name}?` });
|
|
51
51
|
if (result) {
|
|
52
52
|
await cancelFlow();
|
|
53
53
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _FlowRunResubmitCommand_instances, _FlowRunResubmitCommand_initTelemetry, _FlowRunResubmitCommand_initOptions, _FlowRunResubmitCommand_initValidators;
|
|
7
7
|
import chalk from 'chalk';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -52,7 +52,7 @@ class FlowRunResubmitCommand extends AzmgmtCommand {
|
|
|
52
52
|
await resubmitFlow();
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
const result = await
|
|
55
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to resubmit the flow with run ${args.options.name}?` });
|
|
56
56
|
if (result) {
|
|
57
57
|
await resubmitFlow();
|
|
58
58
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _GraphChangelogListCommand_instances, _GraphChangelogListCommand_initTelemetry, _GraphChangelogListCommand_initOptions, _GraphChangelogListCommand_initValidators;
|
|
7
7
|
import { DOMParser } from '@xmldom/xmldom';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { md } from '../../../../utils/md.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -94,14 +94,14 @@ class GraphChangelogListCommand extends AnonymousCommand {
|
|
|
94
94
|
items: []
|
|
95
95
|
};
|
|
96
96
|
Array.from(xmlDoc.getElementsByTagName('item')).forEach((item) => {
|
|
97
|
-
const description =
|
|
97
|
+
const description = cli.shouldTrimOutput(args.options.output) ?
|
|
98
98
|
md.md2plain(item.getElementsByTagName('description').item(0).textContent, '') :
|
|
99
99
|
item.getElementsByTagName('description').item(0).textContent;
|
|
100
100
|
changelog.items.push({
|
|
101
101
|
guid: item.getElementsByTagName('guid').item(0).textContent,
|
|
102
102
|
category: item.getElementsByTagName('category').item(1).textContent,
|
|
103
103
|
title: item.getElementsByTagName('title').item(0).textContent,
|
|
104
|
-
description:
|
|
104
|
+
description: cli.shouldTrimOutput(args.options.output) ?
|
|
105
105
|
description.length > 50 ? `${description.substring(0, 47)}...` : description :
|
|
106
106
|
description,
|
|
107
107
|
pubDate: new Date(item.getElementsByTagName('pubDate').item(0).textContent)
|
|
@@ -4,7 +4,7 @@ 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 _GraphSchemaExtensionRemoveCommand_instances, _GraphSchemaExtensionRemoveCommand_initTelemetry, _GraphSchemaExtensionRemoveCommand_initOptions;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -45,7 +45,7 @@ class GraphSchemaExtensionRemoveCommand extends GraphCommand {
|
|
|
45
45
|
await removeSchemaExtension();
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
const result = await
|
|
48
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the schema extension with ID ${args.options.id}?` });
|
|
49
49
|
if (result) {
|
|
50
50
|
await removeSchemaExtension();
|
|
51
51
|
}
|
|
@@ -10,7 +10,7 @@ import { odata } from '../../../../utils/odata.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
import { Outlook } from '../../Outlook.js';
|
|
13
|
-
import {
|
|
13
|
+
import { cli } from '../../../../cli/cli.js';
|
|
14
14
|
class OutlookMessageListCommand extends GraphCommand {
|
|
15
15
|
get name() {
|
|
16
16
|
return commands.MESSAGE_LIST;
|
|
@@ -62,7 +62,7 @@ class OutlookMessageListCommand extends GraphCommand {
|
|
|
62
62
|
}
|
|
63
63
|
if (response.value.length > 1) {
|
|
64
64
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
|
|
65
|
-
const result = await
|
|
65
|
+
const result = await cli.handleMultipleResultsFound(`Multiple folders with name '${args.options.folderName}' found.`, resultAsKeyValuePair);
|
|
66
66
|
return result.id;
|
|
67
67
|
}
|
|
68
68
|
return response.value[0].id;
|
|
@@ -9,7 +9,7 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
11
|
import { Outlook } from '../../Outlook.js';
|
|
12
|
-
import {
|
|
12
|
+
import { cli } from '../../../../cli/cli.js';
|
|
13
13
|
class OutlookMessageMoveCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.MESSAGE_MOVE;
|
|
@@ -67,7 +67,7 @@ class OutlookMessageMoveCommand extends GraphCommand {
|
|
|
67
67
|
}
|
|
68
68
|
if (response.value.length > 1) {
|
|
69
69
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
|
|
70
|
-
const result = await
|
|
70
|
+
const result = await cli.handleMultipleResultsFound(`Multiple folders with name '${folderName}' found.`, resultAsKeyValuePair);
|
|
71
71
|
return result.id;
|
|
72
72
|
}
|
|
73
73
|
return response.value[0].id;
|
|
@@ -4,7 +4,7 @@ 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 _PaAppConsentSetCommand_instances, _PaAppConsentSetCommand_initOptions, _PaAppConsentSetCommand_initValidators, _PaAppConsentSetCommand_initTypes;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import PowerAppsCommand from '../../../base/PowerAppsCommand.js';
|
|
@@ -31,7 +31,7 @@ class PaAppConsentSetCommand extends PowerAppsCommand {
|
|
|
31
31
|
await this.consentPaApp(args);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
const result = await
|
|
34
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you bypass the consent for the Microsoft Power App ${args.options.name} to ${args.options.bypass}?` });
|
|
35
35
|
if (result) {
|
|
36
36
|
await this.consentPaApp(args);
|
|
37
37
|
}
|
|
@@ -4,7 +4,7 @@ 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 _PaAppGetCommand_instances, _PaAppGetCommand_initTelemetry, _PaAppGetCommand_initOptions, _PaAppGetCommand_initValidators, _PaAppGetCommand_initOptionSets;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -84,7 +84,7 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
84
84
|
debug: this.debug,
|
|
85
85
|
verbose: this.verbose
|
|
86
86
|
};
|
|
87
|
-
return await
|
|
87
|
+
return await cli.executeCommandWithOutput(paAppListCommand, { options: { ...options, _: [] } });
|
|
88
88
|
}
|
|
89
89
|
setProperties(app) {
|
|
90
90
|
app.displayName = app.properties.displayName;
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _PaAppPermissionRemoveCommand_instances, _PaAppPermissionRemoveCommand_initTelemetry, _PaAppPermissionRemoveCommand_initOptions, _PaAppPermissionRemoveCommand_initValidators, _PaAppPermissionRemoveCommand_initOptionSets, _PaAppPermissionRemoveCommand_initTypes;
|
|
7
7
|
import Auth from '../../../../Auth.js';
|
|
8
|
-
import {
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
11
11
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
@@ -35,7 +35,7 @@ class PaAppPermissionRemoveCommand extends PowerAppsCommand {
|
|
|
35
35
|
await this.removeAppPermission(logger, args.options);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
const result = await
|
|
38
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the permissions of '${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || (args.options.tenant && 'everyone')}' from the Power App '${args.options.appName}'?` });
|
|
39
39
|
if (result) {
|
|
40
40
|
await this.removeAppPermission(logger, args.options);
|
|
41
41
|
}
|
|
@@ -4,7 +4,7 @@ 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 _PaAppRemoveCommand_instances, _PaAppRemoveCommand_initTelemetry, _PaAppRemoveCommand_initOptions, _PaAppRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { CommandError } from '../../../../Command.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -54,7 +54,7 @@ class PaAppRemoveCommand extends PowerAppsCommand {
|
|
|
54
54
|
await removePaApp();
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
|
-
const result = await
|
|
57
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the Microsoft Power App ${args.options.name}?` });
|
|
58
58
|
if (result) {
|
|
59
59
|
await removePaApp();
|
|
60
60
|
}
|
|
@@ -10,7 +10,7 @@ import { planner } from '../../../../utils/planner.js';
|
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
import {
|
|
13
|
+
import { cli } from '../../../../cli/cli.js';
|
|
14
14
|
import { formatting } from '../../../../utils/formatting.js';
|
|
15
15
|
class PlannerBucketGetCommand extends GraphCommand {
|
|
16
16
|
get name() {
|
|
@@ -58,7 +58,7 @@ class PlannerBucketGetCommand extends GraphCommand {
|
|
|
58
58
|
}
|
|
59
59
|
if (filteredBuckets.length > 1) {
|
|
60
60
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', filteredBuckets);
|
|
61
|
-
const result = await
|
|
61
|
+
const result = await cli.handleMultipleResultsFound(`Multiple buckets with name '${name}' found.`, resultAsKeyValuePair);
|
|
62
62
|
return result.id.toString();
|
|
63
63
|
}
|
|
64
64
|
return filteredBuckets[0].id.toString();
|
|
@@ -4,7 +4,7 @@ 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 _PlannerBucketRemoveCommand_instances, _PlannerBucketRemoveCommand_initTelemetry, _PlannerBucketRemoveCommand_initOptions, _PlannerBucketRemoveCommand_initValidators, _PlannerBucketRemoveCommand_initOptionSets, _PlannerBucketRemoveCommand_initTypes;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
10
10
|
import { planner } from '../../../../utils/planner.js';
|
|
@@ -50,7 +50,7 @@ class PlannerBucketRemoveCommand extends GraphCommand {
|
|
|
50
50
|
await removeBucket();
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
const result = await
|
|
53
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the bucket ${args.options.id || args.options.name}?` });
|
|
54
54
|
if (result) {
|
|
55
55
|
await removeBucket();
|
|
56
56
|
}
|
|
@@ -82,7 +82,7 @@ class PlannerBucketRemoveCommand extends GraphCommand {
|
|
|
82
82
|
}
|
|
83
83
|
if (filteredBuckets.length > 1) {
|
|
84
84
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', filteredBuckets);
|
|
85
|
-
return await
|
|
85
|
+
return await cli.handleMultipleResultsFound(`Multiple buckets with name '${args.options.name}' found.`, resultAsKeyValuePair);
|
|
86
86
|
}
|
|
87
87
|
return filteredBuckets[0];
|
|
88
88
|
}
|
|
@@ -10,7 +10,7 @@ import { planner } from '../../../../utils/planner.js';
|
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
import {
|
|
13
|
+
import { cli } from '../../../../cli/cli.js';
|
|
14
14
|
import { formatting } from '../../../../utils/formatting.js';
|
|
15
15
|
class PlannerBucketSetCommand extends GraphCommand {
|
|
16
16
|
get name() {
|
|
@@ -79,7 +79,7 @@ class PlannerBucketSetCommand extends GraphCommand {
|
|
|
79
79
|
}
|
|
80
80
|
if (filteredBuckets.length > 1) {
|
|
81
81
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', filteredBuckets);
|
|
82
|
-
return await
|
|
82
|
+
return await cli.handleMultipleResultsFound(`Multiple buckets with name '${args.options.name}' found.`, resultAsKeyValuePair);
|
|
83
83
|
}
|
|
84
84
|
return filteredBuckets[0];
|
|
85
85
|
}
|
|
@@ -4,7 +4,7 @@ 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 _PlannerPlanRemoveCommand_instances, _PlannerPlanRemoveCommand_initTelemetry, _PlannerPlanRemoveCommand_initOptions, _PlannerPlanRemoveCommand_initValidators, _PlannerPlanRemoveCommand_initOptionSets, _PlannerPlanRemoveCommand_initTypes;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
10
10
|
import { planner } from '../../../../utils/planner.js';
|
|
@@ -49,7 +49,7 @@ class PlannerPlanRemoveCommand extends GraphCommand {
|
|
|
49
49
|
await removePlan();
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
const result = await
|
|
52
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the plan ${args.options.id || args.options.title}?` });
|
|
53
53
|
if (result) {
|
|
54
54
|
await removePlan();
|
|
55
55
|
}
|