@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.
Files changed (31) hide show
  1. package/dist/cli/Cli.js +19 -2
  2. package/dist/m365/spo/commands/file/file-move.js +73 -97
  3. package/dist/m365/spo/commands/folder/folder-copy.js +89 -45
  4. package/dist/m365/spo/commands/folder/folder-move.js +89 -47
  5. package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
  6. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
  7. package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
  8. package/dist/m365/spo/commands/site/site-ensure.js +3 -3
  9. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
  10. package/dist/m365/spo/commands/site/site-list.js +29 -39
  11. package/dist/m365/spo/commands/site/site-set.js +58 -47
  12. package/dist/m365/spo/commands/theme/theme-remove.js +24 -24
  13. package/dist/m365/spo/commands/theme/theme-set.js +0 -1
  14. package/dist/m365/spo/commands/user/user-remove.js +27 -27
  15. package/dist/m365/spo/commands/web/web-reindex.js +35 -42
  16. package/dist/m365/spo/commands/web/web-remove.js +21 -21
  17. package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
  18. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
  19. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
  20. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
  21. package/dist/m365/yammer/commands/message/message-like-set.js +27 -28
  22. package/dist/m365/yammer/commands/message/message-list.js +62 -81
  23. package/dist/m365/yammer/commands/message/message-remove.js +18 -18
  24. package/dist/m365/yammer/commands/yammer-search.js +53 -69
  25. package/dist/utils/spo.js +12 -53
  26. package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
  27. package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
  28. package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
  29. package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
  30. package/npm-shrinkwrap.json +1 -1
  31. 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 <sourceUrl>`
20
- : The server- or site-relative URL of the folder to copy
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
- `--allowSchemaMismatch`
26
- : Ignores any missing fields in the target document library and copies the folder anyway
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
- Copies folder from a document library located in one site collection to another site collection
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/test1 --sourceUrl /Shared%20Documents/MyFolder --targetUrl /sites/test2/Shared%20Documents/
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
- Copies folder from a document library to another site in the same site collection
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/test1 --sourceUrl /Shared%20Documents/MyFolder --targetUrl /sites/test1/HRDocuments/
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
- Copies folder to a document library in another site collection. Allow for schema mismatch
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/test1 --sourceUrl /Shared%20Documents/MyFolder --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
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 <sourceUrl>`
20
- : The server- or site-relative URL of the folder to move
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
- `--allowSchemaMismatch`
26
- : Ignores any missing fields in the target destination and moves the folder anyway
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
- When you move a folder using the `spo folder move` command, all of the document versions are moved.
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/test1 --sourceUrl /Shared%20Documents/MyFolder --targetUrl /sites/test2/Shared%20Documents/
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 a document library in the same site collection
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/test1 --sourceUrl /Shared%20Documents/MyFolder --targetUrl /sites/test1/HRDocuments/
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 a document library in another site collection. Allow for schema mismatch
66
+ Move a folder to another location and use a new name on conflict
50
67
 
51
68
  ```sh
52
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
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/sites/team1 --alias team1 --title "Team 1"
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.
@@ -29,7 +29,7 @@
29
29
  "omelette": "^0.4.17",
30
30
  "open": "^8.4.2",
31
31
  "ora": "^5.4.1",
32
- "semver": "^7.5.3",
32
+ "semver": "^7.5.4",
33
33
  "strip-json-comments": "^5.0.0",
34
34
  "typescript": "^5.0.2",
35
35
  "update-notifier": "^6.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.0.0-beta.99e75a7",
3
+ "version": "7.0.0-beta.b2eab57",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",