@pnp/cli-microsoft365 6.0.0-beta.78fdd2c → 6.0.0-beta.80d195f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +3 -1
- package/.devcontainer/devcontainer.json +1 -0
- package/dist/m365/aad/commands/app/app-add.js +161 -22
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +13 -13
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +14 -14
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +12 -12
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +6 -6
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +12 -12
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +14 -14
- package/dist/m365/booking/commands/business/business-get.js +86 -0
- package/dist/m365/booking/commands/business/business-list.js +30 -0
- package/dist/m365/booking/commands.js +8 -0
- package/dist/m365/flow/commands/flow-disable.js +2 -2
- package/dist/m365/flow/commands/flow-enable.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +5 -5
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/flow/commands/flow-list.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +6 -6
- package/dist/m365/flow/commands/run/run-get.js +4 -4
- package/dist/m365/flow/commands/run/run-list.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +7 -7
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +7 -7
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +101 -0
- package/dist/m365/search/commands.js +2 -1
- package/dist/m365/spfx/commands/package/package-generate.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +1 -1
- package/dist/m365/spo/commands/app/app-add.js +7 -7
- package/dist/m365/spo/commands/app/app-deploy.js +7 -7
- package/dist/m365/spo/commands/app/app-get.js +7 -7
- package/dist/m365/spo/commands/app/app-install.js +6 -6
- package/dist/m365/spo/commands/app/app-list.js +7 -7
- package/dist/m365/spo/commands/app/app-remove.js +7 -7
- package/dist/m365/spo/commands/app/app-retract.js +7 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +6 -6
- package/dist/m365/spo/commands/app/app-upgrade.js +6 -6
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +7 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +7 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +13 -13
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +6 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +3 -3
- package/dist/m365/spo/commands/feature/feature-disable.js +4 -4
- package/dist/m365/spo/commands/feature/feature-enable.js +5 -5
- package/dist/m365/spo/commands/feature/feature-list.js +3 -3
- package/dist/m365/spo/commands/field/field-get.js +1 -7
- package/dist/m365/spo/commands/field/field-remove.js +1 -7
- package/dist/m365/spo/commands/file/file-checkin.js +8 -8
- package/dist/m365/spo/commands/file/file-checkout.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +16 -16
- package/dist/m365/spo/commands/folder/folder-get.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +6 -6
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +208 -0
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +171 -0
- package/dist/m365/spo/commands/list/list-view-field-add.js +23 -23
- package/dist/m365/spo/commands/list/list-view-field-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-field-set.js +18 -18
- package/dist/m365/spo/commands/list/list-view-get.js +12 -12
- package/dist/m365/spo/commands/list/list-view-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-set.js +14 -14
- package/dist/m365/spo/commands/listitem/listitem-list.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.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-control-get.js +4 -4
- package/dist/m365/spo/commands/page/page-control-list.js +3 -3
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-section-add.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/serviceprincipal/serviceprincipal-grant-revoke.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +4 -4
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +3 -3
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +9 -9
- package/dist/m365/spo/commands/site/site-apppermission-set.js +6 -6
- package/dist/m365/spo/commands/site/site-chrome-set.js +3 -3
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/site/site-groupify.js +3 -3
- package/dist/m365/spo/commands/site/site-rename.js +9 -9
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +5 -5
- package/dist/m365/spo/commands/web/web-get.js +3 -3
- package/dist/m365/spo/commands/web/web-list.js +4 -4
- package/dist/m365/spo/commands/web/web-reindex.js +8 -8
- package/dist/m365/spo/commands/web/web-remove.js +5 -5
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +63 -0
- package/dist/m365/spo/commands/web/web-set.js +4 -4
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -3
- package/dist/m365/teams/commands/channel/channel-get.js +19 -19
- package/dist/m365/teams/commands/channel/channel-remove.js +15 -15
- package/dist/m365/teams/commands/channel/channel-set.js +7 -7
- package/dist/m365/teams/commands/chat/chat-get.js +2 -2
- package/dist/m365/teams/commands/chat/chat-message-send.js +2 -2
- package/dist/m365/teams/commands/chat/chatUtil.js +0 -12
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +13 -13
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -13
- package/dist/m365/teams/commands/team/team-clone.js +3 -20
- package/dist/m365/teams/commands/team/team-remove.js +2 -11
- package/dist/m365/teams/commands/team/team-set.js +1 -13
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -11
- package/dist/m365/teams/commands/user/user-app-add.js +4 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/viva/commands/connections/connections-app-create.js +9 -9
- package/dist/m365/yammer/commands/group/group-user-add.js +8 -8
- package/dist/m365/yammer/commands/group/group-user-remove.js +11 -11
- package/dist/m365/yammer/commands/message/message-like-set.js +5 -5
- package/dist/m365/yammer/commands/user/user-get.js +5 -5
- package/docs/docs/cmd/aad/app/app-add.md +12 -1
- package/docs/docs/cmd/aad/app/app-set.md +1 -1
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +5 -5
- package/docs/docs/cmd/aad/o365group/o365group-add.md +3 -3
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.md +7 -7
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +4 -4
- package/docs/docs/cmd/aad/policy/policy-list.md +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.md +5 -5
- package/docs/docs/cmd/booking/business/business-get.md +33 -0
- package/docs/docs/cmd/booking/business/business-list.md +21 -0
- package/docs/docs/cmd/flow/flow-disable.md +3 -3
- package/docs/docs/cmd/flow/flow-enable.md +1 -1
- package/docs/docs/cmd/flow/flow-export.md +5 -5
- package/docs/docs/cmd/flow/flow-get.md +3 -3
- package/docs/docs/cmd/flow/flow-list.md +3 -3
- package/docs/docs/cmd/flow/flow-remove.md +5 -5
- package/docs/docs/cmd/flow/run/run-cancel.md +3 -3
- package/docs/docs/cmd/flow/run/run-get.md +3 -3
- package/docs/docs/cmd/flow/run/run-list.md +3 -3
- package/docs/docs/cmd/flow/run/run-resubmit.md +4 -4
- package/docs/docs/cmd/outlook/message/message-move.md +4 -4
- package/docs/docs/cmd/pa/connector/connector-export.md +3 -3
- package/docs/docs/cmd/pa/connector/connector-list.md +2 -2
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +2 -2
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.md +40 -0
- package/docs/docs/cmd/spfx/package/package-generate.md +2 -2
- package/docs/docs/cmd/spo/app/app-add.md +2 -2
- package/docs/docs/cmd/spo/app/app-deploy.md +2 -2
- package/docs/docs/cmd/spo/app/app-get.md +2 -2
- package/docs/docs/cmd/spo/app/app-install.md +2 -2
- package/docs/docs/cmd/spo/app/app-list.md +2 -2
- package/docs/docs/cmd/spo/app/app-remove.md +2 -2
- package/docs/docs/cmd/spo/app/app-retract.md +2 -2
- package/docs/docs/cmd/spo/app/app-uninstall.md +2 -2
- package/docs/docs/cmd/spo/app/app-upgrade.md +2 -2
- package/docs/docs/cmd/spo/apppage/apppage-set.md +2 -2
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-add.md +10 -10
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-get.md +5 -5
- package/docs/docs/cmd/spo/customaction/customaction-list.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +9 -9
- package/docs/docs/cmd/spo/customaction/customaction-set.md +7 -7
- package/docs/docs/cmd/spo/feature/feature-disable.md +4 -4
- package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
- package/docs/docs/cmd/spo/feature/feature-list.md +3 -3
- package/docs/docs/cmd/spo/field/field-get.md +0 -3
- package/docs/docs/cmd/spo/field/field-remove.md +0 -3
- package/docs/docs/cmd/spo/file/file-checkin.md +6 -6
- package/docs/docs/cmd/spo/file/file-checkout.md +4 -4
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-get.md +2 -2
- package/docs/docs/cmd/spo/folder/folder-remove.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-rename.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +3 -3
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +78 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +54 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-view-field-set.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-get.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-set.md +7 -7
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +5 -5
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-set.md +4 -4
- package/docs/docs/cmd/spo/page/page-section-add.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-list.md +3 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-get.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.md +5 -5
- package/docs/docs/cmd/spo/site/site-chrome-set.md +4 -4
- package/docs/docs/cmd/spo/site/site-groupify.md +5 -5
- package/docs/docs/cmd/spo/site/site-rename.md +6 -6
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +2 -2
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +5 -5
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +6 -3
- package/docs/docs/cmd/spo/web/web-add.md +4 -4
- package/docs/docs/cmd/spo/web/web-get.md +3 -3
- package/docs/docs/cmd/spo/web/web-list.md +2 -2
- package/docs/docs/cmd/spo/web/web-reindex.md +2 -2
- package/docs/docs/cmd/spo/web/web-remove.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +24 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -9
- package/docs/docs/cmd/teams/app/app-install.md +5 -5
- package/docs/docs/cmd/teams/app/app-uninstall.md +3 -3
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-remove.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-set.md +4 -4
- package/docs/docs/cmd/teams/message/message-get.md +3 -3
- package/docs/docs/cmd/teams/tab/tab-get.md +6 -6
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -4
- package/docs/docs/cmd/teams/team/team-archive.md +0 -3
- package/docs/docs/cmd/teams/team/team-clone.md +0 -3
- package/docs/docs/cmd/teams/team/team-remove.md +0 -3
- package/docs/docs/cmd/teams/team/team-set.md +0 -3
- package/docs/docs/cmd/teams/team/team-unarchive.md +0 -3
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-remove.md +3 -3
- package/docs/docs/cmd/viva/connections/connections-app-create.md +2 -2
- package/docs/docs/cmd/yammer/group/group-user-add.md +5 -5
- package/docs/docs/cmd/yammer/group/group-user-remove.md +5 -5
- package/docs/docs/cmd/yammer/message/message-like-set.md +4 -4
- package/docs/docs/cmd/yammer/user/user-get.md +2 -2
- package/package.json +11 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _SearchExternalConnectionRemoveCommand_instances, _SearchExternalConnectionRemoveCommand_initTelemetry, _SearchExternalConnectionRemoveCommand_initOptions, _SearchExternalConnectionRemoveCommand_initOptionSets;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const cli_1 = require("../../../../cli");
|
|
10
|
+
const request_1 = require("../../../../request");
|
|
11
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
12
|
+
const commands_1 = require("../../commands");
|
|
13
|
+
class SearchExternalConnectionRemoveCommand extends GraphCommand_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
_SearchExternalConnectionRemoveCommand_instances.add(this);
|
|
17
|
+
__classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initTelemetry).call(this);
|
|
18
|
+
__classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initOptions).call(this);
|
|
19
|
+
__classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initOptionSets).call(this);
|
|
20
|
+
}
|
|
21
|
+
get name() {
|
|
22
|
+
return commands_1.default.EXTERNALCONNECTION_REMOVE;
|
|
23
|
+
}
|
|
24
|
+
get description() {
|
|
25
|
+
return 'Removes a specific External Connection from Microsoft Search';
|
|
26
|
+
}
|
|
27
|
+
getExternalConnectionId(args) {
|
|
28
|
+
if (args.options.id) {
|
|
29
|
+
return Promise.resolve(args.options.id);
|
|
30
|
+
}
|
|
31
|
+
const requestOptions = {
|
|
32
|
+
url: `${this.resource}/v1.0/external/connections?$filter=name eq '${encodeURIComponent(args.options.name)}'&$select=id`,
|
|
33
|
+
headers: {
|
|
34
|
+
accept: 'application/json;odata.metadata=none'
|
|
35
|
+
},
|
|
36
|
+
responseType: 'json'
|
|
37
|
+
};
|
|
38
|
+
return request_1.default
|
|
39
|
+
.get(requestOptions)
|
|
40
|
+
.then((res) => {
|
|
41
|
+
if (res.value.length === 1) {
|
|
42
|
+
return Promise.resolve(res.value[0].id);
|
|
43
|
+
}
|
|
44
|
+
if (res.value.length === 0) {
|
|
45
|
+
return Promise.reject(`The specified connection does not exist in Microsoft Search`);
|
|
46
|
+
}
|
|
47
|
+
return Promise.reject(`Multiple external connections with name ${args.options.name} found. Please disambiguate (IDs): ${res.value.map(x => x.id).join(', ')}`);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
commandAction(logger, args, cb) {
|
|
51
|
+
const removeExternalConnection = () => {
|
|
52
|
+
this
|
|
53
|
+
.getExternalConnectionId(args)
|
|
54
|
+
.then((externalConnectionId) => {
|
|
55
|
+
const requestOptions = {
|
|
56
|
+
url: `${this.resource}/v1.0/external/connections/${encodeURIComponent(externalConnectionId)}`,
|
|
57
|
+
headers: {
|
|
58
|
+
accept: 'application/json;odata.metadata=none'
|
|
59
|
+
},
|
|
60
|
+
responseType: 'json'
|
|
61
|
+
};
|
|
62
|
+
return request_1.default
|
|
63
|
+
.delete(requestOptions);
|
|
64
|
+
})
|
|
65
|
+
.then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
66
|
+
};
|
|
67
|
+
if (args.options.confirm) {
|
|
68
|
+
removeExternalConnection();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
cli_1.Cli.prompt({
|
|
72
|
+
type: 'confirm',
|
|
73
|
+
name: 'continue',
|
|
74
|
+
default: false,
|
|
75
|
+
message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?`
|
|
76
|
+
}, (result) => {
|
|
77
|
+
if (!result.continue) {
|
|
78
|
+
cb();
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
removeExternalConnection();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
_SearchExternalConnectionRemoveCommand_instances = new WeakSet(), _SearchExternalConnectionRemoveCommand_initTelemetry = function _SearchExternalConnectionRemoveCommand_initTelemetry() {
|
|
88
|
+
this.telemetry.push((args) => {
|
|
89
|
+
Object.assign(this.telemetryProperties, {
|
|
90
|
+
id: typeof args.options.id !== 'undefined',
|
|
91
|
+
name: typeof args.options.name !== 'undefined',
|
|
92
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}, _SearchExternalConnectionRemoveCommand_initOptions = function _SearchExternalConnectionRemoveCommand_initOptions() {
|
|
96
|
+
this.options.unshift({ option: '--id [id]' }, { option: '--name [name]' }, { option: '--confirm' });
|
|
97
|
+
}, _SearchExternalConnectionRemoveCommand_initOptionSets = function _SearchExternalConnectionRemoveCommand_initOptionSets() {
|
|
98
|
+
this.optionSets.push(['id', 'name']);
|
|
99
|
+
};
|
|
100
|
+
module.exports = new SearchExternalConnectionRemoveCommand();
|
|
101
|
+
//# sourceMappingURL=externalconnection-remove.js.map
|
|
@@ -4,6 +4,7 @@ const prefix = 'search';
|
|
|
4
4
|
exports.default = {
|
|
5
5
|
EXTERNALCONNECTION_ADD: `${prefix} externalconnection add`,
|
|
6
6
|
EXTERNALCONNECTION_GET: `${prefix} externalconnection get`,
|
|
7
|
-
EXTERNALCONNECTION_LIST: `${prefix} externalconnection list
|
|
7
|
+
EXTERNALCONNECTION_LIST: `${prefix} externalconnection list`,
|
|
8
|
+
EXTERNALCONNECTION_REMOVE: `${prefix} externalconnection remove`
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=commands.js.map
|
|
@@ -131,7 +131,7 @@ class SpfxPackageGenerateCommand extends AnonymousCommand_1.default {
|
|
|
131
131
|
if (this.debug) {
|
|
132
132
|
logger.log('Writing archive...');
|
|
133
133
|
}
|
|
134
|
-
this.archive.writeZip(`${args.options.
|
|
134
|
+
this.archive.writeZip(`${args.options.name}.sppkg`);
|
|
135
135
|
}
|
|
136
136
|
catch (err) {
|
|
137
137
|
error = err.message;
|
|
@@ -189,7 +189,7 @@ _SpfxPackageGenerateCommand_instances = new WeakSet(), _SpfxPackageGenerateComma
|
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
191
|
}, _SpfxPackageGenerateCommand_initOptions = function _SpfxPackageGenerateCommand_initOptions() {
|
|
192
|
-
this.options.unshift({ option: '-t, --webPartTitle <webPartTitle>' }, { option: '-d, --webPartDescription <webPartDescription>' }, { option: '-n, --
|
|
192
|
+
this.options.unshift({ option: '-t, --webPartTitle <webPartTitle>' }, { option: '-d, --webPartDescription <webPartDescription>' }, { option: '-n, --name <name>' }, { option: '--html <html>' }, {
|
|
193
193
|
option: '--enableForTeams [enableForTeams]',
|
|
194
194
|
autocomplete: SpfxPackageGenerateCommand.enableForTeamsOptions
|
|
195
195
|
}, { option: '--exposePageContextGlobally' }, { option: '--exposeTeamsContextGlobally' }, { option: '--allowTenantWideDeployment' }, { option: '--developerName [developerName]' }, { option: '--developerPrivacyUrl [developerPrivacyUrl]' }, { option: '--developerTermsOfUseUrl [developerTermsOfUseUrl]' }, { option: '--developerWebsiteUrl [developerWebsiteUrl]' }, { option: '--developerMpnId [developerMpnId]' });
|
|
@@ -414,6 +414,21 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
414
414
|
range: '^4',
|
|
415
415
|
fix: 'npm i -g yo@4'
|
|
416
416
|
}
|
|
417
|
+
},
|
|
418
|
+
'1.15.2': {
|
|
419
|
+
gulp: {
|
|
420
|
+
range: '^4',
|
|
421
|
+
fix: 'npm i -g gulp@4'
|
|
422
|
+
},
|
|
423
|
+
node: {
|
|
424
|
+
range: '^12.13 || ^14.15 || ^16.13',
|
|
425
|
+
fix: 'Install Node.js v12.13, v14.15, v16.13 or higher'
|
|
426
|
+
},
|
|
427
|
+
sp: SharePointVersion.SPO,
|
|
428
|
+
yo: {
|
|
429
|
+
range: '^4',
|
|
430
|
+
fix: 'npm i -g yo@4'
|
|
431
|
+
}
|
|
417
432
|
}
|
|
418
433
|
};
|
|
419
434
|
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initTelemetry).call(this);
|
|
@@ -6,7 +6,7 @@ const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
|
6
6
|
class SpoAppBaseCommand extends SpoCommand_1.default {
|
|
7
7
|
getAppCatalogSiteUrl(logger, authSiteUrl, args) {
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
|
-
if (args.options.
|
|
9
|
+
if (args.options.appCatalogScope === 'sitecollection') {
|
|
10
10
|
return resolve(args.options.appCatalogUrl.toLowerCase().replace('/appcatalog', ''));
|
|
11
11
|
}
|
|
12
12
|
if (args.options.appCatalogUrl) {
|
|
@@ -36,7 +36,7 @@ class SpoAppAddCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
36
36
|
return 'Adds an app to the specified SharePoint Online app catalog';
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args, cb) {
|
|
39
|
-
const scope = (args.options.
|
|
39
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
40
40
|
const overwrite = args.options.overwrite || false;
|
|
41
41
|
utils_1.spo
|
|
42
42
|
.getSpoUrl(logger, this.debug)
|
|
@@ -75,7 +75,7 @@ _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = f
|
|
|
75
75
|
this.telemetry.push((args) => {
|
|
76
76
|
Object.assign(this.telemetryProperties, {
|
|
77
77
|
overwrite: (!(!args.options.overwrite)).toString(),
|
|
78
|
-
|
|
78
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant',
|
|
79
79
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString()
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -83,7 +83,7 @@ _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = f
|
|
|
83
83
|
this.options.unshift({
|
|
84
84
|
option: '-p, --filePath <filePath>'
|
|
85
85
|
}, {
|
|
86
|
-
option: '-s, --
|
|
86
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
87
87
|
autocomplete: ['tenant', 'sitecollection']
|
|
88
88
|
}, {
|
|
89
89
|
option: '-u, --appCatalogUrl [appCatalogUrl]'
|
|
@@ -93,13 +93,13 @@ _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = f
|
|
|
93
93
|
}, _SpoAppAddCommand_initValidators = function _SpoAppAddCommand_initValidators() {
|
|
94
94
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
95
95
|
// verify either 'tenant' or 'sitecollection' specified if scope provided
|
|
96
|
-
if (args.options.
|
|
97
|
-
const testScope = args.options.
|
|
96
|
+
if (args.options.appCatalogScope) {
|
|
97
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
98
98
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
99
|
-
return `
|
|
99
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection'`;
|
|
100
100
|
}
|
|
101
101
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
102
|
-
return `You must specify appCatalogUrl when the
|
|
102
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
const fullPath = path.resolve(args.options.filePath);
|
|
@@ -35,7 +35,7 @@ class SpoAppDeployCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
37
|
let appId = '';
|
|
38
|
-
const scope = (args.options.
|
|
38
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
39
39
|
let appCatalogUrl = '';
|
|
40
40
|
utils_1.spo
|
|
41
41
|
.getSpoUrl(logger, this.debug)
|
|
@@ -90,7 +90,7 @@ _SpoAppDeployCommand_instances = new WeakSet(), _SpoAppDeployCommand_initTelemet
|
|
|
90
90
|
name: (!(!args.options.name)).toString(),
|
|
91
91
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString(),
|
|
92
92
|
skipFeatureDeployment: args.options.skipFeatureDeployment || false,
|
|
93
|
-
|
|
93
|
+
appCatalogScope: (!(!args.options.appCatalogScope)).toString()
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
}, _SpoAppDeployCommand_initOptions = function _SpoAppDeployCommand_initOptions() {
|
|
@@ -103,19 +103,19 @@ _SpoAppDeployCommand_instances = new WeakSet(), _SpoAppDeployCommand_initTelemet
|
|
|
103
103
|
}, {
|
|
104
104
|
option: '--skipFeatureDeployment'
|
|
105
105
|
}, {
|
|
106
|
-
option: '-s, --
|
|
106
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
107
107
|
autocomplete: ['tenant', 'sitecollection']
|
|
108
108
|
});
|
|
109
109
|
}, _SpoAppDeployCommand_initValidators = function _SpoAppDeployCommand_initValidators() {
|
|
110
110
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
// verify either 'tenant' or 'sitecollection' specified if scope provided
|
|
112
|
-
if (args.options.
|
|
113
|
-
const testScope = args.options.
|
|
112
|
+
if (args.options.appCatalogScope) {
|
|
113
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
114
114
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
115
|
-
return `
|
|
115
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection'`;
|
|
116
116
|
}
|
|
117
117
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
118
|
-
return `You must specify appCatalogUrl when the
|
|
118
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
if (!args.options.id && !args.options.name) {
|
|
@@ -34,7 +34,7 @@ class SpoAppGetCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
34
34
|
return 'Gets information about the specific app from the specified app catalog';
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
|
-
const scope = (args.options.
|
|
37
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
38
38
|
let appCatalogSiteUrl = '';
|
|
39
39
|
utils_1.spo
|
|
40
40
|
.getSpoUrl(logger, this.debug)
|
|
@@ -83,7 +83,7 @@ _SpoAppGetCommand_instances = new WeakSet(), _SpoAppGetCommand_initTelemetry = f
|
|
|
83
83
|
id: (!(!args.options.id)).toString(),
|
|
84
84
|
name: (!(!args.options.name)).toString(),
|
|
85
85
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString(),
|
|
86
|
-
|
|
86
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}, _SpoAppGetCommand_initOptions = function _SpoAppGetCommand_initOptions() {
|
|
@@ -94,19 +94,19 @@ _SpoAppGetCommand_instances = new WeakSet(), _SpoAppGetCommand_initTelemetry = f
|
|
|
94
94
|
}, {
|
|
95
95
|
option: '-u, --appCatalogUrl [appCatalogUrl]'
|
|
96
96
|
}, {
|
|
97
|
-
option: '-s, --
|
|
97
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
98
98
|
autocomplete: ['tenant', 'sitecollection']
|
|
99
99
|
});
|
|
100
100
|
}, _SpoAppGetCommand_initValidators = function _SpoAppGetCommand_initValidators() {
|
|
101
101
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
102
102
|
// verify either 'tenant' or 'sitecollection' specified if scope provided
|
|
103
|
-
if (args.options.
|
|
104
|
-
const testScope = args.options.
|
|
103
|
+
if (args.options.appCatalogScope) {
|
|
104
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
105
105
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
106
|
-
return `
|
|
106
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection'`;
|
|
107
107
|
}
|
|
108
108
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
109
|
-
return `You must specify appCatalogUrl when the
|
|
109
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
if (!args.options.id && !args.options.name) {
|
|
@@ -34,7 +34,7 @@ class SpoAppInstallCommand extends SpoCommand_1.default {
|
|
|
34
34
|
return 'Installs an app from the specified app catalog in the site';
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
|
-
const scope = (args.options.
|
|
37
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
38
38
|
if (this.verbose) {
|
|
39
39
|
logger.logToStderr(`Installing app '${args.options.id}' in site '${args.options.siteUrl}'...`);
|
|
40
40
|
}
|
|
@@ -52,7 +52,7 @@ class SpoAppInstallCommand extends SpoCommand_1.default {
|
|
|
52
52
|
_SpoAppInstallCommand_instances = new WeakSet(), _SpoAppInstallCommand_initTelemetry = function _SpoAppInstallCommand_initTelemetry() {
|
|
53
53
|
this.telemetry.push((args) => {
|
|
54
54
|
Object.assign(this.telemetryProperties, {
|
|
55
|
-
|
|
55
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}, _SpoAppInstallCommand_initOptions = function _SpoAppInstallCommand_initOptions() {
|
|
@@ -61,15 +61,15 @@ _SpoAppInstallCommand_instances = new WeakSet(), _SpoAppInstallCommand_initTelem
|
|
|
61
61
|
}, {
|
|
62
62
|
option: '-s, --siteUrl <siteUrl>'
|
|
63
63
|
}, {
|
|
64
|
-
option: '--
|
|
64
|
+
option: '--appCatalogScope [appCatalogScope]',
|
|
65
65
|
autocomplete: ['tenant', 'sitecollection']
|
|
66
66
|
});
|
|
67
67
|
}, _SpoAppInstallCommand_initValidators = function _SpoAppInstallCommand_initValidators() {
|
|
68
68
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
if (args.options.
|
|
70
|
-
const testScope = args.options.
|
|
69
|
+
if (args.options.appCatalogScope) {
|
|
70
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
71
71
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
72
|
-
return `
|
|
72
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection' if specified`;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
@@ -37,7 +37,7 @@ class SpoAppListCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
37
37
|
return [`Title`, `ID`, `Deployed`, `AppCatalogVersion`];
|
|
38
38
|
}
|
|
39
39
|
commandAction(logger, args, cb) {
|
|
40
|
-
const scope = (args.options.
|
|
40
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
41
41
|
let appCatalogSiteUrl = '';
|
|
42
42
|
let spoUrl = '';
|
|
43
43
|
utils_1.spo
|
|
@@ -77,12 +77,12 @@ _SpoAppListCommand_instances = new WeakSet(), _SpoAppListCommand_initTelemetry =
|
|
|
77
77
|
this.telemetry.push((args) => {
|
|
78
78
|
Object.assign(this.telemetryProperties, {
|
|
79
79
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString(),
|
|
80
|
-
|
|
80
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
83
|
}, _SpoAppListCommand_initOptions = function _SpoAppListCommand_initOptions() {
|
|
84
84
|
this.options.unshift({
|
|
85
|
-
option: '-s, --
|
|
85
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
86
86
|
autocomplete: ['tenant', 'sitecollection']
|
|
87
87
|
}, {
|
|
88
88
|
option: '-u, --appCatalogUrl [appCatalogUrl]'
|
|
@@ -90,13 +90,13 @@ _SpoAppListCommand_instances = new WeakSet(), _SpoAppListCommand_initTelemetry =
|
|
|
90
90
|
}, _SpoAppListCommand_initValidators = function _SpoAppListCommand_initValidators() {
|
|
91
91
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
// verify either 'tenant' or 'sitecollection' specified if scope provided
|
|
93
|
-
if (args.options.
|
|
94
|
-
const testScope = args.options.
|
|
93
|
+
if (args.options.appCatalogScope) {
|
|
94
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
95
95
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
96
|
-
return `
|
|
96
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection'`;
|
|
97
97
|
}
|
|
98
98
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
99
|
-
return `You must specify appCatalogUrl when the
|
|
99
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
100
100
|
}
|
|
101
101
|
if (args.options.appCatalogUrl) {
|
|
102
102
|
return utils_1.validation.isValidSharePointUrl(args.options.appCatalogUrl);
|
|
@@ -35,7 +35,7 @@ class SpoAppRemoveCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
35
35
|
return 'Removes the specified app from the specified app catalog';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
const scope = (args.options.
|
|
38
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
39
39
|
const removeApp = () => {
|
|
40
40
|
utils_1.spo
|
|
41
41
|
.getSpoUrl(logger, this.debug)
|
|
@@ -81,7 +81,7 @@ _SpoAppRemoveCommand_instances = new WeakSet(), _SpoAppRemoveCommand_initTelemet
|
|
|
81
81
|
Object.assign(this.telemetryProperties, {
|
|
82
82
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString(),
|
|
83
83
|
confirm: (!(!args.options.confirm)).toString(),
|
|
84
|
-
|
|
84
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
}, _SpoAppRemoveCommand_initOptions = function _SpoAppRemoveCommand_initOptions() {
|
|
@@ -90,7 +90,7 @@ _SpoAppRemoveCommand_instances = new WeakSet(), _SpoAppRemoveCommand_initTelemet
|
|
|
90
90
|
}, {
|
|
91
91
|
option: '-u, --appCatalogUrl [appCatalogUrl]'
|
|
92
92
|
}, {
|
|
93
|
-
option: '-s, --
|
|
93
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
94
94
|
autocomplete: ['tenant', 'sitecollection']
|
|
95
95
|
}, {
|
|
96
96
|
option: '--confirm'
|
|
@@ -98,13 +98,13 @@ _SpoAppRemoveCommand_instances = new WeakSet(), _SpoAppRemoveCommand_initTelemet
|
|
|
98
98
|
}, _SpoAppRemoveCommand_initValidators = function _SpoAppRemoveCommand_initValidators() {
|
|
99
99
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
// verify either 'tenant' or 'sitecollection' specified if scope provided
|
|
101
|
-
if (args.options.
|
|
102
|
-
const testScope = args.options.
|
|
101
|
+
if (args.options.appCatalogScope) {
|
|
102
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
103
103
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
104
|
-
return `
|
|
104
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection' if specified`;
|
|
105
105
|
}
|
|
106
106
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
107
|
-
return `You must specify appCatalogUrl when the
|
|
107
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
@@ -35,7 +35,7 @@ class SpoAppRetractCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
|
35
35
|
return 'Retracts the specified app from the specified app catalog';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
const scope = (args.options.
|
|
38
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
39
39
|
const retractApp = () => {
|
|
40
40
|
utils_1.spo
|
|
41
41
|
.getSpoUrl(logger, this.debug)
|
|
@@ -81,7 +81,7 @@ _SpoAppRetractCommand_instances = new WeakSet(), _SpoAppRetractCommand_initTelem
|
|
|
81
81
|
Object.assign(this.telemetryProperties, {
|
|
82
82
|
appCatalogUrl: (!(!args.options.appCatalogUrl)).toString(),
|
|
83
83
|
confirm: (!(!args.options.confirm)).toString(),
|
|
84
|
-
|
|
84
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
}, _SpoAppRetractCommand_initOptions = function _SpoAppRetractCommand_initOptions() {
|
|
@@ -90,20 +90,20 @@ _SpoAppRetractCommand_instances = new WeakSet(), _SpoAppRetractCommand_initTelem
|
|
|
90
90
|
}, {
|
|
91
91
|
option: '-u, --appCatalogUrl [appCatalogUrl]'
|
|
92
92
|
}, {
|
|
93
|
-
option: '-s, --
|
|
93
|
+
option: '-s, --appCatalogScope [appCatalogScope]',
|
|
94
94
|
autocomplete: ['tenant', 'sitecollection']
|
|
95
95
|
}, {
|
|
96
96
|
option: '--confirm'
|
|
97
97
|
});
|
|
98
98
|
}, _SpoAppRetractCommand_initValidators = function _SpoAppRetractCommand_initValidators() {
|
|
99
99
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
if (args.options.
|
|
101
|
-
const testScope = args.options.
|
|
100
|
+
if (args.options.appCatalogScope) {
|
|
101
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
102
102
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
103
|
-
return `
|
|
103
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection' if specified`;
|
|
104
104
|
}
|
|
105
105
|
if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
|
|
106
|
-
return `You must specify appCatalogUrl when the
|
|
106
|
+
return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
@@ -36,7 +36,7 @@ class SpoAppUninstallCommand extends SpoCommand_1.default {
|
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const uninstallApp = () => {
|
|
39
|
-
const scope = (args.options.
|
|
39
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
40
40
|
if (this.verbose) {
|
|
41
41
|
logger.logToStderr(`Uninstalling app '${args.options.id}' from the site '${args.options.siteUrl}'...`);
|
|
42
42
|
}
|
|
@@ -74,7 +74,7 @@ _SpoAppUninstallCommand_instances = new WeakSet(), _SpoAppUninstallCommand_initT
|
|
|
74
74
|
this.telemetry.push((args) => {
|
|
75
75
|
Object.assign(this.telemetryProperties, {
|
|
76
76
|
confirm: (!(!args.options.confirm)).toString(),
|
|
77
|
-
|
|
77
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
}, _SpoAppUninstallCommand_initOptions = function _SpoAppUninstallCommand_initOptions() {
|
|
@@ -83,17 +83,17 @@ _SpoAppUninstallCommand_instances = new WeakSet(), _SpoAppUninstallCommand_initT
|
|
|
83
83
|
}, {
|
|
84
84
|
option: '-s, --siteUrl <siteUrl>'
|
|
85
85
|
}, {
|
|
86
|
-
option: '--
|
|
86
|
+
option: '--appCatalogScope [appCatalogScope]',
|
|
87
87
|
autocomplete: ['tenant', 'sitecollection']
|
|
88
88
|
}, {
|
|
89
89
|
option: '--confirm'
|
|
90
90
|
});
|
|
91
91
|
}, _SpoAppUninstallCommand_initValidators = function _SpoAppUninstallCommand_initValidators() {
|
|
92
92
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
if (args.options.
|
|
94
|
-
const testScope = args.options.
|
|
93
|
+
if (args.options.appCatalogScope) {
|
|
94
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
95
95
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
96
|
-
return `
|
|
96
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection' if specified`;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
@@ -34,7 +34,7 @@ class SpoAppUpgradeCommand extends SpoCommand_1.default {
|
|
|
34
34
|
return 'Upgrades app in the specified site';
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
|
-
const scope = (args.options.
|
|
37
|
+
const scope = (args.options.appCatalogScope) ? args.options.appCatalogScope.toLowerCase() : 'tenant';
|
|
38
38
|
if (this.verbose) {
|
|
39
39
|
logger.logToStderr(`Upgrading app '${args.options.id}' in site '${args.options.siteUrl}'...`);
|
|
40
40
|
}
|
|
@@ -52,7 +52,7 @@ class SpoAppUpgradeCommand extends SpoCommand_1.default {
|
|
|
52
52
|
_SpoAppUpgradeCommand_instances = new WeakSet(), _SpoAppUpgradeCommand_initTelemetry = function _SpoAppUpgradeCommand_initTelemetry() {
|
|
53
53
|
this.telemetry.push((args) => {
|
|
54
54
|
Object.assign(this.telemetryProperties, {
|
|
55
|
-
|
|
55
|
+
appCatalogScope: args.options.appCatalogScope || 'tenant'
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}, _SpoAppUpgradeCommand_initOptions = function _SpoAppUpgradeCommand_initOptions() {
|
|
@@ -61,15 +61,15 @@ _SpoAppUpgradeCommand_instances = new WeakSet(), _SpoAppUpgradeCommand_initTelem
|
|
|
61
61
|
}, {
|
|
62
62
|
option: '-s, --siteUrl <siteUrl>'
|
|
63
63
|
}, {
|
|
64
|
-
option: '--
|
|
64
|
+
option: '--appCatalogScope [appCatalogScope]',
|
|
65
65
|
autocomplete: ['tenant', 'sitecollection']
|
|
66
66
|
});
|
|
67
67
|
}, _SpoAppUpgradeCommand_initValidators = function _SpoAppUpgradeCommand_initValidators() {
|
|
68
68
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
if (args.options.
|
|
70
|
-
const testScope = args.options.
|
|
69
|
+
if (args.options.appCatalogScope) {
|
|
70
|
+
const testScope = args.options.appCatalogScope.toLowerCase();
|
|
71
71
|
if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
|
|
72
|
-
return `
|
|
72
|
+
return `appCatalogScope must be either 'tenant' or 'sitecollection' if specified`;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
@@ -41,7 +41,7 @@ class SpoAppPageSetCommand extends SpoCommand_1.default {
|
|
|
41
41
|
},
|
|
42
42
|
responseType: 'json',
|
|
43
43
|
data: {
|
|
44
|
-
serverRelativeUrl: `${utils_1.urlUtil.getServerRelativePath(args.options.webUrl, '')}/SitePages/${args.options.
|
|
44
|
+
serverRelativeUrl: `${utils_1.urlUtil.getServerRelativePath(args.options.webUrl, '')}/SitePages/${args.options.name}`,
|
|
45
45
|
webPartDataAsJson: args.options.webPartData
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -54,7 +54,7 @@ _SpoAppPageSetCommand_instances = new WeakSet(), _SpoAppPageSetCommand_initOptio
|
|
|
54
54
|
this.options.unshift({
|
|
55
55
|
option: '-u, --webUrl <webUrl>'
|
|
56
56
|
}, {
|
|
57
|
-
option: '-n, --
|
|
57
|
+
option: '-n, --name <name>'
|
|
58
58
|
}, {
|
|
59
59
|
option: '-d, --webPartData <webPartData>'
|
|
60
60
|
});
|
|
@@ -36,7 +36,7 @@ class SpoCdnPolicyListCommand extends SpoCommand_1.default {
|
|
|
36
36
|
return 'Lists CDN policies settings for the current SharePoint Online tenant';
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args, cb) {
|
|
39
|
-
const cdnTypeString = args.options.
|
|
39
|
+
const cdnTypeString = args.options.cdnType || 'Public';
|
|
40
40
|
const cdnType = cdnTypeString === 'Private' ? 1 : 0;
|
|
41
41
|
let spoAdminUrl = '';
|
|
42
42
|
let tenantId = '';
|
|
@@ -90,20 +90,20 @@ class SpoCdnPolicyListCommand extends SpoCommand_1.default {
|
|
|
90
90
|
_SpoCdnPolicyListCommand_instances = new WeakSet(), _SpoCdnPolicyListCommand_initTelemetry = function _SpoCdnPolicyListCommand_initTelemetry() {
|
|
91
91
|
this.telemetry.push((args) => {
|
|
92
92
|
Object.assign(this.telemetryProperties, {
|
|
93
|
-
cdnType: args.options.
|
|
93
|
+
cdnType: args.options.cdnType || 'Public'
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
}, _SpoCdnPolicyListCommand_initOptions = function _SpoCdnPolicyListCommand_initOptions() {
|
|
97
97
|
this.options.unshift({
|
|
98
|
-
option: '-t, --
|
|
98
|
+
option: '-t, --cdnType [cdnType]',
|
|
99
99
|
autocomplete: ['Public', 'Private']
|
|
100
100
|
});
|
|
101
101
|
}, _SpoCdnPolicyListCommand_initValidators = function _SpoCdnPolicyListCommand_initValidators() {
|
|
102
102
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
if (args.options.
|
|
104
|
-
if (args.options.
|
|
105
|
-
args.options.
|
|
106
|
-
return `${args.options.
|
|
103
|
+
if (args.options.cdnType) {
|
|
104
|
+
if (args.options.cdnType !== 'Public' &&
|
|
105
|
+
args.options.cdnType !== 'Private') {
|
|
106
|
+
return `${args.options.cdnType} is not a valid CDN type. Allowed values are Public|Private`;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
return true;
|
|
@@ -36,7 +36,7 @@ class SpoCdnPolicySetCommand extends SpoCommand_1.default {
|
|
|
36
36
|
return 'Sets CDN policy value for the current SharePoint Online tenant';
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args, cb) {
|
|
39
|
-
const cdnTypeString = args.options.
|
|
39
|
+
const cdnTypeString = args.options.cdnType || 'Public';
|
|
40
40
|
const cdnType = cdnTypeString === 'Private' ? 1 : 0;
|
|
41
41
|
let spoAdminUrl = '';
|
|
42
42
|
let tenantId = '';
|
|
@@ -86,13 +86,13 @@ class SpoCdnPolicySetCommand extends SpoCommand_1.default {
|
|
|
86
86
|
_SpoCdnPolicySetCommand_instances = new WeakSet(), _SpoCdnPolicySetCommand_initTelemetry = function _SpoCdnPolicySetCommand_initTelemetry() {
|
|
87
87
|
this.telemetry.push((args) => {
|
|
88
88
|
Object.assign(this.telemetryProperties, {
|
|
89
|
-
cdnType: args.options.
|
|
89
|
+
cdnType: args.options.cdnType || 'Public',
|
|
90
90
|
policy: args.options.policy
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
}, _SpoCdnPolicySetCommand_initOptions = function _SpoCdnPolicySetCommand_initOptions() {
|
|
94
94
|
this.options.unshift({
|
|
95
|
-
option: '-t, --
|
|
95
|
+
option: '-t, --cdnType [cdnType]',
|
|
96
96
|
autocomplete: ['Public', 'Private']
|
|
97
97
|
}, {
|
|
98
98
|
option: '-p, --policy <policy>',
|
|
@@ -102,10 +102,10 @@ _SpoCdnPolicySetCommand_instances = new WeakSet(), _SpoCdnPolicySetCommand_initT
|
|
|
102
102
|
});
|
|
103
103
|
}, _SpoCdnPolicySetCommand_initValidators = function _SpoCdnPolicySetCommand_initValidators() {
|
|
104
104
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
if (args.options.
|
|
106
|
-
if (args.options.
|
|
107
|
-
args.options.
|
|
108
|
-
return `${args.options.
|
|
105
|
+
if (args.options.cdnType) {
|
|
106
|
+
if (args.options.cdnType !== 'Public' &&
|
|
107
|
+
args.options.cdnType !== 'Private') {
|
|
108
|
+
return `${args.options.cdnType} is not a valid CDN type. Allowed values are Public|Private`;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
if (!args.options.policy ||
|