@pnp/cli-microsoft365 12.0.0-beta.0be7d8d → 12.0.0-beta.10c5833
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/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-remove.js +8 -5
- 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-get.js +47 -0
- 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 +1 -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/file/file-archive.mdx +8 -0
- package/docs/docs/cmd/spo/file/file-remove.mdx +4 -4
- 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/list/list-remove.mdx +4 -4
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
- package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
- 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-get.mdx +108 -0
- 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/people/people-profilecardproperty-add.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +19 -0
- package/npm-shrinkwrap.json +432 -0
- package/package.json +6 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
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 _SpoUserProfileGetCommand_instances, _SpoUserProfileGetCommand_initOptions, _SpoUserProfileGetCommand_initValidators;
|
|
7
1
|
import { cli } from '../../../../cli/cli.js';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
3
|
import request from '../../../../request.js';
|
|
9
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
5
|
import { spo } from '../../../../utils/spo.js';
|
|
11
6
|
import { validation } from '../../../../utils/validation.js';
|
|
12
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
8
|
import commands from '../../commands.js';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
userName: z.string().refine(userName => validation.isValidUserPrincipalName(userName), {
|
|
13
|
+
error: e => `${e.input} is not a valid user principal name`
|
|
14
|
+
}).alias('u')
|
|
15
|
+
});
|
|
14
16
|
class SpoUserProfileGetCommand extends SpoCommand {
|
|
15
17
|
get name() {
|
|
16
18
|
return commands.USERPROFILE_GET;
|
|
@@ -18,11 +20,8 @@ class SpoUserProfileGetCommand extends SpoCommand {
|
|
|
18
20
|
get description() {
|
|
19
21
|
return 'Gets SharePoint user profile properties for the specified user';
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoUserProfileGetCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoUserProfileGetCommand_instances, "m", _SpoUserProfileGetCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoUserProfileGetCommand_instances, "m", _SpoUserProfileGetCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
26
25
|
}
|
|
27
26
|
async commandAction(logger, args) {
|
|
28
27
|
try {
|
|
@@ -46,17 +45,5 @@ class SpoUserProfileGetCommand extends SpoCommand {
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
_SpoUserProfileGetCommand_instances = new WeakSet(), _SpoUserProfileGetCommand_initOptions = function _SpoUserProfileGetCommand_initOptions() {
|
|
50
|
-
this.options.unshift({
|
|
51
|
-
option: '-u, --userName <userName>'
|
|
52
|
-
});
|
|
53
|
-
}, _SpoUserProfileGetCommand_initValidators = function _SpoUserProfileGetCommand_initValidators() {
|
|
54
|
-
this.validators.push(async (args) => {
|
|
55
|
-
if (!validation.isValidUserPrincipalName(args.options.userName)) {
|
|
56
|
-
return `${args.options.userName} is not a valid user principal name`;
|
|
57
|
-
}
|
|
58
|
-
return true;
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
48
|
export default new SpoUserProfileGetCommand();
|
|
62
49
|
//# sourceMappingURL=userprofile-get.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
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 _SpoUserProfileSetCommand_instances, _SpoUserProfileSetCommand_initOptions;
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
2
|
import request from '../../../../request.js';
|
|
8
3
|
import { spo } from '../../../../utils/spo.js';
|
|
9
4
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
userName: z.string().alias('u'),
|
|
10
|
+
propertyName: z.string().alias('n'),
|
|
11
|
+
propertyValue: z.string().alias('v')
|
|
12
|
+
});
|
|
11
13
|
class SpoUserProfileSetCommand extends SpoCommand {
|
|
12
14
|
get name() {
|
|
13
15
|
return commands.USERPROFILE_SET;
|
|
@@ -15,10 +17,8 @@ class SpoUserProfileSetCommand extends SpoCommand {
|
|
|
15
17
|
get description() {
|
|
16
18
|
return 'Sets user profile property for a SharePoint user';
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_SpoUserProfileSetCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _SpoUserProfileSetCommand_instances, "m", _SpoUserProfileSetCommand_initOptions).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
22
|
}
|
|
23
23
|
async commandAction(logger, args) {
|
|
24
24
|
try {
|
|
@@ -54,14 +54,5 @@ class SpoUserProfileSetCommand extends SpoCommand {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
_SpoUserProfileSetCommand_instances = new WeakSet(), _SpoUserProfileSetCommand_initOptions = function _SpoUserProfileSetCommand_initOptions() {
|
|
58
|
-
this.options.unshift({
|
|
59
|
-
option: '-u, --userName <userName>'
|
|
60
|
-
}, {
|
|
61
|
-
option: '-n, --propertyName <propertyName>'
|
|
62
|
-
}, {
|
|
63
|
-
option: '-v, --propertyValue <propertyValue>'
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
57
|
export default new SpoUserProfileSetCommand();
|
|
67
58
|
//# sourceMappingURL=userprofile-set.js.map
|
|
@@ -1,10 +1,6 @@
|
|
|
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 _SpoWebAddCommand_instances, _SpoWebAddCommand_initTelemetry, _SpoWebAddCommand_initOptions, _SpoWebAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import config from '../../../../config.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { spo } from '../../../../utils/spo.js';
|
|
@@ -12,6 +8,21 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
12
8
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
9
|
import { BasePermissions, PermissionKind } from '../../base-permissions.js';
|
|
14
10
|
import commands from '../../commands.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
title: z.string().alias('t'),
|
|
14
|
+
description: z.string().optional().alias('d'),
|
|
15
|
+
url: z.string().alias('u'),
|
|
16
|
+
webTemplate: z.string().alias('w'),
|
|
17
|
+
parentWebUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
18
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
19
|
+
}).alias('p'),
|
|
20
|
+
locale: z.union([z.string(), z.number()]).refine(locale => !isNaN(parseInt(locale.toString())), {
|
|
21
|
+
error: e => `${e.input} is not a valid locale number`
|
|
22
|
+
}).optional().alias('l'),
|
|
23
|
+
breakInheritance: z.boolean().optional(),
|
|
24
|
+
inheritNavigation: z.boolean().optional()
|
|
25
|
+
});
|
|
15
26
|
class SpoWebAddCommand extends SpoCommand {
|
|
16
27
|
get name() {
|
|
17
28
|
return commands.WEB_ADD;
|
|
@@ -19,12 +30,8 @@ class SpoWebAddCommand extends SpoCommand {
|
|
|
19
30
|
get description() {
|
|
20
31
|
return 'Creates new subsite';
|
|
21
32
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoWebAddCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoWebAddCommand_instances, "m", _SpoWebAddCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoWebAddCommand_instances, "m", _SpoWebAddCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoWebAddCommand_instances, "m", _SpoWebAddCommand_initValidators).call(this);
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
28
35
|
}
|
|
29
36
|
getExcludedOptionsWithUrls() {
|
|
30
37
|
return ['url'];
|
|
@@ -52,7 +59,7 @@ class SpoWebAddCommand extends SpoCommand {
|
|
|
52
59
|
}
|
|
53
60
|
};
|
|
54
61
|
if (this.verbose) {
|
|
55
|
-
await logger.logToStderr(`Creating subsite ${args.options.parentWebUrl}/${args.options.
|
|
62
|
+
await logger.logToStderr(`Creating subsite ${args.options.parentWebUrl}/${args.options.url}...`);
|
|
56
63
|
}
|
|
57
64
|
const siteInfo = await request.post(requestOptionsPost);
|
|
58
65
|
if (args.options.inheritNavigation) {
|
|
@@ -105,47 +112,5 @@ class SpoWebAddCommand extends SpoCommand {
|
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
114
|
}
|
|
108
|
-
_SpoWebAddCommand_instances = new WeakSet(), _SpoWebAddCommand_initTelemetry = function _SpoWebAddCommand_initTelemetry() {
|
|
109
|
-
this.telemetry.push((args) => {
|
|
110
|
-
Object.assign(this.telemetryProperties, {
|
|
111
|
-
description: (!(!args.options.description)).toString(),
|
|
112
|
-
locale: args.options.locale || '1033',
|
|
113
|
-
breakInheritance: args.options.breakInheritance || false,
|
|
114
|
-
inheritNavigation: args.options.inheritNavigation || false
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}, _SpoWebAddCommand_initOptions = function _SpoWebAddCommand_initOptions() {
|
|
118
|
-
this.options.unshift({
|
|
119
|
-
option: '-t, --title <title>'
|
|
120
|
-
}, {
|
|
121
|
-
option: '-d, --description [description]'
|
|
122
|
-
}, {
|
|
123
|
-
option: '-u, --url <url>'
|
|
124
|
-
}, {
|
|
125
|
-
option: '-w, --webTemplate <webTemplate>'
|
|
126
|
-
}, {
|
|
127
|
-
option: '-p, --parentWebUrl <parentWebUrl>'
|
|
128
|
-
}, {
|
|
129
|
-
option: '-l, --locale [locale]'
|
|
130
|
-
}, {
|
|
131
|
-
option: '--breakInheritance'
|
|
132
|
-
}, {
|
|
133
|
-
option: '--inheritNavigation'
|
|
134
|
-
});
|
|
135
|
-
}, _SpoWebAddCommand_initValidators = function _SpoWebAddCommand_initValidators() {
|
|
136
|
-
this.validators.push(async (args) => {
|
|
137
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.parentWebUrl);
|
|
138
|
-
if (isValidSharePointUrl !== true) {
|
|
139
|
-
return isValidSharePointUrl;
|
|
140
|
-
}
|
|
141
|
-
if (args.options.locale) {
|
|
142
|
-
const locale = parseInt(args.options.locale);
|
|
143
|
-
if (isNaN(locale)) {
|
|
144
|
-
return `${args.options.locale} is not a valid locale number`;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return true;
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
115
|
export default new SpoWebAddCommand();
|
|
151
116
|
//# sourceMappingURL=web-add.js.map
|
|
@@ -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 _SpoWebClientSideWebPartListCommand_instances, _SpoWebClientSideWebPartListCommand_initOptions, _SpoWebClientSideWebPartListCommand_initValidators;
|
|
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';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: 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 SpoWebClientSideWebPartListCommand extends SpoCommand {
|
|
12
14
|
get name() {
|
|
13
15
|
return commands.WEB_CLIENTSIDEWEBPART_LIST;
|
|
@@ -15,11 +17,8 @@ class SpoWebClientSideWebPartListCommand extends SpoCommand {
|
|
|
15
17
|
get description() {
|
|
16
18
|
return 'Lists available client-side web parts';
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_SpoWebClientSideWebPartListCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _SpoWebClientSideWebPartListCommand_instances, "m", _SpoWebClientSideWebPartListCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoWebClientSideWebPartListCommand_instances, "m", _SpoWebClientSideWebPartListCommand_initValidators).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
23
22
|
}
|
|
24
23
|
async commandAction(logger, args) {
|
|
25
24
|
const requestOptions = {
|
|
@@ -48,12 +47,5 @@ class SpoWebClientSideWebPartListCommand extends SpoCommand {
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
_SpoWebClientSideWebPartListCommand_instances = new WeakSet(), _SpoWebClientSideWebPartListCommand_initOptions = function _SpoWebClientSideWebPartListCommand_initOptions() {
|
|
52
|
-
this.options.unshift({
|
|
53
|
-
option: '-u, --webUrl <webUrl>'
|
|
54
|
-
});
|
|
55
|
-
}, _SpoWebClientSideWebPartListCommand_initValidators = function _SpoWebClientSideWebPartListCommand_initValidators() {
|
|
56
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
57
|
-
};
|
|
58
50
|
export default new SpoWebClientSideWebPartListCommand();
|
|
59
51
|
//# sourceMappingURL=web-clientsidewebpart-list.js.map
|
|
@@ -1,14 +1,18 @@
|
|
|
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 _SpoWebGetCommand_instances, _SpoWebGetCommand_initTelemetry, _SpoWebGetCommand_initOptions, _SpoWebGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.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
|
+
withGroups: z.boolean().optional(),
|
|
14
|
+
withPermissions: z.boolean().optional()
|
|
15
|
+
});
|
|
12
16
|
class SpoWebGetCommand extends SpoCommand {
|
|
13
17
|
get name() {
|
|
14
18
|
return commands.WEB_GET;
|
|
@@ -16,12 +20,8 @@ class SpoWebGetCommand extends SpoCommand {
|
|
|
16
20
|
get description() {
|
|
17
21
|
return 'Retrieves information about the specified site';
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoWebGetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoWebGetCommand_instances, "m", _SpoWebGetCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoWebGetCommand_instances, "m", _SpoWebGetCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebGetCommand_instances, "m", _SpoWebGetCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
25
|
}
|
|
26
26
|
async commandAction(logger, args) {
|
|
27
27
|
let url = `${args.options.url}/_api/web`;
|
|
@@ -52,23 +52,5 @@ class SpoWebGetCommand extends SpoCommand {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
_SpoWebGetCommand_instances = new WeakSet(), _SpoWebGetCommand_initTelemetry = function _SpoWebGetCommand_initTelemetry() {
|
|
56
|
-
this.telemetry.push((args) => {
|
|
57
|
-
Object.assign(this.telemetryProperties, {
|
|
58
|
-
withGroups: !!args.options.withGroups,
|
|
59
|
-
withPermissions: !!args.options.withPermissions
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}, _SpoWebGetCommand_initOptions = function _SpoWebGetCommand_initOptions() {
|
|
63
|
-
this.options.unshift({
|
|
64
|
-
option: '-u, --url <url>'
|
|
65
|
-
}, {
|
|
66
|
-
option: '--withGroups'
|
|
67
|
-
}, {
|
|
68
|
-
option: '--withPermissions'
|
|
69
|
-
});
|
|
70
|
-
}, _SpoWebGetCommand_initValidators = function _SpoWebGetCommand_initValidators() {
|
|
71
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
|
|
72
|
-
};
|
|
73
55
|
export default new SpoWebGetCommand();
|
|
74
56
|
//# sourceMappingURL=web-get.js.map
|
|
@@ -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 _SpoWebInstalledLanguageListCommand_instances, _SpoWebInstalledLanguageListCommand_initOptions, _SpoWebInstalledLanguageListCommand_initValidators;
|
|
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';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: 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 SpoWebInstalledLanguageListCommand extends SpoCommand {
|
|
12
14
|
get name() {
|
|
13
15
|
return commands.WEB_INSTALLEDLANGUAGE_LIST;
|
|
@@ -18,11 +20,8 @@ class SpoWebInstalledLanguageListCommand extends SpoCommand {
|
|
|
18
20
|
defaultProperties() {
|
|
19
21
|
return ['DisplayName', 'LanguageTag', 'Lcid'];
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoWebInstalledLanguageListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoWebInstalledLanguageListCommand_instances, "m", _SpoWebInstalledLanguageListCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoWebInstalledLanguageListCommand_instances, "m", _SpoWebInstalledLanguageListCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
26
25
|
}
|
|
27
26
|
async commandAction(logger, args) {
|
|
28
27
|
if (this.verbose) {
|
|
@@ -44,12 +43,5 @@ class SpoWebInstalledLanguageListCommand extends SpoCommand {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
_SpoWebInstalledLanguageListCommand_instances = new WeakSet(), _SpoWebInstalledLanguageListCommand_initOptions = function _SpoWebInstalledLanguageListCommand_initOptions() {
|
|
48
|
-
this.options.unshift({
|
|
49
|
-
option: '-u, --webUrl <webUrl>'
|
|
50
|
-
});
|
|
51
|
-
}, _SpoWebInstalledLanguageListCommand_initValidators = function _SpoWebInstalledLanguageListCommand_initValidators() {
|
|
52
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
53
|
-
};
|
|
54
46
|
export default new SpoWebInstalledLanguageListCommand();
|
|
55
47
|
//# sourceMappingURL=web-installedlanguage-list.js.map
|
|
@@ -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
|