@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
|
@@ -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 _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_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';
|
|
@@ -58,7 +58,7 @@ class SpoListRemoveCommand extends SpoCommand {
|
|
|
58
58
|
await removeList();
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
const result = await
|
|
61
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the list ${args.options.id || args.options.title} from site ${args.options.webUrl}?` });
|
|
62
62
|
if (result) {
|
|
63
63
|
await removeList();
|
|
64
64
|
}
|
|
@@ -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 _SpoListRetentionLabelRemoveCommand_instances, _SpoListRetentionLabelRemoveCommand_initTelemetry, _SpoListRetentionLabelRemoveCommand_initOptions, _SpoListRetentionLabelRemoveCommand_initValidators, _SpoListRetentionLabelRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -32,7 +32,7 @@ class SpoListRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
32
32
|
await this.removeListRetentionLabel(logger, args);
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
const result = await
|
|
35
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the retention label from list '${args.options.listId || args.options.listTitle || args.options.listUrl}'?` });
|
|
36
36
|
if (result) {
|
|
37
37
|
await this.removeListRetentionLabel(logger, args);
|
|
38
38
|
}
|
|
@@ -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 _SpoListRoleAssignmentRemoveCommand_instances, _SpoListRoleAssignmentRemoveCommand_initTelemetry, _SpoListRoleAssignmentRemoveCommand_initOptions, _SpoListRoleAssignmentRemoveCommand_initValidators, _SpoListRoleAssignmentRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -65,7 +65,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
65
65
|
await removeRoleAssignment();
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
|
-
const result = await
|
|
68
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove role assignment from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?` });
|
|
69
69
|
if (result) {
|
|
70
70
|
await removeRoleAssignment();
|
|
71
71
|
}
|
|
@@ -91,7 +91,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
91
91
|
debug: this.debug,
|
|
92
92
|
verbose: this.verbose
|
|
93
93
|
};
|
|
94
|
-
const output = await
|
|
94
|
+
const output = await cli.executeCommandWithOutput(spoGroupGetCommand, { options: { ...groupGetCommandOptions, _: [] } });
|
|
95
95
|
const getGroupOutput = JSON.parse(output.stdout);
|
|
96
96
|
return getGroupOutput.Id;
|
|
97
97
|
}
|
|
@@ -104,7 +104,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
104
104
|
debug: this.debug,
|
|
105
105
|
verbose: this.verbose
|
|
106
106
|
};
|
|
107
|
-
const output = await
|
|
107
|
+
const output = await cli.executeCommandWithOutput(spoUserGetCommand, { options: { ...userGetCommandOptions, _: [] } });
|
|
108
108
|
const getUserOutput = JSON.parse(output.stdout);
|
|
109
109
|
return getUserOutput.Id;
|
|
110
110
|
}
|
|
@@ -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 _SpoListRoleInheritanceBreakCommand_instances, _SpoListRoleInheritanceBreakCommand_initTelemetry, _SpoListRoleInheritanceBreakCommand_initOptions, _SpoListRoleInheritanceBreakCommand_initValidators, _SpoListRoleInheritanceBreakCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -66,7 +66,7 @@ class SpoListRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
66
66
|
await breakListRoleInheritance();
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
const result = await
|
|
69
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to break the role inheritance of ${args.options.listId ?? args.options.listTitle}?` });
|
|
70
70
|
if (result) {
|
|
71
71
|
await breakListRoleInheritance();
|
|
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 _SpoListRoleInheritanceResetCommand_instances, _SpoListRoleInheritanceResetCommand_initTelemetry, _SpoListRoleInheritanceResetCommand_initOptions, _SpoListRoleInheritanceResetCommand_initValidators, _SpoListRoleInheritanceResetCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -62,7 +62,7 @@ class SpoListRoleInheritanceResetCommand extends SpoCommand {
|
|
|
62
62
|
await resetListRoleInheritance();
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
const result = await
|
|
65
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to reset the role inheritance of ${args.options.listId ?? args.options.listTitle}?` });
|
|
66
66
|
if (result) {
|
|
67
67
|
await resetListRoleInheritance();
|
|
68
68
|
}
|
|
@@ -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 _SpoListViewFieldRemoveCommand_instances, _SpoListViewFieldRemoveCommand_initTelemetry, _SpoListViewFieldRemoveCommand_initOptions, _SpoListViewFieldRemoveCommand_initValidators, _SpoListViewFieldRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -67,7 +67,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand {
|
|
|
67
67
|
await removeFieldFromView();
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
const result = await
|
|
70
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the field ${args.options.id || args.options.title} from the view ${args.options.viewId || args.options.viewTitle} from list ${args.options.listId || args.options.listTitle} in site ${args.options.webUrl}?` });
|
|
71
71
|
if (result) {
|
|
72
72
|
await removeFieldFromView();
|
|
73
73
|
}
|
|
@@ -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 _SpoListViewRemoveCommand_instances, _SpoListViewRemoveCommand_initTelemetry, _SpoListViewRemoveCommand_initOptions, _SpoListViewRemoveCommand_initValidators, _SpoListViewRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -65,7 +65,7 @@ class SpoListViewRemoveCommand extends SpoCommand {
|
|
|
65
65
|
await removeViewFromList();
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
|
-
const result = await
|
|
68
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the view ${args.options.id || args.options.title} from the list ${args.options.listId || args.options.listTitle || args.options.listUrl} in site ${args.options.webUrl}?` });
|
|
69
69
|
if (result) {
|
|
70
70
|
await removeViewFromList();
|
|
71
71
|
}
|
|
@@ -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 _SpoListWebhookRemoveCommand_instances, _SpoListWebhookRemoveCommand_initTelemetry, _SpoListWebhookRemoveCommand_initOptions, _SpoListWebhookRemoveCommand_initValidators, _SpoListWebhookRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -63,7 +63,7 @@ class SpoListWebhookRemoveCommand extends SpoCommand {
|
|
|
63
63
|
await removeWebhook();
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
const result = await
|
|
66
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove webhook ${args.options.id} from list ${args.options.listTitle || args.options.listId || args.options.listUrl} located at site ${args.options.webUrl}?` });
|
|
67
67
|
if (result) {
|
|
68
68
|
await removeWebhook();
|
|
69
69
|
}
|
|
@@ -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 _SpoListItemAttachmentRemoveCommand_instances, _SpoListItemAttachmentRemoveCommand_initTelemetry, _SpoListItemAttachmentRemoveCommand_initOptions, _SpoListItemAttachmentRemoveCommand_initValidators, _SpoListItemAttachmentRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -63,7 +63,7 @@ class SpoListItemAttachmentRemoveCommand extends SpoCommand {
|
|
|
63
63
|
await removeListItemAttachment();
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
const result = await
|
|
66
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the attachment ${args.options.fileName} of item with id ${args.options.listItemId} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?` });
|
|
67
67
|
if (result) {
|
|
68
68
|
await removeListItemAttachment();
|
|
69
69
|
}
|
|
@@ -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 _SpoListItemListCommand_instances, _SpoListItemListCommand_initTelemetry, _SpoListItemListCommand_initOptions, _SpoListItemListCommand_initValidators, _SpoListItemListCommand_initOptionSets, _SpoListItemListCommand_initTypes;
|
|
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 { odata } from '../../../../utils/odata.js';
|
|
@@ -58,7 +58,7 @@ class SpoListItemListCommand extends SpoCommand {
|
|
|
58
58
|
}
|
|
59
59
|
const queryParams = [];
|
|
60
60
|
const fieldsArray = options.fields ? options.fields.split(",")
|
|
61
|
-
: (!options.output ||
|
|
61
|
+
: (!options.output || cli.shouldTrimOutput(options.output)) ? ["Title", "Id"] : [];
|
|
62
62
|
const expandFieldsArray = this.getExpandFieldsArray(fieldsArray);
|
|
63
63
|
const skipTokenId = await this.getLastItemIdForPage(logger, options, listApiUrl);
|
|
64
64
|
queryParams.push(`$top=${options.pageSize || 5000}`);
|
|
@@ -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 _SpoListItemRemoveCommand_instances, _SpoListItemRemoveCommand_initTelemetry, _SpoListItemRemoveCommand_initOptions, _SpoListItemRemoveCommand_initValidators, _SpoListItemRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -68,7 +68,7 @@ class SpoListItemRemoveCommand extends SpoCommand {
|
|
|
68
68
|
await removeListItem();
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
const result = await
|
|
71
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to ${args.options.recycle ? "recycle" : "remove"} the list item ${args.options.id} from list ${args.options.listId || args.options.listTitle || args.options.listUrl} located in site ${args.options.webUrl}?` });
|
|
72
72
|
if (result) {
|
|
73
73
|
await removeListItem();
|
|
74
74
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoListItemRetentionLabelRemoveCommand_instances, _SpoListItemRetentionLabelRemoveCommand_initTelemetry, _SpoListItemRetentionLabelRemoveCommand_initOptions, _SpoListItemRetentionLabelRemoveCommand_initValidators, _SpoListItemRetentionLabelRemoveCommand_initOptionSets;
|
|
7
7
|
import * as url from 'url';
|
|
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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -33,7 +33,7 @@ class SpoListItemRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
33
33
|
await this.removeListItemRetentionLabel(logger, args);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
const result = await
|
|
36
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the retentionlabel from list item ${args.options.listItemId} from list '${args.options.listId || args.options.listTitle || args.options.listUrl}' located in site ${args.options.webUrl}?` });
|
|
37
37
|
if (result) {
|
|
38
38
|
await this.removeListItemRetentionLabel(logger, args);
|
|
39
39
|
}
|
|
@@ -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 _SpoListItemRoleAssignmentAddCommand_instances, _SpoListItemRoleAssignmentAddCommand_initTelemetry, _SpoListItemRoleAssignmentAddCommand_initOptions, _SpoListItemRoleAssignmentAddCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -86,7 +86,7 @@ class SpoListItemRoleAssignmentAddCommand extends SpoCommand {
|
|
|
86
86
|
debug: this.debug,
|
|
87
87
|
verbose: this.verbose
|
|
88
88
|
};
|
|
89
|
-
const output = await
|
|
89
|
+
const output = await cli.executeCommandWithOutput(spoRoleDefinitionListCommand, { options: { ...roleDefinitionListCommandOptions, _: [] } });
|
|
90
90
|
const getRoleDefinitionListOutput = JSON.parse(output.stdout);
|
|
91
91
|
const roleDefinitionId = getRoleDefinitionListOutput.find((role) => role.Name === options.roleDefinitionName).Id;
|
|
92
92
|
return roleDefinitionId;
|
|
@@ -99,7 +99,7 @@ class SpoListItemRoleAssignmentAddCommand extends SpoCommand {
|
|
|
99
99
|
debug: this.debug,
|
|
100
100
|
verbose: this.verbose
|
|
101
101
|
};
|
|
102
|
-
const output = await
|
|
102
|
+
const output = await cli.executeCommandWithOutput(spoGroupGetCommand, { options: { ...groupGetCommandOptions, _: [] } });
|
|
103
103
|
const getGroupOutput = JSON.parse(output.stdout);
|
|
104
104
|
return getGroupOutput.Id;
|
|
105
105
|
}
|
|
@@ -112,7 +112,7 @@ class SpoListItemRoleAssignmentAddCommand extends SpoCommand {
|
|
|
112
112
|
debug: this.debug,
|
|
113
113
|
verbose: this.verbose
|
|
114
114
|
};
|
|
115
|
-
const output = await
|
|
115
|
+
const output = await cli.executeCommandWithOutput(spoUserGetCommand, { options: { ...userGetCommandOptions, _: [] } });
|
|
116
116
|
const getUserOutput = JSON.parse(output.stdout);
|
|
117
117
|
return getUserOutput.Id;
|
|
118
118
|
}
|
|
@@ -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 _SpoListItemRoleAssignmentRemoveCommand_instances, _SpoListItemRoleAssignmentRemoveCommand_initTelemetry, _SpoListItemRoleAssignmentRemoveCommand_initOptions, _SpoListItemRoleAssignmentRemoveCommand_initValidators, _SpoListItemRoleAssignmentRemoveCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -33,7 +33,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
33
33
|
await this.removeRoleAssignment(logger, args.options);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
const result = await
|
|
36
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove role assignment from listitem ${args.options.listItemId} from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?` });
|
|
37
37
|
if (result) {
|
|
38
38
|
await this.removeRoleAssignment(logger, args.options);
|
|
39
39
|
}
|
|
@@ -92,7 +92,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
92
92
|
debug: this.debug,
|
|
93
93
|
verbose: this.verbose
|
|
94
94
|
};
|
|
95
|
-
const output = await
|
|
95
|
+
const output = await cli.executeCommandWithOutput(spoGroupGetCommand, { options: { ...groupGetCommandOptions, _: [] } });
|
|
96
96
|
const getGroupOutput = JSON.parse(output.stdout);
|
|
97
97
|
return getGroupOutput.Id;
|
|
98
98
|
}
|
|
@@ -105,7 +105,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
105
105
|
debug: this.debug,
|
|
106
106
|
verbose: this.verbose
|
|
107
107
|
};
|
|
108
|
-
const output = await
|
|
108
|
+
const output = await cli.executeCommandWithOutput(spoUserGetCommand, { options: { ...userGetCommandOptions, _: [] } });
|
|
109
109
|
const getUserOutput = JSON.parse(output.stdout);
|
|
110
110
|
return getUserOutput.Id;
|
|
111
111
|
}
|
|
@@ -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 _SpoListItemRoleInheritanceBreakCommand_instances, _SpoListItemRoleInheritanceBreakCommand_initTelemetry, _SpoListItemRoleInheritanceBreakCommand_initOptions, _SpoListItemRoleInheritanceBreakCommand_initValidators, _SpoListItemRoleInheritanceBreakCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -34,7 +34,7 @@ class SpoListItemRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
34
34
|
await this.breakListItemRoleInheritance(args.options);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
const result = await
|
|
37
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to break the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?` });
|
|
38
38
|
if (result) {
|
|
39
39
|
await this.breakListItemRoleInheritance(args.options);
|
|
40
40
|
}
|
|
@@ -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 _SpoListItemRoleInheritanceResetCommand_instances, _SpoListItemRoleInheritanceResetCommand_initTelemetry, _SpoListItemRoleInheritanceResetCommand_initOptions, _SpoListItemRoleInheritanceResetCommand_initValidators, _SpoListItemRoleInheritanceResetCommand_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 { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -34,7 +34,7 @@ class SpoListItemRoleInheritanceResetCommand extends SpoCommand {
|
|
|
34
34
|
await this.resetListItemRoleInheritance(args.options);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
const result = await
|
|
37
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to reset the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?` });
|
|
38
38
|
if (result) {
|
|
39
39
|
await this.resetListItemRoleInheritance(args.options);
|
|
40
40
|
}
|
|
@@ -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 _SpoNavigationNodeRemoveCommand_instances, _SpoNavigationNodeRemoveCommand_initTelemetry, _SpoNavigationNodeRemoveCommand_initOptions, _SpoNavigationNodeRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -29,7 +29,7 @@ class SpoNavigationNodeRemoveCommand extends SpoCommand {
|
|
|
29
29
|
await this.removeNode(logger, args.options);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
const result = await
|
|
32
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the node ${args.options.id} from the navigation?` });
|
|
33
33
|
if (result) {
|
|
34
34
|
await this.removeNode(logger, args.options);
|
|
35
35
|
}
|
|
@@ -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 _SpoOrgAssetsLibraryRemoveCommand_instances, _SpoOrgAssetsLibraryRemoveCommand_initOptions;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import config from '../../../../config.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { spo } from '../../../../utils/spo.js';
|
|
@@ -27,7 +27,7 @@ class SpoOrgAssetsLibraryRemoveCommand extends SpoCommand {
|
|
|
27
27
|
await this.removeLibrary(logger, args.options.libraryUrl);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
const result = await
|
|
30
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the library ${args.options.libraryUrl} as a central location for organization assets?` });
|
|
31
31
|
if (result) {
|
|
32
32
|
await this.removeLibrary(logger, args.options.libraryUrl);
|
|
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 _SpoOrgNewsSiteRemoveCommand_instances, _SpoOrgNewsSiteRemoveCommand_initTelemetry, _SpoOrgNewsSiteRemoveCommand_initOptions, _SpoOrgNewsSiteRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import config from '../../../../config.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -31,7 +31,7 @@ class SpoOrgNewsSiteRemoveCommand extends SpoCommand {
|
|
|
31
31
|
await this.removeOrgNewsSite(logger, args.options.url);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
const result = await
|
|
34
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove ${args.options.url} from the list of organizational news sites?` });
|
|
35
35
|
if (result) {
|
|
36
36
|
await this.removeOrgNewsSite(logger, args.options.url);
|
|
37
37
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoPageAddCommand_instances, _SpoPageAddCommand_initTelemetry, _SpoPageAddCommand_initOptions, _SpoPageAddCommand_initValidators;
|
|
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 { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { spo } from '../../../../utils/spo.js';
|
|
@@ -84,7 +84,7 @@ class SpoPageAddCommand extends SpoCommand {
|
|
|
84
84
|
listItemSetOptions.PromotedState = 0;
|
|
85
85
|
listItemSetOptions.BannerImageUrl = `${resource}/_layouts/15/images/sitepagethumbnail.png, /_layouts/15/images/sitepagethumbnail.png`;
|
|
86
86
|
}
|
|
87
|
-
await
|
|
87
|
+
await cli.executeCommand(spoListItemSetCommand, { options: { ...listItemSetOptions, _: [] } });
|
|
88
88
|
const pageProps = await Page.checkout(pageName, args.options.webUrl, logger, this.debug, this.verbose);
|
|
89
89
|
if (pageProps) {
|
|
90
90
|
pageId = pageProps.Id;
|
|
@@ -122,7 +122,7 @@ class SpoPageAddCommand extends SpoCommand {
|
|
|
122
122
|
verbose: this.verbose,
|
|
123
123
|
debug: this.debug
|
|
124
124
|
};
|
|
125
|
-
await
|
|
125
|
+
await cli.executeCommand(spoListItemSetCommand, { options: { ...listItemSetOptions, _: [] } });
|
|
126
126
|
break;
|
|
127
127
|
case 'Template':
|
|
128
128
|
requestOptions.url = `${args.options.webUrl}/_api/SitePages/Pages(${listItemId})/SavePageAsTemplate`;
|
|
@@ -241,7 +241,7 @@ class SpoPageAddCommand extends SpoCommand {
|
|
|
241
241
|
verbose: this.verbose,
|
|
242
242
|
debug: this.debug
|
|
243
243
|
};
|
|
244
|
-
const fileGetOutput = await
|
|
244
|
+
const fileGetOutput = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...fileGetOptions, _: [] } });
|
|
245
245
|
const fileGetOutputJson = JSON.parse(fileGetOutput.stdout);
|
|
246
246
|
return fileGetOutputJson.Id;
|
|
247
247
|
}
|
|
@@ -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 _SpoPageColumnGetCommand_instances, _SpoPageColumnGetCommand_initOptions, _SpoPageColumnGetCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -28,7 +28,7 @@ class SpoPageColumnGetCommand extends SpoCommand {
|
|
|
28
28
|
const sections = clientSidePage.sections
|
|
29
29
|
.filter(section => section.order === args.options.section);
|
|
30
30
|
if (sections.length) {
|
|
31
|
-
const isJSONOutput = !
|
|
31
|
+
const isJSONOutput = !cli.shouldTrimOutput(args.options.output);
|
|
32
32
|
const columns = sections[0].columns.filter(col => col.order === args.options.column);
|
|
33
33
|
if (columns.length) {
|
|
34
34
|
const column = Page.getColumnsInformation(columns[0], isJSONOutput);
|
|
@@ -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 _SpoPageColumnListCommand_instances, _SpoPageColumnListCommand_initOptions, _SpoPageColumnListCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -28,7 +28,7 @@ class SpoPageColumnListCommand extends SpoCommand {
|
|
|
28
28
|
const sections = clientSidePage.sections
|
|
29
29
|
.filter(section => section.order === args.options.section);
|
|
30
30
|
if (sections.length) {
|
|
31
|
-
const isJSONOutput = !
|
|
31
|
+
const isJSONOutput = !cli.shouldTrimOutput(args.options.output);
|
|
32
32
|
await logger.log(sections[0].columns.map(c => {
|
|
33
33
|
const column = Page.getColumnsInformation(c, isJSONOutput);
|
|
34
34
|
column.controls = c.controls.length;
|
|
@@ -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 _SpoPageRemoveCommand_instances, _SpoPageRemoveCommand_initOptions, _SpoPageRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
10
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -29,7 +29,7 @@ class SpoPageRemoveCommand extends SpoCommand {
|
|
|
29
29
|
await this.removePage(logger, args);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
const result = await
|
|
32
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the page '${args.options.name}'?` });
|
|
33
33
|
if (result) {
|
|
34
34
|
await this.removePage(logger, args);
|
|
35
35
|
}
|
|
@@ -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 _SpoPageSectionGetCommand_instances, _SpoPageSectionGetCommand_initOptions, _SpoPageSectionGetCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -27,7 +27,7 @@ class SpoPageSectionGetCommand extends SpoCommand {
|
|
|
27
27
|
const clientSidePage = await Page.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose);
|
|
28
28
|
const sections = clientSidePage.sections
|
|
29
29
|
.filter(section => section.order === args.options.section);
|
|
30
|
-
const isJSONOutput = !
|
|
30
|
+
const isJSONOutput = !cli.shouldTrimOutput(args.options.output);
|
|
31
31
|
if (sections.length) {
|
|
32
32
|
await logger.log(Page.getSectionInformation(sections[0], isJSONOutput));
|
|
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 _SpoPageSectionListCommand_instances, _SpoPageSectionListCommand_initOptions, _SpoPageSectionListCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -26,7 +26,7 @@ class SpoPageSectionListCommand extends SpoCommand {
|
|
|
26
26
|
try {
|
|
27
27
|
const clientSidePage = await Page.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose);
|
|
28
28
|
const sections = clientSidePage.sections;
|
|
29
|
-
const isJSONOutput = !
|
|
29
|
+
const isJSONOutput = !cli.shouldTrimOutput(args.options.output);
|
|
30
30
|
if (sections.length) {
|
|
31
31
|
const output = sections.map(section => Page.getSectionInformation(section, isJSONOutput));
|
|
32
32
|
if (isJSONOutput) {
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoPageSetCommand_instances, _SpoPageSetCommand_initTelemetry, _SpoPageSetCommand_initOptions, _SpoPageSetCommand_initTypes, _SpoPageSetCommand_initValidators;
|
|
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 { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { spo } from '../../../../utils/spo.js';
|
|
@@ -79,7 +79,7 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
79
79
|
listItemSetOptions.PromotedState = 0;
|
|
80
80
|
listItemSetOptions.BannerImageUrl = `${resource}/_layouts/15/images/sitepagethumbnail.png, /_layouts/15/images/sitepagethumbnail.png`;
|
|
81
81
|
}
|
|
82
|
-
await
|
|
82
|
+
await cli.executeCommand(spoListItemSetCommand, { options: { ...listItemSetOptions, _: [] } });
|
|
83
83
|
}
|
|
84
84
|
if (args.options.promoteAs) {
|
|
85
85
|
const requestOptions = {
|
|
@@ -112,7 +112,7 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
112
112
|
verbose: this.verbose,
|
|
113
113
|
debug: this.debug
|
|
114
114
|
};
|
|
115
|
-
await
|
|
115
|
+
await cli.executeCommand(spoListItemSetCommand, { options: { ...listItemSetOptions, _: [] } });
|
|
116
116
|
break;
|
|
117
117
|
case 'Template':
|
|
118
118
|
const templateItemId = await this.getFileListItemId(args.options.webUrl, serverRelativeFileUrl);
|
|
@@ -220,7 +220,7 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
220
220
|
verbose: this.verbose,
|
|
221
221
|
debug: this.debug
|
|
222
222
|
};
|
|
223
|
-
await
|
|
223
|
+
await cli.executeCommandWithOutput(spoListItemSetCommand, { options: { ...listItemSetOptions, _: [] } });
|
|
224
224
|
}
|
|
225
225
|
let requestOptions;
|
|
226
226
|
if (!args.options.publish) {
|
|
@@ -262,7 +262,7 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
262
262
|
verbose: this.verbose,
|
|
263
263
|
debug: this.debug
|
|
264
264
|
};
|
|
265
|
-
const fileGetOutput = await
|
|
265
|
+
const fileGetOutput = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...fileGetOptions, _: [] } });
|
|
266
266
|
const fileGetOutputJson = JSON.parse(fileGetOutput.stdout);
|
|
267
267
|
return fileGetOutputJson.Id;
|
|
268
268
|
}
|
|
@@ -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 _SpoPropertyBagRemoveCommand_instances, _SpoPropertyBagRemoveCommand_initTelemetry, _SpoPropertyBagRemoveCommand_initOptions, _SpoPropertyBagRemoveCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import config from '../../../../config.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -31,7 +31,7 @@ class SpoPropertyBagRemoveCommand extends SpoPropertyBagBaseCommand {
|
|
|
31
31
|
await this.removeProperty(args);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
const result = await
|
|
34
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the ${args.options.key} property?` });
|
|
35
35
|
if (result) {
|
|
36
36
|
await this.removeProperty(args);
|
|
37
37
|
}
|