@pnp/cli-microsoft365 6.11.0-beta.ee225fb → 6.11.0
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/Auth.js +2 -1
- package/dist/Command.js +1 -1
- package/dist/m365/pa/commands/app/app-permission-ensure.js +177 -0
- package/dist/m365/pa/commands/app/app-permission-remove.js +170 -0
- package/dist/m365/pa/commands.js +2 -0
- package/dist/m365/planner/commands/task/task-add.js +17 -11
- package/dist/m365/planner/commands/task/task-get.js +35 -25
- package/dist/m365/planner/commands/task/task-list.js +26 -19
- package/dist/m365/planner/commands/task/task-remove.js +40 -35
- package/dist/m365/planner/commands/task/task-set.js +35 -23
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +58 -0
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +34 -23
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +171 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +3 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +35 -51
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +26 -14
- package/dist/m365/spo/commands/app/app-add.js +9 -9
- package/dist/m365/spo/commands/file/file-add.js +13 -13
- package/dist/m365/spo/commands/file/file-checkin.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout.js +1 -1
- package/dist/m365/spo/commands/file/file-copy.js +38 -4
- package/dist/m365/spo/commands/file/file-list.js +4 -4
- package/dist/m365/spo/commands/file/file-move.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +6 -6
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-add.js +2 -4
- package/dist/m365/spo/commands/folder/folder-get.js +1 -1
- package/dist/m365/spo/commands/folder/folder-list.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
- package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-list.js +0 -1
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +32 -3
- package/dist/m365/spo/commands/page/Page.js +24 -32
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +75 -54
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +41 -40
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +32 -32
- package/dist/m365/spo/commands/site/FlowsPolicy.js +10 -0
- package/dist/m365/spo/commands/site/site-add.js +113 -154
- package/dist/m365/spo/commands/site/site-apppermission-add.js +26 -27
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +37 -37
- package/dist/m365/spo/commands/site/site-apppermission-set.js +15 -16
- package/dist/m365/spo/commands/site/site-ensure.js +19 -70
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +24 -22
- package/dist/m365/spo/commands/site/site-list.js +28 -36
- package/dist/m365/spo/commands/site/site-remove.js +139 -171
- package/dist/m365/spo/commands/site/site-set.js +179 -178
- package/dist/m365/spo/commands/theme/theme-remove.js +26 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +29 -27
- package/dist/m365/spo/commands/web/web-reindex.js +17 -20
- package/dist/m365/spo/commands/web/web-remove.js +23 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +45 -52
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +58 -61
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +20 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +21 -19
- package/dist/m365/yammer/commands/message/message-like-set.js +29 -28
- package/dist/m365/yammer/commands/message/message-list.js +9 -26
- package/dist/m365/yammer/commands/message/message-remove.js +20 -18
- package/dist/m365/yammer/commands/yammer-search.js +42 -56
- package/dist/utils/aadGroup.js +20 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/spo.js +601 -1
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/npm-shrinkwrap.json +698 -345
- package/package.json +16 -15
|
@@ -35,24 +35,8 @@ class YammerMessageRemoveCommand extends YammerCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const removeMessage = () => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
try {
|
|
40
|
-
const requestOptions = {
|
|
41
|
-
url: `${this.resource}/v1/messages/${args.options.id}.json`,
|
|
42
|
-
headers: {
|
|
43
|
-
accept: 'application/json;odata.metadata=none',
|
|
44
|
-
'content-type': 'application/json;odata=nometadata'
|
|
45
|
-
},
|
|
46
|
-
responseType: 'json'
|
|
47
|
-
};
|
|
48
|
-
yield request_1.default.delete(requestOptions);
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
this.handleRejectedODataJsonPromise(err);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
38
|
if (args.options.confirm) {
|
|
55
|
-
yield removeMessage();
|
|
39
|
+
yield this.removeMessage(args.options);
|
|
56
40
|
}
|
|
57
41
|
else {
|
|
58
42
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -62,11 +46,29 @@ class YammerMessageRemoveCommand extends YammerCommand_1.default {
|
|
|
62
46
|
message: `Are you sure you want to remove the Yammer message ${args.options.id}?`
|
|
63
47
|
});
|
|
64
48
|
if (result.continue) {
|
|
65
|
-
yield removeMessage();
|
|
49
|
+
yield this.removeMessage(args.options);
|
|
66
50
|
}
|
|
67
51
|
}
|
|
68
52
|
});
|
|
69
53
|
}
|
|
54
|
+
removeMessage(options) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
try {
|
|
57
|
+
const requestOptions = {
|
|
58
|
+
url: `${this.resource}/v1/messages/${options.id}.json`,
|
|
59
|
+
headers: {
|
|
60
|
+
accept: 'application/json;odata.metadata=none',
|
|
61
|
+
'content-type': 'application/json;odata=nometadata'
|
|
62
|
+
},
|
|
63
|
+
responseType: 'json'
|
|
64
|
+
};
|
|
65
|
+
yield request_1.default.delete(requestOptions);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
this.handleRejectedODataJsonPromise(err);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
70
72
|
}
|
|
71
73
|
_YammerMessageRemoveCommand_instances = new WeakSet(), _YammerMessageRemoveCommand_initTelemetry = function _YammerMessageRemoveCommand_initTelemetry() {
|
|
72
74
|
this.telemetry.push((args) => {
|
|
@@ -45,7 +45,7 @@ class YammerSearchCommand extends YammerCommand_1.default {
|
|
|
45
45
|
__classPrivateFieldGet(this, _YammerSearchCommand_instances, "m", _YammerSearchCommand_initValidators).call(this);
|
|
46
46
|
}
|
|
47
47
|
getAllItems(logger, args, page) {
|
|
48
|
-
return
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
49
|
const endpoint = `${this.resource}/v1/search.json?search=${formatting_1.formatting.encodeQueryParameter(args.options.queryText)}&page=${page}`;
|
|
50
50
|
const requestOptions = {
|
|
51
51
|
url: endpoint,
|
|
@@ -54,65 +54,51 @@ class YammerSearchCommand extends YammerCommand_1.default {
|
|
|
54
54
|
accept: 'application/json;odata=nometadata'
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
request_1.default
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
this.messages = this.messages.
|
|
75
|
-
if (args.options.limit && this.messages.length > args.options.limit) {
|
|
76
|
-
this.messages = this.messages.slice(0, args.options.limit);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (resultTopics.length > 0) {
|
|
80
|
-
this.topics = this.topics.concat(resultTopics);
|
|
81
|
-
if (args.options.limit && this.topics.length > args.options.limit) {
|
|
82
|
-
this.topics = this.topics.slice(0, args.options.limit);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (resultGroups.length > 0) {
|
|
86
|
-
this.groups = this.groups.concat(resultGroups);
|
|
87
|
-
if (args.options.limit && this.groups.length > args.options.limit) {
|
|
88
|
-
this.groups = this.groups.slice(0, args.options.limit);
|
|
89
|
-
}
|
|
57
|
+
const results = yield request_1.default.get(requestOptions);
|
|
58
|
+
// results count should only read once
|
|
59
|
+
if (page === 1) {
|
|
60
|
+
this.summary = {
|
|
61
|
+
messages: results.count.messages,
|
|
62
|
+
topics: results.count.topics,
|
|
63
|
+
users: results.count.users,
|
|
64
|
+
groups: results.count.groups
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const resultMessages = results.messages.messages;
|
|
68
|
+
const resultTopics = results.topics;
|
|
69
|
+
const resultGroups = results.groups;
|
|
70
|
+
const resultUsers = results.users;
|
|
71
|
+
if (resultMessages.length > 0) {
|
|
72
|
+
this.messages = this.messages.concat(resultMessages);
|
|
73
|
+
if (args.options.limit && this.messages.length > args.options.limit) {
|
|
74
|
+
this.messages = this.messages.slice(0, args.options.limit);
|
|
90
75
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
}
|
|
77
|
+
if (resultTopics.length > 0) {
|
|
78
|
+
this.topics = this.topics.concat(resultTopics);
|
|
79
|
+
if (args.options.limit && this.topics.length > args.options.limit) {
|
|
80
|
+
this.topics = this.topics.slice(0, args.options.limit);
|
|
96
81
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this
|
|
103
|
-
.getAllItems(logger, args, ++page)
|
|
104
|
-
.then(() => {
|
|
105
|
-
resolve();
|
|
106
|
-
}, (err) => {
|
|
107
|
-
reject(err);
|
|
108
|
-
});
|
|
82
|
+
}
|
|
83
|
+
if (resultGroups.length > 0) {
|
|
84
|
+
this.groups = this.groups.concat(resultGroups);
|
|
85
|
+
if (args.options.limit && this.groups.length > args.options.limit) {
|
|
86
|
+
this.groups = this.groups.slice(0, args.options.limit);
|
|
109
87
|
}
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
}
|
|
89
|
+
if (resultUsers.length > 0) {
|
|
90
|
+
this.users = this.users.concat(resultUsers);
|
|
91
|
+
if (args.options.limit && this.users.length > args.options.limit) {
|
|
92
|
+
this.users = this.users.slice(0, args.options.limit);
|
|
112
93
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
}
|
|
95
|
+
const continueProcessing = resultMessages.length === 20 ||
|
|
96
|
+
resultUsers.length === 20 ||
|
|
97
|
+
resultGroups.length === 20 ||
|
|
98
|
+
resultTopics.length === 20;
|
|
99
|
+
if (continueProcessing) {
|
|
100
|
+
yield this.getAllItems(logger, args, ++page);
|
|
101
|
+
}
|
|
116
102
|
});
|
|
117
103
|
}
|
|
118
104
|
commandAction(logger, args) {
|
package/dist/utils/aadGroup.js
CHANGED
|
@@ -71,6 +71,26 @@ exports.aadGroup = {
|
|
|
71
71
|
}
|
|
72
72
|
return groups[0].id;
|
|
73
73
|
});
|
|
74
|
+
},
|
|
75
|
+
setGroup(id, isPrivate, logger, verbose) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (verbose && logger) {
|
|
78
|
+
logger.logToStderr(`Updating Microsoft 365 Group ${id}...`);
|
|
79
|
+
}
|
|
80
|
+
const update = {};
|
|
81
|
+
if (typeof isPrivate !== 'undefined') {
|
|
82
|
+
update.visibility = isPrivate ? 'Private' : 'Public';
|
|
83
|
+
}
|
|
84
|
+
const requestOptions = {
|
|
85
|
+
url: `${graphResource}/v1.0/groups/${id}`,
|
|
86
|
+
headers: {
|
|
87
|
+
'accept': 'application/json;odata.metadata=none'
|
|
88
|
+
},
|
|
89
|
+
responseType: 'json',
|
|
90
|
+
data: update
|
|
91
|
+
};
|
|
92
|
+
yield request_1.default.patch(requestOptions);
|
|
93
|
+
});
|
|
74
94
|
}
|
|
75
95
|
};
|
|
76
96
|
//# sourceMappingURL=aadGroup.js.map
|
package/dist/utils/fsUtil.js
CHANGED
|
@@ -99,6 +99,11 @@ exports.fsUtil = {
|
|
|
99
99
|
},
|
|
100
100
|
getRemoveCommand(command, shell) {
|
|
101
101
|
return removeFileCommands[shell][command];
|
|
102
|
+
},
|
|
103
|
+
ensureDirectory(path) {
|
|
104
|
+
if (!fs.existsSync(path)) {
|
|
105
|
+
fs.mkdirSync(path, { recursive: true });
|
|
106
|
+
}
|
|
102
107
|
}
|
|
103
108
|
};
|
|
104
109
|
//# sourceMappingURL=fsUtil.js.map
|