@pnp/cli-microsoft365 5.1.0-beta.efe1dcb → 5.2.0-beta.0f1c454
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/.eslintrc.js +2 -0
- package/Dockerfile +7 -4
- package/dist/Auth.js +10 -0
- package/dist/Command.js +3 -0
- package/dist/cli/Cli.js +31 -3
- package/dist/cli/index.js +5 -1
- package/dist/m365/aad/commands/app/app-add.js +68 -10
- package/dist/m365/aad/commands/app/{app-delete.js → app-remove.js} +9 -5
- package/dist/m365/aad/commands/app/{app-role-delete.js → app-role-remove.js} +11 -7
- package/dist/m365/aad/commands/o365group/o365group-add.js +39 -1
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +87 -0
- package/dist/m365/aad/commands.js +4 -1
- package/dist/m365/app/commands/app-get.js +30 -0
- package/dist/m365/app/commands.js +1 -0
- package/dist/m365/base/PowerPlatformCommand.js +10 -0
- package/dist/m365/cli/commands/config/config-set.js +3 -2
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +98 -0
- package/dist/m365/pp/commands.js +7 -0
- package/dist/m365/spfx/commands/project/{project-upgrade/rules/JsonRule.js → JsonRule.js} +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade/rules/Rule.js → Rule.js} +0 -0
- package/dist/m365/spfx/commands/project/base-project-command.js +3 -3
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.0.js +9 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.1.js +9 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.2.js +9 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.0.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.1.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.3.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.10.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.11.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.14.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.2.0.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.0.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.1.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.2.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.4.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.1.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.1.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.6.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.1.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.0.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.1.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.2.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.9.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/generic-rules.js +30 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/DependencyRule.js +76 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001008_DEP_react.js +18 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001009_DEP_react_dom.js +18 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001022_DEP_office_ui_fabric_react.js +18 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002004_DEVDEP_gulp.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002007_DEVDEP_ajv.js +17 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002013_DEVDEP_types_webpack_env.js +14 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002015_DEVDEP_types_react.js +18 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002016_DEVDEP_types_react_dom.js +18 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js +68 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021001_PKG_spfx_deps_versions_match_project_version.js +74 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021002_PKG_spfx_deps_use_exact_version.js +71 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021003_PKG_spfx_deps_installed_as_deps.js +46 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021004_PKG_spfx_devdeps_installed_as_devdeps.js +46 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021005_PKG_types_installed_as_devdep.js +45 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021006_PKG_rush_stack_compiler_installed_as_devdep.js +45 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.js +69 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021008_PKG_no_duplicate_deps.js +59 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021009_PKG_no_duplicate_oui_deps.js +57 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021010_PKG_gulp_installed_as_devdep.js +45 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021011_PKG_ajv_installed_as_devdep.js +45 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021012_PKG_no_duplicate_pnpjs_deps.js +57 -0
- package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +29 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +341 -0
- package/dist/m365/spfx/commands/project/project-externalize/index.js +5 -1
- package/dist/m365/spfx/commands/project/project-externalize/rules/DynamicRule.js +3 -2
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +2 -1
- package/dist/m365/spfx/commands/project/project-externalize/rules/index.js +5 -1
- package/dist/m365/spfx/commands/project/{model → project-model}/ConfigJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/CopyAssetsJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/DeployAzureStorageJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/Gitignore.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/GulpfileJs.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/JsonFile.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/Manifest.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/Npmignore.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/PackageJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/PackageSolutionJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/Project.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/ScssFile.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/ServeJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/TsConfigJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/TsFile.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/TsLintJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/VsCode.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/VsCodeExtensionsJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/VsCodeLaunchJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/VsCodeSettingsJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/WriteManifestsJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/YoRcJson.js +0 -0
- package/dist/m365/spfx/commands/project/{model → project-model}/index.js +7 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/DependencyRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001021_DEP_microsoft_sp_property_pane.js +1 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001033_DEP_tslib.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003001_CFG_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003002_CFG_version.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003003_CFG_bundles.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003004_CFG_entries.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003005_CFG_localizedResource_pathLib.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004001_CFG_CA_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004002_CFG_CA_deployCdnPath.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005001_CFG_DAS_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005002_CFG_DAS_workingDir.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006001_CFG_PS_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006002_CFG_PS_includeClientSideAssets.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006003_CFG_PS_isDomainIsolated.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006004_CFG_PS_developer.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007001_CFG_S_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007002_CFG_S_initialPage.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007003_CFG_S_api.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008001_CFG_TSL_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008002_CFG_TSL_removeRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008003_CFG_TSL_preferConst.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN009001_CFG_WM_schema.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012001_TSC_module.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012002_TSC_moduleResolution.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012003_TSC_skipLibCheck.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012004_TSC_typeRoots_types.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012005_TSC_typeRoots_microsoft.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012006_TSC_types_es6_collections.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012007_TSC_lib_es5.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012008_TSC_lib_dom.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012009_TSC_lib_es2015_collection.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012010_TSC_experimentalDecorators.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012011_TSC_outDir.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012012_TSC_include.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012013_TSC_exclude.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012014_TSC_inlineSources.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012015_TSC_strictNullChecks.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012016_TSC_noUnusedLocals.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012017_TSC_extends.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012018_TSC_lib_es2015_promise.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012019_TSC_types_es6_promise.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013001_GULP_msGridSassSuppression.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013002_GULP_serveTask.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014001_CODE_settings_jsonSchemas.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014002_CODE_extensions.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014004_CODE_settings_jsonSchemas_configJson_url.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014005_CODE_settingsfile.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014006_CODE_launch_sourceMapPathOverrides.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014007_CODE_launch_localWorkbench.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014008_CODE_launch_hostedWorkbench_type.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN017001_MISC_npm_dedupe.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018001_TEAMS_folder.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018002_TEAMS_manifest.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018003_TEAMS_tab20x20_png.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018004_TEAMS_tab96x96_png.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018005_TEAMS_deprecated_manifest.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019001_TSL_rulesDirectory.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019002_TSL_extends.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023001_GITIGNORE_release.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023002_GITIGNORE_heft.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN024001_NPMIGNORE_file.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FileAddRemoveRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ManifestRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/PackageRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ResolutionRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ScssRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/TsRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.0.js +0 -2
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0-beta.1.js +63 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +61 -172
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/Finding.js +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/FindingToReport.js +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/FindingTour.js +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/FindingTourStep.js +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/Occurrence.js +0 -0
- package/dist/m365/spfx/commands/project/{ReportData.js → report-model/ReportData.js} +0 -0
- package/dist/m365/spfx/commands/project/{project-upgrade → report-model}/index.js +7 -4
- package/dist/m365/spfx/commands/spfx-doctor.js +6 -0
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +180 -0
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -0
- package/dist/m365/spo/commands.js +2 -0
- package/dist/m365/teams/commands/chat/chat-message-send.js +50 -58
- package/dist/m365/tenant/commands.js +1 -6
- package/dist/settingsNames.js +2 -0
- package/dist/utils/formatting.js +3 -0
- package/dist/utils/fsUtil.js +70 -0
- package/dist/utils/index.js +7 -1
- package/dist/utils/packageManager.js +66 -0
- package/dist/utils/spfx.js +6 -5
- package/dist/{m365/spfx/commands/project/project-upgrade/Hash.js → utils/types.js} +1 -1
- package/docs/docs/cmd/aad/app/{app-delete.md → app-remove.md} +15 -9
- package/docs/docs/cmd/aad/app/{app-role-delete.md → app-role-remove.md} +25 -19
- package/docs/docs/cmd/aad/o365group/o365group-add.md +42 -6
- package/docs/docs/cmd/aad/o365group/o365group-conversation-post-list.md +36 -0
- package/docs/docs/cmd/app/app-get.md +36 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-add.md +50 -0
- package/docs/docs/cmd/spfx/project/project-doctor.md +64 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +4 -1
- package/docs/docs/cmd/spo/app/app-teamspackage-download.md +56 -0
- package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.md +27 -0
- package/docs/docs/cmd/teams/chat/chat-message-send.md +4 -4
- package/npm-shrinkwrap.json +445 -194
- package/package.json +13 -11
- package/dist/m365/spfx/commands/project/project-upgrade/DependencyInformation.js +0 -3
- package/dist/m365/spfx/commands/project/project-upgrade/Dictionary.js +0 -3
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015006_FILE_editorconfig.js +0 -14
- package/dist/m365/tenant/commands/auditlog/auditlog-report.js +0 -231
- package/dist/m365/tenant/commands/service/service-list.js +0 -41
- package/dist/m365/tenant/commands/service/service-message-list.js +0 -55
- package/dist/m365/tenant/commands/service/service-report-historicalservicestatus.js +0 -54
- package/dist/m365/tenant/commands/status/status-list.js +0 -55
- package/docs/docs/cmd/tenant/auditlog/auditlog-report.md +0 -61
- package/docs/docs/cmd/tenant/service/service-list.md +0 -25
- package/docs/docs/cmd/tenant/service/service-message-list.md +0 -34
- package/docs/docs/cmd/tenant/service/service-report-historicalservicestatus.md +0 -38
- package/docs/docs/cmd/tenant/status/status-list.md +0 -34
package/.eslintrc.js
CHANGED
package/Dockerfile
CHANGED
|
@@ -21,7 +21,9 @@ RUN apk add --no-cache \
|
|
|
21
21
|
shadow \
|
|
22
22
|
bash-completion \
|
|
23
23
|
nodejs \
|
|
24
|
-
npm
|
|
24
|
+
npm \
|
|
25
|
+
python3 \
|
|
26
|
+
py3-pip
|
|
25
27
|
|
|
26
28
|
RUN adduser --system cli-microsoft365
|
|
27
29
|
USER cli-microsoft365
|
|
@@ -31,11 +33,10 @@ WORKDIR /home/cli-microsoft365
|
|
|
31
33
|
ENV 0="/bin/bash" \
|
|
32
34
|
SHELL="bash" \
|
|
33
35
|
NPM_CONFIG_PREFIX=/home/cli-microsoft365/.npm-global \
|
|
34
|
-
PATH=$PATH:/home/cli-microsoft365/.npm-global/bin \
|
|
36
|
+
PATH=$PATH:/home/cli-microsoft365/.npm-global/bin:/home/cli-microsoft365/.local/bin \
|
|
35
37
|
CLIMICROSOFT365_ENV="docker"
|
|
36
38
|
|
|
37
|
-
RUN bash -c 'echo "export PATH=$PATH:/home/cli-microsoft365/.npm-global/bin" >> ~/.bash_profile' \
|
|
38
|
-
&& bash -c 'echo "export NPM_CONFIG_PREFIX=/home/cli-microsoft365/.npm-global" >> ~/.bash_profile' \
|
|
39
|
+
RUN bash -c 'echo "export PATH=$PATH:/home/cli-microsoft365/.npm-global/bin:/home/.local/bin" >> ~/.bash_profile' \
|
|
39
40
|
&& bash -c 'echo "export CLIMICROSOFT365_ENV=\"docker\"" >> ~/.bash_profile' \
|
|
40
41
|
&& bash -c 'npm i -g @pnp/cli-microsoft365@${CLI_VERSION} --production --quiet --no-progress' \
|
|
41
42
|
&& bash -c 'echo "source /etc/profile.d/bash_completion.sh" >> ~/.bash_profile' \
|
|
@@ -43,4 +44,6 @@ RUN bash -c 'echo "export PATH=$PATH:/home/cli-microsoft365/.npm-global/bin" >>
|
|
|
43
44
|
&& bash -c 'm365 cli completion sh setup' \
|
|
44
45
|
&& pwsh -c 'm365 cli completion pwsh setup --profile $profile'
|
|
45
46
|
|
|
47
|
+
RUN pip install jmespath-terminal
|
|
48
|
+
|
|
46
49
|
CMD [ "bash", "-l" ]
|
package/dist/Auth.js
CHANGED
|
@@ -311,6 +311,16 @@ class Auth {
|
|
|
311
311
|
}
|
|
312
312
|
this._open(response.verificationUri);
|
|
313
313
|
}
|
|
314
|
+
if (cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.copyDeviceCodeToClipboard, false)) {
|
|
315
|
+
// _clipboardy is never set before hitting this line, but this check
|
|
316
|
+
// is implemented so that we can support lazy loading
|
|
317
|
+
// but also stub it for testing
|
|
318
|
+
/* c8 ignore next 3 */
|
|
319
|
+
if (!this._clipboardy) {
|
|
320
|
+
this._clipboardy = require('clipboardy');
|
|
321
|
+
}
|
|
322
|
+
this._clipboardy.writeSync(response.userCode);
|
|
323
|
+
}
|
|
314
324
|
}
|
|
315
325
|
ensureAccessTokenWithPassword(resource, logger, debug) {
|
|
316
326
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/Command.js
CHANGED
package/dist/cli/Cli.js
CHANGED
|
@@ -121,12 +121,27 @@ class Cli {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
const shouldPrompt = this.getSettingWithDefaultValue(settingsNames_1.settingsNames.prompt, false);
|
|
125
|
+
let inquirer;
|
|
126
126
|
for (let i = 0; i < this.commandToExecute.options.length; i++) {
|
|
127
127
|
if (this.commandToExecute.options[i].required &&
|
|
128
128
|
typeof this.optionsFromArgs.options[this.commandToExecute.options[i].name] === 'undefined') {
|
|
129
|
-
|
|
129
|
+
if (!shouldPrompt) {
|
|
130
|
+
return this.closeWithError(`Required option ${this.commandToExecute.options[i].name} not specified`, this.optionsFromArgs, true);
|
|
131
|
+
}
|
|
132
|
+
if (i === 0) {
|
|
133
|
+
Cli.log('Provide values for the following parameters:');
|
|
134
|
+
}
|
|
135
|
+
if (!inquirer) {
|
|
136
|
+
inquirer = require('inquirer');
|
|
137
|
+
}
|
|
138
|
+
const missingRequireOptionValue = yield inquirer
|
|
139
|
+
.prompt({
|
|
140
|
+
name: 'missingRequireOptionValue',
|
|
141
|
+
message: `${this.commandToExecute.options[i].name}: `
|
|
142
|
+
})
|
|
143
|
+
.then(result => result.missingRequireOptionValue);
|
|
144
|
+
this.optionsFromArgs.options[this.commandToExecute.options[i].name] = missingRequireOptionValue;
|
|
130
145
|
}
|
|
131
146
|
}
|
|
132
147
|
const optionsWithoutShorts = Cli.removeShortOptions(this.optionsFromArgs);
|
|
@@ -148,6 +163,19 @@ class Cli {
|
|
|
148
163
|
if (optionsWithoutShorts.options.output === undefined) {
|
|
149
164
|
optionsWithoutShorts.options.output = this.getSettingWithDefaultValue(settingsNames_1.settingsNames.output, undefined);
|
|
150
165
|
}
|
|
166
|
+
// validate options sets defined by the command
|
|
167
|
+
const optionsSets = this.commandToExecute.command.optionSets();
|
|
168
|
+
const argsOptions = Object.keys(this.optionsFromArgs.options);
|
|
169
|
+
const cmdArgs = this.optionsFromArgs;
|
|
170
|
+
optionsSets === null || optionsSets === void 0 ? void 0 : optionsSets.forEach((optionSet) => {
|
|
171
|
+
const commonOptions = argsOptions.filter(opt => optionSet.includes(opt));
|
|
172
|
+
if (commonOptions.length === 0) {
|
|
173
|
+
return this.closeWithError(`Specify one of the following options: ${optionSet.map(opt => opt).join(', ')}.`, cmdArgs, true);
|
|
174
|
+
}
|
|
175
|
+
if (commonOptions.length > 1) {
|
|
176
|
+
return this.closeWithError(`Specify one of the following options: ${optionSet.map(opt => opt).join(', ')}, but not multiple.`, cmdArgs, true);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
151
179
|
const validationResult = this.commandToExecute.command.validate(optionsWithoutShorts);
|
|
152
180
|
if (typeof validationResult === 'string') {
|
|
153
181
|
return this.closeWithError(validationResult, optionsWithoutShorts, true);
|
package/dist/cli/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -58,6 +58,9 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
58
58
|
if (_appInfo.secret) {
|
|
59
59
|
appInfo.secret = _appInfo.secret;
|
|
60
60
|
}
|
|
61
|
+
if (_appInfo.secrets) {
|
|
62
|
+
appInfo.secrets = _appInfo.secrets;
|
|
63
|
+
}
|
|
61
64
|
logger.log(appInfo);
|
|
62
65
|
cb();
|
|
63
66
|
}, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
@@ -111,6 +114,10 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
111
114
|
delete v2Manifest.id;
|
|
112
115
|
delete v2Manifest.appId;
|
|
113
116
|
delete v2Manifest.publisherDomain;
|
|
117
|
+
// extract secrets from the manifest. Store them in a separate variable
|
|
118
|
+
// and remove them from the manifest because we need to create them
|
|
119
|
+
// separately
|
|
120
|
+
const secrets = this.getSecretsFromManifest(v2Manifest);
|
|
114
121
|
// Azure Portal returns v2 manifest whereas the Graph API expects a v1.6
|
|
115
122
|
const graphManifest = this.transformManifest(v2Manifest);
|
|
116
123
|
const updateAppRequestOptions = {
|
|
@@ -124,7 +131,26 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
124
131
|
return request_1.default
|
|
125
132
|
.patch(updateAppRequestOptions)
|
|
126
133
|
.then(_ => this.updatePreAuthorizedAppsFromManifest(v2Manifest, appInfo))
|
|
127
|
-
.then(_ =>
|
|
134
|
+
.then(_ => this.createSecrets(secrets, appInfo));
|
|
135
|
+
}
|
|
136
|
+
getSecretsFromManifest(manifest) {
|
|
137
|
+
if (!manifest.passwordCredentials || manifest.passwordCredentials.length === 0) {
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
140
|
+
const secrets = manifest.passwordCredentials.map((c) => {
|
|
141
|
+
const startDate = new Date(c.startDate);
|
|
142
|
+
const endDate = new Date(c.endDate);
|
|
143
|
+
const expirationDate = new Date();
|
|
144
|
+
expirationDate.setMilliseconds(endDate.valueOf() - startDate.valueOf());
|
|
145
|
+
return {
|
|
146
|
+
name: c.displayName,
|
|
147
|
+
expirationDate
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
// delete the secrets from the manifest so that we won't try to set them
|
|
151
|
+
// from the manifest
|
|
152
|
+
delete manifest.passwordCredentials;
|
|
153
|
+
return secrets;
|
|
128
154
|
}
|
|
129
155
|
updatePreAuthorizedAppsFromManifest(manifest, appInfo) {
|
|
130
156
|
if (!manifest ||
|
|
@@ -153,6 +179,21 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
153
179
|
.patch(updateAppRequestOptions)
|
|
154
180
|
.then(_ => Promise.resolve(appInfo));
|
|
155
181
|
}
|
|
182
|
+
createSecrets(secrets, appInfo) {
|
|
183
|
+
if (secrets.length === 0) {
|
|
184
|
+
return Promise.resolve(appInfo);
|
|
185
|
+
}
|
|
186
|
+
return Promise
|
|
187
|
+
.all(secrets.map(secret => this.createSecret({
|
|
188
|
+
appObjectId: appInfo.id,
|
|
189
|
+
displayName: secret.name,
|
|
190
|
+
expirationDate: secret.expirationDate
|
|
191
|
+
})))
|
|
192
|
+
.then(secrets => {
|
|
193
|
+
appInfo.secrets = secrets;
|
|
194
|
+
return appInfo;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
156
197
|
transformManifest(v2Manifest) {
|
|
157
198
|
var _a, _b, _c, _d;
|
|
158
199
|
const graphManifest = JSON.parse(JSON.stringify(v2Manifest));
|
|
@@ -187,7 +228,7 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
187
228
|
unsupportedProperties.forEach(p => delete graphManifest[p]);
|
|
188
229
|
graphManifest.api.acceptMappedClaims = v2Manifest.acceptMappedClaims;
|
|
189
230
|
delete graphManifest.acceptMappedClaims;
|
|
190
|
-
graphManifest.
|
|
231
|
+
graphManifest.isFallbackPublicClient = v2Manifest.allowPublicClient;
|
|
191
232
|
delete graphManifest.allowPublicClient;
|
|
192
233
|
graphManifest.info.termsOfServiceUrl = (_a = v2Manifest.informationalUrls) === null || _a === void 0 ? void 0 : _a.termsOfService;
|
|
193
234
|
graphManifest.info.supportUrl = (_b = v2Manifest.informationalUrls) === null || _b === void 0 ? void 0 : _b.support;
|
|
@@ -234,6 +275,11 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
234
275
|
}
|
|
235
276
|
graphManifest.web.homePageUrl = v2Manifest.signInUrl;
|
|
236
277
|
delete graphManifest.signInUrl;
|
|
278
|
+
if (graphManifest.appRoles) {
|
|
279
|
+
graphManifest.appRoles.forEach((role) => {
|
|
280
|
+
delete role.lang;
|
|
281
|
+
});
|
|
282
|
+
}
|
|
237
283
|
return graphManifest;
|
|
238
284
|
}
|
|
239
285
|
configureUri(args, appInfo, logger) {
|
|
@@ -357,27 +403,39 @@ class AadAppAddCommand extends GraphCommand_1.default {
|
|
|
357
403
|
if (this.verbose) {
|
|
358
404
|
logger.logToStderr(`Configure Azure AD app secret...`);
|
|
359
405
|
}
|
|
360
|
-
|
|
361
|
-
|
|
406
|
+
return this
|
|
407
|
+
.createSecret({ appObjectId: appInfo.id })
|
|
408
|
+
.then(secret => {
|
|
409
|
+
appInfo.secret = secret.value;
|
|
410
|
+
return Promise.resolve(appInfo);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
createSecret({ appObjectId, displayName = undefined, expirationDate = undefined }) {
|
|
414
|
+
let secretExpirationDate = expirationDate;
|
|
415
|
+
if (!secretExpirationDate) {
|
|
416
|
+
secretExpirationDate = new Date();
|
|
417
|
+
secretExpirationDate.setFullYear(secretExpirationDate.getFullYear() + 1);
|
|
418
|
+
}
|
|
419
|
+
const secretName = displayName !== null && displayName !== void 0 ? displayName : 'Default';
|
|
362
420
|
const requestOptions = {
|
|
363
|
-
url: `${this.resource}/v1.0/myorganization/applications/${
|
|
421
|
+
url: `${this.resource}/v1.0/myorganization/applications/${appObjectId}/addPassword`,
|
|
364
422
|
headers: {
|
|
365
423
|
'content-type': 'application/json'
|
|
366
424
|
},
|
|
367
425
|
responseType: 'json',
|
|
368
426
|
data: {
|
|
369
427
|
passwordCredential: {
|
|
370
|
-
displayName:
|
|
428
|
+
displayName: secretName,
|
|
371
429
|
endDateTime: secretExpirationDate.toISOString()
|
|
372
430
|
}
|
|
373
431
|
}
|
|
374
432
|
};
|
|
375
433
|
return request_1.default
|
|
376
434
|
.post(requestOptions)
|
|
377
|
-
.then((password) => {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
});
|
|
435
|
+
.then((password) => Promise.resolve({
|
|
436
|
+
displayName: secretName,
|
|
437
|
+
value: password.secretText
|
|
438
|
+
}));
|
|
381
439
|
}
|
|
382
440
|
saveAppInfo(args, appInfo, logger) {
|
|
383
441
|
if (!args.options.save) {
|
|
@@ -5,9 +5,12 @@ const request_1 = require("../../../../request");
|
|
|
5
5
|
const utils_1 = require("../../../../utils");
|
|
6
6
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
7
|
const commands_1 = require("../../commands");
|
|
8
|
-
class
|
|
8
|
+
class AadAppRemoveCommand extends GraphCommand_1.default {
|
|
9
9
|
get name() {
|
|
10
|
-
return commands_1.default.
|
|
10
|
+
return commands_1.default.APP_REMOVE;
|
|
11
|
+
}
|
|
12
|
+
alias() {
|
|
13
|
+
return [commands_1.default.APP_DELETE];
|
|
11
14
|
}
|
|
12
15
|
get description() {
|
|
13
16
|
return 'Removes an Azure AD app registration';
|
|
@@ -21,6 +24,7 @@ class AadAppDeleteCommand extends GraphCommand_1.default {
|
|
|
21
24
|
return telemetryProps;
|
|
22
25
|
}
|
|
23
26
|
commandAction(logger, args, cb) {
|
|
27
|
+
this.showDeprecationWarning(logger, commands_1.default.APP_DELETE, commands_1.default.APP_REMOVE);
|
|
24
28
|
const deleteApp = () => {
|
|
25
29
|
this
|
|
26
30
|
.getObjectId(args, logger)
|
|
@@ -47,7 +51,7 @@ class AadAppDeleteCommand extends GraphCommand_1.default {
|
|
|
47
51
|
type: 'confirm',
|
|
48
52
|
name: 'continue',
|
|
49
53
|
default: false,
|
|
50
|
-
message: `Are you sure you want to
|
|
54
|
+
message: `Are you sure you want to remove the app?`
|
|
51
55
|
}, (result) => {
|
|
52
56
|
if (!result.continue) {
|
|
53
57
|
cb();
|
|
@@ -119,5 +123,5 @@ class AadAppDeleteCommand extends GraphCommand_1.default {
|
|
|
119
123
|
return true;
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
|
-
module.exports = new
|
|
123
|
-
//# sourceMappingURL=app-
|
|
126
|
+
module.exports = new AadAppRemoveCommand();
|
|
127
|
+
//# sourceMappingURL=app-remove.js.map
|
|
@@ -5,12 +5,15 @@ const request_1 = require("../../../../request");
|
|
|
5
5
|
const utils_1 = require("../../../../utils");
|
|
6
6
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
7
|
const commands_1 = require("../../commands");
|
|
8
|
-
class
|
|
8
|
+
class AadAppRoleRemoveCommand extends GraphCommand_1.default {
|
|
9
9
|
get name() {
|
|
10
|
-
return commands_1.default.
|
|
10
|
+
return commands_1.default.APP_ROLE_REMOVE;
|
|
11
11
|
}
|
|
12
12
|
get description() {
|
|
13
|
-
return '
|
|
13
|
+
return 'Removes role from the specified Azure AD app registration';
|
|
14
|
+
}
|
|
15
|
+
alias() {
|
|
16
|
+
return [commands_1.default.APP_ROLE_DELETE];
|
|
14
17
|
}
|
|
15
18
|
getTelemetryProperties(args) {
|
|
16
19
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
@@ -23,6 +26,7 @@ class AadAppRoleDeleteCommand extends GraphCommand_1.default {
|
|
|
23
26
|
return telemetryProps;
|
|
24
27
|
}
|
|
25
28
|
commandAction(logger, args, cb) {
|
|
29
|
+
this.showDeprecationWarning(logger, commands_1.default.APP_ROLE_DELETE, commands_1.default.APP_ROLE_REMOVE);
|
|
26
30
|
const deleteAppRole = () => {
|
|
27
31
|
this
|
|
28
32
|
.processAppRoleDelete(logger, args)
|
|
@@ -36,7 +40,7 @@ class AadAppRoleDeleteCommand extends GraphCommand_1.default {
|
|
|
36
40
|
type: 'confirm',
|
|
37
41
|
name: 'continue',
|
|
38
42
|
default: false,
|
|
39
|
-
message: `Are you sure you want to
|
|
43
|
+
message: `Are you sure you want to remove the app role ?`
|
|
40
44
|
}, (result) => {
|
|
41
45
|
if (!result.continue) {
|
|
42
46
|
cb();
|
|
@@ -56,7 +60,7 @@ class AadAppRoleDeleteCommand extends GraphCommand_1.default {
|
|
|
56
60
|
if (this.verbose) {
|
|
57
61
|
logger.logToStderr(`Deleting role with ${appRoleDeleteIdentifierNameValue} from Azure AD app ${aadApp.id}...`);
|
|
58
62
|
}
|
|
59
|
-
// Find the role search criteria provided by the user.
|
|
63
|
+
// Find the role search criteria provided by the user.
|
|
60
64
|
const appRoleDeleteIdentifierProperty = args.options.name ? `displayName` : (args.options.claim ? `value` : `id`);
|
|
61
65
|
const appRoleDeleteIdentifierValue = args.options.name ? args.options.name : (args.options.claim ? args.options.claim : args.options.id);
|
|
62
66
|
const appRoleToDelete = aadApp.appRoles.filter((role) => role[appRoleDeleteIdentifierProperty] === appRoleDeleteIdentifierValue);
|
|
@@ -201,5 +205,5 @@ class AadAppRoleDeleteCommand extends GraphCommand_1.default {
|
|
|
201
205
|
return true;
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
|
-
module.exports = new
|
|
205
|
-
//# sourceMappingURL=app-role-
|
|
208
|
+
module.exports = new AadAppRoleRemoveCommand();
|
|
209
|
+
//# sourceMappingURL=app-role-remove.js.map
|
|
@@ -11,15 +11,40 @@ class AadO365GroupAddCommand extends GraphCommand_1.default {
|
|
|
11
11
|
return commands_1.default.O365GROUP_ADD;
|
|
12
12
|
}
|
|
13
13
|
get description() {
|
|
14
|
-
return 'Creates Microsoft 365 Group';
|
|
14
|
+
return 'Creates a Microsoft 365 Group';
|
|
15
|
+
}
|
|
16
|
+
getTelemetryProperties(args) {
|
|
17
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
18
|
+
telemetryProps.owners = typeof args.options.owners !== 'undefined';
|
|
19
|
+
telemetryProps.members = typeof args.options.members !== 'undefined';
|
|
20
|
+
telemetryProps.logoPath = typeof args.options.logoPath !== 'undefined';
|
|
21
|
+
telemetryProps.isPrivate = typeof args.options.isPrivate !== 'undefined';
|
|
22
|
+
telemetryProps.allowMembersToPost = (!(!args.options.allowMembersToPost)).toString();
|
|
23
|
+
telemetryProps.hideGroupInOutlook = (!(!args.options.hideGroupInOutlook)).toString();
|
|
24
|
+
telemetryProps.subscribeNewGroupMembers = (!(!args.options.subscribeNewGroupMembers)).toString();
|
|
25
|
+
telemetryProps.welcomeEmailDisabled = (!(!args.options.welcomeEmailDisabled)).toString();
|
|
26
|
+
return telemetryProps;
|
|
15
27
|
}
|
|
16
28
|
commandAction(logger, args, cb) {
|
|
17
29
|
let group;
|
|
18
30
|
let ownerIds = [];
|
|
19
31
|
let memberIds = [];
|
|
32
|
+
const resourceBehaviorOptionsCollection = [];
|
|
20
33
|
if (this.verbose) {
|
|
21
34
|
logger.logToStderr(`Creating Microsoft 365 Group...`);
|
|
22
35
|
}
|
|
36
|
+
if (args.options.allowMembersToPost) {
|
|
37
|
+
resourceBehaviorOptionsCollection.push("allowMembersToPost");
|
|
38
|
+
}
|
|
39
|
+
if (args.options.hideGroupInOutlook) {
|
|
40
|
+
resourceBehaviorOptionsCollection.push("hideGroupInOutlook");
|
|
41
|
+
}
|
|
42
|
+
if (args.options.subscribeNewGroupMembers) {
|
|
43
|
+
resourceBehaviorOptionsCollection.push("subscribeNewGroupMembers");
|
|
44
|
+
}
|
|
45
|
+
if (args.options.welcomeEmailDisabled) {
|
|
46
|
+
resourceBehaviorOptionsCollection.push("welcomeEmailDisabled");
|
|
47
|
+
}
|
|
23
48
|
const requestOptions = {
|
|
24
49
|
url: `${this.resource}/v1.0/groups`,
|
|
25
50
|
headers: {
|
|
@@ -34,6 +59,7 @@ class AadO365GroupAddCommand extends GraphCommand_1.default {
|
|
|
34
59
|
],
|
|
35
60
|
mailEnabled: true,
|
|
36
61
|
mailNickname: args.options.mailNickname,
|
|
62
|
+
resourceBehaviorOptions: resourceBehaviorOptionsCollection,
|
|
37
63
|
securityEnabled: false,
|
|
38
64
|
visibility: args.options.isPrivate === 'true' ? 'Private' : 'Public'
|
|
39
65
|
}
|
|
@@ -186,6 +212,18 @@ class AadO365GroupAddCommand extends GraphCommand_1.default {
|
|
|
186
212
|
{
|
|
187
213
|
option: '--isPrivate [isPrivate]'
|
|
188
214
|
},
|
|
215
|
+
{
|
|
216
|
+
option: '--allowMembersToPost [allowMembersToPost]'
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
option: '--hideGroupInOutlook [hideGroupInOutlook]'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
option: '--subscribeNewGroupMembers [subscribeNewGroupMembers]'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
option: '--welcomeEmailDisabled [welcomeEmailDisabled]'
|
|
226
|
+
},
|
|
189
227
|
{
|
|
190
228
|
option: '-l, --logoPath [logoPath]'
|
|
191
229
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
const request_1 = require("../../../../request");
|
|
7
|
+
class AadO365GroupConversationPostListCommand extends GraphCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.O365GROUP_CONVERSATION_POST_LIST;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Lists conversation posts of a Microsoft 365 group';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.groupId = typeof args.options.groupId !== 'undefined';
|
|
17
|
+
telemetryProps.groupDisplayName = typeof args.options.groupDisplayName !== 'undefined';
|
|
18
|
+
return telemetryProps;
|
|
19
|
+
}
|
|
20
|
+
defaultProperties() {
|
|
21
|
+
return ['receivedDateTime', 'id'];
|
|
22
|
+
}
|
|
23
|
+
commandAction(logger, args, cb) {
|
|
24
|
+
this
|
|
25
|
+
.getGroupId(args)
|
|
26
|
+
.then((retrievedgroupId) => {
|
|
27
|
+
return utils_1.odata.getAllItems(`${this.resource}/v1.0/groups/${retrievedgroupId}/threads/${args.options.threadId}/posts`, logger);
|
|
28
|
+
})
|
|
29
|
+
.then((posts) => {
|
|
30
|
+
logger.log(posts);
|
|
31
|
+
cb();
|
|
32
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
33
|
+
}
|
|
34
|
+
getGroupId(args) {
|
|
35
|
+
if (args.options.groupId) {
|
|
36
|
+
return Promise.resolve(encodeURIComponent(args.options.groupId));
|
|
37
|
+
}
|
|
38
|
+
const requestOptions = {
|
|
39
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.groupDisplayName)}'&$select=id`,
|
|
40
|
+
headers: {
|
|
41
|
+
accept: 'application/json;odata.metadata=none'
|
|
42
|
+
},
|
|
43
|
+
responseType: 'json'
|
|
44
|
+
};
|
|
45
|
+
return request_1.default
|
|
46
|
+
.get(requestOptions)
|
|
47
|
+
.then(res => {
|
|
48
|
+
if (res.value.length === 1) {
|
|
49
|
+
return Promise.resolve(res.value[0].id);
|
|
50
|
+
}
|
|
51
|
+
if (res.value.length === 0) {
|
|
52
|
+
return Promise.reject(`The specified group does not exist`);
|
|
53
|
+
}
|
|
54
|
+
return Promise.reject(`Multiple groups found with name ${args.options.groupDisplayName} found. Please choose between the following IDs: ${res.value.map(a => a.id).join(', ')}`);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
options() {
|
|
58
|
+
const options = [
|
|
59
|
+
{
|
|
60
|
+
option: '-i, --groupId [groupId]'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
option: '-d, --groupDisplayName [groupDisplayName]'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
option: '-t, --threadId <threadId>'
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
const parentOptions = super.options();
|
|
70
|
+
return options.concat(parentOptions);
|
|
71
|
+
}
|
|
72
|
+
validate(args) {
|
|
73
|
+
if (!args.options.groupId &&
|
|
74
|
+
!args.options.groupDisplayName) {
|
|
75
|
+
return 'Specify either groupId or groupDisplayName';
|
|
76
|
+
}
|
|
77
|
+
if (args.options.groupId && args.options.groupDisplayName) {
|
|
78
|
+
return 'Specify either groupId or groupDisplayName, but not both';
|
|
79
|
+
}
|
|
80
|
+
if (args.options.groupId && !utils_1.validation.isValidGuid(args.options.groupId)) {
|
|
81
|
+
return `${args.options.groupId} is not a valid GUID`;
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
module.exports = new AadO365GroupConversationPostListCommand();
|
|
87
|
+
//# sourceMappingURL=o365group-conversation-post-list.js.map
|
|
@@ -5,10 +5,12 @@ exports.default = {
|
|
|
5
5
|
APP_ADD: `${prefix} app add`,
|
|
6
6
|
APP_DELETE: `${prefix} app delete`,
|
|
7
7
|
APP_GET: `${prefix} app get`,
|
|
8
|
+
APP_REMOVE: `${prefix} app remove`,
|
|
8
9
|
APP_SET: `${prefix} app set`,
|
|
9
10
|
APP_ROLE_ADD: `${prefix} app role add`,
|
|
10
|
-
APP_ROLE_LIST: `${prefix} app role list`,
|
|
11
11
|
APP_ROLE_DELETE: `${prefix} app role delete`,
|
|
12
|
+
APP_ROLE_LIST: `${prefix} app role list`,
|
|
13
|
+
APP_ROLE_REMOVE: `${prefix} app role remove`,
|
|
12
14
|
APPROLEASSIGNMENT_ADD: `${prefix} approleassignment add`,
|
|
13
15
|
APPROLEASSIGNMENT_LIST: `${prefix} approleassignment list`,
|
|
14
16
|
APPROLEASSIGNMENT_REMOVE: `${prefix} approleassignment remove`,
|
|
@@ -24,6 +26,7 @@ exports.default = {
|
|
|
24
26
|
O365GROUP_GET: `${prefix} o365group get`,
|
|
25
27
|
O365GROUP_LIST: `${prefix} o365group list`,
|
|
26
28
|
O365GROUP_CONVERSATION_LIST: `${prefix} o365group conversation list`,
|
|
29
|
+
O365GROUP_CONVERSATION_POST_LIST: `${prefix} o365group conversation post list`,
|
|
27
30
|
O365GROUP_RECYCLEBINITEM_CLEAR: `${prefix} o365group recyclebinitem clear`,
|
|
28
31
|
O365GROUP_RECYCLEBINITEM_LIST: `${prefix} o365group recyclebinitem list`,
|
|
29
32
|
O365GROUP_RECYCLEBINITEM_RESTORE: `${prefix} o365group recyclebinitem restore`,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../cli");
|
|
4
|
+
const AadAppGetCommand = require("../../aad/commands/app/app-get");
|
|
5
|
+
const AppCommand_1 = require("../../base/AppCommand");
|
|
6
|
+
const commands_1 = require("../commands");
|
|
7
|
+
class AppGetCommand extends AppCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.GET;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Retrieves information about the current Azure AD app';
|
|
13
|
+
}
|
|
14
|
+
commandAction(logger, args, cb) {
|
|
15
|
+
const options = {
|
|
16
|
+
appId: this.appId,
|
|
17
|
+
output: 'json',
|
|
18
|
+
debug: args.options.debug,
|
|
19
|
+
verbose: args.options.verbose
|
|
20
|
+
};
|
|
21
|
+
cli_1.Cli
|
|
22
|
+
.executeCommandWithOutput(AadAppGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
|
|
23
|
+
.then((appGetOutput) => {
|
|
24
|
+
logger.log(JSON.parse(appGetOutput.stdout));
|
|
25
|
+
cb();
|
|
26
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
module.exports = new AppGetCommand();
|
|
30
|
+
//# sourceMappingURL=app-get.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Command_1 = require("../../Command");
|
|
4
|
+
class PowerPlatformCommand extends Command_1.default {
|
|
5
|
+
get resource() {
|
|
6
|
+
return 'https://api.bap.microsoft.com';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.default = PowerPlatformCommand;
|
|
10
|
+
//# sourceMappingURL=PowerPlatformCommand.js.map
|
|
@@ -20,11 +20,12 @@ class CliConfigSetCommand extends AnonymousCommand_1.default {
|
|
|
20
20
|
let value = undefined;
|
|
21
21
|
switch (args.options.key) {
|
|
22
22
|
case settingsNames_1.settingsNames.autoOpenBrowserOnLogin:
|
|
23
|
-
case settingsNames_1.settingsNames.
|
|
24
|
-
case settingsNames_1.settingsNames.printErrorsAsPlainText:
|
|
23
|
+
case settingsNames_1.settingsNames.copyDeviceCodeToClipboard:
|
|
25
24
|
case settingsNames_1.settingsNames.csvHeader:
|
|
26
25
|
case settingsNames_1.settingsNames.csvQuoted:
|
|
27
26
|
case settingsNames_1.settingsNames.csvQuotedEmpty:
|
|
27
|
+
case settingsNames_1.settingsNames.printErrorsAsPlainText:
|
|
28
|
+
case settingsNames_1.settingsNames.showHelpOnFailure:
|
|
28
29
|
value = args.options.value === 'true';
|
|
29
30
|
break;
|
|
30
31
|
default:
|