@pnp/cli-microsoft365 12.0.0-beta.d0b29c1 → 12.0.0-beta.d58fb77
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/Auth.js +15 -1
- package/dist/m365/cli/commands/cli-consent.js +9 -2
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.24.0-rc.0.js → doctor-1.24.0.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.24.0-rc.0.js → upgrade-1.24.0.js} +27 -27
- package/dist/m365/spfx/commands/project/project-upgrade.js +11 -11
- package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
- package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
- package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
- package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
- package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
- package/dist/m365/spp/commands/model/model-get.js +25 -45
- package/dist/m365/spp/commands/model/model-list.js +12 -23
- package/dist/m365/spp/commands/model/model-remove.js +25 -45
- package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
- package/dist/m365/teams/commands/message/message-get.js +19 -30
- package/dist/m365/teams/commands/message/message-list.js +26 -43
- package/dist/m365/teams/commands/message/message-remove.js +43 -58
- package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
- package/dist/m365/teams/commands/message/message-restore.js +40 -50
- package/dist/m365/teams/commands/message/message-send.js +19 -30
- package/docs/docs/cmd/login.mdx +15 -2
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/package.json +2 -1
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsMessageRestoreCommand_instances, _TeamsMessageRestoreCommand_initTelemetry, _TeamsMessageRestoreCommand_initOptions, _TeamsMessageRestoreCommand_initValidators, _TeamsMessageRestoreCommand_initOptionSets, _TeamsMessageRestoreCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
10
6
|
import GraphDelegatedCommand from '../../../base/GraphDelegatedCommand.js';
|
|
11
7
|
import { teams } from '../../../../utils/teams.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
teamId: z.string()
|
|
11
|
+
.refine(val => !val || validation.isValidGuid(val), {
|
|
12
|
+
message: 'The value is not a valid GUID.'
|
|
13
|
+
})
|
|
14
|
+
.optional(),
|
|
15
|
+
teamName: z.string()
|
|
16
|
+
.optional(),
|
|
17
|
+
channelId: z.string()
|
|
18
|
+
.refine(val => !val || validation.isValidTeamsChannelId(val), {
|
|
19
|
+
message: 'The value is not a valid Teams ChannelId.'
|
|
20
|
+
})
|
|
21
|
+
.optional(),
|
|
22
|
+
channelName: z.string()
|
|
23
|
+
.optional(),
|
|
24
|
+
id: z.string()
|
|
25
|
+
.alias('i')
|
|
26
|
+
});
|
|
12
27
|
class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
|
|
13
28
|
get name() {
|
|
14
29
|
return commands.MESSAGE_RESTORE;
|
|
@@ -16,14 +31,25 @@ class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
|
|
|
16
31
|
get description() {
|
|
17
32
|
return 'Restores a deleted message from a channel in a Microsoft Teams team';
|
|
18
33
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
get schema() {
|
|
35
|
+
return options;
|
|
36
|
+
}
|
|
37
|
+
getRefinedSchema(schema) {
|
|
38
|
+
return schema
|
|
39
|
+
.refine(opts => [opts.teamId, opts.teamName].filter(x => x !== undefined).length === 1, {
|
|
40
|
+
message: 'Specify either teamId or teamName, but not both.',
|
|
41
|
+
params: {
|
|
42
|
+
customCode: 'optionSet',
|
|
43
|
+
options: ['teamId', 'teamName']
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
.refine(opts => [opts.channelId, opts.channelName].filter(x => x !== undefined).length === 1, {
|
|
47
|
+
message: 'Specify either channelId or channelName, but not both.',
|
|
48
|
+
params: {
|
|
49
|
+
customCode: 'optionSet',
|
|
50
|
+
options: ['channelId', 'channelName']
|
|
51
|
+
}
|
|
52
|
+
});
|
|
27
53
|
}
|
|
28
54
|
async commandAction(logger, args) {
|
|
29
55
|
try {
|
|
@@ -66,41 +92,5 @@ class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
|
|
|
66
92
|
return channelId;
|
|
67
93
|
}
|
|
68
94
|
}
|
|
69
|
-
_TeamsMessageRestoreCommand_instances = new WeakSet(), _TeamsMessageRestoreCommand_initTelemetry = function _TeamsMessageRestoreCommand_initTelemetry() {
|
|
70
|
-
this.telemetry.push((args) => {
|
|
71
|
-
Object.assign(this.telemetryProperties, {
|
|
72
|
-
teamId: typeof args.options.teamId !== 'undefined',
|
|
73
|
-
teamName: typeof args.options.teamName !== 'undefined',
|
|
74
|
-
channelId: typeof args.options.channelId !== 'undefined',
|
|
75
|
-
channelName: typeof args.options.channelName !== 'undefined'
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}, _TeamsMessageRestoreCommand_initOptions = function _TeamsMessageRestoreCommand_initOptions() {
|
|
79
|
-
this.options.unshift({
|
|
80
|
-
option: '--teamId [teamId]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '--teamName [teamName]'
|
|
83
|
-
}, {
|
|
84
|
-
option: '--channelId [channelId]'
|
|
85
|
-
}, {
|
|
86
|
-
option: '--channelName [channelName]'
|
|
87
|
-
}, {
|
|
88
|
-
option: '-i, --id <id>'
|
|
89
|
-
});
|
|
90
|
-
}, _TeamsMessageRestoreCommand_initValidators = function _TeamsMessageRestoreCommand_initValidators() {
|
|
91
|
-
this.validators.push(async (args) => {
|
|
92
|
-
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
93
|
-
return `'${args.options.teamId}' is not a valid GUID for 'teamId'.`;
|
|
94
|
-
}
|
|
95
|
-
if (args.options.channelId && !validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
96
|
-
return `'${args.options.channelId}' is not a valid ID for 'channelId'.`;
|
|
97
|
-
}
|
|
98
|
-
return true;
|
|
99
|
-
});
|
|
100
|
-
}, _TeamsMessageRestoreCommand_initOptionSets = function _TeamsMessageRestoreCommand_initOptionSets() {
|
|
101
|
-
this.optionSets.push({ options: ['teamId', 'teamName'] }, { options: ['channelId', 'channelName'] });
|
|
102
|
-
}, _TeamsMessageRestoreCommand_initTypes = function _TeamsMessageRestoreCommand_initTypes() {
|
|
103
|
-
this.types.string.push('teamId', 'teamName', 'channelId', 'channelName', 'id');
|
|
104
|
-
};
|
|
105
95
|
export default new TeamsMessageRestoreCommand();
|
|
106
96
|
//# sourceMappingURL=message-restore.js.map
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsMessageSendCommand_instances, _TeamsMessageSendCommand_initOptions, _TeamsMessageSendCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
teamId: z.string()
|
|
10
|
+
.refine(val => validation.isValidGuid(val), {
|
|
11
|
+
message: 'The value is not a valid GUID.'
|
|
12
|
+
})
|
|
13
|
+
.alias('i'),
|
|
14
|
+
channelId: z.string()
|
|
15
|
+
.refine(val => validation.isValidTeamsChannelId(val), {
|
|
16
|
+
message: 'The value is not a valid Teams ChannelId.'
|
|
17
|
+
})
|
|
18
|
+
.alias('c'),
|
|
19
|
+
message: z.string()
|
|
20
|
+
.alias('m')
|
|
21
|
+
});
|
|
11
22
|
class TeamsMessageSendCommand extends GraphCommand {
|
|
12
23
|
get name() {
|
|
13
24
|
return commands.MESSAGE_SEND;
|
|
@@ -15,11 +26,8 @@ class TeamsMessageSendCommand extends GraphCommand {
|
|
|
15
26
|
get description() {
|
|
16
27
|
return 'Sends a message to a channel in a Microsoft Teams team';
|
|
17
28
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_TeamsMessageSendCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _TeamsMessageSendCommand_instances, "m", _TeamsMessageSendCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _TeamsMessageSendCommand_instances, "m", _TeamsMessageSendCommand_initValidators).call(this);
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
23
31
|
}
|
|
24
32
|
async commandAction(logger, args) {
|
|
25
33
|
try {
|
|
@@ -45,24 +53,5 @@ class TeamsMessageSendCommand extends GraphCommand {
|
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
}
|
|
48
|
-
_TeamsMessageSendCommand_instances = new WeakSet(), _TeamsMessageSendCommand_initOptions = function _TeamsMessageSendCommand_initOptions() {
|
|
49
|
-
this.options.unshift({
|
|
50
|
-
option: '-i, --teamId <teamId>'
|
|
51
|
-
}, {
|
|
52
|
-
option: '-c, --channelId <channelId>'
|
|
53
|
-
}, {
|
|
54
|
-
option: '-m, --message <message>'
|
|
55
|
-
});
|
|
56
|
-
}, _TeamsMessageSendCommand_initValidators = function _TeamsMessageSendCommand_initValidators() {
|
|
57
|
-
this.validators.push(async (args) => {
|
|
58
|
-
if (!validation.isValidGuid(args.options.teamId)) {
|
|
59
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
60
|
-
}
|
|
61
|
-
if (!validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
62
|
-
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
63
|
-
}
|
|
64
|
-
return true;
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
56
|
export default new TeamsMessageSendCommand();
|
|
68
57
|
//# sourceMappingURL=message-send.js.map
|
package/docs/docs/cmd/login.mdx
CHANGED
|
@@ -78,7 +78,20 @@ When logging in to Microsoft 365 using the user name and password, next to the a
|
|
|
78
78
|
|
|
79
79
|
When logging in to Microsoft 365 using a certificate, the CLI for Microsoft 365 will store the contents of the certificate so that it can automatically re-authenticate if necessary. The contents of the certificate are removed by re-authenticating using the device code or by calling the [logout](logout.mdx) command.
|
|
80
80
|
|
|
81
|
-
Federated Identity is currently supported in GitHub Actions. To use this you need to set `authType` to `federatedIdentity` and specify `appId` and `tenant` to the values of the app registration you've configured a federated credential on.
|
|
81
|
+
Federated Identity is currently supported in GitHub Actions, Azure DevOps and GitLab CI/CD. To use this you need to set `authType` to `federatedIdentity` and specify `appId` and `tenant` to the values of the app registration you've configured a federated credential on.
|
|
82
|
+
|
|
83
|
+
To use Federated Identity in GitLab CI/CD, the job must request an ID token named `GITLAB_OIDC_TOKEN` with audience `api://AzureADTokenExchange`, for example:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
job:
|
|
87
|
+
id_tokens:
|
|
88
|
+
GITLAB_OIDC_TOKEN:
|
|
89
|
+
aud: "api://AzureADTokenExchange"
|
|
90
|
+
script:
|
|
91
|
+
- m365 login --authType federatedIdentity --appId eb96cfd0-abfa-4477-8d1d-c6dfde3efb19 --tenant 9a1a1bbd-e158-4cf5-967d-a53b8e85c628
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The corresponding federated credential on the Microsoft Entra app registration must have issuer `https://gitlab.com` (or your self-managed GitLab instance URL) and a subject matching the GitLab OIDC claim for the job, for example `project_path:<group>/<project>:ref_type:branch:ref:<branch>`.
|
|
82
95
|
|
|
83
96
|
To log in to Microsoft 365 using a certificate or secret, you will typically [create a custom Microsoft Entra application](../user-guide/using-own-identity.mdx). To use this application with the CLI for Microsoft 365, you will set the `CLIMICROSOFT365_ENTRAAPPID` environment variable to the application's ID and the `CLIMICROSOFT365_TENANT` environment variable to the ID of the Microsoft Entra tenant, where you created the Microsoft Entra application. Also, please make sure to read about [the caveats when using the certificate login option](../user-guide/cli-certificate-caveats.mdx).
|
|
84
97
|
|
|
@@ -202,7 +215,7 @@ Log in to Microsoft 365 using a user-assigned managed identity with `clientId` s
|
|
|
202
215
|
m365 login --authType identity --userName ac9fbed5-804c-4362-a369-21a4ec51109e
|
|
203
216
|
```
|
|
204
217
|
|
|
205
|
-
Log in to Microsoft 365 using a federated identity. Can currently only be used in GitHub Actions.
|
|
218
|
+
Log in to Microsoft 365 using a federated identity. Can currently only be used in GitHub Actions, Azure DevOps and GitLab CI/CD.
|
|
206
219
|
|
|
207
220
|
```sh
|
|
208
221
|
m365 login --authType federatedIdentity --appId eb96cfd0-abfa-4477-8d1d-c6dfde3efb19 --tenant 9a1a1bbd-e158-4cf5-967d-a53b8e85c628
|
|
@@ -45,7 +45,7 @@ m365 spfx project upgrade [options]
|
|
|
45
45
|
|
|
46
46
|
## Remarks
|
|
47
47
|
|
|
48
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.
|
|
48
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.24.0).
|
|
49
49
|
|
|
50
50
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "12.0.0-beta.
|
|
3
|
+
"version": "12.0.0-beta.d58fb77",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"Honen, Nicholas <nickhonen@gmail.com>",
|
|
157
157
|
"Högberg, Joakim <joakim.hogberg@bravero.se>",
|
|
158
158
|
"Hunt, Geoffrey <info@runningdeveloper.com>",
|
|
159
|
+
"Hutzli, Fabian <136681117+fabianhutzli@users.noreply.github.com>",
|
|
159
160
|
"Hvam, Allan <ahp@delegate.dk>",
|
|
160
161
|
"Jaakke, Robert <robert.jaakke@mavention.nl>",
|
|
161
162
|
"Jain, Ayush <urayushjain@gmail.com>",
|