@microsoft/apps-cli 0.0.1 → 0.4.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 (334) hide show
  1. package/README.md +281 -1
  2. package/dist/ArgumentProvider.d.ts +102 -0
  3. package/dist/ArgumentProvider.d.ts.map +1 -0
  4. package/dist/ArgumentProvider.js +376 -0
  5. package/dist/ArgumentProvider.js.map +1 -0
  6. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +18 -0
  7. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +1 -0
  8. package/dist/Authentication/NodeMsalAuthenticationProvider.js +99 -0
  9. package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +1 -0
  10. package/dist/Authentication/OrchardAuthenticationProvider.d.ts +13 -0
  11. package/dist/Authentication/OrchardAuthenticationProvider.d.ts.map +1 -0
  12. package/dist/Authentication/OrchardAuthenticationProvider.js +30 -0
  13. package/dist/Authentication/OrchardAuthenticationProvider.js.map +1 -0
  14. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts +23 -0
  15. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts.map +1 -0
  16. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js +60 -0
  17. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js.map +1 -0
  18. package/dist/Bin.d.ts +6 -0
  19. package/dist/Bin.d.ts.map +1 -0
  20. package/dist/Bin.js +7 -0
  21. package/dist/Bin.js.map +1 -0
  22. package/dist/Cli.d.ts +2 -0
  23. package/dist/Cli.d.ts.map +1 -0
  24. package/dist/Cli.js +95 -0
  25. package/dist/Cli.js.map +1 -0
  26. package/dist/CliSettings.d.ts +14 -0
  27. package/dist/CliSettings.d.ts.map +1 -0
  28. package/dist/CliSettings.js +76 -0
  29. package/dist/CliSettings.js.map +1 -0
  30. package/dist/CliUtils.d.ts +92 -0
  31. package/dist/CliUtils.d.ts.map +1 -0
  32. package/dist/CliUtils.js +218 -0
  33. package/dist/CliUtils.js.map +1 -0
  34. package/dist/Constants/CliConstants.d.ts +6 -0
  35. package/dist/Constants/CliConstants.d.ts.map +1 -0
  36. package/dist/Constants/CliConstants.js +6 -0
  37. package/dist/Constants/CliConstants.js.map +1 -0
  38. package/dist/Constants/CommandRegistry.d.ts +23 -0
  39. package/dist/Constants/CommandRegistry.d.ts.map +1 -0
  40. package/dist/Constants/CommandRegistry.js +197 -0
  41. package/dist/Constants/CommandRegistry.js.map +1 -0
  42. package/dist/Constants/HelpStrings.d.ts +329 -0
  43. package/dist/Constants/HelpStrings.d.ts.map +1 -0
  44. package/dist/Constants/HelpStrings.js +451 -0
  45. package/dist/Constants/HelpStrings.js.map +1 -0
  46. package/dist/Constants.d.ts +10 -0
  47. package/dist/Constants.d.ts.map +1 -0
  48. package/dist/Constants.js +18 -0
  49. package/dist/Constants.js.map +1 -0
  50. package/dist/Errors/CliError.d.ts +5 -0
  51. package/dist/Errors/CliError.d.ts.map +1 -0
  52. package/dist/Errors/CliError.js +7 -0
  53. package/dist/Errors/CliError.js.map +1 -0
  54. package/dist/FS/CliFs.d.ts +41 -0
  55. package/dist/FS/CliFs.d.ts.map +1 -0
  56. package/dist/FS/CliFs.js +136 -0
  57. package/dist/FS/CliFs.js.map +1 -0
  58. package/dist/HttpClient/CliHttpClient.d.ts +24 -0
  59. package/dist/HttpClient/CliHttpClient.d.ts.map +1 -0
  60. package/dist/HttpClient/CliHttpClient.js +122 -0
  61. package/dist/HttpClient/CliHttpClient.js.map +1 -0
  62. package/dist/HttpClient/OrchardProxy.d.ts +11 -0
  63. package/dist/HttpClient/OrchardProxy.d.ts.map +1 -0
  64. package/dist/HttpClient/OrchardProxy.js +25 -0
  65. package/dist/HttpClient/OrchardProxy.js.map +1 -0
  66. package/dist/HttpClient/Proxy.d.ts +7 -0
  67. package/dist/HttpClient/Proxy.d.ts.map +1 -0
  68. package/dist/HttpClient/Proxy.js +5 -0
  69. package/dist/HttpClient/Proxy.js.map +1 -0
  70. package/dist/Logger/CliLogger.d.ts +35 -0
  71. package/dist/Logger/CliLogger.d.ts.map +1 -0
  72. package/dist/Logger/CliLogger.js +237 -0
  73. package/dist/Logger/CliLogger.js.map +1 -0
  74. package/dist/Logger/ConsoleWriter.d.ts +15 -0
  75. package/dist/Logger/ConsoleWriter.d.ts.map +1 -0
  76. package/dist/Logger/ConsoleWriter.js +45 -0
  77. package/dist/Logger/ConsoleWriter.js.map +1 -0
  78. package/dist/Logger/Constants.d.ts +6 -0
  79. package/dist/Logger/Constants.d.ts.map +1 -0
  80. package/dist/Logger/Constants.js +15 -0
  81. package/dist/Logger/Constants.js.map +1 -0
  82. package/dist/Logger/LoggerSettings.d.ts +19 -0
  83. package/dist/Logger/LoggerSettings.d.ts.map +1 -0
  84. package/dist/Logger/LoggerSettings.js +114 -0
  85. package/dist/Logger/LoggerSettings.js.map +1 -0
  86. package/dist/Logger/OneDSWriter.d.ts +22 -0
  87. package/dist/Logger/OneDSWriter.d.ts.map +1 -0
  88. package/dist/Logger/OneDSWriter.js +129 -0
  89. package/dist/Logger/OneDSWriter.js.map +1 -0
  90. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts +5 -0
  91. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts.map +1 -0
  92. package/dist/Logger/Scrubber/ScrubCustomDimensions.js +46 -0
  93. package/dist/Logger/Scrubber/ScrubCustomDimensions.js.map +1 -0
  94. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts +27 -0
  95. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts.map +1 -0
  96. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js +168 -0
  97. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js.map +1 -0
  98. package/dist/Logger/Scrubber/ScrubUtils.d.ts +8 -0
  99. package/dist/Logger/Scrubber/ScrubUtils.d.ts.map +1 -0
  100. package/dist/Logger/Scrubber/ScrubUtils.js +34 -0
  101. package/dist/Logger/Scrubber/ScrubUtils.js.map +1 -0
  102. package/dist/Types/Argument.types.d.ts +27 -0
  103. package/dist/Types/Argument.types.d.ts.map +1 -0
  104. package/dist/Types/Argument.types.js +5 -0
  105. package/dist/Types/Argument.types.js.map +1 -0
  106. package/dist/Types/Cli.types.d.ts +32 -0
  107. package/dist/Types/Cli.types.d.ts.map +1 -0
  108. package/dist/Types/Cli.types.js +5 -0
  109. package/dist/Types/Cli.types.js.map +1 -0
  110. package/dist/Types/Command.types.d.ts +52 -0
  111. package/dist/Types/Command.types.d.ts.map +1 -0
  112. package/dist/Types/Command.types.js +8 -0
  113. package/dist/Types/Command.types.js.map +1 -0
  114. package/dist/Types/Datasource.types.d.ts +43 -0
  115. package/dist/Types/Datasource.types.d.ts.map +1 -0
  116. package/dist/Types/Datasource.types.js +5 -0
  117. package/dist/Types/Datasource.types.js.map +1 -0
  118. package/dist/Types/LoggerTypes.types.d.ts +17 -0
  119. package/dist/Types/LoggerTypes.types.d.ts.map +1 -0
  120. package/dist/Types/LoggerTypes.types.js +5 -0
  121. package/dist/Types/LoggerTypes.types.js.map +1 -0
  122. package/dist/Utils/BuildVerbDescriptionTable.d.ts +19 -0
  123. package/dist/Utils/BuildVerbDescriptionTable.d.ts.map +1 -0
  124. package/dist/Utils/BuildVerbDescriptionTable.js +87 -0
  125. package/dist/Utils/BuildVerbDescriptionTable.js.map +1 -0
  126. package/dist/Utils/ConsoleOutput.d.ts +80 -0
  127. package/dist/Utils/ConsoleOutput.d.ts.map +1 -0
  128. package/dist/Utils/ConsoleOutput.js +151 -0
  129. package/dist/Utils/ConsoleOutput.js.map +1 -0
  130. package/dist/Utils/DetectPackageManager.d.ts +9 -0
  131. package/dist/Utils/DetectPackageManager.d.ts.map +1 -0
  132. package/dist/Utils/DetectPackageManager.js +24 -0
  133. package/dist/Utils/DetectPackageManager.js.map +1 -0
  134. package/dist/Utils/EnhanceNetworkError.d.ts +14 -0
  135. package/dist/Utils/EnhanceNetworkError.d.ts.map +1 -0
  136. package/dist/Utils/EnhanceNetworkError.js +59 -0
  137. package/dist/Utils/EnhanceNetworkError.js.map +1 -0
  138. package/dist/Utils/EnvVars.d.ts +17 -0
  139. package/dist/Utils/EnvVars.d.ts.map +1 -0
  140. package/dist/Utils/EnvVars.js +38 -0
  141. package/dist/Utils/EnvVars.js.map +1 -0
  142. package/dist/Utils/GitCredentialConfig.d.ts +12 -0
  143. package/dist/Utils/GitCredentialConfig.d.ts.map +1 -0
  144. package/dist/Utils/GitCredentialConfig.js +32 -0
  145. package/dist/Utils/GitCredentialConfig.js.map +1 -0
  146. package/dist/Utils/GitUtils.d.ts +22 -0
  147. package/dist/Utils/GitUtils.d.ts.map +1 -0
  148. package/dist/Utils/GitUtils.js +35 -0
  149. package/dist/Utils/GitUtils.js.map +1 -0
  150. package/dist/Utils/Paging.d.ts +23 -0
  151. package/dist/Utils/Paging.d.ts.map +1 -0
  152. package/dist/Utils/Paging.js +67 -0
  153. package/dist/Utils/Paging.js.map +1 -0
  154. package/dist/Utils/ReadPackageJson.d.ts +9 -0
  155. package/dist/Utils/ReadPackageJson.d.ts.map +1 -0
  156. package/dist/Utils/ReadPackageJson.js +13 -0
  157. package/dist/Utils/ReadPackageJson.js.map +1 -0
  158. package/dist/Utils/ResolveCommand.d.ts +26 -0
  159. package/dist/Utils/ResolveCommand.d.ts.map +1 -0
  160. package/dist/Utils/ResolveCommand.js +62 -0
  161. package/dist/Utils/ResolveCommand.js.map +1 -0
  162. package/dist/Utils/RunCommand.d.ts +13 -0
  163. package/dist/Utils/RunCommand.d.ts.map +1 -0
  164. package/dist/Utils/RunCommand.js +35 -0
  165. package/dist/Utils/RunCommand.js.map +1 -0
  166. package/dist/Utils/Spinner.d.ts +15 -0
  167. package/dist/Utils/Spinner.d.ts.map +1 -0
  168. package/dist/Utils/Spinner.js +71 -0
  169. package/dist/Utils/Spinner.js.map +1 -0
  170. package/dist/Utils/zipBuildArtifact.d.ts +35 -0
  171. package/dist/Utils/zipBuildArtifact.d.ts.map +1 -0
  172. package/dist/Utils/zipBuildArtifact.js +100 -0
  173. package/dist/Utils/zipBuildArtifact.js.map +1 -0
  174. package/dist/Verbs/AddAction.d.ts +6 -0
  175. package/dist/Verbs/AddAction.d.ts.map +1 -0
  176. package/dist/Verbs/AddAction.js +87 -0
  177. package/dist/Verbs/AddAction.js.map +1 -0
  178. package/dist/Verbs/AddDataSource.d.ts +19 -0
  179. package/dist/Verbs/AddDataSource.d.ts.map +1 -0
  180. package/dist/Verbs/AddDataSource.js +174 -0
  181. package/dist/Verbs/AddDataSource.js.map +1 -0
  182. package/dist/Verbs/AddFlow.d.ts +12 -0
  183. package/dist/Verbs/AddFlow.d.ts.map +1 -0
  184. package/dist/Verbs/AddFlow.js +67 -0
  185. package/dist/Verbs/AddFlow.js.map +1 -0
  186. package/dist/Verbs/AddTable.d.ts +6 -0
  187. package/dist/Verbs/AddTable.d.ts.map +1 -0
  188. package/dist/Verbs/AddTable.js +163 -0
  189. package/dist/Verbs/AddTable.js.map +1 -0
  190. package/dist/Verbs/AuthStatus.d.ts +6 -0
  191. package/dist/Verbs/AuthStatus.d.ts.map +1 -0
  192. package/dist/Verbs/AuthStatus.js +18 -0
  193. package/dist/Verbs/AuthStatus.js.map +1 -0
  194. package/dist/Verbs/BuildMaafApp.d.ts +6 -0
  195. package/dist/Verbs/BuildMaafApp.d.ts.map +1 -0
  196. package/dist/Verbs/BuildMaafApp.js +97 -0
  197. package/dist/Verbs/BuildMaafApp.js.map +1 -0
  198. package/dist/Verbs/ConnectorHelpers.d.ts +37 -0
  199. package/dist/Verbs/ConnectorHelpers.d.ts.map +1 -0
  200. package/dist/Verbs/ConnectorHelpers.js +116 -0
  201. package/dist/Verbs/ConnectorHelpers.js.map +1 -0
  202. package/dist/Verbs/CreateMaafApp.d.ts +25 -0
  203. package/dist/Verbs/CreateMaafApp.d.ts.map +1 -0
  204. package/dist/Verbs/CreateMaafApp.js +565 -0
  205. package/dist/Verbs/CreateMaafApp.js.map +1 -0
  206. package/dist/Verbs/DeleteDataSource.d.ts +6 -0
  207. package/dist/Verbs/DeleteDataSource.d.ts.map +1 -0
  208. package/dist/Verbs/DeleteDataSource.js +106 -0
  209. package/dist/Verbs/DeleteDataSource.js.map +1 -0
  210. package/dist/Verbs/DeleteMaafApp.d.ts +23 -0
  211. package/dist/Verbs/DeleteMaafApp.d.ts.map +1 -0
  212. package/dist/Verbs/DeleteMaafApp.js +99 -0
  213. package/dist/Verbs/DeleteMaafApp.js.map +1 -0
  214. package/dist/Verbs/DeployMaafApp.d.ts +6 -0
  215. package/dist/Verbs/DeployMaafApp.d.ts.map +1 -0
  216. package/dist/Verbs/DeployMaafApp.js +96 -0
  217. package/dist/Verbs/DeployMaafApp.js.map +1 -0
  218. package/dist/Verbs/Dev.d.ts +6 -0
  219. package/dist/Verbs/Dev.d.ts.map +1 -0
  220. package/dist/Verbs/Dev.js +214 -0
  221. package/dist/Verbs/Dev.js.map +1 -0
  222. package/dist/Verbs/FindDataverseApi.d.ts +12 -0
  223. package/dist/Verbs/FindDataverseApi.d.ts.map +1 -0
  224. package/dist/Verbs/FindDataverseApi.js +101 -0
  225. package/dist/Verbs/FindDataverseApi.js.map +1 -0
  226. package/dist/Verbs/GetMaafApp.d.ts +6 -0
  227. package/dist/Verbs/GetMaafApp.d.ts.map +1 -0
  228. package/dist/Verbs/GetMaafApp.js +60 -0
  229. package/dist/Verbs/GetMaafApp.js.map +1 -0
  230. package/dist/Verbs/GetMaafBuildStatus.d.ts +6 -0
  231. package/dist/Verbs/GetMaafBuildStatus.d.ts.map +1 -0
  232. package/dist/Verbs/GetMaafBuildStatus.js +68 -0
  233. package/dist/Verbs/GetMaafBuildStatus.js.map +1 -0
  234. package/dist/Verbs/GetSettings.d.ts +12 -0
  235. package/dist/Verbs/GetSettings.d.ts.map +1 -0
  236. package/dist/Verbs/GetSettings.js +48 -0
  237. package/dist/Verbs/GetSettings.js.map +1 -0
  238. package/dist/Verbs/Init.d.ts +6 -0
  239. package/dist/Verbs/Init.d.ts.map +1 -0
  240. package/dist/Verbs/Init.js +172 -0
  241. package/dist/Verbs/Init.js.map +1 -0
  242. package/dist/Verbs/ListConnectionReferences.d.ts +6 -0
  243. package/dist/Verbs/ListConnectionReferences.d.ts.map +1 -0
  244. package/dist/Verbs/ListConnectionReferences.js +70 -0
  245. package/dist/Verbs/ListConnectionReferences.js.map +1 -0
  246. package/dist/Verbs/ListConnectorActions.d.ts +6 -0
  247. package/dist/Verbs/ListConnectorActions.d.ts.map +1 -0
  248. package/dist/Verbs/ListConnectorActions.js +79 -0
  249. package/dist/Verbs/ListConnectorActions.js.map +1 -0
  250. package/dist/Verbs/ListConnectors.d.ts +6 -0
  251. package/dist/Verbs/ListConnectors.d.ts.map +1 -0
  252. package/dist/Verbs/ListConnectors.js +66 -0
  253. package/dist/Verbs/ListConnectors.js.map +1 -0
  254. package/dist/Verbs/ListDatasets.d.ts +6 -0
  255. package/dist/Verbs/ListDatasets.d.ts.map +1 -0
  256. package/dist/Verbs/ListDatasets.js +83 -0
  257. package/dist/Verbs/ListDatasets.js.map +1 -0
  258. package/dist/Verbs/ListEnvironmentVariables.d.ts +14 -0
  259. package/dist/Verbs/ListEnvironmentVariables.d.ts.map +1 -0
  260. package/dist/Verbs/ListEnvironmentVariables.js +66 -0
  261. package/dist/Verbs/ListEnvironmentVariables.js.map +1 -0
  262. package/dist/Verbs/ListFlows.d.ts +13 -0
  263. package/dist/Verbs/ListFlows.d.ts.map +1 -0
  264. package/dist/Verbs/ListFlows.js +88 -0
  265. package/dist/Verbs/ListFlows.js.map +1 -0
  266. package/dist/Verbs/ListMaafApps.d.ts +71 -0
  267. package/dist/Verbs/ListMaafApps.d.ts.map +1 -0
  268. package/dist/Verbs/ListMaafApps.js +168 -0
  269. package/dist/Verbs/ListMaafApps.js.map +1 -0
  270. package/dist/Verbs/ListSqlStoredProcedures.d.ts +6 -0
  271. package/dist/Verbs/ListSqlStoredProcedures.d.ts.map +1 -0
  272. package/dist/Verbs/ListSqlStoredProcedures.js +84 -0
  273. package/dist/Verbs/ListSqlStoredProcedures.js.map +1 -0
  274. package/dist/Verbs/ListTables.d.ts +6 -0
  275. package/dist/Verbs/ListTables.d.ts.map +1 -0
  276. package/dist/Verbs/ListTables.js +95 -0
  277. package/dist/Verbs/ListTables.js.map +1 -0
  278. package/dist/Verbs/Login.d.ts +6 -0
  279. package/dist/Verbs/Login.d.ts.map +1 -0
  280. package/dist/Verbs/Login.js +28 -0
  281. package/dist/Verbs/Login.js.map +1 -0
  282. package/dist/Verbs/Logout.d.ts +6 -0
  283. package/dist/Verbs/Logout.d.ts.map +1 -0
  284. package/dist/Verbs/Logout.js +28 -0
  285. package/dist/Verbs/Logout.js.map +1 -0
  286. package/dist/Verbs/MaafAppPermissions.d.ts +23 -0
  287. package/dist/Verbs/MaafAppPermissions.d.ts.map +1 -0
  288. package/dist/Verbs/MaafAppPermissions.js +278 -0
  289. package/dist/Verbs/MaafAppPermissions.js.map +1 -0
  290. package/dist/Verbs/Pack.d.ts +38 -0
  291. package/dist/Verbs/Pack.d.ts.map +1 -0
  292. package/dist/Verbs/Pack.js +106 -0
  293. package/dist/Verbs/Pack.js.map +1 -0
  294. package/dist/Verbs/PushMaafApp.d.ts +6 -0
  295. package/dist/Verbs/PushMaafApp.d.ts.map +1 -0
  296. package/dist/Verbs/PushMaafApp.js +145 -0
  297. package/dist/Verbs/PushMaafApp.js.map +1 -0
  298. package/dist/Verbs/RefreshDataSource.d.ts +6 -0
  299. package/dist/Verbs/RefreshDataSource.d.ts.map +1 -0
  300. package/dist/Verbs/RefreshDataSource.js +72 -0
  301. package/dist/Verbs/RefreshDataSource.js.map +1 -0
  302. package/dist/Verbs/RemoveFlow.d.ts +12 -0
  303. package/dist/Verbs/RemoveFlow.d.ts.map +1 -0
  304. package/dist/Verbs/RemoveFlow.js +99 -0
  305. package/dist/Verbs/RemoveFlow.js.map +1 -0
  306. package/dist/Verbs/SetSetting.d.ts +12 -0
  307. package/dist/Verbs/SetSetting.d.ts.map +1 -0
  308. package/dist/Verbs/SetSetting.js +142 -0
  309. package/dist/Verbs/SetSetting.js.map +1 -0
  310. package/dist/Verbs/ShareMaafApp.d.ts +12 -0
  311. package/dist/Verbs/ShareMaafApp.d.ts.map +1 -0
  312. package/dist/Verbs/ShareMaafApp.js +14 -0
  313. package/dist/Verbs/ShareMaafApp.js.map +1 -0
  314. package/dist/Verbs/ShowMaafApp.d.ts +94 -0
  315. package/dist/Verbs/ShowMaafApp.d.ts.map +1 -0
  316. package/dist/Verbs/ShowMaafApp.js +216 -0
  317. package/dist/Verbs/ShowMaafApp.js.map +1 -0
  318. package/dist/Verbs/TelemetrySettings.d.ts +8 -0
  319. package/dist/Verbs/TelemetrySettings.d.ts.map +1 -0
  320. package/dist/Verbs/TelemetrySettings.js +104 -0
  321. package/dist/Verbs/TelemetrySettings.js.map +1 -0
  322. package/dist/Verbs/UnshareMaafApp.d.ts +12 -0
  323. package/dist/Verbs/UnshareMaafApp.d.ts.map +1 -0
  324. package/dist/Verbs/UnshareMaafApp.js +14 -0
  325. package/dist/Verbs/UnshareMaafApp.js.map +1 -0
  326. package/dist/Verbs/VerbConstants.d.ts +433 -0
  327. package/dist/Verbs/VerbConstants.d.ts.map +1 -0
  328. package/dist/Verbs/VerbConstants.js +403 -0
  329. package/dist/Verbs/VerbConstants.js.map +1 -0
  330. package/dist/Verbs/index.d.ts +40 -0
  331. package/dist/Verbs/index.d.ts.map +1 -0
  332. package/dist/Verbs/index.js +40 -0
  333. package/dist/Verbs/index.js.map +1 -0
  334. package/package.json +43 -3
@@ -0,0 +1,565 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import { createAsync, getPlayerServiceConfig, updateEnvironmentName, writeRepoConfig, } from '@microsoft/apps-actions';
5
+ import { AppConfigFileName } from '@microsoft/apps-common/config';
6
+ import { getUserRoutingEnvironmentAsync, ManagedGovernanceError, ManagedGovernanceTimeoutError, pollRoutingEnvironmentAsync, } from '@microsoft/apps-common/services';
7
+ import { execFileSync } from 'child_process';
8
+ import * as fs from 'fs';
9
+ import { downloadTemplate } from 'giget';
10
+ import * as path from 'path';
11
+ import { getCliLogger } from '../CliSettings.js';
12
+ import { createDefaultStringOption } from '../CliUtils.js';
13
+ import { CLI_CLIENT_ID } from '../Constants.js';
14
+ import { CLI_BINARY_NAME } from '../Constants/CliConstants.js';
15
+ import { HelpStrings } from '../Constants/HelpStrings.js';
16
+ import { AppError, ConfigurationError, NotFoundError, UsageError } from '../Errors/CliError.js';
17
+ import { printInfo, printJsonSuccess, printSuccess, printWarning } from '../Utils/ConsoleOutput.js';
18
+ import { buildGcmConfig } from '../Utils/GitCredentialConfig.js';
19
+ import { CreateMaafAppArguments } from './VerbConstants.js';
20
+ const DEFAULT_TEMPLATE = 'github:microsoft/PowerAppsCodeApps/templates/vite';
21
+ export async function createMaafAppAsync(argumentProvider) {
22
+ createOptionSchema(argumentProvider);
23
+ await argumentProvider.runVerb();
24
+ const tenantId = await argumentProvider.getTenantIdAsync();
25
+ if (!tenantId) {
26
+ throw new UsageError('Unable to determine tenant ID. Ensure you are logged in.');
27
+ }
28
+ const logger = getCliLogger();
29
+ const httpClient = argumentProvider.getHttpClient();
30
+ const { region } = getPlayerServiceConfig();
31
+ const displayName = await argumentProvider.getOption('displayName');
32
+ if (!displayName) {
33
+ throw new UsageError('Argument displayName is required. Use --display-name or -n to specify it.');
34
+ }
35
+ // The positional arg (or cwd) is both the git repo root and the app dir.
36
+ const appDir = argumentProvider.getPositionalArg(0) ?? process.cwd();
37
+ const force = (await argumentProvider.getOption('force', /* ignorePrompt */ true)) ?? false;
38
+ const template = await argumentProvider.getOption('template', /* ignorePrompt */ true);
39
+ // CLI surface is --repo (Commander maps the kebab name to the 'repo' camelCase key).
40
+ // The local variable keeps the older `remoteUrl` name on purpose: the wire contract to
41
+ // RP and the apps-actions param are still `remoteUrl` / `externalRepo.remoteUrl`, so
42
+ // renaming end-to-end is deferred until those callers move.
43
+ const remoteUrl = await argumentProvider.getOption('repo',
44
+ /* ignorePrompt */ true);
45
+ // --json emits a single machine-parseable envelope on stdout, so every
46
+ // informational `printInfo` below is gated behind `!jsonMode` to keep
47
+ // stdout free of prose ahead of the envelope. `printError` writes to
48
+ // stderr and is unaffected.
49
+ const jsonMode = argumentProvider.isJsonMode();
50
+ // Identity confirmation: print the tenant + region we're targeting before
51
+ // anything else — preflight, routing, createAsync — so a user with multiple
52
+ // accounts signed in has the longest possible window to CTRL-C before any
53
+ // local check runs or server call fires. Environment id isn't known yet
54
+ // (routing is what resolves it); included in the success line at the end.
55
+ // Wording is intentionally tentative ("About to create…") so a preflight
56
+ // failure on the next line doesn't read as contradicting a "Creating…" line.
57
+ if (!jsonMode) {
58
+ printInfo(`About to create app '${displayName}' in tenant ${tenantId} (region ${region}).`);
59
+ }
60
+ // ─── Preflight ────────────────────────────────────────────────────────────
61
+ // Run all local-only checks before any server call. Once createAsync
62
+ // succeeds the user has a MAAF app + GRS repo on the server; a later
63
+ // local-setup failure leaves them orphaned with no clean recovery path.
64
+ // Anything we can validate without hitting the server belongs here.
65
+ // Skipped entirely when --repo is set: the user manages their own git repo
66
+ // and we won't run initLocalRepo / downloadTemplate / writeRepoConfig.
67
+ // ──────────────────────────────────────────────────────────────────────────
68
+ if (!remoteUrl) {
69
+ if (!jsonMode) {
70
+ printInfo('Running preflight checks...');
71
+ }
72
+ ensureGitInstalled();
73
+ ensureTemplateSourceValid(template);
74
+ ensureTargetDirectoryWritable(appDir);
75
+ ensureTargetDirectoryEmpty(appDir, force);
76
+ }
77
+ // ─── End preflight ────────────────────────────────────────────────────────
78
+ // The debug env-var override (MS_CLI_MAAF_DEBUG_ENVIRONMENT_ID) is honored by ArgumentProvider
79
+ // and surfaced via getEnvironmentId(). When set, skip the routing API call entirely.
80
+ // For the supported user flow, getEnvironmentId() returns undefined here and routing fires.
81
+ const preResolvedEnvironmentId = argumentProvider.getEnvironmentId();
82
+ // Fire off PDE routing in parallel with the remaining option prompts. The result is awaited
83
+ // immediately before createAsync, so prompt latency is hidden behind the network call.
84
+ // Skipped entirely when the debug override pre-resolved the env id.
85
+ const routingEnvPromise = preResolvedEnvironmentId
86
+ ? undefined
87
+ : getUserRoutingEnvironmentAsync(httpClient, tenantId, CLI_CLIENT_ID, { provisionDataverse: false }, region, logger);
88
+ // If a later prompt throws before we await the promise, the rejection would otherwise be
89
+ // unhandled. Log and swallow here; `await routingEnvPromise` below still surfaces the error.
90
+ routingEnvPromise?.catch((error) => {
91
+ logger.trackErrorEvent('CreateMaafApp.RoutingEnvironmentBackgroundFailure', {
92
+ error: error instanceof Error ? error.message : String(error),
93
+ });
94
+ });
95
+ const description = await argumentProvider.getOption('description',
96
+ /* ignorePrompt */ true);
97
+ const repositoryId = await argumentProvider.getOption('repositoryId',
98
+ /* ignorePrompt */ true);
99
+ const buildPath = await argumentProvider.getOption('buildPath', /* ignorePrompt */ true);
100
+ const buildCommand = await argumentProvider.getOption('buildCommand',
101
+ /* ignorePrompt */ true);
102
+ // Explicit branch keeps the non-null read of routingEnvPromise reachable only when
103
+ // preResolvedEnvironmentId is undefined — i.e. exactly when routingEnvPromise is defined.
104
+ const environmentId = preResolvedEnvironmentId !== undefined
105
+ ? preResolvedEnvironmentId
106
+ : await resolveRoutingEnvironmentIdAsync(routingEnvPromise, httpClient, logger);
107
+ updateEnvironmentName(environmentId);
108
+ // Re-check emptiness right before the server call. The same check ran in
109
+ // preflight, but the routing-env resolution between then and now is async
110
+ // and may take seconds — long enough for the user (or another tool) to
111
+ // drop a file into appDir. Repeating the check here keeps the TOCTOU
112
+ // window between "directory is empty" and "createAsync succeeded" as small
113
+ // as possible without ever orphaning a server-side app. Skipped when
114
+ // --repo is set: the local scaffolding path is bypassed entirely.
115
+ if (!remoteUrl) {
116
+ ensureTargetDirectoryEmpty(appDir, force);
117
+ }
118
+ const { app, cloneUrl } = await createAsync({
119
+ tenantId,
120
+ environmentId,
121
+ logger,
122
+ actionsParams: { displayName, description, repositoryId, remoteUrl },
123
+ });
124
+ // The server is expected to return an auto-provisioned GRS clone URL on every
125
+ // path — both the platform-managed flow (no --repo) and the --repo flow,
126
+ // where GRS still backs build artifact storage. Its absence is a server-side
127
+ // bug, so handle it once here before either branch uses `cloneUrl`. Without
128
+ // this hoisted check, the --repo branch would silently emit
129
+ // `gitRemoteUrl: undefined` in the JSON envelope (and `(clone URL: undefined)`
130
+ // in pretty output) when the platform issue fires.
131
+ if (!cloneUrl) {
132
+ const recoveryHint = buildOrphanedAppRecoveryHint(app.id, app.environmentId);
133
+ if (remoteUrl) {
134
+ throw new AppError(`App '${app.displayName}' was created and bound to ${remoteUrl}, but the ` +
135
+ `platform-managed git repository for build artifact storage was not provisioned. ` +
136
+ `This is a platform-side issue; please report it.\n` +
137
+ recoveryHint);
138
+ }
139
+ throw new AppError(`App '${app.displayName}' was created on the server, but creating a git repository failed. ` +
140
+ `This is a platform-side issue; please report it. ` +
141
+ `In the meantime, the partial app needs to be cleaned up.\n` +
142
+ recoveryHint);
143
+ }
144
+ if (remoteUrl) {
145
+ // External GitHub Enterprise binding (P0 surface): the user manages their own clone,
146
+ // so skip the local scaffolding flow entirely. RP has already persisted the
147
+ // externalRepo binding on the app entity.
148
+ // Clone-and-scaffold of the GHE repo lands in P1 (separate PR).
149
+ //
150
+ // Note on `gitRemoteUrl`: `cloneUrl` here is the platform-managed (GRS) clone URL the
151
+ // RP auto-provisions when `--repository-id` is absent — `--repo none` (P2) is the
152
+ // future flag for opting out. For P0 we keep the auto-provision but make it visible
153
+ // by surfacing the GRS clone URL alongside the user-supplied external URL.
154
+ if (argumentProvider.getPositionalArg(0) && !jsonMode) {
155
+ printInfo('Note: the [directory] argument is ignored when --repo is set in this release; local clone-and-scaffold lands in a follow-up.');
156
+ }
157
+ if (jsonMode) {
158
+ printJsonSuccess({
159
+ appId: app.id,
160
+ externalRepoUrl: remoteUrl,
161
+ // Same field name as the platform-managed path below so consumers parsing --json
162
+ // output don't need a separate field name across binding shapes.
163
+ gitRemoteUrl: cloneUrl,
164
+ });
165
+ }
166
+ else {
167
+ printSuccess(`Created app '${app.displayName}' bound to ${remoteUrl}. Clone the GitHub repo manually to begin development.`);
168
+ printInfo(`A platform-managed git repository was also provisioned for build artifact storage (clone URL: ${cloneUrl}). The 'no platform-managed repo' option ships under --repo none in a follow-up release.`);
169
+ }
170
+ return;
171
+ }
172
+ // Set up local git repository. Runs after the API calls succeed; if any step
173
+ // here fails the server app is already created and the recovery hint below
174
+ // tells the user how to clean it up.
175
+ try {
176
+ initLocalRepo({
177
+ directory: appDir,
178
+ gitUrl: cloneUrl,
179
+ loginAuthority: argumentProvider.getLoginAuthority(tenantId),
180
+ authResource: argumentProvider.getAuthResourceUrl(),
181
+ jsonMode,
182
+ });
183
+ // Overlay the template on top of origin/main so the template files show up
184
+ // as a normal commit on top of the remote head, keeping the first push a
185
+ // fast-forward (no --force or unrelated-histories merge required).
186
+ if (!jsonMode) {
187
+ printInfo(`Fetching template '${template}' into ${appDir}...`);
188
+ }
189
+ await downloadTemplate(template, { dir: appDir, force: true });
190
+ const config = {
191
+ appId: app.id,
192
+ appDisplayName: app.displayName,
193
+ description: app.description,
194
+ environmentId: app.environmentId,
195
+ repositoryId: app.repositoryId,
196
+ cloud: argumentProvider.getCloud(),
197
+ buildPath: buildPath ?? './dist',
198
+ buildCommand: buildCommand ?? 'npm run build',
199
+ };
200
+ await writeRepoConfig(path.join(appDir, AppConfigFileName), config);
201
+ }
202
+ catch (setupError) {
203
+ throw new AppError(`App '${app.displayName}' was created, but local setup failed: ${setupError instanceof Error ? setupError.message : String(setupError)}\n` + buildOrphanedAppRecoveryHint(app.id, app.environmentId));
204
+ }
205
+ if (jsonMode) {
206
+ // `appId` is the bare GUID returned by the server (`MaafAppDefinition.id`) and
207
+ // also written to ms.config.json — used by every subsequent CLI command
208
+ // (build, deploy, info, etc.).
209
+ printJsonSuccess({
210
+ appId: app.id,
211
+ gitRemoteUrl: cloneUrl,
212
+ appDir,
213
+ });
214
+ }
215
+ else {
216
+ printSuccess(`Created app '${app.displayName}' in ${appDir}.`);
217
+ }
218
+ }
219
+ async function resolveRoutingEnvironmentIdAsync(resultPromise, httpClient, logger) {
220
+ // Translate routing-service errors into a UsageError so the user sees an actionable message
221
+ // rather than the raw "ManagedGovernance request failed with status 403" implementation detail.
222
+ // NotFoundError throws inside the try also flow through `toRoutingUsageError`, which leaves
223
+ // non-ManagedGovernance errors unchanged.
224
+ try {
225
+ const result = await resultPromise;
226
+ if (result.status === 200) {
227
+ const name = result.data.environment?.name;
228
+ if (!name) {
229
+ throw new NotFoundError('Routing service returned 200 with no environment name.');
230
+ }
231
+ return name;
232
+ }
233
+ // 202: provisioning is in progress — poll until it completes.
234
+ // Non-2xx responses are already thrown as ManagedGovernanceError inside
235
+ // getUserRoutingEnvironmentAsync, so only 200/202 reach this code path.
236
+ const routingResponse = await pollRoutingEnvironmentAsync(httpClient, result.pollingUrl, result.authResource, logger);
237
+ if (!routingResponse.environment?.name) {
238
+ throw new NotFoundError('Routing service finished provisioning but returned no environment name.');
239
+ }
240
+ return routingResponse.environment.name;
241
+ }
242
+ catch (err) {
243
+ throw toRoutingUsageError(err);
244
+ }
245
+ }
246
+ function toRoutingUsageError(err) {
247
+ if (err instanceof ManagedGovernanceError) {
248
+ return new UsageError(`Could not provision a Developer environment for your tenant (status ${err.status}). ` +
249
+ 'Ensure your account has the required permissions to create a Developer environment.');
250
+ }
251
+ if (err instanceof ManagedGovernanceTimeoutError) {
252
+ return new UsageError('Timed out waiting for a Developer environment to provision. Try again.');
253
+ }
254
+ return err instanceof Error ? err : new Error(String(err));
255
+ }
256
+ export function initLocalRepo({ directory, gitUrl, loginAuthority, authResource, jsonMode = false, }) {
257
+ let gcmConfig;
258
+ try {
259
+ gcmConfig = buildGcmConfig({ gitUrl, loginAuthority, authResource });
260
+ }
261
+ catch (err) {
262
+ throw new ConfigurationError(`Git credential helper setup failed: ${err instanceof Error ? err.message : String(err)}`);
263
+ }
264
+ fs.mkdirSync(directory, { recursive: true });
265
+ execFileSync('git', ['init'], { cwd: directory, stdio: ['ignore', 'ignore', 'inherit'] });
266
+ // Write GCM config before fetching so the first network call is already authenticated.
267
+ for (const [key, value] of gcmConfig) {
268
+ execFileSync('git', ['config', '--local', key, value], {
269
+ cwd: directory,
270
+ stdio: ['ignore', 'ignore', 'inherit'],
271
+ });
272
+ }
273
+ // `git remote add` fails if origin already exists. Pipe stderr so we can inspect the
274
+ // message and only fall back to `set-url` for that specific case — other failures
275
+ // (permissions, corrupt repo) must propagate rather than produce a misleading set-url error.
276
+ try {
277
+ execFileSync('git', ['remote', 'add', 'origin', gitUrl], {
278
+ cwd: directory,
279
+ stdio: ['ignore', 'ignore', 'pipe'],
280
+ });
281
+ }
282
+ catch (err) {
283
+ const stderr = err.stderr?.toString() ?? '';
284
+ if (!stderr.includes('already exists')) {
285
+ process.stderr.write(stderr);
286
+ throw err;
287
+ }
288
+ execFileSync('git', ['remote', 'set-url', 'origin', gitUrl], {
289
+ cwd: directory,
290
+ stdio: ['ignore', 'ignore', 'inherit'],
291
+ });
292
+ }
293
+ // The first `git fetch` triggers GCM's OAuth flow if the user has no cached
294
+ // credentials, which can pop a browser without warning. Tell the user up
295
+ // front so they don't see the browser as a surprise (and know which host /
296
+ // account to authenticate against). Skipped under `--json` so the prose
297
+ // doesn't end up interleaved with the JSON envelope on stdout.
298
+ if (!jsonMode) {
299
+ printInfo(`Authenticating to ${new URL(gitUrl).host} for the initial git fetch. ` +
300
+ 'A browser window may open. Sign in with the account associated with this tenant.');
301
+ }
302
+ execFileSync('git', ['fetch', 'origin'], {
303
+ cwd: directory,
304
+ stdio: ['ignore', 'ignore', 'inherit'],
305
+ });
306
+ // Probe for origin/main locally (no network needed after fetch).
307
+ // A broad catch here is safe: the only failure mode is "ref doesn't exist".
308
+ let hasMain = false;
309
+ try {
310
+ execFileSync('git', ['rev-parse', '--verify', 'origin/main'], {
311
+ cwd: directory,
312
+ stdio: ['ignore', 'ignore', 'ignore'],
313
+ });
314
+ hasMain = true;
315
+ }
316
+ catch {
317
+ // Empty GRS repo — origin/main not yet present.
318
+ }
319
+ if (hasMain) {
320
+ execFileSync('git', ['checkout', '-b', 'main', 'origin/main'], {
321
+ cwd: directory,
322
+ stdio: ['ignore', 'ignore', 'inherit'],
323
+ });
324
+ }
325
+ }
326
+ // ─── Recovery hint for post-create failures ─────────────────────────────────
327
+ // Once createAsync returns, the MAAF app + GRS repo exist on the server; any
328
+ // later failure (no gitUrl, initLocalRepo, downloadTemplate, writeRepoConfig)
329
+ // strands them. Append this hint to the error message so the user can copy a
330
+ // working `app delete --force` line straight from their terminal and retry.
331
+ // ────────────────────────────────────────────────────────────────────────────
332
+ export function buildOrphanedAppRecoveryHint(serverAppId, environmentId) {
333
+ return (`The server app is still in environment ${environmentId} (id: ${serverAppId}).\n` +
334
+ `If you want to clean it up before retrying, run the following command:\n` +
335
+ ` npx ${CLI_BINARY_NAME} app delete --app ${serverAppId} --environment-id ${environmentId} --force`);
336
+ }
337
+ // ─── Preflight helpers ──────────────────────────────────────────────────────
338
+ // All checks below run before any server call so a local misconfiguration
339
+ // (missing git, bad template source, unwritable directory) fails fast and
340
+ // never leaves an orphaned MAAF app + GRS repo on the server.
341
+ // ────────────────────────────────────────────────────────────────────────────
342
+ export function ensureGitInstalled() {
343
+ try {
344
+ execFileSync('git', ['--version'], { stdio: ['ignore', 'ignore', 'ignore'] });
345
+ }
346
+ catch {
347
+ throw new ConfigurationError("'git' is required but was not found on PATH. Install git from https://git-scm.com/ and retry.");
348
+ }
349
+ }
350
+ // Known giget provider prefixes. Used only for a *soft* "did you mean?" warning —
351
+ // not a hard reject, so adding a new giget provider doesn't silently fail
352
+ // preflight here. Sourced from giget's docs (github, gitlab, bitbucket, sourcehut,
353
+ // http, https) as of the version pinned in package.json. Update opportunistically
354
+ // when bumping giget; a stale entry only suppresses one warning, never blocks
355
+ // a valid template.
356
+ const KNOWN_GIGET_PROVIDERS = new Set([
357
+ 'github',
358
+ 'gitlab',
359
+ 'bitbucket',
360
+ 'sourcehut',
361
+ 'http',
362
+ 'https',
363
+ ]);
364
+ // Single-edit Damerau-Levenshtein distance, capped at 1: returns true iff `a`
365
+ // is one substitution, one insertion, one deletion, or one adjacent
366
+ // transposition away from `b`. Used to pick the closest known provider for a
367
+ // "did you mean?" hint without pulling in a dependency.
368
+ function isOneEditAway(a, b) {
369
+ if (a === b)
370
+ return false;
371
+ if (Math.abs(a.length - b.length) > 1)
372
+ return false;
373
+ if (a.length === b.length) {
374
+ let diff = 0;
375
+ let transposition = null;
376
+ for (let i = 0; i < a.length; i++) {
377
+ if (a[i] !== b[i]) {
378
+ diff++;
379
+ if (transposition === null)
380
+ transposition = i;
381
+ if (diff > 2)
382
+ return false;
383
+ }
384
+ }
385
+ if (diff <= 1)
386
+ return true;
387
+ if (diff === 2 && transposition !== null) {
388
+ // Adjacent swap: gihub vs github, swap positions transposition and transposition+1.
389
+ return a[transposition] === b[transposition + 1] && a[transposition + 1] === b[transposition];
390
+ }
391
+ return false;
392
+ }
393
+ // One insertion or deletion away. Walk both strings; allow one skip.
394
+ const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];
395
+ let i = 0;
396
+ let j = 0;
397
+ let skipped = false;
398
+ while (i < shorter.length && j < longer.length) {
399
+ if (shorter[i] === longer[j]) {
400
+ i++;
401
+ j++;
402
+ continue;
403
+ }
404
+ if (skipped)
405
+ return false;
406
+ skipped = true;
407
+ j++;
408
+ }
409
+ return true;
410
+ }
411
+ export function ensureTemplateSourceValid(source) {
412
+ // Hard validation: only enforce non-empty. Any further structural validation
413
+ // (provider name, URL shape, registry lookup) is giget's responsibility —
414
+ // duplicating its provider list locally goes stale silently when giget adds
415
+ // support for a new provider, turning a valid template into a misleading
416
+ // "unknown provider" error at preflight.
417
+ if (!source) {
418
+ throw new UsageError('Template source is empty. Use --template to specify one.');
419
+ }
420
+ // Soft validation: if the source looks like `<prefix>:<rest>` but the prefix
421
+ // is one edit away from a known giget provider (e.g. `gihub:` → `github:`),
422
+ // warn but proceed. giget will produce the authoritative error if the
423
+ // prefix is genuinely invalid; for the common typo case we surface the fix
424
+ // before the network round-trip. No hard-fail keeps this forward-compatible
425
+ // with new giget providers — a stale `KNOWN_GIGET_PROVIDERS` set only
426
+ // suppresses a warning, it never blocks a valid template.
427
+ const prefixMatch = /^([a-z][a-z0-9+.-]*):/i.exec(source);
428
+ if (!prefixMatch)
429
+ return;
430
+ const prefix = prefixMatch[1].toLowerCase();
431
+ if (KNOWN_GIGET_PROVIDERS.has(prefix))
432
+ return;
433
+ const suggestion = [...KNOWN_GIGET_PROVIDERS].find((known) => isOneEditAway(prefix, known));
434
+ if (suggestion) {
435
+ printWarning(`Template source '${source}' uses an unrecognized provider prefix '${prefix}:'. Did you mean '${suggestion}:'?`);
436
+ }
437
+ }
438
+ export function ensureTargetDirectoryEmpty(appDir, force) {
439
+ // Scaffolding into a non-empty directory would mix the template with the
440
+ // user's files, and initLocalRepo's `git remote set-url` fallback would
441
+ // silently replace an existing `origin` remote. --force opts out. Called
442
+ // twice: once in preflight (fail fast before any network) and once right
443
+ // before createAsync (catch a TOCTOU race where the dir gets populated
444
+ // during routing/option resolution).
445
+ if (force || !fs.existsSync(appDir))
446
+ return;
447
+ const entries = fs.readdirSync(appDir);
448
+ if (entries.length > 0) {
449
+ throw new UsageError(`'${appDir}' is not empty. Pass --force to scaffold into it anyway, or specify an empty directory as the first argument.`);
450
+ }
451
+ }
452
+ export function ensureTargetDirectoryWritable(appDir) {
453
+ // Probe write permission on the target dir (or its nearest existing
454
+ // ancestor, where mkdirSync will need to write). Catches read-only mounts
455
+ // and permission-denied locations before any server-side resource is
456
+ // created. The empty-dir check is intentionally NOT here — it runs inline
457
+ // just before initLocalRepo so the TOCTOU window between check and write
458
+ // stays as small as possible (a directory can become non-empty while the
459
+ // routing/createAsync calls are in flight).
460
+ //
461
+ // Best-effort caveat: `accessSync(W_OK)` is a syscall-level approximation,
462
+ // not a real write. On Windows in particular, NTFS ACL inheritance can grant
463
+ // W_OK on the ancestor while the actual CreateDirectory / CreateFile fails
464
+ // later (UAC virtualization, parent ACE applies but a deny ACE on the leaf
465
+ // does not). We accept that: catching every Windows ACL edge case requires
466
+ // a real mkdir+write+delete probe, which leaves debris on success and has
467
+ // its own TOCTOU. The recovery hint on post-create failures is the
468
+ // backstop when the probe is too optimistic.
469
+ let probe = appDir;
470
+ while (!fs.existsSync(probe)) {
471
+ const parent = path.dirname(probe);
472
+ if (parent === probe)
473
+ break;
474
+ probe = parent;
475
+ }
476
+ try {
477
+ fs.accessSync(probe, fs.constants.W_OK);
478
+ }
479
+ catch {
480
+ throw new ConfigurationError(`'${appDir}' is not writable. Choose a different directory or fix the permissions and retry.`);
481
+ }
482
+ }
483
+ function createOptionSchema(argumentProvider) {
484
+ argumentProvider.setDescription(HelpStrings.app.create.description);
485
+ argumentProvider.addExamples(HelpStrings.app.create.examples);
486
+ argumentProvider.consumePositionalArg('[directory]');
487
+ argumentProvider.addOptions([
488
+ createDefaultStringOption({
489
+ flags: {
490
+ key: CreateMaafAppArguments.DisplayName.name,
491
+ alias: CreateMaafAppArguments.DisplayName.alias,
492
+ },
493
+ env: CreateMaafAppArguments.DisplayName.envVar,
494
+ message: CreateMaafAppArguments.DisplayName.promptMessage,
495
+ description: HelpStrings.app.create.options.displayName,
496
+ }),
497
+ {
498
+ flags: {
499
+ key: CreateMaafAppArguments.Description.name,
500
+ alias: CreateMaafAppArguments.Description.alias,
501
+ },
502
+ env: CreateMaafAppArguments.Description.envVar,
503
+ description: HelpStrings.app.create.options.description,
504
+ optionalInNonInteractive: true,
505
+ },
506
+ {
507
+ flags: {
508
+ key: CreateMaafAppArguments.RepositoryId.name,
509
+ alias: CreateMaafAppArguments.RepositoryId.alias,
510
+ },
511
+ env: CreateMaafAppArguments.RepositoryId.envVar,
512
+ description: HelpStrings.app.create.options.repositoryId,
513
+ optionalInNonInteractive: true,
514
+ },
515
+ {
516
+ flags: {
517
+ key: CreateMaafAppArguments.Template.name,
518
+ alias: CreateMaafAppArguments.Template.alias,
519
+ },
520
+ env: CreateMaafAppArguments.Template.envVar,
521
+ default: DEFAULT_TEMPLATE,
522
+ description: HelpStrings.app.create.options.template,
523
+ optionalInNonInteractive: true,
524
+ },
525
+ {
526
+ // No short alias for --repo yet; see VerbConstants.CreateMaafAppArguments.Repo.
527
+ flags: {
528
+ key: CreateMaafAppArguments.Repo.name,
529
+ },
530
+ env: CreateMaafAppArguments.Repo.envVar,
531
+ description: HelpStrings.app.create.options.repo,
532
+ optionalInNonInteractive: true,
533
+ },
534
+ createDefaultStringOption({
535
+ flags: {
536
+ key: CreateMaafAppArguments.BuildPath.name,
537
+ alias: CreateMaafAppArguments.BuildPath.alias,
538
+ },
539
+ env: CreateMaafAppArguments.BuildPath.envVar,
540
+ message: CreateMaafAppArguments.BuildPath.promptMessage,
541
+ initialValue: CreateMaafAppArguments.BuildPath.initialValue,
542
+ default: './dist',
543
+ description: HelpStrings.app.create.options.buildPath,
544
+ }),
545
+ createDefaultStringOption({
546
+ flags: {
547
+ key: CreateMaafAppArguments.BuildCommand.name,
548
+ alias: CreateMaafAppArguments.BuildCommand.alias,
549
+ },
550
+ env: CreateMaafAppArguments.BuildCommand.envVar,
551
+ message: CreateMaafAppArguments.BuildCommand.promptMessage,
552
+ initialValue: CreateMaafAppArguments.BuildCommand.initialValue,
553
+ default: 'npm run build',
554
+ description: HelpStrings.app.create.options.buildCommand,
555
+ }),
556
+ ]);
557
+ argumentProvider.addSwitch({
558
+ flags: {
559
+ key: CreateMaafAppArguments.Force.name,
560
+ alias: CreateMaafAppArguments.Force.alias,
561
+ },
562
+ description: HelpStrings.app.create.options.force,
563
+ });
564
+ }
565
+ //# sourceMappingURL=CreateMaafApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateMaafApp.js","sourceRoot":"","sources":["../../src/Verbs/CreateMaafApp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,GAChB,MAAM,yB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AAe;YACxB,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY;SACzD,CAAC;KACH,CAAC,CAAC;IACH,gBAAgB,CAAC,SAAS,CAAC;QACzB,KAAK,EAAE;YACL,GAAG,EAAE,sBAAsB,CAAC,KAAK,CAAC,IAAI;YACtC,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,KAAK;SAC1C;QACD,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK;KAClD,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import type { ArgumentProvider } from '../ArgumentProvider.js';
5
+ export declare function deleteDataSourceAsync(argumentProvider: ArgumentProvider): Promise<void>;
6
+ //# sourceMappingURL=DeleteDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteDataSource.d.ts","sourceRoot":"","sources":["../../src/Verbs/DeleteDataSource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,wBAAsB,qBAAqB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsD7F"}