@pnp/cli-microsoft365 12.1.0-beta.0c2915d → 12.1.0-beta.dbc076e
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/m365/spo/commands/file/file-add.js +77 -51
- package/dist/m365/spo/commands/file/file-archive.js +1 -1
- package/dist/m365/spo/commands/file/file-checkin.js +64 -35
- package/dist/m365/spo/commands/file/file-checkout-undo.js +49 -25
- package/dist/m365/spo/commands/file/file-checkout.js +47 -24
- package/dist/m365/spo/commands/file/file-copy.js +68 -37
- package/dist/m365/spo/commands/file/file-get.js +79 -44
- package/dist/m365/spo/commands/file/file-list.js +39 -16
- package/dist/m365/spo/commands/file/file-move.js +68 -30
- package/dist/m365/spo/commands/file/file-remove.js +56 -27
- package/dist/m365/spo/commands/file/file-rename.js +36 -15
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +51 -26
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +50 -25
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +75 -47
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +70 -39
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +52 -26
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +49 -25
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +47 -24
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +70 -46
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +57 -33
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +47 -25
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +53 -32
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +51 -26
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +55 -29
- package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +45 -25
- package/dist/m365/spo/commands/file/file-version-get.js +43 -25
- package/dist/m365/spo/commands/file/file-version-keep.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +41 -24
- package/dist/m365/spo/commands/file/file-version-remove.js +47 -26
- package/dist/m365/spo/commands/file/file-version-restore.js +47 -26
- package/dist/m365/spo/commands/folder/folder-add.js +48 -19
- package/dist/m365/spo/commands/folder/folder-copy.js +62 -36
- package/dist/m365/spo/commands/folder/folder-get.js +51 -30
- package/dist/m365/spo/commands/folder/folder-list.js +39 -16
- package/dist/m365/spo/commands/folder/folder-move.js +62 -36
- package/dist/m365/spo/commands/folder/folder-remove.js +36 -15
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +48 -30
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +50 -30
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +79 -49
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +67 -37
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +36 -15
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +33 -14
- package/dist/m365/spo/commands/folder/folder-set.js +48 -28
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +86 -58
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +50 -33
- package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +42 -33
- package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +47 -32
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +41 -34
- package/dist/m365/spo/commands/folder/folder-sharinglink-set.js +43 -38
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
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 _SpoFolderSharingLinkRemoveCommand_instances, _SpoFolderSharingLinkRemoveCommand_initTelemetry, _SpoFolderSharingLinkRemoveCommand_initOptions, _SpoFolderSharingLinkRemoveCommand_initOptionSets, _SpoFolderSharingLinkRemoveCommand_initValidators, _SpoFolderSharingLinkRemoveCommand_initTypes;
|
|
2
7
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
-
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
8
|
import { spo } from '../../../../utils/spo.js';
|
|
5
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
6
10
|
import { drive } from '../../../../utils/drive.js';
|
|
@@ -8,26 +12,6 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
8
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
9
13
|
import request from '../../../../request.js';
|
|
10
14
|
import commands from '../../commands.js';
|
|
11
|
-
export const options = z.strictObject({
|
|
12
|
-
...globalOptionsZod.shape,
|
|
13
|
-
webUrl: z.string()
|
|
14
|
-
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
-
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
-
})
|
|
17
|
-
.alias('u'),
|
|
18
|
-
folderUrl: z.string().optional(),
|
|
19
|
-
folderId: z.string()
|
|
20
|
-
.refine(id => validation.isValidGuid(id), {
|
|
21
|
-
error: e => `'${e.input}' is not a valid GUID for option 'folderId'.`
|
|
22
|
-
})
|
|
23
|
-
.optional(),
|
|
24
|
-
id: z.string()
|
|
25
|
-
.refine(id => validation.isValidGuid(id), {
|
|
26
|
-
error: e => `'${e.input}' is not a valid GUID for option 'id'.`
|
|
27
|
-
})
|
|
28
|
-
.alias('i'),
|
|
29
|
-
force: z.boolean().optional().alias('f')
|
|
30
|
-
});
|
|
31
15
|
class SpoFolderSharingLinkRemoveCommand extends SpoCommand {
|
|
32
16
|
get name() {
|
|
33
17
|
return commands.FOLDER_SHARINGLINK_REMOVE;
|
|
@@ -35,18 +19,14 @@ class SpoFolderSharingLinkRemoveCommand extends SpoCommand {
|
|
|
35
19
|
get description() {
|
|
36
20
|
return 'Removes a sharing link from a folder';
|
|
37
21
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
customCode: 'optionSet',
|
|
47
|
-
options: ['folderUrl', 'folderId']
|
|
48
|
-
}
|
|
49
|
-
});
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_SpoFolderSharingLinkRemoveCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkRemoveCommand_instances, "m", _SpoFolderSharingLinkRemoveCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkRemoveCommand_instances, "m", _SpoFolderSharingLinkRemoveCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkRemoveCommand_instances, "m", _SpoFolderSharingLinkRemoveCommand_initOptionSets).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkRemoveCommand_instances, "m", _SpoFolderSharingLinkRemoveCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkRemoveCommand_instances, "m", _SpoFolderSharingLinkRemoveCommand_initTypes).call(this);
|
|
50
30
|
}
|
|
51
31
|
async commandAction(logger, args) {
|
|
52
32
|
const removeSharingLink = async () => {
|
|
@@ -84,5 +64,32 @@ class SpoFolderSharingLinkRemoveCommand extends SpoCommand {
|
|
|
84
64
|
}
|
|
85
65
|
}
|
|
86
66
|
}
|
|
67
|
+
_SpoFolderSharingLinkRemoveCommand_instances = new WeakSet(), _SpoFolderSharingLinkRemoveCommand_initTelemetry = function _SpoFolderSharingLinkRemoveCommand_initTelemetry() {
|
|
68
|
+
this.telemetry.push((args) => {
|
|
69
|
+
Object.assign(this.telemetryProperties, {
|
|
70
|
+
folderUrl: typeof args.options.folderUrl !== 'undefined',
|
|
71
|
+
folderId: typeof args.options.folderId !== 'undefined',
|
|
72
|
+
force: !!args.options.force
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}, _SpoFolderSharingLinkRemoveCommand_initOptions = function _SpoFolderSharingLinkRemoveCommand_initOptions() {
|
|
76
|
+
this.options.unshift({ option: '-u, --webUrl <webUrl>' }, { option: '--folderUrl [folderUrl]' }, { option: '--folderId [folderId]' }, { option: '-i, --id <id>' }, { option: '-f, --force' });
|
|
77
|
+
}, _SpoFolderSharingLinkRemoveCommand_initOptionSets = function _SpoFolderSharingLinkRemoveCommand_initOptionSets() {
|
|
78
|
+
this.optionSets.push({ options: ['folderUrl', 'folderId'] });
|
|
79
|
+
}, _SpoFolderSharingLinkRemoveCommand_initValidators = function _SpoFolderSharingLinkRemoveCommand_initValidators() {
|
|
80
|
+
this.validators.push(async (args) => {
|
|
81
|
+
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
82
|
+
if (isValidSharePointUrl !== true) {
|
|
83
|
+
return isValidSharePointUrl;
|
|
84
|
+
}
|
|
85
|
+
if (args.options.folderId && !validation.isValidGuid(args.options.folderId)) {
|
|
86
|
+
return `${args.options.folderId} is not a valid GUID`;
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
});
|
|
90
|
+
}, _SpoFolderSharingLinkRemoveCommand_initTypes = function _SpoFolderSharingLinkRemoveCommand_initTypes() {
|
|
91
|
+
this.types.string.push('webUrl', 'folderUrl', 'folderId', 'id');
|
|
92
|
+
this.types.boolean.push('force');
|
|
93
|
+
};
|
|
87
94
|
export default new SpoFolderSharingLinkRemoveCommand();
|
|
88
95
|
//# sourceMappingURL=folder-sharinglink-remove.js.map
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _SpoFolderSharingLinkSetCommand_instances, _SpoFolderSharingLinkSetCommand_initTelemetry, _SpoFolderSharingLinkSetCommand_initOptions, _SpoFolderSharingLinkSetCommand_initValidators, _SpoFolderSharingLinkSetCommand_initOptionSets, _SpoFolderSharingLinkSetCommand_initTypes;
|
|
3
7
|
import request from '../../../../request.js';
|
|
4
8
|
import { spo } from '../../../../utils/spo.js';
|
|
5
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -7,30 +11,6 @@ import { drive } from '../../../../utils/drive.js';
|
|
|
7
11
|
import { validation } from '../../../../utils/validation.js';
|
|
8
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
9
13
|
import commands from '../../commands.js';
|
|
10
|
-
export const options = z.strictObject({
|
|
11
|
-
...globalOptionsZod.shape,
|
|
12
|
-
webUrl: z.string()
|
|
13
|
-
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
-
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
|
-
})
|
|
16
|
-
.alias('u'),
|
|
17
|
-
folderUrl: z.string().optional(),
|
|
18
|
-
folderId: z.string()
|
|
19
|
-
.refine(id => validation.isValidGuid(id), {
|
|
20
|
-
error: e => `'${e.input}' is not a valid GUID for option 'folderId'.`
|
|
21
|
-
})
|
|
22
|
-
.optional(),
|
|
23
|
-
id: z.string()
|
|
24
|
-
.refine(id => validation.isValidGuid(id), {
|
|
25
|
-
error: e => `'${e.input}' is not a valid GUID for option 'id'.`
|
|
26
|
-
})
|
|
27
|
-
.alias('i'),
|
|
28
|
-
expirationDateTime: z.string()
|
|
29
|
-
.refine(dateTime => validation.isValidISODateTime(dateTime), {
|
|
30
|
-
error: e => `'${e.input}' is not a valid ISO date string.`
|
|
31
|
-
})
|
|
32
|
-
.optional()
|
|
33
|
-
});
|
|
34
14
|
class SpoFolderSharingLinkSetCommand extends SpoCommand {
|
|
35
15
|
get name() {
|
|
36
16
|
return commands.FOLDER_SHARINGLINK_SET;
|
|
@@ -38,18 +18,14 @@ class SpoFolderSharingLinkSetCommand extends SpoCommand {
|
|
|
38
18
|
get description() {
|
|
39
19
|
return 'Updates a specific sharing link to a folder';
|
|
40
20
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
customCode: 'optionSet',
|
|
50
|
-
options: ['folderId', 'folderUrl']
|
|
51
|
-
}
|
|
52
|
-
});
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
_SpoFolderSharingLinkSetCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkSetCommand_instances, "m", _SpoFolderSharingLinkSetCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkSetCommand_instances, "m", _SpoFolderSharingLinkSetCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkSetCommand_instances, "m", _SpoFolderSharingLinkSetCommand_initValidators).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkSetCommand_instances, "m", _SpoFolderSharingLinkSetCommand_initOptionSets).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SpoFolderSharingLinkSetCommand_instances, "m", _SpoFolderSharingLinkSetCommand_initTypes).call(this);
|
|
53
29
|
}
|
|
54
30
|
async commandAction(logger, args) {
|
|
55
31
|
if (this.verbose) {
|
|
@@ -81,5 +57,34 @@ class SpoFolderSharingLinkSetCommand extends SpoCommand {
|
|
|
81
57
|
}
|
|
82
58
|
}
|
|
83
59
|
}
|
|
60
|
+
_SpoFolderSharingLinkSetCommand_instances = new WeakSet(), _SpoFolderSharingLinkSetCommand_initTelemetry = function _SpoFolderSharingLinkSetCommand_initTelemetry() {
|
|
61
|
+
this.telemetry.push((args) => {
|
|
62
|
+
Object.assign(this.telemetryProperties, {
|
|
63
|
+
folderUrl: typeof args.options.folderUrl !== 'undefined',
|
|
64
|
+
folderId: typeof args.options.folderId !== 'undefined',
|
|
65
|
+
expirationDateTime: typeof args.options.expirationDateTime !== 'undefined'
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}, _SpoFolderSharingLinkSetCommand_initOptions = function _SpoFolderSharingLinkSetCommand_initOptions() {
|
|
69
|
+
this.options.unshift({ option: '-u, --webUrl <webUrl>' }, { option: '--folderUrl [folderUrl]' }, { option: '--folderId [folderId]' }, { option: '-i, --id <id>' }, { option: '--expirationDateTime [expirationDateTime]' });
|
|
70
|
+
}, _SpoFolderSharingLinkSetCommand_initValidators = function _SpoFolderSharingLinkSetCommand_initValidators() {
|
|
71
|
+
this.validators.push(async (args) => {
|
|
72
|
+
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
73
|
+
if (isValidSharePointUrl !== true) {
|
|
74
|
+
return isValidSharePointUrl;
|
|
75
|
+
}
|
|
76
|
+
if (args.options.folderId && !validation.isValidGuid(args.options.folderId)) {
|
|
77
|
+
return `${args.options.folderId} is not a valid GUID`;
|
|
78
|
+
}
|
|
79
|
+
if (args.options.expirationDateTime && !validation.isValidISODateTime(args.options.expirationDateTime)) {
|
|
80
|
+
return `${args.options.expirationDateTime} is not a valid ISO date string.`;
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
});
|
|
84
|
+
}, _SpoFolderSharingLinkSetCommand_initOptionSets = function _SpoFolderSharingLinkSetCommand_initOptionSets() {
|
|
85
|
+
this.optionSets.push({ options: ['folderId', 'folderUrl'] });
|
|
86
|
+
}, _SpoFolderSharingLinkSetCommand_initTypes = function _SpoFolderSharingLinkSetCommand_initTypes() {
|
|
87
|
+
this.types.string.push('webUrl', 'folderId', 'folderUrl', 'id', 'expirationDateTime');
|
|
88
|
+
};
|
|
84
89
|
export default new SpoFolderSharingLinkSetCommand();
|
|
85
90
|
//# sourceMappingURL=folder-sharinglink-set.js.map
|
package/package.json
CHANGED