@pnp/cli-microsoft365 11.12.0-beta.8589b73 → 12.0.0-beta.8dff3ac
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 +2 -6
- package/dist/auth/FileTokenStorage.js +0 -3
- package/dist/auth/msalCachePlugin.js +201 -12
- package/dist/m365/commands/logout.js +2 -4
- package/dist/m365/entra/commands/m365group/m365group-remove.js +4 -3
- package/dist/m365/spe/commands/container/container-remove.js +6 -7
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +7 -15
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +30 -2
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +12 -2
- package/dist/m365/spo/commands/cdn/cdn-get.js +8 -35
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +9 -36
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +8 -34
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +10 -39
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +8 -34
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +10 -45
- package/dist/m365/spo/commands/cdn/cdn-set.js +10 -46
- package/dist/m365/spo/commands/contenttype/contenttype-sync.js +12 -24
- package/dist/m365/spo/commands/file/file-add.js +2 -6
- package/dist/m365/spo/commands/file/file-archive.js +1 -1
- package/dist/m365/spo/commands/file/file-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-remove.js +5 -5
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +5 -0
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +8 -26
- package/dist/m365/spo/commands/homesite/homesite-list.js +5 -0
- package/dist/m365/spo/commands/list/list-remove.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +5 -4
- package/dist/m365/spo/commands/listitem/listitem-get.js +15 -7
- package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -5
- package/dist/m365/spo/commands/page/page-header-set.js +123 -64
- package/dist/m365/spo/commands/page/page-remove.js +7 -7
- package/dist/m365/spo/commands/site/site-list.js +60 -49
- package/dist/m365/spo/commands/site/site-remove.js +7 -7
- package/dist/m365/spo/commands/spo-get.js +5 -0
- package/dist/m365/spo/commands/spo-set.js +10 -21
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
- package/dist/m365/spo/commands/user/user-ensure.js +24 -60
- package/dist/m365/spo/commands/user/user-get.js +25 -65
- package/dist/m365/spo/commands/user/user-list.js +10 -18
- package/dist/m365/spo/commands/user/user-remove.js +26 -68
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +10 -23
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +10 -19
- package/dist/m365/spo/commands/web/web-add.js +20 -55
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +10 -18
- package/dist/m365/spo/commands/web/web-get.js +12 -30
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +10 -18
- package/dist/m365/spo/commands/web/web-list.js +10 -18
- package/dist/m365/spo/commands/web/web-reindex.js +10 -18
- package/dist/m365/spo/commands/web/web-remove.js +11 -27
- package/dist/m365/spo/commands/web/web-retentionlabel-list.js +10 -18
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +40 -64
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +31 -58
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +12 -36
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +11 -29
- package/dist/m365/spo/commands/web/web-rule-list.js +6 -4
- package/dist/m365/spo/commands/web/web-rule-remove.js +0 -3
- package/dist/m365/spo/commands/web/web-set.js +26 -96
- package/dist/m365/spo/commands.js +0 -2
- package/dist/m365/teams/commands/channel/channel-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
- package/dist/m365/teams/commands/channel/channel-set.js +2 -8
- package/dist/m365/teams/commands/tab/tab-get.js +2 -6
- package/dist/m365/teams/commands/team/team-archive.js +2 -6
- package/dist/m365/teams/commands/team/team-remove.js +2 -6
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +4 -4
- package/docs/docs/cmd/spe/container/container-remove.mdx +5 -5
- package/docs/docs/cmd/spo/contenttype/contenttype-sync.mdx +4 -4
- package/docs/docs/cmd/spo/file/file-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-archive.mdx +8 -0
- package/docs/docs/cmd/spo/file/file-checkin.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-checkout.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-copy.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-get.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-list.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-move.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-remove.mdx +25 -4
- package/docs/docs/cmd/spo/file/file-rename.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +8 -0
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +6 -0
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +4 -4
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-clear.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-remove.mdx +25 -4
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-retentionlabel-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +23 -0
- package/docs/docs/cmd/spo/list/list-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-sitescript-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-field-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-field-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-set.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-webhook-set.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-add.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-get.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-remove.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-set.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +13 -7
- package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
- package/docs/docs/cmd/spo/page/page-header-set.mdx +9 -9
- package/docs/docs/cmd/spo/page/page-remove.mdx +4 -4
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +52 -21
- package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
- package/docs/docs/cmd/spo/site/site-remove.mdx +3 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
- package/docs/docs/cmd/spo/web/web-rule-list.mdx +8 -12
- package/docs/docs/cmd/spo/web/web-rule-remove.mdx +0 -6
- package/docs/docs/cmd/teams/app/app-install.mdx +21 -0
- package/docs/docs/cmd/teams/app/app-list.mdx +19 -0
- package/docs/docs/cmd/teams/app/app-publish.mdx +17 -0
- package/docs/docs/cmd/teams/app/app-remove.mdx +19 -0
- package/docs/docs/cmd/teams/app/app-uninstall.mdx +21 -0
- package/docs/docs/cmd/teams/app/app-update.mdx +19 -0
- package/docs/docs/cmd/tenant/id/id-get.mdx +15 -0
- package/docs/docs/cmd/tenant/info/info-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-pronouns-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-pronouns-set.mdx +19 -0
- package/docs/docs/cmd/tenant/report/report-settings-get.mdx +19 -0
- package/docs/docs/cmd/tenant/report/report-settings-set.mdx +21 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +19 -0
- package/npm-shrinkwrap.json +1541 -1163
- package/package.json +22 -17
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebListCommand_instances, _SpoWebListCommand_initOptions, _SpoWebListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
url: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
10
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
11
|
+
}).alias('u')
|
|
12
|
+
});
|
|
11
13
|
class SpoWebListCommand extends SpoCommand {
|
|
12
14
|
get name() {
|
|
13
15
|
return commands.WEB_LIST;
|
|
@@ -18,11 +20,8 @@ class SpoWebListCommand extends SpoCommand {
|
|
|
18
20
|
defaultProperties() {
|
|
19
21
|
return ['Title', 'Url', 'Id'];
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoWebListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebListCommand_instances, "m", _SpoWebListCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoWebListCommand_instances, "m", _SpoWebListCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
26
25
|
}
|
|
27
26
|
async commandAction(logger, args) {
|
|
28
27
|
if (this.verbose) {
|
|
@@ -41,12 +40,5 @@ class SpoWebListCommand extends SpoCommand {
|
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
_SpoWebListCommand_instances = new WeakSet(), _SpoWebListCommand_initOptions = function _SpoWebListCommand_initOptions() {
|
|
45
|
-
this.options.unshift({
|
|
46
|
-
option: '-u, --url <url>'
|
|
47
|
-
});
|
|
48
|
-
}, _SpoWebListCommand_initValidators = function _SpoWebListCommand_initValidators() {
|
|
49
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
|
|
50
|
-
};
|
|
51
43
|
export default new SpoWebListCommand();
|
|
52
44
|
//# sourceMappingURL=web-list.js.map
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebReindexCommand_instances, _SpoWebReindexCommand_initOptions, _SpoWebReindexCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { spo } from '../../../../utils/spo.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
12
8
|
import { SpoPropertyBagBaseCommand } from '../propertybag/propertybag-base.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
url: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
13
|
+
}).alias('u')
|
|
14
|
+
});
|
|
13
15
|
class SpoWebReindexCommand extends SpoCommand {
|
|
14
16
|
get name() {
|
|
15
17
|
return commands.WEB_REINDEX;
|
|
@@ -17,11 +19,8 @@ class SpoWebReindexCommand extends SpoCommand {
|
|
|
17
19
|
get description() {
|
|
18
20
|
return 'Requests reindexing the specified subsite';
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_SpoWebReindexCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoWebReindexCommand_instances, "m", _SpoWebReindexCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebReindexCommand_instances, "m", _SpoWebReindexCommand_initValidators).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
25
24
|
}
|
|
26
25
|
async commandAction(logger, args) {
|
|
27
26
|
let webIdentityResp;
|
|
@@ -94,12 +93,5 @@ class SpoWebReindexCommand extends SpoCommand {
|
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
|
-
_SpoWebReindexCommand_instances = new WeakSet(), _SpoWebReindexCommand_initOptions = function _SpoWebReindexCommand_initOptions() {
|
|
98
|
-
this.options.unshift({
|
|
99
|
-
option: '-u, --url <url>'
|
|
100
|
-
});
|
|
101
|
-
}, _SpoWebReindexCommand_initValidators = function _SpoWebReindexCommand_initValidators() {
|
|
102
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
|
|
103
|
-
};
|
|
104
96
|
export default new SpoWebReindexCommand();
|
|
105
97
|
//# sourceMappingURL=web-reindex.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRemoveCommand_instances, _SpoWebRemoveCommand_initTelemetry, _SpoWebRemoveCommand_initOptions, _SpoWebRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
url: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
12
|
+
}).alias('u'),
|
|
13
|
+
force: z.boolean().optional().alias('f')
|
|
14
|
+
});
|
|
12
15
|
class SpoWebRemoveCommand extends SpoCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.WEB_REMOVE;
|
|
@@ -16,12 +19,8 @@ class SpoWebRemoveCommand extends SpoCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Deletes specified subsite';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoWebRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoWebRemoveCommand_instances, "m", _SpoWebRemoveCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoWebRemoveCommand_instances, "m", _SpoWebRemoveCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebRemoveCommand_instances, "m", _SpoWebRemoveCommand_initValidators).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
25
24
|
}
|
|
26
25
|
async commandAction(logger, args) {
|
|
27
26
|
if (args.options.force) {
|
|
@@ -54,20 +53,5 @@ class SpoWebRemoveCommand extends SpoCommand {
|
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
_SpoWebRemoveCommand_instances = new WeakSet(), _SpoWebRemoveCommand_initTelemetry = function _SpoWebRemoveCommand_initTelemetry() {
|
|
58
|
-
this.telemetry.push((args) => {
|
|
59
|
-
Object.assign(this.telemetryProperties, {
|
|
60
|
-
force: (!(!args.options.force)).toString()
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}, _SpoWebRemoveCommand_initOptions = function _SpoWebRemoveCommand_initOptions() {
|
|
64
|
-
this.options.unshift({
|
|
65
|
-
option: '-u, --url <url>'
|
|
66
|
-
}, {
|
|
67
|
-
option: '-f, --force'
|
|
68
|
-
});
|
|
69
|
-
}, _SpoWebRemoveCommand_initValidators = function _SpoWebRemoveCommand_initValidators() {
|
|
70
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
|
|
71
|
-
};
|
|
72
56
|
export default new SpoWebRemoveCommand();
|
|
73
57
|
//# sourceMappingURL=web-remove.js.map
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRetentionLabelListCommand_instances, _SpoWebRetentionLabelListCommand_initOptions, _SpoWebRetentionLabelListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import { odata } from "../../../../utils/odata.js";
|
|
9
5
|
import { validation } from "../../../../utils/validation.js";
|
|
10
6
|
import SpoCommand from "../../../base/SpoCommand.js";
|
|
11
7
|
import commands from "../../commands.js";
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
12
|
+
}).alias('u')
|
|
13
|
+
});
|
|
12
14
|
class SpoWebRetentionLabelListCommand extends SpoCommand {
|
|
13
15
|
get name() {
|
|
14
16
|
return commands.WEB_RETENTIONLABEL_LIST;
|
|
@@ -19,11 +21,8 @@ class SpoWebRetentionLabelListCommand extends SpoCommand {
|
|
|
19
21
|
defaultProperties() {
|
|
20
22
|
return ['TagId', 'TagName'];
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoWebRetentionLabelListCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoWebRetentionLabelListCommand_instances, "m", _SpoWebRetentionLabelListCommand_initOptions).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoWebRetentionLabelListCommand_instances, "m", _SpoWebRetentionLabelListCommand_initValidators).call(this);
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
27
26
|
}
|
|
28
27
|
async commandAction(logger, args) {
|
|
29
28
|
if (this.verbose) {
|
|
@@ -39,12 +38,5 @@ class SpoWebRetentionLabelListCommand extends SpoCommand {
|
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
_SpoWebRetentionLabelListCommand_instances = new WeakSet(), _SpoWebRetentionLabelListCommand_initOptions = function _SpoWebRetentionLabelListCommand_initOptions() {
|
|
43
|
-
this.options.unshift({
|
|
44
|
-
option: '-u, --webUrl <webUrl>'
|
|
45
|
-
});
|
|
46
|
-
}, _SpoWebRetentionLabelListCommand_initValidators = function _SpoWebRetentionLabelListCommand_initValidators() {
|
|
47
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
48
|
-
};
|
|
49
41
|
export default new SpoWebRetentionLabelListCommand();
|
|
50
42
|
//# sourceMappingURL=web-retentionlabel-list.js.map
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRoleAssignmentAddCommand_instances, _SpoWebRoleAssignmentAddCommand_initTelemetry, _SpoWebRoleAssignmentAddCommand_initOptions, _SpoWebRoleAssignmentAddCommand_initValidators, _SpoWebRoleAssignmentAddCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
5
|
import { spo } from '../../../../utils/spo.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
13
|
+
}).alias('u'),
|
|
14
|
+
principalId: z.number().optional(),
|
|
15
|
+
upn: z.string().optional(),
|
|
16
|
+
groupName: z.string().optional(),
|
|
17
|
+
entraGroupId: z.string().refine(id => validation.isValidGuid(id), {
|
|
18
|
+
error: e => `'${e.input}' is not a valid GUID for option entraGroupId.`
|
|
19
|
+
}).optional(),
|
|
20
|
+
entraGroupName: z.string().optional(),
|
|
21
|
+
roleDefinitionId: z.number().optional(),
|
|
22
|
+
roleDefinitionName: z.string().optional()
|
|
23
|
+
});
|
|
13
24
|
class SpoWebRoleAssignmentAddCommand extends SpoCommand {
|
|
14
25
|
get name() {
|
|
15
26
|
return commands.WEB_ROLEASSIGNMENT_ADD;
|
|
@@ -17,13 +28,25 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand {
|
|
|
17
28
|
get description() {
|
|
18
29
|
return 'Adds a role assignment to web';
|
|
19
30
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
get schema() {
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
getRefinedSchema(schema) {
|
|
35
|
+
return schema
|
|
36
|
+
.refine(options => [options.principalId, options.upn, options.groupName, options.entraGroupId, options.entraGroupName].filter(x => x !== undefined).length === 1, {
|
|
37
|
+
error: `Specify either 'principalId', 'upn', 'groupName', 'entraGroupId', or 'entraGroupName'.`,
|
|
38
|
+
params: {
|
|
39
|
+
customCode: 'optionSet',
|
|
40
|
+
options: ['principalId', 'upn', 'groupName', 'entraGroupId', 'entraGroupName']
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
.refine(options => [options.roleDefinitionId, options.roleDefinitionName].filter(x => x !== undefined).length === 1, {
|
|
44
|
+
error: `Specify either 'roleDefinitionId' or 'roleDefinitionName'.`,
|
|
45
|
+
params: {
|
|
46
|
+
customCode: 'optionSet',
|
|
47
|
+
options: ['roleDefinitionId', 'roleDefinitionName']
|
|
48
|
+
}
|
|
49
|
+
});
|
|
27
50
|
}
|
|
28
51
|
async commandAction(logger, args) {
|
|
29
52
|
if (this.verbose) {
|
|
@@ -31,7 +54,10 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand {
|
|
|
31
54
|
}
|
|
32
55
|
try {
|
|
33
56
|
const roleDefinitionId = await this.getRoleDefinitionId(args.options, logger);
|
|
34
|
-
if (args.options.
|
|
57
|
+
if (args.options.principalId) {
|
|
58
|
+
await this.addRoleAssignment(args.options.webUrl, args.options.principalId, roleDefinitionId, logger);
|
|
59
|
+
}
|
|
60
|
+
else if (args.options.upn) {
|
|
35
61
|
const principalId = await this.getUserPrincipalId(args.options, logger);
|
|
36
62
|
await this.addRoleAssignment(args.options.webUrl, principalId, roleDefinitionId, logger);
|
|
37
63
|
}
|
|
@@ -85,55 +111,5 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand {
|
|
|
85
111
|
return user.Id;
|
|
86
112
|
}
|
|
87
113
|
}
|
|
88
|
-
_SpoWebRoleAssignmentAddCommand_instances = new WeakSet(), _SpoWebRoleAssignmentAddCommand_initTelemetry = function _SpoWebRoleAssignmentAddCommand_initTelemetry() {
|
|
89
|
-
this.telemetry.push((args) => {
|
|
90
|
-
Object.assign(this.telemetryProperties, {
|
|
91
|
-
principalId: typeof args.options.principalId !== 'undefined',
|
|
92
|
-
upn: typeof args.options.upn !== 'undefined',
|
|
93
|
-
groupName: typeof args.options.groupName !== 'undefined',
|
|
94
|
-
entraGroupId: typeof args.options.entraGroupId !== 'undefined',
|
|
95
|
-
entraGroupName: typeof args.options.entraGroupName !== 'undefined',
|
|
96
|
-
roleDefinitionId: typeof args.options.roleDefinitionId !== 'undefined',
|
|
97
|
-
roleDefinitionName: typeof args.options.roleDefinitionName !== 'undefined'
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}, _SpoWebRoleAssignmentAddCommand_initOptions = function _SpoWebRoleAssignmentAddCommand_initOptions() {
|
|
101
|
-
this.options.unshift({
|
|
102
|
-
option: '-u, --webUrl <webUrl>'
|
|
103
|
-
}, {
|
|
104
|
-
option: '--principalId [principalId]'
|
|
105
|
-
}, {
|
|
106
|
-
option: '--upn [upn]'
|
|
107
|
-
}, {
|
|
108
|
-
option: '--groupName [groupName]'
|
|
109
|
-
}, {
|
|
110
|
-
option: '--entraGroupId [entraGroupId]'
|
|
111
|
-
}, {
|
|
112
|
-
option: '--entraGroupName [entraGroupName]'
|
|
113
|
-
}, {
|
|
114
|
-
option: '--roleDefinitionId [roleDefinitionId]'
|
|
115
|
-
}, {
|
|
116
|
-
option: '--roleDefinitionName [roleDefinitionName]'
|
|
117
|
-
});
|
|
118
|
-
}, _SpoWebRoleAssignmentAddCommand_initValidators = function _SpoWebRoleAssignmentAddCommand_initValidators() {
|
|
119
|
-
this.validators.push(async (args) => {
|
|
120
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
121
|
-
if (isValidSharePointUrl !== true) {
|
|
122
|
-
return isValidSharePointUrl;
|
|
123
|
-
}
|
|
124
|
-
if (args.options.principalId && isNaN(args.options.principalId)) {
|
|
125
|
-
return `Specified principalId ${args.options.principalId} is not a number`;
|
|
126
|
-
}
|
|
127
|
-
if (args.options.roleDefinitionId && isNaN(args.options.roleDefinitionId)) {
|
|
128
|
-
return `Specified roleDefinitionId ${args.options.roleDefinitionId} is not a number`;
|
|
129
|
-
}
|
|
130
|
-
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
131
|
-
return `'${args.options.entraGroupId}' is not a valid GUID for option entraGroupId.`;
|
|
132
|
-
}
|
|
133
|
-
return true;
|
|
134
|
-
});
|
|
135
|
-
}, _SpoWebRoleAssignmentAddCommand_initOptionSets = function _SpoWebRoleAssignmentAddCommand_initOptionSets() {
|
|
136
|
-
this.optionSets.push({ options: ['principalId', 'upn', 'groupName', 'entraGroupId', 'entraGroupName'] }, { options: ['roleDefinitionId', 'roleDefinitionName'] });
|
|
137
|
-
};
|
|
138
114
|
export default new SpoWebRoleAssignmentAddCommand();
|
|
139
115
|
//# sourceMappingURL=web-roleassignment-add.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRoleAssignmentRemoveCommand_instances, _SpoWebRoleAssignmentRemoveCommand_initTelemetry, _SpoWebRoleAssignmentRemoveCommand_initOptions, _SpoWebRoleAssignmentRemoveCommand_initValidators, _SpoWebRoleAssignmentRemoveCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -11,6 +7,20 @@ import commands from '../../commands.js';
|
|
|
11
7
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
8
|
import { spo } from '../../../../utils/spo.js';
|
|
13
9
|
import { cli } from '../../../../cli/cli.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
14
|
+
}).alias('u'),
|
|
15
|
+
principalId: z.number().optional(),
|
|
16
|
+
upn: z.string().optional(),
|
|
17
|
+
groupName: z.string().optional(),
|
|
18
|
+
entraGroupId: z.string().refine(id => validation.isValidGuid(id), {
|
|
19
|
+
error: e => `'${e.input}' is not a valid GUID for option entraGroupId.`
|
|
20
|
+
}).optional(),
|
|
21
|
+
entraGroupName: z.string().optional(),
|
|
22
|
+
force: z.boolean().optional().alias('f')
|
|
23
|
+
});
|
|
14
24
|
class SpoWebRoleAssignmentRemoveCommand extends SpoCommand {
|
|
15
25
|
get name() {
|
|
16
26
|
return commands.WEB_ROLEASSIGNMENT_REMOVE;
|
|
@@ -18,13 +28,17 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
18
28
|
get description() {
|
|
19
29
|
return 'Removes a role assignment from web permissions';
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
get schema() {
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
getRefinedSchema(schema) {
|
|
35
|
+
return schema.refine(options => [options.principalId, options.upn, options.groupName, options.entraGroupId, options.entraGroupName].filter(x => x !== undefined).length === 1, {
|
|
36
|
+
error: `Specify either 'principalId', 'upn', 'groupName', 'entraGroupId', or 'entraGroupName'.`,
|
|
37
|
+
params: {
|
|
38
|
+
customCode: 'optionSet',
|
|
39
|
+
options: ['principalId', 'upn', 'groupName', 'entraGroupId', 'entraGroupName']
|
|
40
|
+
}
|
|
41
|
+
});
|
|
28
42
|
}
|
|
29
43
|
async commandAction(logger, args) {
|
|
30
44
|
if (args.options.force) {
|
|
@@ -42,7 +56,10 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
42
56
|
await logger.logToStderr(`Removing role assignment from web ${options.webUrl}...`);
|
|
43
57
|
}
|
|
44
58
|
try {
|
|
45
|
-
if (options.
|
|
59
|
+
if (options.principalId) {
|
|
60
|
+
await this.removeRoleAssignmentWithOptions(options.webUrl, options.principalId, logger);
|
|
61
|
+
}
|
|
62
|
+
else if (options.upn) {
|
|
46
63
|
const principalId = await this.getUserPrincipalId(options, logger);
|
|
47
64
|
await this.removeRoleAssignmentWithOptions(options.webUrl, principalId, logger);
|
|
48
65
|
}
|
|
@@ -89,49 +106,5 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
89
106
|
return user.Id;
|
|
90
107
|
}
|
|
91
108
|
}
|
|
92
|
-
_SpoWebRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoWebRoleAssignmentRemoveCommand_initTelemetry = function _SpoWebRoleAssignmentRemoveCommand_initTelemetry() {
|
|
93
|
-
this.telemetry.push((args) => {
|
|
94
|
-
Object.assign(this.telemetryProperties, {
|
|
95
|
-
principalId: typeof args.options.principalId !== 'undefined',
|
|
96
|
-
upn: typeof args.options.upn !== 'undefined',
|
|
97
|
-
groupName: typeof args.options.groupName !== 'undefined',
|
|
98
|
-
entraGroupId: typeof args.options.entraGroupId !== 'undefined',
|
|
99
|
-
entraGroupName: typeof args.options.entraGroupName !== 'undefined',
|
|
100
|
-
force: (!(!args.options.force)).toString()
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}, _SpoWebRoleAssignmentRemoveCommand_initOptions = function _SpoWebRoleAssignmentRemoveCommand_initOptions() {
|
|
104
|
-
this.options.unshift({
|
|
105
|
-
option: '-u, --webUrl <webUrl>'
|
|
106
|
-
}, {
|
|
107
|
-
option: '--principalId [principalId]'
|
|
108
|
-
}, {
|
|
109
|
-
option: '--upn [upn]'
|
|
110
|
-
}, {
|
|
111
|
-
option: '--groupName [groupName]'
|
|
112
|
-
}, {
|
|
113
|
-
option: '--entraGroupId [entraGroupId]'
|
|
114
|
-
}, {
|
|
115
|
-
option: '--entraGroupName [entraGroupName]'
|
|
116
|
-
}, {
|
|
117
|
-
option: '-f, --force'
|
|
118
|
-
});
|
|
119
|
-
}, _SpoWebRoleAssignmentRemoveCommand_initValidators = function _SpoWebRoleAssignmentRemoveCommand_initValidators() {
|
|
120
|
-
this.validators.push(async (args) => {
|
|
121
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
122
|
-
if (isValidSharePointUrl !== true) {
|
|
123
|
-
return isValidSharePointUrl;
|
|
124
|
-
}
|
|
125
|
-
if (args.options.principalId && isNaN(args.options.principalId)) {
|
|
126
|
-
return `Specified principalId ${args.options.principalId} is not a number`;
|
|
127
|
-
}
|
|
128
|
-
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
129
|
-
return `'${args.options.entraGroupId}' is not a valid GUID for option entraGroupId.`;
|
|
130
|
-
}
|
|
131
|
-
return true;
|
|
132
|
-
});
|
|
133
|
-
}, _SpoWebRoleAssignmentRemoveCommand_initOptionSets = function _SpoWebRoleAssignmentRemoveCommand_initOptionSets() {
|
|
134
|
-
this.optionSets.push({ options: ['principalId', 'upn', 'groupName', 'entraGroupId', 'entraGroupName'] });
|
|
135
|
-
};
|
|
136
109
|
export default new SpoWebRoleAssignmentRemoveCommand();
|
|
137
110
|
//# sourceMappingURL=web-roleassignment-remove.js.map
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRoleInheritanceBreakCommand_instances, _SpoWebRoleInheritanceBreakCommand_initTelemetry, _SpoWebRoleInheritanceBreakCommand_initOptions, _SpoWebRoleInheritanceBreakCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
12
|
+
}).alias('u'),
|
|
13
|
+
clearExistingPermissions: z.boolean().optional().alias('c'),
|
|
14
|
+
force: z.boolean().optional().alias('f')
|
|
15
|
+
});
|
|
12
16
|
class SpoWebRoleInheritanceBreakCommand extends SpoCommand {
|
|
13
17
|
get name() {
|
|
14
18
|
return commands.WEB_ROLEINHERITANCE_BREAK;
|
|
@@ -16,12 +20,8 @@ class SpoWebRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
16
20
|
get description() {
|
|
17
21
|
return 'Breaks role inheritance of subsite';
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoWebRoleInheritanceBreakCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceBreakCommand_instances, "m", _SpoWebRoleInheritanceBreakCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceBreakCommand_instances, "m", _SpoWebRoleInheritanceBreakCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceBreakCommand_instances, "m", _SpoWebRoleInheritanceBreakCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
25
|
}
|
|
26
26
|
async commandAction(logger, args) {
|
|
27
27
|
if (this.verbose) {
|
|
@@ -54,29 +54,5 @@ class SpoWebRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
_SpoWebRoleInheritanceBreakCommand_instances = new WeakSet(), _SpoWebRoleInheritanceBreakCommand_initTelemetry = function _SpoWebRoleInheritanceBreakCommand_initTelemetry() {
|
|
58
|
-
this.telemetry.push((args) => {
|
|
59
|
-
Object.assign(this.telemetryProperties, {
|
|
60
|
-
clearExistingPermissions: !!args.options.clearExistingPermissions,
|
|
61
|
-
force: !!args.options.force
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}, _SpoWebRoleInheritanceBreakCommand_initOptions = function _SpoWebRoleInheritanceBreakCommand_initOptions() {
|
|
65
|
-
this.options.unshift({
|
|
66
|
-
option: '-u, --webUrl <webUrl>'
|
|
67
|
-
}, {
|
|
68
|
-
option: '-c, --clearExistingPermissions'
|
|
69
|
-
}, {
|
|
70
|
-
option: '-f, --force'
|
|
71
|
-
});
|
|
72
|
-
}, _SpoWebRoleInheritanceBreakCommand_initValidators = function _SpoWebRoleInheritanceBreakCommand_initValidators() {
|
|
73
|
-
this.validators.push(async (args) => {
|
|
74
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
75
|
-
if (isValidSharePointUrl !== true) {
|
|
76
|
-
return isValidSharePointUrl;
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
57
|
export default new SpoWebRoleInheritanceBreakCommand();
|
|
82
58
|
//# sourceMappingURL=web-roleinheritance-break.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
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");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoWebRoleInheritanceResetCommand_instances, _SpoWebRoleInheritanceResetCommand_initTelemetry, _SpoWebRoleInheritanceResetCommand_initOptions, _SpoWebRoleInheritanceResetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
12
|
+
}).alias('u'),
|
|
13
|
+
force: z.boolean().optional().alias('f')
|
|
14
|
+
});
|
|
12
15
|
class SpoWebRoleInheritanceResetCommand extends SpoCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.WEB_ROLEINHERITANCE_RESET;
|
|
@@ -16,12 +19,8 @@ class SpoWebRoleInheritanceResetCommand extends SpoCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Restores role inheritance of subsite';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoWebRoleInheritanceResetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initValidators).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
25
24
|
}
|
|
26
25
|
async commandAction(logger, args) {
|
|
27
26
|
if (this.verbose) {
|
|
@@ -55,22 +54,5 @@ class SpoWebRoleInheritanceResetCommand extends SpoCommand {
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
|
-
_SpoWebRoleInheritanceResetCommand_instances = new WeakSet(), _SpoWebRoleInheritanceResetCommand_initTelemetry = function _SpoWebRoleInheritanceResetCommand_initTelemetry() {
|
|
59
|
-
this.telemetry.push((args) => {
|
|
60
|
-
Object.assign(this.telemetryProperties, {
|
|
61
|
-
force: (!(!args.options.force)).toString()
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}, _SpoWebRoleInheritanceResetCommand_initOptions = function _SpoWebRoleInheritanceResetCommand_initOptions() {
|
|
65
|
-
this.options.unshift({
|
|
66
|
-
option: '-u, --webUrl <webUrl>'
|
|
67
|
-
}, {
|
|
68
|
-
option: '-f, --force'
|
|
69
|
-
});
|
|
70
|
-
}, _SpoWebRoleInheritanceResetCommand_initValidators = function _SpoWebRoleInheritanceResetCommand_initValidators() {
|
|
71
|
-
this.validators.push(async (args) => {
|
|
72
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
57
|
export default new SpoWebRoleInheritanceResetCommand();
|
|
76
58
|
//# sourceMappingURL=web-roleinheritance-reset.js.map
|
|
@@ -29,9 +29,6 @@ class SpoWebRuleListCommand extends SpoCommand {
|
|
|
29
29
|
get description() {
|
|
30
30
|
return 'Lists all SharePoint list alerts';
|
|
31
31
|
}
|
|
32
|
-
alias() {
|
|
33
|
-
return [commands.WEB_ALERT_LIST];
|
|
34
|
-
}
|
|
35
32
|
defaultProperties() {
|
|
36
33
|
return ['ID', 'Title', 'UserPrincipalName'];
|
|
37
34
|
}
|
|
@@ -75,7 +72,12 @@ class SpoWebRuleListCommand extends SpoCommand {
|
|
|
75
72
|
listId = args.options.listId;
|
|
76
73
|
}
|
|
77
74
|
else if (args.options.listUrl || args.options.listTitle) {
|
|
78
|
-
|
|
75
|
+
try {
|
|
76
|
+
listId = await spo.getListId(args.options.webUrl, args.options.listTitle, args.options.listUrl, logger, this.verbose);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
this.handleRejectedODataJsonPromise(err);
|
|
80
|
+
}
|
|
79
81
|
}
|
|
80
82
|
if (listId) {
|
|
81
83
|
filters.push(`List/Id eq guid'${formatting.encodeQueryParameter(listId)}'`);
|