@pnp/cli-microsoft365 10.1.0-beta.10765f6 → 10.1.0-beta.63210ca
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/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/AuthServer.js +1 -1
- package/dist/Command.js +2 -2
- package/dist/cli/cli.js +2 -2
- package/dist/m365/base/AppCommand.js +5 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -4
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +34 -2
- package/dist/m365/entra/commands/app/app-get.js +17 -5
- package/dist/m365/entra/commands/app/app-list.js +34 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +3 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +3 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +3 -0
- package/dist/m365/entra/commands/group/group-get.js +6 -3
- package/dist/m365/entra/commands/group/group-list.js +16 -1
- package/dist/m365/entra/commands/m365group/m365group-add.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +21 -6
- package/dist/m365/entra/commands/m365group/m365group-get.js +29 -7
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-remove.js +21 -9
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -7
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +12 -21
- package/dist/m365/file/commands/convert/convert-pdf.js +3 -4
- package/dist/m365/file/commands/file-add.js +5 -6
- package/dist/m365/graph/commands/subscription/subscription-add.js +46 -5
- package/dist/m365/pp/commands/{chatbot/chatbot-get.js → copilot/copilot-get.js} +24 -20
- package/dist/m365/pp/commands/{chatbot/chatbot-list.js → copilot/copilot-list.js} +16 -12
- package/dist/m365/pp/commands/{chatbot/chatbot-remove.js → copilot/copilot-remove.js} +28 -24
- package/dist/m365/pp/commands.js +3 -0
- package/dist/m365/spfx/commands/package/package-generate.js +1 -1
- package/dist/m365/spfx/commands/project/JsonRule.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016004_TS_property_pane_property_import.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +6 -3
- package/dist/m365/spo/commands/file/file-add.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/list/list-contenttype-list.js +5 -2
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +10 -8
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/page/page-add.js +1 -1
- package/dist/m365/spo/commands/site/site-admin-add.js +4 -12
- package/dist/m365/spo/commands/site/site-admin-list.js +3 -11
- package/dist/m365/spo/commands/site/site-admin-remove.js +4 -12
- package/dist/m365/spo/commands/site/site-set.js +1 -1
- package/dist/m365/spp/commands/model/model-remove.js +105 -0
- package/dist/m365/spp/commands.js +2 -1
- package/dist/m365/teams/commands/user/user-app-list.js +1 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +2 -8
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +2 -8
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +2 -8
- package/dist/m365/todo/commands/list/list-remove.js +2 -1
- package/dist/m365/todo/commands/list/list-set.js +2 -1
- package/dist/m365/todo/commands/task/task-add.js +2 -1
- package/dist/m365/todo/commands/task/task-get.js +2 -1
- package/dist/m365/todo/commands/task/task-list.js +2 -1
- package/dist/m365/todo/commands/task/task-remove.js +2 -1
- package/dist/m365/todo/commands/task/task-set.js +1 -1
- package/dist/m365/viva/commands/engage/engage-community-set.js +111 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/utils/entraAdministrativeUnit.js +14 -2
- package/dist/utils/entraGroup.js +49 -6
- package/dist/utils/formatting.js +8 -20
- package/dist/utils/spo.js +5 -4
- package/dist/utils/spp.js +3 -3
- package/dist/utils/urlUtil.js +11 -14
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-get.mdx +10 -3
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-list.mdx +16 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +13 -8
- package/docs/docs/cmd/entra/app/app-list.mdx +16 -1
- package/docs/docs/cmd/entra/group/group-get.mdx +10 -3
- package/docs/docs/cmd/entra/group/group-list.mdx +9 -2
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +12 -3
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +29 -5
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +7 -4
- package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +11 -2
- package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +12 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +2 -2
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +6 -0
- package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +1 -1
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +3 -3
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +30 -5
- package/docs/docs/cmd/login.mdx +45 -44
- package/docs/docs/cmd/pp/{chatbot/chatbot-get.mdx → copilot/copilot-get.mdx} +24 -18
- package/docs/docs/cmd/pp/{chatbot/chatbot-list.mdx → copilot/copilot-list.mdx} +20 -14
- package/docs/docs/cmd/pp/{chatbot/chatbot-remove.mdx → copilot/copilot-remove.mdx} +16 -10
- package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-get.mdx +7 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +7 -1
- package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +7 -1
- package/docs/docs/cmd/spp/model/model-remove.mdx +57 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +61 -0
- package/npm-shrinkwrap.json +6 -0
- package/package.json +4 -2
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _EntraM365GroupRenewCommand_instances, _EntraM365GroupRenewCommand_initOptions, _EntraM365GroupRenewCommand_initValidators;
|
|
6
|
+
var _EntraM365GroupRenewCommand_instances, _EntraM365GroupRenewCommand_initOptions, _EntraM365GroupRenewCommand_initValidators, _EntraM365GroupRenewCommand_initOptionSets, _EntraM365GroupRenewCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -21,18 +21,24 @@ class EntraM365GroupRenewCommand extends GraphCommand {
|
|
|
21
21
|
_EntraM365GroupRenewCommand_instances.add(this);
|
|
22
22
|
__classPrivateFieldGet(this, _EntraM365GroupRenewCommand_instances, "m", _EntraM365GroupRenewCommand_initOptions).call(this);
|
|
23
23
|
__classPrivateFieldGet(this, _EntraM365GroupRenewCommand_instances, "m", _EntraM365GroupRenewCommand_initValidators).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _EntraM365GroupRenewCommand_instances, "m", _EntraM365GroupRenewCommand_initOptionSets).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _EntraM365GroupRenewCommand_instances, "m", _EntraM365GroupRenewCommand_initTypes).call(this);
|
|
24
26
|
}
|
|
25
27
|
async commandAction(logger, args) {
|
|
26
28
|
if (this.verbose) {
|
|
27
|
-
await logger.logToStderr(`Renewing Microsoft 365 group's expiration: ${args.options.id}...`);
|
|
29
|
+
await logger.logToStderr(`Renewing Microsoft 365 group's expiration: ${args.options.id || args.options.displayName}...`);
|
|
28
30
|
}
|
|
29
31
|
try {
|
|
30
|
-
|
|
32
|
+
let groupId = args.options.id;
|
|
33
|
+
if (args.options.displayName) {
|
|
34
|
+
groupId = await entraGroup.getGroupIdByDisplayName(args.options.displayName);
|
|
35
|
+
}
|
|
36
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
31
37
|
if (!isUnifiedGroup) {
|
|
32
|
-
throw Error(`Specified group with id '${
|
|
38
|
+
throw Error(`Specified group with id '${groupId}' is not a Microsoft 365 group.`);
|
|
33
39
|
}
|
|
34
40
|
const requestOptions = {
|
|
35
|
-
url: `${this.resource}/v1.0/groups/${
|
|
41
|
+
url: `${this.resource}/v1.0/groups/${groupId}/renew/`,
|
|
36
42
|
headers: {
|
|
37
43
|
'accept': 'application/json;odata.metadata=none'
|
|
38
44
|
}
|
|
@@ -46,15 +52,21 @@ class EntraM365GroupRenewCommand extends GraphCommand {
|
|
|
46
52
|
}
|
|
47
53
|
_EntraM365GroupRenewCommand_instances = new WeakSet(), _EntraM365GroupRenewCommand_initOptions = function _EntraM365GroupRenewCommand_initOptions() {
|
|
48
54
|
this.options.unshift({
|
|
49
|
-
option: '-i, --id
|
|
55
|
+
option: '-i, --id [id]'
|
|
56
|
+
}, {
|
|
57
|
+
option: '-n, --displayName [displayName]'
|
|
50
58
|
});
|
|
51
59
|
}, _EntraM365GroupRenewCommand_initValidators = function _EntraM365GroupRenewCommand_initValidators() {
|
|
52
60
|
this.validators.push(async (args) => {
|
|
53
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
61
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
54
62
|
return `${args.options.id} is not a valid GUID`;
|
|
55
63
|
}
|
|
56
64
|
return true;
|
|
57
65
|
});
|
|
66
|
+
}, _EntraM365GroupRenewCommand_initOptionSets = function _EntraM365GroupRenewCommand_initOptionSets() {
|
|
67
|
+
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
68
|
+
}, _EntraM365GroupRenewCommand_initTypes = function _EntraM365GroupRenewCommand_initTypes() {
|
|
69
|
+
this.types.string.push('id', 'displayName');
|
|
58
70
|
};
|
|
59
71
|
export default new EntraM365GroupRenewCommand();
|
|
60
72
|
//# sourceMappingURL=m365group-renew.js.map
|
|
@@ -128,7 +128,7 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
getImageContentType(imagePath) {
|
|
131
|
-
const extension = imagePath.
|
|
131
|
+
const extension = imagePath.substring(imagePath.lastIndexOf('.')).toLowerCase();
|
|
132
132
|
switch (extension) {
|
|
133
133
|
case '.png':
|
|
134
134
|
return 'image/png';
|
|
@@ -3,8 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _EntraM365GroupTeamifyCommand_instances, _EntraM365GroupTeamifyCommand_initTelemetry, _EntraM365GroupTeamifyCommand_initOptions, _EntraM365GroupTeamifyCommand_initValidators, _EntraM365GroupTeamifyCommand_initOptionSets;
|
|
7
|
-
import { cli } from '../../../../cli/cli.js';
|
|
6
|
+
var _EntraM365GroupTeamifyCommand_instances, _EntraM365GroupTeamifyCommand_initTelemetry, _EntraM365GroupTeamifyCommand_initOptions, _EntraM365GroupTeamifyCommand_initValidators, _EntraM365GroupTeamifyCommand_initOptionSets, _EntraM365GroupTeamifyCommand_initTypes;
|
|
8
7
|
import request from '../../../../request.js';
|
|
9
8
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -25,29 +24,16 @@ class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
|
25
24
|
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptions).call(this);
|
|
26
25
|
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initValidators).call(this);
|
|
27
26
|
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptionSets).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initTypes).call(this);
|
|
28
28
|
}
|
|
29
29
|
async getGroupId(options) {
|
|
30
30
|
if (options.id) {
|
|
31
31
|
return options.id;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
headers: {
|
|
36
|
-
accept: 'application/json;odata.metadata=none'
|
|
37
|
-
},
|
|
38
|
-
responseType: 'json'
|
|
39
|
-
};
|
|
40
|
-
const response = await request.get(requestOptions);
|
|
41
|
-
const groupItem = response.value[0];
|
|
42
|
-
if (!groupItem) {
|
|
43
|
-
throw `The specified Microsoft 365 Group does not exist`;
|
|
33
|
+
if (options.displayName) {
|
|
34
|
+
return await entraGroup.getGroupIdByDisplayName(options.displayName);
|
|
44
35
|
}
|
|
45
|
-
|
|
46
|
-
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
|
|
47
|
-
const result = await cli.handleMultipleResultsFound(`Multiple Microsoft 365 Groups with name '${options.mailNickname}' found.`, resultAsKeyValuePair);
|
|
48
|
-
return result.id;
|
|
49
|
-
}
|
|
50
|
-
return groupItem.id;
|
|
36
|
+
return await entraGroup.getGroupIdByMailNickname(options.mailNickname);
|
|
51
37
|
}
|
|
52
38
|
async commandAction(logger, args) {
|
|
53
39
|
try {
|
|
@@ -89,12 +75,15 @@ _EntraM365GroupTeamifyCommand_instances = new WeakSet(), _EntraM365GroupTeamifyC
|
|
|
89
75
|
this.telemetry.push((args) => {
|
|
90
76
|
Object.assign(this.telemetryProperties, {
|
|
91
77
|
id: typeof args.options.id !== 'undefined',
|
|
92
|
-
mailNickname: typeof args.options.mailNickname !== 'undefined'
|
|
78
|
+
mailNickname: typeof args.options.mailNickname !== 'undefined',
|
|
79
|
+
displayName: typeof args.options.displayName !== 'undefined'
|
|
93
80
|
});
|
|
94
81
|
});
|
|
95
82
|
}, _EntraM365GroupTeamifyCommand_initOptions = function _EntraM365GroupTeamifyCommand_initOptions() {
|
|
96
83
|
this.options.unshift({
|
|
97
84
|
option: '-i, --id [id]'
|
|
85
|
+
}, {
|
|
86
|
+
option: '-n, --displayName [displayName]'
|
|
98
87
|
}, {
|
|
99
88
|
option: '--mailNickname [mailNickname]'
|
|
100
89
|
});
|
|
@@ -106,7 +95,9 @@ _EntraM365GroupTeamifyCommand_instances = new WeakSet(), _EntraM365GroupTeamifyC
|
|
|
106
95
|
return true;
|
|
107
96
|
});
|
|
108
97
|
}, _EntraM365GroupTeamifyCommand_initOptionSets = function _EntraM365GroupTeamifyCommand_initOptionSets() {
|
|
109
|
-
this.optionSets.push({ options: ['id', 'mailNickname'] });
|
|
98
|
+
this.optionSets.push({ options: ['id', 'displayName', 'mailNickname'] });
|
|
99
|
+
}, _EntraM365GroupTeamifyCommand_initTypes = function _EntraM365GroupTeamifyCommand_initTypes() {
|
|
100
|
+
this.types.string.push('id', 'displayName', 'mailNickname');
|
|
110
101
|
};
|
|
111
102
|
export default new EntraM365GroupTeamifyCommand();
|
|
112
103
|
//# sourceMappingURL=m365group-teamify.js.map
|
|
@@ -7,7 +7,6 @@ var _FileConvertPdfCommand_instances, _FileConvertPdfCommand_initOptions, _FileC
|
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import os from 'os';
|
|
9
9
|
import path from 'path';
|
|
10
|
-
import url from 'url';
|
|
11
10
|
import { v4 } from 'uuid';
|
|
12
11
|
import auth from '../../../../Auth.js';
|
|
13
12
|
import { CommandError } from '../../../../Command.js';
|
|
@@ -179,12 +178,12 @@ class FileConvertPdfCommand extends GraphCommand {
|
|
|
179
178
|
}
|
|
180
179
|
return fileGraphUrl;
|
|
181
180
|
}
|
|
182
|
-
const _url =
|
|
181
|
+
const _url = new URL(fileWebUrl);
|
|
183
182
|
let siteId = '';
|
|
184
183
|
let driveRelativeFileUrl = '';
|
|
185
|
-
const siteInfo = await this.getGraphSiteInfoFromFullUrl(_url.
|
|
184
|
+
const siteInfo = await this.getGraphSiteInfoFromFullUrl(_url.hostname, _url.pathname);
|
|
186
185
|
siteId = siteInfo.id;
|
|
187
|
-
let siteRelativeFileUrl = _url.
|
|
186
|
+
let siteRelativeFileUrl = _url.pathname.replace(siteInfo.serverRelativeUrl, '');
|
|
188
187
|
// normalize site-relative URLs for root site collections and root sites
|
|
189
188
|
if (!siteRelativeFileUrl.startsWith('/')) {
|
|
190
189
|
siteRelativeFileUrl = '/' + siteRelativeFileUrl;
|
|
@@ -6,7 +6,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FileAddCommand_instances, _FileAddCommand_initTelemetry, _FileAddCommand_initOptions, _FileAddCommand_initValidators;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import path from 'path';
|
|
9
|
-
import url from 'url';
|
|
10
9
|
import request from '../../../request.js';
|
|
11
10
|
import { validation } from '../../../utils/validation.js';
|
|
12
11
|
import GraphCommand from '../../base/GraphCommand.js';
|
|
@@ -28,7 +27,7 @@ class FileAddCommand extends GraphCommand {
|
|
|
28
27
|
async commandAction(logger, args) {
|
|
29
28
|
let folderUrlWithoutTrailingSlash = args.options.folderUrl;
|
|
30
29
|
if (folderUrlWithoutTrailingSlash.endsWith('/')) {
|
|
31
|
-
folderUrlWithoutTrailingSlash = folderUrlWithoutTrailingSlash.
|
|
30
|
+
folderUrlWithoutTrailingSlash = folderUrlWithoutTrailingSlash.substring(0, folderUrlWithoutTrailingSlash.length - 1);
|
|
32
31
|
}
|
|
33
32
|
try {
|
|
34
33
|
const graphFileUrl = await this.getGraphFileUrl(logger, `${folderUrlWithoutTrailingSlash}/${path.basename(args.options.filePath)}`, args.options.siteUrl);
|
|
@@ -97,14 +96,14 @@ class FileAddCommand extends GraphCommand {
|
|
|
97
96
|
if (this.debug) {
|
|
98
97
|
await logger.logToStderr(`Resolving Graph drive item URL for ${fileWebUrl}`);
|
|
99
98
|
}
|
|
100
|
-
const _fileWebUrl =
|
|
101
|
-
const _siteUrl =
|
|
99
|
+
const _fileWebUrl = new URL(fileWebUrl);
|
|
100
|
+
const _siteUrl = new URL(siteUrl || fileWebUrl);
|
|
102
101
|
const isSiteUrl = typeof siteUrl !== 'undefined';
|
|
103
102
|
let siteId = '';
|
|
104
103
|
let driveRelativeFileUrl = '';
|
|
105
|
-
const siteInfo = await this.getGraphSiteInfoFromFullUrl(_siteUrl.host, _siteUrl.
|
|
104
|
+
const siteInfo = await this.getGraphSiteInfoFromFullUrl(_siteUrl.host, _siteUrl.pathname, isSiteUrl);
|
|
106
105
|
siteId = siteInfo.id;
|
|
107
|
-
let siteRelativeFileUrl = _fileWebUrl.
|
|
106
|
+
let siteRelativeFileUrl = _fileWebUrl.pathname.replace(siteInfo.serverRelativeUrl, '');
|
|
108
107
|
// normalize site-relative URLs for root site collections and root sites
|
|
109
108
|
if (!siteRelativeFileUrl.startsWith('/')) {
|
|
110
109
|
siteRelativeFileUrl = '/' + siteRelativeFileUrl;
|
|
@@ -37,6 +37,7 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super();
|
|
39
39
|
_GraphSubscriptionAddCommand_instances.add(this);
|
|
40
|
+
this.allowedTlsVersions = ['v1_0', 'v1_1', 'v1_2', 'v1_3'];
|
|
40
41
|
__classPrivateFieldGet(this, _GraphSubscriptionAddCommand_instances, "m", _GraphSubscriptionAddCommand_initTelemetry).call(this);
|
|
41
42
|
__classPrivateFieldGet(this, _GraphSubscriptionAddCommand_instances, "m", _GraphSubscriptionAddCommand_initOptions).call(this);
|
|
42
43
|
__classPrivateFieldGet(this, _GraphSubscriptionAddCommand_instances, "m", _GraphSubscriptionAddCommand_initValidators).call(this);
|
|
@@ -46,11 +47,15 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
46
47
|
changeType: args.options.changeTypes,
|
|
47
48
|
resource: args.options.resource,
|
|
48
49
|
notificationUrl: args.options.notificationUrl,
|
|
49
|
-
expirationDateTime: await this.getExpirationDateTimeOrDefault(logger, args)
|
|
50
|
+
expirationDateTime: await this.getExpirationDateTimeOrDefault(logger, args),
|
|
51
|
+
clientState: args.options.clientState,
|
|
52
|
+
includeResourceData: args.options.includeResourceData,
|
|
53
|
+
encryptionCertificate: args.options.encryptionCertificate,
|
|
54
|
+
encryptionCertificateId: args.options.encryptionCertificateId,
|
|
55
|
+
lifecycleNotificationUrl: args.options.lifecycleNotificationUrl,
|
|
56
|
+
notificationUrlAppId: args.options.notificationUrlAppId,
|
|
57
|
+
latestSupportedTlsVersion: args.options.latestTLSVersion
|
|
50
58
|
};
|
|
51
|
-
if (args.options.clientState) {
|
|
52
|
-
data["clientState"] = args.options.clientState;
|
|
53
|
-
}
|
|
54
59
|
const requestOptions = {
|
|
55
60
|
url: `${this.resource}/v1.0/subscriptions`,
|
|
56
61
|
headers: {
|
|
@@ -123,7 +128,13 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
123
128
|
Object.assign(this.telemetryProperties, {
|
|
124
129
|
changeTypes: args.options.changeTypes,
|
|
125
130
|
expirationDateTime: typeof args.options.expirationDateTime !== 'undefined',
|
|
126
|
-
clientState: typeof args.options.clientState !== 'undefined'
|
|
131
|
+
clientState: typeof args.options.clientState !== 'undefined',
|
|
132
|
+
lifecycleNotificationUrl: typeof args.options.lifecycleNotificationUrl !== 'undefined',
|
|
133
|
+
notificationUrlAppId: typeof args.options.notificationUrlAppId !== 'undefined',
|
|
134
|
+
latestTLSVersion: typeof args.options.latestTLSVersion !== 'undefined',
|
|
135
|
+
includeResourceData: !!args.options.includeResourceData,
|
|
136
|
+
encryptionCertificate: typeof args.options.encryptionCertificate !== 'undefined',
|
|
137
|
+
encryptionCertificateId: typeof args.options.encryptionCertificateId !== 'undefined'
|
|
127
138
|
});
|
|
128
139
|
});
|
|
129
140
|
}, _GraphSubscriptionAddCommand_initOptions = function _GraphSubscriptionAddCommand_initOptions() {
|
|
@@ -138,6 +149,19 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
138
149
|
option: '-e, --expirationDateTime [expirationDateTime]'
|
|
139
150
|
}, {
|
|
140
151
|
option: '-s, --clientState [clientState]'
|
|
152
|
+
}, {
|
|
153
|
+
option: '--lifecycleNotificationUrl [lifecycleNotificationUrl]'
|
|
154
|
+
}, {
|
|
155
|
+
option: '--notificationUrlAppId [notificationUrlAppId]'
|
|
156
|
+
}, {
|
|
157
|
+
option: '--latestTLSVersion [latestTLSVersion]',
|
|
158
|
+
autocomplete: this.allowedTlsVersions
|
|
159
|
+
}, {
|
|
160
|
+
option: '--includeResourceData [includeResourceData]'
|
|
161
|
+
}, {
|
|
162
|
+
option: '--encryptionCertificate [encryptionCertificate]'
|
|
163
|
+
}, {
|
|
164
|
+
option: '--encryptionCertificateId [encryptionCertificateId]'
|
|
141
165
|
});
|
|
142
166
|
}, _GraphSubscriptionAddCommand_initValidators = function _GraphSubscriptionAddCommand_initValidators() {
|
|
143
167
|
this.validators.push(async (args) => {
|
|
@@ -155,6 +179,23 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
155
179
|
if (args.options.clientState && args.options.clientState.length > 128) {
|
|
156
180
|
return 'The clientState value exceeds the maximum length of 128 characters';
|
|
157
181
|
}
|
|
182
|
+
if (args.options.lifecycleNotificationUrl && !args.options.lifecycleNotificationUrl.toLowerCase().startsWith('https://')
|
|
183
|
+
&& !args.options.lifecycleNotificationUrl.toLowerCase().startsWith('eventhub:https://')
|
|
184
|
+
&& !args.options.lifecycleNotificationUrl.toLowerCase().startsWith('eventgrid:?azuresubscriptionid=')) {
|
|
185
|
+
return `The lifecycle notification URL '${args.options.lifecycleNotificationUrl}' does not start with either 'https://' or 'EventHub:https://' or 'EventGrid:?azuresubscriptionid='`;
|
|
186
|
+
}
|
|
187
|
+
if (args.options.latestTLSVersion && this.allowedTlsVersions.map(x => x.toLowerCase()).indexOf(args.options.latestTLSVersion.toLowerCase()) === -1) {
|
|
188
|
+
return `${args.options.latestTLSVersion} is not a valid TLS version. Allowed values are ${this.allowedTlsVersions.join(', ')}`;
|
|
189
|
+
}
|
|
190
|
+
if (args.options.includeResourceData && !args.options.encryptionCertificate) {
|
|
191
|
+
return `The 'encryptionCertificate' options is required to include the changed resource data`;
|
|
192
|
+
}
|
|
193
|
+
if (args.options.includeResourceData && !args.options.encryptionCertificateId) {
|
|
194
|
+
return `The 'encryptionCertificateId' options is required to include the changed resource data`;
|
|
195
|
+
}
|
|
196
|
+
if (args.options.notificationUrlAppId && !validation.isValidGuid(args.options.notificationUrlAppId)) {
|
|
197
|
+
return `${args.options.notificationUrlAppId} is not a valid GUID for the 'notificationUrlAppId'`;
|
|
198
|
+
}
|
|
158
199
|
return true;
|
|
159
200
|
});
|
|
160
201
|
};
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _PpCopilotGetCommand_instances, _PpCopilotGetCommand_initTelemetry, _PpCopilotGetCommand_initOptions, _PpCopilotGetCommand_initOptionSets, _PpCopilotGetCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
@@ -11,38 +11,42 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
11
11
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
13
|
import { cli } from '../../../../cli/cli.js';
|
|
14
|
-
class
|
|
14
|
+
class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
15
15
|
get name() {
|
|
16
|
-
return commands.
|
|
16
|
+
return commands.COPILOT_GET;
|
|
17
17
|
}
|
|
18
18
|
get description() {
|
|
19
|
-
return 'Get information about the specified
|
|
19
|
+
return 'Get information about the specified copilot';
|
|
20
|
+
}
|
|
21
|
+
alias() {
|
|
22
|
+
return [commands.CHATBOT_GET];
|
|
20
23
|
}
|
|
21
24
|
defaultProperties() {
|
|
22
25
|
return ['name', 'botid', 'publishedon', 'createdon', 'modifiedon'];
|
|
23
26
|
}
|
|
24
27
|
constructor() {
|
|
25
28
|
super();
|
|
26
|
-
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
28
|
-
__classPrivateFieldGet(this,
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
30
|
-
__classPrivateFieldGet(this,
|
|
29
|
+
_PpCopilotGetCommand_instances.add(this);
|
|
30
|
+
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initTelemetry).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptions).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initValidators).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptionSets).call(this);
|
|
31
34
|
}
|
|
32
35
|
async commandAction(logger, args) {
|
|
36
|
+
await this.showDeprecationWarning(logger, commands.CHATBOT_GET, commands.COPILOT_GET);
|
|
33
37
|
if (this.verbose) {
|
|
34
|
-
await logger.logToStderr(`Retrieving
|
|
38
|
+
await logger.logToStderr(`Retrieving copilot '${args.options.id || args.options.name}'...`);
|
|
35
39
|
}
|
|
36
40
|
try {
|
|
37
41
|
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
38
|
-
const res = await this.
|
|
42
|
+
const res = await this.getCopilot(dynamicsApiUrl, args.options);
|
|
39
43
|
await logger.log(res);
|
|
40
44
|
}
|
|
41
45
|
catch (err) {
|
|
42
46
|
this.handleRejectedODataJsonPromise(err);
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
async
|
|
49
|
+
async getCopilot(dynamicsApiUrl, options) {
|
|
46
50
|
const requestOptions = {
|
|
47
51
|
headers: {
|
|
48
52
|
accept: 'application/json;odata.metadata=none'
|
|
@@ -58,15 +62,15 @@ class PpChatbotGetCommand extends PowerPlatformCommand {
|
|
|
58
62
|
const result = await request.get(requestOptions);
|
|
59
63
|
if (result.value.length > 1) {
|
|
60
64
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('botid', result.value);
|
|
61
|
-
return await cli.handleMultipleResultsFound(`Multiple
|
|
65
|
+
return await cli.handleMultipleResultsFound(`Multiple copilots with name '${options.name}' found.`, resultAsKeyValuePair);
|
|
62
66
|
}
|
|
63
67
|
if (result.value.length === 0) {
|
|
64
|
-
throw `The specified
|
|
68
|
+
throw `The specified copilot '${options.name}' does not exist.`;
|
|
65
69
|
}
|
|
66
70
|
return result.value[0];
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
|
|
73
|
+
_PpCopilotGetCommand_instances = new WeakSet(), _PpCopilotGetCommand_initTelemetry = function _PpCopilotGetCommand_initTelemetry() {
|
|
70
74
|
this.telemetry.push((args) => {
|
|
71
75
|
Object.assign(this.telemetryProperties, {
|
|
72
76
|
id: typeof args.options.id !== 'undefined',
|
|
@@ -74,7 +78,7 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
|
|
|
74
78
|
asAdmin: !!args.options.asAdmin
|
|
75
79
|
});
|
|
76
80
|
});
|
|
77
|
-
},
|
|
81
|
+
}, _PpCopilotGetCommand_initOptions = function _PpCopilotGetCommand_initOptions() {
|
|
78
82
|
this.options.unshift({
|
|
79
83
|
option: '-e, --environmentName <environmentName>'
|
|
80
84
|
}, {
|
|
@@ -84,9 +88,9 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
|
|
|
84
88
|
}, {
|
|
85
89
|
option: '--asAdmin'
|
|
86
90
|
});
|
|
87
|
-
},
|
|
91
|
+
}, _PpCopilotGetCommand_initOptionSets = function _PpCopilotGetCommand_initOptionSets() {
|
|
88
92
|
this.optionSets.push({ options: ['id', 'name'] });
|
|
89
|
-
},
|
|
93
|
+
}, _PpCopilotGetCommand_initValidators = function _PpCopilotGetCommand_initValidators() {
|
|
90
94
|
this.validators.push(async (args) => {
|
|
91
95
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
92
96
|
return `${args.options.id} is not a valid GUID`;
|
|
@@ -94,5 +98,5 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
|
|
|
94
98
|
return true;
|
|
95
99
|
});
|
|
96
100
|
};
|
|
97
|
-
export default new
|
|
98
|
-
//# sourceMappingURL=
|
|
101
|
+
export default new PpCopilotGetCommand();
|
|
102
|
+
//# sourceMappingURL=copilot-get.js.map
|
|
@@ -3,30 +3,34 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _PpCopilotListCommand_instances, _PpCopilotListCommand_initTelemetry, _PpCopilotListCommand_initOptions;
|
|
7
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
8
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
9
9
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
class
|
|
11
|
+
class PpCopilotListCommand extends PowerPlatformCommand {
|
|
12
12
|
get name() {
|
|
13
|
-
return commands.
|
|
13
|
+
return commands.COPILOT_LIST;
|
|
14
14
|
}
|
|
15
15
|
get description() {
|
|
16
|
-
return 'Lists Microsoft Power Platform
|
|
16
|
+
return 'Lists Microsoft Power Platform copilots in the specified Power Platform environment';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [commands.CHATBOT_LIST];
|
|
17
20
|
}
|
|
18
21
|
defaultProperties() {
|
|
19
22
|
return ['name', 'botid', 'publishedOn', 'createdOn', 'botModifiedOn'];
|
|
20
23
|
}
|
|
21
24
|
constructor() {
|
|
22
25
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
+
_PpCopilotListCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initOptions).call(this);
|
|
26
29
|
}
|
|
27
30
|
async commandAction(logger, args) {
|
|
31
|
+
await this.showDeprecationWarning(logger, commands.CHATBOT_LIST, commands.COPILOT_LIST);
|
|
28
32
|
if (this.verbose) {
|
|
29
|
-
await logger.logToStderr(`Retrieving list of
|
|
33
|
+
await logger.logToStderr(`Retrieving list of copilots for environment '${args.options.environmentName}'.`);
|
|
30
34
|
}
|
|
31
35
|
const fetchXml = `
|
|
32
36
|
<fetch mapping='logical' version='1.0' >
|
|
@@ -78,18 +82,18 @@ class PpChatbotListCommand extends PowerPlatformCommand {
|
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
|
-
|
|
85
|
+
_PpCopilotListCommand_instances = new WeakSet(), _PpCopilotListCommand_initTelemetry = function _PpCopilotListCommand_initTelemetry() {
|
|
82
86
|
this.telemetry.push((args) => {
|
|
83
87
|
Object.assign(this.telemetryProperties, {
|
|
84
88
|
asAdmin: !!args.options.asAdmin
|
|
85
89
|
});
|
|
86
90
|
});
|
|
87
|
-
},
|
|
91
|
+
}, _PpCopilotListCommand_initOptions = function _PpCopilotListCommand_initOptions() {
|
|
88
92
|
this.options.unshift({
|
|
89
93
|
option: '-e, --environmentName <environmentName>'
|
|
90
94
|
}, {
|
|
91
95
|
option: '--asAdmin'
|
|
92
96
|
});
|
|
93
97
|
};
|
|
94
|
-
export default new
|
|
95
|
-
//# sourceMappingURL=
|
|
98
|
+
export default new PpCopilotListCommand();
|
|
99
|
+
//# sourceMappingURL=copilot-list.js.map
|
|
@@ -3,44 +3,48 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _PpCopilotRemoveCommand_instances, _PpCopilotRemoveCommand_initTelemetry, _PpCopilotRemoveCommand_initOptions, _PpCopilotRemoveCommand_initOptionSets, _PpCopilotRemoveCommand_initValidators;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
import
|
|
14
|
-
class
|
|
13
|
+
import ppCopilotGetCommand from './copilot-get.js';
|
|
14
|
+
class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
15
15
|
get name() {
|
|
16
|
-
return commands.
|
|
16
|
+
return commands.COPILOT_REMOVE;
|
|
17
17
|
}
|
|
18
18
|
get description() {
|
|
19
|
-
return 'Removes the specified
|
|
19
|
+
return 'Removes the specified copilot';
|
|
20
|
+
}
|
|
21
|
+
alias() {
|
|
22
|
+
return [commands.CHATBOT_REMOVE];
|
|
20
23
|
}
|
|
21
24
|
constructor() {
|
|
22
25
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
26
|
+
_PpCopilotRemoveCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptions).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptionSets).call(this);
|
|
28
31
|
}
|
|
29
32
|
async commandAction(logger, args) {
|
|
33
|
+
await this.showDeprecationWarning(logger, commands.CHATBOT_REMOVE, commands.COPILOT_REMOVE);
|
|
30
34
|
if (this.verbose) {
|
|
31
|
-
await logger.logToStderr(`Removing
|
|
35
|
+
await logger.logToStderr(`Removing copilot '${args.options.id || args.options.name}'...`);
|
|
32
36
|
}
|
|
33
37
|
if (args.options.force) {
|
|
34
|
-
await this.
|
|
38
|
+
await this.deleteCopilot(args);
|
|
35
39
|
}
|
|
36
40
|
else {
|
|
37
|
-
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove
|
|
41
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove copilot '${args.options.id || args.options.name}'?` });
|
|
38
42
|
if (result) {
|
|
39
|
-
await this.
|
|
43
|
+
await this.deleteCopilot(args);
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
|
-
async
|
|
47
|
+
async getCopilotId(args) {
|
|
44
48
|
if (args.options.id) {
|
|
45
49
|
return args.options.id;
|
|
46
50
|
}
|
|
@@ -51,14 +55,14 @@ class PpChatbotRemoveCommand extends PowerPlatformCommand {
|
|
|
51
55
|
debug: this.debug,
|
|
52
56
|
verbose: this.verbose
|
|
53
57
|
};
|
|
54
|
-
const output = await cli.executeCommandWithOutput(
|
|
58
|
+
const output = await cli.executeCommandWithOutput(ppCopilotGetCommand, { options: { ...options, _: [] } });
|
|
55
59
|
const getBotOutput = JSON.parse(output.stdout);
|
|
56
60
|
return getBotOutput.botid;
|
|
57
61
|
}
|
|
58
|
-
async
|
|
62
|
+
async deleteCopilot(args) {
|
|
59
63
|
try {
|
|
60
64
|
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
61
|
-
const botId = await this.
|
|
65
|
+
const botId = await this.getCopilotId(args);
|
|
62
66
|
const requestOptions = {
|
|
63
67
|
url: `${dynamicsApiUrl}/api/data/v9.1/bots(${botId})/Microsoft.Dynamics.CRM.PvaDeleteBot?tag=deprovisionbotondelete`,
|
|
64
68
|
headers: {
|
|
@@ -74,7 +78,7 @@ class PpChatbotRemoveCommand extends PowerPlatformCommand {
|
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
|
-
|
|
81
|
+
_PpCopilotRemoveCommand_instances = new WeakSet(), _PpCopilotRemoveCommand_initTelemetry = function _PpCopilotRemoveCommand_initTelemetry() {
|
|
78
82
|
this.telemetry.push((args) => {
|
|
79
83
|
Object.assign(this.telemetryProperties, {
|
|
80
84
|
id: typeof args.options.id !== 'undefined',
|
|
@@ -83,7 +87,7 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
|
|
|
83
87
|
force: !!args.options.force
|
|
84
88
|
});
|
|
85
89
|
});
|
|
86
|
-
},
|
|
90
|
+
}, _PpCopilotRemoveCommand_initOptions = function _PpCopilotRemoveCommand_initOptions() {
|
|
87
91
|
this.options.unshift({
|
|
88
92
|
option: '-e, --environmentName <environmentName>'
|
|
89
93
|
}, {
|
|
@@ -95,9 +99,9 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
|
|
|
95
99
|
}, {
|
|
96
100
|
option: '-f, --force'
|
|
97
101
|
});
|
|
98
|
-
},
|
|
102
|
+
}, _PpCopilotRemoveCommand_initOptionSets = function _PpCopilotRemoveCommand_initOptionSets() {
|
|
99
103
|
this.optionSets.push({ options: ['id', 'name'] });
|
|
100
|
-
},
|
|
104
|
+
}, _PpCopilotRemoveCommand_initValidators = function _PpCopilotRemoveCommand_initValidators() {
|
|
101
105
|
this.validators.push(async (args) => {
|
|
102
106
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
103
107
|
return `${args.options.id} is not a valid GUID`;
|
|
@@ -105,5 +109,5 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
|
|
|
105
109
|
return true;
|
|
106
110
|
});
|
|
107
111
|
};
|
|
108
|
-
export default new
|
|
109
|
-
//# sourceMappingURL=
|
|
112
|
+
export default new PpCopilotRemoveCommand();
|
|
113
|
+
//# sourceMappingURL=copilot-remove.js.map
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -10,6 +10,9 @@ export default {
|
|
|
10
10
|
CHATBOT_GET: `${prefix} chatbot get`,
|
|
11
11
|
CHATBOT_LIST: `${prefix} chatbot list`,
|
|
12
12
|
CHATBOT_REMOVE: `${prefix} chatbot remove`,
|
|
13
|
+
COPILOT_GET: `${prefix} copilot get`,
|
|
14
|
+
COPILOT_LIST: `${prefix} copilot list`,
|
|
15
|
+
COPILOT_REMOVE: `${prefix} copilot remove`,
|
|
13
16
|
DATAVERSE_TABLE_LIST: `${prefix} dataverse table list`,
|
|
14
17
|
DATAVERSE_TABLE_GET: `${prefix} dataverse table get`,
|
|
15
18
|
DATAVERSE_TABLE_REMOVE: `${prefix} dataverse table remove`,
|
|
@@ -167,7 +167,7 @@ class SpfxPackageGenerateCommand extends AnonymousCommand {
|
|
|
167
167
|
return webPartName.replace(/ /g, '-');
|
|
168
168
|
}
|
|
169
169
|
static getWebPartAlias(webPartName) {
|
|
170
|
-
return 'AutoWP' + webPartName.replace(/[^a-zA-Z0-9]/g, '').
|
|
170
|
+
return 'AutoWP' + webPartName.replace(/[^a-zA-Z0-9]/g, '').substring(0, 40);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
_a = SpfxPackageGenerateCommand, _SpfxPackageGenerateCommand_instances = new WeakSet(), _SpfxPackageGenerateCommand_initTelemetry = function _SpfxPackageGenerateCommand_initTelemetry() {
|
|
@@ -51,9 +51,9 @@ export class JsonRule extends Rule {
|
|
|
51
51
|
isArray = true;
|
|
52
52
|
const pos = currentProperty.indexOf('[') + 1;
|
|
53
53
|
// get array element from the property name
|
|
54
|
-
arrayElement = currentProperty.
|
|
54
|
+
arrayElement = currentProperty.substring(pos, currentProperty.length - 1);
|
|
55
55
|
// remove array element from the property name
|
|
56
|
-
currentProperty = currentProperty.
|
|
56
|
+
currentProperty = currentProperty.substring(0, pos - 1);
|
|
57
57
|
}
|
|
58
58
|
for (let i = 0; i < node.children.length; i++) {
|
|
59
59
|
let currentNode = node.children[i];
|