@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
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const request_1 = require("../../../../request");
|
|
6
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
7
|
+
const spo_1 = require("../../../../utils/spo");
|
|
8
|
+
const validation_1 = require("../../../../utils/validation");
|
|
9
|
+
const commands_1 = require("../../commands");
|
|
10
|
+
const SpoAppBaseCommand_1 = require("./SpoAppBaseCommand");
|
|
11
|
+
class SpoAppTeamsPackageDownloadCommand extends SpoAppBaseCommand_1.SpoAppBaseCommand {
|
|
12
|
+
get name() {
|
|
13
|
+
return commands_1.default.APP_TEAMSPACKAGE_DOWNLOAD;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return 'Downloads Teams app package for an SPFx solution deployed to tenant app catalog';
|
|
17
|
+
}
|
|
18
|
+
getTelemetryProperties(args) {
|
|
19
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
20
|
+
telemetryProps.appCatalogUrl = typeof args.options.appCatalogUrl !== 'undefined';
|
|
21
|
+
telemetryProps.appItemUniqueId = typeof args.options.appItemUniqueId !== 'undefined';
|
|
22
|
+
telemetryProps.appItemId = typeof args.options.appItemId !== 'undefined';
|
|
23
|
+
telemetryProps.appName = typeof args.options.appName !== 'undefined';
|
|
24
|
+
telemetryProps.fileName = typeof args.options.fileName !== 'undefined';
|
|
25
|
+
return telemetryProps;
|
|
26
|
+
}
|
|
27
|
+
commandAction(logger, args, cb) {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
this.appCatalogUrl = args.options.appCatalogUrl;
|
|
30
|
+
const appInfo = {
|
|
31
|
+
id: (_a = args.options.appItemId) !== null && _a !== void 0 ? _a : undefined,
|
|
32
|
+
packageFileName: (_b = args.options.fileName) !== null && _b !== void 0 ? _b : undefined
|
|
33
|
+
};
|
|
34
|
+
if (this.debug) {
|
|
35
|
+
logger.logToStderr(`appInfo: ${JSON.stringify(appInfo)}`);
|
|
36
|
+
}
|
|
37
|
+
this
|
|
38
|
+
.ensureAppInfo(logger, args, appInfo)
|
|
39
|
+
.then(_ => {
|
|
40
|
+
if (this.debug) {
|
|
41
|
+
logger.logToStderr(`ensureAppInfo: ${JSON.stringify(appInfo)}`);
|
|
42
|
+
}
|
|
43
|
+
return this.loadAppCatalogUrl(logger, args);
|
|
44
|
+
})
|
|
45
|
+
.then(_ => {
|
|
46
|
+
const requestOptions = {
|
|
47
|
+
url: `${this.appCatalogUrl}/_api/web/tenantappcatalog/downloadteamssolution(${appInfo.id})/$value`,
|
|
48
|
+
headers: {
|
|
49
|
+
accept: 'application/json;odata=nometadata'
|
|
50
|
+
},
|
|
51
|
+
responseType: 'stream'
|
|
52
|
+
};
|
|
53
|
+
return request_1.default.get(requestOptions);
|
|
54
|
+
})
|
|
55
|
+
.then((file) => {
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
const writer = fs.createWriteStream(appInfo.packageFileName);
|
|
58
|
+
file.data.pipe(writer);
|
|
59
|
+
writer.on('error', err => {
|
|
60
|
+
reject(err);
|
|
61
|
+
});
|
|
62
|
+
writer.on('close', () => {
|
|
63
|
+
resolve(appInfo.packageFileName);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
})
|
|
67
|
+
.then((file) => {
|
|
68
|
+
if (this.verbose) {
|
|
69
|
+
logger.logToStderr(`Package saved to ${file}`);
|
|
70
|
+
}
|
|
71
|
+
cb();
|
|
72
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
73
|
+
}
|
|
74
|
+
ensureAppInfo(logger, args, appInfo) {
|
|
75
|
+
if (appInfo.id && appInfo.packageFileName) {
|
|
76
|
+
return Promise.resolve();
|
|
77
|
+
}
|
|
78
|
+
if (args.options.appName && !appInfo.packageFileName) {
|
|
79
|
+
appInfo.packageFileName = this.getPackageNameFromFileName(args.options.appName);
|
|
80
|
+
}
|
|
81
|
+
return this
|
|
82
|
+
.loadAppCatalogUrl(logger, args)
|
|
83
|
+
.then(_ => {
|
|
84
|
+
const appCatalogListName = 'AppCatalog';
|
|
85
|
+
const serverRelativeAppCatalogListUrl = `${urlUtil_1.urlUtil.getServerRelativeSiteUrl(this.appCatalogUrl)}/${appCatalogListName}`;
|
|
86
|
+
let url = `${this.appCatalogUrl}/_api/web/`;
|
|
87
|
+
if (args.options.appItemUniqueId) {
|
|
88
|
+
url += `GetList('${serverRelativeAppCatalogListUrl}')/GetItemByUniqueId('${args.options.appItemUniqueId}')?$expand=File&$select=Id,File/Name`;
|
|
89
|
+
}
|
|
90
|
+
else if (args.options.appItemId) {
|
|
91
|
+
url += `GetList('${serverRelativeAppCatalogListUrl}')/GetItemById(${args.options.appItemId})?$expand=File&$select=File/Name`;
|
|
92
|
+
}
|
|
93
|
+
else if (args.options.appName) {
|
|
94
|
+
url += `getfolderbyserverrelativeurl('${appCatalogListName}')/files('${encodeURIComponent(args.options.appName)}')/ListItemAllFields?$select=Id`;
|
|
95
|
+
}
|
|
96
|
+
const requestOptions = {
|
|
97
|
+
url,
|
|
98
|
+
headers: {
|
|
99
|
+
accept: 'application/json;odata=nometadata'
|
|
100
|
+
},
|
|
101
|
+
responseType: 'json'
|
|
102
|
+
};
|
|
103
|
+
return request_1.default.get(requestOptions);
|
|
104
|
+
})
|
|
105
|
+
.then(res => {
|
|
106
|
+
if (args.options.appItemUniqueId) {
|
|
107
|
+
appInfo.id = parseInt(res.Id);
|
|
108
|
+
if (!appInfo.packageFileName) {
|
|
109
|
+
appInfo.packageFileName = this.getPackageNameFromFileName(res.File.Name);
|
|
110
|
+
}
|
|
111
|
+
return Promise.resolve();
|
|
112
|
+
}
|
|
113
|
+
if (args.options.appItemId) {
|
|
114
|
+
if (!appInfo.packageFileName) {
|
|
115
|
+
appInfo.packageFileName = this.getPackageNameFromFileName(res.File.Name);
|
|
116
|
+
}
|
|
117
|
+
return Promise.resolve();
|
|
118
|
+
}
|
|
119
|
+
// if (args.options.appName)
|
|
120
|
+
// skipped 'if' clause to provide a default code branch
|
|
121
|
+
appInfo.id = parseInt(res.Id);
|
|
122
|
+
return Promise.resolve();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
getPackageNameFromFileName(fileName) {
|
|
126
|
+
return `${path.basename(fileName, path.extname(fileName))}.zip`;
|
|
127
|
+
}
|
|
128
|
+
loadAppCatalogUrl(logger, args) {
|
|
129
|
+
if (this.appCatalogUrl) {
|
|
130
|
+
return Promise.resolve();
|
|
131
|
+
}
|
|
132
|
+
return spo_1.spo
|
|
133
|
+
.getSpoUrl(logger, this.debug)
|
|
134
|
+
.then(spoUrl => this.getAppCatalogSiteUrl(logger, spoUrl, args))
|
|
135
|
+
.then(appCatalogUrl => {
|
|
136
|
+
this.appCatalogUrl = appCatalogUrl;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
options() {
|
|
140
|
+
const options = [
|
|
141
|
+
{ option: '--appItemId [appItemId]' },
|
|
142
|
+
{ option: '--appItemUniqueId [appItemUniqueId]' },
|
|
143
|
+
{ option: '--appName [appName]' },
|
|
144
|
+
{ option: '--fileName [fileName]' },
|
|
145
|
+
{ option: '-u, --appCatalogUrl [appCatalogUrl]' }
|
|
146
|
+
];
|
|
147
|
+
const parentOptions = super.options();
|
|
148
|
+
return options.concat(parentOptions);
|
|
149
|
+
}
|
|
150
|
+
validate(args) {
|
|
151
|
+
if (!args.options.appItemUniqueId &&
|
|
152
|
+
!args.options.appItemId &&
|
|
153
|
+
!args.options.appName) {
|
|
154
|
+
return `Specify appItemUniqueId, appItemId or appName`;
|
|
155
|
+
}
|
|
156
|
+
if ((args.options.appItemUniqueId && args.options.appItemId) ||
|
|
157
|
+
(args.options.appItemUniqueId && args.options.appName) ||
|
|
158
|
+
(args.options.appItemId && args.options.appName)) {
|
|
159
|
+
return `Specify appItemUniqueId, appItemId or appName but not multiple`;
|
|
160
|
+
}
|
|
161
|
+
if (args.options.appItemUniqueId &&
|
|
162
|
+
!validation_1.validation.isValidGuid(args.options.appItemUniqueId)) {
|
|
163
|
+
return `${args.options.appItemUniqueId} is not a valid GUID`;
|
|
164
|
+
}
|
|
165
|
+
if (args.options.appItemId &&
|
|
166
|
+
isNaN(args.options.appItemId)) {
|
|
167
|
+
return `${args.options.appItemId} is not a number`;
|
|
168
|
+
}
|
|
169
|
+
if (args.options.fileName &&
|
|
170
|
+
fs.existsSync(args.options.fileName)) {
|
|
171
|
+
return `File ${args.options.fileName} already exists`;
|
|
172
|
+
}
|
|
173
|
+
if (args.options.appCatalogUrl) {
|
|
174
|
+
return validation_1.validation.isValidSharePointUrl(args.options.appCatalogUrl);
|
|
175
|
+
}
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
module.exports = new SpoAppTeamsPackageDownloadCommand();
|
|
180
|
+
//# sourceMappingURL=app-teamspackage-download.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoSiteRecycleBinItemRestoreCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.SITE_RECYCLEBINITEM_RESTORE;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Restores given items from the site recycle bin';
|
|
13
|
+
}
|
|
14
|
+
commandAction(logger, args, cb) {
|
|
15
|
+
if (this.verbose) {
|
|
16
|
+
logger.logToStderr(`Restoring items from recycle bin at ${args.options.siteUrl}...`);
|
|
17
|
+
}
|
|
18
|
+
const requestUrl = `${args.options.siteUrl}/_api/site/RecycleBin/RestoreByIds`;
|
|
19
|
+
const ids = utils_1.formatting.splitAndTrim(args.options.ids);
|
|
20
|
+
const idsChunks = [];
|
|
21
|
+
while (ids.length) {
|
|
22
|
+
idsChunks.push(ids.splice(0, 20));
|
|
23
|
+
}
|
|
24
|
+
Promise.all(idsChunks.map((idsChunk) => {
|
|
25
|
+
const requestOptions = {
|
|
26
|
+
url: requestUrl,
|
|
27
|
+
headers: {
|
|
28
|
+
'accept': 'application/json;odata=nometadata',
|
|
29
|
+
'content-type': 'application/json'
|
|
30
|
+
},
|
|
31
|
+
responseType: 'json',
|
|
32
|
+
data: {
|
|
33
|
+
ids: idsChunk
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return request_1.default.post(requestOptions);
|
|
37
|
+
})).then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
38
|
+
}
|
|
39
|
+
options() {
|
|
40
|
+
const options = [
|
|
41
|
+
{
|
|
42
|
+
option: '-u, --siteUrl <siteUrl>'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
option: '-i, --ids <ids>'
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
const parentOptions = super.options();
|
|
49
|
+
return options.concat(parentOptions);
|
|
50
|
+
}
|
|
51
|
+
validate(args) {
|
|
52
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.siteUrl);
|
|
53
|
+
if (isValidSharePointUrl !== true) {
|
|
54
|
+
return isValidSharePointUrl;
|
|
55
|
+
}
|
|
56
|
+
const invalidIds = utils_1.formatting
|
|
57
|
+
.splitAndTrim(args.options.ids)
|
|
58
|
+
.filter(id => !utils_1.validation.isValidGuid(id));
|
|
59
|
+
if (invalidIds.length > 0) {
|
|
60
|
+
return `The following IDs are invalid: ${invalidIds.join(', ')}`;
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
module.exports = new SpoSiteRecycleBinItemRestoreCommand();
|
|
66
|
+
//# sourceMappingURL=site-recyclebinitem-restore.js.map
|
|
@@ -10,6 +10,7 @@ exports.default = {
|
|
|
10
10
|
APP_LIST: `${prefix} app list`,
|
|
11
11
|
APP_REMOVE: `${prefix} app remove`,
|
|
12
12
|
APP_RETRACT: `${prefix} app retract`,
|
|
13
|
+
APP_TEAMSPACKAGE_DOWNLOAD: `${prefix} app teamspackage download`,
|
|
13
14
|
APP_UNINSTALL: `${prefix} app uninstall`,
|
|
14
15
|
APP_UPGRADE: `${prefix} app upgrade`,
|
|
15
16
|
APPPAGE_ADD: `${prefix} apppage add`,
|
|
@@ -185,6 +186,7 @@ exports.default = {
|
|
|
185
186
|
SITE_LIST: `${prefix} site list`,
|
|
186
187
|
SITE_INPLACERECORDSMANAGEMENT_SET: `${prefix} site inplacerecordsmanagement set`,
|
|
187
188
|
SITE_RECYCLEBINITEM_LIST: `${prefix} site recyclebinitem list`,
|
|
189
|
+
SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
|
|
188
190
|
SITE_REMOVE: `${prefix} site remove`,
|
|
189
191
|
SITE_RENAME: `${prefix} site rename`,
|
|
190
192
|
SITE_SET: `${prefix} site set`,
|
|
@@ -20,21 +20,22 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
20
20
|
return commands_1.default.CHAT_MESSAGE_SEND;
|
|
21
21
|
}
|
|
22
22
|
get description() {
|
|
23
|
-
return '
|
|
23
|
+
return 'Sends a chat message to a Microsoft Teams chat conversation.';
|
|
24
|
+
}
|
|
25
|
+
getTelemetryProperties(args) {
|
|
26
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
27
|
+
telemetryProps.chatId = typeof args.options.chatId !== 'undefined';
|
|
28
|
+
telemetryProps.userEmails = typeof args.options.userEmails !== 'undefined';
|
|
29
|
+
telemetryProps.chatName = typeof args.options.chatName !== 'undefined';
|
|
30
|
+
return telemetryProps;
|
|
24
31
|
}
|
|
25
32
|
commandAction(logger, args, cb) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
cb();
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
this.handleRejectedODataJsonPromise(error, logger, cb);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
33
|
+
this
|
|
34
|
+
.getChatId(logger, args)
|
|
35
|
+
.then(chatId => this.sendChatMessage(chatId, args))
|
|
36
|
+
.then(_ => {
|
|
37
|
+
cb();
|
|
38
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
38
39
|
}
|
|
39
40
|
options() {
|
|
40
41
|
const options = [
|
|
@@ -78,36 +79,44 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
78
79
|
return `${args.options.chatId} is not a valid Teams ChatId.`;
|
|
79
80
|
}
|
|
80
81
|
if (args.options.userEmails) {
|
|
81
|
-
const userEmails = args.options.userEmails
|
|
82
|
+
const userEmails = this.convertCommaSeparatedListToArray(args.options.userEmails);
|
|
82
83
|
if (!userEmails || userEmails.length === 0 || userEmails.some(e => !utils_1.validation.isValidUserPrincipalName(e))) {
|
|
83
84
|
return `${args.options.userEmails} contains one or more invalid email addresses.`;
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
return true;
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
+
getChatId(logger, args) {
|
|
89
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
|
|
91
|
+
if (args.options.chatId) {
|
|
92
|
+
return args.options.chatId;
|
|
93
|
+
}
|
|
94
|
+
return args.options.userEmails
|
|
95
|
+
? this.ensureChatIdByUserEmails(args.options.userEmails, logger)
|
|
96
|
+
: this.getChatIdByName(args.options.chatName, logger);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
ensureChatIdByUserEmails(userEmailsOption, logger) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const userEmails = this.convertCommaSeparatedListToArray(userEmailsOption);
|
|
91
102
|
const currentUserEmail = utils_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken).toLowerCase();
|
|
92
|
-
const existingChats = yield this.findExistingGroupChatsByMembers([currentUserEmail, ...userEmails]);
|
|
93
|
-
if (existingChats
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return `- ${c.id}${c.topic && ' - '}${c.topic} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()}`;
|
|
97
|
-
}).join(os.EOL);
|
|
98
|
-
throw new Error(`Multiple chat conversations with this topic found. Please disambiguate:${os.EOL}${disambiguationText}`);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
return existingChats[0].id;
|
|
102
|
-
}
|
|
103
|
+
const existingChats = yield this.findExistingGroupChatsByMembers([currentUserEmail, ...userEmails], logger);
|
|
104
|
+
if (!existingChats || existingChats.length === 0) {
|
|
105
|
+
const chat = yield this.createConversation([currentUserEmail, ...userEmails]);
|
|
106
|
+
return chat.id;
|
|
103
107
|
}
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
if (existingChats.length === 1) {
|
|
109
|
+
return existingChats[0].id;
|
|
110
|
+
}
|
|
111
|
+
const disambiguationText = existingChats.map(c => {
|
|
112
|
+
return `- ${c.id}${c.topic && ' - '}${c.topic} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()}`;
|
|
113
|
+
}).join(os.EOL);
|
|
114
|
+
throw new Error(`Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`);
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
|
-
getChatIdByName(chatName) {
|
|
117
|
+
getChatIdByName(chatName, logger) {
|
|
109
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
const existingChats = yield this.
|
|
119
|
+
const existingChats = yield this.findExistingGroupChatsByName(chatName, logger);
|
|
111
120
|
if (!existingChats || existingChats.length === 0) {
|
|
112
121
|
throw new Error('No chat conversation was found with this name.');
|
|
113
122
|
}
|
|
@@ -118,7 +127,7 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
118
127
|
const memberstring = c.members.map(m => m.email).join(', ');
|
|
119
128
|
return `- ${c.id} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()} - ${memberstring}`;
|
|
120
129
|
}).join(os.EOL);
|
|
121
|
-
throw new Error(`Multiple chat conversations with this
|
|
130
|
+
throw new Error(`Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`);
|
|
122
131
|
});
|
|
123
132
|
}
|
|
124
133
|
// This Microsoft Graph API request throws an intermittent 404 exception, saying that it cannot find the principal.
|
|
@@ -159,7 +168,7 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
159
168
|
}
|
|
160
169
|
});
|
|
161
170
|
}
|
|
162
|
-
sendChatMessage(chatId,
|
|
171
|
+
sendChatMessage(chatId, args) {
|
|
163
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
173
|
const requestOptions = {
|
|
165
174
|
url: `${this.resource}/v1.0/chats/${chatId}/messages`,
|
|
@@ -170,18 +179,18 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
170
179
|
responseType: 'json',
|
|
171
180
|
data: {
|
|
172
181
|
body: {
|
|
173
|
-
content: options.message
|
|
182
|
+
content: args.options.message
|
|
174
183
|
}
|
|
175
184
|
}
|
|
176
185
|
};
|
|
177
186
|
yield request_1.default.post(requestOptions);
|
|
178
187
|
});
|
|
179
188
|
}
|
|
180
|
-
findExistingGroupChatsByMembers(expectedMemberEmails) {
|
|
189
|
+
findExistingGroupChatsByMembers(expectedMemberEmails, logger) {
|
|
181
190
|
return __awaiter(this, void 0, void 0, function* () {
|
|
182
191
|
const endpoint = `${this.resource}/v1.0/chats?$filter=chatType eq 'group'&$expand=members&$select=id,topic,createdDateTime,members`;
|
|
183
192
|
const foundChats = [];
|
|
184
|
-
const chats = yield
|
|
193
|
+
const chats = yield utils_1.odata.getAllItems(endpoint, logger);
|
|
185
194
|
for (const chat of chats) {
|
|
186
195
|
const chatMembers = chat.members;
|
|
187
196
|
if (chatMembers.length === expectedMemberEmails.length) {
|
|
@@ -194,31 +203,14 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
194
203
|
return foundChats;
|
|
195
204
|
});
|
|
196
205
|
}
|
|
197
|
-
|
|
206
|
+
findExistingGroupChatsByName(name, logger) {
|
|
198
207
|
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
-
const endpoint = `${this.resource}/v1.0/chats?$filter=topic eq '${encodeURIComponent(
|
|
200
|
-
|
|
201
|
-
return chats;
|
|
208
|
+
const endpoint = `${this.resource}/v1.0/chats?$filter=topic eq '${encodeURIComponent(name)}'&$expand=members&$select=id,topic,createdDateTime,chatType`;
|
|
209
|
+
return utils_1.odata.getAllItems(endpoint, logger);
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
|
-
|
|
205
|
-
return
|
|
206
|
-
const requestOptions = {
|
|
207
|
-
url: url,
|
|
208
|
-
headers: {
|
|
209
|
-
accept: 'application/json;odata.metadata=none'
|
|
210
|
-
},
|
|
211
|
-
responseType: 'json'
|
|
212
|
-
};
|
|
213
|
-
const res = yield request_1.default.get(requestOptions);
|
|
214
|
-
items = items.concat(res.value);
|
|
215
|
-
if (res['@odata.nextLink']) {
|
|
216
|
-
return yield this.getAllChats(res['@odata.nextLink'], items);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
return items;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
212
|
+
convertCommaSeparatedListToArray(userEmailsString) {
|
|
213
|
+
return userEmailsString.toLowerCase().replace(/\s/g, '').split(',').filter(e => e && e !== '');
|
|
222
214
|
}
|
|
223
215
|
}
|
|
224
216
|
module.exports = new TeamsChatMessageSendCommand();
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const prefix = 'tenant';
|
|
4
4
|
exports.default = {
|
|
5
|
-
AUDITLOG_REPORT: `${prefix} auditlog report`,
|
|
6
5
|
ID_GET: `${prefix} id get`,
|
|
7
6
|
REPORT_ACTIVEUSERCOUNTS: `${prefix} report activeusercounts`,
|
|
8
7
|
REPORT_ACTIVEUSERDETAIL: `${prefix} report activeuserdetail`,
|
|
@@ -11,14 +10,10 @@ exports.default = {
|
|
|
11
10
|
REPORT_OFFICE365ACTIVATIONSUSERCOUNTS: `${prefix} report office365activationsusercounts`,
|
|
12
11
|
REPORT_SERVICESUSERCOUNTS: `${prefix} report servicesusercounts`,
|
|
13
12
|
SERVICEANNOUNCEMENT_HEALTHISSUE_GET: `${prefix} serviceannouncement healthissue get`,
|
|
14
|
-
SERVICE_LIST: `${prefix} service list`,
|
|
15
|
-
SERVICE_MESSAGE_LIST: `${prefix} service message list`,
|
|
16
|
-
SERVICE_REPORT_HISTORICALSERVICESTATUS: `${prefix} service report historicalservicestatus`,
|
|
17
13
|
SERVICEANNOUNCEMENT_HEALTH_GET: `${prefix} serviceannouncement health get`,
|
|
18
14
|
SERVICEANNOUNCEMENT_HEALTH_LIST: `${prefix} serviceannouncement health list`,
|
|
19
15
|
SERVICEANNOUNCEMENT_HEALTHISSUE_LIST: `${prefix} serviceannouncement healthissue list`,
|
|
20
16
|
SERVICEANNOUNCEMENT_MESSAGE_GET: `${prefix} serviceannouncement message get`,
|
|
21
|
-
SERVICEANNOUNCEMENT_MESSAGE_LIST: `${prefix} serviceannouncement message list
|
|
22
|
-
STATUS_LIST: `${prefix} status list`
|
|
17
|
+
SERVICEANNOUNCEMENT_MESSAGE_LIST: `${prefix} serviceannouncement message list`
|
|
23
18
|
};
|
|
24
19
|
//# sourceMappingURL=commands.js.map
|
package/dist/settingsNames.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.settingsNames = void 0;
|
|
4
4
|
const settingsNames = {
|
|
5
5
|
autoOpenBrowserOnLogin: 'autoOpenBrowserOnLogin',
|
|
6
|
+
copyDeviceCodeToClipboard: 'copyDeviceCodeToClipboard',
|
|
6
7
|
csvEscape: 'csvEscape',
|
|
7
8
|
csvHeader: 'csvHeader',
|
|
8
9
|
csvQuote: 'csvQuote',
|
|
@@ -11,6 +12,7 @@ const settingsNames = {
|
|
|
11
12
|
errorOutput: 'errorOutput',
|
|
12
13
|
output: 'output',
|
|
13
14
|
printErrorsAsPlainText: 'printErrorsAsPlainText',
|
|
15
|
+
prompt: 'prompt',
|
|
14
16
|
showHelpOnFailure: 'showHelpOnFailure'
|
|
15
17
|
};
|
|
16
18
|
exports.settingsNames = settingsNames;
|
package/dist/utils/formatting.js
CHANGED
package/dist/utils/fsUtil.js
CHANGED
|
@@ -3,6 +3,64 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fsUtil = void 0;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
|
+
const copyCommands = {
|
|
7
|
+
bash: {
|
|
8
|
+
copyCommand: 'cp',
|
|
9
|
+
copyDestinationParam: ' '
|
|
10
|
+
},
|
|
11
|
+
powershell: {
|
|
12
|
+
copyCommand: 'Copy-Item',
|
|
13
|
+
copyDestinationParam: ' -Destination '
|
|
14
|
+
},
|
|
15
|
+
cmd: {
|
|
16
|
+
copyCommand: 'copy',
|
|
17
|
+
copyDestinationParam: ' '
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const createDirectoryCommands = {
|
|
21
|
+
bash: {
|
|
22
|
+
createDirectoryCommand: 'mkdir',
|
|
23
|
+
createDirectoryPathParam: ' "',
|
|
24
|
+
createDirectoryNameParam: '/',
|
|
25
|
+
createDirectoryItemTypeParam: '"'
|
|
26
|
+
},
|
|
27
|
+
powershell: {
|
|
28
|
+
createDirectoryCommand: 'New-Item',
|
|
29
|
+
createDirectoryPathParam: ' -Path "',
|
|
30
|
+
createDirectoryNameParam: '" -Name "',
|
|
31
|
+
createDirectoryItemTypeParam: '" -ItemType "directory"'
|
|
32
|
+
},
|
|
33
|
+
cmd: {
|
|
34
|
+
createDirectoryCommand: 'mkdir',
|
|
35
|
+
createDirectoryPathParam: ' "',
|
|
36
|
+
createDirectoryNameParam: '\\',
|
|
37
|
+
createDirectoryItemTypeParam: '"'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const addFileCommands = {
|
|
41
|
+
bash: {
|
|
42
|
+
addFileCommand: 'cat > [FILEPATH] << EOF [FILECONTENT]EOF'
|
|
43
|
+
},
|
|
44
|
+
powershell: {
|
|
45
|
+
addFileCommand: `@"[FILECONTENT]"@ | Out-File -FilePath "[FILEPATH]"
|
|
46
|
+
`
|
|
47
|
+
},
|
|
48
|
+
cmd: {
|
|
49
|
+
addFileCommand: `echo [FILECONTENT] > "[FILEPATH]"
|
|
50
|
+
`
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const removeFileCommands = {
|
|
54
|
+
bash: {
|
|
55
|
+
removeFileCommand: 'rm'
|
|
56
|
+
},
|
|
57
|
+
powershell: {
|
|
58
|
+
removeFileCommand: 'Remove-Item'
|
|
59
|
+
},
|
|
60
|
+
cmd: {
|
|
61
|
+
removeFileCommand: 'del'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
6
64
|
exports.fsUtil = {
|
|
7
65
|
readdirR(dir) {
|
|
8
66
|
return fs.statSync(dir).isDirectory()
|
|
@@ -31,6 +89,18 @@ exports.fsUtil = {
|
|
|
31
89
|
},
|
|
32
90
|
getSafeFileName(input) {
|
|
33
91
|
return input.replace(/'/g, "''");
|
|
92
|
+
},
|
|
93
|
+
getCopyCommand(command, shell) {
|
|
94
|
+
return copyCommands[shell][command];
|
|
95
|
+
},
|
|
96
|
+
getDirectoryCommand(command, shell) {
|
|
97
|
+
return createDirectoryCommands[shell][command];
|
|
98
|
+
},
|
|
99
|
+
getAddCommand(command, shell) {
|
|
100
|
+
return addFileCommands[shell][command];
|
|
101
|
+
},
|
|
102
|
+
getRemoveCommand(command, shell) {
|
|
103
|
+
return removeFileCommands[shell][command];
|
|
34
104
|
}
|
|
35
105
|
};
|
|
36
106
|
//# sourceMappingURL=fsUtil.js.map
|
package/dist/utils/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];
|
|
@@ -14,9 +18,11 @@ __exportStar(require("./accessToken"), exports);
|
|
|
14
18
|
__exportStar(require("./formatting"), exports);
|
|
15
19
|
__exportStar(require("./fsUtil"), exports);
|
|
16
20
|
__exportStar(require("./odata"), exports);
|
|
21
|
+
__exportStar(require("./packageManager"), exports);
|
|
17
22
|
__exportStar(require("./sinonUtil"), exports);
|
|
18
23
|
__exportStar(require("./spfx"), exports);
|
|
19
24
|
__exportStar(require("./spo"), exports);
|
|
25
|
+
__exportStar(require("./types"), exports);
|
|
20
26
|
__exportStar(require("./urlUtil"), exports);
|
|
21
27
|
__exportStar(require("./validation"), exports);
|
|
22
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packageManager = void 0;
|
|
4
|
+
const packageCommands = {
|
|
5
|
+
npm: {
|
|
6
|
+
install: 'npm i -SE',
|
|
7
|
+
installDev: 'npm i -DE',
|
|
8
|
+
uninstall: 'npm un -S',
|
|
9
|
+
uninstallDev: 'npm un -D'
|
|
10
|
+
},
|
|
11
|
+
pnpm: {
|
|
12
|
+
install: 'pnpm i -E',
|
|
13
|
+
installDev: 'pnpm i -DE',
|
|
14
|
+
uninstall: 'pnpm un',
|
|
15
|
+
uninstallDev: 'pnpm un'
|
|
16
|
+
},
|
|
17
|
+
yarn: {
|
|
18
|
+
install: 'yarn add -E',
|
|
19
|
+
installDev: 'yarn add -DE',
|
|
20
|
+
uninstall: 'yarn remove',
|
|
21
|
+
uninstallDev: 'yarn remove'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.packageManager = {
|
|
25
|
+
getPackageManagerCommand(command, packageManager) {
|
|
26
|
+
return packageCommands[packageManager][command];
|
|
27
|
+
},
|
|
28
|
+
mapPackageManagerCommand({ command, packagesDepExact, packagesDevExact, packagesDepUn, packagesDevUn, packageMgr }) {
|
|
29
|
+
// matches must be in this particular order to avoid false matches, eg.
|
|
30
|
+
// uninstallDev contains install
|
|
31
|
+
if (command.startsWith(`${exports.packageManager.getPackageManagerCommand('uninstallDev', packageMgr)} `)) {
|
|
32
|
+
packagesDevUn.push(command.replace(exports.packageManager.getPackageManagerCommand('uninstallDev', packageMgr), '').trim());
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (command.startsWith(`${exports.packageManager.getPackageManagerCommand('installDev', packageMgr)} `)) {
|
|
36
|
+
packagesDevExact.push(command.replace(exports.packageManager.getPackageManagerCommand('installDev', packageMgr), '').trim());
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (command.startsWith(`${exports.packageManager.getPackageManagerCommand('uninstall', packageMgr)} `)) {
|
|
40
|
+
packagesDepUn.push(command.replace(exports.packageManager.getPackageManagerCommand('uninstall', packageMgr), '').trim());
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (command.startsWith(`${exports.packageManager.getPackageManagerCommand('install', packageMgr)} `)) {
|
|
44
|
+
packagesDepExact.push(command.replace(exports.packageManager.getPackageManagerCommand('install', packageMgr), '').trim());
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
reducePackageManagerCommand({ packagesDepExact, packagesDevExact, packagesDepUn, packagesDevUn, packageMgr }) {
|
|
48
|
+
const commandsToExecute = [];
|
|
49
|
+
// uninstall commands must come first otherwise there is a chance that
|
|
50
|
+
// whatever we recommended to install, will be immediately uninstalled
|
|
51
|
+
if (packagesDepUn.length > 0) {
|
|
52
|
+
commandsToExecute.push(`${exports.packageManager.getPackageManagerCommand('uninstall', packageMgr)} ${packagesDepUn.join(' ')}`);
|
|
53
|
+
}
|
|
54
|
+
if (packagesDevUn.length > 0) {
|
|
55
|
+
commandsToExecute.push(`${exports.packageManager.getPackageManagerCommand('uninstallDev', packageMgr)} ${packagesDevUn.join(' ')}`);
|
|
56
|
+
}
|
|
57
|
+
if (packagesDepExact.length > 0) {
|
|
58
|
+
commandsToExecute.push(`${exports.packageManager.getPackageManagerCommand('install', packageMgr)} ${packagesDepExact.join(' ')}`);
|
|
59
|
+
}
|
|
60
|
+
if (packagesDevExact.length > 0) {
|
|
61
|
+
commandsToExecute.push(`${exports.packageManager.getPackageManagerCommand('installDev', packageMgr)} ${packagesDevExact.join(' ')}`);
|
|
62
|
+
}
|
|
63
|
+
return commandsToExecute;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=packageManager.js.map
|