@pnp/cli-microsoft365 5.4.0 → 5.5.0-beta.10c7ae2

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 (63) hide show
  1. package/dist/Auth.js +1 -1
  2. package/dist/Command.js +22 -0
  3. package/dist/m365/flow/commands/flow-export.js +3 -0
  4. package/dist/m365/planner/commands/bucket/bucket-add.js +17 -9
  5. package/dist/m365/planner/commands/bucket/bucket-get.js +19 -11
  6. package/dist/m365/planner/commands/bucket/bucket-list.js +17 -9
  7. package/dist/m365/planner/commands/bucket/bucket-remove.js +19 -11
  8. package/dist/m365/planner/commands/bucket/bucket-set.js +19 -11
  9. package/dist/m365/planner/commands/plan/plan-get.js +58 -17
  10. package/dist/m365/planner/commands/plan/plan-remove.js +141 -0
  11. package/dist/m365/planner/commands/task/task-add.js +16 -16
  12. package/dist/m365/planner/commands/task/task-get.js +14 -9
  13. package/dist/m365/planner/commands/task/task-list.js +19 -11
  14. package/dist/m365/planner/commands/task/task-reference-add.js +1 -7
  15. package/dist/m365/planner/commands/task/task-reference-remove.js +11 -14
  16. package/dist/m365/planner/commands/task/task-remove.js +4 -19
  17. package/dist/m365/planner/commands/task/task-set.js +17 -23
  18. package/dist/m365/planner/commands/tenant/tenant-settings-set.js +95 -0
  19. package/dist/m365/planner/commands.js +3 -1
  20. package/dist/m365/search/commands/externalconnection/externalconnection-get.js +69 -0
  21. package/dist/m365/search/commands.js +1 -0
  22. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.0.js +23 -0
  23. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  24. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +7 -0
  25. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0.js +6 -4
  26. package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
  27. package/dist/m365/spo/base-permissions.js +9 -0
  28. package/dist/m365/spo/commands/hubsite/hubsite-get.js +62 -12
  29. package/dist/m365/spo/commands/listitem/listitem-set.js +2 -2
  30. package/dist/m365/spo/commands/roledefinition/RoleDefinition.js +3 -0
  31. package/dist/m365/spo/commands/roledefinition/RoleType.js +16 -0
  32. package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +59 -0
  33. package/dist/m365/spo/commands.js +1 -0
  34. package/dist/m365/teams/commands/cache/cache-remove.js +155 -0
  35. package/dist/m365/teams/commands.js +1 -0
  36. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +1 -9
  37. package/dist/utils/accessToken.js +18 -0
  38. package/dist/utils/planner.js +9 -8
  39. package/dist/utils/validation.js +5 -1
  40. package/docs/docs/cmd/aad/user/user-get.md +12 -0
  41. package/docs/docs/cmd/planner/bucket/bucket-add.md +9 -6
  42. package/docs/docs/cmd/planner/bucket/bucket-get.md +10 -7
  43. package/docs/docs/cmd/planner/bucket/bucket-list.md +8 -5
  44. package/docs/docs/cmd/planner/bucket/bucket-remove.md +8 -5
  45. package/docs/docs/cmd/planner/bucket/bucket-set.md +9 -6
  46. package/docs/docs/cmd/planner/plan/plan-get.md +14 -2
  47. package/docs/docs/cmd/planner/plan/plan-remove.md +48 -0
  48. package/docs/docs/cmd/planner/task/task-add.md +11 -8
  49. package/docs/docs/cmd/planner/task/task-get.md +11 -8
  50. package/docs/docs/cmd/planner/task/task-list.md +9 -6
  51. package/docs/docs/cmd/planner/task/task-set.md +9 -6
  52. package/docs/docs/cmd/planner/tenant/tenant-settings-set.md +56 -0
  53. package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +33 -0
  54. package/docs/docs/cmd/spo/hubsite/hubsite-get.md +19 -8
  55. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +27 -0
  56. package/docs/docs/cmd/teams/cache/cache-remove.md +46 -0
  57. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +1 -1
  58. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +1 -1
  59. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +1 -1
  60. package/npm-shrinkwrap.json +2 -2
  61. package/package.json +3 -3
  62. package/dist/m365/planner/commands/plan/plan-details-get.js +0 -116
  63. package/docs/docs/cmd/planner/plan/plan-details-get.md +0 -45
@@ -0,0 +1,46 @@
1
+ # teams cache remove
2
+
3
+ Removes the Microsoft Teams client cache
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 teams cache remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--confirm`
14
+ : Don't prompt for confirmation
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Remarks
19
+
20
+ This command will execute the following steps.
21
+
22
+ - Stop the Microsoft Teams client. This will kill all the running `Teams.exe` tasks.
23
+
24
+ - Clear the Microsoft Teams cached files. For Windows it will delete all files and folders in the %appdata%\Microsoft\Teams directory. For macOS it will delete all files and folders in the ~/Library/Application Support/Microsoft/Teams directory.
25
+
26
+ !!! important
27
+ - You won't lose any user data by clearing the cache.
28
+ - Restarting Teams after you clear the cache might take longer than usual because the Teams cache files have to be rebuilt.
29
+
30
+ If you run the command in the CLI Docker container, you will get the following error message:
31
+
32
+ > Because you're running CLI for Microsoft 365 in a Docker container, we can't clear the cache on your host. Instead run this command on your host using 'npx ...'.
33
+
34
+ The command works only on Windows and macOS. If you run it on a different operating system, you will get the `'abc' platform is unsupported for this command` error.
35
+
36
+ ## Examples
37
+
38
+ Removes the Microsoft Teams client cache
39
+
40
+ ```sh
41
+ m365 teams cache remove
42
+ ```
43
+
44
+ ## More information
45
+
46
+ - [Clear the Teams client cache guidance](https://docs.microsoft.com/microsoftteams/troubleshoot/teams-administration/clear-teams-cache)
@@ -16,7 +16,7 @@ m365 tenant serviceannouncement health get [options]
16
16
  `-i, --issues`
17
17
  : Return the collection of issues that happened on the service, with detailed information for each issue. Is only returned in JSON output mode.
18
18
 
19
- --8<-- "docs/cmd/\_global.md"
19
+ --8<-- "docs/cmd/_global.md"
20
20
 
21
21
  ## Examples
22
22
 
@@ -13,7 +13,7 @@ m365 tenant serviceannouncement healthissue list [options]
13
13
  `-s, --service [service]`
14
14
  : Retrieve service health issues for the particular service. If not provided, retrieves health issues for all services
15
15
 
16
- --8<-- "docs/cmd/\_global.md"
16
+ --8<-- "docs/cmd/_global.md"
17
17
 
18
18
  ## Examples
19
19
 
@@ -13,7 +13,7 @@ m365 tenant serviceannouncement message list [options]
13
13
  `-s, --service [service]`
14
14
  : Retrieve service update messages for the particular service. If not provided, retrieves messages for all services
15
15
 
16
- --8<-- "docs/cmd/\_global.md"
16
+ --8<-- "docs/cmd/_global.md"
17
17
 
18
18
  ## Examples
19
19
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "5.4.0",
9
+ "version": "5.5.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-node": "^1.9.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.4.0",
3
+ "version": "5.5.0-beta.10c7ae2",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -51,7 +51,7 @@
51
51
  "name": "Waldek Mastykarz",
52
52
  "email": "waldek@mastykarz.nl",
53
53
  "web": "https://blog.mastykarz.nl"
54
- },
54
+ },
55
55
  {
56
56
  "name": "Garry Trinder",
57
57
  "email": "garry.trinder@live.com",
@@ -239,4 +239,4 @@
239
239
  "sinon": "^14.0.0",
240
240
  "source-map-support": "^0.5.21"
241
241
  }
242
- }
242
+ }
@@ -1,116 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../../../../utils");
4
- const Auth_1 = require("../../../../Auth");
5
- const request_1 = require("../../../../request");
6
- const planner_1 = require("../../../../utils/planner");
7
- const GraphCommand_1 = require("../../../base/GraphCommand");
8
- const commands_1 = require("../../commands");
9
- const aadGroup_1 = require("../../../../utils/aadGroup");
10
- class PlannerPlanDetailsGetCommand extends GraphCommand_1.default {
11
- constructor() {
12
- super(...arguments);
13
- this.groupId = '';
14
- }
15
- get name() {
16
- return commands_1.default.PLAN_DETAILS_GET;
17
- }
18
- get description() {
19
- return 'Get details of a Microsoft Planner plan';
20
- }
21
- getTelemetryProperties(args) {
22
- const telemetryProps = super.getTelemetryProperties(args);
23
- telemetryProps.planId = typeof args.options.planId !== 'undefined';
24
- telemetryProps.planTitle = typeof args.options.planTitle !== 'undefined';
25
- telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
26
- telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
27
- return telemetryProps;
28
- }
29
- commandAction(logger, args, cb) {
30
- if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
31
- this.handleError('This command does not support application permissions.', logger, cb);
32
- return;
33
- }
34
- this
35
- .getGroupId(args)
36
- .then((groupId) => {
37
- this.groupId = groupId;
38
- return this.getPlanId(args);
39
- })
40
- .then((planId) => {
41
- args.options.planId = planId;
42
- return this.getPlanDetails(args);
43
- })
44
- .then((res) => {
45
- logger.log(res);
46
- cb();
47
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
48
- }
49
- getGroupId(args) {
50
- if (args.options.planId) {
51
- return Promise.resolve('');
52
- }
53
- if (args.options.ownerGroupId) {
54
- return Promise.resolve(args.options.ownerGroupId);
55
- }
56
- return aadGroup_1.aadGroup
57
- .getGroupByDisplayName(args.options.ownerGroupName)
58
- .then(group => group.id);
59
- }
60
- getPlanId(args) {
61
- if (args.options.planId) {
62
- return Promise.resolve(args.options.planId);
63
- }
64
- return planner_1.planner
65
- .getPlanByName(args.options.planTitle, this.groupId)
66
- .then(plan => plan.id);
67
- }
68
- getPlanDetails(args) {
69
- const requestOptions = {
70
- url: `${this.resource}/v1.0/planner/plans/${args.options.planId}/details`,
71
- headers: {
72
- 'accept': 'application/json;odata.metadata=none'
73
- },
74
- responseType: 'json'
75
- };
76
- return request_1.default.get(requestOptions);
77
- }
78
- options() {
79
- const options = [
80
- {
81
- option: '-i, --planId [planId]'
82
- },
83
- {
84
- option: '-t, --planTitle [planTitle]'
85
- },
86
- {
87
- option: '--ownerGroupId [ownerGroupId]'
88
- },
89
- {
90
- option: '--ownerGroupName [ownerGroupName]'
91
- }
92
- ];
93
- const parentOptions = super.options();
94
- return options.concat(parentOptions);
95
- }
96
- validate(args) {
97
- if (!args.options.planId && !args.options.planTitle) {
98
- return 'Specify either planId or planTitle';
99
- }
100
- if (args.options.planId && args.options.planTitle) {
101
- return 'Specify either planId or planTitle';
102
- }
103
- if (args.options.planTitle && !args.options.ownerGroupId && !args.options.ownerGroupName) {
104
- return 'Specify either ownerGroupId or ownerGroupName';
105
- }
106
- if (args.options.planTitle && args.options.ownerGroupId && args.options.ownerGroupName) {
107
- return 'Specify either ownerGroupId or ownerGroupName but not both';
108
- }
109
- if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
110
- return `${args.options.ownerGroupId} is not a valid GUID`;
111
- }
112
- return true;
113
- }
114
- }
115
- module.exports = new PlannerPlanDetailsGetCommand();
116
- //# sourceMappingURL=plan-details-get.js.map
@@ -1,45 +0,0 @@
1
- # planner plan details get
2
-
3
- Retrieve the planner details about the specified plan.
4
-
5
- ## Usage
6
-
7
- ```sh
8
- m365 planner plan details get [options]
9
- ```
10
-
11
- ## Options
12
-
13
- `-i, --planId [planId]`
14
- : ID of the plan. Specify either `planId` or `planTitle` but not both.
15
-
16
- `-t, --planTitle [planTitle]`
17
- : Title of the plan. Specify either `planId` or `planTitle` but not both.
18
-
19
- `--ownerGroupId [ownerGroupId]`
20
- : ID of the Group that owns the plan. Specify either `ownerGroupId` or `ownerGroupName` when using `planTitle`.
21
-
22
- `--ownerGroupName [ownerGroupName]`
23
- : Name of the Group that owns the plan. Specify either `ownerGroupId` or `ownerGroupName` when using `planTitle`.
24
-
25
- --8<-- "docs/cmd/_global.md"
26
-
27
- ## Examples
28
-
29
- Returns the Microsoft Planner plan details with id _gndWOTSK60GfPQfiDDj43JgACDCb_
30
-
31
- ```sh
32
- m365 planner plan details get --planId "gndWOTSK60GfPQfiDDj43JgACDCb"
33
- ```
34
-
35
- Returns the Microsoft Planner plan details with title _MyPlan_ for Group _233e43d0-dc6a-482e-9b4e-0de7a7bce9b4_
36
-
37
- ```sh
38
- m365 planner plan details get --planTitle "MyPlan" --ownerGroupId "233e43d0-dc6a-482e-9b4e-0de7a7bce9b4"
39
- ```
40
-
41
- Returns the Microsoft Planner plan details with title _MyPlan_ for Group _My Planner Group_
42
-
43
- ```sh
44
- m365 planner plan details get --planTitle "MyPlan" --ownerGroupName "My Planner Group"
45
- ```