@pnp/cli-microsoft365 7.0.0-beta.99e75a7 → 7.0.0-beta.b2eab57
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/dist/cli/Cli.js +19 -2
- package/dist/m365/spo/commands/file/file-move.js +73 -97
- package/dist/m365/spo/commands/folder/folder-copy.js +89 -45
- package/dist/m365/spo/commands/folder/folder-move.js +89 -47
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
- package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
- package/dist/m365/spo/commands/site/site-ensure.js +3 -3
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
- package/dist/m365/spo/commands/site/site-list.js +29 -39
- package/dist/m365/spo/commands/site/site-set.js +58 -47
- package/dist/m365/spo/commands/theme/theme-remove.js +24 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +27 -27
- package/dist/m365/spo/commands/web/web-reindex.js +35 -42
- package/dist/m365/spo/commands/web/web-remove.js +21 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
- package/dist/m365/yammer/commands/message/message-like-set.js +27 -28
- package/dist/m365/yammer/commands/message/message-list.js +62 -81
- package/dist/m365/yammer/commands/message/message-remove.js +18 -18
- package/dist/m365/yammer/commands/yammer-search.js +53 -69
- package/dist/utils/spo.js +12 -53
- package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
- package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
|
@@ -14,16 +14,28 @@ m365 spo folder copy [options]
|
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
16
|
`-u, --webUrl <webUrl>`
|
|
17
|
-
: The URL of the site where the folder is located
|
|
17
|
+
: The URL of the site where the folder is located.
|
|
18
18
|
|
|
19
|
-
`-s, --sourceUrl
|
|
20
|
-
: The server
|
|
19
|
+
`-s, --sourceUrl [sourceUrl]`
|
|
20
|
+
: The server-, site-relative or absolute decoded URL of the folder to copy. Specify either `sourceUrl` or `sourceId` but not both.
|
|
21
|
+
|
|
22
|
+
`-i, --sourceId [sourceId]`
|
|
23
|
+
: The UniqueId (GUID) of the folder. Specify either `sourceUrl` or `sourceId` but not both.
|
|
21
24
|
|
|
22
25
|
`-t, --targetUrl <targetUrl>`
|
|
23
|
-
: Server-relative URL where to copy the folder
|
|
26
|
+
: Server-relative or absolute decoded URL where to copy the folder.
|
|
27
|
+
|
|
28
|
+
`--newName [newName]`
|
|
29
|
+
: New name of the destination folder.
|
|
30
|
+
|
|
31
|
+
`--nameConflictBehavior [nameConflictBehavior]`
|
|
32
|
+
: Behavior when a file or folder with the same name is already present at the destination. Possible values: `fail`, `rename`. The default is `fail`.
|
|
24
33
|
|
|
25
|
-
`--
|
|
26
|
-
:
|
|
34
|
+
`--resetAuthorAndCreated`
|
|
35
|
+
: Use this option to clear the author and created date. When not specified, the values from the source folder are used.
|
|
36
|
+
|
|
37
|
+
`--bypassSharedLock`
|
|
38
|
+
: This indicates whether a folder with a shared lock can still be moved. Use this option to copy a folder that is locked.
|
|
27
39
|
```
|
|
28
40
|
|
|
29
41
|
<Global />
|
|
@@ -32,26 +44,41 @@ m365 spo folder copy [options]
|
|
|
32
44
|
|
|
33
45
|
When you copy a folder with documents that have version history, only the latest document version is copied.
|
|
34
46
|
|
|
47
|
+
When you specify a value for `nameConflictBehavior`, consider the following:
|
|
48
|
+
|
|
49
|
+
- `fail` will throw an error when the destination folder already exists.
|
|
50
|
+
- `rename` will add a suffix (e.g. Folder1) when the destination folder already exists.
|
|
51
|
+
|
|
35
52
|
## Examples
|
|
36
53
|
|
|
37
|
-
|
|
54
|
+
Copy a folder a folder to another location using server-relative URLs
|
|
38
55
|
|
|
39
56
|
```sh
|
|
40
|
-
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/
|
|
57
|
+
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/sites/project-x/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents/Project files"
|
|
41
58
|
```
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
Copy a folder a folder to another location using site-relative URLs and rename it
|
|
44
61
|
|
|
45
62
|
```sh
|
|
46
|
-
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/
|
|
63
|
+
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents" --newName "Reports January"
|
|
47
64
|
```
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
Copy a folder to another location and use new name on conflict
|
|
50
67
|
|
|
51
68
|
```sh
|
|
52
|
-
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/
|
|
69
|
+
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/sites/project-x/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents/Project files" --nameConflictBehavior rename
|
|
53
70
|
```
|
|
54
71
|
|
|
72
|
+
Copy a folder referenced by its ID to another document library and reset author and created date
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 spo folder copy --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/Project files" --retainEditorAndModified
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Response
|
|
79
|
+
|
|
80
|
+
The command won't return a response on success.
|
|
81
|
+
|
|
55
82
|
## More information
|
|
56
83
|
|
|
57
84
|
- Copy items from a SharePoint document library: [https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc](https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc)
|
|
@@ -14,44 +14,71 @@ m365 spo folder move [options]
|
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
16
|
`-u, --webUrl <webUrl>`
|
|
17
|
-
: The URL of the site where the folder is located
|
|
17
|
+
: The URL of the site where the folder is located.
|
|
18
18
|
|
|
19
|
-
`-s, --sourceUrl
|
|
20
|
-
: The server
|
|
19
|
+
`-s, --sourceUrl [sourceUrl]`
|
|
20
|
+
: The server-, site-relative or absolute decoded URL of the folder to move. Specify either `sourceUrl` or `sourceId` but not both.
|
|
21
|
+
|
|
22
|
+
`-i, --sourceId [sourceId]`
|
|
23
|
+
: The ID of the folder to move. Specify either `sourceUrl` or `sourceId` but not both.
|
|
21
24
|
|
|
22
25
|
`-t, --targetUrl <targetUrl>`
|
|
23
|
-
: Server-relative URL where to move the folder
|
|
26
|
+
: Server-relative or absolute decoded URL where to move the folder.
|
|
27
|
+
|
|
28
|
+
`--newName [newName]`
|
|
29
|
+
: The new name of the destination folder.
|
|
30
|
+
|
|
31
|
+
`--nameConflictBehavior [nameConflictBehavior]`
|
|
32
|
+
: Behavior when a file or folder with the same name is already present at the destination. Possible values: `fail`, `rename`. The default is `fail`.
|
|
24
33
|
|
|
25
|
-
`--
|
|
26
|
-
:
|
|
34
|
+
`--retainEditorAndModified`
|
|
35
|
+
: Use this option to retain the editor and modified date. When not specified, these values are reset.
|
|
36
|
+
|
|
37
|
+
`--bypassSharedLock`
|
|
38
|
+
: This indicates whether a folder with a share lock can still be moved. Use this option to move a folder that is locked.
|
|
27
39
|
```
|
|
28
40
|
|
|
29
41
|
<Global />
|
|
30
42
|
|
|
31
43
|
## Remarks
|
|
32
44
|
|
|
33
|
-
|
|
45
|
+
All folder versions are retained while moving a folder.
|
|
46
|
+
|
|
47
|
+
When you specify a value for `nameConflictBehavior`, consider the following:
|
|
48
|
+
|
|
49
|
+
- `fail` will throw an error when the destination folder already exists.
|
|
50
|
+
- `rename` will add a suffix (e.g. folder1) when the destination folder already exists.
|
|
34
51
|
|
|
35
52
|
## Examples
|
|
36
53
|
|
|
37
|
-
Move folder to a document library in another site collection
|
|
54
|
+
Move a folder to a document library in another site collection by server-relative URL
|
|
38
55
|
|
|
39
56
|
```sh
|
|
40
|
-
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/
|
|
57
|
+
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/sites/project-x/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents/Reports January"
|
|
41
58
|
```
|
|
42
59
|
|
|
43
|
-
Move folder to
|
|
60
|
+
Move a folder to another location using site-relative URLs and rename it
|
|
44
61
|
|
|
45
62
|
```sh
|
|
46
|
-
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/
|
|
63
|
+
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents" --newName "Reports January"
|
|
47
64
|
```
|
|
48
65
|
|
|
49
|
-
Move folder to
|
|
66
|
+
Move a folder to another location and use a new name on conflict
|
|
50
67
|
|
|
51
68
|
```sh
|
|
52
|
-
m365 spo
|
|
69
|
+
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/sites/project-x/Shared Documents/Reports" --targetUrl "/sites/project-y/Shared Documents/Project files" --nameConflictBehavior rename
|
|
53
70
|
```
|
|
54
71
|
|
|
72
|
+
Move a folder referenced by its ID to another document library and retain editor and modified date
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 spo folder move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/Project files" --retainEditorAndModified
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Response
|
|
79
|
+
|
|
80
|
+
The command won't return a response on success.
|
|
81
|
+
|
|
55
82
|
## More information
|
|
56
83
|
|
|
57
84
|
- Move items from a SharePoint document library: [https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc](https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc)
|
|
@@ -103,7 +103,7 @@ If you set the type to `ClassicSite`, you should also set a value of the `webTem
|
|
|
103
103
|
Ensure that a site exists at the specified URL. Create a modern team site if no site exists. If a site is found, don't check its type and update its title.
|
|
104
104
|
|
|
105
105
|
```sh
|
|
106
|
-
m365 spo site ensure --url https://contoso.sharepoint.com/
|
|
106
|
+
m365 spo site ensure --url https://contoso.sharepoint.com/teams/team1 --alias team1 --title "Team 1"
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Ensure that a communication site exists at the specified URL. Create a communication site if no site exists. If a site of different type is found, return an error.
|
package/npm-shrinkwrap.json
CHANGED
package/package.json
CHANGED