@pnp/cli-microsoft365 6.4.0 → 6.5.0-beta.f7a958f
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/flow/commands/flow-export.js +6 -6
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +27 -13
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +72 -0
- package/dist/m365/spo/commands/commandset/commandset-add.js +2 -1
- package/dist/m365/spo/commands/commandset/commandset-remove.js +12 -9
- package/dist/m365/spo/commands/commandset/commandset-set.js +12 -9
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/team/team-list.js +4 -6
- package/dist/utils/md.js +4 -3
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.md +4 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-list.md +109 -0
- package/docs/docs/cmd/teams/team/team-list.md +44 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
|
@@ -20,9 +20,9 @@ const path = require("path");
|
|
|
20
20
|
const request_1 = require("../../../request");
|
|
21
21
|
const formatting_1 = require("../../../utils/formatting");
|
|
22
22
|
const validation_1 = require("../../../utils/validation");
|
|
23
|
-
const
|
|
23
|
+
const PowerPlatformCommand_1 = require("../../base/PowerPlatformCommand");
|
|
24
24
|
const commands_1 = require("../commands");
|
|
25
|
-
class FlowExportCommand extends
|
|
25
|
+
class FlowExportCommand extends PowerPlatformCommand_1.default {
|
|
26
26
|
get name() {
|
|
27
27
|
return commands_1.default.EXPORT;
|
|
28
28
|
}
|
|
@@ -52,7 +52,7 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
|
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
54
|
const requestOptions = {
|
|
55
|
-
url:
|
|
55
|
+
url: `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/listPackageResources?api-version=2016-11-01`,
|
|
56
56
|
headers: {
|
|
57
57
|
accept: 'application/json'
|
|
58
58
|
},
|
|
@@ -73,8 +73,8 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
|
|
|
73
73
|
}
|
|
74
74
|
let requestOptions = {
|
|
75
75
|
url: formatArgument === 'json' ?
|
|
76
|
-
|
|
77
|
-
:
|
|
76
|
+
`https://management.azure.com/providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}?api-version=2016-11-01`
|
|
77
|
+
: `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/exportPackage?api-version=2016-11-01`,
|
|
78
78
|
headers: {
|
|
79
79
|
accept: 'application/json'
|
|
80
80
|
},
|
|
@@ -117,7 +117,7 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
|
|
|
117
117
|
}
|
|
118
118
|
requestOptions = {
|
|
119
119
|
url: formatArgument === 'json' ?
|
|
120
|
-
|
|
120
|
+
`https://management.azure.com/providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}/exportToARMTemplate?api-version=2016-11-01`
|
|
121
121
|
: downloadFileUrl,
|
|
122
122
|
// Set responseType to arraybuffer, otherwise binary data will be encoded
|
|
123
123
|
// to utf8 and binary data is corrupt
|
|
@@ -15,11 +15,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoApplicationCustomizerAddCommand_instances, _SpoApplicationCustomizerAddCommand_initOptions, _SpoApplicationCustomizerAddCommand_initTelemetry, _SpoApplicationCustomizerAddCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
|
-
const spoCustomActionAddCommand = require("../customaction/customaction-add");
|
|
23
22
|
class SpoApplicationCustomizerAddCommand extends SpoCommand_1.default {
|
|
24
23
|
get name() {
|
|
25
24
|
return commands_1.default.APPLICATIONCUSTOMIZER_ADD;
|
|
@@ -39,17 +38,25 @@ class SpoApplicationCustomizerAddCommand extends SpoCommand_1.default {
|
|
|
39
38
|
if (this.verbose) {
|
|
40
39
|
logger.logToStderr(`Adding application customizer with title '${args.options.title}' and clientSideComponentId '${args.options.clientSideComponentId}' to the site`);
|
|
41
40
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
clientSideComponentProperties: args.options.clientSideComponentProperties || '',
|
|
48
|
-
location: 'ClientSideExtension.ApplicationCustomizer',
|
|
49
|
-
debug: this.debug,
|
|
50
|
-
verbose: this.verbose
|
|
41
|
+
const requestBody = {
|
|
42
|
+
Title: args.options.title,
|
|
43
|
+
Name: args.options.title,
|
|
44
|
+
Location: 'ClientSideExtension.ApplicationCustomizer',
|
|
45
|
+
ClientSideComponentId: args.options.clientSideComponentId
|
|
51
46
|
};
|
|
52
|
-
|
|
47
|
+
if (args.options.clientSideComponentProperties) {
|
|
48
|
+
requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
|
|
49
|
+
}
|
|
50
|
+
const scope = args.options.scope || 'Site';
|
|
51
|
+
const requestOptions = {
|
|
52
|
+
url: `${args.options.webUrl}/_api/${scope}/UserCustomActions`,
|
|
53
|
+
headers: {
|
|
54
|
+
accept: 'application/json;odata=nometadata'
|
|
55
|
+
},
|
|
56
|
+
data: requestBody,
|
|
57
|
+
responseType: 'json'
|
|
58
|
+
};
|
|
59
|
+
yield request_1.default.post(requestOptions);
|
|
53
60
|
});
|
|
54
61
|
}
|
|
55
62
|
}
|
|
@@ -62,11 +69,14 @@ _SpoApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoApplicationCu
|
|
|
62
69
|
option: '-i, --clientSideComponentId <clientSideComponentId>'
|
|
63
70
|
}, {
|
|
64
71
|
option: '--clientSideComponentProperties [clientSideComponentProperties]'
|
|
72
|
+
}, {
|
|
73
|
+
option: '-s, --scope [scope]', autocomplete: SpoApplicationCustomizerAddCommand.scopes
|
|
65
74
|
});
|
|
66
75
|
}, _SpoApplicationCustomizerAddCommand_initTelemetry = function _SpoApplicationCustomizerAddCommand_initTelemetry() {
|
|
67
76
|
this.telemetry.push((args) => {
|
|
68
77
|
Object.assign(this.telemetryProperties, {
|
|
69
|
-
clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined'
|
|
78
|
+
clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
|
|
79
|
+
scope: typeof args.options.scope !== 'undefined'
|
|
70
80
|
});
|
|
71
81
|
});
|
|
72
82
|
}, _SpoApplicationCustomizerAddCommand_initValidators = function _SpoApplicationCustomizerAddCommand_initValidators() {
|
|
@@ -88,8 +98,12 @@ _SpoApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoApplicationCu
|
|
|
88
98
|
return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
|
|
89
99
|
}
|
|
90
100
|
}
|
|
101
|
+
if (args.options.scope && SpoApplicationCustomizerAddCommand.scopes.indexOf(args.options.scope) < 0) {
|
|
102
|
+
return `${args.options.scope} is not a valid value for allowedMembers. Valid values are ${SpoApplicationCustomizerAddCommand.scopes.join(', ')}`;
|
|
103
|
+
}
|
|
91
104
|
return true;
|
|
92
105
|
}));
|
|
93
106
|
};
|
|
107
|
+
SpoApplicationCustomizerAddCommand.scopes = ['Site', 'Web'];
|
|
94
108
|
module.exports = new SpoApplicationCustomizerAddCommand();
|
|
95
109
|
//# sourceMappingURL=applicationcustomizer-add.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoApplicationCustomizerListCommand_instances, _SpoApplicationCustomizerListCommand_initOptions, _SpoApplicationCustomizerListCommand_initTelemetry, _SpoApplicationCustomizerListCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const spo_1 = require("../../../../utils/spo");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class SpoApplicationCustomizerListCommand extends SpoCommand_1.default {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands_1.default.APPLICATIONCUSTOMIZER_LIST;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Get a list of application customizers that are added to a site.';
|
|
28
|
+
}
|
|
29
|
+
defaultProperties() {
|
|
30
|
+
return ['Name', 'Location', 'Scope', 'Id'];
|
|
31
|
+
}
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
_SpoApplicationCustomizerListCommand_instances.add(this);
|
|
35
|
+
__classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initTelemetry).call(this);
|
|
36
|
+
__classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initOptions).call(this);
|
|
37
|
+
__classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initValidators).call(this);
|
|
38
|
+
}
|
|
39
|
+
commandAction(logger, args) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
if (this.verbose) {
|
|
42
|
+
logger.logToStderr(`Retrieving application customizers...`);
|
|
43
|
+
}
|
|
44
|
+
const applicationCustomizers = yield spo_1.spo.getCustomActions(args.options.webUrl, args.options.scope, `Location eq 'ClientSideExtension.ApplicationCustomizer'`);
|
|
45
|
+
logger.log(applicationCustomizers);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
_SpoApplicationCustomizerListCommand_instances = new WeakSet(), _SpoApplicationCustomizerListCommand_initOptions = function _SpoApplicationCustomizerListCommand_initOptions() {
|
|
50
|
+
this.options.unshift({
|
|
51
|
+
option: '-u, --webUrl <webUrl>'
|
|
52
|
+
}, {
|
|
53
|
+
option: '-s, --scope [scope]',
|
|
54
|
+
autocomplete: SpoApplicationCustomizerListCommand.scopes
|
|
55
|
+
});
|
|
56
|
+
}, _SpoApplicationCustomizerListCommand_initTelemetry = function _SpoApplicationCustomizerListCommand_initTelemetry() {
|
|
57
|
+
this.telemetry.push((args) => {
|
|
58
|
+
Object.assign(this.telemetryProperties, {
|
|
59
|
+
scope: typeof args.options.scope !== 'undefined'
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}, _SpoApplicationCustomizerListCommand_initValidators = function _SpoApplicationCustomizerListCommand_initValidators() {
|
|
63
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
if (args.options.scope && SpoApplicationCustomizerListCommand.scopes.indexOf(args.options.scope) < 0) {
|
|
65
|
+
return `${args.options.scope} is not a valid scope. Allowed values are ${SpoApplicationCustomizerListCommand.scopes.join(', ')}`;
|
|
66
|
+
}
|
|
67
|
+
return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
68
|
+
}));
|
|
69
|
+
};
|
|
70
|
+
SpoApplicationCustomizerListCommand.scopes = ['All', 'Site', 'Web'];
|
|
71
|
+
module.exports = new SpoApplicationCustomizerListCommand();
|
|
72
|
+
//# sourceMappingURL=applicationcustomizer-list.js.map
|
|
@@ -48,7 +48,8 @@ class SpoCommandSetAddCommand extends SpoCommand_1.default {
|
|
|
48
48
|
Title: args.options.title,
|
|
49
49
|
Location: location,
|
|
50
50
|
ClientSideComponentId: args.options.clientSideComponentId,
|
|
51
|
-
RegistrationId: listType
|
|
51
|
+
RegistrationId: listType,
|
|
52
|
+
RegistrationType: 1
|
|
52
53
|
};
|
|
53
54
|
if (args.options.clientSideComponentProperties) {
|
|
54
55
|
requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
|
|
@@ -58,36 +58,39 @@ class SpoCommandSetRemoveCommand extends SpoCommand_1.default {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
getCustomAction(options) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
let commandSets = [];
|
|
63
64
|
if (options.id) {
|
|
64
|
-
|
|
65
|
+
const commandSet = yield spo_1.spo.getCustomActionById(options.webUrl, options.id, options.scope);
|
|
66
|
+
if (commandSet) {
|
|
67
|
+
commandSets.push(commandSet);
|
|
68
|
+
}
|
|
65
69
|
}
|
|
66
|
-
|
|
67
|
-
if (options.title) {
|
|
70
|
+
else if (options.title) {
|
|
68
71
|
commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(Title eq '${formatting_1.formatting.encodeQueryParameter(options.title)}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
|
|
69
72
|
}
|
|
70
73
|
else {
|
|
71
74
|
commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(ClientSideComponentId eq guid'${options.clientSideComponentId}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
|
|
72
75
|
}
|
|
73
76
|
if (commandSets.length === 0) {
|
|
74
|
-
throw `No user commandsets with ${options.title
|
|
77
|
+
throw `No user commandsets with ${options.title && `title '${options.title}'` || options.clientSideComponentId && `ClientSideComponentId '${options.clientSideComponentId}'` || options.id && `id '${options.id}'`} found`;
|
|
75
78
|
}
|
|
76
79
|
if (commandSets.length > 1) {
|
|
77
80
|
throw `Multiple user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found. Please disambiguate using IDs: ${commandSets.map((commandSet) => commandSet.Id).join(', ')}`;
|
|
78
81
|
}
|
|
79
|
-
return commandSets[0]
|
|
82
|
+
return commandSets[0];
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
deleteCommandset(args) {
|
|
83
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
87
|
if (!args.options.scope) {
|
|
85
|
-
args.options.scope = '
|
|
88
|
+
args.options.scope = 'All';
|
|
86
89
|
}
|
|
87
90
|
try {
|
|
88
|
-
const
|
|
91
|
+
const customAction = yield this.getCustomAction(args.options);
|
|
89
92
|
const requestOptions = {
|
|
90
|
-
url: `${args.options.webUrl}/_api/${
|
|
93
|
+
url: `${args.options.webUrl}/_api/${customAction.Scope === 3 ? "Web" : "Site"}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(customAction.Id)}')`,
|
|
91
94
|
headers: {
|
|
92
95
|
accept: 'application/json;odata=nometadata'
|
|
93
96
|
},
|
|
@@ -42,7 +42,7 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
|
|
|
42
42
|
logger.logToStderr(`Updating ListView Command Set ${args.options.clientSideComponentId} to site '${args.options.webUrl}'...`);
|
|
43
43
|
}
|
|
44
44
|
if (!args.options.scope) {
|
|
45
|
-
args.options.scope = '
|
|
45
|
+
args.options.scope = 'All';
|
|
46
46
|
}
|
|
47
47
|
const location = this.getLocation(args.options.location ? args.options.location : '');
|
|
48
48
|
try {
|
|
@@ -59,9 +59,9 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
|
|
|
59
59
|
if (args.options.clientSideComponentProperties) {
|
|
60
60
|
requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const customAction = yield this.getCustomAction(args.options);
|
|
63
63
|
const requestOptions = {
|
|
64
|
-
url: `${args.options.webUrl}/_api/${
|
|
64
|
+
url: `${args.options.webUrl}/_api/${customAction.Scope === 3 ? "Web" : "Site"}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(customAction.Id)}')`,
|
|
65
65
|
headers: {
|
|
66
66
|
accept: 'application/json;odata=nometadata',
|
|
67
67
|
'X-HTTP-Method': 'MERGE'
|
|
@@ -76,25 +76,28 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
getCustomAction(options) {
|
|
80
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
let commandSets = [];
|
|
81
82
|
if (options.id) {
|
|
82
|
-
|
|
83
|
+
const commandSet = yield spo_1.spo.getCustomActionById(options.webUrl, options.id, options.scope);
|
|
84
|
+
if (commandSet) {
|
|
85
|
+
commandSets.push(commandSet);
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
|
-
|
|
85
|
-
if (options.title) {
|
|
88
|
+
else if (options.title) {
|
|
86
89
|
commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(Title eq '${formatting_1.formatting.encodeQueryParameter(options.title)}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
|
|
87
90
|
}
|
|
88
91
|
else {
|
|
89
92
|
commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(ClientSideComponentId eq guid'${options.clientSideComponentId}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
|
|
90
93
|
}
|
|
91
94
|
if (commandSets.length === 0) {
|
|
92
|
-
throw `No user commandsets with ${options.title
|
|
95
|
+
throw `No user commandsets with ${options.title && `title '${options.title}'` || options.clientSideComponentId && `ClientSideComponentId '${options.clientSideComponentId}'` || options.id && `id '${options.id}'`} found`;
|
|
93
96
|
}
|
|
94
97
|
if (commandSets.length > 1) {
|
|
95
98
|
throw `Multiple user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found. Please disambiguate using IDs: ${commandSets.map((commandSet) => commandSet.Id).join(', ')}`;
|
|
96
99
|
}
|
|
97
|
-
return commandSets[0]
|
|
100
|
+
return commandSets[0];
|
|
98
101
|
});
|
|
99
102
|
}
|
|
100
103
|
getLocation(location) {
|
|
@@ -14,6 +14,7 @@ exports.default = {
|
|
|
14
14
|
APP_UNINSTALL: `${prefix} app uninstall`,
|
|
15
15
|
APP_UPGRADE: `${prefix} app upgrade`,
|
|
16
16
|
APPLICATIONCUSTOMIZER_ADD: `${prefix} applicationcustomizer add`,
|
|
17
|
+
APPLICATIONCUSTOMIZER_LIST: `${prefix} applicationcustomizer list`,
|
|
17
18
|
APPPAGE_ADD: `${prefix} apppage add`,
|
|
18
19
|
APPPAGE_SET: `${prefix} apppage set`,
|
|
19
20
|
CDN_GET: `${prefix} cdn get`,
|
|
@@ -26,6 +26,9 @@ class TeamsTeamListCommand extends GraphCommand_1.default {
|
|
|
26
26
|
get description() {
|
|
27
27
|
return 'Lists Microsoft Teams in the current tenant';
|
|
28
28
|
}
|
|
29
|
+
defaultProperties() {
|
|
30
|
+
return ['id', 'displayName', 'isArchived', 'description'];
|
|
31
|
+
}
|
|
29
32
|
constructor() {
|
|
30
33
|
super();
|
|
31
34
|
_TeamsTeamListCommand_instances.add(this);
|
|
@@ -67,12 +70,7 @@ class TeamsTeamListCommand extends GraphCommand_1.default {
|
|
|
67
70
|
request_1.default
|
|
68
71
|
.get(requestOptions)
|
|
69
72
|
.then((res) => {
|
|
70
|
-
resolve(
|
|
71
|
-
id: group.id,
|
|
72
|
-
displayName: group.displayName,
|
|
73
|
-
isArchived: res.isArchived,
|
|
74
|
-
description: group.description
|
|
75
|
-
});
|
|
73
|
+
resolve(res);
|
|
76
74
|
}, (err) => {
|
|
77
75
|
// If the user is not member of the team he/she cannot access it
|
|
78
76
|
if (err.statusCode === 403) {
|
package/dist/utils/md.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.md = void 0;
|
|
4
|
+
const chalk = require("chalk");
|
|
4
5
|
const fs = require("fs");
|
|
5
6
|
const os_1 = require("os");
|
|
6
7
|
const path = require("path");
|
|
7
8
|
function convertTitle(md) {
|
|
8
9
|
return md.replace(/^#\s+(.*)/gm, (match, title) => {
|
|
9
|
-
return title.toLocaleUpperCase() + os_1.EOL + Array(title.length + 1).join('=');
|
|
10
|
+
return chalk.bold(title.toLocaleUpperCase()) + os_1.EOL + Array(title.length + 1).join('=');
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
function convertHeadings(md) {
|
|
13
14
|
return md.replace(/^(#+)\s+(.*)/gm, (match, level, content) => {
|
|
14
|
-
return `${os_1.EOL}${content.toLocaleUpperCase()}`;
|
|
15
|
+
return `${os_1.EOL}${chalk.bold(content.toLocaleUpperCase())}`;
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
function convertAdmonitions(md) {
|
|
@@ -31,7 +32,7 @@ function convertDd(md) {
|
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
function convertHyperlinks(md) {
|
|
34
|
-
return md.replace(
|
|
35
|
+
return md.replace(/(?!\[1m)(?!\[22m)\[([^\]]+)\]\(([^\)]+)\)/gm, (match, label, url) => {
|
|
35
36
|
// if the link is the same as the content, return just the link
|
|
36
37
|
if (label === url) {
|
|
37
38
|
return url;
|
|
@@ -22,6 +22,9 @@ m365 spo applicationcustomizer add [options]
|
|
|
22
22
|
`--clientSideComponentProperties [clientSideComponentProperties]`
|
|
23
23
|
: JSON string with application customizer properties
|
|
24
24
|
|
|
25
|
+
`-s, --scope [scope]`
|
|
26
|
+
: Scope of the application customizer. Allowed values: `Site`, `Web`. Defaults to `Site`.
|
|
27
|
+
|
|
25
28
|
--8<-- "docs/cmd/_global.md"
|
|
26
29
|
|
|
27
30
|
## Remarks
|
|
@@ -48,7 +51,7 @@ m365 spo applicationcustomizer add --title 'Some customizer' --clientSideCompone
|
|
|
48
51
|
Adds an application customizer to the sales site with some properties.
|
|
49
52
|
|
|
50
53
|
```sh
|
|
51
|
-
m365 spo applicationcustomizer add --title 'Some customizer' --clientSideComponentId 799883f5-7962-4384-a10a-105adaec6ffc --clientSideComponentProperties '{ "someProperty": "Some value" }' --webUrl https://contoso.sharepoint.com/sites/sales
|
|
54
|
+
m365 spo applicationcustomizer add --title 'Some customizer' --clientSideComponentId 799883f5-7962-4384-a10a-105adaec6ffc --clientSideComponentProperties '{ "someProperty": "Some value" }' --webUrl https://contoso.sharepoint.com/sites/sales --scope 'Site'
|
|
52
55
|
```
|
|
53
56
|
|
|
54
57
|
## Response
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# spo applicationcustomizer list
|
|
2
|
+
|
|
3
|
+
Get a list of application customizers that are added to a site.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo applicationcustomizer list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: The url of the site.
|
|
15
|
+
|
|
16
|
+
`-s, --scope [scope]`
|
|
17
|
+
: Scope of the application customizers. Allowed values `Site`, `Web`, `All`. Defaults to `All`
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
Retrieves a list of application customizers.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
m365 spo applicationcustomizer list --webUrl https://contoso.sharepoint.com/sites/sales
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Response
|
|
30
|
+
|
|
31
|
+
=== "JSON"
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
[
|
|
35
|
+
{
|
|
36
|
+
"ClientSideComponentId": "4358e70e-ec3c-4713-beb6-39c88f7621d1",
|
|
37
|
+
"ClientSideComponentProperties": "{\"listTitle\":\"News\",\"listViewTitle\":\"Published News\"}",
|
|
38
|
+
"CommandUIExtension": null,
|
|
39
|
+
"Description": null,
|
|
40
|
+
"Group": null,
|
|
41
|
+
"HostProperties": "",
|
|
42
|
+
"Id": "f405303c-6048-4636-9660-1b7b2cadaef9",
|
|
43
|
+
"ImageUrl": null,
|
|
44
|
+
"Location": "ClientSideExtension.ApplicationCustomizer",
|
|
45
|
+
"Name": "{f405303c-6048-4636-9660-1b7b2cadaef9}",
|
|
46
|
+
"RegistrationId": null,
|
|
47
|
+
"RegistrationType": 0,
|
|
48
|
+
"Rights": {
|
|
49
|
+
"High": 0,
|
|
50
|
+
"Low": 0
|
|
51
|
+
},
|
|
52
|
+
"Scope": 3,
|
|
53
|
+
"ScriptBlock": null,
|
|
54
|
+
"ScriptSrc": null,
|
|
55
|
+
"Sequence": 65536,
|
|
56
|
+
"Title": "NewsTicker",
|
|
57
|
+
"Url": null,
|
|
58
|
+
"VersionOfUserCustomAction": "1.0.1.0"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
=== "Text"
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
Name Location Scope Id
|
|
67
|
+
-------------------------------------- ----------------------------------------- ----- ------------------------------------
|
|
68
|
+
{f405303c-6048-4636-9660-1b7b2cadaef9} ClientSideExtension.ApplicationCustomizer 3 f405303c-6048-4636-9660-1b7b2cadaef9
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
=== "CSV"
|
|
72
|
+
|
|
73
|
+
```csv
|
|
74
|
+
Name,Location,Scope,Id
|
|
75
|
+
{f405303c-6048-4636-9660-1b7b2cadaef9},ClientSideExtension.ApplicationCustomizer,3,f405303c-6048-4636-9660-1b7b2cadaef9
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
=== "Markdown"
|
|
79
|
+
|
|
80
|
+
```md
|
|
81
|
+
# spo applicationcustomizer list --webUrl "https://contoso.sharepoint.com"
|
|
82
|
+
|
|
83
|
+
Date: 28/2/2023
|
|
84
|
+
|
|
85
|
+
## NewsTicker (f405303c-6048-4636-9660-1b7b2cadaef9)
|
|
86
|
+
|
|
87
|
+
Property | Value
|
|
88
|
+
---------|-------
|
|
89
|
+
ClientSideComponentId | 4358e70e-ec3c-4713-beb6-39c88f7621d1
|
|
90
|
+
ClientSideComponentProperties | {"listTitle":"News","listViewTitle":"Published News"}
|
|
91
|
+
CommandUIExtension | null
|
|
92
|
+
Description | null
|
|
93
|
+
Group | null
|
|
94
|
+
HostProperties |
|
|
95
|
+
Id | f405303c-6048-4636-9660-1b7b2cadaef9
|
|
96
|
+
ImageUrl | null
|
|
97
|
+
Location | ClientSideExtension.ApplicationCustomizer
|
|
98
|
+
Name | {f405303c-6048-4636-9660-1b7b2cadaef9}
|
|
99
|
+
RegistrationId | null
|
|
100
|
+
RegistrationType | 0
|
|
101
|
+
Rights | {"High":0,"Low":0}
|
|
102
|
+
Scope | 3
|
|
103
|
+
ScriptBlock | null
|
|
104
|
+
ScriptSrc | null
|
|
105
|
+
Sequence | 65536
|
|
106
|
+
Title | NewsTicker
|
|
107
|
+
Url | null
|
|
108
|
+
VersionOfUserCustomAction | 1.0.1.0
|
|
109
|
+
```
|
|
@@ -37,20 +37,60 @@ m365 teams team list --joined
|
|
|
37
37
|
|
|
38
38
|
=== "JSON"
|
|
39
39
|
|
|
40
|
-
```
|
|
40
|
+
```json
|
|
41
41
|
[
|
|
42
42
|
{
|
|
43
43
|
"id": "5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3",
|
|
44
|
+
"createdDateTime": "2022-12-08T09:17:55.039Z",
|
|
44
45
|
"displayName": "Architecture",
|
|
46
|
+
"description": "Architecture Discussion",
|
|
47
|
+
"internalId": "19:pLknmKPPkvgeaG0FtegLfjoDINeY3gvmitMkNG9H3X41@thread.tacv2",
|
|
48
|
+
"classification": null,
|
|
49
|
+
"specialization": "none",
|
|
50
|
+
"visibility": "public",
|
|
51
|
+
"webUrl": "https://teams.microsoft.com/l/team/19:a5c6eccad3fb401997756a1501d561aa%40thread.skype/conversations?groupId=8090c93e-ba7c-433e-9f39-08c7ba07c0b3&tenantId=dcd219dd-bc68-4b9b-bf0b-4a33a796be35",
|
|
45
52
|
"isArchived": false,
|
|
46
|
-
"
|
|
53
|
+
"isMembershipLimitedToOwners": false,
|
|
54
|
+
"discoverySettings": {
|
|
55
|
+
"showInTeamsSearchAndSuggestions": true
|
|
56
|
+
},
|
|
57
|
+
"memberSettings": {
|
|
58
|
+
"allowCreateUpdateChannels": true,
|
|
59
|
+
"allowCreatePrivateChannels": true,
|
|
60
|
+
"allowDeleteChannels": true,
|
|
61
|
+
"allowAddRemoveApps": true,
|
|
62
|
+
"allowCreateUpdateRemoveTabs": true,
|
|
63
|
+
"allowCreateUpdateRemoveConnectors": true
|
|
64
|
+
},
|
|
65
|
+
"guestSettings": {
|
|
66
|
+
"allowCreateUpdateChannels": false,
|
|
67
|
+
"allowDeleteChannels": false
|
|
68
|
+
},
|
|
69
|
+
"messagingSettings": {
|
|
70
|
+
"allowUserEditMessages": false,
|
|
71
|
+
"allowUserDeleteMessages": false,
|
|
72
|
+
"allowOwnerDeleteMessages": false,
|
|
73
|
+
"allowTeamMentions": true,
|
|
74
|
+
"allowChannelMentions": true
|
|
75
|
+
},
|
|
76
|
+
"funSettings": {
|
|
77
|
+
"allowGiphy": true,
|
|
78
|
+
"giphyContentRating": "moderate",
|
|
79
|
+
"allowStickersAndMemes": true,
|
|
80
|
+
"allowCustomMemes": false
|
|
81
|
+
},
|
|
82
|
+
"summary": {
|
|
83
|
+
"ownersCount": 1,
|
|
84
|
+
"membersCount": 1,
|
|
85
|
+
"guestsCount": 0
|
|
86
|
+
}
|
|
47
87
|
}
|
|
48
88
|
]
|
|
49
89
|
```
|
|
50
90
|
|
|
51
91
|
=== "Text"
|
|
52
92
|
|
|
53
|
-
```
|
|
93
|
+
```text
|
|
54
94
|
id displayName isArchived description
|
|
55
95
|
------------------------------------ ---------------- ---------- ---------------------------------------
|
|
56
96
|
5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3 Architecture false Architecture Discussion
|
|
@@ -58,7 +98,7 @@ m365 teams team list --joined
|
|
|
58
98
|
|
|
59
99
|
=== "CSV"
|
|
60
100
|
|
|
61
|
-
```
|
|
101
|
+
```csv
|
|
62
102
|
id,displayName,isArchived,description
|
|
63
103
|
5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3,Architecture,,Architecture Discussion
|
|
64
104
|
```
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pnp/cli-microsoft365",
|
|
9
|
-
"version": "6.
|
|
9
|
+
"version": "6.5.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@azure/msal-node": "^1.15.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0-beta.f7a958f",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -274,4 +274,4 @@
|
|
|
274
274
|
"sinon": "^15.0.1",
|
|
275
275
|
"source-map-support": "^0.5.21"
|
|
276
276
|
}
|
|
277
|
-
}
|
|
277
|
+
}
|