@webiny/cli-core 0.0.0-unstable.6f45466a1d → 0.0.0-unstable.7be00a75a9

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 (268) hide show
  1. package/Cli.js +12 -11
  2. package/Cli.js.map +1 -1
  3. package/abstractions/createAbstraction.js +3 -2
  4. package/abstractions/createAbstraction.js.map +1 -1
  5. package/abstractions/features/CliCommand.d.ts +4 -0
  6. package/abstractions/features/CliCommand.js +2 -1
  7. package/abstractions/features/CliCommand.js.map +1 -1
  8. package/abstractions/features/ErrorHandler.js +2 -1
  9. package/abstractions/features/ErrorHandler.js.map +1 -1
  10. package/abstractions/features/GlobalCliOption.js +2 -1
  11. package/abstractions/features/GlobalCliOption.js.map +1 -1
  12. package/abstractions/features/IsCi.js +2 -1
  13. package/abstractions/features/IsCi.js.map +1 -1
  14. package/abstractions/features/index.js +0 -2
  15. package/abstractions/features/types.js +0 -3
  16. package/abstractions/index.js +0 -2
  17. package/abstractions/services/ArgvParserService.js +2 -1
  18. package/abstractions/services/ArgvParserService.js.map +1 -1
  19. package/abstractions/services/CliParamsService.js +2 -1
  20. package/abstractions/services/CliParamsService.js.map +1 -1
  21. package/abstractions/services/CommandsRegistryService.js +2 -1
  22. package/abstractions/services/CommandsRegistryService.js.map +1 -1
  23. package/abstractions/services/GetArgvService.js +2 -1
  24. package/abstractions/services/GetArgvService.js.map +1 -1
  25. package/abstractions/services/GetCliRunnerService.js +2 -1
  26. package/abstractions/services/GetCliRunnerService.js.map +1 -1
  27. package/abstractions/services/GetIsCiService.js +2 -1
  28. package/abstractions/services/GetIsCiService.js.map +1 -1
  29. package/abstractions/services/GetProjectSdkService.js +2 -1
  30. package/abstractions/services/GetProjectSdkService.js.map +1 -1
  31. package/abstractions/services/GlobalOptionsRegistryService.js +2 -1
  32. package/abstractions/services/GlobalOptionsRegistryService.js.map +1 -1
  33. package/abstractions/services/LoggerService.js +2 -1
  34. package/abstractions/services/LoggerService.js.map +1 -1
  35. package/abstractions/services/RunCliRunnerService.js +2 -1
  36. package/abstractions/services/RunCliRunnerService.js.map +1 -1
  37. package/abstractions/services/StdioService.js +2 -1
  38. package/abstractions/services/StdioService.js.map +1 -1
  39. package/abstractions/services/UiService.js +2 -1
  40. package/abstractions/services/UiService.js.map +1 -1
  41. package/abstractions/services/index.js +0 -2
  42. package/createCliContainer.js +89 -118
  43. package/createCliContainer.js.map +1 -1
  44. package/decorators/CommandsWithGracefulErrorHandling.js +34 -32
  45. package/decorators/CommandsWithGracefulErrorHandling.js.map +1 -1
  46. package/decorators/DeployCommandWithTelemetry.js +72 -82
  47. package/decorators/DeployCommandWithTelemetry.js.map +1 -1
  48. package/decorators/index.js +0 -2
  49. package/exports/cli/command.js +0 -2
  50. package/exports/cli.d.ts +2 -0
  51. package/exports/cli.js +2 -0
  52. package/extensions/CliCommand.d.ts +3 -7
  53. package/extensions/CliCommand.js +15 -18
  54. package/extensions/CliCommand.js.map +1 -1
  55. package/extensions/CliCommandDecorator.d.ts +3 -7
  56. package/extensions/CliCommandDecorator.js +15 -18
  57. package/extensions/CliCommandDecorator.js.map +1 -1
  58. package/extensions/index.d.ts +2 -6
  59. package/extensions/index.js +5 -2
  60. package/extensions/index.js.map +1 -1
  61. package/features/AboutCommand.js +80 -86
  62. package/features/AboutCommand.js.map +1 -1
  63. package/features/BuildCommand/BuildCommand.js +46 -36
  64. package/features/BuildCommand/BuildCommand.js.map +1 -1
  65. package/features/BuildCommand/buildRunners/BaseBuildRunner.js +10 -13
  66. package/features/BuildCommand/buildRunners/BaseBuildRunner.js.map +1 -1
  67. package/features/BuildCommand/buildRunners/BuildRunner.js +18 -21
  68. package/features/BuildCommand/buildRunners/BuildRunner.js.map +1 -1
  69. package/features/BuildCommand/buildRunners/MultipleBuildsRunner.js +20 -19
  70. package/features/BuildCommand/buildRunners/MultipleBuildsRunner.js.map +1 -1
  71. package/features/BuildCommand/buildRunners/SingleBuildRunner.js +15 -14
  72. package/features/BuildCommand/buildRunners/SingleBuildRunner.js.map +1 -1
  73. package/features/BuildCommand/buildRunners/ZeroBuildsRunner.js +3 -4
  74. package/features/BuildCommand/buildRunners/ZeroBuildsRunner.js.map +1 -1
  75. package/features/BuildCommand/index.js +0 -2
  76. package/features/ConfigCommand.js +55 -56
  77. package/features/ConfigCommand.js.map +1 -1
  78. package/features/DeployCommand/DeployCommand.d.ts +1 -1
  79. package/features/DeployCommand/DeployCommand.js +164 -156
  80. package/features/DeployCommand/DeployCommand.js.map +1 -1
  81. package/features/DeployCommand/deployOutputs/BaseDeployOutput.js +12 -17
  82. package/features/DeployCommand/deployOutputs/BaseDeployOutput.js.map +1 -1
  83. package/features/DeployCommand/deployOutputs/DeployOutput.js +16 -17
  84. package/features/DeployCommand/deployOutputs/DeployOutput.js.map +1 -1
  85. package/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.js +89 -54
  86. package/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.js.map +1 -1
  87. package/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.js +24 -37
  88. package/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.js.map +1 -1
  89. package/features/DeployCommand/index.js +0 -2
  90. package/features/DepsSync/BuildDependencyTree.js +17 -22
  91. package/features/DepsSync/BuildDependencyTree.js.map +1 -1
  92. package/features/DepsSync/DependencyTree.js +108 -119
  93. package/features/DepsSync/DependencyTree.js.map +1 -1
  94. package/features/DepsSync/ListAllPackageJsonFiles.js +19 -14
  95. package/features/DepsSync/ListAllPackageJsonFiles.js.map +1 -1
  96. package/features/DepsSync/ListAllPackages.js +7 -9
  97. package/features/DepsSync/ListAllPackages.js.map +1 -1
  98. package/features/DepsSync/commands/SyncDepsCommand.js +30 -24
  99. package/features/DepsSync/commands/SyncDepsCommand.js.map +1 -1
  100. package/features/DepsSync/commands/VerifyDepsCommand.js +70 -71
  101. package/features/DepsSync/commands/VerifyDepsCommand.js.map +1 -1
  102. package/features/DepsSync/createDependencyTree.js +25 -18
  103. package/features/DepsSync/createDependencyTree.js.map +1 -1
  104. package/features/DepsSync/createReferenceFile.js +22 -26
  105. package/features/DepsSync/createReferenceFile.js.map +1 -1
  106. package/features/DepsSync/index.js +0 -2
  107. package/features/DepsSync/paths.js +3 -6
  108. package/features/DepsSync/paths.js.map +1 -1
  109. package/features/DepsSync/types.js +7 -6
  110. package/features/DepsSync/types.js.map +1 -1
  111. package/features/DestroyCommand/DestroyCommand.js +71 -67
  112. package/features/DestroyCommand/DestroyCommand.js.map +1 -1
  113. package/features/DestroyCommand/index.js +0 -2
  114. package/features/DisableTelemetryCommand.js +28 -25
  115. package/features/DisableTelemetryCommand.js.map +1 -1
  116. package/features/EnableTelemetryCommand.js +28 -25
  117. package/features/EnableTelemetryCommand.js.map +1 -1
  118. package/features/ExtensionCommand/ExtensionCommand.js +60 -63
  119. package/features/ExtensionCommand/ExtensionCommand.js.map +1 -1
  120. package/features/ExtensionCommand/index.js +0 -2
  121. package/features/InfoCommand/InfoCommand.js +54 -56
  122. package/features/InfoCommand/InfoCommand.js.map +1 -1
  123. package/features/InfoCommand/PrintInfoForEnv.js +31 -42
  124. package/features/InfoCommand/PrintInfoForEnv.js.map +1 -1
  125. package/features/InfoCommand/index.js +0 -2
  126. package/features/IsCi/IsCi.js +14 -11
  127. package/features/IsCi/IsCi.js.map +1 -1
  128. package/features/IsCi/index.js +1 -3
  129. package/features/OpenCommand.js +48 -47
  130. package/features/OpenCommand.js.map +1 -1
  131. package/features/OutputCommand.js +56 -69
  132. package/features/OutputCommand.js.map +1 -1
  133. package/features/PulumiCommand/PulumiCommand.js +48 -41
  134. package/features/PulumiCommand/PulumiCommand.js.map +1 -1
  135. package/features/PulumiCommand/index.js +0 -2
  136. package/features/RefreshCommand/RefreshCommand.js +42 -36
  137. package/features/RefreshCommand/RefreshCommand.js.map +1 -1
  138. package/features/RefreshCommand/index.js +0 -2
  139. package/features/UpgradeCommand/UpgradeCommand.d.ts +29 -0
  140. package/features/UpgradeCommand/UpgradeCommand.js +123 -0
  141. package/features/UpgradeCommand/UpgradeCommand.js.map +1 -0
  142. package/features/UpgradeCommand/UpgradeCommandHandler.d.ts +11 -0
  143. package/features/UpgradeCommand/UpgradeCommandHandler.js +102 -0
  144. package/features/UpgradeCommand/UpgradeCommandHandler.js.map +1 -0
  145. package/features/UpgradeCommand/abstraction.d.ts +23 -0
  146. package/features/UpgradeCommand/abstraction.js +5 -0
  147. package/features/UpgradeCommand/abstraction.js.map +1 -0
  148. package/features/UpgradeCommand/feature.d.ts +4 -0
  149. package/features/UpgradeCommand/feature.js +13 -0
  150. package/features/UpgradeCommand/feature.js.map +1 -0
  151. package/features/UpgradeCommand/index.d.ts +2 -0
  152. package/features/UpgradeCommand/index.js +2 -0
  153. package/features/WatchCommand/WatchCommand.js +131 -131
  154. package/features/WatchCommand/WatchCommand.js.map +1 -1
  155. package/features/WatchCommand/createPrefixer.js +11 -15
  156. package/features/WatchCommand/createPrefixer.js.map +1 -1
  157. package/features/WatchCommand/getRandomColorForString.js +86 -8
  158. package/features/WatchCommand/getRandomColorForString.js.map +1 -1
  159. package/features/WatchCommand/index.js +0 -2
  160. package/features/Wcp/LinkProjectCommand.js +119 -138
  161. package/features/Wcp/LinkProjectCommand.js.map +1 -1
  162. package/features/Wcp/LoginCommand.js +104 -118
  163. package/features/Wcp/LoginCommand.js.map +1 -1
  164. package/features/Wcp/LogoutCommand.js +29 -23
  165. package/features/Wcp/LogoutCommand.js.map +1 -1
  166. package/features/Wcp/WhoAmICommand.js +33 -29
  167. package/features/Wcp/WhoAmICommand.js.map +1 -1
  168. package/features/common/index.js +0 -2
  169. package/features/common/options.js +41 -50
  170. package/features/common/options.js.map +1 -1
  171. package/features/globalOptions/LogLevelGlobalOption.js +25 -16
  172. package/features/globalOptions/LogLevelGlobalOption.js.map +1 -1
  173. package/features/globalOptions/ShowLogsGlobalOption.js +16 -15
  174. package/features/globalOptions/ShowLogsGlobalOption.js.map +1 -1
  175. package/features/globalOptions/StackTraceGlobalOption.js +16 -15
  176. package/features/globalOptions/StackTraceGlobalOption.js.map +1 -1
  177. package/features/globalOptions/index.js +0 -2
  178. package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js +17 -16
  179. package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js.map +1 -1
  180. package/features/gracefulErrorHandlers/MissingFilesInBuildGracefulErrorHandler.js +12 -18
  181. package/features/gracefulErrorHandlers/MissingFilesInBuildGracefulErrorHandler.js.map +1 -1
  182. package/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.js +19 -19
  183. package/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.js.map +1 -1
  184. package/features/gracefulErrorHandlers/index.js +0 -2
  185. package/features/index.d.ts +1 -0
  186. package/features/index.js +1 -2
  187. package/features/utils/index.js +0 -2
  188. package/features/utils/measureDuration.js +7 -8
  189. package/features/utils/measureDuration.js.map +1 -1
  190. package/index.js +0 -2
  191. package/package.json +33 -28
  192. package/services/ArgvParserService/ArgvParserService.js +27 -33
  193. package/services/ArgvParserService/ArgvParserService.js.map +1 -1
  194. package/services/ArgvParserService/index.js +0 -2
  195. package/services/CliParamsService/CliParamsService.js +18 -15
  196. package/services/CliParamsService/CliParamsService.js.map +1 -1
  197. package/services/CliParamsService/index.js +0 -2
  198. package/services/CommandsRegistryService/CommandsRegistryService.js +19 -13
  199. package/services/CommandsRegistryService/CommandsRegistryService.js.map +1 -1
  200. package/services/CommandsRegistryService/index.js +0 -2
  201. package/services/GetArgvService/GetArgvService.js +14 -11
  202. package/services/GetArgvService/GetArgvService.js.map +1 -1
  203. package/services/GetArgvService/index.js +0 -2
  204. package/services/GetCliRunnerService/GetCliRunnerService.js +119 -148
  205. package/services/GetCliRunnerService/GetCliRunnerService.js.map +1 -1
  206. package/services/GetCliRunnerService/index.js +0 -2
  207. package/services/GetIsCiService/GetIsCiService.js +9 -8
  208. package/services/GetIsCiService/GetIsCiService.js.map +1 -1
  209. package/services/GetIsCiService/index.js +1 -3
  210. package/services/GetProjectSdkService/GetProjectSdkService.js +25 -24
  211. package/services/GetProjectSdkService/GetProjectSdkService.js.map +1 -1
  212. package/services/GetProjectSdkService/index.js +0 -2
  213. package/services/GlobalOptionsRegistryService/GlobalOptionsRegistryService.js +19 -13
  214. package/services/GlobalOptionsRegistryService/GlobalOptionsRegistryService.js.map +1 -1
  215. package/services/GlobalOptionsRegistryService/index.js +0 -2
  216. package/services/LoggerService/LoggerService.js +76 -88
  217. package/services/LoggerService/LoggerService.js.map +1 -1
  218. package/services/LoggerService/index.js +0 -2
  219. package/services/RunCliRunnerService/RunCliRunnerService.js +15 -13
  220. package/services/RunCliRunnerService/RunCliRunnerService.js.map +1 -1
  221. package/services/RunCliRunnerService/index.js +0 -2
  222. package/services/StdioService/StdioService.js +15 -14
  223. package/services/StdioService/StdioService.js.map +1 -1
  224. package/services/StdioService/index.js +0 -2
  225. package/services/UiService/UiService.js +55 -58
  226. package/services/UiService/UiService.js.map +1 -1
  227. package/services/UiService/index.js +0 -2
  228. package/services/index.js +0 -2
  229. package/utils/ManuallyReportedError.js +7 -6
  230. package/utils/ManuallyReportedError.js.map +1 -1
  231. package/abstractions/features/index.js.map +0 -1
  232. package/abstractions/features/types.js.map +0 -1
  233. package/abstractions/index.js.map +0 -1
  234. package/abstractions/services/index.js.map +0 -1
  235. package/decorators/index.js.map +0 -1
  236. package/exports/cli/command.js.map +0 -1
  237. package/exports/cli/index.d.ts +0 -2
  238. package/exports/cli/index.js +0 -4
  239. package/exports/cli/index.js.map +0 -1
  240. package/features/BuildCommand/index.js.map +0 -1
  241. package/features/DeployCommand/index.js.map +0 -1
  242. package/features/DepsSync/index.js.map +0 -1
  243. package/features/DestroyCommand/index.js.map +0 -1
  244. package/features/ExtensionCommand/index.js.map +0 -1
  245. package/features/InfoCommand/index.js.map +0 -1
  246. package/features/IsCi/index.js.map +0 -1
  247. package/features/PulumiCommand/index.js.map +0 -1
  248. package/features/RefreshCommand/index.js.map +0 -1
  249. package/features/WatchCommand/index.js.map +0 -1
  250. package/features/common/index.js.map +0 -1
  251. package/features/globalOptions/index.js.map +0 -1
  252. package/features/gracefulErrorHandlers/index.js.map +0 -1
  253. package/features/index.js.map +0 -1
  254. package/features/utils/index.js.map +0 -1
  255. package/index.js.map +0 -1
  256. package/services/ArgvParserService/index.js.map +0 -1
  257. package/services/CliParamsService/index.js.map +0 -1
  258. package/services/CommandsRegistryService/index.js.map +0 -1
  259. package/services/GetArgvService/index.js.map +0 -1
  260. package/services/GetCliRunnerService/index.js.map +0 -1
  261. package/services/GetIsCiService/index.js.map +0 -1
  262. package/services/GetProjectSdkService/index.js.map +0 -1
  263. package/services/GlobalOptionsRegistryService/index.js.map +0 -1
  264. package/services/LoggerService/index.js.map +0 -1
  265. package/services/RunCliRunnerService/index.js.map +0 -1
  266. package/services/StdioService/index.js.map +0 -1
  267. package/services/UiService/index.js.map +0 -1
  268. package/services/index.js.map +0 -1
@@ -1,24 +1,23 @@
1
1
  import { BaseDeployOutput } from "./BaseDeployOutput.js";
2
2
  import { NoDeploymentLogsDeployOutput } from "./NoDeploymentLogsDeployOutput.js";
3
3
  import { WithDeploymentLogsDeployOutput } from "./WithDeploymentLogsDeployOutput.js";
4
- export class DeployOutput extends BaseDeployOutput {
5
- async output() {
6
- const OutputClass = this.getOutputClass();
7
- const output = new OutputClass({
8
- deployProcess: this.deployProcess,
9
- stdio: this.stdio,
10
- ui: this.ui,
11
- showDeploymentLogs: this.showDeploymentLogs,
12
- deployParams: this.deployParams
13
- });
14
- return output.output();
15
- }
16
- getOutputClass() {
17
- if (this.showDeploymentLogs) {
18
- return WithDeploymentLogsDeployOutput;
4
+ class DeployOutput extends BaseDeployOutput {
5
+ async output() {
6
+ const OutputClass = this.getOutputClass();
7
+ const output = new OutputClass({
8
+ deployProcess: this.deployProcess,
9
+ stdio: this.stdio,
10
+ ui: this.ui,
11
+ showDeploymentLogs: this.showDeploymentLogs,
12
+ deployParams: this.deployParams
13
+ });
14
+ return output.output();
15
+ }
16
+ getOutputClass() {
17
+ if (this.showDeploymentLogs) return WithDeploymentLogsDeployOutput;
18
+ return NoDeploymentLogsDeployOutput;
19
19
  }
20
- return NoDeploymentLogsDeployOutput;
21
- }
22
20
  }
21
+ export { DeployOutput };
23
22
 
24
23
  //# sourceMappingURL=DeployOutput.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDeployOutput","NoDeploymentLogsDeployOutput","WithDeploymentLogsDeployOutput","DeployOutput","output","OutputClass","getOutputClass","deployProcess","stdio","ui","showDeploymentLogs","deployParams"],"sources":["DeployOutput.ts"],"sourcesContent":["import { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport { NoDeploymentLogsDeployOutput } from \"./NoDeploymentLogsDeployOutput.js\";\nimport { WithDeploymentLogsDeployOutput } from \"./WithDeploymentLogsDeployOutput.js\";\n\nexport class DeployOutput extends BaseDeployOutput {\n public override async output() {\n const OutputClass = this.getOutputClass();\n\n const output = new OutputClass({\n deployProcess: this.deployProcess,\n stdio: this.stdio,\n ui: this.ui,\n showDeploymentLogs: this.showDeploymentLogs,\n deployParams: this.deployParams\n });\n\n return output.output();\n }\n\n private getOutputClass() {\n if (this.showDeploymentLogs) {\n return WithDeploymentLogsDeployOutput;\n }\n\n return NoDeploymentLogsDeployOutput;\n }\n}\n"],"mappings":"AAAA,SAASA,gBAAgB;AACzB,SAASC,4BAA4B;AACrC,SAASC,8BAA8B;AAEvC,OAAO,MAAMC,YAAY,SAASH,gBAAgB,CAAC;EAC/C,MAAsBI,MAAMA,CAAA,EAAG;IAC3B,MAAMC,WAAW,GAAG,IAAI,CAACC,cAAc,CAAC,CAAC;IAEzC,MAAMF,MAAM,GAAG,IAAIC,WAAW,CAAC;MAC3BE,aAAa,EAAE,IAAI,CAACA,aAAa;MACjCC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,EAAE,EAAE,IAAI,CAACA,EAAE;MACXC,kBAAkB,EAAE,IAAI,CAACA,kBAAkB;MAC3CC,YAAY,EAAE,IAAI,CAACA;IACvB,CAAC,CAAC;IAEF,OAAOP,MAAM,CAACA,MAAM,CAAC,CAAC;EAC1B;EAEQE,cAAcA,CAAA,EAAG;IACrB,IAAI,IAAI,CAACI,kBAAkB,EAAE;MACzB,OAAOR,8BAA8B;IACzC;IAEA,OAAOD,4BAA4B;EACvC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"features/DeployCommand/deployOutputs/DeployOutput.js","sources":["../../../../src/features/DeployCommand/deployOutputs/DeployOutput.ts"],"sourcesContent":["import { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport { NoDeploymentLogsDeployOutput } from \"./NoDeploymentLogsDeployOutput.js\";\nimport { WithDeploymentLogsDeployOutput } from \"./WithDeploymentLogsDeployOutput.js\";\n\nexport class DeployOutput extends BaseDeployOutput {\n public override async output() {\n const OutputClass = this.getOutputClass();\n\n const output = new OutputClass({\n deployProcess: this.deployProcess,\n stdio: this.stdio,\n ui: this.ui,\n showDeploymentLogs: this.showDeploymentLogs,\n deployParams: this.deployParams\n });\n\n return output.output();\n }\n\n private getOutputClass() {\n if (this.showDeploymentLogs) {\n return WithDeploymentLogsDeployOutput;\n }\n\n return NoDeploymentLogsDeployOutput;\n }\n}\n"],"names":["DeployOutput","BaseDeployOutput","OutputClass","output","WithDeploymentLogsDeployOutput","NoDeploymentLogsDeployOutput"],"mappings":";;;AAIO,MAAMA,qBAAqBC;IAC9B,MAAsB,SAAS;QAC3B,MAAMC,cAAc,IAAI,CAAC,cAAc;QAEvC,MAAMC,SAAS,IAAID,YAAY;YAC3B,eAAe,IAAI,CAAC,aAAa;YACjC,OAAO,IAAI,CAAC,KAAK;YACjB,IAAI,IAAI,CAAC,EAAE;YACX,oBAAoB,IAAI,CAAC,kBAAkB;YAC3C,cAAc,IAAI,CAAC,YAAY;QACnC;QAEA,OAAOC,OAAO,MAAM;IACxB;IAEQ,iBAAiB;QACrB,IAAI,IAAI,CAAC,kBAAkB,EACvB,OAAOC;QAGX,OAAOC;IACX;AACJ"}
@@ -1,61 +1,96 @@
1
1
  import { measureDuration } from "../../utils/index.js";
2
2
  import { BaseDeployOutput } from "./BaseDeployOutput.js";
3
3
  import ora from "ora";
4
- const SPINNER_MESSAGES = [[60, "Still deploying..."], [120, "Still deploying, please wait..."], [180, "Some resources take some time to become ready, please wait..."], [270, "Still deploying, please don't interrupt..."], [360, "Still deploying, please be patient..."], [450, "Still deploying, please don't interrupt..."], [540, "Still deploying, please be patient..."], [600, "Deploying for 10 minutes now, probably a couple more to go..."], [720, "Still deploying, shouldn't be much longer now..."], [840, "Looks like it's taking a bit longer than usual, please wait..."], [900, "Deploying for 15 minutes now, hopefully it's almost done..."], [1200, "Deploying for 20 minutes now, hopefully it's almost done..."]];
5
- export class NoDeploymentLogsDeployOutput extends BaseDeployOutput {
6
- async output() {
7
- const deployProcess = this.deployProcess;
8
- const ui = this.ui;
9
- const params = this.deployParams;
10
- const isPreview = !!params.preview;
11
- const getDeploymentDuration = measureDuration();
12
- const spinner = ora(isPreview ? "Previewing deployment..." : "Deploying...");
13
-
14
- // When showing spinner, we want to show a few messages to the user.
15
- // The deployment process can take in some cases 10-15 minutes, so we want to
16
- // give the user some feedback.
17
- const spinnerMessagesTimeouts = SPINNER_MESSAGES.map(([seconds, message]) => {
18
- return setTimeout(() => {
19
- spinner.text = message;
20
- }, seconds * 1000);
21
- });
22
-
23
- // Every second, let's add a dot to the end of the message.
24
- // Once we reach three dots, we start over.
25
- const threeDotsInterval = setInterval(() => {
26
- const spinnerText = spinner.text;
27
- if (spinnerText.endsWith("...")) {
28
- spinner.text = spinnerText.substring(0, spinnerText.length - 3);
29
- } else {
30
- spinner.text = spinnerText + ".";
31
- }
32
- }, 1000);
33
- try {
34
- spinner.start();
35
- await deployProcess;
36
- if (isPreview) {
37
- spinner.succeed(`Preview completed in ${getDeploymentDuration()}.`);
38
- } else {
39
- spinner.succeed(`Deployed in ${getDeploymentDuration()}.`);
40
- }
41
- } catch (e) {
42
- if (isPreview) {
43
- spinner.fail("Preview failed.");
44
- ui.emptyLine();
45
- ui.text(e.message);
46
- ui.error("Preview failed, please check the details above.");
47
- } else {
48
- spinner.fail("Deployment failed.");
49
- ui.emptyLine();
50
- ui.text(e.message);
51
- ui.error("Deployment failed, please check the details above.");
52
- }
53
- throw e;
54
- } finally {
55
- spinnerMessagesTimeouts.forEach(clearTimeout);
56
- clearInterval(threeDotsInterval);
4
+ const SPINNER_MESSAGES = [
5
+ [
6
+ 60,
7
+ "Still deploying..."
8
+ ],
9
+ [
10
+ 120,
11
+ "Still deploying, please wait..."
12
+ ],
13
+ [
14
+ 180,
15
+ "Some resources take some time to become ready, please wait..."
16
+ ],
17
+ [
18
+ 270,
19
+ "Still deploying, please don't interrupt..."
20
+ ],
21
+ [
22
+ 360,
23
+ "Still deploying, please be patient..."
24
+ ],
25
+ [
26
+ 450,
27
+ "Still deploying, please don't interrupt..."
28
+ ],
29
+ [
30
+ 540,
31
+ "Still deploying, please be patient..."
32
+ ],
33
+ [
34
+ 600,
35
+ "Deploying for 10 minutes now, probably a couple more to go..."
36
+ ],
37
+ [
38
+ 720,
39
+ "Still deploying, shouldn't be much longer now..."
40
+ ],
41
+ [
42
+ 840,
43
+ "Looks like it's taking a bit longer than usual, please wait..."
44
+ ],
45
+ [
46
+ 900,
47
+ "Deploying for 15 minutes now, hopefully it's almost done..."
48
+ ],
49
+ [
50
+ 1200,
51
+ "Deploying for 20 minutes now, hopefully it's almost done..."
52
+ ]
53
+ ];
54
+ class NoDeploymentLogsDeployOutput extends BaseDeployOutput {
55
+ async output() {
56
+ const deployProcess = this.deployProcess;
57
+ const ui = this.ui;
58
+ const params = this.deployParams;
59
+ const isPreview = !!params.preview;
60
+ const getDeploymentDuration = measureDuration();
61
+ const spinner = ora(isPreview ? "Previewing deployment..." : "Deploying...");
62
+ const spinnerMessagesTimeouts = SPINNER_MESSAGES.map(([seconds, message])=>setTimeout(()=>{
63
+ spinner.text = message;
64
+ }, 1000 * seconds));
65
+ const threeDotsInterval = setInterval(()=>{
66
+ const spinnerText = spinner.text;
67
+ if (spinnerText.endsWith("...")) spinner.text = spinnerText.substring(0, spinnerText.length - 3);
68
+ else spinner.text = spinnerText + ".";
69
+ }, 1000);
70
+ try {
71
+ spinner.start();
72
+ await deployProcess;
73
+ if (isPreview) spinner.succeed(`Preview completed in ${getDeploymentDuration()}.`);
74
+ else spinner.succeed(`Deployed in ${getDeploymentDuration()}.`);
75
+ } catch (e) {
76
+ if (isPreview) {
77
+ spinner.fail("Preview failed.");
78
+ ui.emptyLine();
79
+ ui.text(e.message);
80
+ ui.error("Preview failed, please check the details above.");
81
+ } else {
82
+ spinner.fail("Deployment failed.");
83
+ ui.emptyLine();
84
+ ui.text(e.message);
85
+ ui.error("Deployment failed, please check the details above.");
86
+ }
87
+ throw e;
88
+ } finally{
89
+ spinnerMessagesTimeouts.forEach(clearTimeout);
90
+ clearInterval(threeDotsInterval);
91
+ }
57
92
  }
58
- }
59
93
  }
94
+ export { NoDeploymentLogsDeployOutput };
60
95
 
61
96
  //# sourceMappingURL=NoDeploymentLogsDeployOutput.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["measureDuration","BaseDeployOutput","ora","SPINNER_MESSAGES","NoDeploymentLogsDeployOutput","output","deployProcess","ui","params","deployParams","isPreview","preview","getDeploymentDuration","spinner","spinnerMessagesTimeouts","map","seconds","message","setTimeout","text","threeDotsInterval","setInterval","spinnerText","endsWith","substring","length","start","succeed","e","fail","emptyLine","error","forEach","clearTimeout","clearInterval"],"sources":["NoDeploymentLogsDeployOutput.ts"],"sourcesContent":["import { measureDuration } from \"~/features/utils/index.js\";\nimport { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport ora from \"ora\";\n\nconst SPINNER_MESSAGES: [number, string][] = [\n [60, \"Still deploying...\"],\n [120, \"Still deploying, please wait...\"],\n [180, \"Some resources take some time to become ready, please wait...\"],\n\n [270, \"Still deploying, please don't interrupt...\"],\n [360, \"Still deploying, please be patient...\"],\n [450, \"Still deploying, please don't interrupt...\"],\n [540, \"Still deploying, please be patient...\"],\n\n [600, \"Deploying for 10 minutes now, probably a couple more to go...\"],\n [720, \"Still deploying, shouldn't be much longer now...\"],\n\n [840, \"Looks like it's taking a bit longer than usual, please wait...\"],\n [900, \"Deploying for 15 minutes now, hopefully it's almost done...\"],\n\n [1200, \"Deploying for 20 minutes now, hopefully it's almost done...\"]\n];\n\nexport class NoDeploymentLogsDeployOutput extends BaseDeployOutput {\n public override async output() {\n const deployProcess = this.deployProcess;\n const ui = this.ui;\n const params = this.deployParams;\n\n const isPreview = !!params.preview;\n\n const getDeploymentDuration = measureDuration();\n\n const spinner = ora(isPreview ? \"Previewing deployment...\" : \"Deploying...\");\n\n // When showing spinner, we want to show a few messages to the user.\n // The deployment process can take in some cases 10-15 minutes, so we want to\n // give the user some feedback.\n const spinnerMessagesTimeouts = SPINNER_MESSAGES.map(([seconds, message]) => {\n return setTimeout(() => {\n spinner.text = message;\n }, seconds * 1000);\n });\n\n // Every second, let's add a dot to the end of the message.\n // Once we reach three dots, we start over.\n const threeDotsInterval = setInterval(() => {\n const spinnerText = spinner.text;\n if (spinnerText.endsWith(\"...\")) {\n spinner.text = spinnerText.substring(0, spinnerText.length - 3);\n } else {\n spinner.text = spinnerText + \".\";\n }\n }, 1000);\n\n try {\n spinner.start();\n await deployProcess;\n\n if (isPreview) {\n spinner.succeed(`Preview completed in ${getDeploymentDuration()}.`);\n } else {\n spinner.succeed(`Deployed in ${getDeploymentDuration()}.`);\n }\n } catch (e) {\n if (isPreview) {\n spinner.fail(\"Preview failed.\");\n ui.emptyLine();\n ui.text(e.message);\n ui.error(\"Preview failed, please check the details above.\");\n } else {\n spinner.fail(\"Deployment failed.\");\n ui.emptyLine();\n ui.text(e.message);\n ui.error(\"Deployment failed, please check the details above.\");\n }\n\n throw e;\n } finally {\n spinnerMessagesTimeouts.forEach(clearTimeout);\n clearInterval(threeDotsInterval);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe;AACxB,SAASC,gBAAgB;AACzB,OAAOC,GAAG,MAAM,KAAK;AAErB,MAAMC,gBAAoC,GAAG,CACzC,CAAC,EAAE,EAAE,oBAAoB,CAAC,EAC1B,CAAC,GAAG,EAAE,iCAAiC,CAAC,EACxC,CAAC,GAAG,EAAE,+DAA+D,CAAC,EAEtE,CAAC,GAAG,EAAE,4CAA4C,CAAC,EACnD,CAAC,GAAG,EAAE,uCAAuC,CAAC,EAC9C,CAAC,GAAG,EAAE,4CAA4C,CAAC,EACnD,CAAC,GAAG,EAAE,uCAAuC,CAAC,EAE9C,CAAC,GAAG,EAAE,+DAA+D,CAAC,EACtE,CAAC,GAAG,EAAE,kDAAkD,CAAC,EAEzD,CAAC,GAAG,EAAE,gEAAgE,CAAC,EACvE,CAAC,GAAG,EAAE,6DAA6D,CAAC,EAEpE,CAAC,IAAI,EAAE,6DAA6D,CAAC,CACxE;AAED,OAAO,MAAMC,4BAA4B,SAASH,gBAAgB,CAAC;EAC/D,MAAsBI,MAAMA,CAAA,EAAG;IAC3B,MAAMC,aAAa,GAAG,IAAI,CAACA,aAAa;IACxC,MAAMC,EAAE,GAAG,IAAI,CAACA,EAAE;IAClB,MAAMC,MAAM,GAAG,IAAI,CAACC,YAAY;IAEhC,MAAMC,SAAS,GAAG,CAAC,CAACF,MAAM,CAACG,OAAO;IAElC,MAAMC,qBAAqB,GAAGZ,eAAe,CAAC,CAAC;IAE/C,MAAMa,OAAO,GAAGX,GAAG,CAACQ,SAAS,GAAG,0BAA0B,GAAG,cAAc,CAAC;;IAE5E;IACA;IACA;IACA,MAAMI,uBAAuB,GAAGX,gBAAgB,CAACY,GAAG,CAAC,CAAC,CAACC,OAAO,EAAEC,OAAO,CAAC,KAAK;MACzE,OAAOC,UAAU,CAAC,MAAM;QACpBL,OAAO,CAACM,IAAI,GAAGF,OAAO;MAC1B,CAAC,EAAED,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,CAAC;;IAEF;IACA;IACA,MAAMI,iBAAiB,GAAGC,WAAW,CAAC,MAAM;MACxC,MAAMC,WAAW,GAAGT,OAAO,CAACM,IAAI;MAChC,IAAIG,WAAW,CAACC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC7BV,OAAO,CAACM,IAAI,GAAGG,WAAW,CAACE,SAAS,CAAC,CAAC,EAAEF,WAAW,CAACG,MAAM,GAAG,CAAC,CAAC;MACnE,CAAC,MAAM;QACHZ,OAAO,CAACM,IAAI,GAAGG,WAAW,GAAG,GAAG;MACpC;IACJ,CAAC,EAAE,IAAI,CAAC;IAER,IAAI;MACAT,OAAO,CAACa,KAAK,CAAC,CAAC;MACf,MAAMpB,aAAa;MAEnB,IAAII,SAAS,EAAE;QACXG,OAAO,CAACc,OAAO,CAAC,wBAAwBf,qBAAqB,CAAC,CAAC,GAAG,CAAC;MACvE,CAAC,MAAM;QACHC,OAAO,CAACc,OAAO,CAAC,eAAef,qBAAqB,CAAC,CAAC,GAAG,CAAC;MAC9D;IACJ,CAAC,CAAC,OAAOgB,CAAC,EAAE;MACR,IAAIlB,SAAS,EAAE;QACXG,OAAO,CAACgB,IAAI,CAAC,iBAAiB,CAAC;QAC/BtB,EAAE,CAACuB,SAAS,CAAC,CAAC;QACdvB,EAAE,CAACY,IAAI,CAACS,CAAC,CAACX,OAAO,CAAC;QAClBV,EAAE,CAACwB,KAAK,CAAC,iDAAiD,CAAC;MAC/D,CAAC,MAAM;QACHlB,OAAO,CAACgB,IAAI,CAAC,oBAAoB,CAAC;QAClCtB,EAAE,CAACuB,SAAS,CAAC,CAAC;QACdvB,EAAE,CAACY,IAAI,CAACS,CAAC,CAACX,OAAO,CAAC;QAClBV,EAAE,CAACwB,KAAK,CAAC,oDAAoD,CAAC;MAClE;MAEA,MAAMH,CAAC;IACX,CAAC,SAAS;MACNd,uBAAuB,CAACkB,OAAO,CAACC,YAAY,CAAC;MAC7CC,aAAa,CAACd,iBAAiB,CAAC;IACpC;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.js","sources":["../../../../src/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.ts"],"sourcesContent":["import { measureDuration } from \"~/features/utils/index.js\";\nimport { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport ora from \"ora\";\n\nconst SPINNER_MESSAGES: [number, string][] = [\n [60, \"Still deploying...\"],\n [120, \"Still deploying, please wait...\"],\n [180, \"Some resources take some time to become ready, please wait...\"],\n\n [270, \"Still deploying, please don't interrupt...\"],\n [360, \"Still deploying, please be patient...\"],\n [450, \"Still deploying, please don't interrupt...\"],\n [540, \"Still deploying, please be patient...\"],\n\n [600, \"Deploying for 10 minutes now, probably a couple more to go...\"],\n [720, \"Still deploying, shouldn't be much longer now...\"],\n\n [840, \"Looks like it's taking a bit longer than usual, please wait...\"],\n [900, \"Deploying for 15 minutes now, hopefully it's almost done...\"],\n\n [1200, \"Deploying for 20 minutes now, hopefully it's almost done...\"]\n];\n\nexport class NoDeploymentLogsDeployOutput extends BaseDeployOutput {\n public override async output() {\n const deployProcess = this.deployProcess;\n const ui = this.ui;\n const params = this.deployParams;\n\n const isPreview = !!params.preview;\n\n const getDeploymentDuration = measureDuration();\n\n const spinner = ora(isPreview ? \"Previewing deployment...\" : \"Deploying...\");\n\n // When showing spinner, we want to show a few messages to the user.\n // The deployment process can take in some cases 10-15 minutes, so we want to\n // give the user some feedback.\n const spinnerMessagesTimeouts = SPINNER_MESSAGES.map(([seconds, message]) => {\n return setTimeout(() => {\n spinner.text = message;\n }, seconds * 1000);\n });\n\n // Every second, let's add a dot to the end of the message.\n // Once we reach three dots, we start over.\n const threeDotsInterval = setInterval(() => {\n const spinnerText = spinner.text;\n if (spinnerText.endsWith(\"...\")) {\n spinner.text = spinnerText.substring(0, spinnerText.length - 3);\n } else {\n spinner.text = spinnerText + \".\";\n }\n }, 1000);\n\n try {\n spinner.start();\n await deployProcess;\n\n if (isPreview) {\n spinner.succeed(`Preview completed in ${getDeploymentDuration()}.`);\n } else {\n spinner.succeed(`Deployed in ${getDeploymentDuration()}.`);\n }\n } catch (e) {\n if (isPreview) {\n spinner.fail(\"Preview failed.\");\n ui.emptyLine();\n ui.text(e.message);\n ui.error(\"Preview failed, please check the details above.\");\n } else {\n spinner.fail(\"Deployment failed.\");\n ui.emptyLine();\n ui.text(e.message);\n ui.error(\"Deployment failed, please check the details above.\");\n }\n\n throw e;\n } finally {\n spinnerMessagesTimeouts.forEach(clearTimeout);\n clearInterval(threeDotsInterval);\n }\n }\n}\n"],"names":["SPINNER_MESSAGES","NoDeploymentLogsDeployOutput","BaseDeployOutput","deployProcess","ui","params","isPreview","getDeploymentDuration","measureDuration","spinner","ora","spinnerMessagesTimeouts","seconds","message","setTimeout","threeDotsInterval","setInterval","spinnerText","e","clearTimeout","clearInterval"],"mappings":";;;AAIA,MAAMA,mBAAuC;IACzC;QAAC;QAAI;KAAqB;IAC1B;QAAC;QAAK;KAAkC;IACxC;QAAC;QAAK;KAAgE;IAEtE;QAAC;QAAK;KAA6C;IACnD;QAAC;QAAK;KAAwC;IAC9C;QAAC;QAAK;KAA6C;IACnD;QAAC;QAAK;KAAwC;IAE9C;QAAC;QAAK;KAAgE;IACtE;QAAC;QAAK;KAAmD;IAEzD;QAAC;QAAK;KAAiE;IACvE;QAAC;QAAK;KAA8D;IAEpE;QAAC;QAAM;KAA8D;CACxE;AAEM,MAAMC,qCAAqCC;IAC9C,MAAsB,SAAS;QAC3B,MAAMC,gBAAgB,IAAI,CAAC,aAAa;QACxC,MAAMC,KAAK,IAAI,CAAC,EAAE;QAClB,MAAMC,SAAS,IAAI,CAAC,YAAY;QAEhC,MAAMC,YAAY,CAAC,CAACD,OAAO,OAAO;QAElC,MAAME,wBAAwBC;QAE9B,MAAMC,UAAUC,IAAIJ,YAAY,6BAA6B;QAK7D,MAAMK,0BAA0BX,iBAAiB,GAAG,CAAC,CAAC,CAACY,SAASC,QAAQ,GAC7DC,WAAW;gBACdL,QAAQ,IAAI,GAAGI;YACnB,GAAGD,AAAU,OAAVA;QAKP,MAAMG,oBAAoBC,YAAY;YAClC,MAAMC,cAAcR,QAAQ,IAAI;YAChC,IAAIQ,YAAY,QAAQ,CAAC,QACrBR,QAAQ,IAAI,GAAGQ,YAAY,SAAS,CAAC,GAAGA,YAAY,MAAM,GAAG;iBAE7DR,QAAQ,IAAI,GAAGQ,cAAc;QAErC,GAAG;QAEH,IAAI;YACAR,QAAQ,KAAK;YACb,MAAMN;YAEN,IAAIG,WACAG,QAAQ,OAAO,CAAC,CAAC,qBAAqB,EAAEF,wBAAwB,CAAC,CAAC;iBAElEE,QAAQ,OAAO,CAAC,CAAC,YAAY,EAAEF,wBAAwB,CAAC,CAAC;QAEjE,EAAE,OAAOW,GAAG;YACR,IAAIZ,WAAW;gBACXG,QAAQ,IAAI,CAAC;gBACbL,GAAG,SAAS;gBACZA,GAAG,IAAI,CAACc,EAAE,OAAO;gBACjBd,GAAG,KAAK,CAAC;YACb,OAAO;gBACHK,QAAQ,IAAI,CAAC;gBACbL,GAAG,SAAS;gBACZA,GAAG,IAAI,CAACc,EAAE,OAAO;gBACjBd,GAAG,KAAK,CAAC;YACb;YAEA,MAAMc;QACV,SAAU;YACNP,wBAAwB,OAAO,CAACQ;YAChCC,cAAcL;QAClB;IACJ;AACJ"}
@@ -1,44 +1,31 @@
1
1
  import { measureDuration } from "../../utils/index.js";
2
2
  import { BaseDeployOutput } from "./BaseDeployOutput.js";
3
3
  import { PulumiError } from "@webiny/pulumi-sdk";
4
- export class WithDeploymentLogsDeployOutput extends BaseDeployOutput {
5
- async output() {
6
- const deployProcess = this.deployProcess;
7
- const ui = this.ui;
8
- const stdio = this.stdio;
9
- const params = this.deployParams;
10
- const isPreview = !!params.preview;
11
- const getDeploymentDuration = measureDuration();
12
- try {
13
- if (isPreview) {
14
- ui.info(`Previewing deployment for %s app...`, params.app);
15
- } else {
16
- ui.info(`Deploying %s app...`, params.app);
17
- }
18
- ui.emptyLine();
19
- this.deployProcess.stdout.pipe(stdio.getStdout());
20
- this.deployProcess.stderr.pipe(stdio.getStderr());
21
- await deployProcess;
22
- if (isPreview) {
23
- ui.success(`Preview completed in ${getDeploymentDuration()}.`);
24
- } else {
25
- ui.success(`Deployed in ${getDeploymentDuration()}.`);
26
- }
27
- } catch (e) {
28
- // If Pulumi error, we don't need to show the error message, as it will be shown by Pulumi.
29
- if (e instanceof PulumiError) {
30
- // Do nothing.
31
- } else {
32
- ui.text(e.message);
33
- }
34
- if (isPreview) {
35
- ui.error("Preview failed, please check the details above.");
36
- } else {
37
- ui.error("Deployment failed, please check the details above.");
38
- }
39
- throw e;
4
+ class WithDeploymentLogsDeployOutput extends BaseDeployOutput {
5
+ async output() {
6
+ const deployProcess = this.deployProcess;
7
+ const ui = this.ui;
8
+ const stdio = this.stdio;
9
+ const params = this.deployParams;
10
+ const isPreview = !!params.preview;
11
+ const getDeploymentDuration = measureDuration();
12
+ try {
13
+ if (isPreview) ui.info("Previewing deployment for %s app...", params.app);
14
+ else ui.info("Deploying %s app...", params.app);
15
+ ui.emptyLine();
16
+ this.deployProcess.stdout.pipe(stdio.getStdout());
17
+ this.deployProcess.stderr.pipe(stdio.getStderr());
18
+ await deployProcess;
19
+ if (isPreview) ui.success(`Preview completed in ${getDeploymentDuration()}.`);
20
+ else ui.success(`Deployed in ${getDeploymentDuration()}.`);
21
+ } catch (e) {
22
+ e instanceof PulumiError || ui.text(e.message);
23
+ if (isPreview) ui.error("Preview failed, please check the details above.");
24
+ else ui.error("Deployment failed, please check the details above.");
25
+ throw e;
26
+ }
40
27
  }
41
- }
42
28
  }
29
+ export { WithDeploymentLogsDeployOutput };
43
30
 
44
31
  //# sourceMappingURL=WithDeploymentLogsDeployOutput.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["measureDuration","BaseDeployOutput","PulumiError","WithDeploymentLogsDeployOutput","output","deployProcess","ui","stdio","params","deployParams","isPreview","preview","getDeploymentDuration","info","app","emptyLine","stdout","pipe","getStdout","stderr","getStderr","success","e","text","message","error"],"sources":["WithDeploymentLogsDeployOutput.ts"],"sourcesContent":["import { measureDuration } from \"~/features/utils/index.js\";\nimport { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport { PulumiError } from \"@webiny/pulumi-sdk\";\n\nexport class WithDeploymentLogsDeployOutput extends BaseDeployOutput {\n public override async output() {\n const deployProcess = this.deployProcess;\n const ui = this.ui;\n const stdio = this.stdio;\n const params = this.deployParams;\n\n const isPreview = !!params.preview;\n\n const getDeploymentDuration = measureDuration();\n\n try {\n if (isPreview) {\n ui.info(`Previewing deployment for %s app...`, params.app);\n } else {\n ui.info(`Deploying %s app...`, params.app);\n }\n\n ui.emptyLine();\n\n this.deployProcess.stdout!.pipe(stdio.getStdout());\n this.deployProcess.stderr!.pipe(stdio.getStderr());\n await deployProcess;\n\n if (isPreview) {\n ui.success(`Preview completed in ${getDeploymentDuration()}.`);\n } else {\n ui.success(`Deployed in ${getDeploymentDuration()}.`);\n }\n } catch (e) {\n // If Pulumi error, we don't need to show the error message, as it will be shown by Pulumi.\n if (e instanceof PulumiError) {\n // Do nothing.\n } else {\n ui.text(e.message);\n }\n\n if (isPreview) {\n ui.error(\"Preview failed, please check the details above.\");\n } else {\n ui.error(\"Deployment failed, please check the details above.\");\n }\n\n throw e;\n }\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,OAAO,MAAMC,8BAA8B,SAASF,gBAAgB,CAAC;EACjE,MAAsBG,MAAMA,CAAA,EAAG;IAC3B,MAAMC,aAAa,GAAG,IAAI,CAACA,aAAa;IACxC,MAAMC,EAAE,GAAG,IAAI,CAACA,EAAE;IAClB,MAAMC,KAAK,GAAG,IAAI,CAACA,KAAK;IACxB,MAAMC,MAAM,GAAG,IAAI,CAACC,YAAY;IAEhC,MAAMC,SAAS,GAAG,CAAC,CAACF,MAAM,CAACG,OAAO;IAElC,MAAMC,qBAAqB,GAAGZ,eAAe,CAAC,CAAC;IAE/C,IAAI;MACA,IAAIU,SAAS,EAAE;QACXJ,EAAE,CAACO,IAAI,CAAC,qCAAqC,EAAEL,MAAM,CAACM,GAAG,CAAC;MAC9D,CAAC,MAAM;QACHR,EAAE,CAACO,IAAI,CAAC,qBAAqB,EAAEL,MAAM,CAACM,GAAG,CAAC;MAC9C;MAEAR,EAAE,CAACS,SAAS,CAAC,CAAC;MAEd,IAAI,CAACV,aAAa,CAACW,MAAM,CAAEC,IAAI,CAACV,KAAK,CAACW,SAAS,CAAC,CAAC,CAAC;MAClD,IAAI,CAACb,aAAa,CAACc,MAAM,CAAEF,IAAI,CAACV,KAAK,CAACa,SAAS,CAAC,CAAC,CAAC;MAClD,MAAMf,aAAa;MAEnB,IAAIK,SAAS,EAAE;QACXJ,EAAE,CAACe,OAAO,CAAC,wBAAwBT,qBAAqB,CAAC,CAAC,GAAG,CAAC;MAClE,CAAC,MAAM;QACHN,EAAE,CAACe,OAAO,CAAC,eAAeT,qBAAqB,CAAC,CAAC,GAAG,CAAC;MACzD;IACJ,CAAC,CAAC,OAAOU,CAAC,EAAE;MACR;MACA,IAAIA,CAAC,YAAYpB,WAAW,EAAE;QAC1B;MAAA,CACH,MAAM;QACHI,EAAE,CAACiB,IAAI,CAACD,CAAC,CAACE,OAAO,CAAC;MACtB;MAEA,IAAId,SAAS,EAAE;QACXJ,EAAE,CAACmB,KAAK,CAAC,iDAAiD,CAAC;MAC/D,CAAC,MAAM;QACHnB,EAAE,CAACmB,KAAK,CAAC,oDAAoD,CAAC;MAClE;MAEA,MAAMH,CAAC;IACX;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.js","sources":["../../../../src/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.ts"],"sourcesContent":["import { measureDuration } from \"~/features/utils/index.js\";\nimport { BaseDeployOutput } from \"./BaseDeployOutput.js\";\nimport { PulumiError } from \"@webiny/pulumi-sdk\";\n\nexport class WithDeploymentLogsDeployOutput extends BaseDeployOutput {\n public override async output() {\n const deployProcess = this.deployProcess;\n const ui = this.ui;\n const stdio = this.stdio;\n const params = this.deployParams;\n\n const isPreview = !!params.preview;\n\n const getDeploymentDuration = measureDuration();\n\n try {\n if (isPreview) {\n ui.info(`Previewing deployment for %s app...`, params.app);\n } else {\n ui.info(`Deploying %s app...`, params.app);\n }\n\n ui.emptyLine();\n\n this.deployProcess.stdout!.pipe(stdio.getStdout());\n this.deployProcess.stderr!.pipe(stdio.getStderr());\n await deployProcess;\n\n if (isPreview) {\n ui.success(`Preview completed in ${getDeploymentDuration()}.`);\n } else {\n ui.success(`Deployed in ${getDeploymentDuration()}.`);\n }\n } catch (e) {\n // If Pulumi error, we don't need to show the error message, as it will be shown by Pulumi.\n if (e instanceof PulumiError) {\n // Do nothing.\n } else {\n ui.text(e.message);\n }\n\n if (isPreview) {\n ui.error(\"Preview failed, please check the details above.\");\n } else {\n ui.error(\"Deployment failed, please check the details above.\");\n }\n\n throw e;\n }\n }\n}\n"],"names":["WithDeploymentLogsDeployOutput","BaseDeployOutput","deployProcess","ui","stdio","params","isPreview","getDeploymentDuration","measureDuration","e","PulumiError"],"mappings":";;;AAIO,MAAMA,uCAAuCC;IAChD,MAAsB,SAAS;QAC3B,MAAMC,gBAAgB,IAAI,CAAC,aAAa;QACxC,MAAMC,KAAK,IAAI,CAAC,EAAE;QAClB,MAAMC,QAAQ,IAAI,CAAC,KAAK;QACxB,MAAMC,SAAS,IAAI,CAAC,YAAY;QAEhC,MAAMC,YAAY,CAAC,CAACD,OAAO,OAAO;QAElC,MAAME,wBAAwBC;QAE9B,IAAI;YACA,IAAIF,WACAH,GAAG,IAAI,CAAC,uCAAuCE,OAAO,GAAG;iBAEzDF,GAAG,IAAI,CAAC,uBAAuBE,OAAO,GAAG;YAG7CF,GAAG,SAAS;YAEZ,IAAI,CAAC,aAAa,CAAC,MAAM,CAAE,IAAI,CAACC,MAAM,SAAS;YAC/C,IAAI,CAAC,aAAa,CAAC,MAAM,CAAE,IAAI,CAACA,MAAM,SAAS;YAC/C,MAAMF;YAEN,IAAII,WACAH,GAAG,OAAO,CAAC,CAAC,qBAAqB,EAAEI,wBAAwB,CAAC,CAAC;iBAE7DJ,GAAG,OAAO,CAAC,CAAC,YAAY,EAAEI,wBAAwB,CAAC,CAAC;QAE5D,EAAE,OAAOE,GAAG;YAEJA,aAAaC,eAGbP,GAAG,IAAI,CAACM,EAAE,OAAO;YAGrB,IAAIH,WACAH,GAAG,KAAK,CAAC;iBAETA,GAAG,KAAK,CAAC;YAGb,MAAMM;QACV;IACJ;AACJ"}
@@ -1,3 +1 @@
1
1
  export * from "./DeployCommand.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1,27 +1,22 @@
1
1
  import { DependencyTree } from "./DependencyTree.js";
2
- import loadJsonFile from "load-json-file";
3
- export class BuildDependencyTree {
4
- build(params) {
5
- const {
6
- basePath,
7
- files,
8
- ignore
9
- } = params;
10
- const tree = new DependencyTree();
11
- for (const file of files) {
12
- try {
13
- const json = loadJsonFile.sync(file);
14
- tree.push({
15
- file: file.replace(basePath, ""),
16
- json,
17
- ignore
18
- });
19
- } catch {
20
- console.log(`Failed to load "${file}".`);
21
- }
2
+ import { loadJsonFileSync } from "load-json-file";
3
+ class BuildDependencyTree {
4
+ build(params) {
5
+ const { basePath, files, ignore } = params;
6
+ const tree = new DependencyTree();
7
+ for (const file of files)try {
8
+ const json = loadJsonFileSync(file);
9
+ tree.push({
10
+ file: file.replace(basePath, ""),
11
+ json,
12
+ ignore
13
+ });
14
+ } catch {
15
+ console.log(`Failed to load "${file}".`);
16
+ }
17
+ return tree;
22
18
  }
23
- return tree;
24
- }
25
19
  }
20
+ export { BuildDependencyTree };
26
21
 
27
22
  //# sourceMappingURL=BuildDependencyTree.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DependencyTree","loadJsonFile","BuildDependencyTree","build","params","basePath","files","ignore","tree","file","json","sync","push","replace","console","log"],"sources":["BuildDependencyTree.ts"],"sourcesContent":["import type { IDependencyTree } from \"./types.js\";\nimport { DependencyTree } from \"./DependencyTree.js\";\nimport type { PackageJson } from \"type-fest\";\nimport loadJsonFile from \"load-json-file\";\n\nexport interface IBuildDependencyTreeParams {\n basePath: string;\n files: string[];\n ignore?: RegExp;\n}\n\nexport class BuildDependencyTree {\n public build(params: IBuildDependencyTreeParams): IDependencyTree {\n const { basePath, files, ignore } = params;\n const tree = new DependencyTree();\n for (const file of files) {\n try {\n const json = loadJsonFile.sync<PackageJson>(file);\n tree.push({\n file: file.replace(basePath, \"\"),\n json,\n ignore\n });\n } catch {\n console.log(`Failed to load \"${file}\".`);\n }\n }\n return tree;\n }\n}\n"],"mappings":"AACA,SAASA,cAAc;AAEvB,OAAOC,YAAY,MAAM,gBAAgB;AAQzC,OAAO,MAAMC,mBAAmB,CAAC;EACtBC,KAAKA,CAACC,MAAkC,EAAmB;IAC9D,MAAM;MAAEC,QAAQ;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGH,MAAM;IAC1C,MAAMI,IAAI,GAAG,IAAIR,cAAc,CAAC,CAAC;IACjC,KAAK,MAAMS,IAAI,IAAIH,KAAK,EAAE;MACtB,IAAI;QACA,MAAMI,IAAI,GAAGT,YAAY,CAACU,IAAI,CAAcF,IAAI,CAAC;QACjDD,IAAI,CAACI,IAAI,CAAC;UACNH,IAAI,EAAEA,IAAI,CAACI,OAAO,CAACR,QAAQ,EAAE,EAAE,CAAC;UAChCK,IAAI;UACJH;QACJ,CAAC,CAAC;MACN,CAAC,CAAC,MAAM;QACJO,OAAO,CAACC,GAAG,CAAC,mBAAmBN,IAAI,IAAI,CAAC;MAC5C;IACJ;IACA,OAAOD,IAAI;EACf;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"features/DepsSync/BuildDependencyTree.js","sources":["../../../src/features/DepsSync/BuildDependencyTree.ts"],"sourcesContent":["import type { IDependencyTree } from \"./types.js\";\nimport { DependencyTree } from \"./DependencyTree.js\";\nimport type { PackageJson } from \"type-fest\";\nimport { loadJsonFileSync } from \"load-json-file\";\n\nexport interface IBuildDependencyTreeParams {\n basePath: string;\n files: string[];\n ignore?: RegExp;\n}\n\nexport class BuildDependencyTree {\n public build(params: IBuildDependencyTreeParams): IDependencyTree {\n const { basePath, files, ignore } = params;\n const tree = new DependencyTree();\n for (const file of files) {\n try {\n const json = loadJsonFileSync<PackageJson>(file);\n tree.push({\n file: file.replace(basePath, \"\"),\n json,\n ignore\n });\n } catch {\n console.log(`Failed to load \"${file}\".`);\n }\n }\n return tree;\n }\n}\n"],"names":["BuildDependencyTree","params","basePath","files","ignore","tree","DependencyTree","file","json","loadJsonFileSync","console"],"mappings":";;AAWO,MAAMA;IACF,MAAMC,MAAkC,EAAmB;QAC9D,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGH;QACpC,MAAMI,OAAO,IAAIC;QACjB,KAAK,MAAMC,QAAQJ,MACf,IAAI;YACA,MAAMK,OAAOC,iBAA8BF;YAC3CF,KAAK,IAAI,CAAC;gBACN,MAAME,KAAK,OAAO,CAACL,UAAU;gBAC7BM;gBACAJ;YACJ;QACJ,EAAE,OAAM;YACJM,QAAQ,GAAG,CAAC,CAAC,gBAAgB,EAAEH,KAAK,EAAE,CAAC;QAC3C;QAEJ,OAAOF;IACX;AACJ"}