@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.
Files changed (606) hide show
  1. package/README.md +1 -1
  2. package/THIRD-PARTY-NOTICES.txt +9549 -0
  3. package/dist/AddConnector-5DUBFLEK.js +41 -0
  4. package/dist/AuthStatus-6DMK7O6W.js +11 -0
  5. package/dist/AuthSwitch-NUQIIRCG.js +13 -0
  6. package/dist/Bin.js +8 -3
  7. package/dist/BuildMaafApp-A4IUU6LI.js +11 -0
  8. package/dist/Cli-LYSWG64H.js +54 -0
  9. package/dist/CloneMaafApp-B672N7T5.js +11 -0
  10. package/dist/CreateMaafApp-RWL7FXSP.js +20 -0
  11. package/dist/DeleteMaafApp-GT4CEFAE.js +11 -0
  12. package/dist/DeployMaafApp-E4TQU6RO.js +14 -0
  13. package/dist/Dev-ICCA5DEJ.js +14 -0
  14. package/dist/EnvironmentVariableAuthenticationProvider-LYCQ5D47.js +11 -0
  15. package/dist/GetMaafBuildStatus-UGAHVANE.js +11 -0
  16. package/dist/GetSettings-ZI2IBKV5.js +11 -0
  17. package/dist/InfoMaafApp-FL5PICDD.js +13 -0
  18. package/dist/Init-XCSK3WQM.js +11 -0
  19. package/dist/ListConnectorActions-B2YD24RX.js +11 -0
  20. package/dist/ListConnectors-MYUEVJPT.js +11 -0
  21. package/dist/ListMaafApps-3W6W6UYP.js +11 -0
  22. package/dist/Login-7RW6OEST.js +11 -0
  23. package/dist/Logout-IXK2TMRL.js +11 -0
  24. package/dist/MockFetch-THQJ4KFB.js +13 -0
  25. package/dist/NoOpAuthenticationProvider-DX3XNXF5.js +11 -0
  26. package/dist/NodeMsalAuthenticationProvider-VVQ6CCZ5.js +17 -0
  27. package/dist/Pack-IWU3PFQL.js +8 -0
  28. package/dist/PlayMaafApp-5H3DCJ2C.js +12 -0
  29. package/dist/RefreshDataSource-XQT7LVMO.js +11 -0
  30. package/dist/RefreshGitAuth-IQBAFR37.js +11 -0
  31. package/dist/RemoveDataSource-PGPLMJUX.js +14 -0
  32. package/dist/ServicePrincipalAuthenticationProvider-IZZRJFZQ.js +11 -0
  33. package/dist/SetSetting-SEWDA4TF.js +11 -0
  34. package/dist/ShareLinkCreate-T5FN47J2.js +11 -0
  35. package/dist/ShareLinkList-6JCVEYNC.js +11 -0
  36. package/dist/ShareLinkRevoke-OH5DZDHR.js +11 -0
  37. package/dist/ShareList-QCEL7QNJ.js +11 -0
  38. package/dist/ShareMaafApp-6MKZ33HW.js +11 -0
  39. package/dist/TelemetrySettings-RXPPIEVO.js +11 -0
  40. package/dist/UnshareMaafApp-OSE2TOBJ.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-23T63QIT.js +15 -0
  45. package/dist/chunk-3JIZGVCA.js +11 -0
  46. package/dist/chunk-3YRE4IQ3.js +132 -0
  47. package/dist/chunk-47LJLFDF.js +11 -0
  48. package/dist/chunk-4LIR3ZYP.js +42325 -0
  49. package/dist/chunk-4VBFOKV6.js +11 -0
  50. package/dist/chunk-6LKH5WE7.js +104 -0
  51. package/dist/chunk-6RSE3J4X.js +8 -0
  52. package/dist/chunk-7BRIEYGR.js +20 -0
  53. package/dist/chunk-7GGFN2IW.js +11 -0
  54. package/dist/chunk-AQLFVAFU.js +38 -0
  55. package/dist/chunk-EQCYKUEU.js +12 -0
  56. package/dist/chunk-EX6IKPAO.js +11 -0
  57. package/dist/chunk-HBLO3WDD.js +13 -0
  58. package/dist/chunk-IQGMFWXB.js +12 -0
  59. package/dist/chunk-KYL2Y5G4.js +11 -0
  60. package/dist/chunk-LQ65CHNN.js +13 -0
  61. package/dist/chunk-OL6CTXQR.js +11 -0
  62. package/dist/chunk-PPW4XUZO.js +77 -0
  63. package/dist/chunk-PVAIJSAI.js +11 -0
  64. package/dist/chunk-RBG2H562.js +11 -0
  65. package/dist/chunk-SNWTSI75.js +50 -0
  66. package/dist/chunk-TYRVM4PP.js +8 -0
  67. package/dist/chunk-UNJJUCSA.js +11 -0
  68. package/dist/chunk-USRRI5H4.js +11 -0
  69. package/dist/chunk-UT667QSU.js +8 -0
  70. package/dist/chunk-VMSJG53Y.js +11 -0
  71. package/dist/chunk-Y5AMO72S.js +10 -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 +21 -16
  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 -108
  120. package/dist/CliUtils.d.ts.map +0 -1
  121. package/dist/CliUtils.js +0 -217
  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 -59
  352. package/dist/Utils/GitUtils.d.ts.map +0 -1
  353. package/dist/Utils/GitUtils.js +0 -198
  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 -59
  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 -223
  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 -163
  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 -63
  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 -79
  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 -171
  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 -100
  456. package/dist/Verbs/CreateMaafApp.d.ts.map +0 -1
  457. package/dist/Verbs/CreateMaafApp.js +0 -1022
  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 -453
  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 -94
  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 -97
  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 -89
  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 -173
  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 -95
  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 -133
  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 -629
  600. package/dist/Verbs/VerbConstants.d.ts.map +0 -1
  601. package/dist/Verbs/VerbConstants.js +0 -559
  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
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ var t={name:"@microsoft/managed-apps-cli",version:"0.22.0",type:"module",description:"Command-line interface for building and managing Microsoft Managed Apps",license:"MIT",bin:{ms:"./dist/Bin.js"},files:["dist","!dist/*.map","LICENSE","README.md","THIRD-PARTY-NOTICES.txt"],scripts:{build:"bun scripts/build.ts","generate:cgmanifest":"bun scripts/generate-cgmanifest.ts","benchmark:startup":"bun scripts/benchmark-startup.ts",dev:"tsc -p tsconfig.json --watch","check-types":"tsc --noEmit",lint:"eslint src/",test:"bun test --isolate src/","test:e2e":"bun test src/__tests__/e2e/",clean:"bun ../../scripts/clean.ts dist .turbo tsconfig.tsbuildinfo THIRD-PARTY-NOTICES.txt"},dependencies:{"@azure/msal-node-extensions":"5.2.2",esbuild:"catalog:build",open:"11.0.0"},engines:{node:">=24.11.0",git:">=2.27.0"},devDependencies:{"@microsoft/managed-apps-actions":"workspace:*","@microsoft/managed-apps-codegen":"workspace:*","@microsoft/managed-apps-common":"workspace:*","@azure/msal-node":"5.2.2","@clack/prompts":"1.4.0","@microsoft/1ds-core-js":"4.3.11","@microsoft/1ds-post-js":"4.3.11","@repo/repo-config":"workspace:*","@rnx-kit/third-party-notices":"3.0.0","@types/archiver":"6.0.3","@types/bun":"1.3.13","@types/node":"catalog:","@types/semver":"7.7.1",archiver:"7.0.1",commander:"10.0.1",json5:"2.2.3",memfs:"^4.57.2",semver:"7.7.4","tsc-esm-fix":"catalog:build",typescript:"5.9.3"}};export{t as a};
8
+ //# sourceMappingURL=chunk-6RSE3J4X.js.map
@@ -0,0 +1,20 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as E,d as b,e as S}from"./chunk-RBG2H562.js";import{m as x}from"./chunk-UNJJUCSA.js";import{h as y}from"./chunk-PVAIJSAI.js";function G(t){try{return new URL(t).host}catch{return t}}function U(t,e,r){e||y(`Authenticating to ${G(t)} for ${r}. A browser window may open. Sign in with the account associated with this tenant.`)}import{execFileSync as N}from"child_process";var I=[{patterns:[/403 forbidden/i,/returned error: 403/i,/access denied/i],bucket:"auth-403",build:t=>`Git reached the remote but access was denied while ${t} (HTTP 403). This usually means one of:
8
+ - the signed-in account is in the wrong tenant, or lacks permission to this app's repo; or
9
+ - Git Credential Manager returned a cached credential for a different account than your current 'ms auth' sign-in (a stale or mismatched credential).
10
+ Confirm 'ms auth status' shows the account and tenant for this environment. If it doesn't match, clear the cached git credential for the host ('git credential-manager erase', or remove it from your OS credential store) so Git re-prompts, then re-run.`},{patterns:[/terminal prompts disabled/i,/could not read username/i,/could not read password/i],bucket:"auth-prompt-unavailable",build:t=>`Git could not obtain a credential while ${t}: there is no cached credential and the session can't prompt for one. Make sure Git Credential Manager is installed, then re-run in an interactive terminal so the browser sign-in can complete.`},{patterns:[/authentication failed/i,/invalid username or password/i],bucket:"auth-invalid-credential",build:t=>`Git authentication failed while ${t}: the credential was missing, invalid, or expired. When the browser opens, sign in with the account for this environment's tenant; if a stale credential is cached, clear it in Git Credential Manager and re-run.`}],O=[/could not resolve host/i,/could not resolve proxy/i,/failed to connect/i,/connection timed out/i,/connection refused/i,/network is unreachable/i,/temporary failure in name resolution/i];function D(t){return t.replace(/(\b[a-z][a-z0-9+.-]*:\/\/)[^/\s@]+@/gi,"$1[REDACTED]@")}function C(t,e){let r=D(t.trimEnd());if(!r)return null;for(let i of I)if(i.patterns.some(o=>o.test(r)))return new E(`${i.build(e.action)}
11
+
12
+ Git output:
13
+ ${r}`,{classifierBucket:i.bucket,action:e.action});return O.some(i=>i.test(r))?new S(`Git could not reach the remote while ${e.action}. Check your network connection (and proxy settings, if any) and try again.
14
+
15
+ Git output:
16
+ ${r}`,{classifierBucket:"network",action:e.action}):null}function g(t){return t==null?"":Buffer.isBuffer(t)?t.toString():t}var T=64*1024*1024;function f(t,e={}){let{cwd:r,allowFailure:i=!1,captureStdout:o=!1,emitStderr:l=!0,classify:c,network:n=!1}=e,a=n&&!c&&!i;try{let s=N("git",t,{cwd:r,stdio:["ignore",o?"pipe":"ignore",a?"inherit":"pipe"],maxBuffer:T});return{success:!0,status:0,stdout:o?g(s):"",stderr:""}}catch(s){let u=s,d=g(u.stderr);if(c&&!i){let L=d||g(u.stdout)||(s instanceof Error?s.message:String(s)),R=C(L,c);if(R)throw R}if(l&&d&&process.stderr.write(d),!i)throw s;return{success:!1,status:typeof u.status=="number"?u.status:null,stdout:g(u.stdout),stderr:d,error:s instanceof Error?s:new Error(String(s))}}}import{execFileSync as p}from"child_process";import*as h from"fs";import*as A from"path";function v({gitUrl:t,loginAuthority:e,authResource:r,platform:i=process.platform}){let o;try{o=new URL(t)}catch(s){throw new Error(`Git credential helper setup requires a valid HTTPS remote URL: ${s instanceof Error?s.message:String(s)}`)}if(o.protocol!=="https:")throw new Error(`Git credential helper setup requires an HTTPS remote URL, got '${o.protocol}'.`);let l=o.host,c=`${e}/oauth2/v2.0`,n=`credential.https://${l}`,a=[[`${n}.oauthAuthorizeEndpoint`,`${c}/authorize?prompt=select_account`],[`${n}.oauthTokenEndpoint`,`${c}/token`],[`${n}.oauthDeviceEndpoint`,`${c}/devicecode`],[`${n}.oauthClientId`,x],[`${n}.oauthScopes`,`${r}/.default offline_access`],[`${n}.oauthRedirectUri`,"http://localhost"]];return i==="win32"&&a.push([`${n}.credentialStore`,"dpapi"]),a}function tt(){let t=f(["rev-parse","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!t.success)return null;let e=f(["rev-parse","--abbrev-ref","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)return null;let r=t.stdout.trim(),i=e.stdout.trim();return{branch:i,commitSha:r,detached:i==="HEAD"}}function et(){let t=f(["config","--get","remote.origin.url"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(t.success)return t.stdout.trim()||void 0}var B=["https://","ssh://","git@"];function z(t){return B.some(e=>t.startsWith(e))&&t.trim()===t&&!t.startsWith("-")&&!/[\r\n\0]/.test(t)}function m(t){return t.replace(/:\/\/[^\s/]+@/g,"://[REDACTED]@")}function rt(t,e=process.cwd()){try{return t!==void 0&&!z(t)?{success:!1,error:"Unsafe git remote URL."}:(w({remoteUrl:t,cwd:e}),{success:!0})}catch(r){return{success:!1,error:m(r instanceof Error?r.message:String(r))}}}function H({directory:t,gitUrl:e,loginAuthority:r,authResource:i}){let o=k({gitUrl:e,loginAuthority:r,authResource:i});w({remoteUrl:e,cwd:t,createDirectory:!0,initialBranch:"main",localConfig:o,updateExistingRemote:!0,emitRemoteError:!0,skipInitIfRepoExists:!0})}function it({directory:t,gitUrl:e,loginAuthority:r,authResource:i,onProgress:o}){let l=k({gitUrl:e,loginAuthority:r,authResource:i}),c=l.flatMap(([n,a])=>["-c",`${n}=${a}`]);o?.("Cloning platform-managed repository..."),f([...c,"-c","http.sslVersion=tlsv1.3","clone",e,t],{network:!0,classify:{action:`cloning from ${G(e)}`}}),o?.("Saving Git Credential Manager configuration...");try{return w({cwd:t,localConfig:l,skipInitIfRepoExists:!0}),{configPersisted:!0}}catch(n){return{configPersisted:!1,configError:m(n instanceof Error?n.message:String(n))}}}function nt(t){try{return H(t),{success:!0}}catch(e){return{success:!1,error:m(e instanceof Error?e.message:String(e))}}}function k({gitUrl:t,loginAuthority:e,authResource:r}){try{return v({gitUrl:t,loginAuthority:e,authResource:r})}catch(i){throw new b(`Git credential helper setup failed: ${i instanceof Error?i.message:String(i)}`)}}function w({remoteUrl:t,cwd:e,createDirectory:r=!1,initialBranch:i,localConfig:o=[],updateExistingRemote:l=!1,emitRemoteError:c=!1,skipInitIfRepoExists:n=!1}){r&&h.mkdirSync(e,{recursive:!0});let a={stdio:"pipe",windowsHide:!0,cwd:e};n&&h.existsSync(A.join(e,".git"))||(p("git",["init"],a),i&&p("git",["symbolic-ref","HEAD",`refs/heads/${i}`],a));for(let[u,d]of o)p("git",["config","--local",u,d],a);if(t)try{p("git",["remote","add","origin",t],a)}catch(u){if(!l||!$(u).includes("already exists"))throw c&&process.stderr.write(m($(u))),u;p("git",["remote","set-url","origin",t],a)}}function $(t){return typeof t=="object"&&t!==null&&"stderr"in t&&Buffer.isBuffer(t.stderr)?t.stderr.toString():""}function ot(){let t=f(["status","--porcelain"],{captureStdout:!0,allowFailure:!0,emitStderr:!1}),e=f(["rev-list","--count","origin/main..main"],{captureStdout:!0,allowFailure:!0,emitStderr:!1}),r=e.stdout.trim();return{hasUncommittedChanges:t.success?t.stdout.trim().length>0:null,isMainAheadOfOrigin:e.success&&/^\d+$/.test(r)?Number(r)>0:null}}export{G as a,U as b,f as c,tt as d,et as e,rt as f,H as g,it as h,nt as i,ot as j};
17
+ /*!
18
+ * Copyright (C) Microsoft Corporation. All rights reserved.
19
+ */
20
+ //# sourceMappingURL=chunk-7BRIEYGR.js.map
@@ -0,0 +1,11 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{H as s,f as o}from"./chunk-4LIR3ZYP.js";import{a as r,b as i,c as u,d as c,e as l}from"./chunk-RBG2H562.js";var f=["GitHubMappingMissing","GitHubMappingExpired","GitHubMappingStale"];function g(e){return typeof e=="string"&&f.includes(e)}function E(e){let n=e.code;if(!n)return null;let t=e.message;if(!t||!t.trim())return null;switch(n){case"GitHubMappingMissing":case"GitHubMappingExpired":case"GitHubMappingStale":case"GitHubUserLacksAccess":case"GitHubUserLacksRequiredLevel":case"GitHubAuthSessionExpired":case"GitHubAuthSessionNotFound":case"GitHubAuthDenied":case"GitHubAuthCancelled":return new u(t);case"GitHubAppNotInstalled":case"GitHubInstallationSuspended":return new c(t);case"GitHubRateLimited":case"GitHubEvaluationError":case"GitHubUpstreamError":return new l(t);case"GitHubRepoArchived":case"GitHubRepoNotEnterprise":case"GitHubRepoNotFound":return new i(t);case"OperationNotFound":return new r(t);default:return null}}function H(e){if(e instanceof r)return null;let n=p(e);return n?E(n):null}function v(e){let n=p(e);if(!n)return null;let t=n.code;return!g(t)||!(e instanceof s)&&n.status!==401?null:{code:t,payload:n}}function p(e){if(e instanceof s)return{code:e.code,message:e.message,status:e.status,details:e.details};if(e instanceof o){let n=d(e.body);return n?{code:n.code,message:n.message??"",status:e.status,details:n.details}:null}if(e instanceof Error){let n=e.message.match(/\{[\s\S]*\}/);if(!n)return null;let t=d(n[0]);if(!t?.code)return null;let a=e.message.match(/status:\s*(\d+)/i);return{code:t.code,message:t.message??"",status:a?Number(a[1]):0,details:t.details}}return null}function d(e){if(!e)return null;try{let t=JSON.parse(e)?.error;return!t||typeof t!="object"?null:{code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,details:t.details&&typeof t.details=="object"?t.details:void 0}}catch{return null}}export{E as a,H as b,v as c};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-7GGFN2IW.js.map
@@ -0,0 +1,38 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as $}from"./chunk-6RSE3J4X.js";import{e as Y}from"./chunk-EX6IKPAO.js";import{a as p}from"./chunk-47LJLFDF.js";import{a as H,b as O,d as _e}from"./chunk-UT667QSU.js";var T=O(P=>{var V=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},N=class extends V{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};P.CommanderError=V;P.InvalidArgumentError=N});var D=O(M=>{var{InvalidArgumentError:ye}=T(),L=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new ye(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function be(o){let e=o.name()+(o.variadic===!0?"...":"");return o.required?"<"+e+">":"["+e+"]"}M.Argument=L;M.humanReadableArgName=be});var z=O(Q=>{var{humanReadableArgName:Ce}=D(),I=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden);if(e._hasImplicitHelpCommand()){let[,n,i]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),s=e.createCommand(n).helpOption(!1);s.description(e._helpCommandDescription),i&&s.arguments(i),t.push(s)}return this.sortSubcommands&&t.sort((n,i)=>n.name().localeCompare(i.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(s=>!s.hidden),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||i){let s;n?i?s=e.createOption(e._helpFlags,e._helpDescription):s=e.createOption(e._helpShortFlag,e._helpDescription):s=e.createOption(e._helpLongFlag,e._helpDescription),t.push(s)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e._args.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e._args.find(t=>t.description)?e._args:[]}subcommandTerm(e){let t=e._args.map(n=>Ce(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,s=2,r=2;function l(m,b){if(b){let F=`${m.padEnd(n+r)}${b}`;return t.wrap(F,i-s,n+r)}return m}function a(m){return m.join(`
8
+ `).replace(/^/gm," ".repeat(s))}let h=[`Usage: ${t.commandUsage(e)}`,""],u=t.commandDescription(e);u.length>0&&(h=h.concat([t.wrap(u,i,0),""]));let c=t.visibleArguments(e).map(m=>l(t.argumentTerm(m),t.argumentDescription(m)));c.length>0&&(h=h.concat(["Arguments:",a(c),""]));let f=t.visibleOptions(e).map(m=>l(t.optionTerm(m),t.optionDescription(m)));if(f.length>0&&(h=h.concat(["Options:",a(f),""])),this.showGlobalOptions){let m=t.visibleGlobalOptions(e).map(b=>l(t.optionTerm(b),t.optionDescription(b)));m.length>0&&(h=h.concat(["Global Options:",a(m),""]))}let A=t.visibleCommands(e).map(m=>l(t.subcommandTerm(m),t.subcommandDescription(m)));return A.length>0&&(h=h.concat(["Commands:",a(A),""])),h.join(`
9
+ `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",r=new RegExp(`[\\n][${s}]+`);if(e.match(r))return e;let l=t-n;if(l<i)return e;let a=e.slice(0,n),h=e.slice(n).replace(`\r
10
+ `,`
11
+ `),u=" ".repeat(n),f="\\s\u200B",A=new RegExp(`
12
+ |.{1,${l-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),m=h.match(A)||[];return a+m.map((b,F)=>b===`
13
+ `?"":(F>0?u:"")+b.trimEnd()).join(`
14
+ `)}};Q.Help=I});var j=O(S=>{var{InvalidArgumentError:Ae}=T(),q=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=X(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Ae(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Oe(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},W=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function Oe(o){return o.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function X(o){let e,t,n=o.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}S.Option=q;S.splitOptionFlags=X;S.DualOptions=W});var ee=O(Z=>{function xe(o,e){if(Math.abs(o.length-e.length)>3)return Math.max(o.length,e.length);let t=[];for(let n=0;n<=o.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=o.length;i++){let s=1;o[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&o[i-1]===e[n-2]&&o[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[o.length][e.length]}function we(o,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=o.startsWith("--");t&&(o=o.slice(2),e=e.map(r=>r.slice(2)));let n=[],i=3,s=.4;return e.forEach(r=>{if(r.length<=1)return;let l=xe(o,r),a=Math.max(o.length,r.length);(a-l)/a>s&&(l<i?(i=l,n=[r]):l===i&&n.push(r))}),n.sort((r,l)=>r.localeCompare(l)),t&&(n=n.map(r=>`--${r}`)),n.length>1?`
15
+ (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
16
+ (Did you mean ${n[0]}?)`:""}Z.suggestSimilar=we});var oe=O(re=>{var He=H("events").EventEmitter,R=H("child_process"),y=H("path"),G=H("fs"),d=H("process"),{Argument:Te,humanReadableArgName:Ee}=D(),{CommanderError:U}=T(),{Help:ve}=z(),{Option:te,splitOptionFlags:$e,DualOptions:Ve}=j(),{suggestSimilar:ne}=ee(),B=class o extends He{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>d.stdout.write(t),writeErr:t=>d.stderr.write(t),getOutHelpWidth:()=>d.stdout.isTTY?d.stdout.columns:void 0,getErrHelpWidth:()=>d.stderr.isTTY?d.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,r,l]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(r);return i&&(a.description(i),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(s.noHelp||s.hidden),a._executableFile=s.executableFile||null,l&&a.arguments(l),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new o(e)}createHelp(){return Object.assign(new ve,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new Te(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new U(e,t,n)),d.exit(e)}action(e){let t=n=>{let i=this._args.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new te(e,t)}addOption(e){let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);let i=(s,r,l)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(n);if(s!==null&&e.parseArg)try{s=e.parseArg(s,a)}catch(h){if(h.code==="commander.invalidArgument"){let u=`${r} ${h.message}`;this.error(u,{exitCode:h.exitCode,code:h.code})}throw h}else s!==null&&e.variadic&&(s=e._concatValue(s,a));s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,l)};return this.on("option:"+t,s=>{let r=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,r,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let r=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,r,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof te)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let r=this.createOption(t,n);if(r.makeOptionMandatory(!!e.mandatory),typeof i=="function")r.default(s).argParser(i);else if(i instanceof RegExp){let l=i;i=(a,h)=>{let u=l.exec(a);return u?u[0]:h},r.default(s).argParser(i)}else r.default(i);return this.addOption(r)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return E(this).forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=d.argv,d.versions&&d.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":d.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,c){let f=y.resolve(u,c);if(G.existsSync(f))return f;if(i.includes(y.extname(c)))return;let A=i.find(m=>G.existsSync(`${f}${m}`));if(A)return`${f}${A}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let u;try{u=G.realpathSync(this._scriptPath)}catch{u=this._scriptPath}l=y.resolve(y.dirname(u),l)}if(l){let u=s(l,r);if(!u&&!e._executableFile&&this._scriptPath){let c=y.basename(this._scriptPath,y.extname(this._scriptPath));c!==this._name&&(u=s(l,`${c}-${e._name}`))}r=u||r}n=i.includes(y.extname(r));let a;d.platform!=="win32"?n?(t.unshift(r),t=se(d.execArgv).concat(t),a=R.spawn(d.argv[0],t,{stdio:"inherit"})):a=R.spawn(r,t,{stdio:"inherit"}):(t.unshift(r),t=se(d.execArgv).concat(t),a=R.spawn(d.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{d.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let h=this._exitCallback;h?a.on("close",()=>{h(new U(d.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):a.on("close",d.exit.bind(d)),a.on("error",u=>{if(u.code==="ENOENT"){let c=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",f=`'${r}' does not exist
19
+ - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
+ - ${c}`;throw new Error(f)}else if(u.code==="EACCES")throw new Error(`'${r}' not executable`);if(!h)d.exit(1);else{let c=new U(1,"commander.executeSubCommandAsync","(error)");c.nestedError=u,h(c)}}),this.runningCommand=a}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_checkNumberOfArguments(){this._args.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let r=i;if(i!==null&&n.parseArg)try{r=n.parseArg(i,s)}catch(l){if(l.code==="commander.invalidArgument"){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'. ${l.message}`;this.error(a,{exitCode:l.exitCode,code:l.code})}throw l}return r};this._checkNumberOfArguments();let t=[];this._args.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((r,l)=>e(n,l,r),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return E(this).reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(r=>{i.push({hookedCommand:s,callback:r})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return ie(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),ie(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let r;return r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,()=>this._actionHandler(this.processedArgs)),this.parent&&(r=this._chainOrCall(r,()=>{this.parent.emit(s,e,t)})),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function r(a){return a.length>1&&a[0]==="-"}let l=null;for(;s.length;){let a=s.shift();if(a==="--"){i===n&&i.push(a),i.push(...s);break}if(l&&!r(a)){this.emit(`option:${l.name()}`,a);continue}if(l=null,r(a)){let h=this._findOption(a);if(h){if(h.required){let u=s.shift();u===void 0&&this.optionMissingArgument(h),this.emit(`option:${h.name()}`,u)}else if(h.optional){let u=null;s.length>0&&!r(s[0])&&(u=s.shift()),this.emit(`option:${h.name()}`,u)}else this.emit(`option:${h.name()}`);l=h.variadic?h:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let h=this._findOption(`-${a[1]}`);if(h){h.required||h.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${h.name()}`,a.slice(2)):(this.emit(`option:${h.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let h=a.indexOf("="),u=this._findOption(a.slice(0,h));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,a.slice(h+1));continue}}if(r(a)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(a)){t.push(a),s.length>0&&n.push(...s);break}else if(a===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(a),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(a),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(a),s.length>0&&i.push(...s);break}i.push(a)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return E(this).reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
22
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
+ `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
+ `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in d.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,d.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ve(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=r=>{let l=r.attributeName(),a=this.getOptionValue(l),h=this.options.find(c=>c.negate&&l===c.attributeName()),u=this.options.find(c=>!c.negate&&l===c.attributeName());return h&&(h.presetArg===void 0&&a===!1||h.presetArg!==void 0&&a===h.presetArg)?h:u||r},i=r=>{let l=n(r),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let r=s.createHelp().visibleOptions(s).filter(l=>l.long).map(l=>l.long);i=i.concat(r),s=s.parent}while(s&&!s._enablePositionalOptions);t=ne(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this._args.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=ne(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this.options.push(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
25
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>Ee(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=y.basename(e,y.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);E(this).reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this.emit(this._helpLongFlag),this.emit("afterHelp",n),E(this).forEach(s=>s.emit("afterAllHelp",n))}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=$e(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=d.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
+ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let r;typeof t=="function"?r=t({error:s.error,command:s.command}):r=t,r&&s.write(`${r}
27
+ `)}),this}};function ie(o,e){o._hasHelpOption&&e.find(n=>n===o._helpLongFlag||n===o._helpShortFlag)&&(o.outputHelp(),o._exit(0,"commander.helpDisplayed","(outputHelp)"))}function se(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function E(o){let e=[];for(let t=o;t;t=t.parent)e.push(t);return e}re.Command=B});var ue=O((g,he)=>{var{Argument:De}=D(),{Command:ae}=oe(),{CommanderError:Se,InvalidArgumentError:le}=T(),{Help:ke}=z(),{Option:Fe}=j();g=he.exports=new ae;g.program=g;g.Argument=De;g.Command=ae;g.CommanderError=Se;g.Help=ke;g.InvalidArgumentError=le;g.InvalidOptionArgumentError=le;g.Option=Fe});var pe=_e(ue(),1),{program:je,createCommand:Re,createArgument:Ge,createOption:Ue,CommanderError:Be,InvalidArgumentError:Ke,InvalidOptionArgumentError:Je,Command:ce,Argument:Ye,Option:Qe,Help:Xe}=pe.default;var x={auth:{"@description":"Manage authentication state.",commands:{login:{"@helpText":p.auth.login.description,lazyHandler:async()=>(await import("./Login-7RW6OEST.js")).loginAsync},logout:{"@helpText":p.auth.logout.description,lazyHandler:async()=>(await import("./Logout-IXK2TMRL.js")).logoutAsync},status:{"@helpText":p.auth.status.description,lazyHandler:async()=>(await import("./AuthStatus-6DMK7O6W.js")).authStatusAsync},switch:{"@helpText":p.auth.switch.description,lazyHandler:async()=>(await import("./AuthSwitch-NUQIIRCG.js")).authSwitchAsync}}},app:{"@description":"Manage apps and their resources.",commands:{clone:{"@helpText":p.app.clone.description,lazyHandler:async()=>(await import("./CloneMaafApp-B672N7T5.js")).cloneMaafAppAsync},create:{"@helpText":p.app.create.description,lazyHandler:async()=>(await import("./CreateMaafApp-RWL7FXSP.js")).createMaafAppAsync},init:{"@helpText":p.app.init.description,lazyHandler:async()=>(await import("./Init-XCSK3WQM.js")).initAsync},list:{"@helpText":p.app.list.description,lazyHandler:async()=>(await import("./ListMaafApps-3W6W6UYP.js")).listMaafAppsAsync},show:{"@helpText":p.app.show.deprecation,lazyHandler:async()=>(await import("./InfoMaafApp-FL5PICDD.js")).showMaafAppAsync},share:{typed:!0,"@helpText":p.app.share.description,lazyHandler:async()=>(await import("./ShareMaafApp-6MKZ33HW.js")).shareMaafAppAsync,commands:{link:{typed:!0,"@helpText":p.app.shareLink.description,commands:{create:{"@helpText":p.app.shareLink.create.description,lazyHandler:async()=>(await import("./ShareLinkCreate-T5FN47J2.js")).shareLinkCreateAsync},list:{"@helpText":p.app.shareLink.list.description,lazyHandler:async()=>(await import("./ShareLinkList-6JCVEYNC.js")).shareLinkListAsync},revoke:{"@helpText":p.app.shareLink.revoke.description,lazyHandler:async()=>(await import("./ShareLinkRevoke-OH5DZDHR.js")).shareLinkRevokeAsync}}},list:{"@helpText":p.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-QCEL7QNJ.js")).shareListAsync}}},unshare:{"@helpText":p.app.unshare.description,lazyHandler:async()=>(await import("./UnshareMaafApp-OSE2TOBJ.js")).unshareMaafAppAsync},info:{"@helpText":p.app.info.description,lazyHandler:async()=>(await import("./InfoMaafApp-FL5PICDD.js")).infoMaafAppAsync},build:{"@helpText":p.app.build.description,lazyHandler:async()=>(await import("./BuildMaafApp-A4IUU6LI.js")).buildMaafAppAsync},"build-status":{"@helpText":p.app.buildStatus.description,lazyHandler:async()=>(await import("./GetMaafBuildStatus-UGAHVANE.js")).getMaafBuildStatusAsync},deploy:{"@helpText":p.app.deploy.description,lazyHandler:async()=>(await import("./DeployMaafApp-E4TQU6RO.js")).deployMaafAppAsync},pack:{"@helpText":p.app.pack.description,lazyHandler:async()=>(await import("./Pack-IWU3PFQL.js")).packAsync},play:{"@helpText":p.app.play.description,lazyHandler:async()=>(await import("./PlayMaafApp-5H3DCJ2C.js")).playMaafAppAsync},dev:{"@helpText":p.app.dev.description,lazyHandler:async()=>(await import("./Dev-ICCA5DEJ.js")).devAsync},delete:{"@helpText":p.app.delete.description,lazyHandler:async()=>(await import("./DeleteMaafApp-GT4CEFAE.js")).deleteMaafAppAsync},refresh:{typed:!0,commands:{"data-source":{"@helpText":p.app.refresh.dataSource.description,lazyHandler:async()=>(await import("./RefreshDataSource-XQT7LVMO.js")).refreshDataSourceAsync}}},add:{typed:!0,commands:{"data-source":{"@helpText":p.app.add.connector.description,lazyHandler:async()=>(await import("./AddConnector-5DUBFLEK.js")).addConnectorAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./AddConnector-5DUBFLEK.js")).addConnectorAsync}}},remove:{typed:!0,commands:{"data-source":{"@helpText":p.app.remove.description,lazyHandler:async()=>(await import("./RemoveDataSource-PGPLMJUX.js")).removeDataSourceAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./RemoveDataSource-PGPLMJUX.js")).removeDataSourceAsync}}},"set-setting":{"@helpText":p.app["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-SEWDA4TF.js")).setSettingAsync},"get-settings":{"@helpText":p.app["get-settings"].description,lazyHandler:async()=>(await import("./GetSettings-ZI2IBKV5.js")).getSettingsAsync}}},connector:{"@description":"Discover available connectors and their operations.",commands:{list:{"@helpText":p.connector.list.description,lazyHandler:async()=>(await import("./ListConnectors-MYUEVJPT.js")).listConnectorsCliAsync},"list-actions":{"@helpText":p.connector["list-actions"].description,lazyHandler:async()=>(await import("./ListConnectorActions-B2YD24RX.js")).listConnectorActionsCliAsync}}},git:{"@description":"Manage GitHub integration for apps.",commands:{auth:{typed:!0,commands:{refresh:{"@helpText":p.git.auth.refresh.description,lazyHandler:async()=>(await import("./RefreshGitAuth-IQBAFR37.js")).refreshGitAuthAsync}}},list:{"@helpText":p.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-QCEL7QNJ.js")).shareListAsync}}},telemetry:{"@description":"Manage CLI telemetry settings.",commands:{enable:{"@helpText":p.telemetry.enable.description,lazyHandler:async()=>(await import("./TelemetrySettings-RXPPIEVO.js")).telemetryEnableAsync},disable:{"@helpText":p.telemetry.disable.description,lazyHandler:async()=>(await import("./TelemetrySettings-RXPPIEVO.js")).telemetryDisableAsync},status:{"@helpText":p.telemetry.status.description,lazyHandler:async()=>(await import("./TelemetrySettings-RXPPIEVO.js")).telemetryStatusAsync}}}};function C(o){return o.typed===!0}function k(o){return typeof o.lazyHandler=="function"}function w(o,e){return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0}function st(o,e){let t=o.slice(2);if(t.length===0||t[0].startsWith("-"))return null;let[n]=t;return v(n,e)?de(e[n].commands,t,1,[n]):null}function de(o,e,t,n){if(t>=e.length)return null;let i=e[t];if(i.startsWith("-"))return null;let s=w(o,i);if(!s)return null;let r=[...n,i];if(!C(s))return{path:r,lazyHandler:s.lazyHandler,tokensConsumed:t+1};let l=e[t+1];return l!==void 0&&!l.startsWith("-")&&w(s.commands,l)!==void 0?de(s.commands,e,t+1,r):k(s)?{path:r,lazyHandler:s.lazyHandler,tokensConsumed:t+1}:null}function rt(o,e){let t=o.slice(2),n=t.findIndex(u=>u.startsWith("-")),i=n===-1?t:t.slice(0,n);if(i.length<2)return null;let[s,...r]=i;if(!v(s,e))return null;let l=e[s].commands,a=[s],h=!1;for(let u of r){let c=w(l,u);if(!c)return h?{pathTokens:a,unknownToken:u}:null;if(!C(c))return null;a.push(u),l=c.commands,h=!0}return h?{pathTokens:a,unknownToken:void 0}:null}function v(o,e){return o in e}function K(o,e,t){let n=Math.max(...t.map(([s])=>s.length)),i=Math.max(n+2,10);o.push(e);for(let[s,r]of t)o.push(` ${s.padEnd(i)} ${r}`)}function me(){let o=[],e=Object.entries(x);if(e.length>0){let t=Math.max(...e.map(([i])=>i.length)),n=Math.max(t+2,10);o.push("Command Groups:"),o.push("");for(let[i,s]of e)o.push(` ${i.padEnd(n)} ${s["@description"]}`);o.push(""),o.push(`Run '${"ms"} <group> --help' for commands within a group.`)}return o.join(`
28
+ `)}function pt(o){if(!v(o,x))return"";let e=x[o],t=[];t.push(`Usage: ${"ms"} ${o} <command> [flags]`),t.push(""),t.push(e["@description"]),t.push("");let n=[],i=[];for(let[s,r]of Object.entries(e.commands))if(C(r)){let l=r["@helpText"];k(r)&&l!==void 0&&n.push([s,l]),i.push([s,r])}else n.push([s,r["@helpText"]]);if(n.length>0&&K(t,"Commands:",n),i.length>0){t.push("");for(let[s,r]of i)K(t,`${s} <type>:`,J(r,s).map(([l,a])=>[l,a]))}return t.push(""),t.push(`Run '${"ms"} ${o} <command> --help' for command-specific flags.`),t.join(`
29
+ `)}function J(o,e){let t=[];for(let[n,i]of Object.entries(o.commands)){let s=e?`${e} ${n}`:n;C(i)?t.push(...J(i,s)):t.push([s,i["@helpText"]])}return t}function ct(o){if(o.length<2)return null;let[e,...t]=o;if(!v(e,x))return null;let n=x[e].commands,i;for(let l of t){let a=w(n,l);if(!a)return null;if(i=a,C(a))n=a.commands;else return null}if(!i||!C(i))return null;let s=o.join(" "),r=[];return r.push(`Usage: ${"ms"} ${s} <type> [flags]`),r.push(""),K(r,"Types:",J(i,"")),r.push(""),r.push(`Run '${"ms"} ${s} <type> --help' for type-specific flags.`),r.join(`
30
+ `)}function fe(){return`${"ms"} v${$.version} (preview)`}function ge(o){let e=new ce;return e.option("--non-interactive","Run in non-interactive mode (no prompts, all parameters must be provided via flags or environment variables)"),e.option("--json","Format output as JSON"),e.option("--no-color","Disable colored output"),o?e.name(`${"ms"} ${o.path.join(" ")}`):(e.name("ms"),e.usage("[option] [command] [<args>]")),e.version($.version,"-v, --version","output the current version"),e.description(p.global.programDescription),e.addHelpText("beforeAll",()=>`${fe()}
31
+
32
+ `),e.addHelpText("after",()=>o?"":`
33
+ `+me()+`
34
+ `),e}var Ne=new Set(["--help","-h","--version","-v","--json","--no-color","--non-interactive"]);function Pe(o){let e=o.slice(2);return e.some(n=>n==="--help"||n==="-h"||n==="--version"||n==="-v")&&e.every(n=>Ne.has(n))}function Tt(o){return Pe(o)?(o.includes("--no-color")&&Y("NO_COLOR","1"),ge(null).parse([...o]),!0):!1}export{x as a,st as b,rt as c,v as d,pt as e,ct as f,fe as g,ge as h,Tt as i};
35
+ /*!
36
+ * Copyright (C) Microsoft Corporation. All rights reserved.
37
+ */
38
+ //# sourceMappingURL=chunk-AQLFVAFU.js.map
@@ -0,0 +1,12 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as b,b as $,d as K,e as W,g as D}from"./chunk-LQ65CHNN.js";import{a as H}from"./chunk-USRRI5H4.js";import{h as J,i as V,j as q}from"./chunk-SNWTSI75.js";import{I as M,J as I,K as P,L as E,ba as T,ea as N,f as j,ja as x,la as L,ma as B,ua as g,va as O}from"./chunk-4LIR3ZYP.js";import{b as y}from"./chunk-RBG2H562.js";import{s as S,t as U}from"./chunk-3JIZGVCA.js";import{c as k,d as G,h,i as R}from"./chunk-PVAIJSAI.js";import{a as C}from"./chunk-47LJLFDF.js";import{a as F}from"./chunk-PPW4XUZO.js";async function Ce(e,n){de(e,n),await e.runVerb();let s=O();if(!s.appConfig)throw new y(`No ${F} found in the current directory. Run "${"ms"} app init" first.`);let i=await V(e),c=await e.getTenantIdAsync();if(!c)throw new y("Unable to determine tenant ID. Ensure you are logged in.");let p=await J(e),l=K(await e.getOption("access")),f=l==="edit"?W(s.appConfig):s.appConfig.repoType??"none",u=oe(e.getPositionalArgs(0));if(u.length===0)throw new y("Provide at least one principal (Entra object ID or user/group email address). Separate multiple entries with commas, spaces, or both.");let o=n==="share"&&(l==="play"||f!=="native"),a=g(),m=a.trackScenario("MaafApp.SharePermissions",{mode:n,access:l,repoType:f,inputCount:u.length});try{let t=[],r=await se(u,t,o);if(a.trackActivityEvent("MaafApp.SharePermissions.PrincipalResolution",{mode:n,inputCount:u.length,resolvedCount:r.length,failedCount:t.length,emailPassthrough:o}),r.length===0)throw new y(z(t));t.length>0&&R(z(t));let d=await(n==="share"?Z:ee)({tenantId:c,environmentId:i,appName:p,access:l,refs:r,repoType:f,jsonMode:e.isJsonMode()});m.complete({resolvedCount:r.length,failedResolutionCount:t.length,scope:d.scope,role:d.role,appScopeContributorFallback:l==="edit"&&d.scope==="app",...n==="unshare"&&{revokedCount:d.revokedCount??0,revokedPrincipalCount:d.revokedPrincipalCount??0,notFoundCount:d.notFound?.length??0,skippedCount:d.skipped?.length??0}});let v=n==="share"&&l==="edit"?await ne({appInfo:d.appInfo,tenantId:c,environmentId:i,appName:p,jsonMode:e.isJsonMode()}):void 0;e.isJsonMode()?G({access:l,partialFailure:t.length>0,...d.result,...n==="unshare"&&{revokedCount:d.revokedCount??0,revokedPrincipalCount:d.revokedPrincipalCount??0,notFound:(d.notFound??[]).map(Q),skipped:(d.skipped??[]).map(Q)},...v&&{repoType:v.repoType,cloneUrl:v.cloneUrl},warnings:t}):(ue({appName:p,mode:n,access:l,inputCount:r.length,outcome:d}),te(v))}catch(t){throw m.failure(t),t}}async function Z(e){let{tenantId:n,environmentId:s,appName:i,access:c,refs:p,repoType:l,jsonMode:f}=e;if(c==="play"){let m=p.map(r=>Y(r,I));return{result:await N({tenantId:n,environmentId:s,logger:g(),actionsParams:{appName:i,put:m,delete:[]}}),scope:"app",role:I}}if(l==="none")throw new y(b);if(l!=="native"){f||R($);let m=p.map(r=>Y(r,P));return{result:await N({tenantId:n,environmentId:s,logger:g(),actionsParams:{appName:i,put:m,delete:[]}}),scope:"app",role:P}}let u=await D({tenantId:n,environmentId:s,appName:i}),o=p.map(ce);return{result:await L({tenantId:n,environmentId:s,logger:g(),actionsParams:{repoId:u.repositoryId,put:o,delete:[]}}),scope:"repo",role:M,appInfo:u}}async function ee(e){let{tenantId:n,environmentId:s,appName:i,access:c,refs:p,repoType:l,jsonMode:f}=e,u=p.map(_),o=new Map(p.map(r=>[_(r),r]));if(c==="edit"&&l==="none")throw new y(b);let a=c==="play"||l!=="native",m=a?c==="play"?I:P:M,t;if(a)c==="edit"&&l!=="native"&&(f||R($)),t=await x({tenantId:n,environmentId:s,logger:g(),actionsParams:{appName:i,principalIds:u,roleDefinitionName:m}});else{let r=await D({tenantId:n,environmentId:s,appName:i});t=await B({tenantId:n,environmentId:s,logger:g(),actionsParams:{repoId:r.repositoryId,principalIds:u}})}return{result:t.result,scope:a?"app":"repo",role:m,revokedCount:t.revokedCount,revokedPrincipalCount:t.revokedPrincipalCount,notFound:t.notFoundPrincipalIds.map(r=>o.get(r)??{id:r,input:r}),skipped:t.skippedNullRoleAssignments.map(r=>o.get(r.principalObjectId)??{id:r.principalObjectId,input:r.principalObjectId})}}function _(e){if(!e.id)throw new y(`Could not resolve '${e.input}' to an AAD object ID. Unshare requires object IDs.`);return e.id}async function ne(e){let n=e.appInfo;if(!n)try{n=await T({tenantId:e.tenantId,environmentId:e.environmentId,logger:g(),actionsParams:{appName:e.appName}})}catch{e.jsonMode||R(`Share succeeded, but repository details for '${e.appName}' could not be read.`);return}return H(n)}function te(e){e&&(e.repoType&&h(`Repo type: ${e.repoType}`),e.cloneUrl&&h(`Clone URL: ${e.cloneUrl}`))}function oe(e){let n=new Set;for(let s of e)for(let i of s.split(",")){let c=i.trim();c&&n.add(c)}return[...n]}async function se(e,n,s){let i=new Map,c=new Map,l=(await Promise.all(e.map(async o=>{let a=o.toLowerCase(),m=i.get(a);if(m)return m;if(q(o)){let t={id:o,input:o};return i.set(a,t),t}if(!pe(o))return n.push({input:o,reason:"not an AAD object ID (GUID) or a valid email address"}),null;if(s){let t={input:o,email:o};return i.set(a,t),t}try{let t=c.get(a);t||(t=E(o,g()),c.set(a,t));let r=await t;if(!r)return n.push({input:o,reason:"no user or group found in this tenant (invite as a guest in Entra ID first if external)"}),null;let w={id:r.id,input:o,type:r.type,email:o,displayName:r.displayName};return i.set(a,w),w}catch(t){return n.push({input:o,reason:ie(t)}),null}}))).filter(o=>o!==null),f=[],u=new Set;for(let o of l){let a=(o.id??o.email??o.input).toLowerCase();u.has(a)||(u.add(a),f.push(o))}return f}function z(e){let n=e.length===1?"entry":"entries",s=e.map(i=>` - ${i.input}: ${i.reason}`);return[`Could not resolve ${e.length} ${n}:`,...s].join(`
8
+ `)}function ie(e){if(e instanceof j){if(e.status===403)return ae(e.status);let n=re(e.body);return n!==void 0?`Graph ${e.status}: ${n}`:e.message}return e instanceof Error?e.message:String(e)}function ae(e){return`Graph ${e}: your sign-in lacks permission to look up accounts by email. Pass the AAD object ID (GUID) instead, or have an admin grant the User.ReadBasic.All and Group.Read.All Graph permissions.`}function re(e){if(e)try{let s=JSON.parse(e)?.error?.message;return typeof s=="string"?s:void 0}catch{return}}function pe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Y(e,n){return{name:e.displayName??e.input,properties:{roleName:n,principal:le(e)}}}function le(e){return e.id?e.email?{id:e.id,email:e.email}:{id:e.id}:{email:e.email??e.input}}function ce(e){let n=e.id??e.input;return{name:e.displayName??e.input,properties:{roleName:M,principal:e.type?{id:n,type:e.type}:{id:n}}}}function Q(e){return{id:e.id??e.input,label:e.displayName??e.input}}function ue(e){let{appName:n,mode:s,access:i,inputCount:c,outcome:p}=e,l=i==="play"?"play":"edit";if(s==="share"){let a=p.result.put?.length??0;if(a===0){h("No changes were applied.");return}k(`Shared app '${n}' with ${a} ${A("principal",a)}. They can now ${l} the app.`);return}let f=p.revokedCount??0,u=p.revokedPrincipalCount??f;if(u===0){h(`No ${l} assignments to revoke on '${n}' \u2014 none of the ${c} ${A("principal",c)} had existing access.`);return}if(k(`Revoked ${l} permissions for ${u} ${A("principal",u)} on '${n}'.`),p.notFound&&p.notFound.length>0){let o=p.notFound.map(a=>a.displayName??a.input).join(", ");h(`${p.notFound.length} ${A("principal",p.notFound.length)} had no existing ${l} access (no-op): ${o}`)}if(p.skipped&&p.skipped.length>0){let o=p.skipped.map(a=>a.displayName??a.input).join(", ");h(`${p.skipped.length} ${A("principal",p.skipped.length)} had a role assignment with an unknown role definition; ${l} access was not modified for: ${o}. Investigate via the role-assignments API.`)}}function A(e,n){return n===1?e:`${e}s`}function de(e,n){let s=n==="share"?C.app.share:C.app.unshare,i=n==="share"?S:U;e.setDescription(s.description),e.addExamples(s.examples),e.consumePositionalArgs("principal"),e.addOptions([{flags:{key:i.AppName.name},env:i.AppName.envVar,description:s.options.app,optionalInNonInteractive:!0},{flags:{key:i.Access.name},env:i.Access.envVar,default:i.Access.defaultValue,description:s.options.access,optionalInNonInteractive:!0}])}export{Ce as a};
9
+ /*!
10
+ * Copyright (C) Microsoft Corporation. All rights reserved.
11
+ */
12
+ //# sourceMappingURL=chunk-EQCYKUEU.js.map
@@ -0,0 +1,11 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ var N=`${"ms".toUpperCase()}_CLI_`;function O(E){return`${N}${E}`}function e(E){return process.env[O(E)]}function R(E){return e(E)==="true"}function n(E){return process.env[E]}function I(E,_){process.env[E]=_}export{O as a,e as b,R as c,n as d,I as e};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-EX6IKPAO.js.map
@@ -0,0 +1,13 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as p,b}from"./chunk-UT667QSU.js";var i=b((l,m)=>{var u=p("buffer"),e=u.Buffer;function a(r,f){for(var n in r)f[n]=r[n]}e.from&&e.alloc&&e.allocUnsafe&&e.allocUnsafeSlow?m.exports=u:(a(u,l),l.Buffer=o);function o(r,f,n){return e(r,f,n)}o.prototype=Object.create(e.prototype);a(e,o);o.from=function(r,f,n){if(typeof r=="number")throw new TypeError("Argument must not be a number");return e(r,f,n)};o.alloc=function(r,f,n){if(typeof r!="number")throw new TypeError("Argument must be a number");var t=e(r);return f!==void 0?typeof n=="string"?t.fill(f,n):t.fill(f):t.fill(0),t};o.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return e(r)};o.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(r)}});export{i as a};
8
+ /*! Bundled license information:
9
+
10
+ safe-buffer/index.js:
11
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
12
+ */
13
+ //# sourceMappingURL=chunk-HBLO3WDD.js.map
@@ -0,0 +1,12 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as y}from"./chunk-TYRVM4PP.js";import{a as i}from"./chunk-6RSE3J4X.js";import{i as s}from"./chunk-PVAIJSAI.js";import{h as d}from"./chunk-PPW4XUZO.js";import{d as g}from"./chunk-UT667QSU.js";function T(e){let n={version:d,appId:e.appId,appDisplayName:e.appDisplayName,environmentId:e.environmentId,description:e.description,repoType:e.repoType,cloud:e.cloud,buildPath:e.buildPath??"./dist",buildCommand:e.buildCommand??"npm run build",buildEntryPoint:e.buildEntryPoint??"index.html"};return e.repositoryId&&(n.repositoryId=e.repositoryId),e.externalRepoUrl&&(n.externalRepoUrl=e.externalRepoUrl),e.iconPath&&(n.iconPath=e.iconPath),e.localAppUrl&&(n.localAppUrl=e.localAppUrl),e.connectionReferences!==void 0&&(n.connectionReferences=e.connectionReferences),e.appSettings!==void 0&&(n.appSettings=e.appSettings),n}import*as r from"fs";import*as f from"path";var c=g(y(),1);var I="https://registry.npmjs.org",C=5e3;async function l(e,n=i.version){if(!c.default.valid(n))return;if(c.default.prerelease(n)===null)return n;let p=await R(e);return p?`^${p}`:void 0}async function R(e){try{let{data:n}=await e.get(`${I}/${i.name}/latest`,{headers:{"user-agent":`${i.name}/${i.version}`},signal:AbortSignal.timeout(C)});return typeof n?.version=="string"&&c.default.valid(n.version)?n.version:void 0}catch{return}}async function O(e,n,p){let a=f.join(e,"package.json");if(!r.existsSync(a))return;let o=await l(p);if(!o){n||s(`Skipping the project-local CLI pin: '${i.version}' is not a published release and no published version could be resolved. Install '${i.name}' into the project manually if you want a project-local CLI.`);return}!n&&o!==i.version&&s(`'${i.version}' is a prerelease build; pinning the latest published CLI ('${o}') into the app instead.`);try{let t=JSON.parse(r.readFileSync(a,"utf8"));t.devDependencies=Object.fromEntries(Object.entries({...t.devDependencies,[i.name]:o}).sort(([m],[u])=>m.localeCompare(u,"en"))),r.writeFileSync(a,`${JSON.stringify(t,null,2)}
8
+ `)}catch(t){n||s(`Could not pin '${i.name}' into ${a} (${t instanceof Error?t.message:String(t)}). Add "${i.name}": "${o}" to devDependencies manually.`)}}var h="none",v="native",b=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function _(e){return b.test(e.trim())}function k(e){if(e===void 0||e==="")return{repoType:"native",remoteUrl:void 0};let n=e.trim();return n.toLowerCase()===v?{repoType:"native",remoteUrl:void 0}:n.toLowerCase()===h?{repoType:"none",remoteUrl:void 0}:{repoType:"github",remoteUrl:n}}export{T as a,O as b,_ as c,k as d};
9
+ /*!
10
+ * Copyright (C) Microsoft Corporation. All rights reserved.
11
+ */
12
+ //# sourceMappingURL=chunk-IQGMFWXB.js.map
@@ -0,0 +1,11 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as U,b as y,c as b}from"./chunk-7GGFN2IW.js";import{a as h,b as E}from"./chunk-4VBFOKV6.js";import{b as g,qa as H,ra as G,ua as x}from"./chunk-4LIR3ZYP.js";import{c as D}from"./chunk-RBG2H562.js";import{h as d}from"./chunk-PVAIJSAI.js";async function T(r){let{remoteUrl:c,tenantId:l,jsonMode:p,openBrowser:s,verb:f}=r,{host:t,owner:i,repo:n}=g(c),o=i&&n?H(i,n):"",v=t&&i&&n?`https://${t}/${i}/${n}`:c,e=x(),a=M(f);e.trackActivityEvent(a,{repoHost:t,repoHash:o}),p||d("GitHub authentication is required for this action.");let u=I({isJson:p,openBrowser:s}),m=new AbortController,R=()=>{m.abort()};process.once("SIGINT",R);try{await G({remoteUrl:v,tenantId:l,logger:e,display:u,skipBrowser:!1,signal:m.signal})}catch(w){throw e.trackActivityEvent(`${a}.Failed`,{repoHost:t,repoHash:o}),y(w)??w}finally{process.removeListener("SIGINT",R)}e.trackActivityEvent(`${a}.Complete`,{repoHost:t,repoHash:o}),p||d(A(f))}function A(r){switch(r){case"app create":return"Resuming create...";case"app init":return"Resuming init...";case"app build":return"Resuming build...";case"app deploy":return"Resuming deploy..."}}function I(r){return r.isJson?new E:r.openBrowser?h:{...h,openVerificationUri:void 0}}function M(r){switch(r){case"app create":return"Maaf.Create.GitHubDcfRecovery";case"app init":return"Maaf.Init.GitHubDcfRecovery";case"app build":return"Maaf.Build.GitHubDcfRecovery";case"app deploy":return"Maaf.Deploy.GitHubDcfRecovery"}}async function F(r,c,l=T){let{repoType:p,externalRepoUrl:s,tenantId:f,jsonMode:t,openBrowser:i,verb:n}=c;try{return await r({isRetry:!1})}catch(o){if(p!=="github")throw o;if(!b(o)){let e=y(o);throw e||o}if(!s)throw new D(`GitHub authentication is required, but the app config does not record the external repository URL needed to recover the identity mapping. This app may have been created before the URL was persisted to \`ms.config.json\`. Either add \`externalRepoUrl: "<your repo url>"\` to \`ms.config.json\`, or recreate the app with \`ms app create --repo <your repo url>\`, then run \`ms ${n}\` again.`);await l({remoteUrl:s,tenantId:f,jsonMode:t,openBrowser:i,verb:n});try{return await r({isRetry:!0})}catch(e){let a=b(e);if(a)throw U(a.payload)??e;let u=y(e);throw u||e}}}export{F as a};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-KYL2Y5G4.js.map
@@ -0,0 +1,13 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{ba as r,ua as i}from"./chunk-4LIR3ZYP.js";import{b as t}from"./chunk-RBG2H562.js";import{a as n}from"./chunk-PPW4XUZO.js";var u=`Cannot share source code \u2014 no repository linked.
8
+
9
+ This app has no linked repository, so source code isn't stored on the platform. To collaborate on code, run 'ms app init' to create an app instance with a repo, or share the source with your collaborator directly.`,g="This app is not backed by a platform managed repo. Repository access must be configured in the external repository.",s="00000000-0000-0000-0000-000000000000";function p(e){return!!e&&e!==s}function h(e){let o=(e??"play").trim().toLowerCase();if(o==="play"||o==="edit")return o;throw new t(`Unknown --access value '${e}'. Use 'play' (default \u2014 app access) or 'edit' (edit access).`)}function A(e){if(e.repoType)return e.repoType;if(p(e.repositoryId))throw new t(`${n} is missing the 'repoType' field but has a 'repositoryId' set. This usually means the file was written by an older CLI. Re-run "${"ms"} app init" to migrate the config, then retry.`);return"none"}async function c(e){return r({tenantId:e.tenantId,environmentId:e.environmentId,logger:i(),actionsParams:{appName:e.appName}})}async function I(e){let o=await c(e);if(!p(o.repositoryId))throw new t(`App '${e.appName}' has no associated repository.`);return o}export{u as a,g as b,p as c,h as d,A as e,c as f,I as g};
10
+ /*!
11
+ * Copyright (C) Microsoft Corporation. All rights reserved.
12
+ */
13
+ //# sourceMappingURL=chunk-LQ65CHNN.js.map
@@ -0,0 +1,11 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ var t=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=class{_timer=null;_frameIndex=0;_label="";_render(){let e=this._label.length>0?` ${this._label}`:"";process.stdout.write(`\r${t[this._frameIndex]}${e}\x1B[K`)}_restoreCursor=()=>{process.stdout.write("\r\x1B[K"),process.stdout.write("\x1B[?25h")};_handleSIGINT=()=>{this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),process.kill(process.pid,"SIGINT")};_handleSIGTERM=()=>{this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),process.kill(process.pid,"SIGTERM")};_handleUncaughtException=e=>{throw this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),e};_handleUnhandledRejection=e=>{throw this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),e};start(e=""){if(this._label=e,this._timer!==null){this._render();return}process.stdout.write("\x1B[?25l"),process.once("exit",this._restoreCursor),process.once("SIGINT",this._handleSIGINT),process.once("SIGTERM",this._handleSIGTERM),process.once("uncaughtException",this._handleUncaughtException),process.once("unhandledRejection",this._handleUnhandledRejection),this._render(),this._timer=setInterval(()=>{this._render(),this._frameIndex=(this._frameIndex+1)%t.length},80)}update(e){this._label=e,this._timer!==null&&this._render()}stop(){this._timer!==null&&(clearInterval(this._timer),this._timer=null,this._frameIndex=0,process.off("exit",this._restoreCursor),process.off("SIGINT",this._handleSIGINT),process.off("SIGTERM",this._handleSIGTERM),process.off("uncaughtException",this._handleUncaughtException),process.off("unhandledRejection",this._handleUnhandledRejection),this._restoreCursor())}};export{r as a};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-OL6CTXQR.js.map