@pnp/cli-microsoft365 6.11.0-beta.69fd6f4 → 6.11.0-beta.ee225fb
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/m365/cli/commands/config/config-list.js +29 -0
- package/dist/m365/cli/commands.js +1 -0
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-get.js +1 -2
- package/dist/m365/planner/commands/plan/plan-list.js +4 -5
- package/dist/m365/planner/commands/plan/plan-set.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
- package/dist/utils/planner.js +6 -3
- package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
- package/docs/docs/cmd/login.mdx +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
13
|
+
const AnonymousCommand_1 = require("../../../base/AnonymousCommand");
|
|
14
|
+
const commands_1 = require("../../commands");
|
|
15
|
+
class CliConfigListCommand extends AnonymousCommand_1.default {
|
|
16
|
+
get name() {
|
|
17
|
+
return commands_1.default.CONFIG_LIST;
|
|
18
|
+
}
|
|
19
|
+
get description() {
|
|
20
|
+
return 'List all self set CLI for Microsoft 365 configurations';
|
|
21
|
+
}
|
|
22
|
+
commandAction(logger) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
logger.log(Cli_1.Cli.getInstance().config.all);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
module.exports = new CliConfigListCommand();
|
|
29
|
+
//# sourceMappingURL=config-list.js.map
|
|
@@ -8,6 +8,7 @@ exports.default = {
|
|
|
8
8
|
COMPLETION_SH_SETUP: `${prefix} completion sh setup`,
|
|
9
9
|
COMPLETION_SH_UPDATE: `${prefix} completion sh update`,
|
|
10
10
|
CONFIG_GET: `${prefix} config get`,
|
|
11
|
+
CONFIG_LIST: `${prefix} config list`,
|
|
11
12
|
CONFIG_RESET: `${prefix} config reset`,
|
|
12
13
|
CONFIG_SET: `${prefix} config set`,
|
|
13
14
|
CONSENT: `${prefix} consent`,
|
|
@@ -73,8 +73,8 @@ class PlannerBucketAddCommand extends GraphCommand_1.default {
|
|
|
73
73
|
const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
|
|
74
74
|
return plan.id;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
return
|
|
76
|
+
const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
|
|
77
|
+
return plan.id;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
getGroupId(args) {
|
|
@@ -84,8 +84,8 @@ class PlannerBucketGetCommand extends GraphCommand_1.default {
|
|
|
84
84
|
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
85
85
|
return plan.id;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
return
|
|
87
|
+
const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
|
|
88
|
+
return plan.id;
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
getBucketById(id) {
|
|
@@ -61,8 +61,8 @@ class PlannerBucketListCommand extends GraphCommand_1.default {
|
|
|
61
61
|
const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
|
|
62
62
|
return plan.id;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
return
|
|
64
|
+
const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
|
|
65
|
+
return plan.id;
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
getGroupId(args) {
|
|
@@ -114,8 +114,8 @@ class PlannerBucketRemoveCommand extends GraphCommand_1.default {
|
|
|
114
114
|
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
115
115
|
return plan.id;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
return
|
|
117
|
+
const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
|
|
118
|
+
return plan.id;
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
getGroupId(args) {
|
|
@@ -105,8 +105,8 @@ class PlannerBucketSetCommand extends GraphCommand_1.default {
|
|
|
105
105
|
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
106
106
|
return plan.id;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
return
|
|
108
|
+
const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
|
|
109
|
+
return plan.id;
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
getGroupId(args) {
|
|
@@ -50,8 +50,7 @@ class PlannerPlanGetCommand extends GraphCommand_1.default {
|
|
|
50
50
|
else {
|
|
51
51
|
let plan = {};
|
|
52
52
|
if (args.options.rosterId) {
|
|
53
|
-
|
|
54
|
-
plan = plans[0];
|
|
53
|
+
plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
|
|
55
54
|
}
|
|
56
55
|
else {
|
|
57
56
|
let groupId = undefined;
|
|
@@ -41,17 +41,16 @@ class PlannerPlanListCommand extends GraphCommand_1.default {
|
|
|
41
41
|
commandAction(logger, args) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
try {
|
|
44
|
-
let plannerPlans =
|
|
44
|
+
let plannerPlans = [];
|
|
45
45
|
if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
46
46
|
const groupId = yield this.getGroupId(args);
|
|
47
47
|
plannerPlans = yield planner_1.planner.getPlansByGroupId(groupId);
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (plannerPlans && plannerPlans.length > 0) {
|
|
53
|
-
logger.log(plannerPlans);
|
|
50
|
+
const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
|
|
51
|
+
plannerPlans.push(plan);
|
|
54
52
|
}
|
|
53
|
+
logger.log(plannerPlans);
|
|
55
54
|
}
|
|
56
55
|
catch (err) {
|
|
57
56
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -61,8 +61,8 @@ class PlannerPlanSetCommand extends GraphCommand_1.default {
|
|
|
61
61
|
}
|
|
62
62
|
let groupId = '';
|
|
63
63
|
if (args.options.rosterId) {
|
|
64
|
-
const
|
|
65
|
-
return
|
|
64
|
+
const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
|
|
65
|
+
return plan.id;
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
68
|
groupId = yield this.getGroupId(args);
|
|
@@ -132,8 +132,8 @@ _SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCom
|
|
|
132
132
|
if (isValidSharePointUrl !== true) {
|
|
133
133
|
return isValidSharePointUrl;
|
|
134
134
|
}
|
|
135
|
-
if (args.options.audienceIds === undefined &&
|
|
136
|
-
return `Please specify
|
|
135
|
+
if (args.options.audienceIds === undefined && args.options.url === undefined && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
|
|
136
|
+
return `Please specify at least one property to update.`;
|
|
137
137
|
}
|
|
138
138
|
if (args.options.audienceIds) {
|
|
139
139
|
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
package/dist/utils/planner.js
CHANGED
|
@@ -45,11 +45,14 @@ exports.planner = {
|
|
|
45
45
|
return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups/${groupId}/planner/plans`, metadata);
|
|
46
46
|
},
|
|
47
47
|
/**
|
|
48
|
-
* Get
|
|
48
|
+
* Get the Planner plan for a specific Roster.
|
|
49
49
|
* @param rosterId Roster ID.
|
|
50
50
|
*/
|
|
51
|
-
|
|
52
|
-
return
|
|
51
|
+
getPlanByRosterId(rosterId, metadata = 'none') {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const plans = yield odata_1.odata.getAllItems(`${graphResource}/beta/planner/rosters/${rosterId}/plans`, metadata);
|
|
54
|
+
return plans[0];
|
|
55
|
+
});
|
|
53
56
|
},
|
|
54
57
|
/**
|
|
55
58
|
* Get Planner plan by title in a specific group.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import CLISettings from '/docs/_clisettings.mdx';
|
|
2
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
3
|
+
import Tabs from '@theme/Tabs';
|
|
4
|
+
import TabItem from '@theme/TabItem';
|
|
5
|
+
|
|
6
|
+
# cli config list
|
|
7
|
+
|
|
8
|
+
List all self set CLI for Microsoft 365 configurations
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
m365 cli config list [options]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
<Global />
|
|
19
|
+
|
|
20
|
+
## Available settings
|
|
21
|
+
|
|
22
|
+
Following is the list of configuration settings available in CLI for Microsoft 365.
|
|
23
|
+
|
|
24
|
+
<CLISettings />
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
List all self set configuration keys with their value
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 cli config list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Response
|
|
35
|
+
|
|
36
|
+
<Tabs>
|
|
37
|
+
<TabItem value="JSON">
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"errorOutput": "stdout"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Text">
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
errorOutput: stdout
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
<TabItem value="CSV">
|
|
54
|
+
|
|
55
|
+
```csv
|
|
56
|
+
errorOutput
|
|
57
|
+
stdout
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</TabItem>
|
|
61
|
+
<TabItem value="Markdown">
|
|
62
|
+
|
|
63
|
+
```md
|
|
64
|
+
# cli config list
|
|
65
|
+
|
|
66
|
+
Date: 29/6/2023
|
|
67
|
+
|
|
68
|
+
Property | Value
|
|
69
|
+
---------|-------
|
|
70
|
+
errorOutput | stdout
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</TabItem>
|
|
74
|
+
</Tabs>
|
|
75
|
+
|
|
76
|
+
## More information
|
|
77
|
+
|
|
78
|
+
- [Configuring the CLI for Microsoft 365](../../../user-guide/configuring-cli.mdx)
|
package/docs/docs/cmd/login.mdx
CHANGED
|
@@ -157,6 +157,12 @@ Log in to Microsoft 365 using your own Azure AD application that's restricted on
|
|
|
157
157
|
m365 login --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
Log in to Microsoft 365 using your own Azure AD application and a personal information exchange (.pfx) file
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
|
|
164
|
+
```
|
|
165
|
+
|
|
160
166
|
Log in to Microsoft 365 using the interactive browser authentication. Uses the identity of the current user.
|
|
161
167
|
|
|
162
168
|
```sh
|
package/package.json
CHANGED