@microsoft/managed-apps-cli 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.txt +9549 -0
- package/dist/AddConnector-4AMM746J.js +41 -0
- package/dist/AuthStatus-ZZIP3LBD.js +11 -0
- package/dist/AuthSwitch-HK7JU2FR.js +13 -0
- package/dist/Bin.js +8 -3
- package/dist/BuildMaafApp-MOTZOLJZ.js +11 -0
- package/dist/Cli-6CCXMCPX.js +54 -0
- package/dist/CreateMaafApp-TUO72CW7.js +20 -0
- package/dist/DeleteMaafApp-MZVGIAX3.js +11 -0
- package/dist/DeployMaafApp-KXATM3E3.js +14 -0
- package/dist/Dev-SHIA5S7X.js +14 -0
- package/dist/EnvironmentVariableAuthenticationProvider-5YTMRAE4.js +11 -0
- package/dist/GetMaafApp-ELB5KMHW.js +11 -0
- package/dist/GetMaafBuildStatus-3W7LI5TJ.js +11 -0
- package/dist/GetSettings-NM6H2U5F.js +11 -0
- package/dist/Init-CH5DUQWA.js +11 -0
- package/dist/ListConnectorActions-7SIFGPYR.js +11 -0
- package/dist/ListConnectors-TRKIWRVQ.js +11 -0
- package/dist/ListMaafApps-RT3PGZSJ.js +11 -0
- package/dist/Login-HG5S7LBC.js +11 -0
- package/dist/Logout-BUPHLOAH.js +11 -0
- package/dist/MockFetch-4CYTSNJ7.js +13 -0
- package/dist/NoOpAuthenticationProvider-DX3XNXF5.js +11 -0
- package/dist/NodeMsalAuthenticationProvider-HTH3V3G2.js +17 -0
- package/dist/Pack-AHKC2MYF.js +8 -0
- package/dist/PlayMaafApp-LWKJU2IN.js +12 -0
- package/dist/RefreshDataSource-ZFZJXJ5L.js +11 -0
- package/dist/RefreshGitAuth-5A3SX2HC.js +11 -0
- package/dist/RemoveDataSource-57JJLK5I.js +14 -0
- package/dist/ServicePrincipalAuthenticationProvider-SVKDZG6X.js +11 -0
- package/dist/SetSetting-RB3F7IXG.js +11 -0
- package/dist/ShareLinkCreate-7BCDPWY6.js +11 -0
- package/dist/ShareLinkList-4BI3WMNN.js +11 -0
- package/dist/ShareLinkRevoke-EEJVCRCY.js +11 -0
- package/dist/ShareList-LJDAEGI3.js +11 -0
- package/dist/ShareMaafApp-QFRXLYUD.js +11 -0
- package/dist/ShowMaafApp-3KK6NUG2.js +11 -0
- package/dist/TelemetrySettings-A474HALH.js +11 -0
- package/dist/UnshareMaafApp-423RNXCN.js +11 -0
- package/dist/acorn-CYBWGE5M.js +23 -0
- package/dist/angular-Q62TJP23.js +11 -0
- package/dist/babel-AOXBHIIS.js +22 -0
- package/dist/chunk-3BRAT6NP.js +11 -0
- package/dist/chunk-3YRE4IQ3.js +132 -0
- package/dist/chunk-5AUOEXAR.js +50 -0
- package/dist/chunk-6FFQN2SO.js +13 -0
- package/dist/chunk-6MXOK2LG.js +11 -0
- package/dist/chunk-7NXJAIJX.js +11 -0
- package/dist/chunk-DREO7EYO.js +20 -0
- package/dist/chunk-EV3TTTOT.js +8 -0
- package/dist/chunk-G33Q5FWT.js +42325 -0
- package/dist/chunk-HBLO3WDD.js +13 -0
- package/dist/chunk-MFPX2RFH.js +11 -0
- package/dist/chunk-NP2KJOYC.js +12 -0
- package/dist/chunk-OL6CTXQR.js +11 -0
- package/dist/chunk-PVAIJSAI.js +11 -0
- package/dist/chunk-QAFCXGBD.js +11 -0
- package/dist/chunk-QSB5P4RM.js +38 -0
- package/dist/chunk-RBG2H562.js +11 -0
- package/dist/chunk-S5HEU7XK.js +11 -0
- package/dist/chunk-TYRVM4PP.js +8 -0
- package/dist/chunk-U36HMOQW.js +77 -0
- package/dist/chunk-UBTSW22U.js +11 -0
- package/dist/chunk-USRRI5H4.js +11 -0
- package/dist/chunk-UT667QSU.js +8 -0
- package/dist/chunk-VFSTQAZ2.js +12 -0
- package/dist/chunk-VNEZZ3RI.js +11 -0
- package/dist/chunk-W7EWOZPO.js +104 -0
- package/dist/chunk-Y5AMO72S.js +10 -0
- package/dist/chunk-YIKNM523.js +15 -0
- package/dist/chunk-YMXXWGRV.js +11 -0
- package/dist/estree-HPTPQIMZ.js +51 -0
- package/dist/flow-B6JUMONE.js +27 -0
- package/dist/glimmer-36KZ3DJ5.js +44 -0
- package/dist/graphql-E6CIFZFV.js +35 -0
- package/dist/html-BUTTPQE6.js +32 -0
- package/dist/markdown-K2C5OZHT.js +69 -0
- package/dist/meriyah-27UE2OSX.js +12 -0
- package/dist/postcss-QUHZLBB7.js +68 -0
- package/dist/typescript-G2G6TDZF.js +28 -0
- package/dist/yaml-W5P5CGFK.js +166 -0
- package/package.json +21 -16
- package/dist/ArgumentProvider.d.ts +0 -144
- package/dist/ArgumentProvider.d.ts.map +0 -1
- package/dist/ArgumentProvider.js +0 -493
- package/dist/ArgumentProvider.js.map +0 -1
- package/dist/Authentication/ActiveAccountStore.d.ts +0 -24
- package/dist/Authentication/ActiveAccountStore.d.ts.map +0 -1
- package/dist/Authentication/ActiveAccountStore.js +0 -54
- package/dist/Authentication/ActiveAccountStore.js.map +0 -1
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts +0 -26
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts.map +0 -1
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js +0 -31
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js.map +0 -1
- package/dist/Authentication/NoOpAuthenticationProvider.d.ts +0 -25
- package/dist/Authentication/NoOpAuthenticationProvider.d.ts.map +0 -1
- package/dist/Authentication/NoOpAuthenticationProvider.js +0 -31
- package/dist/Authentication/NoOpAuthenticationProvider.js.map +0 -1
- package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +0 -103
- package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +0 -1
- package/dist/Authentication/NodeMsalAuthenticationProvider.js +0 -391
- package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +0 -1
- package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts +0 -23
- package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts.map +0 -1
- package/dist/Authentication/ServicePrincipalAuthenticationProvider.js +0 -60
- package/dist/Authentication/ServicePrincipalAuthenticationProvider.js.map +0 -1
- package/dist/Bin.d.ts +0 -6
- package/dist/Bin.d.ts.map +0 -1
- package/dist/Bin.js.map +0 -1
- package/dist/Cli.d.ts +0 -2
- package/dist/Cli.d.ts.map +0 -1
- package/dist/Cli.js +0 -207
- package/dist/Cli.js.map +0 -1
- package/dist/CliSettings.d.ts +0 -17
- package/dist/CliSettings.d.ts.map +0 -1
- package/dist/CliSettings.js +0 -103
- package/dist/CliSettings.js.map +0 -1
- package/dist/CliUtils.d.ts +0 -108
- package/dist/CliUtils.d.ts.map +0 -1
- package/dist/CliUtils.js +0 -217
- package/dist/CliUtils.js.map +0 -1
- package/dist/Constants/CliConstants.d.ts +0 -6
- package/dist/Constants/CliConstants.d.ts.map +0 -1
- package/dist/Constants/CliConstants.js +0 -6
- package/dist/Constants/CliConstants.js.map +0 -1
- package/dist/Constants/CommandRegistry.d.ts +0 -22
- package/dist/Constants/CommandRegistry.d.ts.map +0 -1
- package/dist/Constants/CommandRegistry.js +0 -245
- package/dist/Constants/CommandRegistry.js.map +0 -1
- package/dist/Constants/HelpStrings.d.ts +0 -432
- package/dist/Constants/HelpStrings.d.ts.map +0 -1
- package/dist/Constants/HelpStrings.js +0 -623
- package/dist/Constants/HelpStrings.js.map +0 -1
- package/dist/Constants.d.ts +0 -18
- package/dist/Constants.d.ts.map +0 -1
- package/dist/Constants.js +0 -41
- package/dist/Constants.js.map +0 -1
- package/dist/Errors/CliError.d.ts +0 -5
- package/dist/Errors/CliError.d.ts.map +0 -1
- package/dist/Errors/CliError.js +0 -7
- package/dist/Errors/CliError.js.map +0 -1
- package/dist/Errors/GitHubErrorMap.d.ts +0 -68
- package/dist/Errors/GitHubErrorMap.d.ts.map +0 -1
- package/dist/Errors/GitHubErrorMap.js +0 -238
- package/dist/Errors/GitHubErrorMap.js.map +0 -1
- package/dist/FS/CliFs.d.ts +0 -41
- package/dist/FS/CliFs.d.ts.map +0 -1
- package/dist/FS/CliFs.js +0 -136
- package/dist/FS/CliFs.js.map +0 -1
- package/dist/HttpClient/CliHttpClient.d.ts +0 -43
- package/dist/HttpClient/CliHttpClient.d.ts.map +0 -1
- package/dist/HttpClient/CliHttpClient.js +0 -320
- package/dist/HttpClient/CliHttpClient.js.map +0 -1
- package/dist/HttpClient/HttpForward.d.ts +0 -9
- package/dist/HttpClient/HttpForward.d.ts.map +0 -1
- package/dist/HttpClient/HttpForward.js +0 -56
- package/dist/HttpClient/HttpForward.js.map +0 -1
- package/dist/Logger/BufferedTelemetryWriter.d.ts +0 -20
- package/dist/Logger/BufferedTelemetryWriter.d.ts.map +0 -1
- package/dist/Logger/BufferedTelemetryWriter.js +0 -163
- package/dist/Logger/BufferedTelemetryWriter.js.map +0 -1
- package/dist/Logger/CliLogger.d.ts +0 -59
- package/dist/Logger/CliLogger.d.ts.map +0 -1
- package/dist/Logger/CliLogger.js +0 -364
- package/dist/Logger/CliLogger.js.map +0 -1
- package/dist/Logger/ConsoleWriter.d.ts +0 -23
- package/dist/Logger/ConsoleWriter.d.ts.map +0 -1
- package/dist/Logger/ConsoleWriter.js +0 -66
- package/dist/Logger/ConsoleWriter.js.map +0 -1
- package/dist/Logger/Constants.d.ts +0 -6
- package/dist/Logger/Constants.d.ts.map +0 -1
- package/dist/Logger/Constants.js +0 -15
- package/dist/Logger/Constants.js.map +0 -1
- package/dist/Logger/LoggerSettings.d.ts +0 -18
- package/dist/Logger/LoggerSettings.d.ts.map +0 -1
- package/dist/Logger/LoggerSettings.js +0 -78
- package/dist/Logger/LoggerSettings.js.map +0 -1
- package/dist/Logger/OneDSWriter.d.ts +0 -26
- package/dist/Logger/OneDSWriter.d.ts.map +0 -1
- package/dist/Logger/OneDSWriter.js +0 -211
- package/dist/Logger/OneDSWriter.js.map +0 -1
- package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts +0 -5
- package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts.map +0 -1
- package/dist/Logger/Scrubber/ScrubCustomDimensions.js +0 -46
- package/dist/Logger/Scrubber/ScrubCustomDimensions.js.map +0 -1
- package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts +0 -27
- package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts.map +0 -1
- package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js +0 -168
- package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js.map +0 -1
- package/dist/Logger/Scrubber/ScrubUtils.d.ts +0 -8
- package/dist/Logger/Scrubber/ScrubUtils.d.ts.map +0 -1
- package/dist/Logger/Scrubber/ScrubUtils.js +0 -34
- package/dist/Logger/Scrubber/ScrubUtils.js.map +0 -1
- package/dist/Middletier/FunctionsBundler.d.ts +0 -17
- package/dist/Middletier/FunctionsBundler.d.ts.map +0 -1
- package/dist/Middletier/FunctionsBundler.js +0 -169
- package/dist/Middletier/FunctionsBundler.js.map +0 -1
- package/dist/Middletier/PackFunctions.d.ts +0 -53
- package/dist/Middletier/PackFunctions.d.ts.map +0 -1
- package/dist/Middletier/PackFunctions.js +0 -123
- package/dist/Middletier/PackFunctions.js.map +0 -1
- package/dist/Testing/MockFetch.d.ts +0 -23
- package/dist/Testing/MockFetch.d.ts.map +0 -1
- package/dist/Testing/MockFetch.js +0 -177
- package/dist/Testing/MockFetch.js.map +0 -1
- package/dist/Testing/MockRoutes.d.ts +0 -34
- package/dist/Testing/MockRoutes.d.ts.map +0 -1
- package/dist/Testing/MockRoutes.js +0 -226
- package/dist/Testing/MockRoutes.js.map +0 -1
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.js +0 -25
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.js.map +0 -1
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.js +0 -55
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.js.map +0 -1
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.js +0 -1970
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.js.map +0 -1
- package/dist/Testing/fixtures/connectors/kusto.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/kusto.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/kusto.js +0 -1333
- package/dist/Testing/fixtures/connectors/kusto.js.map +0 -1
- package/dist/Testing/fixtures/connectors/msnweather.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/msnweather.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/msnweather.js +0 -917
- package/dist/Testing/fixtures/connectors/msnweather.js.map +0 -1
- package/dist/Testing/fixtures/connectors/office365groups.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/office365groups.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/office365groups.js +0 -2144
- package/dist/Testing/fixtures/connectors/office365groups.js.map +0 -1
- package/dist/Testing/fixtures/connectors/office365users.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/office365users.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/office365users.js +0 -1969
- package/dist/Testing/fixtures/connectors/office365users.js.map +0 -1
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.js +0 -4873
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.js.map +0 -1
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.js +0 -4682
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.js.map +0 -1
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js +0 -1078
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js.map +0 -1
- package/dist/Testing/fixtures/connectors/sharepointonline.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/sharepointonline.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/sharepointonline.js +0 -28
- package/dist/Testing/fixtures/connectors/sharepointonline.js.map +0 -1
- package/dist/Testing/fixtures/connectors/teams.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/teams.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/teams.js +0 -9987
- package/dist/Testing/fixtures/connectors/teams.js.map +0 -1
- package/dist/Testing/fixtures/connectors/translatorv2.d.ts +0 -6
- package/dist/Testing/fixtures/connectors/translatorv2.d.ts.map +0 -1
- package/dist/Testing/fixtures/connectors/translatorv2.js +0 -307
- package/dist/Testing/fixtures/connectors/translatorv2.js.map +0 -1
- package/dist/Testing/fixtures/index.d.ts +0 -23
- package/dist/Testing/fixtures/index.d.ts.map +0 -1
- package/dist/Testing/fixtures/index.js +0 -96
- package/dist/Testing/fixtures/index.js.map +0 -1
- package/dist/Types/Argument.types.d.ts +0 -28
- package/dist/Types/Argument.types.d.ts.map +0 -1
- package/dist/Types/Argument.types.js +0 -5
- package/dist/Types/Argument.types.js.map +0 -1
- package/dist/Types/Cli.types.d.ts +0 -82
- package/dist/Types/Cli.types.d.ts.map +0 -1
- package/dist/Types/Cli.types.js +0 -5
- package/dist/Types/Cli.types.js.map +0 -1
- package/dist/Types/Command.types.d.ts +0 -69
- package/dist/Types/Command.types.d.ts.map +0 -1
- package/dist/Types/Command.types.js +0 -20
- package/dist/Types/Command.types.js.map +0 -1
- package/dist/Types/Datasource.types.d.ts +0 -30
- package/dist/Types/Datasource.types.d.ts.map +0 -1
- package/dist/Types/Datasource.types.js +0 -5
- package/dist/Types/Datasource.types.js.map +0 -1
- package/dist/Types/LoggerTypes.types.d.ts +0 -18
- package/dist/Types/LoggerTypes.types.d.ts.map +0 -1
- package/dist/Types/LoggerTypes.types.js +0 -5
- package/dist/Types/LoggerTypes.types.js.map +0 -1
- package/dist/Utils/BuildPolling.d.ts +0 -43
- package/dist/Utils/BuildPolling.d.ts.map +0 -1
- package/dist/Utils/BuildPolling.js +0 -139
- package/dist/Utils/BuildPolling.js.map +0 -1
- package/dist/Utils/BuildVerbDescriptionTable.d.ts +0 -29
- package/dist/Utils/BuildVerbDescriptionTable.d.ts.map +0 -1
- package/dist/Utils/BuildVerbDescriptionTable.js +0 -147
- package/dist/Utils/BuildVerbDescriptionTable.js.map +0 -1
- package/dist/Utils/CoerceCliVersion.d.ts +0 -27
- package/dist/Utils/CoerceCliVersion.d.ts.map +0 -1
- package/dist/Utils/CoerceCliVersion.js +0 -67
- package/dist/Utils/CoerceCliVersion.js.map +0 -1
- package/dist/Utils/ConnectorIds.d.ts +0 -12
- package/dist/Utils/ConnectorIds.d.ts.map +0 -1
- package/dist/Utils/ConnectorIds.js +0 -20
- package/dist/Utils/ConnectorIds.js.map +0 -1
- package/dist/Utils/ConsoleOutput.d.ts +0 -86
- package/dist/Utils/ConsoleOutput.d.ts.map +0 -1
- package/dist/Utils/ConsoleOutput.js +0 -162
- package/dist/Utils/ConsoleOutput.js.map +0 -1
- package/dist/Utils/DcfRecovery.d.ts +0 -84
- package/dist/Utils/DcfRecovery.d.ts.map +0 -1
- package/dist/Utils/DcfRecovery.js +0 -246
- package/dist/Utils/DcfRecovery.js.map +0 -1
- package/dist/Utils/DetectPackageManager.d.ts +0 -9
- package/dist/Utils/DetectPackageManager.d.ts.map +0 -1
- package/dist/Utils/DetectPackageManager.js +0 -24
- package/dist/Utils/DetectPackageManager.js.map +0 -1
- package/dist/Utils/DownloadTemplate.d.ts +0 -45
- package/dist/Utils/DownloadTemplate.d.ts.map +0 -1
- package/dist/Utils/DownloadTemplate.js +0 -161
- package/dist/Utils/DownloadTemplate.js.map +0 -1
- package/dist/Utils/EnhanceNetworkError.d.ts +0 -14
- package/dist/Utils/EnhanceNetworkError.d.ts.map +0 -1
- package/dist/Utils/EnhanceNetworkError.js +0 -61
- package/dist/Utils/EnhanceNetworkError.js.map +0 -1
- package/dist/Utils/EnvVars.d.ts +0 -17
- package/dist/Utils/EnvVars.d.ts.map +0 -1
- package/dist/Utils/EnvVars.js +0 -38
- package/dist/Utils/EnvVars.js.map +0 -1
- package/dist/Utils/EnvironmentRoutingUtils.d.ts +0 -81
- package/dist/Utils/EnvironmentRoutingUtils.d.ts.map +0 -1
- package/dist/Utils/EnvironmentRoutingUtils.js +0 -204
- package/dist/Utils/EnvironmentRoutingUtils.js.map +0 -1
- package/dist/Utils/FindAvailablePort.d.ts +0 -39
- package/dist/Utils/FindAvailablePort.d.ts.map +0 -1
- package/dist/Utils/FindAvailablePort.js +0 -105
- package/dist/Utils/FindAvailablePort.js.map +0 -1
- package/dist/Utils/GitCredentialConfig.d.ts +0 -12
- package/dist/Utils/GitCredentialConfig.d.ts.map +0 -1
- package/dist/Utils/GitCredentialConfig.js +0 -32
- package/dist/Utils/GitCredentialConfig.js.map +0 -1
- package/dist/Utils/GitErrorClassifier.d.ts +0 -40
- package/dist/Utils/GitErrorClassifier.d.ts.map +0 -1
- package/dist/Utils/GitErrorClassifier.js +0 -120
- package/dist/Utils/GitErrorClassifier.js.map +0 -1
- package/dist/Utils/GitHubDcfFlow.d.ts +0 -59
- package/dist/Utils/GitHubDcfFlow.d.ts.map +0 -1
- package/dist/Utils/GitHubDcfFlow.js +0 -165
- package/dist/Utils/GitHubDcfFlow.js.map +0 -1
- package/dist/Utils/GitRunner.d.ts +0 -107
- package/dist/Utils/GitRunner.d.ts.map +0 -1
- package/dist/Utils/GitRunner.js +0 -89
- package/dist/Utils/GitRunner.js.map +0 -1
- package/dist/Utils/GitUtils.d.ts +0 -59
- package/dist/Utils/GitUtils.d.ts.map +0 -1
- package/dist/Utils/GitUtils.js +0 -198
- package/dist/Utils/GitUtils.js.map +0 -1
- package/dist/Utils/GitVersionChecker.d.ts +0 -38
- package/dist/Utils/GitVersionChecker.d.ts.map +0 -1
- package/dist/Utils/GitVersionChecker.js +0 -64
- package/dist/Utils/GitVersionChecker.js.map +0 -1
- package/dist/Utils/HelpBanner.d.ts +0 -11
- package/dist/Utils/HelpBanner.d.ts.map +0 -1
- package/dist/Utils/HelpBanner.js +0 -15
- package/dist/Utils/HelpBanner.js.map +0 -1
- package/dist/Utils/MaafAppConfig.d.ts +0 -24
- package/dist/Utils/MaafAppConfig.d.ts.map +0 -1
- package/dist/Utils/MaafAppConfig.js +0 -38
- package/dist/Utils/MaafAppConfig.js.map +0 -1
- package/dist/Utils/NodeVersionChecker.d.ts +0 -10
- package/dist/Utils/NodeVersionChecker.d.ts.map +0 -1
- package/dist/Utils/NodeVersionChecker.js +0 -21
- package/dist/Utils/NodeVersionChecker.js.map +0 -1
- package/dist/Utils/Paging.d.ts +0 -29
- package/dist/Utils/Paging.d.ts.map +0 -1
- package/dist/Utils/Paging.js +0 -102
- package/dist/Utils/Paging.js.map +0 -1
- package/dist/Utils/PinCli.d.ts +0 -33
- package/dist/Utils/PinCli.d.ts.map +0 -1
- package/dist/Utils/PinCli.js +0 -77
- package/dist/Utils/PinCli.js.map +0 -1
- package/dist/Utils/ReadPackageJson.d.ts +0 -9
- package/dist/Utils/ReadPackageJson.d.ts.map +0 -1
- package/dist/Utils/ReadPackageJson.js +0 -13
- package/dist/Utils/ReadPackageJson.js.map +0 -1
- package/dist/Utils/RepoDetails.d.ts +0 -29
- package/dist/Utils/RepoDetails.d.ts.map +0 -1
- package/dist/Utils/RepoDetails.js +0 -37
- package/dist/Utils/RepoDetails.js.map +0 -1
- package/dist/Utils/RepoOption.d.ts +0 -42
- package/dist/Utils/RepoOption.d.ts.map +0 -1
- package/dist/Utils/RepoOption.js +0 -63
- package/dist/Utils/RepoOption.js.map +0 -1
- package/dist/Utils/RepoUrl.d.ts +0 -18
- package/dist/Utils/RepoUrl.d.ts.map +0 -1
- package/dist/Utils/RepoUrl.js +0 -6
- package/dist/Utils/RepoUrl.js.map +0 -1
- package/dist/Utils/ResolveCommand.d.ts +0 -62
- package/dist/Utils/ResolveCommand.d.ts.map +0 -1
- package/dist/Utils/ResolveCommand.js +0 -141
- package/dist/Utils/ResolveCommand.js.map +0 -1
- package/dist/Utils/RunCommand.d.ts +0 -33
- package/dist/Utils/RunCommand.d.ts.map +0 -1
- package/dist/Utils/RunCommand.js +0 -83
- package/dist/Utils/RunCommand.js.map +0 -1
- package/dist/Utils/ShareAccessRouting.d.ts +0 -78
- package/dist/Utils/ShareAccessRouting.d.ts.map +0 -1
- package/dist/Utils/ShareAccessRouting.js +0 -93
- package/dist/Utils/ShareAccessRouting.js.map +0 -1
- package/dist/Utils/Spinner.d.ts +0 -23
- package/dist/Utils/Spinner.d.ts.map +0 -1
- package/dist/Utils/Spinner.js +0 -94
- package/dist/Utils/Spinner.js.map +0 -1
- package/dist/Utils/zipBuildArtifact.d.ts +0 -35
- package/dist/Utils/zipBuildArtifact.d.ts.map +0 -1
- package/dist/Utils/zipBuildArtifact.js +0 -100
- package/dist/Utils/zipBuildArtifact.js.map +0 -1
- package/dist/Verbs/AddAction.d.ts +0 -6
- package/dist/Verbs/AddAction.d.ts.map +0 -1
- package/dist/Verbs/AddAction.js +0 -59
- package/dist/Verbs/AddAction.js.map +0 -1
- package/dist/Verbs/AddConnector.d.ts +0 -26
- package/dist/Verbs/AddConnector.d.ts.map +0 -1
- package/dist/Verbs/AddConnector.js +0 -223
- package/dist/Verbs/AddConnector.js.map +0 -1
- package/dist/Verbs/AddConnectorFlows.d.ts +0 -97
- package/dist/Verbs/AddConnectorFlows.d.ts.map +0 -1
- package/dist/Verbs/AddConnectorFlows.js +0 -298
- package/dist/Verbs/AddConnectorFlows.js.map +0 -1
- package/dist/Verbs/AddDataSource.d.ts +0 -18
- package/dist/Verbs/AddDataSource.d.ts.map +0 -1
- package/dist/Verbs/AddDataSource.js +0 -163
- package/dist/Verbs/AddDataSource.js.map +0 -1
- package/dist/Verbs/AddFlow.d.ts +0 -12
- package/dist/Verbs/AddFlow.d.ts.map +0 -1
- package/dist/Verbs/AddFlow.js +0 -63
- package/dist/Verbs/AddFlow.js.map +0 -1
- package/dist/Verbs/AddTable.d.ts +0 -6
- package/dist/Verbs/AddTable.d.ts.map +0 -1
- package/dist/Verbs/AddTable.js +0 -79
- package/dist/Verbs/AddTable.js.map +0 -1
- package/dist/Verbs/AuthStatus.d.ts +0 -6
- package/dist/Verbs/AuthStatus.d.ts.map +0 -1
- package/dist/Verbs/AuthStatus.js +0 -49
- package/dist/Verbs/AuthStatus.js.map +0 -1
- package/dist/Verbs/AuthSwitch.d.ts +0 -6
- package/dist/Verbs/AuthSwitch.d.ts.map +0 -1
- package/dist/Verbs/AuthSwitch.js +0 -67
- package/dist/Verbs/AuthSwitch.js.map +0 -1
- package/dist/Verbs/BuildMaafApp.d.ts +0 -6
- package/dist/Verbs/BuildMaafApp.d.ts.map +0 -1
- package/dist/Verbs/BuildMaafApp.js +0 -171
- package/dist/Verbs/BuildMaafApp.js.map +0 -1
- package/dist/Verbs/ConnectorHelpers.d.ts +0 -164
- package/dist/Verbs/ConnectorHelpers.d.ts.map +0 -1
- package/dist/Verbs/ConnectorHelpers.js +0 -563
- package/dist/Verbs/ConnectorHelpers.js.map +0 -1
- package/dist/Verbs/CreateMaafApp.d.ts +0 -100
- package/dist/Verbs/CreateMaafApp.d.ts.map +0 -1
- package/dist/Verbs/CreateMaafApp.js +0 -1022
- package/dist/Verbs/CreateMaafApp.js.map +0 -1
- package/dist/Verbs/DeleteMaafApp.d.ts +0 -27
- package/dist/Verbs/DeleteMaafApp.d.ts.map +0 -1
- package/dist/Verbs/DeleteMaafApp.js +0 -114
- package/dist/Verbs/DeleteMaafApp.js.map +0 -1
- package/dist/Verbs/DeployMaafApp.d.ts +0 -6
- package/dist/Verbs/DeployMaafApp.d.ts.map +0 -1
- package/dist/Verbs/DeployMaafApp.js +0 -495
- package/dist/Verbs/DeployMaafApp.js.map +0 -1
- package/dist/Verbs/Dev.d.ts +0 -6
- package/dist/Verbs/Dev.d.ts.map +0 -1
- package/dist/Verbs/Dev.js +0 -276
- package/dist/Verbs/Dev.js.map +0 -1
- package/dist/Verbs/FindDataverseApi.d.ts +0 -12
- package/dist/Verbs/FindDataverseApi.d.ts.map +0 -1
- package/dist/Verbs/FindDataverseApi.js +0 -87
- package/dist/Verbs/FindDataverseApi.js.map +0 -1
- package/dist/Verbs/GetMaafApp.d.ts +0 -6
- package/dist/Verbs/GetMaafApp.d.ts.map +0 -1
- package/dist/Verbs/GetMaafApp.js +0 -80
- package/dist/Verbs/GetMaafApp.js.map +0 -1
- package/dist/Verbs/GetMaafBuildStatus.d.ts +0 -6
- package/dist/Verbs/GetMaafBuildStatus.d.ts.map +0 -1
- package/dist/Verbs/GetMaafBuildStatus.js +0 -132
- package/dist/Verbs/GetMaafBuildStatus.js.map +0 -1
- package/dist/Verbs/GetSettings.d.ts +0 -12
- package/dist/Verbs/GetSettings.d.ts.map +0 -1
- package/dist/Verbs/GetSettings.js +0 -39
- package/dist/Verbs/GetSettings.js.map +0 -1
- package/dist/Verbs/Init.d.ts +0 -6
- package/dist/Verbs/Init.d.ts.map +0 -1
- package/dist/Verbs/Init.js +0 -453
- package/dist/Verbs/Init.js.map +0 -1
- package/dist/Verbs/ListConnectionReferences.d.ts +0 -6
- package/dist/Verbs/ListConnectionReferences.d.ts.map +0 -1
- package/dist/Verbs/ListConnectionReferences.js +0 -56
- package/dist/Verbs/ListConnectionReferences.js.map +0 -1
- package/dist/Verbs/ListConnectorActions.d.ts +0 -6
- package/dist/Verbs/ListConnectorActions.d.ts.map +0 -1
- package/dist/Verbs/ListConnectorActions.js +0 -94
- package/dist/Verbs/ListConnectorActions.js.map +0 -1
- package/dist/Verbs/ListConnectors.d.ts +0 -6
- package/dist/Verbs/ListConnectors.d.ts.map +0 -1
- package/dist/Verbs/ListConnectors.js +0 -97
- package/dist/Verbs/ListConnectors.js.map +0 -1
- package/dist/Verbs/ListDatasets.d.ts +0 -6
- package/dist/Verbs/ListDatasets.d.ts.map +0 -1
- package/dist/Verbs/ListDatasets.js +0 -73
- package/dist/Verbs/ListDatasets.js.map +0 -1
- package/dist/Verbs/ListEnvironmentVariables.d.ts +0 -14
- package/dist/Verbs/ListEnvironmentVariables.d.ts.map +0 -1
- package/dist/Verbs/ListEnvironmentVariables.js +0 -52
- package/dist/Verbs/ListEnvironmentVariables.js.map +0 -1
- package/dist/Verbs/ListFlows.d.ts +0 -13
- package/dist/Verbs/ListFlows.d.ts.map +0 -1
- package/dist/Verbs/ListFlows.js +0 -73
- package/dist/Verbs/ListFlows.js.map +0 -1
- package/dist/Verbs/ListMaafApps.d.ts +0 -84
- package/dist/Verbs/ListMaafApps.d.ts.map +0 -1
- package/dist/Verbs/ListMaafApps.js +0 -221
- package/dist/Verbs/ListMaafApps.js.map +0 -1
- package/dist/Verbs/ListSqlStoredProcedures.d.ts +0 -6
- package/dist/Verbs/ListSqlStoredProcedures.d.ts.map +0 -1
- package/dist/Verbs/ListSqlStoredProcedures.js +0 -75
- package/dist/Verbs/ListSqlStoredProcedures.js.map +0 -1
- package/dist/Verbs/ListTables.d.ts +0 -6
- package/dist/Verbs/ListTables.d.ts.map +0 -1
- package/dist/Verbs/ListTables.js +0 -85
- package/dist/Verbs/ListTables.js.map +0 -1
- package/dist/Verbs/Login.d.ts +0 -6
- package/dist/Verbs/Login.d.ts.map +0 -1
- package/dist/Verbs/Login.js +0 -39
- package/dist/Verbs/Login.js.map +0 -1
- package/dist/Verbs/Logout.d.ts +0 -6
- package/dist/Verbs/Logout.d.ts.map +0 -1
- package/dist/Verbs/Logout.js +0 -34
- package/dist/Verbs/Logout.js.map +0 -1
- package/dist/Verbs/MaafAppPermissions.d.ts +0 -40
- package/dist/Verbs/MaafAppPermissions.d.ts.map +0 -1
- package/dist/Verbs/MaafAppPermissions.js +0 -651
- package/dist/Verbs/MaafAppPermissions.js.map +0 -1
- package/dist/Verbs/Pack.d.ts +0 -71
- package/dist/Verbs/Pack.d.ts.map +0 -1
- package/dist/Verbs/Pack.js +0 -370
- package/dist/Verbs/Pack.js.map +0 -1
- package/dist/Verbs/PlayMaafApp.d.ts +0 -22
- package/dist/Verbs/PlayMaafApp.d.ts.map +0 -1
- package/dist/Verbs/PlayMaafApp.js +0 -147
- package/dist/Verbs/PlayMaafApp.js.map +0 -1
- package/dist/Verbs/RefreshDataSource.d.ts +0 -21
- package/dist/Verbs/RefreshDataSource.d.ts.map +0 -1
- package/dist/Verbs/RefreshDataSource.js +0 -89
- package/dist/Verbs/RefreshDataSource.js.map +0 -1
- package/dist/Verbs/RefreshGitAuth.d.ts +0 -6
- package/dist/Verbs/RefreshGitAuth.d.ts.map +0 -1
- package/dist/Verbs/RefreshGitAuth.js +0 -155
- package/dist/Verbs/RefreshGitAuth.js.map +0 -1
- package/dist/Verbs/RemoveDataSource.d.ts +0 -6
- package/dist/Verbs/RemoveDataSource.d.ts.map +0 -1
- package/dist/Verbs/RemoveDataSource.js +0 -173
- package/dist/Verbs/RemoveDataSource.js.map +0 -1
- package/dist/Verbs/RemoveFlow.d.ts +0 -12
- package/dist/Verbs/RemoveFlow.d.ts.map +0 -1
- package/dist/Verbs/RemoveFlow.js +0 -95
- package/dist/Verbs/RemoveFlow.js.map +0 -1
- package/dist/Verbs/SetSetting.d.ts +0 -12
- package/dist/Verbs/SetSetting.d.ts.map +0 -1
- package/dist/Verbs/SetSetting.js +0 -133
- package/dist/Verbs/SetSetting.js.map +0 -1
- package/dist/Verbs/ShareLinkCreate.d.ts +0 -23
- package/dist/Verbs/ShareLinkCreate.d.ts.map +0 -1
- package/dist/Verbs/ShareLinkCreate.js +0 -73
- package/dist/Verbs/ShareLinkCreate.js.map +0 -1
- package/dist/Verbs/ShareLinkList.d.ts +0 -16
- package/dist/Verbs/ShareLinkList.d.ts.map +0 -1
- package/dist/Verbs/ShareLinkList.js +0 -84
- package/dist/Verbs/ShareLinkList.js.map +0 -1
- package/dist/Verbs/ShareLinkRevoke.d.ts +0 -22
- package/dist/Verbs/ShareLinkRevoke.d.ts.map +0 -1
- package/dist/Verbs/ShareLinkRevoke.js +0 -137
- package/dist/Verbs/ShareLinkRevoke.js.map +0 -1
- package/dist/Verbs/ShareList.d.ts +0 -10
- package/dist/Verbs/ShareList.d.ts.map +0 -1
- package/dist/Verbs/ShareList.js +0 -254
- package/dist/Verbs/ShareList.js.map +0 -1
- package/dist/Verbs/ShareMaafApp.d.ts +0 -12
- package/dist/Verbs/ShareMaafApp.d.ts.map +0 -1
- package/dist/Verbs/ShareMaafApp.js +0 -14
- package/dist/Verbs/ShareMaafApp.js.map +0 -1
- package/dist/Verbs/ShowMaafApp.d.ts +0 -100
- package/dist/Verbs/ShowMaafApp.d.ts.map +0 -1
- package/dist/Verbs/ShowMaafApp.js +0 -224
- package/dist/Verbs/ShowMaafApp.js.map +0 -1
- package/dist/Verbs/TelemetrySettings.d.ts +0 -8
- package/dist/Verbs/TelemetrySettings.d.ts.map +0 -1
- package/dist/Verbs/TelemetrySettings.js +0 -104
- package/dist/Verbs/TelemetrySettings.js.map +0 -1
- package/dist/Verbs/UnshareMaafApp.d.ts +0 -12
- package/dist/Verbs/UnshareMaafApp.d.ts.map +0 -1
- package/dist/Verbs/UnshareMaafApp.js +0 -14
- package/dist/Verbs/UnshareMaafApp.js.map +0 -1
- package/dist/Verbs/VerbConstants.d.ts +0 -629
- package/dist/Verbs/VerbConstants.d.ts.map +0 -1
- package/dist/Verbs/VerbConstants.js +0 -559
- package/dist/Verbs/VerbConstants.js.map +0 -1
- package/dist/Verbs/index.d.ts +0 -47
- package/dist/Verbs/index.d.ts.map +0 -1
- package/dist/Verbs/index.js +0 -47
- package/dist/Verbs/index.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as ue}from"./chunk-OL6CTXQR.js";import{a as ae,b as pe,d as ce}from"./chunk-VFSTQAZ2.js";import{a as oe,b as se}from"./chunk-YIKNM523.js";import{a as ke}from"./chunk-TYRVM4PP.js";import{a as re}from"./chunk-3BRAT6NP.js";import"./chunk-UBTSW22U.js";import"./chunk-MFPX2RFH.js";import{a as d,e as F}from"./chunk-DREO7EYO.js";import{e as T,i as ie}from"./chunk-5AUOEXAR.js";import{Z as ee,d as K,f as Q,q as X,ua as te,va as ne}from"./chunk-G33Q5FWT.js";import{a as I,b as p,c as U,d as E,e as Z}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import{a as _}from"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{k as i}from"./chunk-6MXOK2LG.js";import{c as Y,d as J,e as z,h as v,i as V}from"./chunk-PVAIJSAI.js";import{a as g}from"./chunk-VNEZZ3RI.js";import{a as q,g as W}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import{d as Te}from"./chunk-UT667QSU.js";import*as l from"fs";import*as he from"os";import*as x from"path";import*as w from"fs";import*as le from"os";import*as k from"path";function G(e){if(!e)throw new p("Template source is empty. Use --template to specify one.");if(/^https?:\/\//i.test(e)){let c;try{c=new URL(e)}catch{throw new p(`Template source '${e}' is not a valid URL.`)}if(c.hostname.toLowerCase()!=="github.com")throw new p(`Template source '${e}' uses host '${c.hostname}'; only github.com URLs are supported.`);let S=c.pathname.split("/").filter(Boolean);if(S.length<2)throw new p(`Template source '${e}' is missing the owner/repo path. Use 'https://github.com/<owner>/<repo>'.`);let[y,R,...f]=S,$=R.endsWith(".git")?R.slice(0,-4):R,O=c.hash?c.hash.slice(1):void 0;if(f.length===0)return{owner:y,repo:$,subdir:"",ref:O};if(f[0].toLowerCase()==="tree"&&f.length>=2)return{owner:y,repo:$,subdir:f.slice(2).join("/"),ref:O??f[1]};throw f[0].toLowerCase()==="blob"?new p(`Template source '${e}' points at a file ('/blob/...'). Templates must be a directory \u2014 use the '/tree/<branch>/<subdir>' URL form instead.`):new p(`Template source '${e}' has an unrecognised path. Use 'https://github.com/<owner>/<repo>' or 'https://github.com/<owner>/<repo>/tree/<branch>/<subdir>'.`)}let t=/^([a-z][a-z0-9+.-]*):/i.exec(e);if(t){let c=t[1].toLowerCase();if(c!=="github"&&c!=="gh")throw new p(`Template source '${e}' uses unsupported provider prefix '${t[1]}:'. Only 'github:' (or 'gh:' shorthand) templates are supported.`)}let n=e.replace(/^(?:github|gh):/i,""),[r,s]=n.split("#",2),o=r.split("/").filter(Boolean);if(o.length<2)throw new p(`Template source '${e}' is missing the owner/repo path. Expected 'github:<owner>/<repo>[/<subdir>]'.`);let[h,A,...a]=o;return{owner:h,repo:A,subdir:a.join("/"),ref:s||void 0}}function de(e,t){let n=G(e),r=`https://github.com/${n.owner}/${n.repo}.git`,s=w.mkdtempSync(k.join(le.tmpdir(),"ms-template-"));try{let o=["clone","--depth=1","--filter=blob:none"];n.subdir&&o.push("--sparse"),n.ref&&o.push("--branch",n.ref),o.push(r,s),d(o,{network:!0}),n.subdir&&d(["-C",s,"sparse-checkout","set",n.subdir]);let h=n.subdir?k.join(s,n.subdir):s;if(!w.existsSync(h))throw new p(`Template subdirectory '${n.subdir}' was not found in https://github.com/${n.owner}/${n.repo}${n.ref?` at ref '${n.ref}'`:""}. If the branch name contains '/', use the 'github:<owner>/<repo>/<subdir>#<branch>' form to disambiguate.`);w.mkdirSync(t.dir,{recursive:!0}),w.cpSync(h,t.dir,{recursive:!0,force:!0,filter:A=>k.basename(A)!==".git"})}finally{w.rmSync(s,{recursive:!0,force:!0})}}var M=Te(ke(),1);function fe(){let e=d(["--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)throw new E("'git' is required but was not found on PATH.");let t=e.stdout,n=_.engines.git;if(!M.default.validRange(n))return;let r=M.default.coerce(t);if(r&&!M.default.satisfies(r,n))throw new E(`Git ${n} is required (found ${r.version}). Please upgrade git.`)}var Oe="github:microsoft/Managed-Apps/templates/vite8",H="Initial scaffold from 'ms app create'";async function Et(e){Ye(e),await e.runVerb();let t=await e.getTenantIdAsync();if(!t)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let n=te(),{region:r}=X(),s=await e.getOption("displayName");if(!s)throw new p("Argument displayName is required. Use --display-name or -n to specify it.");let o=e.getPositionalArg(0)??process.cwd(),h=await e.getOption("template",!0),A=await e.getOption("repo",!0),{repoType:a,remoteUrl:c}=ce(A),S=await e.getOption("repositoryId",!0),y=e.isJsonMode();if(!y){let u=W(r),b=u?`cloud ${u}`:`region ${r}`;v(`About to create app '${s}' in tenant ${t} (${b}).`)}let R=!y&&process.stdout.isTTY;!y&&!R&&v("Running preflight checks...");let f=R?new ue:null;f?.start("Running preflight checks...");try{if(a==="none"&&S)throw new p("'--repo none' is incompatible with '--repository-id'. Use '--repo none' for an app with no git binding, or omit '--repo' (or pass a repo URL) to use a backing repository.");f?.update("Validating template source..."),_e(h),f?.update("Checking git installation..."),fe(),f?.update("Verifying target directory is writable..."),We(o),a==="github"?(f?.update("Verifying target directory is empty..."),ge(o),f?.update(`Verifying ${c} is empty...`),qe(c)):(f?.update("Verifying target directory is empty..."),me(o))}finally{f?.stop()}let $=await ie(e,{failIfMissing:!1}),O=$?void 0:oe(e,t,n,"CreateMaafApp"),ve=await e.getOption("description",!0),Ee=await e.getOption("buildPath",!0),Re=await e.getOption("buildCommand",!0),Ae=await e.getOption("buildEntryPoint",!0),L=await se($,O);e.updateEnvironmentId(L),a==="github"?ge(o):me(o);let Se=await e.getOption(i.OpenBrowser.camelName,!0)??!1,$e=await e.getOption(i.ForceReauth.camelName,!0)??!1;y&&a==="github"&&z({phase:"create-validation"});let Ce={displayName:s,description:ve,repositoryId:S,remoteUrl:c,repoType:a,origin:ne().origin},Ie=({isRetry:u})=>ee({tenantId:t,environmentId:L,logger:n,actionsParams:{...Ce,...$e&&!u&&{forceReauth:!0}}}),j;try{j=await re(Ie,{repoType:a,externalRepoUrl:c,tenantId:t,jsonMode:y,openBrowser:Se,verb:"app create"})}catch(u){let b=je(u,{repoType:a,environmentId:L});throw b||u}let{app:m,cloneUrl:C}=j;if(a==="native"&&!C){let u=P(m.id,m.environmentId);throw new I(`App '${m.displayName}' was created on the server, but creating a git repository failed. This is a platform-side issue; please report it. In the meantime, the partial app needs to be cleaned up.
|
|
8
|
+
`+u)}let B=null;try{if(a==="github"){if(Pe({directory:o,repoUrl:c}),l.readdirSync(o).filter(N=>N!==".git").length>0)throw new p(`Repository ${c} is not empty (must contain no files of any kind, including hidden files like .gitignore, .gitattributes, README, or LICENSE). Choose a different repository to create an app or run 'ms app init' to update the existing app.
|
|
9
|
+
|
|
10
|
+
`+P(m.id,m.environmentId))}else a==="native"?F({directory:o,gitUrl:C,loginAuthority:e.getLoginAuthority(t),authResource:e.getAuthResourceUrl()}):l.mkdirSync(o,{recursive:!0});y||v(`Fetching template '${h}' into ${o}...`),de(h,{dir:o}),await pe(o,y,e.getHttpClient());let u=ae({appId:m.id,appDisplayName:m.displayName,description:m.description,environmentId:m.environmentId,repoType:a,cloud:e.getCloud(),buildPath:Ee,buildCommand:Re,buildEntryPoint:Ae,repositoryId:a==="native"?m.repositoryId:void 0,externalRepoUrl:a==="github"?c:void 0});await K(x.join(o,q),u),a!=="none"&&(B=await Ne(o,y,a==="native"?C:void 0))}catch(u){if(u instanceof p&&a!=="native")throw u;let b=u instanceof Error?u.message:String(u),N=`App '${m.displayName}' was created, but local setup failed: ${b}
|
|
11
|
+
The local directory ${o} may contain partial files; remove them or choose a new directory before retrying.
|
|
12
|
+
`+P(m.id,m.environmentId);throw u instanceof I?(u.message=N,u):new I(N)}y?J({appId:m.id,repoType:a,...a==="github"&&c&&{externalRepoUrl:c},...a==="native"&&C&&{gitRemoteUrl:C},appDir:o,...B&&{push:B}}):(Y(`Created app '${m.displayName}' in ${o}.`),a==="github"?v(`Bound to external repository: ${c}.`):a==="none"&&v("Your app has been created. Run `git init` (or your VCS of choice) when ready; subsequent `ms app deploy` calls do not require a git remote."))}async function Ne(e,t,n){let r=n?void 0:`git add . && git commit -m "${H}" && git push -u origin HEAD`;try{return d(["add","."],{cwd:e}),d(["commit","-m",H],{cwd:e}),n&&Me(e,n,t),d(["push","-u","origin","HEAD"],{cwd:e,network:!0,classify:n?{action:`pushing to ${D(n)}`}:void 0}),{success:!0}}catch(s){let o=s instanceof Error?{name:s.name,message:s.message,stack:s.stack}:typeof s=="object"&&s!==null?{...s}:{message:String(s)};if(!t){s instanceof I&&V(s.message);let h=r?`To finish wiring it up, run:
|
|
13
|
+
${r}`:`Resolve the git issue above, then finish the initial push from ${e}.`;V("Could not commit and push the initial scaffold. Your app and local scaffold are ready. "+h)}return{success:!1,error:o,retryCommand:r}}}function Me(e,t,n){He(t,n,"the initial git fetch and push"),Le(e,t),d(["rev-parse","--verify","origin/main"],{cwd:e,allowFailure:!0,emitStderr:!1}).success&&(d(["reset","--soft","origin/main"],{cwd:e}),d(["commit","-m",H],{cwd:e}))}function Le(e,t){d(["fetch","origin"],{cwd:e,network:!0,allowFailure:!0,emitStderr:!1}).success||d(["fetch","origin"],{cwd:e,network:!0,classify:{action:`fetching from ${D(t)}`}})}var Be=["repository not found","fatal: repository","could not read username","terminal prompts disabled","authentication failed","permission denied","403","remote: not found"];function Ve(e){let t=e.stderr;return typeof t=="string"?t:Buffer.isBuffer(t)?t.toString():t instanceof Uint8Array?Buffer.from(t).toString():""}function ye(e,t){let n=e instanceof Error?e.message:String(e),r=t.trim();return!r||n.includes(r)?n:`${n}
|
|
14
|
+
${r}`}function we(e){let t=e.toLowerCase();return Be.some(n=>t.includes(n))}function be(){return"Make sure the repository exists and that you have access to it."}function Ue({directory:e,repoUrl:t}){return`Failed to clone '${t}' into '${e}'. `+be()}function Fe(e){return`Cannot access repository '${e}', so no app was created. `+be()}function Ge({directory:e,repoUrl:t}){return`Failed to clone '${t}' into '${e}'. See the git output above for details.`}function Pe({directory:e,repoUrl:t}){try{d(["clone",t,e],{emitStderr:!1})}catch(n){let r=Ve(n);r&&process.stderr.write(r);let s=we(r)?Ue({directory:e,repoUrl:t}):Ge({directory:e,repoUrl:t});throw new E(s,{underlyingError:ye(n,r)})}}function D(e){try{return new URL(e).host}catch{return e}}function He(e,t,n){t||v(`Authenticating to ${D(e)} for ${n}. A browser window may open. Sign in with the account associated with this tenant.`)}function P(e,t){return`The server app is still in environment ${t} (id: ${e}).
|
|
15
|
+
If you want to clean it up before retrying, run the following command:
|
|
16
|
+
${"ms"} app delete --app ${e} --environment-id ${t} --force`}function De(e){if(e.body)try{let t=JSON.parse(e.body);if(typeof t?.error?.message=="string"&&t.error.message.trim())return t.error.message}catch{}}function je(e,t){if(!(e instanceof Q))return null;let{environmentId:n}=t,r=De(e),s=t.repoType==="native",o="Ask an admin to grant you the required permission in this environment.";if(e.status===401)return new U(r??"Your sign-in session has expired or is invalid. Run `ms auth login` and try again.");if(e.status===403){let h=r??(s?`You do not have permission to create repositories in environment ${n}.`:`You do not have permission to create an app in environment ${n}.`);return new U(`${h} ${o}`)}return e.status===404?new p(r??`Environment ${n} was not found. Verify the environment id and that you have access to it.`):e.status===409?new p(r??`An app with the same name already exists in environment ${n}. Choose a different name.`):e.status===429||e.status===503?new Z(r??"The service is temporarily unavailable or rate-limited. Wait a moment and try again."):null}function _e(e){G(e)}function me(e){if(!l.existsSync(e))return;if(l.readdirSync(e).length>0)throw new p(`'${e}' is not empty. Specify an empty directory as the first argument, or run 'ms app init' to bind an existing project to a new app.`)}function ge(e){if(!l.existsSync(e))return;if(l.readdirSync(e).length>0)throw new p(`'${e}' is not empty. --repo requires an empty target directory; specify an empty directory as the first argument, move to one before running, or run 'ms app init' to bind an existing project to a new app.`)}function qe(e){let t;try{t=l.mkdtempSync(x.join(he.tmpdir(),"ms-app-create-probe-"))}catch{return}try{let n=d(["clone","--depth=1","--filter=blob:none","--no-checkout",e,t],{allowFailure:!0,emitStderr:!1});if(!n.success){let o=n.stderr;if(we(o))throw new E(Fe(e),{underlyingError:ye(n.error,o)});return}let r=d(["-C",t,"ls-tree","-r","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!r.success)return;if(r.stdout.trim().length>0)throw new p(`Repository ${e} is not empty (must contain no tracked files of any kind, including hidden files like .gitignore, .gitattributes, README, or LICENSE). Choose a different repository to create an app or run 'ms app init' to update the existing app.`)}finally{try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}}function We(e){let t=e;for(;!l.existsSync(t);){let n=x.dirname(t);if(n===t)break;t=n}try{l.accessSync(t,l.constants.W_OK)}catch{throw new E(`'${e}' is not writable. Choose a different directory or fix the permissions and retry.`)}}function Ye(e){e.setDescription(g.app.create.description),e.addExamples(g.app.create.examples),e.consumePositionalArg("[directory]"),e.addOptions([{flags:{key:i.EnvironmentId.name,alias:i.EnvironmentId.alias},env:i.EnvironmentId.envVar,description:g.app.create.options.environmentId,optionalInNonInteractive:!0},T({flags:{key:i.DisplayName.name,alias:i.DisplayName.alias},env:i.DisplayName.envVar,message:i.DisplayName.promptMessage,description:g.app.create.options.displayName}),{flags:{key:i.Description.name,alias:i.Description.alias},env:i.Description.envVar,description:g.app.create.options.description,optionalInNonInteractive:!0},{flags:{key:i.RepositoryId.name,alias:i.RepositoryId.alias},env:i.RepositoryId.envVar,description:g.app.create.options.repositoryId,optionalInNonInteractive:!0},{flags:{key:i.Template.name,alias:i.Template.alias},env:i.Template.envVar,default:Oe,description:g.app.create.options.template,optionalInNonInteractive:!0},{flags:{key:i.Repo.name},env:i.Repo.envVar,description:g.app.create.options.repo,optionalInNonInteractive:!0},T({flags:{key:i.BuildPath.name,alias:i.BuildPath.alias},env:i.BuildPath.envVar,message:i.BuildPath.promptMessage,initialValue:i.BuildPath.initialValue,default:"./dist",description:g.app.create.options.buildPath}),T({flags:{key:i.BuildCommand.name,alias:i.BuildCommand.alias},env:i.BuildCommand.envVar,message:i.BuildCommand.promptMessage,initialValue:i.BuildCommand.initialValue,default:"npm run build",description:g.app.create.options.buildCommand}),T({flags:{key:i.BuildEntryPoint.name},env:i.BuildEntryPoint.envVar,message:i.BuildEntryPoint.promptMessage,initialValue:i.BuildEntryPoint.initialValue,default:"index.html",description:g.app.create.options.buildEntryPoint})]),e.addSwitch({flags:{key:i.OpenBrowser.name},description:g.app.create.options.openBrowser}),e.addSwitch({flags:{key:i.ForceReauth.name},description:g.app.create.options.forceReauth})}export{P as buildOrphanedAppRecoveryHint,Pe as cloneRepo,Ne as commitAndPushScaffoldAsync,Et as createMaafAppAsync,qe as ensureExternalRepoIsEmpty,ge as ensureRepoTargetDirectoryEmpty,me as ensureTargetDirectoryEmpty,We as ensureTargetDirectoryWritable,_e as ensureTemplateSourceValid,F as initLocalRepo};
|
|
17
|
+
/*!
|
|
18
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
19
|
+
*/
|
|
20
|
+
//# sourceMappingURL=CreateMaafApp-TUO72CW7.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as g,h as v}from"./chunk-5AUOEXAR.js";import{_ as m,ua as l,va as f}from"./chunk-G33Q5FWT.js";import{b as c}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{q as o}from"./chunk-6MXOK2LG.js";import{c as s,d,i as p}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function D(e){I(e),await e.runVerb();let n=await v(e),r=e.getEnvironmentId({includeConfig:!1}),a=await e.getTenantIdAsync();if(!a)throw new c("Unable to determine tenant ID. Ensure you are logged in.");let u=f();if(!await e.getOption("force",!0)&&u.interactive){let A=r?`app '${n}' from environment '${r}'`:`app '${n}'`;if(!await g({message:`Are you sure you want to delete ${A}? This cannot be undone. Your source code in the repo will not be deleted.`})){p("Delete cancelled.");return}}let i=await m({tenantId:a,environmentId:r,logger:l(),actionsParams:{appName:n}});if(e.isJsonMode()){d({appName:n,environmentId:i.environmentId,existed:i.existed});return}i.existed?s(`App '${n}' deleted from environment '${i.environmentId}'.`):p(`App '${n}' did not exist in environment '${i.environmentId}'; nothing was deleted.`)}function I(e){e.setDescription(t.app.delete.description),e.addExamples(t.app.delete.examples),e.addSwitch({flags:{key:"force",alias:"f"},description:t.app.delete.options.force}),e.addOptions([{flags:{key:o.AppName.name},env:o.AppName.envVar,description:t.app.delete.options.app,optionalInNonInteractive:!0},{flags:{key:o.EnvironmentId.name,alias:o.EnvironmentId.alias},env:o.EnvironmentId.envVar,description:t.app.delete.options.environmentId,optionalInNonInteractive:!0}])}export{D as deleteMaafAppAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=DeleteMaafApp-MZVGIAX3.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as q}from"./chunk-QAFCXGBD.js";import{a as it,b as W,c as j}from"./chunk-W7EWOZPO.js";import"./chunk-HBLO3WDD.js";import"./chunk-OL6CTXQR.js";import{a as J}from"./chunk-3BRAT6NP.js";import"./chunk-UBTSW22U.js";import"./chunk-MFPX2RFH.js";import{b as H,g as V}from"./chunk-DREO7EYO.js";import{b as T,h as G}from"./chunk-5AUOEXAR.js";import{$ as _,X as L,f as O,fa as P,ua as R,va as I}from"./chunk-G33Q5FWT.js";import{a as p,b as o,d as C,g as B}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import{a as z}from"./chunk-7NXJAIJX.js";import{p as l}from"./chunk-6MXOK2LG.js";import{c as k,d as U,e as x,h as m,i as N}from"./chunk-PVAIJSAI.js";import{a as g}from"./chunk-VNEZZ3RI.js";import{a as A}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import{d as et}from"./chunk-UT667QSU.js";import{promises as K}from"node:fs";import*as S from"node:path";import{promises as Y}from"node:fs";var X=et(it(),1);function ot(t){return t?.code==="ENOENT"?"continue":t instanceof Error?t:new Error(String(t))}function nt(t){return`zipBuildArtifact: skipping missing entry: ${t?.path??"<unknown>"}`}async function Z(t,e,r){let i=await Y.stat(t).catch(()=>null);if(!i)throw new o(`buildPath not found: ${t}`);if(!i.isDirectory())throw new o(`buildPath is not a directory: ${t}`);let a=await Y.stat(e).catch(()=>null);if(!a||!a.isFile())throw new o(`appConfigPath does not point to a file: ${e}`);let s=r?.maxBytes;return new Promise((h,c)=>{let w=[],u=0,y=!1,n=(0,X.default)("zip",{zlib:{level:9}});n.on("data",d=>{if(!y){if(u+=d.length,s!==void 0&&u>s){y=!0,n.abort(),c(new B({capBytes:s,bytes:u}));return}w.push(d)}}),n.on("warning",d=>{if(y)return;let v=ot(d);if(v==="continue"){N(nt(d));return}c(v)}),n.on("error",d=>{y||c(d)}),n.on("end",()=>{y||h(Buffer.concat(w))}),n.directory(t,!1),n.file(e,{name:A}),n.finalize()})}var at=1200*1e3,rt=6e4,st=2e3,Q=`External artifact deployment is not enabled for this environment.
|
|
8
|
+
To enable it, contact your administrator to turn on the
|
|
9
|
+
AllowExternalArtifactDeployment environment setting.`;function $(t){return`${(t/(1024*1024)).toFixed(1)} MB`}function F(t,e){return t!==void 0?`Build artifact is ${$(t)}, which exceeds the ${$(e)} limit.`:`Build artifact exceeds the ${$(e)} limit.`}function pt(t){let e=t.id||t.name;if(!e)throw new p("Deploy succeeded but the server response did not include an app identifier.");return{appId:e,displayName:t.displayName,commitHash:t.commitHash??null,appPlayUri:t.appPlayUri??null}}function tt(t){return{appId:t.appId,displayName:t.name,commitHash:t.commitSha,appPlayUri:t.appPlayUri}}function b(t){if(t.body)try{let e=JSON.parse(t.body);if(typeof e?.error?.message=="string")return e.error.message}catch{}}function lt(t,e){if(t instanceof B)return new o(F(t.bytes,t.capBytes));if(!(t instanceof O))return null;let r=e.repoType!=="none";if(t.status===400&&t.code==="ArtifactNotAllowedForGitRepo"){let i=b(t);return new p(i?`Artifact upload rejected for this git-backed app: ${i}`:`The server reports this app is git-backed; --artifact uploads are not allowed. Update \`${A}\` so \`repoType\` matches the server's record, then re-run with --commit.`)}if(t.status===400&&t.code==="CommitNotAllowedForArtifactDeploy")return new o("This app uses external artifact deployment. Pass --artifact <path> instead of --commit.");if(t.status===400&&t.code==="InvalidRequestContent")return new o("Invalid deploy request \u2014 verify the environment and app id.");if(t.status===400&&t.code==="ServicePrincipalNotSupportedForMaafOperations")return new o("Service principal callers are not supported for `ms app deploy`. Use interactive auth.");if(t.status===400&&t.code==="BadRequest"){let i=b(t);return r?new o(i??"Invalid commit ID. Use a 40-character lowercase hex value."):new o(`Build artifact rejected: ${i??t.message}`)}if(t.status===400&&t.code==="BuildNotAvailable")return new p("No completed build is available for this commit. Run `ms app build` first, or wait for the build to complete before retrying.");if(t.status===403&&t.code==="ExternalArtifactDeploymentDisabled")return new p(Q);if(t.status===403&&t.code==="InsufficientPrivilege"){let i=b(t);return new p(i?`${i} Ask an admin to grant the required privilege.`:"You don't have the required privilege to deploy this app. Ask an admin to grant deploy permission on the environment.")}if(t.status===403&&t.code==="CodeAppOperationNotAllowedInEnvironment")return new p(Q);if(t.status===403&&t.code==="Forbidden")return new p("You don't have permission to deploy this app. Ask an admin to grant you Contributor on the repo.");if(t.status===404&&t.code==="CommitNotFound"){let i=b(t);return new o(i??"Commit not found on main.")}if(t.status===404&&t.code==="ApplicationNotFound")return new o(`App '${e.appName}' not found in environment ${e.environmentId}.`);if(t.status===404&&t.code==="PowerConfigNotFound")return new p(`Build output is missing the app config (\`${A}\`). Ensure the config is present at the root of the build output and re-run the build.`);if(t.status===404&&t.code==="OperationNotFound")return new p("Build operation not found on the server. The operation may have been cleaned up; re-run `ms app deploy` to start a fresh build.");if(t.status===409&&t.code==="BuildInProgress")return new p("A build is currently in progress for this app. Run `ms app build-status` to check progress, then retry the deploy.");if(t.status===409&&t.code==="NoGreenBuildAvailable")return new p("No successful build is available to deploy. Push a commit and wait for the build to succeed before retrying.");if(t.status===409&&t.code==="RepoTypeMismatch"){let i=b(t);return new o(i?`Repo type mismatch: ${i}`:"The app's repoType in ms.config.json doesn't match the server's record. Update ms.config.json to match.")}if(t.status===413)return new p(F(void 0,524288e3));if(t.status===422&&t.code==="ArtifactInvalid"){let i=b(t)??t.message;return new o(`Artifact validation failed: ${i}`)}return t.status===502&&t.code==="MaafBuildServiceUnavailable"?new p("Build service is temporarily unavailable. Try again."):t.status===503&&t.code==="AuthorizationCheckFailed"?new p("Authorization service is temporarily unavailable. Try again."):null}async function ct(t){let{provider:e,appName:r,force:i,forceReauth:a}=t,s=t.commitFromFlag,h,c=!1;if(!s){let n=H();if(!n)throw new o("Could not determine the latest commit ID. Use --commit or -c to specify it.");s=n.commitSha,h=n.detached?void 0:n.branch,c=!0}if(c&&!e.isJsonMode()&&m(h?`Using branch '${h}' at commit ${s}.`:`Detached HEAD at commit ${s}.`),!i){let n=mt();if(n&&I().interactive&&!e.isJsonMode()){if(N(n),!await T({message:"Deploy anyway?",initialValue:!1}))return m("Deploy cancelled."),null}else if(n)throw new o(`${n} Run again with --force to deploy anyway.`)}let w=R(),u=await L({logger:w,actionsParams:{appName:r,commitSha:s,...a&&{forceReauth:!0}}});if(u===null)e.isJsonMode()||m(`A cached build exists for commit ${s}; deploying it.`);else{e.isJsonMode()||m("Build queued; waiting for completion...");let n=await q({appName:r,commitSha:s,initialWaitMs:u.retryAfterMs??st,isJsonMode:e.isJsonMode(),deadlineMs:at,maxIntervalMs:rt,spinnerLabel:"Waiting for build..."});if(n.status!=="Succeeded")throw new p(`Unexpected terminal build status "${n.status}". Commit ID: ${s}.`)}let y=await _({logger:w,actionsParams:{appName:r,commitSha:s,...a&&{forceReauth:!0}}});return pt(y)}async function ut(t){let e=S.resolve(t.artifactPath);if(S.extname(e).toLowerCase()!==".zip")throw new o(`--artifact must point to a .zip file. Received: ${t.artifactPath}`);let r=await K.stat(e).catch(()=>null);if(!r||!r.isFile())throw new o(`--artifact file not found or not a regular file: ${t.artifactPath}`);if(r.size>524288e3)throw new o(F(r.size,524288e3));let i=await K.readFile(e);t.provider.isJsonMode()||m("Uploading artifact and deploying...");let a=await P({logger:R(),actionsParams:{appName:t.appName,zipBuffer:i}});return tt(a)}async function ft(t){if(W(t.appConfig),!(t.provider.isJsonMode()||!I().interactive)&&!await T({message:`This will build the app and deploy the resulting artifact to environment ${t.environmentId}. Continue?`,initialValue:!1}))return m("Aborted."),null;let{packAppOutputDir:r}=await j({quiet:t.provider.isJsonMode()}),i=await Z(r,t.appConfigPath,{maxBytes:524288e3});t.provider.isJsonMode()||m("Uploading build artifact and deploying...");let a=await P({logger:R(),actionsParams:{appName:t.appName,zipBuffer:i}});return tt(a)}async function xt(t){dt(t),await t.runVerb(),t.isManagedDevOpsDeployEnabled()&&process.stderr.write(`[debug] ${z("MAAF_DEPLOY_VIA_MANAGED_DEVOPS")} is set; deploying via the '/manageddevops' route.
|
|
10
|
+
`);let{appConfig:e,fileConfig:r}=I();if(!e)throw new C(`${A} is required. Run this command from a directory created by \`ms app create\`.`);if(!r?.appConfigPath)throw new C(`${A} path is unavailable.`);let i=t.getEnvironmentId();if(!i)throw new o(`No environment ID found. Run this command from a directory with a ${A} (created by \`ms app create\`).`);let a=e.repoType??"native",s=e.externalRepoUrl,h=await t.getOption("commit",!0),c=await t.getOption("artifact",!0);if(h&&c)throw new o("Pass either --commit or --artifact, not both. --commit triggers a build for the commit; --artifact deploys a pre-built zip.");if(a==="none"&&h)throw new o("This app uses external artifact deployment. Pass --artifact <path> instead of --commit.");if(c&&a!=="none")throw new o(`--artifact is only valid for apps created with \`repoType: 'none'\`. This app's repoType is \`${a}\`; deploy via \`--commit\` (or omit it to use the current HEAD).`);let w=await t.getTenantIdAsync();if(!w)throw new o("Unable to determine tenant ID. Ensure you are logged in.");let u=await G(t),y=await t.getOption(l.OpenBrowser.camelName,!0)??!1,n=await t.getOption(l.ForceReauth.camelName,!0)??!1,d=await t.getOption(l.Force.name,!0)??!1,v=t.isJsonMode();v&&a==="github"&&x({phase:"deploy-validation"});let f;try{c?f=await ut({provider:t,appName:u,artifactPath:c}):a==="native"||a==="github"?f=await J(({isRetry:D})=>ct({provider:t,appName:u,commitFromFlag:h,force:d,forceReauth:n&&!D&&a==="github"}),{repoType:a,externalRepoUrl:s,tenantId:w,jsonMode:v,openBrowser:y,verb:"app deploy"}):f=await ft({provider:t,appName:u,appConfig:e,appConfigPath:r.appConfigPath,environmentId:i})}catch(M){let D=lt(M,{repoType:a,appName:u,environmentId:i});throw D||M}f!==null&&(v?U({...f,repoType:a}):(k(`Deployed app '${f.displayName}' (${f.appId}).`),f.commitHash&&m(`Commit: ${f.commitHash}`),f.appPlayUri&&m(`Play URL: ${f.appPlayUri}`)))}function dt(t){t.setDescription(g.app.deploy.description),t.addExamples(g.app.deploy.examples),t.addOptions([{flags:{key:l.AppName.name},env:l.AppName.envVar,description:g.app.deploy.options.app,optionalInNonInteractive:!0},{flags:{key:l.CommitSha.name,alias:l.CommitSha.alias},env:l.CommitSha.envVar,description:g.app.deploy.options.commit,optionalInNonInteractive:!0},{flags:{key:l.Artifact.name},env:l.Artifact.envVar,description:g.app.deploy.options.artifact,optionalInNonInteractive:!0}]),t.addSwitch({flags:{key:l.OpenBrowser.name},description:g.app.deploy.options.openBrowser}),t.addSwitch({flags:{key:l.Force.name},description:g.app.deploy.options.force}),t.addSwitch({flags:{key:l.ForceReauth.name},description:g.app.deploy.options.forceReauth})}function mt(){let t=V(),e=[];return t.hasUncommittedChanges===!0&&e.push("There are uncommitted changes in the working tree."),t.isMainAheadOfOrigin===!0&&e.push("Local 'main' is ahead of 'origin/main'. Push the local commits before deploying."),e.length>0?e.join(" "):null}export{xt as deployMaafAppAsync};
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
13
|
+
*/
|
|
14
|
+
//# sourceMappingURL=DeployMaafApp-KXATM3E3.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{j as $,va as O}from"./chunk-G33Q5FWT.js";import{d as A}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{g as p}from"./chunk-6MXOK2LG.js";import{h as u,i as y,j as k}from"./chunk-PVAIJSAI.js";import{a as d}from"./chunk-VNEZZ3RI.js";import{a as m,f as U}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import{spawn as _}from"node:child_process";import{createRequire as j}from"node:module";import*as V from"node:path";import{setTimeout as q}from"node:timers/promises";import{pathToFileURL as K}from"node:url";import{styleText as b}from"node:util";import*as S from"fs";import*as G from"http";import*as v from"fs";import*as h from"path";var D=["bun","pnpm","yarn","npm"];function T(n,e){let t=e?.packageManager?.split("@")[0];return t&&D.includes(t)?t:v.existsSync(h.join(n,"bun.lockb"))||v.existsSync(h.join(n,"bun.lock"))?"bun":v.existsSync(h.join(n,"pnpm-lock.yaml"))?"pnpm":v.existsSync(h.join(n,"yarn.lock"))?"yarn":"npm"}import*as F from"node:net";var w=65535;async function W(n){return!Number.isInteger(n)||n<1||n>w?!1:new Promise(e=>{let t=F.createServer();t.once("error",()=>{e(!1)}),t.once("listening",()=>{t.close(()=>e(!0))});try{t.listen({port:n,exclusive:!0})}catch{e(!1)}})}async function C(n,e=100){if(!Number.isInteger(n)||n<1||n>w)throw new Error(`Invalid port "${n}". Pass a valid --port between 1 and ${w} and try again.`);for(let t=0;t<e;t++){let o=n+t;if(o>w)break;if(await W(o))return o}throw new Error(`Could not find an available port in the range ${n}-${Math.min(n+e-1,w)}. Close some processes or pass a different --port and try again.`)}function I(n,e=80){try{let t=new URL(n);return t.port?parseInt(t.port,10):t.protocol==="https:"?443:e}catch{return e}}function x(n,e){try{let t=new URL(n);t.port=String(e);let o=t.toString();return!n.endsWith("/")&&o.endsWith("/")&&(o=o.slice(0,-1)),o}catch{return n}}import*as P from"fs";import*as N from"path";function R(n){let e=N.join(n,"package.json");return P.existsSync(e)?JSON.parse(P.readFileSync(e,"utf8")):{}}var B=["powerApps","managedApps"];async function vn(n){let e=O(),{appConfig:t,fileConfig:o}=e,r=V.dirname(o.appConfigPath);Y(n,t?.localAppUrl),await n.runVerb();let l=await n.getOption("configOnly"),a=new AbortController;if(process.once("SIGINT",()=>a.abort()),process.once("SIGTERM",()=>a.abort()),l){await L(r)&&y("Warning: --config-only is not needed when using the vite plugin. The plugin already serves the config and prints the play URL.");let H=await n.getOption("localAppUrl");await M(n,o.appConfigPath,t,a.signal,H);return}let s=R(r);if(!s.scripts?.dev)throw new A('No "dev" script found in package.json. Add a "dev" script to start your app.');if(await L(r)){await J(r,a.signal,s);return}let f=await n.getOption("localAppUrl"),c=I(f,3e3),i=await C(c),g=[],E=f;i!==c&&(E=x(f,i),g=["--port",String(i),"--strictPort"],y(`Warning: port ${c} is already in use. Starting the app dev server on port ${i} instead.`)),await Promise.all([J(r,a.signal,s,g),M(n,o.appConfigPath,t,a.signal,E)])}async function M(n,e,t,o,r){if(!t)throw new A(`${m} is required to run an app`);if(!t.environmentId)throw new A(`Environment ID is required in ${m} to run an app`);t.cloud||(t.cloud="public");let l=await n.getOption("port"),a=parseInt(l,10),s=await C(a);s!==a&&y(`Warning: port ${a} is already in use. Using port ${s} for the config server instead.`),await X(e,s,t,r,o)}async function X(n,e,t,o,r){return new Promise((l,a)=>{let s=G.createServer((c,i)=>{if(i.setHeader("Access-Control-Allow-Origin","*"),i.setHeader("Access-Control-Allow-Methods","GET, OPTIONS"),i.setHeader("Access-Control-Allow-Headers","*"),c.method==="OPTIONS"){i.writeHead(200),i.end();return}try{if(!S.existsSync(n)){i.writeHead(404,{"Content-Type":"application/json"}),i.end(JSON.stringify({error:`${m} not found`}));return}let g=S.readFileSync(n,"utf8");i.writeHead(200,{"Content-Type":"application/json"}),i.end(g)}catch(g){k(`Error serving ${m}: ${g.message}`),i.writeHead(500,{"Content-Type":"application/json"}),i.end(JSON.stringify({error:"Internal server error"}))}});s.listen(e,"localhost",async()=>{if(await z(o,r),!r.aborted){let c=U(t.cloud),i=$(c,{appUrl:o,appConfigUrl:`http://localhost:${e}`});u(`
|
|
8
|
+
Ready. You can play your app locally at:
|
|
9
|
+
${b(["blueBright","bold"],` \u279C ${i}`)}`)}}),s.on("error",c=>{k(`Server error: ${c.message}`),a(c)});let f=()=>{u(b("dim",`
|
|
10
|
+
Shutting down config server...`)),s.closeAllConnections(),s.close(()=>{u(b("dim","Config server stopped.")),l()}),setTimeout(l,2e3).unref()};r.aborted?f():r.addEventListener("abort",f,{once:!0})})}function Y(n,e){n.setDescription(d.app.dev.description),n.addExamples(d.app.dev.examples),n.addOptions([{flags:{key:p.Port.name,alias:p.Port.alias},env:p.Port.envVar,default:p.Port.initialValue,description:d.app.dev.options.port},{flags:{key:p.LocalAppUrl.name,alias:p.LocalAppUrl.alias},env:p.LocalAppUrl.envVar,default:e||p.LocalAppUrl.initialValue,description:d.app.dev.options.localAppUrl}]),n.addSwitch({flags:{key:p.ConfigOnly.name,alias:p.ConfigOnly.alias},env:p.ConfigOnly.envVar,description:d.app.dev.options.configOnly})}async function z(n,e,t=300,o=1e4){u(b("dim",`Waiting for app to be available at ${n}...`));let r=AbortSignal.timeout(o),l=AbortSignal.any([e,r]);try{for(;!l.aborted;){await q(t,void 0,{signal:l});try{let a=await fetch(n,{method:"HEAD"});if(a.ok||a.status<500)return}catch{}}}catch{}finally{r.aborted&&y(`Warning: timed out looking for app running at ${n}`)}}async function L(n){let e;try{let o=j(`${n}/package.json`).resolve("vite");e=(await import(K(o).href)).loadConfigFromFile}catch{return!1}try{return((await e({command:"serve",mode:"development"},void 0,n))?.config?.plugins??[]).flat().some(r=>typeof r=="object"&&r!==null&&B.includes(r.name))}catch{return!1}}async function J(n,e,t,o=[]){let r=T(n,t);return new Promise((l,a)=>{let s=o.length>0?` -- ${o.join(" ")}`:"",f=_(`${r} run dev${s}`,{cwd:n,stdio:"inherit",shell:!0});f.on("close",(i,g)=>{i===0||g==="SIGINT"?l():a(new Error(`Dev server exited unexpectedly with code ${i??"unknown"}.`))}),f.on("error",a);let c=()=>{f.kill("SIGINT")};e.aborted?c():e.addEventListener("abort",c,{once:!0})})}export{vn as devAsync};
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
13
|
+
*/
|
|
14
|
+
//# sourceMappingURL=Dev-SHIA5S7X.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as e}from"./chunk-7NXJAIJX.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var n=class{async initAsync(r){}async getAccessTokenForResource(r,s){return e("HTTP_FORWARD_AUTH_TOKEN")??""}getUserTenantId(){return e("HTTP_FORWARD_TENANT_ID")}async getCachedAccountAsync(){}};export{n as EnvironmentVariableAuthenticationProvider};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=EnvironmentVariableAuthenticationProvider-5YTMRAE4.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as y}from"./chunk-USRRI5H4.js";import{h as d,i as I}from"./chunk-5AUOEXAR.js";import{ba as l,ua as f}from"./chunk-G33Q5FWT.js";import{b as c}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{l as i}from"./chunk-6MXOK2LG.js";import{c as s,d as m,h as p}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function M(n){g(n),await n.runVerb();let v=await I(n,{failIfMissing:!1}),a=await n.getTenantIdAsync();if(!a)throw new c("Unable to determine tenant ID. Ensure you are logged in.");let A=await d(n),e=await l({tenantId:a,environmentId:v,logger:f(),actionsParams:{appName:A}}),r=e.description,o=y(e);n.isJsonMode()?m({appId:e.id,displayName:e.displayName,description:r,environmentId:e.environmentId,...o&&{repoType:o.repoType,cloneUrl:o.cloneUrl}}):(s(`App '${e.displayName}' (${e.id}).`),r&&p(`Description: ${r}`),o?.repoType&&p(`Repo type: ${o.repoType}`),o?.cloneUrl&&p(`Clone URL: ${o.cloneUrl}`))}function g(n){n.setDescription(t.app.info.description),n.addExamples(t.app.info.examples),n.addOptions([{flags:{key:i.App.name},env:i.App.envVar,description:t.app.info.options.app,optionalInNonInteractive:!0},{flags:{key:i.EnvironmentId.name,alias:i.EnvironmentId.alias},env:i.EnvironmentId.envVar,description:t.app.info.options.environmentId,optionalInNonInteractive:!0}])}export{M as getMaafAppInfoAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=GetMaafApp-ELB5KMHW.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as I}from"./chunk-YMXXWGRV.js";import{a as L}from"./chunk-QAFCXGBD.js";import"./chunk-OL6CTXQR.js";import{b as D}from"./chunk-DREO7EYO.js";import{h as v}from"./chunk-5AUOEXAR.js";import{Y as S,aa as A,ua as f}from"./chunk-G33Q5FWT.js";import{b as l}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{n as s}from"./chunk-6MXOK2LG.js";import{d as y,h as i}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-VNEZZ3RI.js";import{a as c}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function J(t){if(O(t),await t.runVerb(),!t.getEnvironmentId())throw new l(`\`ms app get-build-status\` is deprecated and the \`--environment-id\` flag has been removed. The replacement flow is \`ms app create\` (scaffolds the app and writes ${c}) followed by \`ms app deploy\`. To run this deprecated command, invoke it from a directory with a ${c} (created by \`ms app create\`).`);if(!await t.getTenantIdAsync())throw new l("Unable to determine tenant ID. Ensure you are logged in.");let g=await v(t),b=await t.getOption("commit"),d=b?void 0:D(),n=b||d?.commitSha;if(!n)throw new l("Unable to infer the current commit ID. Use --commit or -c to specify it.");let m=await t.getOption("showLog")===!0;!t.isJsonMode()&&d&&i(d.detached?`Detached HEAD at commit ${n}.`:`Using branch '${d.branch}' at commit ${n}.`);let e=await S({logger:f(),actionsParams:{appName:g,commitSha:n}}),o=L(e.result),h=E(e.result),a;if(m&&h&&(a=(await A({logger:f(),actionsParams:{appName:g,commitSha:n}})).log),t.isJsonMode()){let w=!!(o.errorMessage||o.buildOutput)?{...e,...o}:{...e};if(a!==void 0){let k=typeof e.result=="object"&&e.result!==null?e.result:{};w.result={...k,log:a}}y(w)}else i(o.errorMessage?`Build status: ${e.status}: ${o.errorMessage}`:`Build status: ${e.status}`),h&&!m&&e.status!=="Succeeded"&&i("Run `ms app build-status --show-log` to display the build log."),o.buildOutput&&i(o.buildOutput),m&&(a&&a.trim()?await I(a):i("No build log is available for this build.")),e.status==="Succeeded"&&i(`Run \`ms app dev\` to run your app locally, or \`ms app deploy --commit ${n}\` to make this app live.`)}function E(t){if(typeof t!="object"||t===null||!("buildLogUri"in t))return;let p=t.buildLogUri;if(typeof p!="string")return;let u=p.trim();return u||void 0}function O(t){t.setDescription(r.deprecated.Verbs["Get-build-status"].Description),t.addExamples(r.deprecated.Verbs["Get-build-status"].Examples),t.addOptions([{flags:{key:s.AppName.name},env:s.AppName.envVar,description:r.deprecated.Verbs["Get-build-status"].Options.AppName,optionalInNonInteractive:!0},{flags:{key:s.CommitSha.name,alias:s.CommitSha.alias},env:s.CommitSha.envVar,description:r.deprecated.Verbs["Get-build-status"].Options.CommitSha}]),t.addSwitch({flags:{key:s.ShowLog.name},description:r.app.buildStatus.options.showLog})}export{J as getMaafBuildStatusAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=GetMaafBuildStatus-3W7LI5TJ.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{na as g,oa as m,va as c}from"./chunk-G33Q5FWT.js";import{b as f}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{d as r,h as s}from"./chunk-PVAIJSAI.js";import{a as e}from"./chunk-VNEZZ3RI.js";import{a as p}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function E(t){S(t),await t.runVerb();let i=c();if(!i.appConfig)throw new f(`No ${p} found in the current directory. Run "${"ms"} app init" first.`);let o=m(i.appConfig.appSettings);if(t.isJsonMode())r({settings:o});else for(let n of g)s(`${n.name} = ${o[n.configKey]}`)}function S(t){t.setDescription(e.app["get-settings"].description),t.addExamples(e.app["get-settings"].examples??[])}export{E as getSettingsAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=GetSettings-NM6H2U5F.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as Y,b as _,c as K,d as Q}from"./chunk-VFSTQAZ2.js";import{a as j,b as H}from"./chunk-YIKNM523.js";import"./chunk-TYRVM4PP.js";import{a as P}from"./chunk-3BRAT6NP.js";import"./chunk-UBTSW22U.js";import"./chunk-MFPX2RFH.js";import{c as J,d as W,f as q}from"./chunk-DREO7EYO.js";import{b as T,e as d,i as F}from"./chunk-5AUOEXAR.js";import{E as S,Z as L,d as x,oa as G,ua as M,va as z}from"./chunk-G33Q5FWT.js";import{a as D,b as f,e as V,f as O}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{y as e}from"./chunk-6MXOK2LG.js";import{c as B,d as $,h as s,i as A}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-VNEZZ3RI.js";import{a as b}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as h from"fs";import*as m from"path";async function Ue(t){pe(t),await t.runVerb();let l=z();if(l.appConfig)throw new f(`${b} already exists in this directory. Use a new directory or delete the existing config.`);let g=M(),o=t.isJsonMode(),y=await t.getTenantIdAsync();if(!y)throw new f("Unable to determine tenant ID. Ensure you are logged in.");let u=await F(t,{failIfMissing:!1});if(u){let i;try{i=await S(u)}catch(r){throw r instanceof D?r:new V(`Failed to validate environment '${u}': ${r instanceof Error?r.message:String(r)}`)}if(!i?.properties)throw new O(`Environment '${u}' not found. Please verify the environment ID and ensure you have access to it.`)}let U=u===void 0?j(t,y,g,"Init"):void 0;U?.catch(i=>{g.trackErrorEvent("Init.RoutingEnvironmentBackgroundFailure",{error:i instanceof Error?i.message:String(i)})});let C=await t.getOption("repo",!0),w=C?.trim()?C.trim():void 0,p,k,n="native";if(w!==void 0&&K(w))k=w,n="native",o||s("Using provided repository ID for the app's platform-managed source control.");else if(w!==void 0){let i=Q(C);if(i.repoType==="github"){let r=process.cwd();if(h.readdirSync(r).length===0)throw new f(`--repo requires a non-empty current directory. Clone the repository here first, or use '${"ms"} app create --repo <url>' to scaffold and clone in one step.`);if(!h.existsSync(m.join(r,".git")))throw new f(`--repo requires the current directory to be a git working copy (no .git directory found). Clone '${i.remoteUrl}' here first, or use '${"ms"} app create --repo <url>' to scaffold and clone in one step.`);o||s(`Using provided repository URL '${i.remoteUrl}' for app source control.`)}else i.repoType==="none"&&!o?s("No git repo will be linked to the app. You will be able to upload build artifacts manually when you want to publish the app."):i.repoType==="native"&&!o&&s("A new platform-managed git repo will be provisioned and linked to the app.");n=i.repoType,p=i.remoteUrl}else{let i=J();i&&(o||s(`Detected git remote URL: ${i}`),(l.interactive?await T({message:"Use this existing repository for app source control?",initialValue:!0}):!0)?(o||s("Will use the existing git repo and link it to the app."),n="github",p=i):o||s("Will not use the existing git repo. A new platform-managed git repo will be provisioned and linked to the app instead."))}let N=await t.getOption("displayName"),Z=await t.getOption("description"),ee=await t.getOption("buildPath"),ie=await t.getOption("buildCommand"),te=await t.getOption("buildEntryPoint"),R=X(await t.getOption(e.IconPath.camelName,!0));if(R!==void 0){let i=m.extname(R).toLowerCase();if(i!==".png"&&i!==".jpg"&&i!==".jpeg")throw new f(`--icon-path must reference a .png or .jpg file (received '${R}').`)}let ne=X(await t.getOption(e.LocalAppUrl.camelName,!0)),oe=await t.getOption(e.OpenBrowser.camelName,!0)??!1,ae=await t.getOption(e.ForceReauth.camelName,!0)??!1,v=await H(u,U);t.updateEnvironmentId(v);let re={displayName:N,description:Z,repositoryId:k,remoteUrl:p,repoType:n,origin:l.origin},c=await P(({isRetry:i})=>L({tenantId:y,environmentId:v,logger:g,actionsParams:{...re,...ae&&!i&&n==="github"&&{forceReauth:!0}}}),{repoType:n,externalRepoUrl:p,tenantId:y,jsonMode:o,openBrowser:oe,verb:"app init"}),se=Y({appId:c.app.id,appDisplayName:c.app.displayName,description:c.app.description,environmentId:v,repoType:n,repositoryId:n==="native"?c.app.repositoryId:void 0,externalRepoUrl:n==="github"?p:void 0,cloud:t.getCloud(),buildPath:ee,buildCommand:ie,buildEntryPoint:te,iconPath:R,localAppUrl:ne,connectionReferences:{},appSettings:G(void 0)});await x(l.fileConfig.appConfigPath,se);let I=m.dirname(l.fileConfig.appConfigPath);if(await _(I,o,t.getHttpClient()),n==="native"&&c.cloneUrl){let i=q({directory:I,gitUrl:c.cloneUrl,loginAuthority:t.getLoginAuthority(y),authResource:t.getAuthResourceUrl()});if(i.success&&!o)s("Configured the platform-managed git remote and credentials.");else if(!i.success&&(g.trackErrorEvent("Init.LocalGitRepoInitializationFailed",{repoType:n,error:i.error??"Unknown git initialization error"}),!o)){let r=i.error?` Reason: ${i.error}`:"";A(`Could not initialize a local git repository automatically.${r} ${n==="native"?"Run 'git init', configure Git Credential Manager (GCM) for this native repository, and run 'git remote add origin <remote-url>' or 'git remote set-url origin <remote-url>' manually.":"Run 'git init' and 'git remote add origin <remote-url>' manually."}`)}}else if(n==="github"&&p&&!h.existsSync(m.join(I,".git"))){let i=W(p,I);if(i.success&&!o)s("Initialized a local git repository and configured the remote.");else if(!i.success&&(g.trackErrorEvent("Init.LocalGitRepoInitializationFailed",{repoType:n,error:i.error??"Unknown git initialization error"}),!o)){let r=i.error?` Reason: ${i.error}`:"";A(`Could not initialize a local git repository automatically.${r} Run 'git init' and 'git remote add origin <remote-url>' manually.`)}}o?$({appId:c.app.id,environmentId:v,repoType:n,...p&&{externalRepoUrl:p}}):(B(`Created ${b} for ${N}.`),s("Hint: Run 'npm install' (or your package manager's install) to install the project-local CLI."),s(`Hint: Run '${"ms"} app add data-source' to connect data, or '${"ms"} app dev' to start the app locally.`),n!=="none"&&s("Hint: Commit and push to wire your app to the remote repository: git add . && git commit -m '<message>' && git push -u origin HEAD."))}function X(t){let l=t?.trim();return l||void 0}function pe(t){t.setDescription(a.app.init.description),t.addExamples(a.app.init.examples),t.addOptions([d({flags:{key:e.EnvironmentId.name,alias:e.EnvironmentId.alias},env:e.EnvironmentId.envVar,message:e.EnvironmentId.promptMessage,description:a.app.init.options.environmentId}),d({flags:{key:e.DisplayName.name,alias:e.DisplayName.alias},env:e.DisplayName.envVar,message:e.DisplayName.promptMessage,description:a.app.init.options.displayName}),d({flags:{key:e.Description.name,alias:e.Description.alias},env:e.Description.envVar,default:" ",message:e.Description.promptMessage,description:a.app.init.options.description}),d({flags:{key:e.BuildPath.name,alias:e.BuildPath.alias},env:e.BuildPath.envVar,message:e.BuildPath.promptMessage,initialValue:e.BuildPath.initialValue,default:"./dist",description:a.app.init.options.buildPath}),d({flags:{key:e.BuildCommand.name,alias:e.BuildCommand.alias},env:e.BuildCommand.envVar,message:e.BuildCommand.promptMessage,initialValue:e.BuildCommand.initialValue,default:"npm run build",description:a.app.init.options.buildCommand}),d({flags:{key:e.BuildEntryPoint.name},env:e.BuildEntryPoint.envVar,message:e.BuildEntryPoint.promptMessage,initialValue:e.BuildEntryPoint.initialValue,default:"index.html",description:a.app.init.options.buildEntryPoint}),{flags:{key:e.Repo.name},env:e.Repo.envVar,description:a.app.init.options.repo,optionalInNonInteractive:!0},{flags:{key:e.IconPath.name},env:e.IconPath.envVar,description:a.app.init.options.iconPath,optionalInNonInteractive:!0},{flags:{key:e.LocalAppUrl.name},env:e.LocalAppUrl.envVar,description:a.app.init.options.localAppUrl,optionalInNonInteractive:!0}]),t.addSwitch({flags:{key:e.OpenBrowser.name},description:a.app.init.options.openBrowser}),t.addSwitch({flags:{key:e.ForceReauth.name},description:a.app.init.options.forceReauth})}export{Ue as initAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=Init-CH5DUQWA.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as y}from"./chunk-YMXXWGRV.js";import{c as h}from"./chunk-YIKNM523.js";import{e as r}from"./chunk-5AUOEXAR.js";import{R as A,ua as g}from"./chunk-G33Q5FWT.js";import{b as f}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{b as s,j as n}from"./chunk-6MXOK2LG.js";import{f as d}from"./chunk-PVAIJSAI.js";import{a as e}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function k(o){w(o),await o.runVerb();let i=g(),a=await o.getTenantIdAsync();if(!a)throw new f("Unable to determine tenant ID. Ensure you are logged in.");let u=await h(o,i,{jsonMode:o.isJsonMode(),telemetryNamespace:"ListConnectorActions"}),c=await o.getOption("connector",!1),v=await o.getOption(n.Search.name,!0),C={tenantId:a,environmentId:u,actionsParams:{connectorId:c,search:v},logger:i},{actions:I,docsUrl:m}=await A(C),p=I.slice().sort((t,l)=>t.behavior!==l.behavior?t.behavior==="Allow"?-1:1:t.summary.localeCompare(l.summary));if(o.isJsonMode()){d(p);return}await y({title:`Connector Actions \u2014 ${c}`,metadata:m?[`Docs: ${m}`]:void 0,columns:[{header:"Summary",maxWidth:50},{header:"Behavior"},{header:"Action ID",maxWidth:40}],rows:p.map(t=>[t.deprecated?`[Deprecated] ${t.summary}`:t.summary,t.behavior,t.id]),emptyMessage:"No actions found.",totalLabel:"action(s)"})}function w(o){o.setDescription(e.connector["list-actions"].description),o.addExamples(e.connector["list-actions"].examples),o.addOptions([r({flags:{key:s.Connector.name},env:s.Connector.envVar,message:s.Connector.promptMessage,description:e.connector["list-actions"].options.connector}),{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:e.connector["list-actions"].options.environmentId,optionalInNonInteractive:!0},r({flags:{key:n.Search.name,alias:n.Search.alias},env:n.Search.envVar,message:n.Search.promptMessage,description:e.connector["list-actions"].options.search})])}export{k as listConnectorActionsCliAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ListConnectorActions-7SIFGPYR.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as h}from"./chunk-YMXXWGRV.js";import{c as y}from"./chunk-YIKNM523.js";import{e as f}from"./chunk-5AUOEXAR.js";import{S as p,ua as d}from"./chunk-G33Q5FWT.js";import{b as m}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{h as o}from"./chunk-6MXOK2LG.js";import{f as l}from"./chunk-PVAIJSAI.js";import{a as n}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function b(e){C(e),await e.runVerb();let s=d(),i=await e.getTenantIdAsync();if(!i)throw new m("Unable to determine tenant ID. Ensure you are logged in.");let g=await y(e,s,{jsonMode:e.isJsonMode(),telemetryNamespace:"ListConnectors"}),w=await e.getOption(o.Search.name,!0),A=await e.getOption(o.OnlyAllowed.camelName,!0),a=await p({tenantId:i,environmentId:g,actionsParams:{search:w},logger:s}),r=(A?a.filter(t=>!t.isBlocked):a).slice().sort((t,c)=>t.isBlocked!==c.isBlocked?t.isBlocked?1:-1:t.displayName.localeCompare(c.displayName));if(e.isJsonMode()){l(r);return}await h({title:"Connectors",columns:[{header:"Display Name",maxWidth:38},{header:"Connector",maxWidth:38},{header:"Policy Status"},{header:"Tabular"}],rows:r.map(t=>[t.displayName,t.name,t.isBlocked?"Blocked":"Allowed",t.isTabular?"Yes":"No"]),emptyMessage:"No connectors found.",totalLabel:"connector(s)",hint:n.connector.list.hint})}function C(e){e.setDescription(n.connector.list.description),e.addExamples(n.connector.list.examples),e.addSwitch({flags:{key:o.OnlyAllowed.name},description:n.connector.list.options.onlyAllowed}),e.addOptions([{flags:{key:o.EnvironmentId.name,alias:o.EnvironmentId.alias},env:o.EnvironmentId.envVar,description:n.connector.list.options.environmentId,optionalInNonInteractive:!0},f({flags:{key:o.Search.name,alias:o.Search.alias},env:o.Search.envVar,message:o.Search.promptMessage,description:n.connector.list.options.search})])}export{b as listConnectorsCliAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ListConnectors-TRKIWRVQ.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{e as g}from"./chunk-5AUOEXAR.js";import{ca as l,ua as m,va as h}from"./chunk-G33Q5FWT.js";import{b as f}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{i as t}from"./chunk-6MXOK2LG.js";import{a as I,f as L,h as M}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var D="edit",v={edit:"write",play:"read"},E=Object.keys(v);async function _(e){S(e),await e.runVerb();let s=await e.getTenantIdAsync();if(!s)throw new f("Unable to determine tenant ID. Ensure you are logged in.");let a=e.getEnvironmentId({includeConfig:!1}),p=await e.getOption(t.Permission.name,!0),w=!!p?.trim(),o;if(w){let i=U(p),d=await l({tenantId:s,environmentId:a,permission:i,logger:m()}),c=i==="write";o=d.map(n=>A(n,c))}else{let[i,d]=await Promise.all([l({tenantId:s,environmentId:a,permission:"write",logger:m()}),l({tenantId:s,environmentId:a,permission:"read",logger:m()})]),c=new Set(i.map(n=>n.id));o=[...i.map(n=>A(n,!0)),...d.filter(n=>!c.has(n.id)).map(n=>A(n,!1))]}if(e.isJsonMode()){L(o);return}let u=h().interactive,y=!u;I({title:a?`Managed Apps (environment: ${a})`:"Managed Apps",columns:[{header:"App ID",maxWidth:38},{header:"Display Name"},{header:"Last Deployed"},{header:"URL"},{header:y?"Repo":"Edit Access"}],rows:o.map(i=>[i.appId,i.displayName||"<No Name>",P(i.lastDeployedTime),i.appPlayUri??"-",y?i.cloneUrl??"-":i.hasEditAccess?"Yes":"No"]),emptyMessage:"No managed apps found.",totalLabel:"Managed app(s) found"}),u&&o.length>0&&M("Use `ms app info --app <GUID>` to get app details, including the clone URL.")}function S(e){e.setDescription(r.app.list.description),e.addExamples(r.app.list.examples),e.addOptions([g({flags:{key:t.EnvironmentId.name,alias:t.EnvironmentId.alias},env:t.EnvironmentId.envVar,message:t.EnvironmentId.promptMessage,description:r.app.list.options.environmentId}),g({flags:{key:t.Permission.name,alias:t.Permission.alias},env:t.Permission.envVar,message:t.Permission.promptMessage,description:r.app.list.options.permission})])}function U(e){let s=e?e.toLowerCase():D,a=E.find(p=>p===s);if(a)return v[a];throw new f(`Invalid --permission value '${e}'. Must be one of: ${E.join(", ")}.`)}function A(e,s=!0){return{appId:e.id,displayName:e.displayName,lastDeployedTime:e.lastDeployedTime??void 0,appPlayUri:e.appPlayUri??void 0,hasEditAccess:s,...s?{cloneUrl:e.cloneUrl??void 0}:{}}}function P(e){if(!e)return"-";let s=new Date(e);return Number.isNaN(s.getTime())?e:s.toLocaleDateString()}export{_ as listMaafAppsAsync,U as resolvePermission,A as toRow};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ListMaafApps-RT3PGZSJ.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as o}from"./chunk-6MXOK2LG.js";import{c,d as i}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function d(n){n.setDescription(t.auth.login.description),n.addExamples(t.auth.login.examples),n.addOption({flags:{key:o.Account.name},description:t.auth.login.options.account,optionalInNonInteractive:!0}),n.addSwitch({flags:{key:o.DeviceCode.name},description:t.auth.login.options.deviceCode}),await n.runVerb();let s=n.getAccountManager(),a=n.getAuthResourceUrl(),u=await n.getOption(o.Account.name,!0),p=!!await n.getOption(o.DeviceCode.camelName,!0),e=await s.loginInteractiveAsync(a,u,p);if(n.isJsonMode()){i({account:{username:e.username,homeAccountId:e.homeAccountId}});return}c(`Signed in as ${e.username}.`)}export{d as loginAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=Login-HG5S7LBC.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{c as n,d as s,h as a,i,j as c}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function g(e){e.setDescription(t.auth.logout.description),e.addExamples(t.auth.logout.examples),await e.runVerb();let l=e.getAccountManager(),u=e.isJsonMode(),o;try{o=await l.clearCacheAsync()}catch(r){throw c(`Failed to log out: ${r.message}`),r}if(u){s({cleared:o});return}o?(n("Successfully logged out. All cached credentials have been cleared."),a("On next command, you will be prompted to sign in via the browser. If your browser has a single account session, it will be used automatically.")):i("No user found.")}export{g as logoutAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=Logout-BUPHLOAH.js.map
|