@pnp/cli-microsoft365 5.0.0-beta.a08b7b0 → 5.0.0-beta.a1bb50f
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/devcontainer.json +9 -1
- package/.eslintrc.js +1 -0
- package/README.md +1 -1
- package/dist/Utils.js +3 -0
- package/dist/appInsights.js +5 -2
- package/dist/cli/Cli.js +22 -3
- package/dist/m365/aad/commands/app/app-add.js +58 -5
- package/dist/m365/aad/commands/app/app-get.js +97 -0
- package/dist/m365/aad/commands/group/group-list.js +41 -0
- package/dist/m365/aad/commands/o365group/{GroupUser.js → GroupExtended.js} +1 -1
- package/dist/m365/aad/commands/o365group/o365group-add.js +56 -50
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +3 -3
- package/dist/m365/aad/commands/user/user-get.js +33 -6
- package/dist/m365/aad/commands/user/user-password-validate.js +42 -0
- package/dist/m365/aad/commands.js +3 -0
- package/dist/m365/app/commands/permission/permission-list.js +266 -0
- package/dist/m365/app/commands.js +7 -0
- package/dist/m365/base/AppCommand.js +76 -0
- package/dist/m365/{aad/commands/o365group/Group.js → base/M365RcJson.js} +1 -1
- package/dist/m365/cli/commands/cli-doctor.js +2 -0
- package/dist/m365/file/commands/file-list.js +181 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/pa/cds-project-mutator.js +1 -1
- package/dist/m365/pa/commands/app/app-list.js +28 -1
- package/dist/m365/planner/commands/task/task-add.js +288 -0
- package/dist/m365/planner/commands.js +1 -0
- package/dist/m365/search/commands/externalconnection/externalconnection-add.js +99 -0
- package/dist/m365/search/commands.js +7 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +63 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +60 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.1.js +53 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0-beta.4.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +17 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +19 -0
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +52 -0
- package/dist/m365/spo/commands/list/list-get.js +6 -2
- package/dist/m365/spo/commands/page/Page.js +3 -1
- package/dist/m365/spo/commands/page/page-add.js +7 -10
- package/dist/m365/spo/commands/page/page-set.js +7 -10
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +48 -0
- package/dist/m365/spo/commands.js +3 -1
- package/dist/m365/teams/commands/message/message-get.js +1 -1
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +1 -1
- package/dist/request.js +9 -4
- package/docs/docs/cmd/_global.md +2 -2
- package/docs/docs/cmd/aad/app/app-add.md +11 -0
- package/docs/docs/cmd/aad/app/app-get.md +48 -0
- package/docs/docs/cmd/aad/group/group-list.md +21 -0
- package/docs/docs/cmd/aad/o365group/o365group-add.md +1 -0
- package/docs/docs/cmd/aad/user/user-get.md +13 -4
- package/docs/docs/cmd/aad/user/user-password-validate.md +29 -0
- package/docs/docs/cmd/app/permission/permission-list.md +36 -0
- package/docs/docs/cmd/file/file-list.md +46 -0
- package/docs/docs/cmd/pa/app/app-list.md +17 -1
- package/docs/docs/cmd/planner/task/task-add.md +78 -0
- package/docs/docs/cmd/search/externalconnection/externalconnection-add.md +43 -0
- package/docs/docs/cmd/spfx/project/project-externalize.md +1 -1
- package/docs/docs/cmd/spfx/project/project-rename.md +1 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-list.md +33 -0
- package/docs/docs/cmd/spo/list/list-get.md +9 -0
- package/docs/docs/cmd/spo/page/page-add.md +2 -2
- package/docs/docs/cmd/spo/page/page-set.md +3 -3
- package/docs/docs/cmd/spo/web/web-installedlanguage-list.md +24 -0
- package/docs/docs/cmd/teams/message/message-get.md +0 -3
- package/docs/docs/cmd/teams/report/report-directroutingcalls.md +0 -3
- package/npm-shrinkwrap.json +768 -976
- package/package.json +27 -21
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_microsoft_sp_core_library");
|
|
4
|
+
const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
|
|
5
|
+
const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
|
|
6
|
+
const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
|
|
7
|
+
const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
|
|
8
|
+
const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
|
|
9
|
+
const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
|
|
10
|
+
const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
|
|
11
|
+
const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
|
|
12
|
+
const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
|
|
13
|
+
const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
|
|
14
|
+
const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
|
|
15
|
+
const FN001026_DEP_microsoft_sp_extension_base_1 = require("./rules/FN001026_DEP_microsoft_sp_extension_base");
|
|
16
|
+
const FN001027_DEP_microsoft_sp_http_1 = require("./rules/FN001027_DEP_microsoft_sp_http");
|
|
17
|
+
const FN001028_DEP_microsoft_sp_list_subscription_1 = require("./rules/FN001028_DEP_microsoft_sp_list_subscription");
|
|
18
|
+
const FN001029_DEP_microsoft_sp_loader_1 = require("./rules/FN001029_DEP_microsoft_sp_loader");
|
|
19
|
+
const FN001030_DEP_microsoft_sp_module_interfaces_1 = require("./rules/FN001030_DEP_microsoft_sp_module_interfaces");
|
|
20
|
+
const FN001031_DEP_microsoft_sp_odata_types_1 = require("./rules/FN001031_DEP_microsoft_sp_odata_types");
|
|
21
|
+
const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_microsoft_sp_page_context");
|
|
22
|
+
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
23
|
+
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
24
|
+
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
25
|
+
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
26
|
+
const FN006005_CFG_PS_metadata_1 = require("./rules/FN006005_CFG_PS_metadata");
|
|
27
|
+
const FN006006_CFG_PS_features_1 = require("./rules/FN006006_CFG_PS_features");
|
|
28
|
+
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
29
|
+
module.exports = [
|
|
30
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.14.0-beta.4'),
|
|
31
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.14.0-beta.4'),
|
|
32
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.14.0-beta.4'),
|
|
33
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.14.0-beta.4'),
|
|
34
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.14.0-beta.4'),
|
|
35
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.14.0-beta.4'),
|
|
36
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.14.0-beta.4'),
|
|
37
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.14.0-beta.4'),
|
|
38
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.14.0-beta.4'),
|
|
39
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.14.0-beta.4'),
|
|
40
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.14.0-beta.4'),
|
|
41
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.14.0-beta.4'),
|
|
42
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.14.0-beta.4'),
|
|
43
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.14.0-beta.4'),
|
|
44
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.14.0-beta.4'),
|
|
45
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.14.0-beta.4'),
|
|
46
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
|
|
47
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.14.0-beta.4'),
|
|
48
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.14.0-beta.4'),
|
|
49
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0-beta.4'),
|
|
50
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0-beta.4'),
|
|
51
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0-beta.4'),
|
|
52
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0-beta.4'),
|
|
53
|
+
new FN006005_CFG_PS_metadata_1.FN006005_CFG_PS_metadata(),
|
|
54
|
+
new FN006006_CFG_PS_features_1.FN006006_CFG_PS_features(),
|
|
55
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.14.0-beta.4')
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=upgrade-1.14.0-beta.4.js.map
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path = require("path");
|
|
6
|
+
// uncomment to support upgrading to preview releases
|
|
7
|
+
const semver_1 = require("semver");
|
|
6
8
|
const Command_1 = require("../../../../Command");
|
|
7
9
|
const commands_1 = require("../../commands");
|
|
8
10
|
const base_project_command_1 = require("./base-project-command");
|
|
@@ -41,7 +43,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
41
43
|
'1.11.0',
|
|
42
44
|
'1.12.0',
|
|
43
45
|
'1.12.1',
|
|
44
|
-
'1.13.0'
|
|
46
|
+
'1.13.0',
|
|
47
|
+
'1.13.1',
|
|
48
|
+
'1.14.0-beta.4'
|
|
45
49
|
];
|
|
46
50
|
}
|
|
47
51
|
get name() {
|
|
@@ -54,9 +58,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
54
58
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
55
59
|
telemetryProps.toVersion = args.options.toVersion || this.supportedVersions[this.supportedVersions.length - 1];
|
|
56
60
|
// uncomment to support upgrading to preview releases
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
if ((0, semver_1.prerelease)(telemetryProps.toVersion) && !args.options.preview) {
|
|
62
|
+
telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
63
|
+
}
|
|
60
64
|
telemetryProps.packageManager = args.options.packageManager || 'npm';
|
|
61
65
|
telemetryProps.shell = args.options.shell || 'bash';
|
|
62
66
|
telemetryProps.preview = args.options.preview;
|
|
@@ -70,15 +74,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
70
74
|
}
|
|
71
75
|
this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
|
|
72
76
|
// uncomment to support upgrading to preview releases
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
if (!args.options.toVersion &&
|
|
78
|
+
!args.options.preview &&
|
|
79
|
+
(0, semver_1.prerelease)(this.toVersion)) {
|
|
80
|
+
// no version and no preview specified while the current version to
|
|
81
|
+
// upgrade to is a prerelease so let's grab the first non-preview version
|
|
82
|
+
// since we're supporting only one preview version, it's sufficient for
|
|
83
|
+
// us to take second to last version
|
|
84
|
+
this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
|
|
85
|
+
}
|
|
82
86
|
this.packageManager = args.options.packageManager || 'npm';
|
|
83
87
|
this.shell = args.options.shell || 'bash';
|
|
84
88
|
if (this.supportedVersions.indexOf(this.toVersion) < 0) {
|
|
@@ -433,6 +433,25 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
433
433
|
range: '^4',
|
|
434
434
|
fix: 'npm i -g yo@4'
|
|
435
435
|
}
|
|
436
|
+
},
|
|
437
|
+
'1.13.1': {
|
|
438
|
+
gulp: {
|
|
439
|
+
range: '^4',
|
|
440
|
+
fix: 'npm i -g gulp@4'
|
|
441
|
+
},
|
|
442
|
+
node: {
|
|
443
|
+
range: '^12 || ^14',
|
|
444
|
+
fix: 'Install Node.js v12 or v14'
|
|
445
|
+
},
|
|
446
|
+
react: {
|
|
447
|
+
range: '16.9.0',
|
|
448
|
+
fix: 'npm i react@16.9.0'
|
|
449
|
+
},
|
|
450
|
+
sp: SharePointVersion.SPO,
|
|
451
|
+
yo: {
|
|
452
|
+
range: '^4',
|
|
453
|
+
fix: 'npm i -g yo@4'
|
|
454
|
+
}
|
|
436
455
|
}
|
|
437
456
|
};
|
|
438
457
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class SpoContentTypeListCommand extends SpoCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.CONTENTTYPE_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists all available content types in the specified site';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['StringId', 'Name', 'Hidden', 'ReadOnly', 'Sealed'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
let requestUrl = `${args.options.webUrl}/_api/web/ContentTypes`;
|
|
18
|
+
if (args.options.category) {
|
|
19
|
+
requestUrl += `?$filter=Group eq '${encodeURIComponent(args.options.category)}'`;
|
|
20
|
+
}
|
|
21
|
+
const requestOptions = {
|
|
22
|
+
url: requestUrl,
|
|
23
|
+
headers: {
|
|
24
|
+
accept: 'application/json;odata=nometadata'
|
|
25
|
+
},
|
|
26
|
+
responseType: 'json'
|
|
27
|
+
};
|
|
28
|
+
request_1.default
|
|
29
|
+
.get(requestOptions)
|
|
30
|
+
.then((res) => {
|
|
31
|
+
logger.log(res.value);
|
|
32
|
+
cb();
|
|
33
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
34
|
+
}
|
|
35
|
+
options() {
|
|
36
|
+
const options = [
|
|
37
|
+
{
|
|
38
|
+
option: '-u, --webUrl <webUrl>'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
option: '-c, --category [category]'
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
const parentOptions = super.options();
|
|
45
|
+
return options.concat(parentOptions);
|
|
46
|
+
}
|
|
47
|
+
validate(args) {
|
|
48
|
+
return SpoCommand_1.default.isValidSharePointUrl(args.options.webUrl);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
module.exports = new SpoContentTypeListCommand();
|
|
52
|
+
//# sourceMappingURL=contenttype-list.js.map
|
|
@@ -16,6 +16,7 @@ class SpoListGetCommand extends SpoCommand_1.default {
|
|
|
16
16
|
telemetryProps.id = (!(!args.options.id)).toString();
|
|
17
17
|
telemetryProps.title = (!(!args.options.title)).toString();
|
|
18
18
|
telemetryProps.properties = (!(!args.options.properties)).toString();
|
|
19
|
+
telemetryProps.withPermissions = typeof args.options.withPermissions !== 'undefined';
|
|
19
20
|
return telemetryProps;
|
|
20
21
|
}
|
|
21
22
|
commandAction(logger, args, cb) {
|
|
@@ -29,10 +30,10 @@ class SpoListGetCommand extends SpoCommand_1.default {
|
|
|
29
30
|
else {
|
|
30
31
|
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${encodeURIComponent(args.options.title)}')`;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
let propertiesSelect = args.options.properties ? `?$select=${encodeURIComponent(args.options.properties)}` : ``;
|
|
34
|
+
propertiesSelect += args.options.withPermissions ? `${args.options.properties ? '&' : '?'}$expand=HasUniqueRoleAssignments,RoleAssignments/Member,RoleAssignments/RoleDefinitionBindings` : ``;
|
|
33
35
|
const requestOptions = {
|
|
34
36
|
url: requestUrl + propertiesSelect,
|
|
35
|
-
method: 'GET',
|
|
36
37
|
headers: {
|
|
37
38
|
'accept': 'application/json;odata=nometadata'
|
|
38
39
|
},
|
|
@@ -58,6 +59,9 @@ class SpoListGetCommand extends SpoCommand_1.default {
|
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
option: '-p, --properties [properties]'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
option: '--withPermissions'
|
|
61
65
|
}
|
|
62
66
|
];
|
|
63
67
|
const parentOptions = super.options();
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Page = void 0;
|
|
3
|
+
exports.Page = exports.supportedPromoteAs = exports.supportedPageLayouts = void 0;
|
|
4
4
|
const request_1 = require("../../../../request");
|
|
5
5
|
const Utils_1 = require("../../../../Utils");
|
|
6
6
|
const clientsidepages_1 = require("./clientsidepages");
|
|
7
7
|
const pageMethods_1 = require("./pageMethods");
|
|
8
|
+
exports.supportedPageLayouts = ['Article', 'Home', 'SingleWebPartAppPage', 'RepostPage', 'HeaderlessSearchResults', 'Spaces', 'Topic'];
|
|
9
|
+
exports.supportedPromoteAs = ['HomePage', 'NewsPage', 'Template'];
|
|
8
10
|
class Page {
|
|
9
11
|
static getPage(name, webUrl, logger, debug, verbose) {
|
|
10
12
|
return new Promise((resolve, reject) => {
|
|
@@ -284,11 +284,11 @@ class SpoPageAddCommand extends SpoCommand_1.default {
|
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
option: '-l, --layoutType [layoutType]',
|
|
287
|
-
autocomplete:
|
|
287
|
+
autocomplete: Page_1.supportedPageLayouts
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
option: '-p, --promoteAs [promoteAs]',
|
|
291
|
-
autocomplete:
|
|
291
|
+
autocomplete: Page_1.supportedPromoteAs
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
option: '--commentsEnabled'
|
|
@@ -312,20 +312,17 @@ class SpoPageAddCommand extends SpoCommand_1.default {
|
|
|
312
312
|
return isValidSharePointUrl;
|
|
313
313
|
}
|
|
314
314
|
if (args.options.layoutType &&
|
|
315
|
-
args.options.layoutType
|
|
316
|
-
args.options.layoutType
|
|
317
|
-
return `${args.options.layoutType} is not a valid option for layoutType. Allowed values Article|Home`;
|
|
315
|
+
Page_1.supportedPageLayouts.indexOf(args.options.layoutType) < 0) {
|
|
316
|
+
return `${args.options.layoutType} is not a valid option for layoutType. Allowed values ${Page_1.supportedPageLayouts.join(', ')}`;
|
|
318
317
|
}
|
|
319
318
|
if (args.options.promoteAs &&
|
|
320
|
-
args.options.promoteAs
|
|
321
|
-
args.options.promoteAs
|
|
322
|
-
args.options.promoteAs !== 'Template') {
|
|
323
|
-
return `${args.options.promoteAs} is not a valid option for promoteAs. Allowed values HomePage|NewsPage|Template`;
|
|
319
|
+
Page_1.supportedPromoteAs.indexOf(args.options.promoteAs) < 0) {
|
|
320
|
+
return `${args.options.promoteAs} is not a valid option for promoteAs. Allowed values ${Page_1.supportedPromoteAs.join(', ')}`;
|
|
324
321
|
}
|
|
325
322
|
if (args.options.promoteAs === 'HomePage' && args.options.layoutType !== 'Home') {
|
|
326
323
|
return 'You can only promote home pages as site home page';
|
|
327
324
|
}
|
|
328
|
-
if (args.options.promoteAs === 'NewsPage' && args.options.layoutType
|
|
325
|
+
if (args.options.promoteAs === 'NewsPage' && args.options.layoutType && args.options.layoutType !== 'Article') {
|
|
329
326
|
return 'You can only promote article pages as news article';
|
|
330
327
|
}
|
|
331
328
|
return true;
|
|
@@ -283,11 +283,11 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
option: '-l, --layoutType [layoutType]',
|
|
286
|
-
autocomplete:
|
|
286
|
+
autocomplete: Page_1.supportedPageLayouts
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
option: '-p, --promoteAs [promoteAs]',
|
|
290
|
-
autocomplete:
|
|
290
|
+
autocomplete: Page_1.supportedPromoteAs
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
option: '--commentsEnabled [commentsEnabled]',
|
|
@@ -315,20 +315,17 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
315
315
|
return isValidSharePointUrl;
|
|
316
316
|
}
|
|
317
317
|
if (args.options.layoutType &&
|
|
318
|
-
args.options.layoutType
|
|
319
|
-
args.options.layoutType
|
|
320
|
-
return `${args.options.layoutType} is not a valid option for layoutType. Allowed values Article|Home`;
|
|
318
|
+
Page_1.supportedPageLayouts.indexOf(args.options.layoutType) < 0) {
|
|
319
|
+
return `${args.options.layoutType} is not a valid option for layoutType. Allowed values ${Page_1.supportedPageLayouts.join(', ')}`;
|
|
321
320
|
}
|
|
322
321
|
if (args.options.promoteAs &&
|
|
323
|
-
args.options.promoteAs
|
|
324
|
-
args.options.promoteAs
|
|
325
|
-
args.options.promoteAs !== 'Template') {
|
|
326
|
-
return `${args.options.promoteAs} is not a valid option for promoteAs. Allowed values HomePage|NewsPage|Template`;
|
|
322
|
+
Page_1.supportedPromoteAs.indexOf(args.options.promoteAs) < 0) {
|
|
323
|
+
return `${args.options.promoteAs} is not a valid option for promoteAs. Allowed values ${Page_1.supportedPromoteAs.join(', ')}`;
|
|
327
324
|
}
|
|
328
325
|
if (args.options.promoteAs === 'HomePage' && args.options.layoutType !== 'Home') {
|
|
329
326
|
return 'You can only promote home pages as site home page';
|
|
330
327
|
}
|
|
331
|
-
if (args.options.promoteAs === 'NewsPage' && args.options.layoutType
|
|
328
|
+
if (args.options.promoteAs === 'NewsPage' && args.options.layoutType && args.options.layoutType !== 'Article') {
|
|
332
329
|
return 'You can only promote article pages as news article';
|
|
333
330
|
}
|
|
334
331
|
if (typeof args.options.commentsEnabled !== 'undefined' &&
|
|
@@ -59,7 +59,7 @@ class SpoSiteEnsureCommand extends SpoCommand_1.default {
|
|
|
59
59
|
if (this.debug) {
|
|
60
60
|
logger.logToStderr(err.stderr);
|
|
61
61
|
}
|
|
62
|
-
if (err.error.message !== '
|
|
62
|
+
if (err.error.message !== '404 FILE NOT FOUND') {
|
|
63
63
|
return Promise.reject(err);
|
|
64
64
|
}
|
|
65
65
|
if (this.verbose) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class SpoWebInstalledLanguageListCommand extends SpoCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.WEB_INSTALLEDLANGUAGE_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists all installed languages on site';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['DisplayName', 'LanguageTag', 'Lcid'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
if (this.verbose) {
|
|
18
|
+
logger.logToStderr(`Retrieving all installed languages on site ${args.options.webUrl}...`);
|
|
19
|
+
}
|
|
20
|
+
const requestOptions = {
|
|
21
|
+
url: `${args.options.webUrl}/_api/web/RegionalSettings/InstalledLanguages`,
|
|
22
|
+
headers: {
|
|
23
|
+
'accept': 'application/json;odata=nometadata'
|
|
24
|
+
},
|
|
25
|
+
responseType: 'json'
|
|
26
|
+
};
|
|
27
|
+
request_1.default
|
|
28
|
+
.get(requestOptions)
|
|
29
|
+
.then((webInstalledLanguageProperties) => {
|
|
30
|
+
logger.log(webInstalledLanguageProperties.Items);
|
|
31
|
+
cb();
|
|
32
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
33
|
+
}
|
|
34
|
+
options() {
|
|
35
|
+
const options = [
|
|
36
|
+
{
|
|
37
|
+
option: '-u, --webUrl <webUrl>'
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
const parentOptions = super.options();
|
|
41
|
+
return options.concat(parentOptions);
|
|
42
|
+
}
|
|
43
|
+
validate(args) {
|
|
44
|
+
return SpoCommand_1.default.isValidSharePointUrl(args.options.webUrl);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
module.exports = new SpoWebInstalledLanguageListCommand();
|
|
48
|
+
//# sourceMappingURL=web-installedlanguage-list.js.map
|
|
@@ -22,9 +22,10 @@ exports.default = {
|
|
|
22
22
|
CDN_POLICY_SET: `${prefix} cdn policy set`,
|
|
23
23
|
CDN_SET: `${prefix} cdn set`,
|
|
24
24
|
CONTENTTYPE_ADD: `${prefix} contenttype add`,
|
|
25
|
-
CONTENTTYPE_GET: `${prefix} contenttype get`,
|
|
26
25
|
CONTENTTYPE_FIELD_REMOVE: `${prefix} contenttype field remove`,
|
|
27
26
|
CONTENTTYPE_FIELD_SET: `${prefix} contenttype field set`,
|
|
27
|
+
CONTENTTYPE_GET: `${prefix} contenttype get`,
|
|
28
|
+
CONTENTTYPE_LIST: `${prefix} contenttype list`,
|
|
28
29
|
CONTENTTYPE_REMOVE: `${prefix} contenttype remove`,
|
|
29
30
|
CONTENTTYPEHUB_GET: `${prefix} contenttypehub get`,
|
|
30
31
|
CUSTOMACTION_ADD: `${prefix} customaction add`,
|
|
@@ -245,6 +246,7 @@ exports.default = {
|
|
|
245
246
|
WEB_ADD: `${prefix} web add`,
|
|
246
247
|
WEB_CLIENTSIDEWEBPART_LIST: `${prefix} web clientsidewebpart list`,
|
|
247
248
|
WEB_GET: `${prefix} web get`,
|
|
249
|
+
WEB_INSTALLEDLANGUAGE_LIST: `${prefix} web installedlanguage list`,
|
|
248
250
|
WEB_LIST: `${prefix} web list`,
|
|
249
251
|
WEB_REINDEX: `${prefix} web reindex`,
|
|
250
252
|
WEB_REMOVE: `${prefix} web remove`,
|
|
@@ -13,7 +13,7 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
13
13
|
}
|
|
14
14
|
commandAction(logger, args, cb) {
|
|
15
15
|
const requestOptions = {
|
|
16
|
-
url: `${this.resource}/
|
|
16
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.messageId}`,
|
|
17
17
|
headers: {
|
|
18
18
|
accept: 'application/json;odata.metadata=none'
|
|
19
19
|
},
|
|
@@ -22,7 +22,7 @@ class TeamsReportDirectroutingcallsCommand extends GraphCommand_1.default {
|
|
|
22
22
|
commandAction(logger, args, cb) {
|
|
23
23
|
const toDateTimeParameter = encodeURIComponent(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
24
24
|
const requestOptions = {
|
|
25
|
-
url: `${this.resource}/
|
|
25
|
+
url: `${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${encodeURIComponent(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
|
|
26
26
|
headers: {
|
|
27
27
|
accept: 'application/json;odata.metadata=none'
|
|
28
28
|
},
|
package/dist/request.js
CHANGED
|
@@ -16,7 +16,9 @@ class Request {
|
|
|
16
16
|
decompress: true,
|
|
17
17
|
responseType: 'text',
|
|
18
18
|
/* c8 ignore next */
|
|
19
|
-
transformResponse: [data => data]
|
|
19
|
+
transformResponse: [data => data],
|
|
20
|
+
maxBodyLength: Infinity,
|
|
21
|
+
maxContentLength: Infinity
|
|
20
22
|
});
|
|
21
23
|
// since we're stubbing requests, request interceptor is never called in
|
|
22
24
|
// tests, so let's exclude it from coverage
|
|
@@ -64,7 +66,7 @@ class Request {
|
|
|
64
66
|
});
|
|
65
67
|
// since we're stubbing requests, response interceptor is never called in
|
|
66
68
|
// tests, so let's exclude it from coverage
|
|
67
|
-
/* c8 ignore next
|
|
69
|
+
/* c8 ignore next 26 */
|
|
68
70
|
this.req.interceptors.response.use((response) => {
|
|
69
71
|
if (this._logger) {
|
|
70
72
|
this._logger.logToStderr('Response:');
|
|
@@ -73,19 +75,22 @@ class Request {
|
|
|
73
75
|
response.headers['content-type'].indexOf('json') > -1) {
|
|
74
76
|
properties.push('data');
|
|
75
77
|
}
|
|
76
|
-
this._logger.logToStderr(JSON.stringify(Utils_1.default.filterObject(response, properties), null, 2));
|
|
78
|
+
this._logger.logToStderr(JSON.stringify(Object.assign({ url: response.config.url }, Utils_1.default.filterObject(response, properties)), null, 2));
|
|
77
79
|
}
|
|
78
80
|
return response;
|
|
79
81
|
}, (error) => {
|
|
80
82
|
if (this._logger) {
|
|
81
83
|
const properties = ['status', 'statusText', 'headers'];
|
|
82
84
|
this._logger.logToStderr('Request error:');
|
|
83
|
-
this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({}, Utils_1.default.filterObject(error.response, properties)), { error: error.error }), null, 2));
|
|
85
|
+
this._logger.logToStderr(JSON.stringify(Object.assign(Object.assign({ url: error.config.url }, Utils_1.default.filterObject(error.response, properties)), { error: error.error }), null, 2));
|
|
84
86
|
}
|
|
85
87
|
throw error;
|
|
86
88
|
});
|
|
87
89
|
}
|
|
88
90
|
}
|
|
91
|
+
get logger() {
|
|
92
|
+
return this._logger;
|
|
93
|
+
}
|
|
89
94
|
set logger(logger) {
|
|
90
95
|
this._logger = logger;
|
|
91
96
|
}
|
package/docs/docs/cmd/_global.md
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
: JMESPath query string. See [http://jmespath.org/](http://jmespath.org/) for more information and examples
|
|
6
6
|
|
|
7
7
|
`-o, --output [output]`
|
|
8
|
-
: Output type. `json,text`. Default `
|
|
8
|
+
: Output type. `json,text,csv`. Default `json`
|
|
9
9
|
|
|
10
10
|
`--verbose`
|
|
11
11
|
: Runs command with verbose logging
|
|
12
12
|
|
|
13
13
|
`--debug`
|
|
14
|
-
: Runs command with debug logging
|
|
14
|
+
: Runs command with debug logging
|
|
@@ -52,6 +52,9 @@ m365 aad app add [options]
|
|
|
52
52
|
`--manifest [manifest]`
|
|
53
53
|
: Azure AD app manifest as retrieved from the Azure Portal to create the app registration from
|
|
54
54
|
|
|
55
|
+
`--save`
|
|
56
|
+
: Use to store the information about the created app in a local file
|
|
57
|
+
|
|
55
58
|
--8<-- "docs/cmd/_global.md"
|
|
56
59
|
|
|
57
60
|
## Remarks
|
|
@@ -80,6 +83,8 @@ When using the `withSecret` option, this command will automatically generate a s
|
|
|
80
83
|
|
|
81
84
|
After creating the Azure AD app registration, this command returns the app ID and object ID of the created app registration. If you used the `withSecret` option, it will also return the generated secret.
|
|
82
85
|
|
|
86
|
+
If you want to store the information about the created Azure AD app registration, use the `--save` option. This is useful when you build solutions connected to Microsoft 365 and want to easily manage app registrations used with your solution. When you use the `--save` option, after you create the app registration, the command will write its ID and name to the `.m365rc.json` file in the current directory. If the file already exists, it will add the information about the to it, allowing you to track multiple apps. If the file doesn't exist, the command will create it.
|
|
87
|
+
|
|
83
88
|
## Examples
|
|
84
89
|
|
|
85
90
|
Create new Azure AD app registration with the specified name
|
|
@@ -141,3 +146,9 @@ Create new Azure AD app registration with Application ID URI set to a value that
|
|
|
141
146
|
```sh
|
|
142
147
|
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
|
|
143
148
|
```
|
|
149
|
+
|
|
150
|
+
Create new Azure AD app registration with the specified name. Store information about the created app registration in the _.m365rc.json_ file in the current directory.
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
m365 aad app add --name 'My AAD app' --save
|
|
154
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# aad app get
|
|
2
|
+
|
|
3
|
+
Gets an Azure AD app registration
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad app get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--appId [appId]`
|
|
14
|
+
: Application (client) ID of the Azure AD application registration to get. Specify either `appId`, `objectId` or `name`
|
|
15
|
+
|
|
16
|
+
`--objectId [objectId]`
|
|
17
|
+
: Object ID of the Azure AD application registration to get. Specify either `appId`, `objectId` or `name`
|
|
18
|
+
|
|
19
|
+
`--name [name]`
|
|
20
|
+
: Name of the Azure AD application registration to get. Specify either `appId`, `objectId` or `name`
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
For best performance use the `objectId` option to reference the Azure AD application registration to update. If you use `appId` or `name`, this command will first need to find the corresponding object ID for that application.
|
|
27
|
+
|
|
28
|
+
If the command finds multiple Azure AD application registrations with the specified app name, it will prompt you to disambiguate which app it should use, listing the discovered object IDs.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Get the Azure AD application registration by its app (client) ID
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 aad app get --appId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Get the Azure AD application registration by its object ID
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad app get --objectId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Get the Azure AD application registration by its name
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 aad app get --name "My app"
|
|
48
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# aad group list
|
|
2
|
+
|
|
3
|
+
Lists Azure AD groups
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad group list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
--8<-- "docs/cmd/_global.md"
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
Lists all groups defined in Azure Active Directory.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
m365 aad group list
|
|
21
|
+
```
|
|
@@ -36,6 +36,7 @@ m365 aad o365group add [options]
|
|
|
36
36
|
## Remarks
|
|
37
37
|
|
|
38
38
|
When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error.
|
|
39
|
+
If an invalid user is provided in the comma-separated list or Owners or Members, the command operation will fail and the Micrsoft 365 Group will not be created.
|
|
39
40
|
|
|
40
41
|
## Examples
|
|
41
42
|
|
|
@@ -11,10 +11,13 @@ m365 aad user get [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-i, --id [id]`
|
|
14
|
-
: The ID of the user to retrieve information for.
|
|
14
|
+
: The ID of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
|
|
15
15
|
|
|
16
16
|
`-n, --userName [userName]`
|
|
17
|
-
: The name of the user to retrieve information for.
|
|
17
|
+
: The name of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
|
|
18
|
+
|
|
19
|
+
`--email [email]`
|
|
20
|
+
: The email of the user to retrieve information for. Use either `id`, `userName` or `email`, but not all.
|
|
18
21
|
|
|
19
22
|
`-p, --properties [properties]`
|
|
20
23
|
: Comma-separated list of properties to retrieve
|
|
@@ -23,9 +26,9 @@ m365 aad user get [options]
|
|
|
23
26
|
|
|
24
27
|
## Remarks
|
|
25
28
|
|
|
26
|
-
You can retrieve information about a user, either by specifying that user's id
|
|
29
|
+
You can retrieve information about a user, either by specifying that user's id, user name (`userPrincipalName`), or email (`mail`), but not all.
|
|
27
30
|
|
|
28
|
-
If the user with the specified id
|
|
31
|
+
If the user with the specified id, user name, or email doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
|
|
29
32
|
|
|
30
33
|
## Examples
|
|
31
34
|
|
|
@@ -41,6 +44,12 @@ Get information about the user with user name _AarifS@contoso.onmicrosoft.com_
|
|
|
41
44
|
m365 aad user get --userName AarifS@contoso.onmicrosoft.com
|
|
42
45
|
```
|
|
43
46
|
|
|
47
|
+
Get information about the user with email _AarifS@contoso.onmicrosoft.com_
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 aad user get --email AarifS@contoso.onmicrosoft.com
|
|
51
|
+
```
|
|
52
|
+
|
|
44
53
|
For the user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ retrieve the user name, e-mail address and full name
|
|
45
54
|
|
|
46
55
|
```sh
|