@microsoft/managed-apps-cli 0.20.0 → 0.22.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/README.md +1 -1
- package/THIRD-PARTY-NOTICES.txt +9549 -0
- package/dist/AddConnector-5DUBFLEK.js +41 -0
- package/dist/AuthStatus-6DMK7O6W.js +11 -0
- package/dist/AuthSwitch-NUQIIRCG.js +13 -0
- package/dist/Bin.js +8 -3
- package/dist/BuildMaafApp-A4IUU6LI.js +11 -0
- package/dist/Cli-LYSWG64H.js +54 -0
- package/dist/CloneMaafApp-B672N7T5.js +11 -0
- package/dist/CreateMaafApp-RWL7FXSP.js +20 -0
- package/dist/DeleteMaafApp-GT4CEFAE.js +11 -0
- package/dist/DeployMaafApp-E4TQU6RO.js +14 -0
- package/dist/Dev-ICCA5DEJ.js +14 -0
- package/dist/EnvironmentVariableAuthenticationProvider-LYCQ5D47.js +11 -0
- package/dist/GetMaafBuildStatus-UGAHVANE.js +11 -0
- package/dist/GetSettings-ZI2IBKV5.js +11 -0
- package/dist/InfoMaafApp-FL5PICDD.js +13 -0
- package/dist/Init-XCSK3WQM.js +11 -0
- package/dist/ListConnectorActions-B2YD24RX.js +11 -0
- package/dist/ListConnectors-MYUEVJPT.js +11 -0
- package/dist/ListMaafApps-3W6W6UYP.js +11 -0
- package/dist/Login-7RW6OEST.js +11 -0
- package/dist/Logout-IXK2TMRL.js +11 -0
- package/dist/MockFetch-THQJ4KFB.js +13 -0
- package/dist/NoOpAuthenticationProvider-DX3XNXF5.js +11 -0
- package/dist/NodeMsalAuthenticationProvider-VVQ6CCZ5.js +17 -0
- package/dist/Pack-IWU3PFQL.js +8 -0
- package/dist/PlayMaafApp-5H3DCJ2C.js +12 -0
- package/dist/RefreshDataSource-XQT7LVMO.js +11 -0
- package/dist/RefreshGitAuth-IQBAFR37.js +11 -0
- package/dist/RemoveDataSource-PGPLMJUX.js +14 -0
- package/dist/ServicePrincipalAuthenticationProvider-IZZRJFZQ.js +11 -0
- package/dist/SetSetting-SEWDA4TF.js +11 -0
- package/dist/ShareLinkCreate-T5FN47J2.js +11 -0
- package/dist/ShareLinkList-6JCVEYNC.js +11 -0
- package/dist/ShareLinkRevoke-OH5DZDHR.js +11 -0
- package/dist/ShareList-QCEL7QNJ.js +11 -0
- package/dist/ShareMaafApp-6MKZ33HW.js +11 -0
- package/dist/TelemetrySettings-RXPPIEVO.js +11 -0
- package/dist/UnshareMaafApp-OSE2TOBJ.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-23T63QIT.js +15 -0
- package/dist/chunk-3JIZGVCA.js +11 -0
- package/dist/chunk-3YRE4IQ3.js +132 -0
- package/dist/chunk-47LJLFDF.js +11 -0
- package/dist/chunk-4LIR3ZYP.js +42325 -0
- package/dist/chunk-4VBFOKV6.js +11 -0
- package/dist/chunk-6LKH5WE7.js +104 -0
- package/dist/chunk-6RSE3J4X.js +8 -0
- package/dist/chunk-7BRIEYGR.js +20 -0
- package/dist/chunk-7GGFN2IW.js +11 -0
- package/dist/chunk-AQLFVAFU.js +38 -0
- package/dist/chunk-EQCYKUEU.js +12 -0
- package/dist/chunk-EX6IKPAO.js +11 -0
- package/dist/chunk-HBLO3WDD.js +13 -0
- package/dist/chunk-IQGMFWXB.js +12 -0
- package/dist/chunk-KYL2Y5G4.js +11 -0
- package/dist/chunk-LQ65CHNN.js +13 -0
- package/dist/chunk-OL6CTXQR.js +11 -0
- package/dist/chunk-PPW4XUZO.js +77 -0
- package/dist/chunk-PVAIJSAI.js +11 -0
- package/dist/chunk-RBG2H562.js +11 -0
- package/dist/chunk-SNWTSI75.js +50 -0
- package/dist/chunk-TYRVM4PP.js +8 -0
- package/dist/chunk-UNJJUCSA.js +11 -0
- package/dist/chunk-USRRI5H4.js +11 -0
- package/dist/chunk-UT667QSU.js +8 -0
- package/dist/chunk-VMSJG53Y.js +11 -0
- package/dist/chunk-Y5AMO72S.js +10 -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
package/dist/Utils/RunCommand.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { spawn } from 'node:child_process';
|
|
5
|
-
import { AppError } from '../Errors/CliError.js';
|
|
6
|
-
/**
|
|
7
|
-
* Default per-stream tail cap for quiet-mode capture. A chatty `--verbose` build can
|
|
8
|
-
* spew tens or hundreds of MB; that whole payload would otherwise land in
|
|
9
|
-
* `AppError.message`, the JSON `errorMessage`, and the `trackErrorEvent` OneDS event.
|
|
10
|
-
* We keep only the tail — which is where the actual failure diagnostic lives — and
|
|
11
|
-
* prepend a marker line so the consumer knows truncation happened.
|
|
12
|
-
*
|
|
13
|
-
* 8 KB ≈ 8000 characters of mostly-ASCII tool output (~100 lines at 80 cols) — enough
|
|
14
|
-
* to capture a typical stack trace or compiler diagnostic without bloating telemetry.
|
|
15
|
-
*/
|
|
16
|
-
export const CAPTURE_TAIL_CAP_BYTES = 8 * 1024;
|
|
17
|
-
function makeSink() {
|
|
18
|
-
return { chunks: [], bytes: 0, dropped: 0 };
|
|
19
|
-
}
|
|
20
|
-
function appendCapped(sink, chunk, cap) {
|
|
21
|
-
sink.chunks.push(chunk);
|
|
22
|
-
sink.bytes += chunk.length;
|
|
23
|
-
while (sink.bytes > cap) {
|
|
24
|
-
const overflow = sink.bytes - cap;
|
|
25
|
-
const head = sink.chunks[0];
|
|
26
|
-
if (head.length <= overflow) {
|
|
27
|
-
sink.chunks.shift();
|
|
28
|
-
sink.bytes -= head.length;
|
|
29
|
-
sink.dropped += head.length;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
sink.chunks[0] = head.subarray(overflow);
|
|
33
|
-
sink.bytes -= overflow;
|
|
34
|
-
sink.dropped += overflow;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function decodeSink(sink) {
|
|
39
|
-
// toString('utf8') on a sliced tail may yield a replacement char at byte 0 if the
|
|
40
|
-
// slice cut a multi-byte codepoint — acceptable for a diagnostic message; the
|
|
41
|
-
// surrounding context still reads correctly.
|
|
42
|
-
const tail = Buffer.concat(sink.chunks).toString('utf8').trimEnd();
|
|
43
|
-
if (sink.dropped === 0)
|
|
44
|
-
return tail;
|
|
45
|
-
return `[truncated earlier ${sink.dropped} bytes; showing last ${sink.bytes} bytes]\n${tail}`;
|
|
46
|
-
}
|
|
47
|
-
export function runCommandAsync(command, cwd, options = {}) {
|
|
48
|
-
return new Promise((resolve, reject) => {
|
|
49
|
-
const { quiet = false, captureTailCapBytes = CAPTURE_TAIL_CAP_BYTES } = options;
|
|
50
|
-
const child = spawn(command, {
|
|
51
|
-
cwd,
|
|
52
|
-
stdio: quiet ? ['ignore', 'pipe', 'pipe'] : 'inherit',
|
|
53
|
-
shell: true,
|
|
54
|
-
});
|
|
55
|
-
// Collect raw bytes (capped per stream) and decode once at close — avoids
|
|
56
|
-
// mojibake from a UTF-8 character split across two `data` chunks, and keeps
|
|
57
|
-
// both the envelope and the OneDS event size-bounded under chatty builds.
|
|
58
|
-
const stdoutSink = makeSink();
|
|
59
|
-
const stderrSink = makeSink();
|
|
60
|
-
if (quiet) {
|
|
61
|
-
child.stdout?.on('data', (c) => appendCapped(stdoutSink, c, captureTailCapBytes));
|
|
62
|
-
child.stderr?.on('data', (c) => appendCapped(stderrSink, c, captureTailCapBytes));
|
|
63
|
-
}
|
|
64
|
-
child.on('close', (code) => {
|
|
65
|
-
if (code === 0) {
|
|
66
|
-
resolve();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const base = `Command exited with code ${code}: ${command}`;
|
|
70
|
-
if (!quiet) {
|
|
71
|
-
reject(new AppError(base, code ?? 1));
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const stderr = decodeSink(stderrSink);
|
|
75
|
-
const stdout = decodeSink(stdoutSink);
|
|
76
|
-
const detail = stderr.length > 0 ? stderr : stdout;
|
|
77
|
-
const message = detail.length > 0 ? `${base}\n${detail}` : base;
|
|
78
|
-
reject(new AppError(message, code ?? 1));
|
|
79
|
-
});
|
|
80
|
-
child.on('error', reject);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=RunCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RunCommand.js","sourceRoot":"","sources":["../../src/Utils/RunCommand.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAoB9C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,CAAC;AAQ/C,SAAS,QAAQ;IACf,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AAC9C,CAAC;AAED,SAAS,YAAY,CAAC,IAAiB,EAAE,KAAa,EAAE,GAAW;IACjE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC;IAC3B,OAAO,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC;QACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACpB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,OAAO,IAAI,IA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,78 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import type { MaafAppDefinition } from '@microsoft/managed-apps-actions';
|
|
5
|
-
import type { RepoType } from '@microsoft/managed-apps-common/config';
|
|
6
|
-
/**
|
|
7
|
-
* Selects which access level the caller wants to grant/revoke/list:
|
|
8
|
-
*
|
|
9
|
-
* - `play` — read-only access to the MAAF app itself, granted at the app scope
|
|
10
|
-
* via PowerApps RP (`MicrosoftAppReader` role).
|
|
11
|
-
* - `edit` — read + write access to the app's code. The concrete scope depends
|
|
12
|
-
* on `repoType`: for `native` repositories the `RepositoryContributor` role
|
|
13
|
-
* lives at the GRS repo scope; for `none` / `github` repositories the
|
|
14
|
-
* `MicrosoftAppContributor` role lives at the MAAF app scope instead (since
|
|
15
|
-
* there is no platform-managed repository to attach a role to).
|
|
16
|
-
*/
|
|
17
|
-
export type MaafAppAccessLevel = 'play' | 'edit';
|
|
18
|
-
export declare const noRepositoryLinkedMessage: string;
|
|
19
|
-
export declare const externalRepositoryWarning: string;
|
|
20
|
-
/**
|
|
21
|
-
* The all-zero GUID the platform writes as a "no repository" placeholder. A
|
|
22
|
-
* config or app definition carrying this value must be treated as having no
|
|
23
|
-
* repo-scope id (i.e. never used to address a GRS repo endpoint).
|
|
24
|
-
*/
|
|
25
|
-
export declare const EmptyRepositoryId = "00000000-0000-0000-0000-000000000000";
|
|
26
|
-
/**
|
|
27
|
-
* True when a `repositoryId` is present and is a real id — i.e. non-empty and
|
|
28
|
-
* not the {@link EmptyRepositoryId} sentinel. Use this everywhere a
|
|
29
|
-
* `repositoryId` is about to drive a repo-scope read so the zero-GUID
|
|
30
|
-
* placeholder is consistently treated as "no repo".
|
|
31
|
-
*/
|
|
32
|
-
export declare function hasMeaningfulRepositoryId(repositoryId: string | undefined): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Parses the `--access` flag value. Defaults to `'play'` when omitted so
|
|
35
|
-
* `share`/`unshare` keep their pre-flag behaviour for callers that haven't
|
|
36
|
-
* migrated. Throws a `UsageError` on any other value — Commander.js doesn't
|
|
37
|
-
* enforce enum membership by default and we want a precise error message.
|
|
38
|
-
*
|
|
39
|
-
* `play` and `edit` are the only externally visible levels. The role and scope
|
|
40
|
-
* the level resolves to are decided downstream (see {@link MaafAppAccessLevel}).
|
|
41
|
-
*/
|
|
42
|
-
export declare function parseAccessLevel(raw: string | undefined): MaafAppAccessLevel;
|
|
43
|
-
/**
|
|
44
|
-
* Resolves the effective {@link RepoType} from an `AppConfig`.
|
|
45
|
-
*
|
|
46
|
-
* Hard rule: if `repoType` is missing AND the config carries a (non-empty,
|
|
47
|
-
* non-zero-GUID) `repositoryId`, refuse to guess - the user must re-run
|
|
48
|
-
* `app init` to migrate the config. When both are missing we treat it as
|
|
49
|
-
* `'none'`: there is no repo-scope to act on, and the app-scope fallback in
|
|
50
|
-
* the share/unshare/list routing handles edit correctly.
|
|
51
|
-
*/
|
|
52
|
-
export declare function resolveRepoType(appConfig: {
|
|
53
|
-
repoType?: RepoType;
|
|
54
|
-
repositoryId?: string;
|
|
55
|
-
}): RepoType;
|
|
56
|
-
/**
|
|
57
|
-
* Fetches the app definition via the info action. Performs no `repositoryId`
|
|
58
|
-
* validation — use this when the caller only needs app metadata (e.g. to
|
|
59
|
-
* classify the {@link RepoType} for routing). Callers that require a repo-scope
|
|
60
|
-
* id must validate it themselves (see {@link resolveAppForEditAsync}).
|
|
61
|
-
*/
|
|
62
|
-
export declare function fetchAppDefinitionAsync(args: {
|
|
63
|
-
tenantId: string;
|
|
64
|
-
environmentId: string;
|
|
65
|
-
appName: string;
|
|
66
|
-
}): Promise<MaafAppDefinition>;
|
|
67
|
-
/**
|
|
68
|
-
* Fetches the app definition and validates it carries a `repositoryId`. Used by
|
|
69
|
-
* the `edit` access paths that drive the GRS repo-scope endpoints; the returned
|
|
70
|
-
* definition is also reused to surface the post-share repository details
|
|
71
|
-
* (avoiding a second GET on the native path).
|
|
72
|
-
*/
|
|
73
|
-
export declare function resolveAppForEditAsync(args: {
|
|
74
|
-
tenantId: string;
|
|
75
|
-
environmentId: string;
|
|
76
|
-
appName: string;
|
|
77
|
-
}): Promise<MaafAppDefinition>;
|
|
78
|
-
//# sourceMappingURL=ShareAccessRouting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareAccessRouting.d.ts","sourceRoot":"","sources":["../../src/Utils/ShareAccessRouting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAOtE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,eAAO,MAAM,yBAAyB,QAIkB,CAAC;AAEzD,eAAO,MAAM,yBAAyB,QAE8B,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,yCAAyC,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,CAQ5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE;IACzC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,QAAQ,CAYX;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAO7B;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAM7B"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { infoAsync } from '@microsoft/managed-apps-actions';
|
|
5
|
-
import { AppConfigFileName } from '@microsoft/managed-apps-common/config';
|
|
6
|
-
import { getCliLogger } from '../CliSettings.js';
|
|
7
|
-
import { CLI_BINARY_NAME } from '../Constants/CliConstants.js';
|
|
8
|
-
import { UsageError } from '../Errors/CliError.js';
|
|
9
|
-
export const noRepositoryLinkedMessage = 'Cannot share source code — no repository linked.\n\n' +
|
|
10
|
-
"This app has no linked repository, so source code isn't stored on the platform. " +
|
|
11
|
-
"To collaborate on code, run 'ms app init' to create an app instance with a repo, " +
|
|
12
|
-
'or share the source with your collaborator directly.';
|
|
13
|
-
export const externalRepositoryWarning = 'This app is not backed by a platform managed repo. ' +
|
|
14
|
-
'Repository access must be configured in the external repository.';
|
|
15
|
-
/**
|
|
16
|
-
* The all-zero GUID the platform writes as a "no repository" placeholder. A
|
|
17
|
-
* config or app definition carrying this value must be treated as having no
|
|
18
|
-
* repo-scope id (i.e. never used to address a GRS repo endpoint).
|
|
19
|
-
*/
|
|
20
|
-
export const EmptyRepositoryId = '00000000-0000-0000-0000-000000000000';
|
|
21
|
-
/**
|
|
22
|
-
* True when a `repositoryId` is present and is a real id — i.e. non-empty and
|
|
23
|
-
* not the {@link EmptyRepositoryId} sentinel. Use this everywhere a
|
|
24
|
-
* `repositoryId` is about to drive a repo-scope read so the zero-GUID
|
|
25
|
-
* placeholder is consistently treated as "no repo".
|
|
26
|
-
*/
|
|
27
|
-
export function hasMeaningfulRepositoryId(repositoryId) {
|
|
28
|
-
return !!repositoryId && repositoryId !== EmptyRepositoryId;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Parses the `--access` flag value. Defaults to `'play'` when omitted so
|
|
32
|
-
* `share`/`unshare` keep their pre-flag behaviour for callers that haven't
|
|
33
|
-
* migrated. Throws a `UsageError` on any other value — Commander.js doesn't
|
|
34
|
-
* enforce enum membership by default and we want a precise error message.
|
|
35
|
-
*
|
|
36
|
-
* `play` and `edit` are the only externally visible levels. The role and scope
|
|
37
|
-
* the level resolves to are decided downstream (see {@link MaafAppAccessLevel}).
|
|
38
|
-
*/
|
|
39
|
-
export function parseAccessLevel(raw) {
|
|
40
|
-
const value = (raw ?? 'play').trim().toLowerCase();
|
|
41
|
-
if (value === 'play' || value === 'edit') {
|
|
42
|
-
return value;
|
|
43
|
-
}
|
|
44
|
-
throw new UsageError(`Unknown --access value '${raw}'. Use 'play' (default — app access) or 'edit' (edit access).`);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Resolves the effective {@link RepoType} from an `AppConfig`.
|
|
48
|
-
*
|
|
49
|
-
* Hard rule: if `repoType` is missing AND the config carries a (non-empty,
|
|
50
|
-
* non-zero-GUID) `repositoryId`, refuse to guess - the user must re-run
|
|
51
|
-
* `app init` to migrate the config. When both are missing we treat it as
|
|
52
|
-
* `'none'`: there is no repo-scope to act on, and the app-scope fallback in
|
|
53
|
-
* the share/unshare/list routing handles edit correctly.
|
|
54
|
-
*/
|
|
55
|
-
export function resolveRepoType(appConfig) {
|
|
56
|
-
if (appConfig.repoType) {
|
|
57
|
-
return appConfig.repoType;
|
|
58
|
-
}
|
|
59
|
-
if (hasMeaningfulRepositoryId(appConfig.repositoryId)) {
|
|
60
|
-
throw new UsageError(`${AppConfigFileName} is missing the 'repoType' field but has a 'repositoryId' set. ` +
|
|
61
|
-
`This usually means the file was written by an older CLI. ` +
|
|
62
|
-
`Re-run "${CLI_BINARY_NAME} app init" to migrate the config, then retry.`);
|
|
63
|
-
}
|
|
64
|
-
return 'none';
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Fetches the app definition via the info action. Performs no `repositoryId`
|
|
68
|
-
* validation — use this when the caller only needs app metadata (e.g. to
|
|
69
|
-
* classify the {@link RepoType} for routing). Callers that require a repo-scope
|
|
70
|
-
* id must validate it themselves (see {@link resolveAppForEditAsync}).
|
|
71
|
-
*/
|
|
72
|
-
export async function fetchAppDefinitionAsync(args) {
|
|
73
|
-
return infoAsync({
|
|
74
|
-
tenantId: args.tenantId,
|
|
75
|
-
environmentId: args.environmentId,
|
|
76
|
-
logger: getCliLogger(),
|
|
77
|
-
actionsParams: { appName: args.appName },
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Fetches the app definition and validates it carries a `repositoryId`. Used by
|
|
82
|
-
* the `edit` access paths that drive the GRS repo-scope endpoints; the returned
|
|
83
|
-
* definition is also reused to surface the post-share repository details
|
|
84
|
-
* (avoiding a second GET on the native path).
|
|
85
|
-
*/
|
|
86
|
-
export async function resolveAppForEditAsync(args) {
|
|
87
|
-
const app = await fetchAppDefinitionAsync(args);
|
|
88
|
-
if (!hasMeaningfulRepositoryId(app.repositoryId)) {
|
|
89
|
-
throw new UsageError(`App '${args.appName}' has no associated repository.`);
|
|
90
|
-
}
|
|
91
|
-
return app;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=ShareAccessRouting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareAccessRouting.js","sourceRoot":"","sources":["../../src/Utils/ShareAccessRouting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,E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Aa,EAAE,IAAI,CAAC,aAAa;QACjC,MAAM,EAAE,YAAY,EAAE;QACtB,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;KACzC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAI5C;IACC,MAAM,GAAG,GAAG,MAAM,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,OAAO,iCAAiC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/Utils/Spinner.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
export declare class CliSpinner {
|
|
5
|
-
private _timer;
|
|
6
|
-
private _frameIndex;
|
|
7
|
-
private _label;
|
|
8
|
-
private _render;
|
|
9
|
-
private _restoreCursor;
|
|
10
|
-
private _handleSIGINT;
|
|
11
|
-
private _handleSIGTERM;
|
|
12
|
-
private _handleUncaughtException;
|
|
13
|
-
private _handleUnhandledRejection;
|
|
14
|
-
start(label?: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* Replaces the status text shown beside the spinner frame. Safe to call
|
|
17
|
-
* before `start()` (the next start uses the new label) or while spinning
|
|
18
|
-
* (the line is redrawn immediately so the change feels instant).
|
|
19
|
-
*/
|
|
20
|
-
update(text: string): void;
|
|
21
|
-
stop(): void;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Utils/Spinner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAA+C;IAC7D,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,cAAc,CAGpB;IAEF,OAAO,CAAC,aAAa,CAKnB;IAEF,OAAO,CAAC,cAAc,CAIpB;IAEF,OAAO,CAAC,wBAAwB,CAK9B;IAEF,OAAO,CAAC,yBAAyB,CAI/B;IAEF,KAAK,CAAC,KAAK,SAAK,GAAG,IAAI;IAwBvB;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK1B,IAAI,IAAI,IAAI;CAcb"}
|
package/dist/Utils/Spinner.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
5
|
-
export class CliSpinner {
|
|
6
|
-
_timer = null;
|
|
7
|
-
_frameIndex = 0;
|
|
8
|
-
_label = '';
|
|
9
|
-
_render() {
|
|
10
|
-
const suffix = this._label.length > 0 ? ` ${this._label}` : '';
|
|
11
|
-
// `\x1B[K` clears from the cursor to end of line so a shorter label
|
|
12
|
-
// never leaves behind trailing characters from a previous longer one.
|
|
13
|
-
process.stdout.write(`\r${SPINNER_FRAMES[this._frameIndex]}${suffix}\x1B[K`);
|
|
14
|
-
}
|
|
15
|
-
// Arrow functions so `this` is stable when passed to process.on/off.
|
|
16
|
-
_restoreCursor = () => {
|
|
17
|
-
process.stdout.write('\r\x1B[K'); // erase spinner line
|
|
18
|
-
process.stdout.write('\x1B[?25h'); // show cursor
|
|
19
|
-
};
|
|
20
|
-
_handleSIGINT = () => {
|
|
21
|
-
if (this._timer !== null)
|
|
22
|
-
clearInterval(this._timer);
|
|
23
|
-
this._restoreCursor();
|
|
24
|
-
// Re-raise so the process actually exits with the correct signal.
|
|
25
|
-
process.kill(process.pid, 'SIGINT');
|
|
26
|
-
};
|
|
27
|
-
_handleSIGTERM = () => {
|
|
28
|
-
if (this._timer !== null)
|
|
29
|
-
clearInterval(this._timer);
|
|
30
|
-
this._restoreCursor();
|
|
31
|
-
process.kill(process.pid, 'SIGTERM');
|
|
32
|
-
};
|
|
33
|
-
_handleUncaughtException = (error) => {
|
|
34
|
-
if (this._timer !== null)
|
|
35
|
-
clearInterval(this._timer);
|
|
36
|
-
this._restoreCursor();
|
|
37
|
-
// Re-throw so Node.js prints the error and exits with code 1.
|
|
38
|
-
throw error;
|
|
39
|
-
};
|
|
40
|
-
_handleUnhandledRejection = (reason) => {
|
|
41
|
-
if (this._timer !== null)
|
|
42
|
-
clearInterval(this._timer);
|
|
43
|
-
this._restoreCursor();
|
|
44
|
-
throw reason;
|
|
45
|
-
};
|
|
46
|
-
start(label = '') {
|
|
47
|
-
this._label = label;
|
|
48
|
-
if (this._timer !== null) {
|
|
49
|
-
// Already spinning — just refresh the line so the new label appears
|
|
50
|
-
// immediately rather than waiting for the next tick.
|
|
51
|
-
this._render();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
process.stdout.write('\x1B[?25l'); // hide cursor
|
|
55
|
-
// Restore cursor if the process exits before stop() is called normally.
|
|
56
|
-
process.once('exit', this._restoreCursor);
|
|
57
|
-
process.once('SIGINT', this._handleSIGINT);
|
|
58
|
-
process.once('SIGTERM', this._handleSIGTERM);
|
|
59
|
-
process.once('uncaughtException', this._handleUncaughtException);
|
|
60
|
-
process.once('unhandledRejection', this._handleUnhandledRejection);
|
|
61
|
-
// Paint the first frame immediately so a sync check that blocks the event
|
|
62
|
-
// loop still shows the current status line right away.
|
|
63
|
-
this._render();
|
|
64
|
-
this._timer = setInterval(() => {
|
|
65
|
-
this._render();
|
|
66
|
-
this._frameIndex = (this._frameIndex + 1) % SPINNER_FRAMES.length;
|
|
67
|
-
}, 80);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Replaces the status text shown beside the spinner frame. Safe to call
|
|
71
|
-
* before `start()` (the next start uses the new label) or while spinning
|
|
72
|
-
* (the line is redrawn immediately so the change feels instant).
|
|
73
|
-
*/
|
|
74
|
-
update(text) {
|
|
75
|
-
this._label = text;
|
|
76
|
-
if (this._timer !== null)
|
|
77
|
-
this._render();
|
|
78
|
-
}
|
|
79
|
-
stop() {
|
|
80
|
-
if (this._timer !== null) {
|
|
81
|
-
clearInterval(this._timer);
|
|
82
|
-
this._timer = null;
|
|
83
|
-
this._frameIndex = 0;
|
|
84
|
-
// Clean up exit handlers registered in start().
|
|
85
|
-
process.off('exit', this._restoreCursor);
|
|
86
|
-
process.off('SIGINT', this._handleSIGINT);
|
|
87
|
-
process.off('SIGTERM', this._handleSIGTERM);
|
|
88
|
-
process.off('uncaughtException', this._handleUncaughtException);
|
|
89
|
-
process.off('unhandledRejection', this._handleUnhandledRejection);
|
|
90
|
-
this._restoreCursor();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=Spinner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../src/Utils/Spinner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1E,MAAM,OAAO,UAAU;IACb,MAAM,GAA0C,IAAI,CAAC;IACrD,WAAW,GAAG,CAAC,CAAC;IAChB,MAAM,GAAG,EAAE,CAAC;IAEZ,OAAO;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,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AE,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACzB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;YACrB,gDAAgD;YAChD,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAChE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;YAClE,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Decision for a single `archiver` `'warning'` event:
|
|
6
|
-
* - `'continue'`: log and proceed (ENOENT — vanished file or dangling symlink).
|
|
7
|
-
* - `Error`: reject the archive with this error (anything else).
|
|
8
|
-
*
|
|
9
|
-
* Extracted from {@link zipBuildArtifact} so the policy can be unit-tested directly without
|
|
10
|
-
* needing to provoke real archiver warnings (non-ENOENT cases are hard to provoke
|
|
11
|
-
* cross-platform). The handler is intentionally pure: no I/O, no side effects.
|
|
12
|
-
*/
|
|
13
|
-
export declare function classifyArchiveWarning(err: unknown): 'continue' | Error;
|
|
14
|
-
/**
|
|
15
|
-
* Formats the user-facing warning line for an ENOENT entry. Lives here so the test for the
|
|
16
|
-
* warning text doesn't have to import {@link zipBuildArtifact}'s internals.
|
|
17
|
-
*/
|
|
18
|
-
export declare function formatMissingEntryWarning(err: unknown): string;
|
|
19
|
-
/**
|
|
20
|
-
* Zips the contents of `buildPath` (flattened — `buildPath`'s files appear at the zip root,
|
|
21
|
-
* not nested under a `build/` directory) and adds `ms.config.json` at the same root.
|
|
22
|
-
*
|
|
23
|
-
* The resulting `Buffer` is the entire zip in memory. When `maxBytes` is supplied, the helper
|
|
24
|
-
* counts emitted bytes as the archive streams and aborts as soon as the running total exceeds
|
|
25
|
-
* the cap — preventing OOM when the source tree is huge. Callers that don't enforce a cap can
|
|
26
|
-
* omit the option.
|
|
27
|
-
*
|
|
28
|
-
* The helper is a pure file-IO utility: it does not parse `ms.config.json`. Callers that
|
|
29
|
-
* need the schema (e.g. `appId`) should read it separately. ENOENT warnings during archiving
|
|
30
|
-
* (vanished files, dangling symlinks) are surfaced to stderr; non-ENOENT warnings reject.
|
|
31
|
-
*/
|
|
32
|
-
export declare function zipBuildArtifact(buildPath: string, appConfigPath: string, options?: {
|
|
33
|
-
maxBytes?: number;
|
|
34
|
-
}): Promise<Buffer>;
|
|
35
|
-
//# sourceMappingURL=zipBuildArtifact.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zipBuildArtifact.d.ts","sourceRoot":"","sources":["../../src/Utils/zipBuildArtifact.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,GAAG,KAAK,CAIvE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAG9D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9B,OAAO,CAAC,MAAM,CAAC,CAuDjB"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { promises as fs } from 'node:fs';
|
|
5
|
-
import { AppConfigFileName } from '@microsoft/managed-apps-common/config';
|
|
6
|
-
import { BuildArtifactTooLargeError, UsageError } from '@microsoft/managed-apps-common/errors';
|
|
7
|
-
import archiver from 'archiver';
|
|
8
|
-
import { printWarning } from './ConsoleOutput.js';
|
|
9
|
-
/**
|
|
10
|
-
* Decision for a single `archiver` `'warning'` event:
|
|
11
|
-
* - `'continue'`: log and proceed (ENOENT — vanished file or dangling symlink).
|
|
12
|
-
* - `Error`: reject the archive with this error (anything else).
|
|
13
|
-
*
|
|
14
|
-
* Extracted from {@link zipBuildArtifact} so the policy can be unit-tested directly without
|
|
15
|
-
* needing to provoke real archiver warnings (non-ENOENT cases are hard to provoke
|
|
16
|
-
* cross-platform). The handler is intentionally pure: no I/O, no side effects.
|
|
17
|
-
*/
|
|
18
|
-
export function classifyArchiveWarning(err) {
|
|
19
|
-
const code = err?.code;
|
|
20
|
-
if (code === 'ENOENT')
|
|
21
|
-
return 'continue';
|
|
22
|
-
return err instanceof Error ? err : new Error(String(err));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Formats the user-facing warning line for an ENOENT entry. Lives here so the test for the
|
|
26
|
-
* warning text doesn't have to import {@link zipBuildArtifact}'s internals.
|
|
27
|
-
*/
|
|
28
|
-
export function formatMissingEntryWarning(err) {
|
|
29
|
-
const path = err?.path ?? '<unknown>';
|
|
30
|
-
return `zipBuildArtifact: skipping missing entry: ${path}`;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Zips the contents of `buildPath` (flattened — `buildPath`'s files appear at the zip root,
|
|
34
|
-
* not nested under a `build/` directory) and adds `ms.config.json` at the same root.
|
|
35
|
-
*
|
|
36
|
-
* The resulting `Buffer` is the entire zip in memory. When `maxBytes` is supplied, the helper
|
|
37
|
-
* counts emitted bytes as the archive streams and aborts as soon as the running total exceeds
|
|
38
|
-
* the cap — preventing OOM when the source tree is huge. Callers that don't enforce a cap can
|
|
39
|
-
* omit the option.
|
|
40
|
-
*
|
|
41
|
-
* The helper is a pure file-IO utility: it does not parse `ms.config.json`. Callers that
|
|
42
|
-
* need the schema (e.g. `appId`) should read it separately. ENOENT warnings during archiving
|
|
43
|
-
* (vanished files, dangling symlinks) are surfaced to stderr; non-ENOENT warnings reject.
|
|
44
|
-
*/
|
|
45
|
-
export async function zipBuildArtifact(buildPath, appConfigPath, options) {
|
|
46
|
-
const buildStat = await fs.stat(buildPath).catch(() => null);
|
|
47
|
-
if (!buildStat) {
|
|
48
|
-
throw new UsageError(`buildPath not found: ${buildPath}`);
|
|
49
|
-
}
|
|
50
|
-
if (!buildStat.isDirectory()) {
|
|
51
|
-
throw new UsageError(`buildPath is not a directory: ${buildPath}`);
|
|
52
|
-
}
|
|
53
|
-
const configStat = await fs.stat(appConfigPath).catch(() => null);
|
|
54
|
-
if (!configStat || !configStat.isFile()) {
|
|
55
|
-
throw new UsageError(`appConfigPath does not point to a file: ${appConfigPath}`);
|
|
56
|
-
}
|
|
57
|
-
const maxBytes = options?.maxBytes;
|
|
58
|
-
return new Promise((resolve, reject) => {
|
|
59
|
-
const chunks = [];
|
|
60
|
-
let totalBytes = 0;
|
|
61
|
-
let aborted = false;
|
|
62
|
-
const archive = archiver('zip', { zlib: { level: 9 } });
|
|
63
|
-
archive.on('data', (chunk) => {
|
|
64
|
-
if (aborted)
|
|
65
|
-
return;
|
|
66
|
-
totalBytes += chunk.length;
|
|
67
|
-
if (maxBytes !== undefined && totalBytes > maxBytes) {
|
|
68
|
-
aborted = true;
|
|
69
|
-
archive.abort();
|
|
70
|
-
reject(new BuildArtifactTooLargeError({ capBytes: maxBytes, bytes: totalBytes }));
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
chunks.push(chunk);
|
|
74
|
-
});
|
|
75
|
-
archive.on('warning', (err) => {
|
|
76
|
-
if (aborted)
|
|
77
|
-
return;
|
|
78
|
-
const decision = classifyArchiveWarning(err);
|
|
79
|
-
if (decision === 'continue') {
|
|
80
|
-
// Surface to stderr via the CLI's logger pipeline so the line is chalk-coloured
|
|
81
|
-
// alongside other CLI output, and so test seams can intercept it.
|
|
82
|
-
printWarning(formatMissingEntryWarning(err));
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
reject(decision);
|
|
86
|
-
});
|
|
87
|
-
archive.on('error', (err) => {
|
|
88
|
-
if (!aborted)
|
|
89
|
-
reject(err);
|
|
90
|
-
});
|
|
91
|
-
archive.on('end', () => {
|
|
92
|
-
if (!aborted)
|
|
93
|
-
resolve(Buffer.concat(chunks));
|
|
94
|
-
});
|
|
95
|
-
archive.directory(buildPath, false);
|
|
96
|
-
archive.file(appConfigPath, { name: AppConfigFileName });
|
|
97
|
-
void archive.finalize();
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=zipBuildArtifact.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zipBuildArtifact.js","sourceRoot":"","sources":["../../src/Utils/zipBuildArtifact.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAY;IACjD,MAAM,IAAI,GAAI,GAAgC,EAAE,IAAI,CAAC;IACrD,IAAI,IAAI,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AE,GAAG,EAAE;YACrB,IAAI,CAAC,OAAO;gBAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACzD,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import type { ArgumentProvider } from '../ArgumentProvider.js';
|
|
5
|
-
export declare function addActionAsync(argumentProvider: ArgumentProvider): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=AddAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddAction.d.ts","sourceRoot":"","sources":["../../src/Verbs/AddAction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,wBAAsB,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBtF"}
|
package/dist/Verbs/AddAction.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { createDefaultStringOption, requireAppConfig } from '../CliUtils.js';
|
|
5
|
-
import { HelpStrings } from '../Constants/HelpStrings.js';
|
|
6
|
-
import { runAddActionFlowAsync } from './AddConnectorFlows.js';
|
|
7
|
-
import { runConnectorDlpPreflightAsync } from './ConnectorHelpers.js';
|
|
8
|
-
import { AddActionArguments, SharedArguments } from './VerbConstants.js';
|
|
9
|
-
export async function addActionAsync(argumentProvider) {
|
|
10
|
-
createOptionSchema(argumentProvider);
|
|
11
|
-
await argumentProvider.runVerb();
|
|
12
|
-
requireAppConfig();
|
|
13
|
-
// Commander converts kebab-case flags to camelCase attribute names — use camelCase here.
|
|
14
|
-
const apiId = await argumentProvider.getOption('connector');
|
|
15
|
-
const connectionIdFlag = await argumentProvider.getOption('connectionId', true);
|
|
16
|
-
const skipCodegen = !!(await argumentProvider.getOption('skipCodegen', true));
|
|
17
|
-
const useV1Codegen = !!(await argumentProvider.getOption('useV1Codegen', true));
|
|
18
|
-
// ── Preflight: connector + connector policy (throws on not-found or blocked) ──
|
|
19
|
-
const { connector, policy } = await runConnectorDlpPreflightAsync(argumentProvider, apiId);
|
|
20
|
-
await runAddActionFlowAsync({
|
|
21
|
-
argumentProvider,
|
|
22
|
-
connector,
|
|
23
|
-
apiId,
|
|
24
|
-
connectionIdFlag,
|
|
25
|
-
skipCodegen,
|
|
26
|
-
useV1Codegen,
|
|
27
|
-
policy,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function createOptionSchema(argumentProvider) {
|
|
31
|
-
argumentProvider.setDescription(HelpStrings.app.add.action.description);
|
|
32
|
-
argumentProvider.addExamples(HelpStrings.app.add.action.examples);
|
|
33
|
-
argumentProvider.addOptions([
|
|
34
|
-
createDefaultStringOption({
|
|
35
|
-
flags: { key: SharedArguments.Connector.name },
|
|
36
|
-
env: SharedArguments.Connector.envVar,
|
|
37
|
-
message: SharedArguments.Connector.promptMessage,
|
|
38
|
-
description: HelpStrings.app.add.action.options.connector,
|
|
39
|
-
}),
|
|
40
|
-
{
|
|
41
|
-
flags: { key: SharedArguments.ConnectionId.name, alias: SharedArguments.ConnectionId.alias },
|
|
42
|
-
env: SharedArguments.ConnectionId.envVar,
|
|
43
|
-
description: HelpStrings.app.add.action.options.connectionId,
|
|
44
|
-
optionalInNonInteractive: true,
|
|
45
|
-
},
|
|
46
|
-
]);
|
|
47
|
-
argumentProvider.addSwitch({
|
|
48
|
-
flags: { key: AddActionArguments.SkipCodegen.name },
|
|
49
|
-
env: AddActionArguments.SkipCodegen.env,
|
|
50
|
-
description: HelpStrings.app.add.action.options.skipCodegen,
|
|
51
|
-
});
|
|
52
|
-
argumentProvider.addSwitch({
|
|
53
|
-
flags: { key: AddActionArguments.UseV1Codegen.name },
|
|
54
|
-
env: AddActionArguments.UseV1Codegen.env,
|
|
55
|
-
description: 'Use V1 (legacy) code generation instead of V2.',
|
|
56
|
-
hidden: true,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=AddAction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddAction.js","sourceRoot":"","sources":["../../src/Verbs/AddAction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,gBAAkC;IACrE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrC,MAAM,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACjC,gBAAgB,EAAE,CAAC;IAEnB,yFAAyF;IACzF,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,SAAS,CAAS,WAAW,CAAC,CAAC;IACpE,MAAM,gBAAgB,GAAG,MAAM,gBAAgB,CAAC,SAAS,CAAS,cAAc,EAAE,IAAI,CAAC,CAAC;IACxF,MAAM,WAAW,GAAG,CAAC,CAAC,CAAC,MAAM,gBAAgB,CAAC,SAAS,CAAU,aAAa,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