@webiny/project-aws 6.6.0-alpha.10 → 6.6.0-alpha.11

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 (355) hide show
  1. package/AwsProjectSdk.d.ts +38 -0
  2. package/AwsProjectSdk.js +61 -0
  3. package/AwsProjectSdk.js.map +1 -0
  4. package/abstractions/features/DestroyApp.d.ts +18 -0
  5. package/abstractions/features/DestroyApp.js +5 -0
  6. package/abstractions/features/DestroyApp.js.map +1 -0
  7. package/abstractions/features/ExportStack.d.ts +18 -0
  8. package/abstractions/features/ExportStack.js +5 -0
  9. package/abstractions/features/ExportStack.js.map +1 -0
  10. package/abstractions/features/GetAppOutput.d.ts +18 -0
  11. package/abstractions/features/GetAppOutput.js +5 -0
  12. package/abstractions/features/GetAppOutput.js.map +1 -0
  13. package/abstractions/features/GetAppStackOutput.d.ts +18 -0
  14. package/abstractions/features/GetAppStackOutput.js +5 -0
  15. package/abstractions/features/GetAppStackOutput.js.map +1 -0
  16. package/abstractions/features/GetPulumiResourceNamePrefix.d.ts +7 -0
  17. package/abstractions/features/GetPulumiResourceNamePrefix.js +5 -0
  18. package/abstractions/features/GetPulumiResourceNamePrefix.js.map +1 -0
  19. package/abstractions/features/RefreshApp.d.ts +18 -0
  20. package/abstractions/features/RefreshApp.js +5 -0
  21. package/abstractions/features/RefreshApp.js.map +1 -0
  22. package/abstractions/features/RunPulumiCommand.d.ts +19 -0
  23. package/abstractions/features/RunPulumiCommand.js +5 -0
  24. package/abstractions/features/RunPulumiCommand.js.map +1 -0
  25. package/abstractions/index.d.ts +21 -0
  26. package/abstractions/index.js +21 -0
  27. package/abstractions/pulumiTypes.d.ts +3 -0
  28. package/abstractions/services/GetPulumiService.d.ts +20 -0
  29. package/abstractions/services/GetPulumiService.js +5 -0
  30. package/abstractions/services/GetPulumiService.js.map +1 -0
  31. package/abstractions/services/GetPulumiVersionService.d.ts +12 -0
  32. package/abstractions/services/GetPulumiVersionService.js +5 -0
  33. package/abstractions/services/GetPulumiVersionService.js.map +1 -0
  34. package/abstractions/services/IsRemotePulumiBackendService.d.ts +7 -0
  35. package/abstractions/services/IsRemotePulumiBackendService.js +5 -0
  36. package/abstractions/services/IsRemotePulumiBackendService.js.map +1 -0
  37. package/abstractions/services/ListAppLambdaFunctionsService.d.ts +23 -0
  38. package/abstractions/services/ListAppLambdaFunctionsService.js +5 -0
  39. package/abstractions/services/ListAppLambdaFunctionsService.js.map +1 -0
  40. package/abstractions/services/ListDeployedEnvironmentsService.d.ts +12 -0
  41. package/abstractions/services/ListDeployedEnvironmentsService.js +5 -0
  42. package/abstractions/services/ListDeployedEnvironmentsService.js.map +1 -0
  43. package/abstractions/services/PulumiExportService.d.ts +13 -0
  44. package/abstractions/services/PulumiExportService.js +6 -0
  45. package/abstractions/services/PulumiExportService.js.map +1 -0
  46. package/abstractions/services/PulumiGetConfigPassphraseService.d.ts +7 -0
  47. package/abstractions/services/PulumiGetConfigPassphraseService.js +5 -0
  48. package/abstractions/services/PulumiGetConfigPassphraseService.js.map +1 -0
  49. package/abstractions/services/PulumiGetSecretsProviderService.d.ts +7 -0
  50. package/abstractions/services/PulumiGetSecretsProviderService.js +5 -0
  51. package/abstractions/services/PulumiGetSecretsProviderService.js.map +1 -0
  52. package/abstractions/services/PulumiGetStackOutputService.d.ts +13 -0
  53. package/abstractions/services/PulumiGetStackOutputService.js +5 -0
  54. package/abstractions/services/PulumiGetStackOutputService.js.map +1 -0
  55. package/abstractions/services/PulumiImportService.d.ts +8 -0
  56. package/abstractions/services/PulumiImportService.js +5 -0
  57. package/abstractions/services/PulumiImportService.js.map +1 -0
  58. package/abstractions/services/PulumiLoginService.d.ts +19 -0
  59. package/abstractions/services/PulumiLoginService.js +5 -0
  60. package/abstractions/services/PulumiLoginService.js.map +1 -0
  61. package/abstractions/services/PulumiSelectStackService.d.ts +10 -0
  62. package/abstractions/services/PulumiSelectStackService.js +5 -0
  63. package/abstractions/services/PulumiSelectStackService.js.map +1 -0
  64. package/abstractions/services/StackOutputCacheService.d.ts +10 -0
  65. package/abstractions/services/StackOutputCacheService.js +5 -0
  66. package/abstractions/services/StackOutputCacheService.js.map +1 -0
  67. package/abstractions/services/WatchedLambdaFunctionsService.d.ts +28 -0
  68. package/abstractions/services/WatchedLambdaFunctionsService.js +5 -0
  69. package/abstractions/services/WatchedLambdaFunctionsService.js.map +1 -0
  70. package/api.d.ts +1 -15
  71. package/decorators/DeployAppClearWatchedLambdaFunctions.d.ts +20 -0
  72. package/decorators/DeployAppClearWatchedLambdaFunctions.js +35 -0
  73. package/decorators/DeployAppClearWatchedLambdaFunctions.js.map +1 -0
  74. package/decorators/DeployAppRefreshStackOutputCache.d.ts +20 -0
  75. package/decorators/DeployAppRefreshStackOutputCache.js +34 -0
  76. package/decorators/DeployAppRefreshStackOutputCache.js.map +1 -0
  77. package/decorators/DeployAppWithHooks.d.ts +25 -0
  78. package/decorators/DeployAppWithHooks.js +58 -0
  79. package/decorators/DeployAppWithHooks.js.map +1 -0
  80. package/decorators/DeployAppWithWatchedLambdaReplacement.d.ts +20 -0
  81. package/decorators/DeployAppWithWatchedLambdaReplacement.js +42 -0
  82. package/decorators/DeployAppWithWatchedLambdaReplacement.js.map +1 -0
  83. package/decorators/DestroyAppClearStackOutputCache.d.ts +28 -0
  84. package/decorators/DestroyAppClearStackOutputCache.js +31 -0
  85. package/decorators/DestroyAppClearStackOutputCache.js.map +1 -0
  86. package/decorators/GetPulumiServiceWithDownloadInfo.d.ts +13 -0
  87. package/decorators/GetPulumiServiceWithDownloadInfo.js +28 -0
  88. package/decorators/GetPulumiServiceWithDownloadInfo.js.map +1 -0
  89. package/decorators/ProjectInfoWithPulumi.d.ts +34 -0
  90. package/decorators/ProjectInfoWithPulumi.js +36 -0
  91. package/decorators/ProjectInfoWithPulumi.js.map +1 -0
  92. package/extensions/ApiRoute.d.ts +7 -16
  93. package/extensions/ApiRoute.js +4 -66
  94. package/extensions/ApiRoute.js.map +1 -1
  95. package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.d.ts +3 -2
  96. package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js +2 -1
  97. package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js.map +1 -1
  98. package/extensions/OpenSearch/EnsureOsWasDeployed.d.ts +2 -2
  99. package/extensions/OpenSearch/EnsureOsWasDeployed.js +1 -2
  100. package/extensions/OpenSearch/EnsureOsWasDeployed.js.map +1 -1
  101. package/extensions/OpenSearch.js +2 -2
  102. package/extensions/OpenSearch.js.map +1 -1
  103. package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.d.ts +2 -2
  104. package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +2 -1
  105. package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -1
  106. package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.d.ts +3 -2
  107. package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js +2 -1
  108. package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js.map +1 -1
  109. package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.d.ts +5 -2
  110. package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js +3 -1
  111. package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js.map +1 -1
  112. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.d.ts +3 -1
  113. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js +2 -1
  114. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js.map +1 -1
  115. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.d.ts +3 -1
  116. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js +2 -1
  117. package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js.map +1 -1
  118. package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.d.ts +3 -1
  119. package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js +2 -1
  120. package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js.map +1 -1
  121. package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.d.ts +3 -2
  122. package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js +2 -1
  123. package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js.map +1 -1
  124. package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.d.ts +4 -2
  125. package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js +3 -1
  126. package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js.map +1 -1
  127. package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.d.ts +6 -2
  128. package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js +2 -1
  129. package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js.map +1 -1
  130. package/extensions/ProjectAws/TelemetryNoLongerNewUser.d.ts +2 -2
  131. package/extensions/ProjectAws/TelemetryNoLongerNewUser.js +1 -1
  132. package/extensions/ProjectAws/TelemetryNoLongerNewUser.js.map +1 -1
  133. package/extensions/ProjectAws/UploadAdminAppToS3.d.ts +4 -2
  134. package/extensions/ProjectAws/UploadAdminAppToS3.js +2 -2
  135. package/extensions/ProjectAws/UploadAdminAppToS3.js.map +1 -1
  136. package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.d.ts +5 -2
  137. package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js +2 -1
  138. package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js.map +1 -1
  139. package/extensions/ProjectAws/ValidateProductionPulumiState.d.ts +5 -2
  140. package/extensions/ProjectAws/ValidateProductionPulumiState.js +3 -1
  141. package/extensions/ProjectAws/ValidateProductionPulumiState.js.map +1 -1
  142. package/extensions/ProjectAws/definitions.js +5 -1
  143. package/extensions/ProjectAws/definitions.js.map +1 -1
  144. package/extensions/ProjectAws.js +2 -1
  145. package/extensions/ProjectAws.js.map +1 -1
  146. package/extensions/RegisterRoutesPulumi.js +2 -2
  147. package/extensions/RegisterRoutesPulumi.js.map +1 -1
  148. package/extensions/definitions.js +0 -2
  149. package/extensions/definitions.js.map +1 -1
  150. package/extensions/registerExtensionImplementations.js +2 -1
  151. package/extensions/registerExtensionImplementations.js.map +1 -1
  152. package/extensions/toApiGatewayPath.d.ts +2 -0
  153. package/extensions/toApiGatewayPath.js +6 -0
  154. package/extensions/toApiGatewayPath.js.map +1 -0
  155. package/features/DeployApp/DeployApp.d.ts +22 -0
  156. package/features/DeployApp/DeployApp.js +91 -0
  157. package/features/DeployApp/DeployApp.js.map +1 -0
  158. package/features/DeployApp/index.d.ts +1 -0
  159. package/features/DeployApp/index.js +1 -0
  160. package/features/DestroyApp/DestroyApp.d.ts +20 -0
  161. package/features/DestroyApp/DestroyApp.js +70 -0
  162. package/features/DestroyApp/DestroyApp.js.map +1 -0
  163. package/features/DestroyApp/index.d.ts +1 -0
  164. package/features/DestroyApp/index.js +1 -0
  165. package/features/ExportStack/ExportStack.d.ts +12 -0
  166. package/features/ExportStack/ExportStack.js +28 -0
  167. package/features/ExportStack/ExportStack.js.map +1 -0
  168. package/features/ExportStack/index.d.ts +1 -0
  169. package/features/ExportStack/index.js +1 -0
  170. package/features/GetAppOutput/GetAppOutput.d.ts +16 -0
  171. package/features/GetAppOutput/GetAppOutput.js +55 -0
  172. package/features/GetAppOutput/GetAppOutput.js.map +1 -0
  173. package/features/GetAppOutput/index.d.ts +1 -0
  174. package/features/GetAppOutput/index.js +1 -0
  175. package/features/GetAppStackOutput/GetAppStackOutput.d.ts +13 -0
  176. package/features/GetAppStackOutput/GetAppStackOutput.js +28 -0
  177. package/features/GetAppStackOutput/GetAppStackOutput.js.map +1 -0
  178. package/features/GetAppStackOutput/index.d.ts +1 -0
  179. package/features/GetAppStackOutput/index.js +1 -0
  180. package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.d.ts +8 -0
  181. package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js +26 -0
  182. package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js.map +1 -0
  183. package/features/GetPulumiResourceNamePrefix/index.d.ts +1 -0
  184. package/features/GetPulumiResourceNamePrefix/index.js +1 -0
  185. package/features/InvokeLambdaFunction.d.ts +1 -1
  186. package/features/InvokeLambdaFunction.js +1 -1
  187. package/features/InvokeLambdaFunction.js.map +1 -1
  188. package/features/RefreshApp/RefreshApp.d.ts +18 -0
  189. package/features/RefreshApp/RefreshApp.js +68 -0
  190. package/features/RefreshApp/RefreshApp.js.map +1 -0
  191. package/features/RefreshApp/index.d.ts +1 -0
  192. package/features/RefreshApp/index.js +1 -0
  193. package/features/RunPulumiCommand/RunPulumiCommand.d.ts +18 -0
  194. package/features/RunPulumiCommand/RunPulumiCommand.js +65 -0
  195. package/features/RunPulumiCommand/RunPulumiCommand.js.map +1 -0
  196. package/features/RunPulumiCommand/index.d.ts +1 -0
  197. package/features/RunPulumiCommand/index.js +1 -0
  198. package/features/Watch/AwsWatch.d.ts +9 -1
  199. package/features/Watch/AwsWatch.js +6 -2
  200. package/features/Watch/AwsWatch.js.map +1 -1
  201. package/features/Watch/getIotEndpoint.d.ts +2 -2
  202. package/features/Watch/getIotEndpoint.js.map +1 -1
  203. package/features/Watch/initInvocationForwarding.d.ts +9 -0
  204. package/features/Watch/initInvocationForwarding.js +91 -0
  205. package/features/Watch/initInvocationForwarding.js.map +1 -0
  206. package/features/Watch/localInvocationWorker.d.ts +1 -0
  207. package/features/Watch/localInvocationWorker.js +31 -0
  208. package/features/Watch/localInvocationWorker.js.map +1 -0
  209. package/features/Watch/replaceLambdaFunctions.d.ts +7 -3
  210. package/features/Watch/replaceLambdaFunctions.js.map +1 -1
  211. package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.d.ts +7 -0
  212. package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.js +25 -0
  213. package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.js.map +1 -0
  214. package/features/hooks/AdminAfterDeploy/index.d.ts +1 -0
  215. package/features/hooks/AdminAfterDeploy/index.js +1 -0
  216. package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.d.ts +7 -0
  217. package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js +25 -0
  218. package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js.map +1 -0
  219. package/features/hooks/AdminBeforeDeploy/index.d.ts +1 -0
  220. package/features/hooks/AdminBeforeDeploy/index.js +1 -0
  221. package/features/hooks/AfterDeploy/AfterDeploy.d.ts +7 -0
  222. package/features/hooks/AfterDeploy/AfterDeploy.js +25 -0
  223. package/features/hooks/AfterDeploy/AfterDeploy.js.map +1 -0
  224. package/features/hooks/AfterDeploy/index.d.ts +1 -0
  225. package/features/hooks/AfterDeploy/index.js +1 -0
  226. package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.d.ts +7 -0
  227. package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.js +25 -0
  228. package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.js.map +1 -0
  229. package/features/hooks/ApiAfterDeploy/index.d.ts +1 -0
  230. package/features/hooks/ApiAfterDeploy/index.js +1 -0
  231. package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.d.ts +7 -0
  232. package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js +25 -0
  233. package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js.map +1 -0
  234. package/features/hooks/ApiBeforeDeploy/index.d.ts +1 -0
  235. package/features/hooks/ApiBeforeDeploy/index.js +1 -0
  236. package/features/hooks/BeforeDeploy/BeforeDeploy.d.ts +7 -0
  237. package/features/hooks/BeforeDeploy/BeforeDeploy.js +25 -0
  238. package/features/hooks/BeforeDeploy/BeforeDeploy.js.map +1 -0
  239. package/features/hooks/BeforeDeploy/index.d.ts +1 -0
  240. package/features/hooks/BeforeDeploy/index.js +1 -0
  241. package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.d.ts +7 -0
  242. package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.js +25 -0
  243. package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.js.map +1 -0
  244. package/features/hooks/CoreAfterDeploy/index.d.ts +1 -0
  245. package/features/hooks/CoreAfterDeploy/index.js +1 -0
  246. package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.d.ts +7 -0
  247. package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js +25 -0
  248. package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js.map +1 -0
  249. package/features/hooks/CoreBeforeDeploy/index.d.ts +1 -0
  250. package/features/hooks/CoreBeforeDeploy/index.js +1 -0
  251. package/index.d.ts +2 -0
  252. package/index.js +2 -0
  253. package/infra.js +2 -2
  254. package/infra.js.map +1 -1
  255. package/package.json +15 -12
  256. package/pulumi/apps/blueGreen/types.d.ts +2 -2
  257. package/pulumi/apps/syncSystem/types.d.ts +2 -2
  258. package/pulumi/getAwsProjectSdk.d.ts +2 -12
  259. package/pulumi/getAwsProjectSdk.js +2 -3
  260. package/pulumi/getAwsProjectSdk.js.map +1 -1
  261. package/pulumi/getStackOutput.d.ts +4 -5
  262. package/pulumi/getStackOutput.js.map +1 -1
  263. package/pulumi/types.d.ts +2 -2
  264. package/registerAwsProjectFeatures.js +38 -9
  265. package/registerAwsProjectFeatures.js.map +1 -1
  266. package/services/AdminStackOutputService.d.ts +1 -1
  267. package/services/AdminStackOutputService.js +1 -1
  268. package/services/AdminStackOutputService.js.map +1 -1
  269. package/services/ApiStackOutputService.d.ts +1 -1
  270. package/services/ApiStackOutputService.js +1 -1
  271. package/services/ApiStackOutputService.js.map +1 -1
  272. package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.d.ts +10 -0
  273. package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.js +30 -0
  274. package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.js.map +1 -0
  275. package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.d.ts +9 -0
  276. package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.js +24 -0
  277. package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.js.map +1 -0
  278. package/services/CoreStackOutputService.d.ts +1 -1
  279. package/services/CoreStackOutputService.js +1 -1
  280. package/services/CoreStackOutputService.js.map +1 -1
  281. package/services/GetPulumiService/GetPulumiService.d.ts +3 -1
  282. package/services/GetPulumiService/GetPulumiService.js +2 -1
  283. package/services/GetPulumiService/GetPulumiService.js.map +1 -1
  284. package/services/GetPulumiVersionService/GetPulumiVersionService.d.ts +5 -0
  285. package/services/GetPulumiVersionService/GetPulumiVersionService.js +46 -0
  286. package/services/GetPulumiVersionService/GetPulumiVersionService.js.map +1 -0
  287. package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.d.ts +14 -0
  288. package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js +15 -0
  289. package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js.map +1 -0
  290. package/services/IsRemotePulumiBackendService/index.d.ts +1 -0
  291. package/services/IsRemotePulumiBackendService/index.js +1 -0
  292. package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.d.ts +20 -0
  293. package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js +63 -0
  294. package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js.map +1 -0
  295. package/services/ListAppLambdaFunctionsService/index.d.ts +1 -0
  296. package/services/ListAppLambdaFunctionsService/index.js +1 -0
  297. package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.d.ts +8 -0
  298. package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js +31 -0
  299. package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js.map +1 -0
  300. package/services/ListDeployedEnvironmentsService/index.d.ts +1 -0
  301. package/services/ListDeployedEnvironmentsService/index.js +1 -0
  302. package/services/PulumiExportService/PulumiExportService.d.ts +16 -0
  303. package/services/PulumiExportService/PulumiExportService.js +54 -0
  304. package/services/PulumiExportService/PulumiExportService.js.map +1 -0
  305. package/services/PulumiExportService/index.d.ts +1 -0
  306. package/services/PulumiExportService/index.js +1 -0
  307. package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.d.ts +5 -0
  308. package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js +15 -0
  309. package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js.map +1 -0
  310. package/services/PulumiGetConfigPassphraseService/index.d.ts +1 -0
  311. package/services/PulumiGetConfigPassphraseService/index.js +1 -0
  312. package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.d.ts +5 -0
  313. package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js +15 -0
  314. package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js.map +1 -0
  315. package/services/PulumiGetSecretsProviderService/index.d.ts +1 -0
  316. package/services/PulumiGetSecretsProviderService/index.js +1 -0
  317. package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.d.ts +16 -0
  318. package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js +69 -0
  319. package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js.map +1 -0
  320. package/services/PulumiGetStackOutputService/index.d.ts +1 -0
  321. package/services/PulumiGetStackOutputService/index.js +1 -0
  322. package/services/PulumiGetStackOutputService/mapStackOutput.d.ts +1 -0
  323. package/services/PulumiGetStackOutputService/mapStackOutput.js +22 -0
  324. package/services/PulumiGetStackOutputService/mapStackOutput.js.map +1 -0
  325. package/services/PulumiImportService/PulumiImportService.d.ts +13 -0
  326. package/services/PulumiImportService/PulumiImportService.js +64 -0
  327. package/services/PulumiImportService/PulumiImportService.js.map +1 -0
  328. package/services/PulumiImportService/index.d.ts +1 -0
  329. package/services/PulumiImportService/index.js +1 -0
  330. package/services/PulumiLoginService/PulumiLoginService.d.ts +13 -0
  331. package/services/PulumiLoginService/PulumiLoginService.js +59 -0
  332. package/services/PulumiLoginService/PulumiLoginService.js.map +1 -0
  333. package/services/PulumiLoginService/index.d.ts +1 -0
  334. package/services/PulumiLoginService/index.js +1 -0
  335. package/services/PulumiSelectStackService/PulumiSelectStackService.d.ts +20 -0
  336. package/services/PulumiSelectStackService/PulumiSelectStackService.js +106 -0
  337. package/services/PulumiSelectStackService/PulumiSelectStackService.js.map +1 -0
  338. package/services/PulumiSelectStackService/index.d.ts +1 -0
  339. package/services/PulumiSelectStackService/index.js +1 -0
  340. package/services/StackOutputCacheService/StackOutputCacheService.d.ts +21 -0
  341. package/services/StackOutputCacheService/StackOutputCacheService.js +90 -0
  342. package/services/StackOutputCacheService/StackOutputCacheService.js.map +1 -0
  343. package/services/StackOutputCacheService/index.d.ts +1 -0
  344. package/services/StackOutputCacheService/index.js +1 -0
  345. package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.d.ts +14 -0
  346. package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js +55 -0
  347. package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js.map +1 -0
  348. package/services/WatchedLambdaFunctionsService/index.d.ts +1 -0
  349. package/services/WatchedLambdaFunctionsService/index.js +1 -0
  350. package/utils/withPulumiConfigPassphrase.d.ts +1 -0
  351. package/utils/withPulumiConfigPassphrase.js +7 -0
  352. package/utils/withPulumiConfigPassphrase.js.map +1 -0
  353. package/extensions/routePath.d.ts +0 -20
  354. package/extensions/routePath.js +0 -13
  355. package/extensions/routePath.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators/GetPulumiServiceWithDownloadInfo.js","sources":["../../src/decorators/GetPulumiServiceWithDownloadInfo.ts"],"sourcesContent":["import { GetProjectService } from \"@webiny/project/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/index.js\";\nimport { GetPulumiService } from \"~/abstractions/services/GetPulumiService.js\";\n\nexport class GetPulumiServiceWithDownloadInfo implements GetPulumiService.Interface {\n constructor(\n private getProjectService: GetProjectService.Interface,\n private ui: UiService.Interface,\n private decoratee: GetPulumiService.Interface\n ) {}\n\n async execute(params: GetPulumiService.Params = {}) {\n const project = this.getProjectService.execute();\n const pulumiCliPath = project.paths.dotWebinyFolder.join(\"pulumi-cli\");\n\n if (!pulumiCliPath.existsSync()) {\n this.ui.info(\"Looks like this is your first time using Pulumi CLI. Downloading...\");\n\n // New line b/c after the Pulumi CLI download, plugins are next.\n this.ui.emptyLine();\n }\n\n return this.decoratee.execute(params);\n }\n}\n\nexport const getPulumiServiceWithDownloadInfo = GetPulumiService.createDecorator({\n decorator: GetPulumiServiceWithDownloadInfo,\n dependencies: [GetProjectService, UiService]\n});\n"],"names":["GetPulumiServiceWithDownloadInfo","getProjectService","ui","decoratee","params","project","pulumiCliPath","getPulumiServiceWithDownloadInfo","GetPulumiService","GetProjectService","UiService"],"mappings":";;AAIO,MAAMA;IACT,YACYC,iBAA8C,EAC9CC,EAAuB,EACvBC,SAAqC,CAC/C;aAHUF,iBAAiB,GAAjBA;aACAC,EAAE,GAAFA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QAAQC,SAAkC,CAAC,CAAC,EAAE;QAChD,MAAMC,UAAU,IAAI,CAAC,iBAAiB,CAAC,OAAO;QAC9C,MAAMC,gBAAgBD,QAAQ,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC;QAEzD,IAAI,CAACC,cAAc,UAAU,IAAI;YAC7B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;YAGb,IAAI,CAAC,EAAE,CAAC,SAAS;QACrB;QAEA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAACF;IAClC;AACJ;AAEO,MAAMG,mCAAmCC,iBAAiB,eAAe,CAAC;IAC7E,WAAWR;IACX,cAAc;QAACS;QAAmBC;KAAU;AAChD"}
@@ -0,0 +1,34 @@
1
+ import { ProjectInfoService } from "@webiny/project/abstractions/index.js";
2
+ import { GetPulumiVersionService } from "../abstractions/services/GetPulumiVersionService.js";
3
+ /**
4
+ * Adds the Pulumi section to `webiny about`: the installed Pulumi packages and how Pulumi secrets
5
+ * are configured.
6
+ */
7
+ export declare class ProjectInfoWithPulumi implements ProjectInfoService.Interface {
8
+ private getPulumiVersion;
9
+ private decoratee;
10
+ constructor(getPulumiVersion: GetPulumiVersionService.Interface, decoratee: ProjectInfoService.Interface);
11
+ execute(): Promise<{
12
+ webiny: {
13
+ debugEnabled: boolean;
14
+ featureFlags: Record<string, boolean>;
15
+ version: string;
16
+ };
17
+ wcp: {
18
+ projectId: string;
19
+ usingProjectEnvironmentApiKey: boolean;
20
+ };
21
+ host: {
22
+ os: string;
23
+ nodeJs: string;
24
+ npm: string;
25
+ npx: string;
26
+ yarn: string;
27
+ isCI: boolean;
28
+ };
29
+ sections: import("@webiny/project/abstractions/services/ProjectInfoService/ProjectInfoService").IProjectInfoSection[];
30
+ }>;
31
+ }
32
+ export declare const projectInfoWithPulumi: typeof ProjectInfoWithPulumi & {
33
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/services/ProjectInfoService/ProjectInfoService").IProjectInfoService>;
34
+ };
@@ -0,0 +1,36 @@
1
+ import { ProjectInfoService } from "@webiny/project/abstractions/index.js";
2
+ import { GetPulumiVersionService } from "../abstractions/services/GetPulumiVersionService.js";
3
+ class ProjectInfoWithPulumi {
4
+ constructor(getPulumiVersion, decoratee){
5
+ this.getPulumiVersion = getPulumiVersion;
6
+ this.decoratee = decoratee;
7
+ }
8
+ async execute() {
9
+ const info = await this.decoratee.execute();
10
+ const [pulumiVersion, pulumiAwsVersion] = this.getPulumiVersion.execute();
11
+ return {
12
+ ...info,
13
+ sections: [
14
+ ...info.sections,
15
+ {
16
+ name: "Pulumi",
17
+ data: {
18
+ "@pulumi/pulumi": pulumiVersion,
19
+ "@pulumi/aws": pulumiAwsVersion,
20
+ "Secrets Provider": process.env.PULUMI_SECRETS_PROVIDER || "",
21
+ "Using Password": process.env.PULUMI_CONFIG_PASSPHRASE ? "Yes" : "No"
22
+ }
23
+ }
24
+ ]
25
+ };
26
+ }
27
+ }
28
+ const projectInfoWithPulumi = ProjectInfoService.createDecorator({
29
+ decorator: ProjectInfoWithPulumi,
30
+ dependencies: [
31
+ GetPulumiVersionService
32
+ ]
33
+ });
34
+ export { ProjectInfoWithPulumi, projectInfoWithPulumi };
35
+
36
+ //# sourceMappingURL=ProjectInfoWithPulumi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators/ProjectInfoWithPulumi.js","sources":["../../src/decorators/ProjectInfoWithPulumi.ts"],"sourcesContent":["import { ProjectInfoService } from \"@webiny/project/abstractions/index.js\";\nimport { GetPulumiVersionService } from \"~/abstractions/services/GetPulumiVersionService.js\";\n\n/**\n * Adds the Pulumi section to `webiny about`: the installed Pulumi packages and how Pulumi secrets\n * are configured.\n */\nexport class ProjectInfoWithPulumi implements ProjectInfoService.Interface {\n constructor(\n private getPulumiVersion: GetPulumiVersionService.Interface,\n private decoratee: ProjectInfoService.Interface\n ) {}\n\n async execute() {\n const info = await this.decoratee.execute();\n const [pulumiVersion, pulumiAwsVersion] = this.getPulumiVersion.execute();\n\n return {\n ...info,\n sections: [\n ...info.sections,\n {\n name: \"Pulumi\",\n data: {\n \"@pulumi/pulumi\": pulumiVersion,\n \"@pulumi/aws\": pulumiAwsVersion,\n \"Secrets Provider\": process.env.PULUMI_SECRETS_PROVIDER || \"\",\n \"Using Password\": process.env.PULUMI_CONFIG_PASSPHRASE ? \"Yes\" : \"No\"\n }\n }\n ]\n };\n }\n}\n\nexport const projectInfoWithPulumi = ProjectInfoService.createDecorator({\n decorator: ProjectInfoWithPulumi,\n dependencies: [GetPulumiVersionService]\n});\n"],"names":["ProjectInfoWithPulumi","getPulumiVersion","decoratee","info","pulumiVersion","pulumiAwsVersion","process","projectInfoWithPulumi","ProjectInfoService","GetPulumiVersionService"],"mappings":";;AAOO,MAAMA;IACT,YACYC,gBAAmD,EACnDC,SAAuC,CACjD;aAFUD,gBAAgB,GAAhBA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,UAAU;QACZ,MAAMC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO;QACzC,MAAM,CAACC,eAAeC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO;QAEvE,OAAO;YACH,GAAGF,IAAI;YACP,UAAU;mBACHA,KAAK,QAAQ;gBAChB;oBACI,MAAM;oBACN,MAAM;wBACF,kBAAkBC;wBAClB,eAAeC;wBACf,oBAAoBC,QAAQ,GAAG,CAAC,uBAAuB,IAAI;wBAC3D,kBAAkBA,QAAQ,GAAG,CAAC,wBAAwB,GAAG,QAAQ;oBACrE;gBACJ;aACH;QACL;IACJ;AACJ;AAEO,MAAMC,wBAAwBC,mBAAmB,eAAe,CAAC;IACpE,WAAWR;IACX,cAAc;QAACS;KAAwB;AAC3C"}
@@ -1,16 +1,7 @@
1
- import { z } from "zod";
2
- export declare const ApiRoute: import("@webiny/project/defineExtension/defineExtension.js").ExtensionComponent<z.ZodObject<{
3
- path: z.ZodString;
4
- method: z.ZodEnum<{
5
- ANY: "ANY";
6
- DELETE: "DELETE";
7
- GET: "GET";
8
- HEAD: "HEAD";
9
- OPTIONS: "OPTIONS";
10
- PATCH: "PATCH";
11
- POST: "POST";
12
- PUT: "PUT";
13
- }>;
14
- src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
15
- routeName: z.ZodOptional<z.ZodString>;
16
- }, z.core.$strip>>;
1
+ /**
2
+ * What `Api.Route` renders in an AWS project, registered in `registerExtensionImplementations.ts`.
3
+ * It only adds the API Gateway route (`RegisterRoutesPulumi`). Validating the props and writing the
4
+ * route into `extensions.ts` stay with the shared definition in `@webiny/project`, which is the one
5
+ * the project config resolves `Api/Route` to, so there is no schema or build step here.
6
+ */
7
+ export declare const ApiRoute: import("@webiny/project/extensions").ExtensionComponent<import("zod").ZodTypeAny<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>>;
@@ -1,84 +1,22 @@
1
1
  import react from "react";
2
- import path from "path";
3
- import crypto_0 from "crypto";
4
- import { z } from "zod";
5
- import { Node, Project } from "ts-morph";
6
2
  import { defineExtension } from "@webiny/project/defineExtension/index.js";
7
- import { zodSrcPath } from "@webiny/project/defineExtension/zodTypes/zodSrcPath.js";
8
- import { ExtensionSrcResolver } from "@webiny/project/utils/index.js";
3
+ import { ApiRoute } from "@webiny/project/extensions/api/index.js";
9
4
  import { ApiPulumi } from "../pulumi/extensions/ApiPulumi.js";
10
5
  import { createPathResolver } from "@webiny/project";
11
- import { HTTP_METHODS } from "@webiny/project-extensions-aws/extensions/ApiRoute.js";
12
- import { deriveRouteName, toRouterPath } from "./routePath.js";
13
6
  const p = createPathResolver(import.meta.dirname);
14
- const ApiRoute = defineExtension({
15
- type: "Api/Route",
7
+ const ApiRoute_ApiRoute = defineExtension({
8
+ type: ApiRoute.def.type,
16
9
  tags: {
17
10
  runtimeContext: "app-build",
18
- appName: "api",
19
11
  hosting: "aws"
20
12
  },
21
- description: "Register a custom REST route on the API Gateway + GraphQL Lambda.",
22
13
  multiple: true,
23
- paramsSchema: ({ project })=>z.object({
24
- path: z.string().startsWith("/"),
25
- method: z["enum"](HTTP_METHODS),
26
- src: zodSrcPath({
27
- project
28
- }),
29
- routeName: z.string().optional()
30
- }),
31
- async build (params, ctx) {
32
- const extensionsTsFilePath = ctx.project.paths.workspaceFolder.join("apps", "api", "graphql", "src", "extensions.ts").toString();
33
- const absoluteSrcFilePath = ExtensionSrcResolver.resolvePath(params.src, ctx.project);
34
- const hash = crypto_0.createHash("sha256").update(params.src).digest("hex");
35
- const alias = `ApiRoute_${hash.slice(-10)}`;
36
- const importPath = path.relative(path.dirname(extensionsTsFilePath), absoluteSrcFilePath).replace(/\.tsx?$/, ".js");
37
- const tsProject = new Project();
38
- tsProject.addSourceFileAtPath(extensionsTsFilePath);
39
- const source = tsProject.getSourceFileOrThrow(extensionsTsFilePath);
40
- if (source.getImportDeclaration(importPath)) return;
41
- let insertIndex = 1;
42
- const importDeclarations = source.getImportDeclarations();
43
- if (importDeclarations.length) insertIndex = importDeclarations[importDeclarations.length - 1].getChildIndex() + 1;
44
- source.insertImportDeclaration(insertIndex, {
45
- defaultImport: alias,
46
- moduleSpecifier: importPath
47
- });
48
- const registerExtensionPluginPath = "@webiny/handler/plugins/RegisterExtensionPlugin.js";
49
- const existingRegisterExtensionPluginImport = source.getImportDeclaration(registerExtensionPluginPath);
50
- if (existingRegisterExtensionPluginImport && !existingRegisterExtensionPluginImport.getNamedImports().some((i)=>"createRegisterExtensionPlugin" === i.getName())) existingRegisterExtensionPluginImport.addNamedImport("createRegisterExtensionPlugin");
51
- else if (!existingRegisterExtensionPluginImport) {
52
- const lastIdx = source.getImportDeclarations()[source.getImportDeclarations().length - 1].getChildIndex() + 1;
53
- source.insertImportDeclaration(lastIdx, {
54
- namedImports: [
55
- "createRegisterExtensionPlugin"
56
- ],
57
- moduleSpecifier: registerExtensionPluginPath
58
- });
59
- }
60
- const eventHandlerCorePath = "@webiny/event-handler-core";
61
- if (!source.getImportDeclaration(eventHandlerCorePath)) {
62
- const lastIdx = source.getImportDeclarations()[source.getImportDeclarations().length - 1].getChildIndex() + 1;
63
- source.insertImportDeclaration(lastIdx, {
64
- namedImports: [
65
- "createHttpRouteDefinition"
66
- ],
67
- moduleSpecifier: eventHandlerCorePath
68
- });
69
- }
70
- const pluginsArray = source.getFirstDescendant((node)=>Node.isArrayLiteralExpression(node));
71
- const routerPath = toRouterPath(params.path);
72
- const routeName = params.routeName ?? deriveRouteName(params.path, params.method);
73
- pluginsArray.addElement(`\ncreateRegisterExtensionPlugin(ctx => {\n\tctx.container.register(\n\t\tcreateHttpRouteDefinition({\n\t\t\tname: "${routeName}",\n\t\t\tmethod: "${params.method}",\n\t\t\tpath: "${routerPath}",\n\t\t\thandler: ${alias}\n\t\t})\n\t);\n})`);
74
- await source.save();
75
- },
76
14
  render () {
77
15
  return /*#__PURE__*/ react.createElement(ApiPulumi, {
78
16
  src: p("RegisterRoutesPulumi.js")
79
17
  });
80
18
  }
81
19
  });
82
- export { ApiRoute };
20
+ export { ApiRoute_ApiRoute as ApiRoute };
83
21
 
84
22
  //# sourceMappingURL=ApiRoute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ApiRoute.js","sources":["../../src/extensions/ApiRoute.tsx"],"sourcesContent":["import React from \"react\";\nimport path from \"path\";\nimport crypto from \"crypto\";\nimport { z } from \"zod\";\nimport { Node, Project, ArrayLiteralExpression } from \"ts-morph\";\nimport { defineExtension } from \"@webiny/project/defineExtension/index.js\";\nimport { zodSrcPath } from \"@webiny/project/defineExtension/zodTypes/zodSrcPath.js\";\nimport { ExtensionSrcResolver } from \"@webiny/project/utils/index.js\";\nimport { ApiPulumi } from \"~/pulumi/extensions/ApiPulumi.js\";\nimport { createPathResolver } from \"@webiny/project\";\nimport { HTTP_METHODS } from \"@webiny/project-extensions-aws/extensions/ApiRoute.js\";\nimport { deriveRouteName, toRouterPath } from \"./routePath.js\";\n\nconst p = createPathResolver(import.meta.dirname);\n\nexport const ApiRoute = defineExtension({\n type: \"Api/Route\",\n tags: { runtimeContext: \"app-build\", appName: \"api\", hosting: \"aws\" },\n description: \"Register a custom REST route on the API Gateway + GraphQL Lambda.\",\n multiple: true,\n paramsSchema: ({ project }) => {\n return z.object({\n // Path parameters may be written `{orderId}` (API Gateway) or `:orderId` (the DI\n // router). Both are accepted and converted per consumer — see `routePath.ts`.\n path: z.string().startsWith(\"/\"),\n method: z.enum(HTTP_METHODS),\n // The `src` file must default-export a route HANDLER — the result of\n // `HttpRouteHandler.createImplementation` from `@webiny/event-handler-core`. It does\n // NOT declare its own method/path: the `HttpRouteDefinition` the router matches on is\n // generated below from the props here, so the route the gateway forwards to and the\n // route the router matches cannot drift apart.\n src: zodSrcPath({ project }),\n // Doubles as the route's DI name, so a decorator on HttpRouteDefinition can pick this\n // route out by it. Derived from path + method when omitted, same as the Pulumi name.\n routeName: z.string().optional()\n });\n },\n async build(params, ctx) {\n const extensionsTsFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"api\", \"graphql\", \"src\", \"extensions.ts\")\n .toString();\n\n const absoluteSrcFilePath = ExtensionSrcResolver.resolvePath(params.src, ctx.project);\n\n // Stable alias to avoid naming conflicts across multiple routes.\n const hash = crypto.createHash(\"sha256\").update(params.src).digest(\"hex\");\n const alias = `ApiRoute_${hash.slice(-10)}`;\n\n const importPath = path\n .relative(path.dirname(extensionsTsFilePath), absoluteSrcFilePath)\n .replace(/\\.tsx?$/, \".js\");\n\n const tsProject = new Project();\n tsProject.addSourceFileAtPath(extensionsTsFilePath);\n const source = tsProject.getSourceFileOrThrow(extensionsTsFilePath);\n\n // Skip if the route handler is already registered.\n if (source.getImportDeclaration(importPath)) {\n return;\n }\n\n // Insert handler import after the last existing import.\n let insertIndex = 1;\n const importDeclarations = source.getImportDeclarations();\n if (importDeclarations.length) {\n insertIndex = importDeclarations[importDeclarations.length - 1].getChildIndex() + 1;\n }\n\n source.insertImportDeclaration(insertIndex, {\n defaultImport: alias,\n moduleSpecifier: importPath\n });\n\n // Ensure createRegisterExtensionPlugin import exists.\n const registerExtensionPluginPath = \"@webiny/handler/plugins/RegisterExtensionPlugin.js\";\n const existingRegisterExtensionPluginImport = source.getImportDeclaration(\n registerExtensionPluginPath\n );\n if (\n existingRegisterExtensionPluginImport &&\n !existingRegisterExtensionPluginImport\n .getNamedImports()\n .some(i => i.getName() === \"createRegisterExtensionPlugin\")\n ) {\n // BuildParam imports `createRegisterBuildParamPlugin` from the same path.\n existingRegisterExtensionPluginImport.addNamedImport(\"createRegisterExtensionPlugin\");\n } else if (!existingRegisterExtensionPluginImport) {\n const lastIdx =\n source\n .getImportDeclarations()\n [source.getImportDeclarations().length - 1].getChildIndex() + 1;\n source.insertImportDeclaration(lastIdx, {\n namedImports: [\"createRegisterExtensionPlugin\"],\n moduleSpecifier: registerExtensionPluginPath\n });\n }\n\n // Ensure createHttpRouteDefinition import exists.\n const eventHandlerCorePath = \"@webiny/event-handler-core\";\n if (!source.getImportDeclaration(eventHandlerCorePath)) {\n const lastIdx =\n source\n .getImportDeclarations()\n [source.getImportDeclarations().length - 1].getChildIndex() + 1;\n source.insertImportDeclaration(lastIdx, {\n namedImports: [\"createHttpRouteDefinition\"],\n moduleSpecifier: eventHandlerCorePath\n });\n }\n\n const pluginsArray = source.getFirstDescendant(node =>\n Node.isArrayLiteralExpression(node)\n ) as ArrayLiteralExpression;\n\n // Register an HttpRouteDefinition built from the props above. The router matches on\n // definitions and only then builds the handler, so registering the handler alone would\n // leave the route unreachable: it deploys, API Gateway forwards to the Lambda, and dispatch\n // finds nothing. The path is converted to the router's `:param` syntax.\n const routerPath = toRouterPath(params.path);\n const routeName = params.routeName ?? deriveRouteName(params.path, params.method);\n\n pluginsArray.addElement(\n `\\ncreateRegisterExtensionPlugin(ctx => {\\n\\tctx.container.register(\\n\\t\\tcreateHttpRouteDefinition({\\n\\t\\t\\tname: \"${routeName}\",\\n\\t\\t\\tmethod: \"${params.method}\",\\n\\t\\t\\tpath: \"${routerPath}\",\\n\\t\\t\\thandler: ${alias}\\n\\t\\t})\\n\\t);\\n})`\n );\n\n await source.save();\n },\n render() {\n return <ApiPulumi src={p(\"RegisterRoutesPulumi.js\")} />;\n }\n});\n"],"names":["p","createPathResolver","ApiRoute","defineExtension","project","z","HTTP_METHODS","zodSrcPath","params","ctx","extensionsTsFilePath","absoluteSrcFilePath","ExtensionSrcResolver","hash","crypto","alias","importPath","path","tsProject","Project","source","insertIndex","importDeclarations","registerExtensionPluginPath","existingRegisterExtensionPluginImport","i","lastIdx","eventHandlerCorePath","pluginsArray","node","Node","routerPath","toRouterPath","routeName","deriveRouteName","ApiPulumi"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,IAAIC,mBAAmB,YAAY,OAAO;AAEzC,MAAMC,WAAWC,gBAAgB;IACpC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAa,SAAS;QAAO,SAAS;IAAM;IACpE,aAAa;IACb,UAAU;IACV,cAAc,CAAC,EAAEC,OAAO,EAAE,GACfC,EAAE,MAAM,CAAC;YAGZ,MAAMA,EAAE,MAAM,GAAG,UAAU,CAAC;YAC5B,QAAQA,CAAC,CAADA,OAAM,CAACC;YAMf,KAAKC,WAAW;gBAAEH;YAAQ;YAG1B,WAAWC,EAAE,MAAM,GAAG,QAAQ;QAClC;IAEJ,MAAM,OAAMG,MAAM,EAAEC,GAAG;QACnB,MAAMC,uBAAuBD,IAAI,OAAO,CAAC,KAAK,CAAC,eAAe,CACzD,IAAI,CAAC,QAAQ,OAAO,WAAW,OAAO,iBACtC,QAAQ;QAEb,MAAME,sBAAsBC,qBAAqB,WAAW,CAACJ,OAAO,GAAG,EAAEC,IAAI,OAAO;QAGpF,MAAMI,OAAOC,SAAAA,UAAiB,CAAC,UAAU,MAAM,CAACN,OAAO,GAAG,EAAE,MAAM,CAAC;QACnE,MAAMO,QAAQ,CAAC,SAAS,EAAEF,KAAK,KAAK,CAAC,MAAM;QAE3C,MAAMG,aAAaC,KAAAA,QACN,CAACA,KAAK,OAAO,CAACP,uBAAuBC,qBAC7C,OAAO,CAAC,WAAW;QAExB,MAAMO,YAAY,IAAIC;QACtBD,UAAU,mBAAmB,CAACR;QAC9B,MAAMU,SAASF,UAAU,oBAAoB,CAACR;QAG9C,IAAIU,OAAO,oBAAoB,CAACJ,aAC5B;QAIJ,IAAIK,cAAc;QAClB,MAAMC,qBAAqBF,OAAO,qBAAqB;QACvD,IAAIE,mBAAmB,MAAM,EACzBD,cAAcC,kBAAkB,CAACA,mBAAmB,MAAM,GAAG,EAAE,CAAC,aAAa,KAAK;QAGtFF,OAAO,uBAAuB,CAACC,aAAa;YACxC,eAAeN;YACf,iBAAiBC;QACrB;QAGA,MAAMO,8BAA8B;QACpC,MAAMC,wCAAwCJ,OAAO,oBAAoB,CACrEG;QAEJ,IACIC,yCACA,CAACA,sCACI,eAAe,GACf,IAAI,CAACC,CAAAA,IAAKA,AAAgB,oCAAhBA,EAAE,OAAO,KAGxBD,sCAAsC,cAAc,CAAC;aAClD,IAAI,CAACA,uCAAuC;YAC/C,MAAME,UACFN,OACK,qBAAqB,EACtB,CAACA,OAAO,qBAAqB,GAAG,MAAM,GAAG,EAAE,CAAC,aAAa,KAAK;YACtEA,OAAO,uBAAuB,CAACM,SAAS;gBACpC,cAAc;oBAAC;iBAAgC;gBAC/C,iBAAiBH;YACrB;QACJ;QAGA,MAAMI,uBAAuB;QAC7B,IAAI,CAACP,OAAO,oBAAoB,CAACO,uBAAuB;YACpD,MAAMD,UACFN,OACK,qBAAqB,EACtB,CAACA,OAAO,qBAAqB,GAAG,MAAM,GAAG,EAAE,CAAC,aAAa,KAAK;YACtEA,OAAO,uBAAuB,CAACM,SAAS;gBACpC,cAAc;oBAAC;iBAA4B;gBAC3C,iBAAiBC;YACrB;QACJ;QAEA,MAAMC,eAAeR,OAAO,kBAAkB,CAACS,CAAAA,OAC3CC,KAAK,wBAAwB,CAACD;QAOlC,MAAME,aAAaC,aAAaxB,OAAO,IAAI;QAC3C,MAAMyB,YAAYzB,OAAO,SAAS,IAAI0B,gBAAgB1B,OAAO,IAAI,EAAEA,OAAO,MAAM;QAEhFoB,aAAa,UAAU,CACnB,CAAC,mHAAmH,EAAEK,UAAU,mBAAmB,EAAEzB,OAAO,MAAM,CAAC,iBAAiB,EAAEuB,WAAW,mBAAmB,EAAEhB,MAAM,kBAAkB,CAAC;QAGnP,MAAMK,OAAO,IAAI;IACrB;IACA;QACI,OAAO,WAAP,GAAO,oBAACe,WAASA;YAAC,KAAKnC,EAAE;;IAC7B;AACJ"}
1
+ {"version":3,"file":"extensions/ApiRoute.js","sources":["../../src/extensions/ApiRoute.tsx"],"sourcesContent":["import React from \"react\";\nimport { defineExtension } from \"@webiny/project/defineExtension/index.js\";\nimport { ApiRoute as SharedApiRoute } from \"@webiny/project/extensions/api/index.js\";\nimport { ApiPulumi } from \"~/pulumi/extensions/ApiPulumi.js\";\nimport { createPathResolver } from \"@webiny/project\";\n\nconst p = createPathResolver(import.meta.dirname);\n\n/**\n * What `Api.Route` renders in an AWS project, registered in `registerExtensionImplementations.ts`.\n * It only adds the API Gateway route (`RegisterRoutesPulumi`). Validating the props and writing the\n * route into `extensions.ts` stay with the shared definition in `@webiny/project`, which is the one\n * the project config resolves `Api/Route` to, so there is no schema or build step here.\n */\nexport const ApiRoute = defineExtension({\n type: SharedApiRoute.def.type,\n tags: { runtimeContext: \"app-build\", hosting: \"aws\" },\n multiple: true,\n render() {\n return <ApiPulumi src={p(\"RegisterRoutesPulumi.js\")} />;\n }\n});\n"],"names":["p","createPathResolver","ApiRoute","defineExtension","SharedApiRoute","ApiPulumi"],"mappings":";;;;;AAMA,MAAMA,IAAIC,mBAAmB,YAAY,OAAO;AAQzC,MAAMC,oBAAWC,gBAAgB;IACpC,MAAMC,SAAAA,GAAAA,CAAAA,IAAuB;IAC7B,MAAM;QAAE,gBAAgB;QAAa,SAAS;IAAM;IACpD,UAAU;IACV;QACI,OAAO,WAAP,GAAO,oBAACC,WAASA;YAAC,KAAKL,EAAE;;IAC7B;AACJ"}
@@ -1,10 +1,11 @@
1
- import { CoreBeforeDeploy, UiService } from "@webiny/project/abstractions/index.js";
1
+ import { CoreBeforeDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { UiService } from "@webiny/project/abstractions/index.js";
2
3
  declare class EnsureOsServiceRoleBeforeCoreDeployImpl implements CoreBeforeDeploy.Interface {
3
4
  private uiService;
4
5
  constructor(uiService: UiService.Interface);
5
6
  execute(): Promise<void>;
6
7
  }
7
8
  export declare const EnsureOsServiceRoleBeforeCoreDeploy: typeof EnsureOsServiceRoleBeforeCoreDeployImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").ICoreBeforeDeploy>;
9
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project-extensions-aws/abstractions/index.js").ICoreBeforeDeploy>;
9
10
  };
10
11
  export {};
@@ -1,4 +1,5 @@
1
- import { CoreBeforeDeploy, UiService } from "@webiny/project/abstractions/index.js";
1
+ import { CoreBeforeDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { UiService } from "@webiny/project/abstractions/index.js";
2
3
  import { GracefulError } from "@webiny/project";
3
4
  import { IAM } from "@webiny/aws-sdk/client-iam/index.js";
4
5
  const NO_SUCH_ENTITY_IAM_ERROR = "NoSuchEntity";
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js","sources":["../../../src/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.ts"],"sourcesContent":["import { CoreBeforeDeploy, UiService } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { IAM } from \"@webiny/aws-sdk/client-iam/index.js\";\n\nconst NO_SUCH_ENTITY_IAM_ERROR = \"NoSuchEntity\";\n\nclass EnsureOsServiceRoleBeforeCoreDeployImpl implements CoreBeforeDeploy.Interface {\n constructor(private uiService: UiService.Interface) {}\n\n async execute() {\n const iam = new IAM();\n try {\n await iam.getRole({ RoleName: \"AWSServiceRoleForAmazonOpenSearchService\" });\n // Role exists, proceed silently\n } catch (err) {\n // We've seen cases where the `iam.getRole` call fails because of an issue\n // other than not being able to retrieve the service role.\n if (err.Error?.Code !== NO_SUCH_ENTITY_IAM_ERROR) {\n throw GracefulError.from(\n new Error(\"Failed to retrieve Amazon OpenSearch service role.\"),\n [\n \"An unexpected error occurred while checking for the %s service role:\",\n \"%s\",\n \"\",\n \"Please check your AWS IAM permissions and try again.\"\n ].join(\"\\n\"),\n \"AWSServiceRoleForAmazonOpenSearchService\",\n err.message\n );\n }\n\n // Role doesn't exist, try to create it\n try {\n await iam.createServiceLinkedRole({\n AWSServiceName: \"opensearchservice.amazonaws.com\"\n });\n // Created successfully, proceed silently\n } catch (err) {\n throw GracefulError.from(\n new Error(\"Failed to create Amazon OpenSearch service role.\"),\n [\n \"Could not create the required %s service role:\",\n \"%s\",\n \"\",\n \"Your options:\",\n \"• Ensure your AWS account has the necessary IAM permissions to create service-linked roles.\",\n \"• Manually create the service role using the AWS console or CLI.\",\n \"• Contact your AWS administrator for assistance.\"\n ].join(\"\\n\"),\n \"AWSServiceRoleForAmazonOpenSearchService\",\n err.message\n );\n }\n }\n }\n}\n\nexport const EnsureOsServiceRoleBeforeCoreDeploy = CoreBeforeDeploy.createImplementation({\n implementation: EnsureOsServiceRoleBeforeCoreDeployImpl,\n dependencies: [UiService]\n});\n"],"names":["NO_SUCH_ENTITY_IAM_ERROR","EnsureOsServiceRoleBeforeCoreDeployImpl","uiService","iam","IAM","err","GracefulError","Error","EnsureOsServiceRoleBeforeCoreDeploy","CoreBeforeDeploy","UiService"],"mappings":";;;AAIA,MAAMA,2BAA2B;AAEjC,MAAMC;IACF,YAAoBC,SAA8B,CAAE;aAAhCA,SAAS,GAATA;IAAiC;IAErD,MAAM,UAAU;QACZ,MAAMC,MAAM,IAAIC;QAChB,IAAI;YACA,MAAMD,IAAI,OAAO,CAAC;gBAAE,UAAU;YAA2C;QAE7E,EAAE,OAAOE,KAAK;YAGV,IAAIA,IAAI,KAAK,EAAE,SAASL,0BACpB,MAAMM,cAAc,IAAI,CACpB,IAAIC,MAAM,uDACV,oIAMA,4CACAF,IAAI,OAAO;YAKnB,IAAI;gBACA,MAAMF,IAAI,uBAAuB,CAAC;oBAC9B,gBAAgB;gBACpB;YAEJ,EAAE,OAAOE,KAAK;gBACV,MAAMC,cAAc,IAAI,CACpB,IAAIC,MAAM,qDACV,wRASA,4CACAF,IAAI,OAAO;YAEnB;QACJ;IACJ;AACJ;AAEO,MAAMG,sCAAsCC,iBAAiB,oBAAoB,CAAC;IACrF,gBAAgBR;IAChB,cAAc;QAACS;KAAU;AAC7B"}
1
+ {"version":3,"file":"extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js","sources":["../../../src/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.ts"],"sourcesContent":["import { CoreBeforeDeploy } from \"@webiny/project-extensions-aws/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { IAM } from \"@webiny/aws-sdk/client-iam/index.js\";\n\nconst NO_SUCH_ENTITY_IAM_ERROR = \"NoSuchEntity\";\n\nclass EnsureOsServiceRoleBeforeCoreDeployImpl implements CoreBeforeDeploy.Interface {\n constructor(private uiService: UiService.Interface) {}\n\n async execute() {\n const iam = new IAM();\n try {\n await iam.getRole({ RoleName: \"AWSServiceRoleForAmazonOpenSearchService\" });\n // Role exists, proceed silently\n } catch (err) {\n // We've seen cases where the `iam.getRole` call fails because of an issue\n // other than not being able to retrieve the service role.\n if (err.Error?.Code !== NO_SUCH_ENTITY_IAM_ERROR) {\n throw GracefulError.from(\n new Error(\"Failed to retrieve Amazon OpenSearch service role.\"),\n [\n \"An unexpected error occurred while checking for the %s service role:\",\n \"%s\",\n \"\",\n \"Please check your AWS IAM permissions and try again.\"\n ].join(\"\\n\"),\n \"AWSServiceRoleForAmazonOpenSearchService\",\n err.message\n );\n }\n\n // Role doesn't exist, try to create it\n try {\n await iam.createServiceLinkedRole({\n AWSServiceName: \"opensearchservice.amazonaws.com\"\n });\n // Created successfully, proceed silently\n } catch (err) {\n throw GracefulError.from(\n new Error(\"Failed to create Amazon OpenSearch service role.\"),\n [\n \"Could not create the required %s service role:\",\n \"%s\",\n \"\",\n \"Your options:\",\n \"• Ensure your AWS account has the necessary IAM permissions to create service-linked roles.\",\n \"• Manually create the service role using the AWS console or CLI.\",\n \"• Contact your AWS administrator for assistance.\"\n ].join(\"\\n\"),\n \"AWSServiceRoleForAmazonOpenSearchService\",\n err.message\n );\n }\n }\n }\n}\n\nexport const EnsureOsServiceRoleBeforeCoreDeploy = CoreBeforeDeploy.createImplementation({\n implementation: EnsureOsServiceRoleBeforeCoreDeployImpl,\n dependencies: [UiService]\n});\n"],"names":["NO_SUCH_ENTITY_IAM_ERROR","EnsureOsServiceRoleBeforeCoreDeployImpl","uiService","iam","IAM","err","GracefulError","Error","EnsureOsServiceRoleBeforeCoreDeploy","CoreBeforeDeploy","UiService"],"mappings":";;;;AAKA,MAAMA,2BAA2B;AAEjC,MAAMC;IACF,YAAoBC,SAA8B,CAAE;aAAhCA,SAAS,GAATA;IAAiC;IAErD,MAAM,UAAU;QACZ,MAAMC,MAAM,IAAIC;QAChB,IAAI;YACA,MAAMD,IAAI,OAAO,CAAC;gBAAE,UAAU;YAA2C;QAE7E,EAAE,OAAOE,KAAK;YAGV,IAAIA,IAAI,KAAK,EAAE,SAASL,0BACpB,MAAMM,cAAc,IAAI,CACpB,IAAIC,MAAM,uDACV,oIAMA,4CACAF,IAAI,OAAO;YAKnB,IAAI;gBACA,MAAMF,IAAI,uBAAuB,CAAC;oBAC9B,gBAAgB;gBACpB;YAEJ,EAAE,OAAOE,KAAK;gBACV,MAAMC,cAAc,IAAI,CACpB,IAAIC,MAAM,qDACV,wRASA,4CACAF,IAAI,OAAO;YAEnB;QACJ;IACJ;AACJ;AAEO,MAAMG,sCAAsCC,iBAAiB,oBAAoB,CAAC;IACrF,gBAAgBR;IAChB,cAAc;QAACS;KAAU;AAC7B"}
@@ -1,4 +1,4 @@
1
- import { CoreBeforeDeploy } from "@webiny/project/abstractions/index.js";
1
+ import { CoreBeforeDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
2
  import { CoreStackOutputService } from "@webiny/project-extensions-aws/abstractions/index.js";
3
3
  declare class EnsureOsWasDeployedImpl implements CoreBeforeDeploy.Interface {
4
4
  private coreStackOutputService;
@@ -6,6 +6,6 @@ declare class EnsureOsWasDeployedImpl implements CoreBeforeDeploy.Interface {
6
6
  execute(): Promise<void>;
7
7
  }
8
8
  export declare const EnsureOsWasDeployed: typeof EnsureOsWasDeployedImpl & {
9
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").ICoreBeforeDeploy>;
9
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project-extensions-aws/abstractions/index.js").ICoreBeforeDeploy>;
10
10
  };
11
11
  export {};
@@ -1,6 +1,5 @@
1
- import { CoreBeforeDeploy } from "@webiny/project/abstractions/index.js";
1
+ import { CoreBeforeDeploy, CoreStackOutputService } from "@webiny/project-extensions-aws/abstractions/index.js";
2
2
  import { GracefulError } from "@webiny/project";
3
- import { CoreStackOutputService } from "@webiny/project-extensions-aws/abstractions/index.js";
4
3
  class EnsureOsWasDeployedImpl {
5
4
  constructor(coreStackOutputService){
6
5
  this.coreStackOutputService = coreStackOutputService;
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/OpenSearch/EnsureOsWasDeployed.js","sources":["../../../src/extensions/OpenSearch/EnsureOsWasDeployed.ts"],"sourcesContent":["import { CoreBeforeDeploy } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { CoreStackOutputService } from \"@webiny/project-extensions-aws/abstractions/index.js\";\n\nclass EnsureOsWasDeployedImpl implements CoreBeforeDeploy.Interface {\n constructor(private coreStackOutputService: CoreStackOutputService.Interface) {}\n\n async execute() {\n // Get the stack output from the core application\n // CoreStackOutputService automatically uses env/variant/region from ProjectSdkParamsService\n const output = await this.coreStackOutputService.execute();\n\n // If there's no output, Core hasn't been deployed yet, so we can proceed.\n if (!output?.databaseSetup) {\n return;\n }\n\n // Check if `databaseSetup` matches 'ddb+os'\n // If it matches, Core was deployed with OpenSearch and we can proceed.\n const hasDatabaseSetup = output.databaseSetup === \"ddb+os\";\n if (hasDatabaseSetup) {\n return;\n }\n\n // Core was previously deployed without OpenSearch or with a different setup\n throw GracefulError.from(\n new Error(\n \"Cannot deploy with OpenSearch enabled. The Core application was previously deployed with a different database setup.\"\n ),\n [\n \"Once a deployment method is chosen (%s or %s), you cannot switch between them.\",\n \"\",\n \"Your options:\",\n \"• If you want to use %s, you need to destroy and redeploy the entire project from scratch.\",\n \"• If you want to continue without %s, disable it in your %s config file.\",\n \"\",\n \"Learn more: https://webiny.link/deploy-diff-db-setup\"\n ].join(\"\\n\"),\n \"DynamoDB-only\",\n \"DynamoDB+OpenSearch\",\n \"OpenSearch\",\n \"OpenSearch\",\n \"webiny.config.tsx\"\n );\n }\n}\n\nexport const EnsureOsWasDeployed = CoreBeforeDeploy.createImplementation({\n implementation: EnsureOsWasDeployedImpl,\n dependencies: [CoreStackOutputService]\n});\n"],"names":["EnsureOsWasDeployedImpl","coreStackOutputService","output","hasDatabaseSetup","GracefulError","Error","EnsureOsWasDeployed","CoreBeforeDeploy","CoreStackOutputService"],"mappings":";;;AAIA,MAAMA;IACF,YAAoBC,sBAAwD,CAAE;aAA1DA,sBAAsB,GAAtBA;IAA2D;IAE/E,MAAM,UAAU;QAGZ,MAAMC,SAAS,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO;QAGxD,IAAI,CAACA,QAAQ,eACT;QAKJ,MAAMC,mBAAmBD,AAAyB,aAAzBA,OAAO,aAAa;QAC7C,IAAIC,kBACA;QAIJ,MAAMC,cAAc,IAAI,CACpB,IAAIC,MACA,yHAEJ,iUASA,iBACA,uBACA,cACA,cACA;IAER;AACJ;AAEO,MAAMC,sBAAsBC,iBAAiB,oBAAoB,CAAC;IACrE,gBAAgBP;IAChB,cAAc;QAACQ;KAAuB;AAC1C"}
1
+ {"version":3,"file":"extensions/OpenSearch/EnsureOsWasDeployed.js","sources":["../../../src/extensions/OpenSearch/EnsureOsWasDeployed.ts"],"sourcesContent":["import { CoreBeforeDeploy } from \"@webiny/project-extensions-aws/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\nimport { CoreStackOutputService } from \"@webiny/project-extensions-aws/abstractions/index.js\";\n\nclass EnsureOsWasDeployedImpl implements CoreBeforeDeploy.Interface {\n constructor(private coreStackOutputService: CoreStackOutputService.Interface) {}\n\n async execute() {\n // Get the stack output from the core application\n // CoreStackOutputService automatically uses env/variant/region from ProjectSdkParamsService\n const output = await this.coreStackOutputService.execute();\n\n // If there's no output, Core hasn't been deployed yet, so we can proceed.\n if (!output?.databaseSetup) {\n return;\n }\n\n // Check if `databaseSetup` matches 'ddb+os'\n // If it matches, Core was deployed with OpenSearch and we can proceed.\n const hasDatabaseSetup = output.databaseSetup === \"ddb+os\";\n if (hasDatabaseSetup) {\n return;\n }\n\n // Core was previously deployed without OpenSearch or with a different setup\n throw GracefulError.from(\n new Error(\n \"Cannot deploy with OpenSearch enabled. The Core application was previously deployed with a different database setup.\"\n ),\n [\n \"Once a deployment method is chosen (%s or %s), you cannot switch between them.\",\n \"\",\n \"Your options:\",\n \"• If you want to use %s, you need to destroy and redeploy the entire project from scratch.\",\n \"• If you want to continue without %s, disable it in your %s config file.\",\n \"\",\n \"Learn more: https://webiny.link/deploy-diff-db-setup\"\n ].join(\"\\n\"),\n \"DynamoDB-only\",\n \"DynamoDB+OpenSearch\",\n \"OpenSearch\",\n \"OpenSearch\",\n \"webiny.config.tsx\"\n );\n }\n}\n\nexport const EnsureOsWasDeployed = CoreBeforeDeploy.createImplementation({\n implementation: EnsureOsWasDeployedImpl,\n dependencies: [CoreStackOutputService]\n});\n"],"names":["EnsureOsWasDeployedImpl","coreStackOutputService","output","hasDatabaseSetup","GracefulError","Error","EnsureOsWasDeployed","CoreBeforeDeploy","CoreStackOutputService"],"mappings":";;AAIA,MAAMA;IACF,YAAoBC,sBAAwD,CAAE;aAA1DA,sBAAsB,GAAtBA;IAA2D;IAE/E,MAAM,UAAU;QAGZ,MAAMC,SAAS,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO;QAGxD,IAAI,CAACA,QAAQ,eACT;QAKJ,MAAMC,mBAAmBD,AAAyB,aAAzBA,OAAO,aAAa;QAC7C,IAAIC,kBACA;QAIJ,MAAMC,cAAc,IAAI,CACpB,IAAIC,MACA,yHAEJ,iUASA,iBACA,uBACA,cACA,cACA;IAER;AACJ;AAEO,MAAMC,sBAAsBC,iBAAiB,oBAAoB,CAAC;IACrE,gBAAgBP;IAChB,cAAc;QAACQ;KAAuB;AAC1C"}
@@ -1,8 +1,8 @@
1
1
  import react from "react";
2
2
  import { defineExtension } from "@webiny/project/defineExtension/index.js";
3
- import { PulumiOpenSearch, openSearchParamsSchema } from "@webiny/project-extensions-aws/extensions/index.js";
3
+ import { CoreBeforeDeploy, PulumiOpenSearch, openSearchParamsSchema } from "@webiny/project-extensions-aws/extensions/index.js";
4
4
  import { createPathResolver } from "@webiny/project";
5
- import { CoreBeforeDeploy, DatabaseSetup, ProjectDecorator } from "@webiny/project/extensions/index.js";
5
+ import { DatabaseSetup, ProjectDecorator } from "@webiny/project/extensions/index.js";
6
6
  const p = createPathResolver(import.meta.dirname, "OpenSearch");
7
7
  const OpenSearch = defineExtension({
8
8
  type: "Project/OpenSearch",
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/OpenSearch.js","sources":["../../src/extensions/OpenSearch.tsx"],"sourcesContent":["import React from \"react\";\nimport { defineExtension } from \"@webiny/project/defineExtension/index.js\";\nimport { openSearchParamsSchema } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { PulumiOpenSearch } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { createPathResolver } from \"@webiny/project\";\nimport {\n CoreBeforeDeploy,\n ProjectDecorator,\n DatabaseSetup\n} from \"@webiny/project/extensions/index.js\";\n\nconst p = createPathResolver(import.meta.dirname, \"OpenSearch\");\n\nexport const OpenSearch = defineExtension({\n type: \"Project/OpenSearch\",\n tags: { runtimeContext: \"project\", hosting: \"aws\" },\n description: \"Enable and configure Opensearch integration with project-level setup.\",\n paramsSchema: openSearchParamsSchema,\n render: props => {\n return (\n <>\n <PulumiOpenSearch {...props} />\n {props.enabled && (\n <>\n {/* Override database setup to indicate OpenSearch is enabled. */}\n <DatabaseSetup setupName=\"ddb+os\" />\n <ProjectDecorator src={p(\"InjectDdbEsLambdaFnHandler.js\")} />\n <ProjectDecorator src={p(\"ReplaceApiLambdaFnHandlers.js\")} />\n <CoreBeforeDeploy src={p(\"EnsureOsServiceRoleBeforeCoreDeploy.js\")} />\n <CoreBeforeDeploy src={p(\"EnsureOsWasDeployed.js\")} />\n </>\n )}\n </>\n );\n }\n});\n"],"names":["p","createPathResolver","OpenSearch","defineExtension","openSearchParamsSchema","props","PulumiOpenSearch","DatabaseSetup","ProjectDecorator","CoreBeforeDeploy"],"mappings":";;;;;AAWA,MAAMA,IAAIC,mBAAmB,YAAY,OAAO,EAAE;AAE3C,MAAMC,aAAaC,gBAAgB;IACtC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC;IACd,QAAQC,CAAAA,QACG,WAAP,GACI,wDACI,oBAACC,kBAAqBD,QACrBA,MAAM,OAAO,IAAI,WAAJ,GACV,wDAEI,oBAACE,eAAaA;YAAC,WAAU;0BACzB,oBAACC,kBAAgBA;YAAC,KAAKR,EAAE;0BACzB,oBAACQ,kBAAgBA;YAAC,KAAKR,EAAE;0BACzB,oBAACS,kBAAgBA;YAAC,KAAKT,EAAE;0BACzB,oBAACS,kBAAgBA;YAAC,KAAKT,EAAE;;AAMjD"}
1
+ {"version":3,"file":"extensions/OpenSearch.js","sources":["../../src/extensions/OpenSearch.tsx"],"sourcesContent":["import React from \"react\";\nimport { defineExtension } from \"@webiny/project/defineExtension/index.js\";\nimport { openSearchParamsSchema } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { PulumiOpenSearch } from \"@webiny/project-extensions-aws/extensions/index.js\";\nimport { createPathResolver } from \"@webiny/project\";\nimport { ProjectDecorator } from \"@webiny/project/extensions/index.js\";\nimport { DatabaseSetup } from \"@webiny/project/extensions/index.js\";\nimport { CoreBeforeDeploy } from \"@webiny/project-extensions-aws/extensions/index.js\";\n\nconst p = createPathResolver(import.meta.dirname, \"OpenSearch\");\n\nexport const OpenSearch = defineExtension({\n type: \"Project/OpenSearch\",\n tags: { runtimeContext: \"project\", hosting: \"aws\" },\n description: \"Enable and configure Opensearch integration with project-level setup.\",\n paramsSchema: openSearchParamsSchema,\n render: props => {\n return (\n <>\n <PulumiOpenSearch {...props} />\n {props.enabled && (\n <>\n {/* Override database setup to indicate OpenSearch is enabled. */}\n <DatabaseSetup setupName=\"ddb+os\" />\n <ProjectDecorator src={p(\"InjectDdbEsLambdaFnHandler.js\")} />\n <ProjectDecorator src={p(\"ReplaceApiLambdaFnHandlers.js\")} />\n <CoreBeforeDeploy src={p(\"EnsureOsServiceRoleBeforeCoreDeploy.js\")} />\n <CoreBeforeDeploy src={p(\"EnsureOsWasDeployed.js\")} />\n </>\n )}\n </>\n );\n }\n});\n"],"names":["p","createPathResolver","OpenSearch","defineExtension","openSearchParamsSchema","props","PulumiOpenSearch","DatabaseSetup","ProjectDecorator","CoreBeforeDeploy"],"mappings":";;;;;AASA,MAAMA,IAAIC,mBAAmB,YAAY,OAAO,EAAE;AAE3C,MAAMC,aAAaC,gBAAgB;IACtC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC;IACd,QAAQC,CAAAA,QACG,WAAP,GACI,wDACI,oBAACC,kBAAqBD,QACrBA,MAAM,OAAO,IAAI,WAAJ,GACV,wDAEI,oBAACE,eAAaA;YAAC,WAAU;0BACzB,oBAACC,kBAAgBA;YAAC,KAAKR,EAAE;0BACzB,oBAACQ,kBAAgBA;YAAC,KAAKR,EAAE;0BACzB,oBAACS,kBAAgBA;YAAC,KAAKT,EAAE;0BACzB,oBAACS,kBAAgBA;YAAC,KAAKT,EAAE;;AAMjD"}
@@ -1,4 +1,4 @@
1
- import { ApiAfterDeploy } from "@webiny/project/abstractions/index.js";
1
+ import { ApiAfterDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
2
  import { UiService } from "@webiny/project/abstractions/services/UiService.js";
3
3
  import { LoggerService } from "@webiny/project/abstractions/services/LoggerService.js";
4
4
  import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
@@ -12,6 +12,6 @@ declare class AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface
12
12
  execute(params: ApiAfterDeploy.Params): Promise<void>;
13
13
  }
14
14
  export declare const AutoInstallAfterApiDeploy: typeof AutoInstallAfterApiDeployImpl & {
15
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IApiAfterDeploy>;
15
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project-extensions-aws/abstractions/index.js").IApiAfterDeploy>;
16
16
  };
17
17
  export {};
@@ -1,6 +1,7 @@
1
- import { ApiAfterDeploy, GetProjectConfigService } from "@webiny/project/abstractions/index.js";
1
+ import { ApiAfterDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
2
  import { UiService } from "@webiny/project/abstractions/services/UiService.js";
3
3
  import { LoggerService } from "@webiny/project/abstractions/services/LoggerService.js";
4
+ import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
4
5
  import { ApiGqlClient } from "@webiny/project-extensions-aws/abstractions/ApiGqlClient.js";
5
6
  const IS_INSTALLED_QUERY = `
6
7
  query IsSystemInstalled {
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js","sources":["../../../../src/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.ts"],"sourcesContent":["import { ApiAfterDeploy } from \"@webiny/project/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/services/UiService.js\";\nimport { LoggerService } from \"@webiny/project/abstractions/services/LoggerService.js\";\nimport { GetProjectConfigService } from \"@webiny/project/abstractions/index.js\";\nimport { ApiGqlClient } from \"@webiny/project-extensions-aws/abstractions/ApiGqlClient.js\";\n\nconst IS_INSTALLED_QUERY = `\n query IsSystemInstalled {\n system {\n isSystemInstalled {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\nconst INSTALL_MUTATION = `\n mutation InstallSystem($installationInput: JSON!) {\n system {\n installSystem(installationInput: $installationInput) {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\ninterface IsInstalledResponse {\n system: {\n isSystemInstalled: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\ninterface InstallResponse {\n system: {\n installSystem: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\nclass AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface {\n constructor(\n private apiGqlClient: ApiGqlClient.Interface,\n private ui: UiService.Interface,\n private getProjectConfig: GetProjectConfigService.Interface,\n private logger: LoggerService.Interface\n ) {}\n\n async execute(params: ApiAfterDeploy.Params): Promise<void> {\n if (params.preview) {\n // Skip auto-install on preview deployments\n return;\n }\n\n const projectConfig = await this.getProjectConfig.execute();\n const adminAutoInstallExtensions = projectConfig.extensionsByType(\"Project/AutoInstall\");\n\n if (adminAutoInstallExtensions.length === 0) {\n return;\n }\n\n const config = adminAutoInstallExtensions[0].params;\n\n // Check if system is already installed\n this.ui.info(\"Checking if system is already installed...\");\n\n try {\n const isInstalledResponse = await this.apiGqlClient.query<IsInstalledResponse>({\n query: IS_INSTALLED_QUERY\n });\n\n if (isInstalledResponse.data?.system.isSystemInstalled.data === true) {\n this.ui.info(\"System is already installed, skipping auto-install.\");\n return;\n }\n } catch (error: any) {\n this.logger.error(\"Failed to check installation status\", { error });\n this.ui.warning(`Could not check installation status: ${error.message}`);\n return;\n }\n\n this.ui.info(\"Auto-installing...\");\n /**\n * Type Error introduced with Zod v4. V3 had any type.\n */\n // @ts-expect-error\n const adminUser = config.adminUser || {\n firstName: \"John\",\n lastName: \"Smith\",\n email: \"admin@webiny.com\",\n password: \"12345678\"\n };\n\n const variables = {\n installationInput: [\n {\n app: \"Cognito\",\n data: adminUser\n }\n ]\n };\n\n const installResponse = await this.apiGqlClient.mutation<InstallResponse>({\n mutation: INSTALL_MUTATION,\n variables\n });\n\n if (installResponse.data?.system.installSystem.error) {\n const { message, code } = installResponse.data.system.installSystem.error;\n this.logger.error(\"Installation failed\", { message, code });\n this.ui.error(`Installation failed: ${message} (${code})`);\n throw new Error(message);\n }\n\n this.ui.success(\"System installed successfully!\");\n this.ui.info(\"Admin credentials:\");\n this.ui.info(` Email: ${adminUser.email}`);\n this.ui.info(` Password: ${adminUser.password}`);\n }\n}\n\nexport const AutoInstallAfterApiDeploy = ApiAfterDeploy.createImplementation({\n implementation: AutoInstallAfterApiDeployImpl,\n dependencies: [ApiGqlClient, UiService, GetProjectConfigService, LoggerService]\n});\n"],"names":["IS_INSTALLED_QUERY","INSTALL_MUTATION","AutoInstallAfterApiDeployImpl","apiGqlClient","ui","getProjectConfig","logger","params","projectConfig","adminAutoInstallExtensions","config","isInstalledResponse","error","adminUser","variables","installResponse","message","code","Error","AutoInstallAfterApiDeploy","ApiAfterDeploy","ApiGqlClient","UiService","GetProjectConfigService","LoggerService"],"mappings":";;;;AAMA,MAAMA,qBAAqB,CAAC;;;;;;;;;;;;AAY5B,CAAC;AAED,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;AAY1B,CAAC;AA0BD,MAAMC;IACF,YACYC,YAAoC,EACpCC,EAAuB,EACvBC,gBAAmD,EACnDC,MAA+B,CACzC;aAJUH,YAAY,GAAZA;aACAC,EAAE,GAAFA;aACAC,gBAAgB,GAAhBA;aACAC,MAAM,GAANA;IACT;IAEH,MAAM,QAAQC,MAA6B,EAAiB;QACxD,IAAIA,OAAO,OAAO,EAEd;QAGJ,MAAMC,gBAAgB,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO;QACzD,MAAMC,6BAA6BD,cAAc,gBAAgB,CAAC;QAElE,IAAIC,AAAsC,MAAtCA,2BAA2B,MAAM,EACjC;QAGJ,MAAMC,SAASD,0BAA0B,CAAC,EAAE,CAAC,MAAM;QAGnD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAEb,IAAI;YACA,MAAME,sBAAsB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAsB;gBAC3E,OAAOX;YACX;YAEA,IAAIW,oBAAoB,IAAI,EAAE,OAAO,kBAAkB,SAAS,MAAM,YAClE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAGrB,EAAE,OAAOC,OAAY;YACjB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC;gBAAEA;YAAM;YACjE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,qCAAqC,EAAEA,MAAM,OAAO,EAAE;YACvE;QACJ;QAEA,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAKb,MAAMC,YAAYH,OAAO,SAAS,IAAI;YAClC,WAAW;YACX,UAAU;YACV,OAAO;YACP,UAAU;QACd;QAEA,MAAMI,YAAY;YACd,mBAAmB;gBACf;oBACI,KAAK;oBACL,MAAMD;gBACV;aACH;QACL;QAEA,MAAME,kBAAkB,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAkB;YACtE,UAAUd;YACVa;QACJ;QAEA,IAAIC,gBAAgB,IAAI,EAAE,OAAO,cAAc,OAAO;YAClD,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGF,gBAAgB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK;YACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB;gBAAEC;gBAASC;YAAK;YACzD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,qBAAqB,EAAED,QAAQ,EAAE,EAAEC,KAAK,CAAC,CAAC;YACzD,MAAM,IAAIC,MAAMF;QACpB;QAEA,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;QAChB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QACb,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAEH,UAAU,KAAK,EAAE;QACzC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAEA,UAAU,QAAQ,EAAE;IACnD;AACJ;AAEO,MAAMM,4BAA4BC,eAAe,oBAAoB,CAAC;IACzE,gBAAgBlB;IAChB,cAAc;QAACmB;QAAcC;QAAWC;QAAyBC;KAAc;AACnF"}
1
+ {"version":3,"file":"extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js","sources":["../../../../src/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.ts"],"sourcesContent":["import { ApiAfterDeploy } from \"@webiny/project-extensions-aws/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/services/UiService.js\";\nimport { LoggerService } from \"@webiny/project/abstractions/services/LoggerService.js\";\nimport { GetProjectConfigService } from \"@webiny/project/abstractions/index.js\";\nimport { ApiGqlClient } from \"@webiny/project-extensions-aws/abstractions/ApiGqlClient.js\";\n\nconst IS_INSTALLED_QUERY = `\n query IsSystemInstalled {\n system {\n isSystemInstalled {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\nconst INSTALL_MUTATION = `\n mutation InstallSystem($installationInput: JSON!) {\n system {\n installSystem(installationInput: $installationInput) {\n data\n error {\n message\n code\n }\n }\n }\n }\n`;\n\ninterface IsInstalledResponse {\n system: {\n isSystemInstalled: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\ninterface InstallResponse {\n system: {\n installSystem: {\n data: boolean;\n error?: {\n message: string;\n code: string;\n };\n };\n };\n}\n\nclass AutoInstallAfterApiDeployImpl implements ApiAfterDeploy.Interface {\n constructor(\n private apiGqlClient: ApiGqlClient.Interface,\n private ui: UiService.Interface,\n private getProjectConfig: GetProjectConfigService.Interface,\n private logger: LoggerService.Interface\n ) {}\n\n async execute(params: ApiAfterDeploy.Params): Promise<void> {\n if (params.preview) {\n // Skip auto-install on preview deployments\n return;\n }\n\n const projectConfig = await this.getProjectConfig.execute();\n const adminAutoInstallExtensions = projectConfig.extensionsByType(\"Project/AutoInstall\");\n\n if (adminAutoInstallExtensions.length === 0) {\n return;\n }\n\n const config = adminAutoInstallExtensions[0].params;\n\n // Check if system is already installed\n this.ui.info(\"Checking if system is already installed...\");\n\n try {\n const isInstalledResponse = await this.apiGqlClient.query<IsInstalledResponse>({\n query: IS_INSTALLED_QUERY\n });\n\n if (isInstalledResponse.data?.system.isSystemInstalled.data === true) {\n this.ui.info(\"System is already installed, skipping auto-install.\");\n return;\n }\n } catch (error: any) {\n this.logger.error(\"Failed to check installation status\", { error });\n this.ui.warning(`Could not check installation status: ${error.message}`);\n return;\n }\n\n this.ui.info(\"Auto-installing...\");\n /**\n * Type Error introduced with Zod v4. V3 had any type.\n */\n // @ts-expect-error\n const adminUser = config.adminUser || {\n firstName: \"John\",\n lastName: \"Smith\",\n email: \"admin@webiny.com\",\n password: \"12345678\"\n };\n\n const variables = {\n installationInput: [\n {\n app: \"Cognito\",\n data: adminUser\n }\n ]\n };\n\n const installResponse = await this.apiGqlClient.mutation<InstallResponse>({\n mutation: INSTALL_MUTATION,\n variables\n });\n\n if (installResponse.data?.system.installSystem.error) {\n const { message, code } = installResponse.data.system.installSystem.error;\n this.logger.error(\"Installation failed\", { message, code });\n this.ui.error(`Installation failed: ${message} (${code})`);\n throw new Error(message);\n }\n\n this.ui.success(\"System installed successfully!\");\n this.ui.info(\"Admin credentials:\");\n this.ui.info(` Email: ${adminUser.email}`);\n this.ui.info(` Password: ${adminUser.password}`);\n }\n}\n\nexport const AutoInstallAfterApiDeploy = ApiAfterDeploy.createImplementation({\n implementation: AutoInstallAfterApiDeployImpl,\n dependencies: [ApiGqlClient, UiService, GetProjectConfigService, LoggerService]\n});\n"],"names":["IS_INSTALLED_QUERY","INSTALL_MUTATION","AutoInstallAfterApiDeployImpl","apiGqlClient","ui","getProjectConfig","logger","params","projectConfig","adminAutoInstallExtensions","config","isInstalledResponse","error","adminUser","variables","installResponse","message","code","Error","AutoInstallAfterApiDeploy","ApiAfterDeploy","ApiGqlClient","UiService","GetProjectConfigService","LoggerService"],"mappings":";;;;;AAMA,MAAMA,qBAAqB,CAAC;;;;;;;;;;;;AAY5B,CAAC;AAED,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;AAY1B,CAAC;AA0BD,MAAMC;IACF,YACYC,YAAoC,EACpCC,EAAuB,EACvBC,gBAAmD,EACnDC,MAA+B,CACzC;aAJUH,YAAY,GAAZA;aACAC,EAAE,GAAFA;aACAC,gBAAgB,GAAhBA;aACAC,MAAM,GAANA;IACT;IAEH,MAAM,QAAQC,MAA6B,EAAiB;QACxD,IAAIA,OAAO,OAAO,EAEd;QAGJ,MAAMC,gBAAgB,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO;QACzD,MAAMC,6BAA6BD,cAAc,gBAAgB,CAAC;QAElE,IAAIC,AAAsC,MAAtCA,2BAA2B,MAAM,EACjC;QAGJ,MAAMC,SAASD,0BAA0B,CAAC,EAAE,CAAC,MAAM;QAGnD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAEb,IAAI;YACA,MAAME,sBAAsB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAsB;gBAC3E,OAAOX;YACX;YAEA,IAAIW,oBAAoB,IAAI,EAAE,OAAO,kBAAkB,SAAS,MAAM,YAClE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAGrB,EAAE,OAAOC,OAAY;YACjB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC;gBAAEA;YAAM;YACjE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,qCAAqC,EAAEA,MAAM,OAAO,EAAE;YACvE;QACJ;QAEA,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAKb,MAAMC,YAAYH,OAAO,SAAS,IAAI;YAClC,WAAW;YACX,UAAU;YACV,OAAO;YACP,UAAU;QACd;QAEA,MAAMI,YAAY;YACd,mBAAmB;gBACf;oBACI,KAAK;oBACL,MAAMD;gBACV;aACH;QACL;QAEA,MAAME,kBAAkB,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAkB;YACtE,UAAUd;YACVa;QACJ;QAEA,IAAIC,gBAAgB,IAAI,EAAE,OAAO,cAAc,OAAO;YAClD,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGF,gBAAgB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK;YACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB;gBAAEC;gBAASC;YAAK;YACzD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,qBAAqB,EAAED,QAAQ,EAAE,EAAEC,KAAK,CAAC,CAAC;YACzD,MAAM,IAAIC,MAAMF;QACpB;QAEA,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;QAChB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QACb,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAEH,UAAU,KAAK,EAAE;QACzC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAEA,UAAU,QAAQ,EAAE;IACnD;AACJ;AAEO,MAAMM,4BAA4BC,eAAe,oBAAoB,CAAC;IACzE,gBAAgBlB;IAChB,cAAc;QAACmB;QAAcC;QAAWC;QAAyBC;KAAc;AACnF"}
@@ -1,10 +1,11 @@
1
- import { BeforeDeploy, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { BeforeDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
2
3
  declare class PrintDeploymentInfoAfterDeployImpl implements BeforeDeploy.Interface {
3
4
  private projectSdkParamsService;
4
5
  constructor(projectSdkParamsService: ProjectSdkParamsService.Interface);
5
6
  execute(params: BeforeDeploy.Params): Promise<void>;
6
7
  }
7
8
  export declare const EnsureVariantBeforeDeploy: typeof PrintDeploymentInfoAfterDeployImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IBeforeDeploy>;
9
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project-extensions-aws/abstractions/index.js").IBeforeDeploy>;
9
10
  };
10
11
  export {};
@@ -1,4 +1,5 @@
1
- import { BeforeDeploy, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { BeforeDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
2
3
  class PrintDeploymentInfoAfterDeployImpl {
3
4
  constructor(projectSdkParamsService){
4
5
  this.projectSdkParamsService = projectSdkParamsService;
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js","sources":["../../../../src/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.ts"],"sourcesContent":["import { BeforeDeploy, ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\n\nclass PrintDeploymentInfoAfterDeployImpl implements BeforeDeploy.Interface {\n constructor(private projectSdkParamsService: ProjectSdkParamsService.Interface) {}\n\n async execute(params: BeforeDeploy.Params) {\n if (params.app !== \"blueGreen\") {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const { env, variant } = sdkParams;\n\n if (!variant?.length) {\n return;\n }\n const message = `Cannot deploy Blue / Green system environment (${env}) with a variant (${variant}).`;\n throw new Error(message);\n }\n}\n\nexport const EnsureVariantBeforeDeploy = BeforeDeploy.createImplementation({\n implementation: PrintDeploymentInfoAfterDeployImpl,\n dependencies: [ProjectSdkParamsService]\n});\n"],"names":["PrintDeploymentInfoAfterDeployImpl","projectSdkParamsService","params","sdkParams","env","variant","message","Error","EnsureVariantBeforeDeploy","BeforeDeploy","ProjectSdkParamsService"],"mappings":";AAEA,MAAMA;IACF,YAAoBC,uBAA0D,CAAE;aAA5DA,uBAAuB,GAAvBA;IAA6D;IAEjF,MAAM,QAAQC,MAA2B,EAAE;QACvC,IAAIA,AAAe,gBAAfA,OAAO,GAAG,EACV;QAGJ,MAAMC,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAE,GAAGF;QAEzB,IAAI,CAACE,SAAS,QACV;QAEJ,MAAMC,UAAU,CAAC,+CAA+C,EAAEF,IAAI,kBAAkB,EAAEC,QAAQ,EAAE,CAAC;QACrG,MAAM,IAAIE,MAAMD;IACpB;AACJ;AAEO,MAAME,4BAA4BC,aAAa,oBAAoB,CAAC;IACvE,gBAAgBT;IAChB,cAAc;QAACU;KAAwB;AAC3C"}
1
+ {"version":3,"file":"extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js","sources":["../../../../src/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.ts"],"sourcesContent":["import { BeforeDeploy } from \"@webiny/project-extensions-aws/abstractions/index.js\";\nimport { ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\n\nclass PrintDeploymentInfoAfterDeployImpl implements BeforeDeploy.Interface {\n constructor(private projectSdkParamsService: ProjectSdkParamsService.Interface) {}\n\n async execute(params: BeforeDeploy.Params) {\n if (params.app !== \"blueGreen\") {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const { env, variant } = sdkParams;\n\n if (!variant?.length) {\n return;\n }\n const message = `Cannot deploy Blue / Green system environment (${env}) with a variant (${variant}).`;\n throw new Error(message);\n }\n}\n\nexport const EnsureVariantBeforeDeploy = BeforeDeploy.createImplementation({\n implementation: PrintDeploymentInfoAfterDeployImpl,\n dependencies: [ProjectSdkParamsService]\n});\n"],"names":["PrintDeploymentInfoAfterDeployImpl","projectSdkParamsService","params","sdkParams","env","variant","message","Error","EnsureVariantBeforeDeploy","BeforeDeploy","ProjectSdkParamsService"],"mappings":";;AAGA,MAAMA;IACF,YAAoBC,uBAA0D,CAAE;aAA5DA,uBAAuB,GAAvBA;IAA6D;IAEjF,MAAM,QAAQC,MAA2B,EAAE;QACvC,IAAIA,AAAe,gBAAfA,OAAO,GAAG,EACV;QAGJ,MAAMC,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAE,GAAGF;QAEzB,IAAI,CAACE,SAAS,QACV;QAEJ,MAAMC,UAAU,CAAC,+CAA+C,EAAEF,IAAI,kBAAkB,EAAEC,QAAQ,EAAE,CAAC;QACrG,MAAM,IAAIE,MAAMD;IACpB;AACJ;AAEO,MAAME,4BAA4BC,aAAa,oBAAoB,CAAC;IACvE,gBAAgBT;IAChB,cAAc;QAACU;KAAwB;AAC3C"}
@@ -1,4 +1,7 @@
1
- import { AfterDeploy, GetAppStackOutput, ProjectSdkParamsService, UiService } from "@webiny/project/abstractions/index.js";
1
+ import { AfterDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { GetAppStackOutput } from "../../../abstractions/features/GetAppStackOutput.js";
3
+ import { ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
4
+ import { UiService } from "@webiny/project/abstractions/index.js";
2
5
  export interface IEnvironment {
3
6
  name: string;
4
7
  env: string;
@@ -15,6 +18,6 @@ declare class PrintDeploymentInfoAfterDeployImpl implements AfterDeploy.Interfac
15
18
  execute(params: AfterDeploy.Params): Promise<void>;
16
19
  }
17
20
  export declare const PrintDeploymentInfoAfterDeploy: typeof PrintDeploymentInfoAfterDeployImpl & {
18
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IAfterDeploy>;
21
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/project-extensions-aws/abstractions/index.js").IAfterDeploy>;
19
22
  };
20
23
  export {};
@@ -1,4 +1,6 @@
1
- import { AfterDeploy, GetAppStackOutput, ProjectSdkParamsService, UiService } from "@webiny/project/abstractions/index.js";
1
+ import { AfterDeploy } from "@webiny/project-extensions-aws/abstractions/index.js";
2
+ import { GetAppStackOutput } from "../../../abstractions/features/GetAppStackOutput.js";
3
+ import { ProjectSdkParamsService, UiService } from "@webiny/project/abstractions/index.js";
2
4
  import chalk from "chalk";
3
5
  class PrintDeploymentInfoAfterDeployImpl {
4
6
  constructor(ui, getAppStackOutput, projectSdkParamsService){
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js","sources":["../../../../src/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.ts"],"sourcesContent":["import {\n AfterDeploy,\n GetAppStackOutput,\n ProjectSdkParamsService,\n UiService\n} from \"@webiny/project/abstractions/index.js\";\nimport { IBlueGreenStackOutput } from \"~/pulumi/apps/blueGreen/types.js\";\nimport chalk from \"chalk\";\n\nexport interface IEnvironment {\n name: string;\n env: string;\n variant: string | undefined;\n domains: {\n [key: string]: string;\n };\n}\n\nclass PrintDeploymentInfoAfterDeployImpl implements AfterDeploy.Interface {\n constructor(\n private ui: UiService.Interface,\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AfterDeploy.Params) {\n if (params.app !== \"blueGreen\") {\n return;\n }\n\n const { blue, green } = chalk;\n\n const bg = await this.getAppStackOutput.execute<IBlueGreenStackOutput>(\"blueGreen\");\n\n if (!bg) {\n this.ui.info(\n \"Blue / Green deployment info could not be printed because the Blue / Green app is not deployed.\"\n );\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n\n const domains = Array.isArray(bg.domains) ? bg.domains : [];\n\n const environments = (bg.environments || []).reduce<IEnvironment[]>((items, item) => {\n const index = items.findIndex(i => i.name === item.name);\n if (index >= 0) {\n items[index].domains[item.type] = item.target;\n\n return items;\n }\n\n items.push({\n name: item.name,\n env: item.env,\n variant: item.variant,\n domains: {\n [item.type]: item.target\n }\n });\n\n return items;\n }, []);\n\n const output = [\n \"\",\n green(`Blue / Green Router`),\n `‣ Environment name: ${blue(sdkParams.env)}`,\n `‣ CloudFront domain: ${bg.distributionDomain}`,\n `‣ CloudFront URL: ${bg.distributionUrl}`,\n \"\",\n `‣ Domains attached: `,\n ...domains.map(domain => ` - https://${domain}`),\n \"\",\n `‣ Environments: `,\n ...environments.map(item => {\n const envVariant = `env: ${item.env}${\n item.variant ? ` / variant: ${item.variant}` : \"\"\n }`;\n return [\n ` - ${blue(item.name)} (${envVariant})`,\n ...Object.keys(item.domains).map(type => {\n return ` - ${type}: https://${item.domains[type]}`;\n })\n ].join(\"\\n\");\n }),\n \"\"\n ];\n console.log(output.join(\"\\n\"));\n }\n}\n\nexport const PrintDeploymentInfoAfterDeploy = AfterDeploy.createImplementation({\n implementation: PrintDeploymentInfoAfterDeployImpl,\n dependencies: [UiService, GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["PrintDeploymentInfoAfterDeployImpl","ui","getAppStackOutput","projectSdkParamsService","params","blue","green","chalk","bg","sdkParams","domains","Array","environments","items","item","index","i","output","domain","envVariant","Object","type","console","PrintDeploymentInfoAfterDeploy","AfterDeploy","UiService","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;AAkBA,MAAMA;IACF,YACYC,EAAuB,EACvBC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAHUF,EAAE,GAAFA;aACAC,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA0B,EAAE;QACtC,IAAIA,AAAe,gBAAfA,OAAO,GAAG,EACV;QAGJ,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGC;QAExB,MAAMC,KAAK,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAwB;QAEvE,IAAI,CAACA,IAAI,YACL,IAAI,CAAC,EAAE,CAAC,IAAI,CACR;QAKR,MAAMC,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAElD,MAAMC,UAAUC,MAAM,OAAO,CAACH,GAAG,OAAO,IAAIA,GAAG,OAAO,GAAG,EAAE;QAE3D,MAAMI,eAAgBJ,AAAAA,CAAAA,GAAG,YAAY,IAAI,EAAC,EAAG,MAAM,CAAiB,CAACK,OAAOC;YACxE,MAAMC,QAAQF,MAAM,SAAS,CAACG,CAAAA,IAAKA,EAAE,IAAI,KAAKF,KAAK,IAAI;YACvD,IAAIC,SAAS,GAAG;gBACZF,KAAK,CAACE,MAAM,CAAC,OAAO,CAACD,KAAK,IAAI,CAAC,GAAGA,KAAK,MAAM;gBAE7C,OAAOD;YACX;YAEAA,MAAM,IAAI,CAAC;gBACP,MAAMC,KAAK,IAAI;gBACf,KAAKA,KAAK,GAAG;gBACb,SAASA,KAAK,OAAO;gBACrB,SAAS;oBACL,CAACA,KAAK,IAAI,CAAC,EAAEA,KAAK,MAAM;gBAC5B;YACJ;YAEA,OAAOD;QACX,GAAG,EAAE;QAEL,MAAMI,SAAS;YACX;YACAX,MAAM;YACN,CAAC,oBAAoB,EAAED,KAAKI,UAAU,GAAG,GAAG;YAC5C,CAAC,qBAAqB,EAAED,GAAG,kBAAkB,EAAE;YAC/C,CAAC,kBAAkB,EAAEA,GAAG,eAAe,EAAE;YACzC;YACA;eACGE,QAAQ,GAAG,CAACQ,CAAAA,SAAU,CAAC,YAAY,EAAEA,QAAQ;YAChD;YACA;eACGN,aAAa,GAAG,CAACE,CAAAA;gBAChB,MAAMK,aAAa,CAAC,KAAK,EAAEL,KAAK,GAAG,GAC/BA,KAAK,OAAO,GAAG,CAAC,YAAY,EAAEA,KAAK,OAAO,EAAE,GAAG,IACjD;gBACF,OAAO;oBACH,CAAC,IAAI,EAAET,KAAKS,KAAK,IAAI,EAAE,EAAE,EAAEK,WAAW,CAAC,CAAC;uBACrCC,OAAO,IAAI,CAACN,KAAK,OAAO,EAAE,GAAG,CAACO,CAAAA,OACtB,CAAC,MAAM,EAAEA,KAAK,UAAU,EAAEP,KAAK,OAAO,CAACO,KAAK,EAAE;iBAE5D,CAAC,IAAI,CAAC;YACX;YACA;SACH;QACDC,QAAQ,GAAG,CAACL,OAAO,IAAI,CAAC;IAC5B;AACJ;AAEO,MAAMM,iCAAiCC,YAAY,oBAAoB,CAAC;IAC3E,gBAAgBxB;IAChB,cAAc;QAACyB;QAAWC;QAAmBC;KAAwB;AACzE"}
1
+ {"version":3,"file":"extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js","sources":["../../../../src/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.ts"],"sourcesContent":["import { AfterDeploy } from \"@webiny/project-extensions-aws/abstractions/index.js\";\nimport { GetAppStackOutput } from \"~/abstractions/features/GetAppStackOutput.js\";\nimport { ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { UiService } from \"@webiny/project/abstractions/index.js\";\nimport { IBlueGreenStackOutput } from \"~/pulumi/apps/blueGreen/types.js\";\nimport chalk from \"chalk\";\n\nexport interface IEnvironment {\n name: string;\n env: string;\n variant: string | undefined;\n domains: {\n [key: string]: string;\n };\n}\n\nclass PrintDeploymentInfoAfterDeployImpl implements AfterDeploy.Interface {\n constructor(\n private ui: UiService.Interface,\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AfterDeploy.Params) {\n if (params.app !== \"blueGreen\") {\n return;\n }\n\n const { blue, green } = chalk;\n\n const bg = await this.getAppStackOutput.execute<IBlueGreenStackOutput>(\"blueGreen\");\n\n if (!bg) {\n this.ui.info(\n \"Blue / Green deployment info could not be printed because the Blue / Green app is not deployed.\"\n );\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n\n const domains = Array.isArray(bg.domains) ? bg.domains : [];\n\n const environments = (bg.environments || []).reduce<IEnvironment[]>((items, item) => {\n const index = items.findIndex(i => i.name === item.name);\n if (index >= 0) {\n items[index].domains[item.type] = item.target;\n\n return items;\n }\n\n items.push({\n name: item.name,\n env: item.env,\n variant: item.variant,\n domains: {\n [item.type]: item.target\n }\n });\n\n return items;\n }, []);\n\n const output = [\n \"\",\n green(`Blue / Green Router`),\n `‣ Environment name: ${blue(sdkParams.env)}`,\n `‣ CloudFront domain: ${bg.distributionDomain}`,\n `‣ CloudFront URL: ${bg.distributionUrl}`,\n \"\",\n `‣ Domains attached: `,\n ...domains.map(domain => ` - https://${domain}`),\n \"\",\n `‣ Environments: `,\n ...environments.map(item => {\n const envVariant = `env: ${item.env}${\n item.variant ? ` / variant: ${item.variant}` : \"\"\n }`;\n return [\n ` - ${blue(item.name)} (${envVariant})`,\n ...Object.keys(item.domains).map(type => {\n return ` - ${type}: https://${item.domains[type]}`;\n })\n ].join(\"\\n\");\n }),\n \"\"\n ];\n console.log(output.join(\"\\n\"));\n }\n}\n\nexport const PrintDeploymentInfoAfterDeploy = AfterDeploy.createImplementation({\n implementation: PrintDeploymentInfoAfterDeployImpl,\n dependencies: [UiService, GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["PrintDeploymentInfoAfterDeployImpl","ui","getAppStackOutput","projectSdkParamsService","params","blue","green","chalk","bg","sdkParams","domains","Array","environments","items","item","index","i","output","domain","envVariant","Object","type","console","PrintDeploymentInfoAfterDeploy","AfterDeploy","UiService","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;;;AAgBA,MAAMA;IACF,YACYC,EAAuB,EACvBC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAHUF,EAAE,GAAFA;aACAC,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA0B,EAAE;QACtC,IAAIA,AAAe,gBAAfA,OAAO,GAAG,EACV;QAGJ,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGC;QAExB,MAAMC,KAAK,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAwB;QAEvE,IAAI,CAACA,IAAI,YACL,IAAI,CAAC,EAAE,CAAC,IAAI,CACR;QAKR,MAAMC,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAElD,MAAMC,UAAUC,MAAM,OAAO,CAACH,GAAG,OAAO,IAAIA,GAAG,OAAO,GAAG,EAAE;QAE3D,MAAMI,eAAgBJ,AAAAA,CAAAA,GAAG,YAAY,IAAI,EAAC,EAAG,MAAM,CAAiB,CAACK,OAAOC;YACxE,MAAMC,QAAQF,MAAM,SAAS,CAACG,CAAAA,IAAKA,EAAE,IAAI,KAAKF,KAAK,IAAI;YACvD,IAAIC,SAAS,GAAG;gBACZF,KAAK,CAACE,MAAM,CAAC,OAAO,CAACD,KAAK,IAAI,CAAC,GAAGA,KAAK,MAAM;gBAE7C,OAAOD;YACX;YAEAA,MAAM,IAAI,CAAC;gBACP,MAAMC,KAAK,IAAI;gBACf,KAAKA,KAAK,GAAG;gBACb,SAASA,KAAK,OAAO;gBACrB,SAAS;oBACL,CAACA,KAAK,IAAI,CAAC,EAAEA,KAAK,MAAM;gBAC5B;YACJ;YAEA,OAAOD;QACX,GAAG,EAAE;QAEL,MAAMI,SAAS;YACX;YACAX,MAAM;YACN,CAAC,oBAAoB,EAAED,KAAKI,UAAU,GAAG,GAAG;YAC5C,CAAC,qBAAqB,EAAED,GAAG,kBAAkB,EAAE;YAC/C,CAAC,kBAAkB,EAAEA,GAAG,eAAe,EAAE;YACzC;YACA;eACGE,QAAQ,GAAG,CAACQ,CAAAA,SAAU,CAAC,YAAY,EAAEA,QAAQ;YAChD;YACA;eACGN,aAAa,GAAG,CAACE,CAAAA;gBAChB,MAAMK,aAAa,CAAC,KAAK,EAAEL,KAAK,GAAG,GAC/BA,KAAK,OAAO,GAAG,CAAC,YAAY,EAAEA,KAAK,OAAO,EAAE,GAAG,IACjD;gBACF,OAAO;oBACH,CAAC,IAAI,EAAET,KAAKS,KAAK,IAAI,EAAE,EAAE,EAAEK,WAAW,CAAC,CAAC;uBACrCC,OAAO,IAAI,CAACN,KAAK,OAAO,EAAE,GAAG,CAACO,CAAAA,OACtB,CAAC,MAAM,EAAEA,KAAK,UAAU,EAAEP,KAAK,OAAO,CAACO,KAAK,EAAE;iBAE5D,CAAC,IAAI,CAAC;YACX;YACA;SACH;QACDC,QAAQ,GAAG,CAACL,OAAO,IAAI,CAAC;IAC5B;AACJ;AAEO,MAAMM,iCAAiCC,YAAY,oBAAoB,CAAC;IAC3E,gBAAgBxB;IAChB,cAAc;QAACyB;QAAWC;QAAmBC;KAAwB;AACzE"}
@@ -1,4 +1,6 @@
1
- import { AdminBeforeBuild, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { AdminBeforeBuild } from "@webiny/project/abstractions/index.js";
2
+ import { ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
3
+ import { GetAppStackOutput } from "../../abstractions/features/GetAppStackOutput.js";
2
4
  declare class EnsureApiDeployedBeforeAdminBuildImpl implements AdminBeforeBuild.Interface {
3
5
  private getAppStackOutput;
4
6
  private projectSdkParamsService;
@@ -1,4 +1,5 @@
1
- import { AdminBeforeBuild, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { AdminBeforeBuild, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
2
+ import { GetAppStackOutput } from "../../abstractions/features/GetAppStackOutput.js";
2
3
  import { GracefulError } from "@webiny/project";
3
4
  const NO_DEPLOYMENT_CHECKS_FLAG_NAME = "--no-deployment-checks";
4
5
  class EnsureApiDeployedBeforeAdminBuildImpl {
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js","sources":["../../../src/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.ts"],"sourcesContent":["import {\n AdminBeforeBuild,\n GetAppStackOutput,\n ProjectSdkParamsService\n} from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst NO_DEPLOYMENT_CHECKS_FLAG_NAME = \"--no-deployment-checks\";\n\nclass EnsureApiDeployedBeforeAdminBuildImpl implements AdminBeforeBuild.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AdminBeforeBuild.Params) {\n // Just in case, we want to allow users to skip the system requirements check.\n if (params.deploymentChecks === false) {\n return;\n }\n\n const output = await this.getAppStackOutput.execute(\"api\");\n const apiDeployed = output && Object.keys(output).length > 0;\n if (apiDeployed) {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;\n\n const error = new Error(\"Cannot build Admin before deploying API.\");\n const message = [\n `Before building %s, please build %s first by running: %s.`,\n `If you think this is a mistake, you can also try skipping`,\n `deployment checks by appending the %s flag.`,\n `Learn more: https://webiny.link/deployment-checks`\n ].join(\" \");\n\n throw GracefulError.from(\n error,\n message,\n \"Admin\",\n \"API\",\n cmd,\n NO_DEPLOYMENT_CHECKS_FLAG_NAME\n );\n }\n}\n\nexport const EnsureApiDeployedBeforeAdminBuild = AdminBeforeBuild.createImplementation({\n implementation: EnsureApiDeployedBeforeAdminBuildImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["NO_DEPLOYMENT_CHECKS_FLAG_NAME","EnsureApiDeployedBeforeAdminBuildImpl","getAppStackOutput","projectSdkParamsService","params","output","apiDeployed","Object","sdkParams","cmd","error","Error","message","GracefulError","EnsureApiDeployedBeforeAdminBuild","AdminBeforeBuild","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;AAOA,MAAMA,iCAAiC;AAEvC,MAAMC;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAE;QAE3C,IAAIA,AAA4B,UAA5BA,OAAO,gBAAgB,EACvB;QAGJ,MAAMC,SAAS,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QACpD,MAAMC,cAAcD,UAAUE,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG;QAC3D,IAAIC,aACA;QAGJ,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAMC,MAAM,CAAC,6BAA6B,EAAED,UAAU,GAAG,EAAE;QAE3D,MAAME,QAAQ,IAAIC,MAAM;QACxB,MAAMC,UAAU;QAOhB,MAAMC,cAAc,IAAI,CACpBH,OACAE,SACA,SACA,OACAH,KACAT;IAER;AACJ;AAEO,MAAMc,oCAAoCC,iBAAiB,oBAAoB,CAAC;IACnF,gBAAgBd;IAChB,cAAc;QAACe;QAAmBC;KAAwB;AAC9D"}
1
+ {"version":3,"file":"extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js","sources":["../../../src/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.ts"],"sourcesContent":["import { AdminBeforeBuild } from \"@webiny/project/abstractions/index.js\";\nimport { ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { GetAppStackOutput } from \"~/abstractions/features/GetAppStackOutput.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst NO_DEPLOYMENT_CHECKS_FLAG_NAME = \"--no-deployment-checks\";\n\nclass EnsureApiDeployedBeforeAdminBuildImpl implements AdminBeforeBuild.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AdminBeforeBuild.Params) {\n // Just in case, we want to allow users to skip the system requirements check.\n if (params.deploymentChecks === false) {\n return;\n }\n\n const output = await this.getAppStackOutput.execute(\"api\");\n const apiDeployed = output && Object.keys(output).length > 0;\n if (apiDeployed) {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;\n\n const error = new Error(\"Cannot build Admin before deploying API.\");\n const message = [\n `Before building %s, please build %s first by running: %s.`,\n `If you think this is a mistake, you can also try skipping`,\n `deployment checks by appending the %s flag.`,\n `Learn more: https://webiny.link/deployment-checks`\n ].join(\" \");\n\n throw GracefulError.from(\n error,\n message,\n \"Admin\",\n \"API\",\n cmd,\n NO_DEPLOYMENT_CHECKS_FLAG_NAME\n );\n }\n}\n\nexport const EnsureApiDeployedBeforeAdminBuild = AdminBeforeBuild.createImplementation({\n implementation: EnsureApiDeployedBeforeAdminBuildImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["NO_DEPLOYMENT_CHECKS_FLAG_NAME","EnsureApiDeployedBeforeAdminBuildImpl","getAppStackOutput","projectSdkParamsService","params","output","apiDeployed","Object","sdkParams","cmd","error","Error","message","GracefulError","EnsureApiDeployedBeforeAdminBuild","AdminBeforeBuild","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;;AAKA,MAAMA,iCAAiC;AAEvC,MAAMC;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAE;QAE3C,IAAIA,AAA4B,UAA5BA,OAAO,gBAAgB,EACvB;QAGJ,MAAMC,SAAS,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QACpD,MAAMC,cAAcD,UAAUE,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG;QAC3D,IAAIC,aACA;QAGJ,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAMC,MAAM,CAAC,6BAA6B,EAAED,UAAU,GAAG,EAAE;QAE3D,MAAME,QAAQ,IAAIC,MAAM;QACxB,MAAMC,UAAU;QAOhB,MAAMC,cAAc,IAAI,CACpBH,OACAE,SACA,SACA,OACAH,KACAT;IAER;AACJ;AAEO,MAAMc,oCAAoCC,iBAAiB,oBAAoB,CAAC;IACnF,gBAAgBd;IAChB,cAAc;QAACe;QAAmBC;KAAwB;AAC9D"}
@@ -1,4 +1,6 @@
1
- import { AdminBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { AdminBeforeWatch } from "@webiny/project/abstractions/index.js";
2
+ import { ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
3
+ import { GetAppStackOutput } from "../../abstractions/features/GetAppStackOutput.js";
2
4
  declare class EnsureApiDeployedBeforeAdminWatchImpl implements AdminBeforeWatch.Interface {
3
5
  private getAppStackOutput;
4
6
  private projectSdkParamsService;
@@ -1,4 +1,5 @@
1
- import { AdminBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
1
+ import { AdminBeforeWatch, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
2
+ import { GetAppStackOutput } from "../../abstractions/features/GetAppStackOutput.js";
2
3
  import { GracefulError } from "@webiny/project";
3
4
  const NO_DEPLOYMENT_CHECKS_FLAG_NAME = "--no-deployment-checks";
4
5
  class EnsureApiDeployedBeforeAdminWatchImpl {
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js","sources":["../../../src/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.ts"],"sourcesContent":["import {\n AdminBeforeWatch,\n GetAppStackOutput,\n ProjectSdkParamsService\n} from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst NO_DEPLOYMENT_CHECKS_FLAG_NAME = \"--no-deployment-checks\";\n\nclass EnsureApiDeployedBeforeAdminWatchImpl implements AdminBeforeWatch.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AdminBeforeWatch.Params) {\n // Just in case, we want to allow users to skip the system requirements check.\n if (params.deploymentChecks === false) {\n return;\n }\n\n const output = await this.getAppStackOutput.execute(\"api\");\n const apiDeployed = output && Object.keys(output).length > 0;\n if (apiDeployed) {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;\n\n const error = new Error(`Cannot watch Admin before deploying API.`);\n const message = [\n `Before watching %s, please build %s first by running: %s.`,\n `If you think this is a mistake, you can also try skipping`,\n `deployment checks by appending the %s flag.`,\n `Learn more: https://webiny.link/deployment-checks`\n ].join(\" \");\n\n throw GracefulError.from(\n error,\n message,\n \"Admin\",\n \"API\",\n cmd,\n NO_DEPLOYMENT_CHECKS_FLAG_NAME\n );\n }\n}\n\nexport const EnsureApiDeployedBeforeAdminWatch = AdminBeforeWatch.createImplementation({\n implementation: EnsureApiDeployedBeforeAdminWatchImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["NO_DEPLOYMENT_CHECKS_FLAG_NAME","EnsureApiDeployedBeforeAdminWatchImpl","getAppStackOutput","projectSdkParamsService","params","output","apiDeployed","Object","sdkParams","cmd","error","Error","message","GracefulError","EnsureApiDeployedBeforeAdminWatch","AdminBeforeWatch","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;AAOA,MAAMA,iCAAiC;AAEvC,MAAMC;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAE;QAE3C,IAAIA,AAA4B,UAA5BA,OAAO,gBAAgB,EACvB;QAGJ,MAAMC,SAAS,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QACpD,MAAMC,cAAcD,UAAUE,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG;QAC3D,IAAIC,aACA;QAGJ,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAMC,MAAM,CAAC,6BAA6B,EAAED,UAAU,GAAG,EAAE;QAE3D,MAAME,QAAQ,IAAIC,MAAM;QACxB,MAAMC,UAAU;QAOhB,MAAMC,cAAc,IAAI,CACpBH,OACAE,SACA,SACA,OACAH,KACAT;IAER;AACJ;AAEO,MAAMc,oCAAoCC,iBAAiB,oBAAoB,CAAC;IACnF,gBAAgBd;IAChB,cAAc;QAACe;QAAmBC;KAAwB;AAC9D"}
1
+ {"version":3,"file":"extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js","sources":["../../../src/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.ts"],"sourcesContent":["import { AdminBeforeWatch } from \"@webiny/project/abstractions/index.js\";\nimport { ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { GetAppStackOutput } from \"~/abstractions/features/GetAppStackOutput.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst NO_DEPLOYMENT_CHECKS_FLAG_NAME = \"--no-deployment-checks\";\n\nclass EnsureApiDeployedBeforeAdminWatchImpl implements AdminBeforeWatch.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: AdminBeforeWatch.Params) {\n // Just in case, we want to allow users to skip the system requirements check.\n if (params.deploymentChecks === false) {\n return;\n }\n\n const output = await this.getAppStackOutput.execute(\"api\");\n const apiDeployed = output && Object.keys(output).length > 0;\n if (apiDeployed) {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;\n\n const error = new Error(`Cannot watch Admin before deploying API.`);\n const message = [\n `Before watching %s, please build %s first by running: %s.`,\n `If you think this is a mistake, you can also try skipping`,\n `deployment checks by appending the %s flag.`,\n `Learn more: https://webiny.link/deployment-checks`\n ].join(\" \");\n\n throw GracefulError.from(\n error,\n message,\n \"Admin\",\n \"API\",\n cmd,\n NO_DEPLOYMENT_CHECKS_FLAG_NAME\n );\n }\n}\n\nexport const EnsureApiDeployedBeforeAdminWatch = AdminBeforeWatch.createImplementation({\n implementation: EnsureApiDeployedBeforeAdminWatchImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["NO_DEPLOYMENT_CHECKS_FLAG_NAME","EnsureApiDeployedBeforeAdminWatchImpl","getAppStackOutput","projectSdkParamsService","params","output","apiDeployed","Object","sdkParams","cmd","error","Error","message","GracefulError","EnsureApiDeployedBeforeAdminWatch","AdminBeforeWatch","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;;AAKA,MAAMA,iCAAiC;AAEvC,MAAMC;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAE;QAE3C,IAAIA,AAA4B,UAA5BA,OAAO,gBAAgB,EACvB;QAGJ,MAAMC,SAAS,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QACpD,MAAMC,cAAcD,UAAUE,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG;QAC3D,IAAIC,aACA;QAGJ,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAMC,MAAM,CAAC,6BAA6B,EAAED,UAAU,GAAG,EAAE;QAE3D,MAAME,QAAQ,IAAIC,MAAM;QACxB,MAAMC,UAAU;QAOhB,MAAMC,cAAc,IAAI,CACpBH,OACAE,SACA,SACA,OACAH,KACAT;IAER;AACJ;AAEO,MAAMc,oCAAoCC,iBAAiB,oBAAoB,CAAC;IACnF,gBAAgBd;IAChB,cAAc;QAACe;QAAmBC;KAAwB;AAC9D"}