@microsoft/managed-apps-cli 0.19.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.
Files changed (606) hide show
  1. package/LICENSE +17 -149
  2. package/THIRD-PARTY-NOTICES.txt +9549 -0
  3. package/dist/AddConnector-4AMM746J.js +41 -0
  4. package/dist/AuthStatus-ZZIP3LBD.js +11 -0
  5. package/dist/AuthSwitch-HK7JU2FR.js +13 -0
  6. package/dist/Bin.js +8 -3
  7. package/dist/BuildMaafApp-MOTZOLJZ.js +11 -0
  8. package/dist/Cli-6CCXMCPX.js +54 -0
  9. package/dist/CreateMaafApp-TUO72CW7.js +20 -0
  10. package/dist/DeleteMaafApp-MZVGIAX3.js +11 -0
  11. package/dist/DeployMaafApp-KXATM3E3.js +14 -0
  12. package/dist/Dev-SHIA5S7X.js +14 -0
  13. package/dist/EnvironmentVariableAuthenticationProvider-5YTMRAE4.js +11 -0
  14. package/dist/GetMaafApp-ELB5KMHW.js +11 -0
  15. package/dist/GetMaafBuildStatus-3W7LI5TJ.js +11 -0
  16. package/dist/GetSettings-NM6H2U5F.js +11 -0
  17. package/dist/Init-CH5DUQWA.js +11 -0
  18. package/dist/ListConnectorActions-7SIFGPYR.js +11 -0
  19. package/dist/ListConnectors-TRKIWRVQ.js +11 -0
  20. package/dist/ListMaafApps-RT3PGZSJ.js +11 -0
  21. package/dist/Login-HG5S7LBC.js +11 -0
  22. package/dist/Logout-BUPHLOAH.js +11 -0
  23. package/dist/MockFetch-4CYTSNJ7.js +13 -0
  24. package/dist/NoOpAuthenticationProvider-DX3XNXF5.js +11 -0
  25. package/dist/NodeMsalAuthenticationProvider-HTH3V3G2.js +17 -0
  26. package/dist/Pack-AHKC2MYF.js +8 -0
  27. package/dist/PlayMaafApp-LWKJU2IN.js +12 -0
  28. package/dist/RefreshDataSource-ZFZJXJ5L.js +11 -0
  29. package/dist/RefreshGitAuth-5A3SX2HC.js +11 -0
  30. package/dist/RemoveDataSource-57JJLK5I.js +14 -0
  31. package/dist/ServicePrincipalAuthenticationProvider-SVKDZG6X.js +11 -0
  32. package/dist/SetSetting-RB3F7IXG.js +11 -0
  33. package/dist/ShareLinkCreate-7BCDPWY6.js +11 -0
  34. package/dist/ShareLinkList-4BI3WMNN.js +11 -0
  35. package/dist/ShareLinkRevoke-EEJVCRCY.js +11 -0
  36. package/dist/ShareList-LJDAEGI3.js +11 -0
  37. package/dist/ShareMaafApp-QFRXLYUD.js +11 -0
  38. package/dist/ShowMaafApp-3KK6NUG2.js +11 -0
  39. package/dist/TelemetrySettings-A474HALH.js +11 -0
  40. package/dist/UnshareMaafApp-423RNXCN.js +11 -0
  41. package/dist/acorn-CYBWGE5M.js +23 -0
  42. package/dist/angular-Q62TJP23.js +11 -0
  43. package/dist/babel-AOXBHIIS.js +22 -0
  44. package/dist/chunk-3BRAT6NP.js +11 -0
  45. package/dist/chunk-3YRE4IQ3.js +132 -0
  46. package/dist/chunk-5AUOEXAR.js +50 -0
  47. package/dist/chunk-6FFQN2SO.js +13 -0
  48. package/dist/chunk-6MXOK2LG.js +11 -0
  49. package/dist/chunk-7NXJAIJX.js +11 -0
  50. package/dist/chunk-DREO7EYO.js +20 -0
  51. package/dist/chunk-EV3TTTOT.js +8 -0
  52. package/dist/chunk-G33Q5FWT.js +42325 -0
  53. package/dist/chunk-HBLO3WDD.js +13 -0
  54. package/dist/chunk-MFPX2RFH.js +11 -0
  55. package/dist/chunk-NP2KJOYC.js +12 -0
  56. package/dist/chunk-OL6CTXQR.js +11 -0
  57. package/dist/chunk-PVAIJSAI.js +11 -0
  58. package/dist/chunk-QAFCXGBD.js +11 -0
  59. package/dist/chunk-QSB5P4RM.js +38 -0
  60. package/dist/chunk-RBG2H562.js +11 -0
  61. package/dist/chunk-S5HEU7XK.js +11 -0
  62. package/dist/chunk-TYRVM4PP.js +8 -0
  63. package/dist/chunk-U36HMOQW.js +77 -0
  64. package/dist/chunk-UBTSW22U.js +11 -0
  65. package/dist/chunk-USRRI5H4.js +11 -0
  66. package/dist/chunk-UT667QSU.js +8 -0
  67. package/dist/chunk-VFSTQAZ2.js +12 -0
  68. package/dist/chunk-VNEZZ3RI.js +11 -0
  69. package/dist/chunk-W7EWOZPO.js +104 -0
  70. package/dist/chunk-Y5AMO72S.js +10 -0
  71. package/dist/chunk-YIKNM523.js +15 -0
  72. package/dist/chunk-YMXXWGRV.js +11 -0
  73. package/dist/estree-HPTPQIMZ.js +51 -0
  74. package/dist/flow-B6JUMONE.js +27 -0
  75. package/dist/glimmer-36KZ3DJ5.js +44 -0
  76. package/dist/graphql-E6CIFZFV.js +35 -0
  77. package/dist/html-BUTTPQE6.js +32 -0
  78. package/dist/markdown-K2C5OZHT.js +69 -0
  79. package/dist/meriyah-27UE2OSX.js +12 -0
  80. package/dist/postcss-QUHZLBB7.js +68 -0
  81. package/dist/typescript-G2G6TDZF.js +28 -0
  82. package/dist/yaml-W5P5CGFK.js +166 -0
  83. package/package.json +22 -17
  84. package/dist/ArgumentProvider.d.ts +0 -144
  85. package/dist/ArgumentProvider.d.ts.map +0 -1
  86. package/dist/ArgumentProvider.js +0 -493
  87. package/dist/ArgumentProvider.js.map +0 -1
  88. package/dist/Authentication/ActiveAccountStore.d.ts +0 -24
  89. package/dist/Authentication/ActiveAccountStore.d.ts.map +0 -1
  90. package/dist/Authentication/ActiveAccountStore.js +0 -54
  91. package/dist/Authentication/ActiveAccountStore.js.map +0 -1
  92. package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts +0 -26
  93. package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts.map +0 -1
  94. package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js +0 -31
  95. package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js.map +0 -1
  96. package/dist/Authentication/NoOpAuthenticationProvider.d.ts +0 -25
  97. package/dist/Authentication/NoOpAuthenticationProvider.d.ts.map +0 -1
  98. package/dist/Authentication/NoOpAuthenticationProvider.js +0 -31
  99. package/dist/Authentication/NoOpAuthenticationProvider.js.map +0 -1
  100. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +0 -103
  101. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +0 -1
  102. package/dist/Authentication/NodeMsalAuthenticationProvider.js +0 -391
  103. package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +0 -1
  104. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts +0 -23
  105. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts.map +0 -1
  106. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js +0 -60
  107. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js.map +0 -1
  108. package/dist/Bin.d.ts +0 -6
  109. package/dist/Bin.d.ts.map +0 -1
  110. package/dist/Bin.js.map +0 -1
  111. package/dist/Cli.d.ts +0 -2
  112. package/dist/Cli.d.ts.map +0 -1
  113. package/dist/Cli.js +0 -207
  114. package/dist/Cli.js.map +0 -1
  115. package/dist/CliSettings.d.ts +0 -17
  116. package/dist/CliSettings.d.ts.map +0 -1
  117. package/dist/CliSettings.js +0 -103
  118. package/dist/CliSettings.js.map +0 -1
  119. package/dist/CliUtils.d.ts +0 -100
  120. package/dist/CliUtils.d.ts.map +0 -1
  121. package/dist/CliUtils.js +0 -204
  122. package/dist/CliUtils.js.map +0 -1
  123. package/dist/Constants/CliConstants.d.ts +0 -6
  124. package/dist/Constants/CliConstants.d.ts.map +0 -1
  125. package/dist/Constants/CliConstants.js +0 -6
  126. package/dist/Constants/CliConstants.js.map +0 -1
  127. package/dist/Constants/CommandRegistry.d.ts +0 -22
  128. package/dist/Constants/CommandRegistry.d.ts.map +0 -1
  129. package/dist/Constants/CommandRegistry.js +0 -245
  130. package/dist/Constants/CommandRegistry.js.map +0 -1
  131. package/dist/Constants/HelpStrings.d.ts +0 -432
  132. package/dist/Constants/HelpStrings.d.ts.map +0 -1
  133. package/dist/Constants/HelpStrings.js +0 -623
  134. package/dist/Constants/HelpStrings.js.map +0 -1
  135. package/dist/Constants.d.ts +0 -18
  136. package/dist/Constants.d.ts.map +0 -1
  137. package/dist/Constants.js +0 -41
  138. package/dist/Constants.js.map +0 -1
  139. package/dist/Errors/CliError.d.ts +0 -5
  140. package/dist/Errors/CliError.d.ts.map +0 -1
  141. package/dist/Errors/CliError.js +0 -7
  142. package/dist/Errors/CliError.js.map +0 -1
  143. package/dist/Errors/GitHubErrorMap.d.ts +0 -68
  144. package/dist/Errors/GitHubErrorMap.d.ts.map +0 -1
  145. package/dist/Errors/GitHubErrorMap.js +0 -238
  146. package/dist/Errors/GitHubErrorMap.js.map +0 -1
  147. package/dist/FS/CliFs.d.ts +0 -41
  148. package/dist/FS/CliFs.d.ts.map +0 -1
  149. package/dist/FS/CliFs.js +0 -136
  150. package/dist/FS/CliFs.js.map +0 -1
  151. package/dist/HttpClient/CliHttpClient.d.ts +0 -43
  152. package/dist/HttpClient/CliHttpClient.d.ts.map +0 -1
  153. package/dist/HttpClient/CliHttpClient.js +0 -320
  154. package/dist/HttpClient/CliHttpClient.js.map +0 -1
  155. package/dist/HttpClient/HttpForward.d.ts +0 -9
  156. package/dist/HttpClient/HttpForward.d.ts.map +0 -1
  157. package/dist/HttpClient/HttpForward.js +0 -56
  158. package/dist/HttpClient/HttpForward.js.map +0 -1
  159. package/dist/Logger/BufferedTelemetryWriter.d.ts +0 -20
  160. package/dist/Logger/BufferedTelemetryWriter.d.ts.map +0 -1
  161. package/dist/Logger/BufferedTelemetryWriter.js +0 -163
  162. package/dist/Logger/BufferedTelemetryWriter.js.map +0 -1
  163. package/dist/Logger/CliLogger.d.ts +0 -59
  164. package/dist/Logger/CliLogger.d.ts.map +0 -1
  165. package/dist/Logger/CliLogger.js +0 -364
  166. package/dist/Logger/CliLogger.js.map +0 -1
  167. package/dist/Logger/ConsoleWriter.d.ts +0 -23
  168. package/dist/Logger/ConsoleWriter.d.ts.map +0 -1
  169. package/dist/Logger/ConsoleWriter.js +0 -66
  170. package/dist/Logger/ConsoleWriter.js.map +0 -1
  171. package/dist/Logger/Constants.d.ts +0 -6
  172. package/dist/Logger/Constants.d.ts.map +0 -1
  173. package/dist/Logger/Constants.js +0 -15
  174. package/dist/Logger/Constants.js.map +0 -1
  175. package/dist/Logger/LoggerSettings.d.ts +0 -18
  176. package/dist/Logger/LoggerSettings.d.ts.map +0 -1
  177. package/dist/Logger/LoggerSettings.js +0 -78
  178. package/dist/Logger/LoggerSettings.js.map +0 -1
  179. package/dist/Logger/OneDSWriter.d.ts +0 -26
  180. package/dist/Logger/OneDSWriter.d.ts.map +0 -1
  181. package/dist/Logger/OneDSWriter.js +0 -211
  182. package/dist/Logger/OneDSWriter.js.map +0 -1
  183. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts +0 -5
  184. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts.map +0 -1
  185. package/dist/Logger/Scrubber/ScrubCustomDimensions.js +0 -46
  186. package/dist/Logger/Scrubber/ScrubCustomDimensions.js.map +0 -1
  187. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts +0 -27
  188. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts.map +0 -1
  189. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js +0 -168
  190. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js.map +0 -1
  191. package/dist/Logger/Scrubber/ScrubUtils.d.ts +0 -8
  192. package/dist/Logger/Scrubber/ScrubUtils.d.ts.map +0 -1
  193. package/dist/Logger/Scrubber/ScrubUtils.js +0 -34
  194. package/dist/Logger/Scrubber/ScrubUtils.js.map +0 -1
  195. package/dist/Middletier/FunctionsBundler.d.ts +0 -17
  196. package/dist/Middletier/FunctionsBundler.d.ts.map +0 -1
  197. package/dist/Middletier/FunctionsBundler.js +0 -169
  198. package/dist/Middletier/FunctionsBundler.js.map +0 -1
  199. package/dist/Middletier/PackFunctions.d.ts +0 -53
  200. package/dist/Middletier/PackFunctions.d.ts.map +0 -1
  201. package/dist/Middletier/PackFunctions.js +0 -123
  202. package/dist/Middletier/PackFunctions.js.map +0 -1
  203. package/dist/Testing/MockFetch.d.ts +0 -23
  204. package/dist/Testing/MockFetch.d.ts.map +0 -1
  205. package/dist/Testing/MockFetch.js +0 -177
  206. package/dist/Testing/MockFetch.js.map +0 -1
  207. package/dist/Testing/MockRoutes.d.ts +0 -34
  208. package/dist/Testing/MockRoutes.d.ts.map +0 -1
  209. package/dist/Testing/MockRoutes.js +0 -226
  210. package/dist/Testing/MockRoutes.js.map +0 -1
  211. package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts +0 -6
  212. package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts.map +0 -1
  213. package/dist/Testing/fixtures/connectors/commondataserviceforapps.js +0 -25
  214. package/dist/Testing/fixtures/connectors/commondataserviceforapps.js.map +0 -1
  215. package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts +0 -6
  216. package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts.map +0 -1
  217. package/dist/Testing/fixtures/connectors/dataverseContactEntity.js +0 -55
  218. package/dist/Testing/fixtures/connectors/dataverseContactEntity.js.map +0 -1
  219. package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts +0 -6
  220. package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts.map +0 -1
  221. package/dist/Testing/fixtures/connectors/excelonlinebusiness.js +0 -1970
  222. package/dist/Testing/fixtures/connectors/excelonlinebusiness.js.map +0 -1
  223. package/dist/Testing/fixtures/connectors/kusto.d.ts +0 -6
  224. package/dist/Testing/fixtures/connectors/kusto.d.ts.map +0 -1
  225. package/dist/Testing/fixtures/connectors/kusto.js +0 -1333
  226. package/dist/Testing/fixtures/connectors/kusto.js.map +0 -1
  227. package/dist/Testing/fixtures/connectors/msnweather.d.ts +0 -6
  228. package/dist/Testing/fixtures/connectors/msnweather.d.ts.map +0 -1
  229. package/dist/Testing/fixtures/connectors/msnweather.js +0 -917
  230. package/dist/Testing/fixtures/connectors/msnweather.js.map +0 -1
  231. package/dist/Testing/fixtures/connectors/office365groups.d.ts +0 -6
  232. package/dist/Testing/fixtures/connectors/office365groups.d.ts.map +0 -1
  233. package/dist/Testing/fixtures/connectors/office365groups.js +0 -2144
  234. package/dist/Testing/fixtures/connectors/office365groups.js.map +0 -1
  235. package/dist/Testing/fixtures/connectors/office365users.d.ts +0 -6
  236. package/dist/Testing/fixtures/connectors/office365users.d.ts.map +0 -1
  237. package/dist/Testing/fixtures/connectors/office365users.js +0 -1969
  238. package/dist/Testing/fixtures/connectors/office365users.js.map +0 -1
  239. package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts +0 -6
  240. package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts.map +0 -1
  241. package/dist/Testing/fixtures/connectors/onedriveforbusiness.js +0 -4873
  242. package/dist/Testing/fixtures/connectors/onedriveforbusiness.js.map +0 -1
  243. package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts +0 -6
  244. package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts.map +0 -1
  245. package/dist/Testing/fixtures/connectors/powerappsforappmakers.js +0 -4682
  246. package/dist/Testing/fixtures/connectors/powerappsforappmakers.js.map +0 -1
  247. package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts +0 -6
  248. package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts.map +0 -1
  249. package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js +0 -1078
  250. package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js.map +0 -1
  251. package/dist/Testing/fixtures/connectors/sharepointonline.d.ts +0 -6
  252. package/dist/Testing/fixtures/connectors/sharepointonline.d.ts.map +0 -1
  253. package/dist/Testing/fixtures/connectors/sharepointonline.js +0 -28
  254. package/dist/Testing/fixtures/connectors/sharepointonline.js.map +0 -1
  255. package/dist/Testing/fixtures/connectors/teams.d.ts +0 -6
  256. package/dist/Testing/fixtures/connectors/teams.d.ts.map +0 -1
  257. package/dist/Testing/fixtures/connectors/teams.js +0 -9987
  258. package/dist/Testing/fixtures/connectors/teams.js.map +0 -1
  259. package/dist/Testing/fixtures/connectors/translatorv2.d.ts +0 -6
  260. package/dist/Testing/fixtures/connectors/translatorv2.d.ts.map +0 -1
  261. package/dist/Testing/fixtures/connectors/translatorv2.js +0 -307
  262. package/dist/Testing/fixtures/connectors/translatorv2.js.map +0 -1
  263. package/dist/Testing/fixtures/index.d.ts +0 -23
  264. package/dist/Testing/fixtures/index.d.ts.map +0 -1
  265. package/dist/Testing/fixtures/index.js +0 -96
  266. package/dist/Testing/fixtures/index.js.map +0 -1
  267. package/dist/Types/Argument.types.d.ts +0 -28
  268. package/dist/Types/Argument.types.d.ts.map +0 -1
  269. package/dist/Types/Argument.types.js +0 -5
  270. package/dist/Types/Argument.types.js.map +0 -1
  271. package/dist/Types/Cli.types.d.ts +0 -82
  272. package/dist/Types/Cli.types.d.ts.map +0 -1
  273. package/dist/Types/Cli.types.js +0 -5
  274. package/dist/Types/Cli.types.js.map +0 -1
  275. package/dist/Types/Command.types.d.ts +0 -69
  276. package/dist/Types/Command.types.d.ts.map +0 -1
  277. package/dist/Types/Command.types.js +0 -20
  278. package/dist/Types/Command.types.js.map +0 -1
  279. package/dist/Types/Datasource.types.d.ts +0 -30
  280. package/dist/Types/Datasource.types.d.ts.map +0 -1
  281. package/dist/Types/Datasource.types.js +0 -5
  282. package/dist/Types/Datasource.types.js.map +0 -1
  283. package/dist/Types/LoggerTypes.types.d.ts +0 -18
  284. package/dist/Types/LoggerTypes.types.d.ts.map +0 -1
  285. package/dist/Types/LoggerTypes.types.js +0 -5
  286. package/dist/Types/LoggerTypes.types.js.map +0 -1
  287. package/dist/Utils/BuildPolling.d.ts +0 -43
  288. package/dist/Utils/BuildPolling.d.ts.map +0 -1
  289. package/dist/Utils/BuildPolling.js +0 -139
  290. package/dist/Utils/BuildPolling.js.map +0 -1
  291. package/dist/Utils/BuildVerbDescriptionTable.d.ts +0 -29
  292. package/dist/Utils/BuildVerbDescriptionTable.d.ts.map +0 -1
  293. package/dist/Utils/BuildVerbDescriptionTable.js +0 -147
  294. package/dist/Utils/BuildVerbDescriptionTable.js.map +0 -1
  295. package/dist/Utils/CoerceCliVersion.d.ts +0 -27
  296. package/dist/Utils/CoerceCliVersion.d.ts.map +0 -1
  297. package/dist/Utils/CoerceCliVersion.js +0 -67
  298. package/dist/Utils/CoerceCliVersion.js.map +0 -1
  299. package/dist/Utils/ConnectorIds.d.ts +0 -12
  300. package/dist/Utils/ConnectorIds.d.ts.map +0 -1
  301. package/dist/Utils/ConnectorIds.js +0 -20
  302. package/dist/Utils/ConnectorIds.js.map +0 -1
  303. package/dist/Utils/ConsoleOutput.d.ts +0 -86
  304. package/dist/Utils/ConsoleOutput.d.ts.map +0 -1
  305. package/dist/Utils/ConsoleOutput.js +0 -162
  306. package/dist/Utils/ConsoleOutput.js.map +0 -1
  307. package/dist/Utils/DcfRecovery.d.ts +0 -84
  308. package/dist/Utils/DcfRecovery.d.ts.map +0 -1
  309. package/dist/Utils/DcfRecovery.js +0 -246
  310. package/dist/Utils/DcfRecovery.js.map +0 -1
  311. package/dist/Utils/DetectPackageManager.d.ts +0 -9
  312. package/dist/Utils/DetectPackageManager.d.ts.map +0 -1
  313. package/dist/Utils/DetectPackageManager.js +0 -24
  314. package/dist/Utils/DetectPackageManager.js.map +0 -1
  315. package/dist/Utils/DownloadTemplate.d.ts +0 -45
  316. package/dist/Utils/DownloadTemplate.d.ts.map +0 -1
  317. package/dist/Utils/DownloadTemplate.js +0 -161
  318. package/dist/Utils/DownloadTemplate.js.map +0 -1
  319. package/dist/Utils/EnhanceNetworkError.d.ts +0 -14
  320. package/dist/Utils/EnhanceNetworkError.d.ts.map +0 -1
  321. package/dist/Utils/EnhanceNetworkError.js +0 -61
  322. package/dist/Utils/EnhanceNetworkError.js.map +0 -1
  323. package/dist/Utils/EnvVars.d.ts +0 -17
  324. package/dist/Utils/EnvVars.d.ts.map +0 -1
  325. package/dist/Utils/EnvVars.js +0 -38
  326. package/dist/Utils/EnvVars.js.map +0 -1
  327. package/dist/Utils/EnvironmentRoutingUtils.d.ts +0 -81
  328. package/dist/Utils/EnvironmentRoutingUtils.d.ts.map +0 -1
  329. package/dist/Utils/EnvironmentRoutingUtils.js +0 -204
  330. package/dist/Utils/EnvironmentRoutingUtils.js.map +0 -1
  331. package/dist/Utils/FindAvailablePort.d.ts +0 -39
  332. package/dist/Utils/FindAvailablePort.d.ts.map +0 -1
  333. package/dist/Utils/FindAvailablePort.js +0 -105
  334. package/dist/Utils/FindAvailablePort.js.map +0 -1
  335. package/dist/Utils/GitCredentialConfig.d.ts +0 -12
  336. package/dist/Utils/GitCredentialConfig.d.ts.map +0 -1
  337. package/dist/Utils/GitCredentialConfig.js +0 -32
  338. package/dist/Utils/GitCredentialConfig.js.map +0 -1
  339. package/dist/Utils/GitErrorClassifier.d.ts +0 -40
  340. package/dist/Utils/GitErrorClassifier.d.ts.map +0 -1
  341. package/dist/Utils/GitErrorClassifier.js +0 -120
  342. package/dist/Utils/GitErrorClassifier.js.map +0 -1
  343. package/dist/Utils/GitHubDcfFlow.d.ts +0 -59
  344. package/dist/Utils/GitHubDcfFlow.d.ts.map +0 -1
  345. package/dist/Utils/GitHubDcfFlow.js +0 -165
  346. package/dist/Utils/GitHubDcfFlow.js.map +0 -1
  347. package/dist/Utils/GitRunner.d.ts +0 -107
  348. package/dist/Utils/GitRunner.d.ts.map +0 -1
  349. package/dist/Utils/GitRunner.js +0 -89
  350. package/dist/Utils/GitRunner.js.map +0 -1
  351. package/dist/Utils/GitUtils.d.ts +0 -43
  352. package/dist/Utils/GitUtils.d.ts.map +0 -1
  353. package/dist/Utils/GitUtils.js +0 -120
  354. package/dist/Utils/GitUtils.js.map +0 -1
  355. package/dist/Utils/GitVersionChecker.d.ts +0 -38
  356. package/dist/Utils/GitVersionChecker.d.ts.map +0 -1
  357. package/dist/Utils/GitVersionChecker.js +0 -64
  358. package/dist/Utils/GitVersionChecker.js.map +0 -1
  359. package/dist/Utils/HelpBanner.d.ts +0 -11
  360. package/dist/Utils/HelpBanner.d.ts.map +0 -1
  361. package/dist/Utils/HelpBanner.js +0 -15
  362. package/dist/Utils/HelpBanner.js.map +0 -1
  363. package/dist/Utils/MaafAppConfig.d.ts +0 -24
  364. package/dist/Utils/MaafAppConfig.d.ts.map +0 -1
  365. package/dist/Utils/MaafAppConfig.js +0 -38
  366. package/dist/Utils/MaafAppConfig.js.map +0 -1
  367. package/dist/Utils/NodeVersionChecker.d.ts +0 -10
  368. package/dist/Utils/NodeVersionChecker.d.ts.map +0 -1
  369. package/dist/Utils/NodeVersionChecker.js +0 -21
  370. package/dist/Utils/NodeVersionChecker.js.map +0 -1
  371. package/dist/Utils/Paging.d.ts +0 -29
  372. package/dist/Utils/Paging.d.ts.map +0 -1
  373. package/dist/Utils/Paging.js +0 -102
  374. package/dist/Utils/Paging.js.map +0 -1
  375. package/dist/Utils/PinCli.d.ts +0 -33
  376. package/dist/Utils/PinCli.d.ts.map +0 -1
  377. package/dist/Utils/PinCli.js +0 -77
  378. package/dist/Utils/PinCli.js.map +0 -1
  379. package/dist/Utils/ReadPackageJson.d.ts +0 -9
  380. package/dist/Utils/ReadPackageJson.d.ts.map +0 -1
  381. package/dist/Utils/ReadPackageJson.js +0 -13
  382. package/dist/Utils/ReadPackageJson.js.map +0 -1
  383. package/dist/Utils/RepoDetails.d.ts +0 -29
  384. package/dist/Utils/RepoDetails.d.ts.map +0 -1
  385. package/dist/Utils/RepoDetails.js +0 -37
  386. package/dist/Utils/RepoDetails.js.map +0 -1
  387. package/dist/Utils/RepoOption.d.ts +0 -42
  388. package/dist/Utils/RepoOption.d.ts.map +0 -1
  389. package/dist/Utils/RepoOption.js +0 -63
  390. package/dist/Utils/RepoOption.js.map +0 -1
  391. package/dist/Utils/RepoUrl.d.ts +0 -18
  392. package/dist/Utils/RepoUrl.d.ts.map +0 -1
  393. package/dist/Utils/RepoUrl.js +0 -6
  394. package/dist/Utils/RepoUrl.js.map +0 -1
  395. package/dist/Utils/ResolveCommand.d.ts +0 -62
  396. package/dist/Utils/ResolveCommand.d.ts.map +0 -1
  397. package/dist/Utils/ResolveCommand.js +0 -141
  398. package/dist/Utils/ResolveCommand.js.map +0 -1
  399. package/dist/Utils/RunCommand.d.ts +0 -33
  400. package/dist/Utils/RunCommand.d.ts.map +0 -1
  401. package/dist/Utils/RunCommand.js +0 -83
  402. package/dist/Utils/RunCommand.js.map +0 -1
  403. package/dist/Utils/ShareAccessRouting.d.ts +0 -78
  404. package/dist/Utils/ShareAccessRouting.d.ts.map +0 -1
  405. package/dist/Utils/ShareAccessRouting.js +0 -93
  406. package/dist/Utils/ShareAccessRouting.js.map +0 -1
  407. package/dist/Utils/Spinner.d.ts +0 -23
  408. package/dist/Utils/Spinner.d.ts.map +0 -1
  409. package/dist/Utils/Spinner.js +0 -94
  410. package/dist/Utils/Spinner.js.map +0 -1
  411. package/dist/Utils/zipBuildArtifact.d.ts +0 -35
  412. package/dist/Utils/zipBuildArtifact.d.ts.map +0 -1
  413. package/dist/Utils/zipBuildArtifact.js +0 -100
  414. package/dist/Utils/zipBuildArtifact.js.map +0 -1
  415. package/dist/Verbs/AddAction.d.ts +0 -6
  416. package/dist/Verbs/AddAction.d.ts.map +0 -1
  417. package/dist/Verbs/AddAction.js +0 -58
  418. package/dist/Verbs/AddAction.js.map +0 -1
  419. package/dist/Verbs/AddConnector.d.ts +0 -26
  420. package/dist/Verbs/AddConnector.d.ts.map +0 -1
  421. package/dist/Verbs/AddConnector.js +0 -222
  422. package/dist/Verbs/AddConnector.js.map +0 -1
  423. package/dist/Verbs/AddConnectorFlows.d.ts +0 -97
  424. package/dist/Verbs/AddConnectorFlows.d.ts.map +0 -1
  425. package/dist/Verbs/AddConnectorFlows.js +0 -298
  426. package/dist/Verbs/AddConnectorFlows.js.map +0 -1
  427. package/dist/Verbs/AddDataSource.d.ts +0 -18
  428. package/dist/Verbs/AddDataSource.d.ts.map +0 -1
  429. package/dist/Verbs/AddDataSource.js +0 -162
  430. package/dist/Verbs/AddDataSource.js.map +0 -1
  431. package/dist/Verbs/AddFlow.d.ts +0 -12
  432. package/dist/Verbs/AddFlow.d.ts.map +0 -1
  433. package/dist/Verbs/AddFlow.js +0 -62
  434. package/dist/Verbs/AddFlow.js.map +0 -1
  435. package/dist/Verbs/AddTable.d.ts +0 -6
  436. package/dist/Verbs/AddTable.d.ts.map +0 -1
  437. package/dist/Verbs/AddTable.js +0 -78
  438. package/dist/Verbs/AddTable.js.map +0 -1
  439. package/dist/Verbs/AuthStatus.d.ts +0 -6
  440. package/dist/Verbs/AuthStatus.d.ts.map +0 -1
  441. package/dist/Verbs/AuthStatus.js +0 -49
  442. package/dist/Verbs/AuthStatus.js.map +0 -1
  443. package/dist/Verbs/AuthSwitch.d.ts +0 -6
  444. package/dist/Verbs/AuthSwitch.d.ts.map +0 -1
  445. package/dist/Verbs/AuthSwitch.js +0 -67
  446. package/dist/Verbs/AuthSwitch.js.map +0 -1
  447. package/dist/Verbs/BuildMaafApp.d.ts +0 -6
  448. package/dist/Verbs/BuildMaafApp.d.ts.map +0 -1
  449. package/dist/Verbs/BuildMaafApp.js +0 -172
  450. package/dist/Verbs/BuildMaafApp.js.map +0 -1
  451. package/dist/Verbs/ConnectorHelpers.d.ts +0 -164
  452. package/dist/Verbs/ConnectorHelpers.d.ts.map +0 -1
  453. package/dist/Verbs/ConnectorHelpers.js +0 -563
  454. package/dist/Verbs/ConnectorHelpers.js.map +0 -1
  455. package/dist/Verbs/CreateMaafApp.d.ts +0 -107
  456. package/dist/Verbs/CreateMaafApp.d.ts.map +0 -1
  457. package/dist/Verbs/CreateMaafApp.js +0 -1081
  458. package/dist/Verbs/CreateMaafApp.js.map +0 -1
  459. package/dist/Verbs/DeleteMaafApp.d.ts +0 -27
  460. package/dist/Verbs/DeleteMaafApp.d.ts.map +0 -1
  461. package/dist/Verbs/DeleteMaafApp.js +0 -114
  462. package/dist/Verbs/DeleteMaafApp.js.map +0 -1
  463. package/dist/Verbs/DeployMaafApp.d.ts +0 -6
  464. package/dist/Verbs/DeployMaafApp.d.ts.map +0 -1
  465. package/dist/Verbs/DeployMaafApp.js +0 -495
  466. package/dist/Verbs/DeployMaafApp.js.map +0 -1
  467. package/dist/Verbs/Dev.d.ts +0 -6
  468. package/dist/Verbs/Dev.d.ts.map +0 -1
  469. package/dist/Verbs/Dev.js +0 -276
  470. package/dist/Verbs/Dev.js.map +0 -1
  471. package/dist/Verbs/FindDataverseApi.d.ts +0 -12
  472. package/dist/Verbs/FindDataverseApi.d.ts.map +0 -1
  473. package/dist/Verbs/FindDataverseApi.js +0 -87
  474. package/dist/Verbs/FindDataverseApi.js.map +0 -1
  475. package/dist/Verbs/GetMaafApp.d.ts +0 -6
  476. package/dist/Verbs/GetMaafApp.d.ts.map +0 -1
  477. package/dist/Verbs/GetMaafApp.js +0 -80
  478. package/dist/Verbs/GetMaafApp.js.map +0 -1
  479. package/dist/Verbs/GetMaafBuildStatus.d.ts +0 -6
  480. package/dist/Verbs/GetMaafBuildStatus.d.ts.map +0 -1
  481. package/dist/Verbs/GetMaafBuildStatus.js +0 -132
  482. package/dist/Verbs/GetMaafBuildStatus.js.map +0 -1
  483. package/dist/Verbs/GetSettings.d.ts +0 -12
  484. package/dist/Verbs/GetSettings.d.ts.map +0 -1
  485. package/dist/Verbs/GetSettings.js +0 -39
  486. package/dist/Verbs/GetSettings.js.map +0 -1
  487. package/dist/Verbs/Init.d.ts +0 -6
  488. package/dist/Verbs/Init.d.ts.map +0 -1
  489. package/dist/Verbs/Init.js +0 -426
  490. package/dist/Verbs/Init.js.map +0 -1
  491. package/dist/Verbs/ListConnectionReferences.d.ts +0 -6
  492. package/dist/Verbs/ListConnectionReferences.d.ts.map +0 -1
  493. package/dist/Verbs/ListConnectionReferences.js +0 -56
  494. package/dist/Verbs/ListConnectionReferences.js.map +0 -1
  495. package/dist/Verbs/ListConnectorActions.d.ts +0 -6
  496. package/dist/Verbs/ListConnectorActions.d.ts.map +0 -1
  497. package/dist/Verbs/ListConnectorActions.js +0 -87
  498. package/dist/Verbs/ListConnectorActions.js.map +0 -1
  499. package/dist/Verbs/ListConnectors.d.ts +0 -6
  500. package/dist/Verbs/ListConnectors.d.ts.map +0 -1
  501. package/dist/Verbs/ListConnectors.js +0 -91
  502. package/dist/Verbs/ListConnectors.js.map +0 -1
  503. package/dist/Verbs/ListDatasets.d.ts +0 -6
  504. package/dist/Verbs/ListDatasets.d.ts.map +0 -1
  505. package/dist/Verbs/ListDatasets.js +0 -73
  506. package/dist/Verbs/ListDatasets.js.map +0 -1
  507. package/dist/Verbs/ListEnvironmentVariables.d.ts +0 -14
  508. package/dist/Verbs/ListEnvironmentVariables.d.ts.map +0 -1
  509. package/dist/Verbs/ListEnvironmentVariables.js +0 -52
  510. package/dist/Verbs/ListEnvironmentVariables.js.map +0 -1
  511. package/dist/Verbs/ListFlows.d.ts +0 -13
  512. package/dist/Verbs/ListFlows.d.ts.map +0 -1
  513. package/dist/Verbs/ListFlows.js +0 -73
  514. package/dist/Verbs/ListFlows.js.map +0 -1
  515. package/dist/Verbs/ListMaafApps.d.ts +0 -84
  516. package/dist/Verbs/ListMaafApps.d.ts.map +0 -1
  517. package/dist/Verbs/ListMaafApps.js +0 -221
  518. package/dist/Verbs/ListMaafApps.js.map +0 -1
  519. package/dist/Verbs/ListSqlStoredProcedures.d.ts +0 -6
  520. package/dist/Verbs/ListSqlStoredProcedures.d.ts.map +0 -1
  521. package/dist/Verbs/ListSqlStoredProcedures.js +0 -75
  522. package/dist/Verbs/ListSqlStoredProcedures.js.map +0 -1
  523. package/dist/Verbs/ListTables.d.ts +0 -6
  524. package/dist/Verbs/ListTables.d.ts.map +0 -1
  525. package/dist/Verbs/ListTables.js +0 -85
  526. package/dist/Verbs/ListTables.js.map +0 -1
  527. package/dist/Verbs/Login.d.ts +0 -6
  528. package/dist/Verbs/Login.d.ts.map +0 -1
  529. package/dist/Verbs/Login.js +0 -39
  530. package/dist/Verbs/Login.js.map +0 -1
  531. package/dist/Verbs/Logout.d.ts +0 -6
  532. package/dist/Verbs/Logout.d.ts.map +0 -1
  533. package/dist/Verbs/Logout.js +0 -34
  534. package/dist/Verbs/Logout.js.map +0 -1
  535. package/dist/Verbs/MaafAppPermissions.d.ts +0 -40
  536. package/dist/Verbs/MaafAppPermissions.d.ts.map +0 -1
  537. package/dist/Verbs/MaafAppPermissions.js +0 -651
  538. package/dist/Verbs/MaafAppPermissions.js.map +0 -1
  539. package/dist/Verbs/Pack.d.ts +0 -71
  540. package/dist/Verbs/Pack.d.ts.map +0 -1
  541. package/dist/Verbs/Pack.js +0 -370
  542. package/dist/Verbs/Pack.js.map +0 -1
  543. package/dist/Verbs/PlayMaafApp.d.ts +0 -22
  544. package/dist/Verbs/PlayMaafApp.d.ts.map +0 -1
  545. package/dist/Verbs/PlayMaafApp.js +0 -147
  546. package/dist/Verbs/PlayMaafApp.js.map +0 -1
  547. package/dist/Verbs/RefreshDataSource.d.ts +0 -21
  548. package/dist/Verbs/RefreshDataSource.d.ts.map +0 -1
  549. package/dist/Verbs/RefreshDataSource.js +0 -87
  550. package/dist/Verbs/RefreshDataSource.js.map +0 -1
  551. package/dist/Verbs/RefreshGitAuth.d.ts +0 -6
  552. package/dist/Verbs/RefreshGitAuth.d.ts.map +0 -1
  553. package/dist/Verbs/RefreshGitAuth.js +0 -155
  554. package/dist/Verbs/RefreshGitAuth.js.map +0 -1
  555. package/dist/Verbs/RemoveDataSource.d.ts +0 -6
  556. package/dist/Verbs/RemoveDataSource.d.ts.map +0 -1
  557. package/dist/Verbs/RemoveDataSource.js +0 -172
  558. package/dist/Verbs/RemoveDataSource.js.map +0 -1
  559. package/dist/Verbs/RemoveFlow.d.ts +0 -12
  560. package/dist/Verbs/RemoveFlow.d.ts.map +0 -1
  561. package/dist/Verbs/RemoveFlow.js +0 -94
  562. package/dist/Verbs/RemoveFlow.js.map +0 -1
  563. package/dist/Verbs/SetSetting.d.ts +0 -12
  564. package/dist/Verbs/SetSetting.d.ts.map +0 -1
  565. package/dist/Verbs/SetSetting.js +0 -131
  566. package/dist/Verbs/SetSetting.js.map +0 -1
  567. package/dist/Verbs/ShareLinkCreate.d.ts +0 -23
  568. package/dist/Verbs/ShareLinkCreate.d.ts.map +0 -1
  569. package/dist/Verbs/ShareLinkCreate.js +0 -73
  570. package/dist/Verbs/ShareLinkCreate.js.map +0 -1
  571. package/dist/Verbs/ShareLinkList.d.ts +0 -16
  572. package/dist/Verbs/ShareLinkList.d.ts.map +0 -1
  573. package/dist/Verbs/ShareLinkList.js +0 -84
  574. package/dist/Verbs/ShareLinkList.js.map +0 -1
  575. package/dist/Verbs/ShareLinkRevoke.d.ts +0 -22
  576. package/dist/Verbs/ShareLinkRevoke.d.ts.map +0 -1
  577. package/dist/Verbs/ShareLinkRevoke.js +0 -137
  578. package/dist/Verbs/ShareLinkRevoke.js.map +0 -1
  579. package/dist/Verbs/ShareList.d.ts +0 -10
  580. package/dist/Verbs/ShareList.d.ts.map +0 -1
  581. package/dist/Verbs/ShareList.js +0 -254
  582. package/dist/Verbs/ShareList.js.map +0 -1
  583. package/dist/Verbs/ShareMaafApp.d.ts +0 -12
  584. package/dist/Verbs/ShareMaafApp.d.ts.map +0 -1
  585. package/dist/Verbs/ShareMaafApp.js +0 -14
  586. package/dist/Verbs/ShareMaafApp.js.map +0 -1
  587. package/dist/Verbs/ShowMaafApp.d.ts +0 -100
  588. package/dist/Verbs/ShowMaafApp.d.ts.map +0 -1
  589. package/dist/Verbs/ShowMaafApp.js +0 -224
  590. package/dist/Verbs/ShowMaafApp.js.map +0 -1
  591. package/dist/Verbs/TelemetrySettings.d.ts +0 -8
  592. package/dist/Verbs/TelemetrySettings.d.ts.map +0 -1
  593. package/dist/Verbs/TelemetrySettings.js +0 -104
  594. package/dist/Verbs/TelemetrySettings.js.map +0 -1
  595. package/dist/Verbs/UnshareMaafApp.d.ts +0 -12
  596. package/dist/Verbs/UnshareMaafApp.d.ts.map +0 -1
  597. package/dist/Verbs/UnshareMaafApp.js +0 -14
  598. package/dist/Verbs/UnshareMaafApp.js.map +0 -1
  599. package/dist/Verbs/VerbConstants.d.ts +0 -628
  600. package/dist/Verbs/VerbConstants.d.ts.map +0 -1
  601. package/dist/Verbs/VerbConstants.js +0 -557
  602. package/dist/Verbs/VerbConstants.js.map +0 -1
  603. package/dist/Verbs/index.d.ts +0 -47
  604. package/dist/Verbs/index.d.ts.map +0 -1
  605. package/dist/Verbs/index.js +0 -47
  606. package/dist/Verbs/index.js.map +0 -1
@@ -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,CAA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E,CAAC;YAC5D,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;gBACtC,OAAO;YACT,CAAC;YACD,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;YACnD,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAChE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,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,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAehD,MAAM,CAAC,MAAM,yBAAyB,GACpC,sDAAsD;IACtD,kFAAkF;IAClF,mFAAmF;IACnF,sDAAsD,CAAC;AAEzD,MAAM,CAAC,MAAM,yBAAyB,GACpC,qDAAqD;IACrD,kEAAkE,CAAC;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,sCAAsC,CAAC;AAExE;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAgC;IACxE,OAAO,CAAC,CAAC,YAAY,IAAI,YAAY,KAAK,iBAAiB,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAuB;IACtD,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnD,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,UAAU,CAClB,2BAA2B,GAAG,+DAA+D,CAC9F,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,SAG/B;IACC,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC,QAAQ,CAAC;IAC5B,CAAC;IACD,IAAI,yBAAyB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,UAAU,CAClB,GAAG,iBAAiB,iEAAiE;YACnF,2DAA2D;YAC3D,WAAW,eAAe,+CAA+C,CAC5E,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAI7C;IACC,OAAO,SAAS,CAAC;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,aAAa,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"}
@@ -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"}
@@ -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,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,oEAAoE;QACpE,sEAAsE;QACtE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,MAAM,QAAQ,CAAC,CAAC;IAC/E,CAAC;IAED,qEAAqE;IAC7D,cAAc,GAAG,GAAS,EAAE;QAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,qBAAqB;QACvD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc;IACnD,CAAC,CAAC;IAEM,aAAa,GAAG,GAAS,EAAE;QACjC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,kEAAkE;QAClE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,C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,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,KAAK,QAAQ;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAY;IACpD,MAAM,IAAI,GAAI,GAAgC,EAAE,IAAI,IAAI,WAAW,CAAC;IACpE,OAAO,6CAA6C,IAAI,EAAE,CAAC;AAC7D,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,SAAiB,EACjB,aAAqB,EACrB,OAA+B;IAE/B,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,CAAC,SAAS,EAAE,CAA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D,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;YAC5B,IAAI,OAAO;gBAAE,OAAO;YACpB,MAAM,QAAQ,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;YAC7C,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;gBAC5B,gFAAgF;gBAChF,kEAAkE;gBAClE,YAAY,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC7C,OAAO;YACT,CAAC;YACD,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC1B,IAAI,CAAC,OAAO;gBAAE,MAAM,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,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,CAsBtF"}
@@ -1,58 +0,0 @@
1
- /*!
2
- * Copyright (C) Microsoft Corporation. All rights reserved.
3
- */
4
- import { createDefaultStringOption } 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
- // Commander converts kebab-case flags to camelCase attribute names — use camelCase here.
13
- const apiId = await argumentProvider.getOption('connector');
14
- const connectionIdFlag = await argumentProvider.getOption('connectionId', true);
15
- const skipCodegen = !!(await argumentProvider.getOption('skipCodegen', true));
16
- const useV1Codegen = !!(await argumentProvider.getOption('useV1Codegen', true));
17
- // ── Preflight: connector + connector policy (throws on not-found or blocked) ──
18
- const { connector, policy } = await runConnectorDlpPreflightAsync(argumentProvider, apiId);
19
- await runAddActionFlowAsync({
20
- argumentProvider,
21
- connector,
22
- apiId,
23
- connectionIdFlag,
24
- skipCodegen,
25
- useV1Codegen,
26
- policy,
27
- });
28
- }
29
- function createOptionSchema(argumentProvider) {
30
- argumentProvider.setDescription(HelpStrings.app.add.action.description);
31
- argumentProvider.addExamples(HelpStrings.app.add.action.examples);
32
- argumentProvider.addOptions([
33
- createDefaultStringOption({
34
- flags: { key: SharedArguments.Connector.name },
35
- env: SharedArguments.Connector.envVar,
36
- message: SharedArguments.Connector.promptMessage,
37
- description: HelpStrings.app.add.action.options.connector,
38
- }),
39
- {
40
- flags: { key: SharedArguments.ConnectionId.name, alias: SharedArguments.ConnectionId.alias },
41
- env: SharedArguments.ConnectionId.envVar,
42
- description: HelpStrings.app.add.action.options.connectionId,
43
- optionalInNonInteractive: true,
44
- },
45
- ]);
46
- argumentProvider.addSwitch({
47
- flags: { key: AddActionArguments.SkipCodegen.name },
48
- env: AddActionArguments.SkipCodegen.env,
49
- description: HelpStrings.app.add.action.options.skipCodegen,
50
- });
51
- argumentProvider.addSwitch({
52
- flags: { key: AddActionArguments.UseV1Codegen.name },
53
- env: AddActionArguments.UseV1Codegen.env,
54
- description: 'Use V1 (legacy) code generation instead of V2.',
55
- hidden: true,
56
- });
57
- }
58
- //# 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,MAAM,aAAa,CAAC;AACxD,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;IAEjC,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,EAAE,IAAI,CAAC,CAAC,CAAC;IACvF,MAAM,YAAY,GAAG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