@pnp/cli-microsoft365 6.4.0-beta.f8f3553 → 6.5.0-beta.33bab12
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/.devcontainer/Dockerfile +5 -2
- package/Dockerfile +6 -3
- package/README.md +3 -3
- package/dist/Auth.js +1 -3
- package/dist/Command.js +1 -1
- package/dist/m365/file/commands/file-list.js +5 -1
- package/dist/m365/flow/commands/flow-export.js +6 -6
- package/dist/m365/flow/commands/owner/{owner-add.js → owner-ensure.js} +19 -19
- package/dist/m365/flow/commands.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014009_CODE_launch_hostedWorkbench_url.js +62 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.0.js +67 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- 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/homesite/homesite-set.js +33 -15
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -2
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/team/team-list.js +4 -6
- package/dist/m365/todo/commands/task/task-add.js +35 -3
- package/dist/m365/todo/commands/task/task-set.js +25 -1
- package/dist/utils/md.js +4 -3
- package/dist/utils/validation.js +3 -2
- package/docs/docs/cmd/aad/app/app-add.md +3 -3
- package/docs/docs/cmd/flow/owner/{owner-add.md → owner-ensure.md} +6 -6
- package/docs/docs/cmd/spfx/project/project-upgrade.md +2 -2
- 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/spo/homesite/homesite-set.md +47 -2
- package/docs/docs/cmd/spo/list/list-view-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-set.md +2 -2
- package/docs/docs/cmd/teams/team/team-list.md +44 -4
- package/docs/docs/cmd/todo/task/task-add.md +47 -2
- package/docs/docs/cmd/todo/task/task-set.md +50 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -1
|
@@ -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) {
|
|
@@ -13,11 +13,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
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
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators;
|
|
16
|
+
var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initTelemetry, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators, _SpoHomeSiteSetCommand_initTypes;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const config_1 = require("../../../../config");
|
|
19
18
|
const request_1 = require("../../../../request");
|
|
20
|
-
const formatting_1 = require("../../../../utils/formatting");
|
|
21
19
|
const spo_1 = require("../../../../utils/spo");
|
|
22
20
|
const validation_1 = require("../../../../utils/validation");
|
|
23
21
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -32,43 +30,63 @@ class SpoHomeSiteSetCommand extends SpoCommand_1.default {
|
|
|
32
30
|
constructor() {
|
|
33
31
|
super();
|
|
34
32
|
_SpoHomeSiteSetCommand_instances.add(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTelemetry).call(this);
|
|
35
34
|
__classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initOptions).call(this);
|
|
36
35
|
__classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initValidators).call(this);
|
|
36
|
+
__classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTypes).call(this);
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
try {
|
|
41
|
+
if (this.verbose) {
|
|
42
|
+
logger.logToStderr(`Setting the SharePoint home site to: ${args.options.siteUrl}...`);
|
|
43
|
+
logger.logToStderr('Attempting to retrieve the SharePoint admin URL.');
|
|
44
|
+
}
|
|
41
45
|
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
42
|
-
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
43
46
|
const requestOptions = {
|
|
44
|
-
url: `${spoAdminUrl}/
|
|
47
|
+
url: `${spoAdminUrl}/_api/SPO.Tenant`,
|
|
45
48
|
headers: {
|
|
46
|
-
'
|
|
49
|
+
accept: 'application/json;odata=nometadata',
|
|
50
|
+
'content-Type': 'application/json'
|
|
47
51
|
},
|
|
48
|
-
|
|
52
|
+
responseType: 'json',
|
|
53
|
+
data: {
|
|
54
|
+
sphSiteUrl: args.options.siteUrl
|
|
55
|
+
}
|
|
49
56
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (response.ErrorInfo) {
|
|
54
|
-
throw response.ErrorInfo.ErrorMessage;
|
|
57
|
+
if (args.options.vivaConnectionsDefaultStart !== undefined) {
|
|
58
|
+
requestOptions.url += '/SetSPHSiteWithConfiguration';
|
|
59
|
+
requestOptions.data.configuration = { vivaConnectionsDefaultStart: args.options.vivaConnectionsDefaultStart };
|
|
55
60
|
}
|
|
56
61
|
else {
|
|
57
|
-
|
|
62
|
+
requestOptions.url += '/SetSPHSite';
|
|
58
63
|
}
|
|
64
|
+
const res = yield request_1.default.post(requestOptions);
|
|
65
|
+
logger.log(res.value);
|
|
59
66
|
}
|
|
60
67
|
catch (err) {
|
|
61
|
-
this.
|
|
68
|
+
this.handleRejectedODataJsonPromise(err);
|
|
62
69
|
}
|
|
63
70
|
});
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
|
-
_SpoHomeSiteSetCommand_instances = new WeakSet(),
|
|
73
|
+
_SpoHomeSiteSetCommand_instances = new WeakSet(), _SpoHomeSiteSetCommand_initTelemetry = function _SpoHomeSiteSetCommand_initTelemetry() {
|
|
74
|
+
this.telemetry.push((args) => {
|
|
75
|
+
Object.assign(this.telemetryProperties, {
|
|
76
|
+
vivaConnectionsDefaultStart: typeof args.options.vivaConnectionsDefaultStart !== 'undefined'
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}, _SpoHomeSiteSetCommand_initOptions = function _SpoHomeSiteSetCommand_initOptions() {
|
|
67
80
|
this.options.unshift({
|
|
68
81
|
option: '-u, --siteUrl <siteUrl>'
|
|
82
|
+
}, {
|
|
83
|
+
option: '--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]',
|
|
84
|
+
autocomplete: ['true', 'false']
|
|
69
85
|
});
|
|
70
86
|
}, _SpoHomeSiteSetCommand_initValidators = function _SpoHomeSiteSetCommand_initValidators() {
|
|
71
87
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return validation_1.validation.isValidSharePointUrl(args.options.siteUrl); }));
|
|
88
|
+
}, _SpoHomeSiteSetCommand_initTypes = function _SpoHomeSiteSetCommand_initTypes() {
|
|
89
|
+
this.types.boolean.push('vivaConnectionsDefaultStart');
|
|
72
90
|
};
|
|
73
91
|
module.exports = new SpoHomeSiteSetCommand();
|
|
74
92
|
//# sourceMappingURL=homesite-set.js.map
|
|
@@ -41,8 +41,8 @@ class SpoTenantRecycleBinItemRemoveCommand extends SpoCommand_1.default {
|
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const removeDeletedSite = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
try {
|
|
44
|
-
|
|
45
|
-
const res = yield spo_1.spo.ensureFormDigest(
|
|
44
|
+
this.spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
45
|
+
const res = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
|
|
46
46
|
if (this.verbose) {
|
|
47
47
|
logger.logToStderr(`Removing deleted site collection ${args.options.siteUrl}...`);
|
|
48
48
|
}
|
|
@@ -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) {
|
|
@@ -35,11 +35,12 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
35
35
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args) {
|
|
38
|
-
var _a, _b;
|
|
38
|
+
var _a, _b, _c;
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const endpoint = `${this.resource}/v1.0`;
|
|
41
41
|
try {
|
|
42
42
|
const listId = yield this.getTodoListId(args);
|
|
43
|
+
const status = args.options.status && TodoTaskAddCommand.allowedStatuses.filter(x => x.toLowerCase() === args.options.status.toLowerCase())[0];
|
|
43
44
|
const requestOptions = {
|
|
44
45
|
url: `${endpoint}/me/todo/lists/${listId}/tasks`,
|
|
45
46
|
headers: {
|
|
@@ -54,7 +55,11 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
54
55
|
},
|
|
55
56
|
importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
|
|
56
57
|
dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
|
|
57
|
-
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
|
|
58
|
+
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime),
|
|
59
|
+
categories: (_c = args.options.categories) === null || _c === void 0 ? void 0 : _c.split(','),
|
|
60
|
+
completedDateTime: this.getDateTimeTimeZone(args.options.completedDateTime),
|
|
61
|
+
startDateTime: this.getDateTimeTimeZone(args.options.startDateTime),
|
|
62
|
+
status: status
|
|
58
63
|
},
|
|
59
64
|
responseType: 'json'
|
|
60
65
|
};
|
|
@@ -105,7 +110,11 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
105
110
|
bodyContentType: args.options.bodyContentType,
|
|
106
111
|
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
107
112
|
importance: args.options.importance,
|
|
108
|
-
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
113
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined',
|
|
114
|
+
categories: typeof args.options.categories !== 'undefined',
|
|
115
|
+
completedDateTime: typeof args.options.completedDateTime !== 'undefined',
|
|
116
|
+
startDateTime: typeof args.options.startDateTime !== 'undefined',
|
|
117
|
+
status: typeof args.options.status !== 'undefined'
|
|
109
118
|
});
|
|
110
119
|
});
|
|
111
120
|
}, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
|
|
@@ -127,9 +136,19 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
127
136
|
autocomplete: ['low', 'normal', 'high']
|
|
128
137
|
}, {
|
|
129
138
|
option: '--reminderDateTime [reminderDateTime]'
|
|
139
|
+
}, {
|
|
140
|
+
option: '--categories [categories]'
|
|
141
|
+
}, {
|
|
142
|
+
option: '--completedDateTime [completedDateTime]'
|
|
143
|
+
}, {
|
|
144
|
+
option: '--startDateTime [startDateTime]'
|
|
145
|
+
}, {
|
|
146
|
+
option: '--status [status]',
|
|
147
|
+
autocomplete: TodoTaskAddCommand.allowedStatuses
|
|
130
148
|
});
|
|
131
149
|
}, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
|
|
132
150
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
var _a;
|
|
133
152
|
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
134
153
|
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
135
154
|
}
|
|
@@ -142,10 +161,23 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
142
161
|
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
143
162
|
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
144
163
|
}
|
|
164
|
+
if (args.options.completedDateTime && !validation_1.validation.isValidISODateTime(args.options.completedDateTime)) {
|
|
165
|
+
return `'${args.options.completedDateTime}' is not a valid datetime.`;
|
|
166
|
+
}
|
|
167
|
+
if (args.options.startDateTime && !validation_1.validation.isValidISODateTime(args.options.startDateTime)) {
|
|
168
|
+
return `'${args.options.startDateTime}' is not a valid datetime.`;
|
|
169
|
+
}
|
|
170
|
+
if (args.options.status && TodoTaskAddCommand.allowedStatuses.map(x => x.toLowerCase()).indexOf(args.options.status.toLowerCase()) === -1) {
|
|
171
|
+
return `${args.options.status} is not a valid value for status. Valid values are ${TodoTaskAddCommand.allowedStatuses.join(', ')}`;
|
|
172
|
+
}
|
|
173
|
+
if (args.options.completedDateTime && ((_a = args.options.status) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'completed') {
|
|
174
|
+
return `The completedDateTime option can only be used when the status option is set to completed`;
|
|
175
|
+
}
|
|
145
176
|
return true;
|
|
146
177
|
}));
|
|
147
178
|
}, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
|
|
148
179
|
this.optionSets.push({ options: ['listId', 'listName'] });
|
|
149
180
|
};
|
|
181
|
+
TodoTaskAddCommand.allowedStatuses = ['notStarted', 'inProgress', 'completed', 'waitingOnOthers', 'deferred'];
|
|
150
182
|
module.exports = new TodoTaskAddCommand();
|
|
151
183
|
//# sourceMappingURL=task-add.js.map
|
|
@@ -108,6 +108,15 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
108
108
|
if (options.reminderDateTime) {
|
|
109
109
|
requestBody.reminderDateTime = this.getDateTimeTimeZone(options.reminderDateTime);
|
|
110
110
|
}
|
|
111
|
+
if (options.categories) {
|
|
112
|
+
requestBody.categories = options.categories.split(',');
|
|
113
|
+
}
|
|
114
|
+
if (options.completedDateTime) {
|
|
115
|
+
requestBody.completedDateTime = this.getDateTimeTimeZone(options.completedDateTime);
|
|
116
|
+
}
|
|
117
|
+
if (options.startDateTime) {
|
|
118
|
+
requestBody.startDateTime = this.getDateTimeTimeZone(options.startDateTime);
|
|
119
|
+
}
|
|
111
120
|
return requestBody;
|
|
112
121
|
}
|
|
113
122
|
}
|
|
@@ -122,7 +131,10 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
122
131
|
bodyContentType: args.options.bodyContentType,
|
|
123
132
|
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
124
133
|
importance: args.options.importance,
|
|
125
|
-
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
134
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined',
|
|
135
|
+
categories: typeof args.options.categories !== 'undefined',
|
|
136
|
+
completedDateTime: typeof args.options.completedDateTime !== 'undefined',
|
|
137
|
+
startDateTime: typeof args.options.startDateTime !== 'undefined'
|
|
126
138
|
});
|
|
127
139
|
});
|
|
128
140
|
}, _TodoTaskSetCommand_initOptions = function _TodoTaskSetCommand_initOptions() {
|
|
@@ -149,6 +161,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
149
161
|
autocomplete: ['low', 'normal', 'high']
|
|
150
162
|
}, {
|
|
151
163
|
option: '--reminderDateTime [reminderDateTime]'
|
|
164
|
+
}, {
|
|
165
|
+
option: '--categories [categories]'
|
|
166
|
+
}, {
|
|
167
|
+
option: '--completedDateTime [completedDateTime]'
|
|
168
|
+
}, {
|
|
169
|
+
option: '--startDateTime [startDateTime]'
|
|
152
170
|
});
|
|
153
171
|
}, _TodoTaskSetCommand_initValidators = function _TodoTaskSetCommand_initValidators() {
|
|
154
172
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -172,6 +190,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
172
190
|
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
173
191
|
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
174
192
|
}
|
|
193
|
+
if (args.options.completedDateTime && !validation_1.validation.isValidISODateTime(args.options.completedDateTime)) {
|
|
194
|
+
return `'${args.options.completedDateTime}' is not a valid datetime.`;
|
|
195
|
+
}
|
|
196
|
+
if (args.options.startDateTime && !validation_1.validation.isValidISODateTime(args.options.startDateTime)) {
|
|
197
|
+
return `'${args.options.startDateTime}' is not a valid datetime.`;
|
|
198
|
+
}
|
|
175
199
|
return true;
|
|
176
200
|
}));
|
|
177
201
|
}, _TodoTaskSetCommand_initOptionSets = function _TodoTaskSetCommand_initOptionSets() {
|
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;
|
package/dist/utils/validation.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.validation = {
|
|
|
11
11
|
}
|
|
12
12
|
const guidRegEx = new RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
|
|
13
13
|
// verify if the guid is a valid guid. @meid will be replaced in a later stage with the actual user id of the logged in user
|
|
14
|
-
return guidRegEx.test(guid) || guid.
|
|
14
|
+
return guidRegEx.test(guid) || guid.toLowerCase().trim() === '@meid';
|
|
15
15
|
},
|
|
16
16
|
isValidTeamsChannelId(guid) {
|
|
17
17
|
const guidRegEx = new RegExp(/^19:[0-9a-zA-Z-_]+@thread\.(skype|tacv2)$/i);
|
|
@@ -23,7 +23,8 @@ exports.validation = {
|
|
|
23
23
|
},
|
|
24
24
|
isValidUserPrincipalName(upn) {
|
|
25
25
|
const upnRegEx = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/i);
|
|
26
|
-
|
|
26
|
+
// verify if the upn is a valid upn. @meusername will be replaced in a later stage with the actual username of the logged in user
|
|
27
|
+
return upnRegEx.test(upn) || upn.toLowerCase().trim() === '@meusername';
|
|
27
28
|
},
|
|
28
29
|
isDateInRange(date, monthOffset) {
|
|
29
30
|
const d = new Date(date);
|
|
@@ -77,7 +77,7 @@ If you don't use the manifest, you must specify the name of the Azure AD app reg
|
|
|
77
77
|
|
|
78
78
|
You can also use the manifest to provision some of the configuration settings of your Azure AD app. All properties specified in the manifest are optional and will set if specified.
|
|
79
79
|
|
|
80
|
-
If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be
|
|
80
|
+
If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be overridden by the `displayName` property from the manifest if specified.
|
|
81
81
|
|
|
82
82
|
The following properties specified in the manifest retrieved from Azure AD are not supported by this command:
|
|
83
83
|
|
|
@@ -137,7 +137,7 @@ Create new Azure AD app registration with an auto-generated secret (secret retur
|
|
|
137
137
|
m365 aad app add --name 'My AAD app' --withSecret
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
Create new Azure AD app registration for a
|
|
140
|
+
Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions
|
|
141
141
|
|
|
142
142
|
```sh
|
|
143
143
|
m365 aad app add --name 'My AAD app' --withSecret --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All,https://graph.microsoft.com/Directory.Read.All'
|
|
@@ -161,7 +161,7 @@ Create new Azure AD app registration with Application ID URI set to a value that
|
|
|
161
161
|
m365 aad app add --name 'My AAD app' --uri api://caf406b91cd4.ngrok.io/_appId_ --scopeName access_as_user --scopeAdminConsentDescription 'Access as a user' --scopeAdminConsentDisplayName 'Access as a user' --scopeConsentBy adminsAndUsers
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
Create new Azure AD app registration for a
|
|
164
|
+
Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions, including admin consent
|
|
165
165
|
|
|
166
166
|
```sh
|
|
167
167
|
m365 aad app add --name 'My AAD app' --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All' --grantAdminConsent
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# flow owner
|
|
1
|
+
# flow owner ensure
|
|
2
2
|
|
|
3
|
-
Assigns permissions to a Power Automate flow
|
|
3
|
+
Assigns/updates permissions to a Power Automate flow
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
m365 flow owner
|
|
8
|
+
m365 flow owner ensure [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Options
|
|
@@ -41,19 +41,19 @@ m365 flow owner add [options]
|
|
|
41
41
|
Assign owner permissions to a specific Power Automate flow for a user with ID
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
|
-
m365 flow owner
|
|
44
|
+
m365 flow owner ensure --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Assign owner permissions to a specific Power Automate flow for a user with UPN
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
m365 flow owner
|
|
50
|
+
m365 flow owner ensure --userName "john.doe@contoso.com" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Assign owner permissions to a specific Power Automate flow for a group
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
|
-
m365 flow owner
|
|
56
|
+
m365 flow owner ensure --groupId 8d4d9f32-1ab0-4f81-9054-efbb1759e8e6 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
## Response
|
|
@@ -29,13 +29,13 @@ m365 spfx project upgrade [options]
|
|
|
29
29
|
|
|
30
30
|
## Remarks
|
|
31
31
|
|
|
32
|
-
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.
|
|
32
|
+
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.17.0).
|
|
33
33
|
|
|
34
34
|
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.
|
|
35
35
|
|
|
36
36
|
!!! important
|
|
37
37
|
Run this command in the folder where the project that you want to upgrade is located. This command doesn't change your project files.
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
## Examples
|
|
40
40
|
|
|
41
41
|
Get instructions to upgrade the current SharePoint Framework project to SharePoint Framework version 1.5.0 and save the findings in a Markdown file
|
|
@@ -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
|
+
```
|