@webiny/project-aws 6.3.0 → 6.4.0-beta.1

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 (393) hide show
  1. package/_templates/appTemplates/admin/src/index.tsx +0 -3
  2. package/abstractions/ApiGqlClient.js +2 -1
  3. package/abstractions/ApiGqlClient.js.map +1 -1
  4. package/abstractions/InvokeLambdaFunction.js +2 -1
  5. package/abstractions/InvokeLambdaFunction.js.map +1 -1
  6. package/abstractions/features/pulumi/AdminPulumi.js +2 -1
  7. package/abstractions/features/pulumi/AdminPulumi.js.map +1 -1
  8. package/abstractions/features/pulumi/ApiPulumi.js +2 -1
  9. package/abstractions/features/pulumi/ApiPulumi.js.map +1 -1
  10. package/abstractions/features/pulumi/CorePulumi.js +2 -1
  11. package/abstractions/features/pulumi/CorePulumi.js.map +1 -1
  12. package/abstractions/features/pulumi/index.js +0 -2
  13. package/abstractions/index.js +0 -2
  14. package/abstractions/services/AdminStackOutputService.js +2 -1
  15. package/abstractions/services/AdminStackOutputService.js.map +1 -1
  16. package/abstractions/services/ApiStackOutputService.js +2 -1
  17. package/abstractions/services/ApiStackOutputService.js.map +1 -1
  18. package/abstractions/services/CoreStackOutputService.js +2 -1
  19. package/abstractions/services/CoreStackOutputService.js.map +1 -1
  20. package/admin.js +5 -4
  21. package/admin.js.map +1 -1
  22. package/api.js +13 -12
  23. package/api.js.map +1 -1
  24. package/apps/createAdminApp.js +11 -12
  25. package/apps/createAdminApp.js.map +1 -1
  26. package/apps/createAdminAppConfig.js +12 -18
  27. package/apps/createAdminAppConfig.js.map +1 -1
  28. package/apps/createApiApp.js +17 -22
  29. package/apps/createApiApp.js.map +1 -1
  30. package/apps/createBlueGreenApp.js +13 -16
  31. package/apps/createBlueGreenApp.js.map +1 -1
  32. package/apps/createCoreApp.js +12 -13
  33. package/apps/createCoreApp.js.map +1 -1
  34. package/apps/createReactAppConfig.d.ts +0 -7
  35. package/apps/createReactAppConfig.js +56 -69
  36. package/apps/createReactAppConfig.js.map +1 -1
  37. package/apps/createSyncSystemApp.js +8 -7
  38. package/apps/createSyncSystemApp.js.map +1 -1
  39. package/apps/index.js +0 -2
  40. package/cli.js +3 -2
  41. package/cli.js.map +1 -1
  42. package/exports/extensions.js +0 -2
  43. package/exports/infra/admin.js +0 -2
  44. package/exports/infra/api.js +0 -2
  45. package/exports/infra/core.js +0 -2
  46. package/exports/infra.js +1 -3
  47. package/extensions/ApiLambdaFunction.js +45 -56
  48. package/extensions/ApiLambdaFunction.js.map +1 -1
  49. package/extensions/ApiRoute.js +90 -104
  50. package/extensions/ApiRoute.js.map +1 -1
  51. package/extensions/AwsDefaultRegion.js +17 -16
  52. package/extensions/AwsDefaultRegion.js.map +1 -1
  53. package/extensions/Cms/ModelFieldCompression.js +16 -15
  54. package/extensions/Cms/ModelFieldCompression.js.map +1 -1
  55. package/extensions/Encryption.js +30 -29
  56. package/extensions/Encryption.js.map +1 -1
  57. package/extensions/Mailer/Smtp.js +15 -14
  58. package/extensions/Mailer/Smtp.js.map +1 -1
  59. package/extensions/Mailer/Smtp.test.js +117 -131
  60. package/extensions/Mailer/Smtp.test.js.map +1 -1
  61. package/extensions/Mailer/SmtpParamsSchema.js +11 -14
  62. package/extensions/Mailer/SmtpParamsSchema.js.map +1 -1
  63. package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js +25 -30
  64. package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js.map +1 -1
  65. package/extensions/OpenSearch/EnsureOsWasDeployed.js +14 -24
  66. package/extensions/OpenSearch/EnsureOsWasDeployed.js.map +1 -1
  67. package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js +25 -21
  68. package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js.map +1 -1
  69. package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js +26 -22
  70. package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js.map +1 -1
  71. package/extensions/OpenSearch.js +30 -31
  72. package/extensions/OpenSearch.js.map +1 -1
  73. package/extensions/ProjectAws/AdminStackOutputService.js +0 -2
  74. package/extensions/ProjectAws/ApiStackOutputService.js +0 -2
  75. package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +65 -74
  76. package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -1
  77. package/extensions/ProjectAws/AutoInstall.js +15 -14
  78. package/extensions/ProjectAws/AutoInstall.js.map +1 -1
  79. package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js +15 -19
  80. package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js.map +1 -1
  81. package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js +56 -45
  82. package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js.map +1 -1
  83. package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js +57 -55
  84. package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js.map +1 -1
  85. package/extensions/ProjectAws/BuildAppWorkspace.js +49 -54
  86. package/extensions/ProjectAws/BuildAppWorkspace.js.map +1 -1
  87. package/extensions/ProjectAws/CoreStackOutputService.js +0 -2
  88. package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js +26 -30
  89. package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js.map +1 -1
  90. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js +25 -38
  91. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js.map +1 -1
  92. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js +22 -17
  93. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js.map +1 -1
  94. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js +22 -17
  95. package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js.map +1 -1
  96. package/extensions/ProjectAws/SetDatabaseSetupOutput.js +20 -21
  97. package/extensions/ProjectAws/SetDatabaseSetupOutput.js.map +1 -1
  98. package/extensions/ProjectAws/UploadAdminAppToS3.js +53 -58
  99. package/extensions/ProjectAws/UploadAdminAppToS3.js.map +1 -1
  100. package/extensions/ProjectAws/definitions.js +13 -6
  101. package/extensions/ProjectAws/definitions.js.map +1 -1
  102. package/extensions/ProjectAws.js +44 -45
  103. package/extensions/ProjectAws.js.map +1 -1
  104. package/extensions/RegisterRoutesPulumi.js +24 -29
  105. package/extensions/RegisterRoutesPulumi.js.map +1 -1
  106. package/extensions/definitions.js +10 -3
  107. package/extensions/definitions.js.map +1 -1
  108. package/extensions/index.js +0 -2
  109. package/features/ApiGqlClient.js +46 -51
  110. package/features/ApiGqlClient.js.map +1 -1
  111. package/features/InvokeLambdaFunction.js +30 -32
  112. package/features/InvokeLambdaFunction.js.map +1 -1
  113. package/features/index.js +0 -2
  114. package/index.js +0 -2
  115. package/infra.js +57 -59
  116. package/infra.js.map +1 -1
  117. package/package.json +16 -16
  118. package/project.js +7 -6
  119. package/project.js.map +1 -1
  120. package/pulumi/apps/admin/createAdminPulumiApp.js +36 -44
  121. package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -1
  122. package/pulumi/apps/admin/index.js +0 -2
  123. package/pulumi/apps/api/ApiBackgroundTask.js +153 -137
  124. package/pulumi/apps/api/ApiBackgroundTask.js.map +1 -1
  125. package/pulumi/apps/api/ApiCloudfront.js +188 -130
  126. package/pulumi/apps/api/ApiCloudfront.js.map +1 -1
  127. package/pulumi/apps/api/ApiFileManager.js +34 -33
  128. package/pulumi/apps/api/ApiFileManager.js.map +1 -1
  129. package/pulumi/apps/api/ApiGateway.js +67 -74
  130. package/pulumi/apps/api/ApiGateway.js.map +1 -1
  131. package/pulumi/apps/api/ApiGraphql.js +223 -152
  132. package/pulumi/apps/api/ApiGraphql.js.map +1 -1
  133. package/pulumi/apps/api/ApiOutput.js +29 -30
  134. package/pulumi/apps/api/ApiOutput.js.map +1 -1
  135. package/pulumi/apps/api/ApiScheduler.js +94 -92
  136. package/pulumi/apps/api/ApiScheduler.js.map +1 -1
  137. package/pulumi/apps/api/ApiWebsocket.js +141 -133
  138. package/pulumi/apps/api/ApiWebsocket.js.map +1 -1
  139. package/pulumi/apps/api/backgroundTask/definition.js +122 -144
  140. package/pulumi/apps/api/backgroundTask/definition.js.map +1 -1
  141. package/pulumi/apps/api/backgroundTask/policy.js +37 -23
  142. package/pulumi/apps/api/backgroundTask/policy.js.map +1 -1
  143. package/pulumi/apps/api/backgroundTask/role.js +29 -29
  144. package/pulumi/apps/api/backgroundTask/role.js.map +1 -1
  145. package/pulumi/apps/api/backgroundTask/types.js +9 -11
  146. package/pulumi/apps/api/backgroundTask/types.js.map +1 -1
  147. package/pulumi/apps/api/createApiPulumiApp.js +206 -274
  148. package/pulumi/apps/api/createApiPulumiApp.js.map +1 -1
  149. package/pulumi/apps/api/handleGuardDutyEvents.js +54 -51
  150. package/pulumi/apps/api/handleGuardDutyEvents.js.map +1 -1
  151. package/pulumi/apps/api/index.js +0 -2
  152. package/pulumi/apps/awsUtils.js +21 -24
  153. package/pulumi/apps/awsUtils.js.map +1 -1
  154. package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js +37 -40
  155. package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js.map +1 -1
  156. package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js +83 -91
  157. package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js.map +1 -1
  158. package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js +17 -16
  159. package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js.map +1 -1
  160. package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js +13 -12
  161. package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js.map +1 -1
  162. package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js +9 -14
  163. package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js.map +1 -1
  164. package/pulumi/apps/blueGreen/cloudfront/createOriginId.js +5 -7
  165. package/pulumi/apps/blueGreen/cloudfront/createOriginId.js.map +1 -1
  166. package/pulumi/apps/blueGreen/constants.js +15 -3
  167. package/pulumi/apps/blueGreen/constants.js.map +1 -1
  168. package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js +77 -103
  169. package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js.map +1 -1
  170. package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js +20 -26
  171. package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js.map +1 -1
  172. package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js +17 -20
  173. package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js.map +1 -1
  174. package/pulumi/apps/blueGreen/domains/getApplicationDomains.js +51 -61
  175. package/pulumi/apps/blueGreen/domains/getApplicationDomains.js.map +1 -1
  176. package/pulumi/apps/blueGreen/domains/resolveDomains.js +24 -38
  177. package/pulumi/apps/blueGreen/domains/resolveDomains.js.map +1 -1
  178. package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js +7 -14
  179. package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js.map +1 -1
  180. package/pulumi/apps/blueGreen/functions/handler.js +1 -57
  181. package/pulumi/apps/blueGreen/functions/handler.js.map +1 -1
  182. package/pulumi/apps/blueGreen/types.js +0 -3
  183. package/pulumi/apps/blueGreen/validation/validateDeployments.js +19 -24
  184. package/pulumi/apps/blueGreen/validation/validateDeployments.js.map +1 -1
  185. package/pulumi/apps/common/CoreOutput.js +34 -37
  186. package/pulumi/apps/common/CoreOutput.js.map +1 -1
  187. package/pulumi/apps/common/VpcConfig.js +20 -20
  188. package/pulumi/apps/common/VpcConfig.js.map +1 -1
  189. package/pulumi/apps/common/index.js +0 -2
  190. package/pulumi/apps/core/CoreAuditLogsDynamo.js +245 -182
  191. package/pulumi/apps/core/CoreAuditLogsDynamo.js.map +1 -1
  192. package/pulumi/apps/core/CoreCognito.js +117 -106
  193. package/pulumi/apps/core/CoreCognito.js.map +1 -1
  194. package/pulumi/apps/core/CoreDynamo.js +91 -70
  195. package/pulumi/apps/core/CoreDynamo.js.map +1 -1
  196. package/pulumi/apps/core/CoreEventBus.js +10 -9
  197. package/pulumi/apps/core/CoreEventBus.js.map +1 -1
  198. package/pulumi/apps/core/CoreFileManager.js +76 -68
  199. package/pulumi/apps/core/CoreFileManager.js.map +1 -1
  200. package/pulumi/apps/core/CoreOpenSearch.js +281 -305
  201. package/pulumi/apps/core/CoreOpenSearch.js.map +1 -1
  202. package/pulumi/apps/core/CoreVpc.js +155 -156
  203. package/pulumi/apps/core/CoreVpc.js.map +1 -1
  204. package/pulumi/apps/core/WatchCommand.js +94 -96
  205. package/pulumi/apps/core/WatchCommand.js.map +1 -1
  206. package/pulumi/apps/core/cognitoIdentityProviders/amazon.js +16 -22
  207. package/pulumi/apps/core/cognitoIdentityProviders/amazon.js.map +1 -1
  208. package/pulumi/apps/core/cognitoIdentityProviders/apple.js +16 -17
  209. package/pulumi/apps/core/cognitoIdentityProviders/apple.js.map +1 -1
  210. package/pulumi/apps/core/cognitoIdentityProviders/configure.js +44 -50
  211. package/pulumi/apps/core/cognitoIdentityProviders/configure.js.map +1 -1
  212. package/pulumi/apps/core/cognitoIdentityProviders/facebook.js +16 -17
  213. package/pulumi/apps/core/cognitoIdentityProviders/facebook.js.map +1 -1
  214. package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js +7 -8
  215. package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js.map +1 -1
  216. package/pulumi/apps/core/cognitoIdentityProviders/google.js +16 -17
  217. package/pulumi/apps/core/cognitoIdentityProviders/google.js.map +1 -1
  218. package/pulumi/apps/core/cognitoIdentityProviders/index.js +0 -2
  219. package/pulumi/apps/core/cognitoIdentityProviders/oidc.js +17 -18
  220. package/pulumi/apps/core/cognitoIdentityProviders/oidc.js.map +1 -1
  221. package/pulumi/apps/core/configureS3BucketMalwareProtection.js +251 -188
  222. package/pulumi/apps/core/configureS3BucketMalwareProtection.js.map +1 -1
  223. package/pulumi/apps/core/createCorePulumiApp.js +212 -280
  224. package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
  225. package/pulumi/apps/core/index.js +0 -2
  226. package/pulumi/apps/core/webinyWatchCommand/handler.js +45 -32
  227. package/pulumi/apps/core/webinyWatchCommand/handler.js.map +1 -1
  228. package/pulumi/apps/createAppBucket.js +157 -146
  229. package/pulumi/apps/createAppBucket.js.map +1 -1
  230. package/pulumi/apps/customDomain.js +7 -6
  231. package/pulumi/apps/customDomain.js.map +1 -1
  232. package/pulumi/apps/extensions/getAwsTagsFromExtension.js +8 -7
  233. package/pulumi/apps/extensions/getAwsTagsFromExtension.js.map +1 -1
  234. package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js +6 -7
  235. package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js.map +1 -1
  236. package/pulumi/apps/extensions/getOsConfigFromExtension.js +17 -41
  237. package/pulumi/apps/extensions/getOsConfigFromExtension.js.map +1 -1
  238. package/pulumi/apps/extensions/getVpcConfigFromExtension.js +13 -25
  239. package/pulumi/apps/extensions/getVpcConfigFromExtension.js.map +1 -1
  240. package/pulumi/apps/index.js +0 -3
  241. package/pulumi/apps/lambdaUtils.js +57 -61
  242. package/pulumi/apps/lambdaUtils.js.map +1 -1
  243. package/pulumi/apps/react/createReactPulumiApp.js +108 -129
  244. package/pulumi/apps/react/createReactPulumiApp.js.map +1 -1
  245. package/pulumi/apps/react/index.js +0 -2
  246. package/pulumi/apps/syncSystem/SyncSystemDynamo.js +77 -62
  247. package/pulumi/apps/syncSystem/SyncSystemDynamo.js.map +1 -1
  248. package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js +74 -57
  249. package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js.map +1 -1
  250. package/pulumi/apps/syncSystem/SyncSystemEventBus.js +77 -71
  251. package/pulumi/apps/syncSystem/SyncSystemEventBus.js.map +1 -1
  252. package/pulumi/apps/syncSystem/SyncSystemLambda.js +154 -86
  253. package/pulumi/apps/syncSystem/SyncSystemLambda.js.map +1 -1
  254. package/pulumi/apps/syncSystem/SyncSystemOutput.js +14 -13
  255. package/pulumi/apps/syncSystem/SyncSystemOutput.js.map +1 -1
  256. package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js +56 -60
  257. package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js.map +1 -1
  258. package/pulumi/apps/syncSystem/SyncSystemSQS.js +25 -49
  259. package/pulumi/apps/syncSystem/SyncSystemSQS.js.map +1 -1
  260. package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js +44 -43
  261. package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js.map +1 -1
  262. package/pulumi/apps/syncSystem/addTableItems.js +35 -45
  263. package/pulumi/apps/syncSystem/addTableItems.js.map +1 -1
  264. package/pulumi/apps/syncSystem/api/addServiceManifest.js +12 -14
  265. package/pulumi/apps/syncSystem/api/addServiceManifest.js.map +1 -1
  266. package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js +49 -55
  267. package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js.map +1 -1
  268. package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js +88 -40
  269. package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js.map +1 -1
  270. package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js +37 -43
  271. package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js.map +1 -1
  272. package/pulumi/apps/syncSystem/api/attachS3Permissions.js +51 -47
  273. package/pulumi/apps/syncSystem/api/attachS3Permissions.js.map +1 -1
  274. package/pulumi/apps/syncSystem/api/index.js +28 -46
  275. package/pulumi/apps/syncSystem/api/index.js.map +1 -1
  276. package/pulumi/apps/syncSystem/constants.js +2 -1
  277. package/pulumi/apps/syncSystem/constants.js.map +1 -1
  278. package/pulumi/apps/syncSystem/createSyncResourceName.js +2 -7
  279. package/pulumi/apps/syncSystem/createSyncResourceName.js.map +1 -1
  280. package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js +101 -166
  281. package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js.map +1 -1
  282. package/pulumi/apps/syncSystem/customApp.js +12 -16
  283. package/pulumi/apps/syncSystem/customApp.js.map +1 -1
  284. package/pulumi/apps/syncSystem/getSyncSystemOutput.js +5 -6
  285. package/pulumi/apps/syncSystem/getSyncSystemOutput.js.map +1 -1
  286. package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js +108 -42
  287. package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js.map +1 -1
  288. package/pulumi/apps/syncSystem/types.js +0 -3
  289. package/pulumi/constants.js +2 -1
  290. package/pulumi/constants.js.map +1 -1
  291. package/pulumi/env/awsRegion.js +3 -2
  292. package/pulumi/env/awsRegion.js.map +1 -1
  293. package/pulumi/env/base.js +11 -27
  294. package/pulumi/env/base.js.map +1 -1
  295. package/pulumi/env/env.js +3 -2
  296. package/pulumi/env/env.js.map +1 -1
  297. package/pulumi/env/projectName.js +3 -2
  298. package/pulumi/env/projectName.js.map +1 -1
  299. package/pulumi/env/variant.js +4 -3
  300. package/pulumi/env/variant.js.map +1 -1
  301. package/pulumi/extensions/AdminCustomDomains.js +15 -11
  302. package/pulumi/extensions/AdminCustomDomains.js.map +1 -1
  303. package/pulumi/extensions/AdminPulumi.js +16 -19
  304. package/pulumi/extensions/AdminPulumi.js.map +1 -1
  305. package/pulumi/extensions/ApiCustomDomains.js +15 -11
  306. package/pulumi/extensions/ApiCustomDomains.js.map +1 -1
  307. package/pulumi/extensions/ApiPulumi.js +16 -19
  308. package/pulumi/extensions/ApiPulumi.js.map +1 -1
  309. package/pulumi/extensions/AwsTags.js +11 -10
  310. package/pulumi/extensions/AwsTags.js.map +1 -1
  311. package/pulumi/extensions/BlueGreenDeployments.js +29 -26
  312. package/pulumi/extensions/BlueGreenDeployments.js.map +1 -1
  313. package/pulumi/extensions/CorePulumi.js +16 -19
  314. package/pulumi/extensions/CorePulumi.js.map +1 -1
  315. package/pulumi/extensions/OpenSearch.js +16 -15
  316. package/pulumi/extensions/OpenSearch.js.map +1 -1
  317. package/pulumi/extensions/Vpc.js +21 -20
  318. package/pulumi/extensions/Vpc.js.map +1 -1
  319. package/pulumi/extensions/index.js +12 -10
  320. package/pulumi/extensions/index.js.map +1 -1
  321. package/pulumi/features/AdminPulumi/AdminPulumi.js +18 -14
  322. package/pulumi/features/AdminPulumi/AdminPulumi.js.map +1 -1
  323. package/pulumi/features/AdminPulumi/index.js +0 -2
  324. package/pulumi/features/ApiPulumi/ApiPulumi.js +18 -14
  325. package/pulumi/features/ApiPulumi/ApiPulumi.js.map +1 -1
  326. package/pulumi/features/ApiPulumi/index.js +0 -2
  327. package/pulumi/features/CorePulumi/CorePulumi.js +18 -14
  328. package/pulumi/features/CorePulumi/CorePulumi.js.map +1 -1
  329. package/pulumi/features/CorePulumi/index.js +0 -2
  330. package/pulumi/features/index.js +0 -2
  331. package/pulumi/index.js +0 -2
  332. package/pulumi/types.js +0 -3
  333. package/pulumi/utils/addDomainsUrlsOutputs.js +20 -37
  334. package/pulumi/utils/addDomainsUrlsOutputs.js.map +1 -1
  335. package/pulumi/utils/addServiceManifestTableItem.js +12 -15
  336. package/pulumi/utils/addServiceManifestTableItem.js.map +1 -1
  337. package/pulumi/utils/crawlDirectory.js +10 -15
  338. package/pulumi/utils/crawlDirectory.js.map +1 -1
  339. package/pulumi/utils/createAssetArchive.js +5 -6
  340. package/pulumi/utils/createAssetArchive.js.map +1 -1
  341. package/pulumi/utils/dynamodb.js +26 -27
  342. package/pulumi/utils/dynamodb.js.map +1 -1
  343. package/pulumi/utils/getPresignedPost.js +27 -30
  344. package/pulumi/utils/getPresignedPost.js.map +1 -1
  345. package/pulumi/utils/index.js +1 -3
  346. package/pulumi/utils/lambdaEnvVariables.js +42 -54
  347. package/pulumi/utils/lambdaEnvVariables.js.map +1 -1
  348. package/pulumi/utils/tagResources.js +248 -28
  349. package/pulumi/utils/tagResources.js.map +1 -1
  350. package/pulumi/utils/uploadFolderToS3.js +101 -131
  351. package/pulumi/utils/uploadFolderToS3.js.map +1 -1
  352. package/pulumi/utils/withServiceManifest.js +28 -37
  353. package/pulumi/utils/withServiceManifest.js.map +1 -1
  354. package/services/AdminStackOutputService.js +14 -11
  355. package/services/AdminStackOutputService.js.map +1 -1
  356. package/services/ApiStackOutputService.js +14 -11
  357. package/services/ApiStackOutputService.js.map +1 -1
  358. package/services/CoreStackOutputService.js +14 -11
  359. package/services/CoreStackOutputService.js.map +1 -1
  360. package/utils/getTemplatesFolderPath.js +8 -10
  361. package/utils/getTemplatesFolderPath.js.map +1 -1
  362. package/utils/index.js +0 -2
  363. package/abstractions/features/pulumi/index.js.map +0 -1
  364. package/abstractions/index.js.map +0 -1
  365. package/apps/index.js.map +0 -1
  366. package/exports/extensions.js.map +0 -1
  367. package/exports/infra/admin.js.map +0 -1
  368. package/exports/infra/api.js.map +0 -1
  369. package/exports/infra/core.js.map +0 -1
  370. package/exports/infra.js.map +0 -1
  371. package/extensions/ProjectAws/AdminStackOutputService.js.map +0 -1
  372. package/extensions/ProjectAws/ApiStackOutputService.js.map +0 -1
  373. package/extensions/ProjectAws/CoreStackOutputService.js.map +0 -1
  374. package/extensions/index.js.map +0 -1
  375. package/features/index.js.map +0 -1
  376. package/index.js.map +0 -1
  377. package/pulumi/apps/admin/index.js.map +0 -1
  378. package/pulumi/apps/api/index.js.map +0 -1
  379. package/pulumi/apps/blueGreen/types.js.map +0 -1
  380. package/pulumi/apps/common/index.js.map +0 -1
  381. package/pulumi/apps/core/cognitoIdentityProviders/index.js.map +0 -1
  382. package/pulumi/apps/core/index.js.map +0 -1
  383. package/pulumi/apps/index.js.map +0 -1
  384. package/pulumi/apps/react/index.js.map +0 -1
  385. package/pulumi/apps/syncSystem/types.js.map +0 -1
  386. package/pulumi/features/AdminPulumi/index.js.map +0 -1
  387. package/pulumi/features/ApiPulumi/index.js.map +0 -1
  388. package/pulumi/features/CorePulumi/index.js.map +0 -1
  389. package/pulumi/features/index.js.map +0 -1
  390. package/pulumi/index.js.map +0 -1
  391. package/pulumi/types.js.map +0 -1
  392. package/pulumi/utils/index.js.map +0 -1
  393. package/utils/index.js.map +0 -1
@@ -1,147 +1,117 @@
1
1
  import fs from "fs";
2
- import { S3Client, HeadObjectCommand } from "@webiny/aws-sdk/client-s3/index.js";
2
+ import { HeadObjectCommand, S3Client } from "@webiny/aws-sdk/client-s3/index.js";
3
3
  import mime from "mime";
4
- import chunk from "lodash/chunk.js";
4
+ import lodash_chunk from "lodash/chunk.js";
5
5
  import { relative } from "path";
6
6
  import { crawlDirectory } from "./crawlDirectory.js";
7
7
  import { getPresignedPost } from "./getPresignedPost.js";
8
8
  import { getEnvVariableAwsRegion } from "../env/awsRegion.js";
9
- import crypto from "crypto";
9
+ import crypto_0 from "crypto";
10
10
  function getFileChecksum(file) {
11
- const hash = crypto.createHash("md5");
12
- return new Promise(resolve => {
13
- const stream = fs.createReadStream(file);
14
- stream.on("data", function (data) {
15
- hash.update(data, "utf8");
11
+ const hash = crypto_0.createHash("md5");
12
+ return new Promise((resolve)=>{
13
+ const stream = fs.createReadStream(file);
14
+ stream.on("data", function(data) {
15
+ hash.update(data, "utf8");
16
+ });
17
+ stream.on("end", function() {
18
+ resolve(hash.digest("hex"));
19
+ });
16
20
  });
17
- stream.on("end", function () {
18
- resolve(hash.digest("hex"));
19
- });
20
- });
21
21
  }
22
- export const uploadFolderToS3 = async ({
23
- path: root,
24
- bucket,
25
- onFileUploadSuccess,
26
- onFileUploadError,
27
- onFileUploadSkip,
28
- // For backwards compatibility, we need to leave ACL on "public-read".
29
- acl = "public-read",
30
- cacheControl = "max-age=31536000"
31
- }) => {
32
- const s3 = new S3Client({
33
- region: getEnvVariableAwsRegion()
34
- });
35
- if (!fs.existsSync(root)) {
36
- throw new Error("Cannot continue, folder does not exist.");
37
- }
38
- const paths = [];
39
- await crawlDirectory(root, async path => {
40
- paths.push(path);
41
- });
42
- const pathsChunks = chunk(paths, 20);
43
- const cacheControls = [];
44
- if (typeof cacheControl === "string") {
45
- cacheControls.push({
46
- pattern: /.*/,
47
- value: cacheControl
22
+ const uploadFolderToS3 = async ({ path: root, bucket, onFileUploadSuccess, onFileUploadError, onFileUploadSkip, acl = "public-read", cacheControl = "max-age=31536000" })=>{
23
+ const s3 = new S3Client({
24
+ region: getEnvVariableAwsRegion()
48
25
  });
49
- } else if (Array.isArray(cacheControls)) {
50
- cacheControls.push(...cacheControl);
51
- }
52
- for (let i = 0; i < pathsChunks.length; i++) {
53
- const chunk = pathsChunks[i];
54
- const promises = [];
55
- for (let j = 0; j < chunk.length; j++) {
56
- const path = chunk[j];
57
- promises.push(new Promise(async resolve => {
58
- // We also replace "\" with "/", which is a path separator on Windows' CMD or Powershell.
59
- const key = relative(root, path).replace(/\\/g, "/");
60
- try {
61
- // Get file checksum so that we can check if a file needs to be uploaded or not.
62
- const checksum = await getFileChecksum(path);
63
- let skipUpload = false;
64
- try {
65
- const existingObject = await s3.send(new HeadObjectCommand({
66
- Bucket: bucket,
67
- Key: key
68
- }));
69
- if (existingObject.Metadata?.checksum === checksum) {
70
- skipUpload = true;
71
- }
72
- } catch {
73
- // Do nothing.
74
- }
75
- if (skipUpload) {
76
- if (typeof onFileUploadSkip === "function") {
77
- await onFileUploadSkip({
78
- paths: {
79
- full: path,
80
- relative: key
81
- }
82
- });
83
- }
84
- } else {
85
- const cacheControl = cacheControls.find(item => item.pattern.test(key));
86
- const contentType = mime.getType(path);
87
- const {
88
- url,
89
- fields
90
- } = await getPresignedPost({
91
- bucket,
92
- key,
93
- acl,
94
- checksum,
95
- contentType,
96
- cacheControl: cacheControl ? cacheControl.value : undefined
97
- });
98
- const data = {
99
- ...fields,
100
- "Content-Type": contentType || "",
101
- "X-Amz-Meta-Checksum": checksum,
102
- file: fs.readFileSync(path)
103
- };
104
- if (cacheControl) {
105
- data["Cache-Control"] = cacheControl.value;
106
- }
107
- const formData = new FormData();
108
- for (const key in data) {
109
- const value = new Blob([Buffer.from(data[key])]);
110
- formData.append(key, value);
111
- }
112
- const res = await fetch(url, {
113
- method: "POST",
114
- body: formData
115
- });
116
- if (res.status > 299) {
117
- throw new Error(`${res.statusText}\n${await res.text()}`);
118
- }
119
- if (typeof onFileUploadSuccess === "function") {
120
- await onFileUploadSuccess({
121
- paths: {
122
- full: path,
123
- relative: key
26
+ if (!fs.existsSync(root)) throw new Error("Cannot continue, folder does not exist.");
27
+ const paths = [];
28
+ await crawlDirectory(root, async (path)=>{
29
+ paths.push(path);
30
+ });
31
+ const pathsChunks = lodash_chunk(paths, 20);
32
+ const cacheControls = [];
33
+ if ("string" == typeof cacheControl) cacheControls.push({
34
+ pattern: /.*/,
35
+ value: cacheControl
36
+ });
37
+ else if (Array.isArray(cacheControls)) cacheControls.push(...cacheControl);
38
+ for(let i = 0; i < pathsChunks.length; i++){
39
+ const chunk = pathsChunks[i];
40
+ const promises = [];
41
+ for(let j = 0; j < chunk.length; j++){
42
+ const path = chunk[j];
43
+ promises.push(new Promise(async (resolve)=>{
44
+ const key = relative(root, path).replace(/\\/g, "/");
45
+ try {
46
+ const checksum = await getFileChecksum(path);
47
+ let skipUpload = false;
48
+ try {
49
+ const existingObject = await s3.send(new HeadObjectCommand({
50
+ Bucket: bucket,
51
+ Key: key
52
+ }));
53
+ if (existingObject.Metadata?.checksum === checksum) skipUpload = true;
54
+ } catch {}
55
+ if (skipUpload) {
56
+ if ("function" == typeof onFileUploadSkip) await onFileUploadSkip({
57
+ paths: {
58
+ full: path,
59
+ relative: key
60
+ }
61
+ });
62
+ } else {
63
+ const cacheControl = cacheControls.find((item)=>item.pattern.test(key));
64
+ const contentType = mime.getType(path);
65
+ const { url, fields } = await getPresignedPost({
66
+ bucket,
67
+ key,
68
+ acl,
69
+ checksum,
70
+ contentType,
71
+ cacheControl: cacheControl ? cacheControl.value : void 0
72
+ });
73
+ const data = {
74
+ ...fields,
75
+ "Content-Type": contentType || "",
76
+ "X-Amz-Meta-Checksum": checksum,
77
+ file: fs.readFileSync(path)
78
+ };
79
+ if (cacheControl) data["Cache-Control"] = cacheControl.value;
80
+ const formData = new FormData();
81
+ for(const key in data){
82
+ const value = new Blob([
83
+ Buffer.from(data[key])
84
+ ]);
85
+ formData.append(key, value);
86
+ }
87
+ const res = await fetch(url, {
88
+ method: "POST",
89
+ body: formData
90
+ });
91
+ if (res.status > 299) throw new Error(`${res.statusText}\n${await res.text()}`);
92
+ if ("function" == typeof onFileUploadSuccess) await onFileUploadSuccess({
93
+ paths: {
94
+ full: path,
95
+ relative: key
96
+ }
97
+ });
98
+ }
99
+ resolve();
100
+ } catch (e) {
101
+ if ("function" == typeof onFileUploadError) await onFileUploadError({
102
+ paths: {
103
+ full: path,
104
+ relative: key
105
+ },
106
+ error: e
107
+ });
108
+ resolve();
124
109
  }
125
- });
126
- }
127
- }
128
- resolve();
129
- } catch (e) {
130
- if (typeof onFileUploadError === "function") {
131
- await onFileUploadError({
132
- paths: {
133
- full: path,
134
- relative: key
135
- },
136
- error: e
137
- });
138
- }
139
- resolve();
110
+ }));
140
111
  }
141
- }));
112
+ await Promise.all(promises);
142
113
  }
143
- await Promise.all(promises);
144
- }
145
114
  };
115
+ export { uploadFolderToS3 };
146
116
 
147
117
  //# sourceMappingURL=uploadFolderToS3.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","S3Client","HeadObjectCommand","mime","chunk","relative","crawlDirectory","getPresignedPost","getEnvVariableAwsRegion","crypto","getFileChecksum","file","hash","createHash","Promise","resolve","stream","createReadStream","on","data","update","digest","uploadFolderToS3","path","root","bucket","onFileUploadSuccess","onFileUploadError","onFileUploadSkip","acl","cacheControl","s3","region","existsSync","Error","paths","push","pathsChunks","cacheControls","pattern","value","Array","isArray","i","length","promises","j","key","replace","checksum","skipUpload","existingObject","send","Bucket","Key","Metadata","full","find","item","test","contentType","getType","url","fields","undefined","readFileSync","formData","FormData","Blob","Buffer","from","append","res","fetch","method","body","status","statusText","text","e","error","all"],"sources":["uploadFolderToS3.ts"],"sourcesContent":["import fs from \"fs\";\nimport type { PresignedPostOptions } from \"@webiny/aws-sdk/client-s3/index.js\";\nimport { S3Client, HeadObjectCommand } from \"@webiny/aws-sdk/client-s3/index.js\";\nimport mime from \"mime\";\nimport chunk from \"lodash/chunk.js\";\nimport { relative } from \"path\";\nimport { crawlDirectory } from \"./crawlDirectory.js\";\nimport { getPresignedPost } from \"./getPresignedPost.js\";\nimport { getEnvVariableAwsRegion } from \"~/pulumi/env/awsRegion.js\";\nimport crypto from \"crypto\";\n\nfunction getFileChecksum(file: string): Promise<string> {\n const hash = crypto.createHash(\"md5\");\n\n return new Promise(resolve => {\n const stream = fs.createReadStream(file);\n stream.on(\"data\", function (data: any) {\n hash.update(data, \"utf8\");\n });\n\n stream.on(\"end\", function () {\n resolve(hash.digest(\"hex\"));\n });\n });\n}\n\nexport interface Paths {\n full: string;\n relative: string;\n}\n\nexport type CacheControls = Array<{\n pattern: RegExp;\n value: string;\n}>;\n\nexport interface UploadFolderToS3Params {\n // Path to the folder that needs to be uploaded.\n path: string;\n\n // Object ACL.\n acl: string;\n\n // A callback that gets called every time a file has been uploaded successfully.\n onFileUploadSuccess: (params: { paths: Paths }) => void;\n\n // A callback that gets called every time a file has not been uploaded successfully.\n onFileUploadError: (params: { paths: Paths; error: Error }) => void;\n\n // A callback that gets called every time a file upload has been skipped.\n onFileUploadSkip: (params: { paths: Paths }) => void;\n\n // Target bucket\n bucket: PresignedPostOptions[\"Bucket\"];\n\n // Cache control to apply to each uploaded file\n cacheControl?: string | CacheControls;\n}\n\nexport const uploadFolderToS3 = async ({\n path: root,\n bucket,\n onFileUploadSuccess,\n onFileUploadError,\n onFileUploadSkip,\n // For backwards compatibility, we need to leave ACL on \"public-read\".\n acl = \"public-read\",\n cacheControl = \"max-age=31536000\"\n}: UploadFolderToS3Params) => {\n const s3 = new S3Client({\n region: getEnvVariableAwsRegion()\n });\n\n if (!fs.existsSync(root)) {\n throw new Error(\"Cannot continue, folder does not exist.\");\n }\n\n const paths: string[] = [];\n\n await crawlDirectory(root, async (path: string) => {\n paths.push(path);\n });\n\n const pathsChunks = chunk(paths, 20);\n\n const cacheControls: CacheControls = [];\n if (typeof cacheControl === \"string\") {\n cacheControls.push({ pattern: /.*/, value: cacheControl });\n } else if (Array.isArray(cacheControls)) {\n cacheControls.push(...cacheControl);\n }\n\n for (let i = 0; i < pathsChunks.length; i++) {\n const chunk = pathsChunks[i];\n\n const promises = [];\n for (let j = 0; j < chunk.length; j++) {\n const path = chunk[j];\n\n promises.push(\n new Promise<void>(async resolve => {\n // We also replace \"\\\" with \"/\", which is a path separator on Windows' CMD or Powershell.\n const key = relative(root, path).replace(/\\\\/g, \"/\");\n try {\n // Get file checksum so that we can check if a file needs to be uploaded or not.\n const checksum = await getFileChecksum(path);\n\n let skipUpload = false;\n try {\n const existingObject = await s3.send(\n new HeadObjectCommand({\n Bucket: bucket,\n Key: key\n })\n );\n\n if (existingObject.Metadata?.checksum === checksum) {\n skipUpload = true;\n }\n } catch {\n // Do nothing.\n }\n\n if (skipUpload) {\n if (typeof onFileUploadSkip === \"function\") {\n await onFileUploadSkip({ paths: { full: path, relative: key } });\n }\n } else {\n const cacheControl = cacheControls.find(item => item.pattern.test(key));\n const contentType = mime.getType(path);\n\n const { url, fields } = await getPresignedPost({\n bucket,\n key,\n acl,\n checksum,\n contentType,\n cacheControl: cacheControl ? cacheControl.value : undefined\n });\n\n const data: Record<string, string | Buffer> = {\n ...fields,\n \"Content-Type\": contentType || \"\",\n \"X-Amz-Meta-Checksum\": checksum,\n file: fs.readFileSync(path)\n };\n\n if (cacheControl) {\n data[\"Cache-Control\"] = cacheControl.value;\n }\n\n const formData = new FormData();\n for (const key in data) {\n const value = new Blob([Buffer.from(data[key])]);\n formData.append(key, value);\n }\n\n const res = await fetch(url, {\n method: \"POST\",\n body: formData\n });\n\n if (res.status > 299) {\n throw new Error(`${res.statusText}\\n${await res.text()}`);\n }\n\n if (typeof onFileUploadSuccess === \"function\") {\n await onFileUploadSuccess({ paths: { full: path, relative: key } });\n }\n }\n resolve();\n } catch (e) {\n if (typeof onFileUploadError === \"function\") {\n await onFileUploadError({\n paths: { full: path, relative: key },\n error: e\n });\n }\n resolve();\n }\n })\n );\n }\n\n await Promise.all(promises);\n }\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,IAAI;AAEnB,SAASC,QAAQ,EAAEC,iBAAiB,QAAQ,oCAAoC;AAChF,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAASC,QAAQ,QAAQ,MAAM;AAC/B,SAASC,cAAc;AACvB,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,OAAOC,MAAM,MAAM,QAAQ;AAE3B,SAASC,eAAeA,CAACC,IAAY,EAAmB;EACpD,MAAMC,IAAI,GAAGH,MAAM,CAACI,UAAU,CAAC,KAAK,CAAC;EAErC,OAAO,IAAIC,OAAO,CAACC,OAAO,IAAI;IAC1B,MAAMC,MAAM,GAAGhB,EAAE,CAACiB,gBAAgB,CAACN,IAAI,CAAC;IACxCK,MAAM,CAACE,EAAE,CAAC,MAAM,EAAE,UAAUC,IAAS,EAAE;MACnCP,IAAI,CAACQ,MAAM,CAACD,IAAI,EAAE,MAAM,CAAC;IAC7B,CAAC,CAAC;IAEFH,MAAM,CAACE,EAAE,CAAC,KAAK,EAAE,YAAY;MACzBH,OAAO,CAACH,IAAI,CAACS,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC;EACN,CAAC,CAAC;AACN;AAmCA,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAAO;EACnCC,IAAI,EAAEC,IAAI;EACVC,MAAM;EACNC,mBAA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,CAAC,CAAC;UACN;UACAhE,OAAO,CAAC,CAAC;QACb;MACJ,CAAC,CACL,CAAC;IACL;IAEA,MAAMD,OAAO,CAACmE,GAAG,CAACpC,QAAQ,CAAC;EAC/B;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"pulumi/utils/uploadFolderToS3.js","sources":["../../../src/pulumi/utils/uploadFolderToS3.ts"],"sourcesContent":["import fs from \"fs\";\nimport type { PresignedPostOptions } from \"@webiny/aws-sdk/client-s3/index.js\";\nimport { S3Client, HeadObjectCommand } from \"@webiny/aws-sdk/client-s3/index.js\";\nimport mime from \"mime\";\nimport chunk from \"lodash/chunk.js\";\nimport { relative } from \"path\";\nimport { crawlDirectory } from \"./crawlDirectory.js\";\nimport { getPresignedPost } from \"./getPresignedPost.js\";\nimport { getEnvVariableAwsRegion } from \"~/pulumi/env/awsRegion.js\";\nimport crypto from \"crypto\";\n\nfunction getFileChecksum(file: string): Promise<string> {\n const hash = crypto.createHash(\"md5\");\n\n return new Promise(resolve => {\n const stream = fs.createReadStream(file);\n stream.on(\"data\", function (data: any) {\n hash.update(data, \"utf8\");\n });\n\n stream.on(\"end\", function () {\n resolve(hash.digest(\"hex\"));\n });\n });\n}\n\nexport interface Paths {\n full: string;\n relative: string;\n}\n\nexport type CacheControls = Array<{\n pattern: RegExp;\n value: string;\n}>;\n\nexport interface UploadFolderToS3Params {\n // Path to the folder that needs to be uploaded.\n path: string;\n\n // Object ACL.\n acl: string;\n\n // A callback that gets called every time a file has been uploaded successfully.\n onFileUploadSuccess: (params: { paths: Paths }) => void;\n\n // A callback that gets called every time a file has not been uploaded successfully.\n onFileUploadError: (params: { paths: Paths; error: Error }) => void;\n\n // A callback that gets called every time a file upload has been skipped.\n onFileUploadSkip: (params: { paths: Paths }) => void;\n\n // Target bucket\n bucket: PresignedPostOptions[\"Bucket\"];\n\n // Cache control to apply to each uploaded file\n cacheControl?: string | CacheControls;\n}\n\nexport const uploadFolderToS3 = async ({\n path: root,\n bucket,\n onFileUploadSuccess,\n onFileUploadError,\n onFileUploadSkip,\n // For backwards compatibility, we need to leave ACL on \"public-read\".\n acl = \"public-read\",\n cacheControl = \"max-age=31536000\"\n}: UploadFolderToS3Params) => {\n const s3 = new S3Client({\n region: getEnvVariableAwsRegion()\n });\n\n if (!fs.existsSync(root)) {\n throw new Error(\"Cannot continue, folder does not exist.\");\n }\n\n const paths: string[] = [];\n\n await crawlDirectory(root, async (path: string) => {\n paths.push(path);\n });\n\n const pathsChunks = chunk(paths, 20);\n\n const cacheControls: CacheControls = [];\n if (typeof cacheControl === \"string\") {\n cacheControls.push({ pattern: /.*/, value: cacheControl });\n } else if (Array.isArray(cacheControls)) {\n cacheControls.push(...cacheControl);\n }\n\n for (let i = 0; i < pathsChunks.length; i++) {\n const chunk = pathsChunks[i];\n\n const promises = [];\n for (let j = 0; j < chunk.length; j++) {\n const path = chunk[j];\n\n promises.push(\n new Promise<void>(async resolve => {\n // We also replace \"\\\" with \"/\", which is a path separator on Windows' CMD or Powershell.\n const key = relative(root, path).replace(/\\\\/g, \"/\");\n try {\n // Get file checksum so that we can check if a file needs to be uploaded or not.\n const checksum = await getFileChecksum(path);\n\n let skipUpload = false;\n try {\n const existingObject = await s3.send(\n new HeadObjectCommand({\n Bucket: bucket,\n Key: key\n })\n );\n\n if (existingObject.Metadata?.checksum === checksum) {\n skipUpload = true;\n }\n } catch {\n // Do nothing.\n }\n\n if (skipUpload) {\n if (typeof onFileUploadSkip === \"function\") {\n await onFileUploadSkip({ paths: { full: path, relative: key } });\n }\n } else {\n const cacheControl = cacheControls.find(item => item.pattern.test(key));\n const contentType = mime.getType(path);\n\n const { url, fields } = await getPresignedPost({\n bucket,\n key,\n acl,\n checksum,\n contentType,\n cacheControl: cacheControl ? cacheControl.value : undefined\n });\n\n const data: Record<string, string | Buffer> = {\n ...fields,\n \"Content-Type\": contentType || \"\",\n \"X-Amz-Meta-Checksum\": checksum,\n file: fs.readFileSync(path)\n };\n\n if (cacheControl) {\n data[\"Cache-Control\"] = cacheControl.value;\n }\n\n const formData = new FormData();\n for (const key in data) {\n const value = new Blob([Buffer.from(data[key])]);\n formData.append(key, value);\n }\n\n const res = await fetch(url, {\n method: \"POST\",\n body: formData\n });\n\n if (res.status > 299) {\n throw new Error(`${res.statusText}\\n${await res.text()}`);\n }\n\n if (typeof onFileUploadSuccess === \"function\") {\n await onFileUploadSuccess({ paths: { full: path, relative: key } });\n }\n }\n resolve();\n } catch (e) {\n if (typeof onFileUploadError === \"function\") {\n await onFileUploadError({\n paths: { full: path, relative: key },\n error: e\n });\n }\n resolve();\n }\n })\n );\n }\n\n await Promise.all(promises);\n }\n};\n"],"names":["getFileChecksum","file","hash","crypto","Promise","resolve","stream","fs","data","uploadFolderToS3","root","bucket","onFileUploadSuccess","onFileUploadError","onFileUploadSkip","acl","cacheControl","s3","S3Client","getEnvVariableAwsRegion","Error","paths","crawlDirectory","path","pathsChunks","chunk","cacheControls","Array","i","promises","j","key","relative","checksum","skipUpload","existingObject","HeadObjectCommand","item","contentType","mime","url","fields","getPresignedPost","undefined","formData","FormData","value","Blob","Buffer","res","fetch","e"],"mappings":";;;;;;;;;AAWA,SAASA,gBAAgBC,IAAY;IACjC,MAAMC,OAAOC,SAAAA,UAAiB,CAAC;IAE/B,OAAO,IAAIC,QAAQC,CAAAA;QACf,MAAMC,SAASC,GAAG,gBAAgB,CAACN;QACnCK,OAAO,EAAE,CAAC,QAAQ,SAAUE,IAAS;YACjCN,KAAK,MAAM,CAACM,MAAM;QACtB;QAEAF,OAAO,EAAE,CAAC,OAAO;YACbD,QAAQH,KAAK,MAAM,CAAC;QACxB;IACJ;AACJ;AAmCO,MAAMO,mBAAmB,OAAO,EACnC,MAAMC,IAAI,EACVC,MAAM,EACNC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAEhBC,MAAM,aAAa,EACnBC,eAAe,kBAAkB,EACZ;IACrB,MAAMC,KAAK,IAAIC,SAAS;QACpB,QAAQC;IACZ;IAEA,IAAI,C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ChB;wBAEjC,MAAM,EAAEiB,GAAG,EAAEC,MAAM,EAAE,GAAG,MAAMC,iBAAiB;4BAC3C/B;4BACAoB;4BACAhB;4BACAkB;4BACAK;4BACA,cAActB,eAAeA,aAAa,KAAK,GAAG2B;wBACtD;wBAEA,MAAMnC,OAAwC;4BAC1C,GAAGiC,MAAM;4BACT,gBAAgBH,eAAe;4BAC/B,uBAAuBL;4BACvB,MAAM1B,GAAG,YAAY,CAACgB;wBAC1B;wBAEA,IAAIP,cACAR,IAAI,CAAC,gBAAgB,GAAGQ,aAAa,KAAK;wBAG9C,MAAM4B,WAAW,IAAIC;wBACrB,IAAK,MAAMd,OAAOvB,KAAM;4BACpB,MAAMsC,QAAQ,IAAIC,KAAK;gCAACC,OAAO,IAAI,CAACxC,IAAI,CAACuB,IAAI;6BAAE;4BAC/Ca,SAAS,MAAM,CAACb,KAAKe;wBACzB;wBAEA,MAAMG,MAAM,MAAMC,MAAMV,KAAK;4BACzB,QAAQ;4BACR,MAAMI;wBACV;wBAEA,IAAIK,IAAI,MAAM,GAAG,KACb,MAAM,IAAI7B,MAAM,GAAG6B,IAAI,UAAU,CAAC,EAAE,EAAE,MAAMA,IAAI,IAAI,IAAI;wBAG5D,IAAI,AAA+B,cAA/B,OAAOrC,qBACP,MAAMA,oBAAoB;4BAAE,OAAO;gCAAE,MAAMW;gCAAM,UAAUQ;4BAAI;wBAAE;oBAEzE;oBACA1B;gBACJ,EAAE,OAAO8C,GAAG;oBACR,IAAI,AAA6B,cAA7B,OAAOtC,mBACP,MAAMA,kBAAkB;wBACpB,OAAO;4BAAE,MAAMU;4BAAM,UAAUQ;wBAAI;wBACnC,OAAOoB;oBACX;oBAEJ9C;gBACJ;YACJ;QAER;QAEA,MAAMD,QAAQ,GAAG,CAACyB;IACtB;AACJ"}
@@ -1,45 +1,36 @@
1
1
  import merge from "lodash/merge.js";
2
2
  import { addServiceManifestTableItem } from "./addServiceManifestTableItem.js";
3
3
  import { CoreOutput } from "../apps/index.js";
4
- const defaultApplyManifests = (app, manifests) => {
5
- const core = app.getModule(CoreOutput);
6
- const table = {
7
- tableName: core.primaryDynamodbTableName,
8
- hashKey: core.primaryDynamodbTableHashKey,
9
- rangeKey: core.primaryDynamodbTableRangeKey
10
- };
11
- manifests.forEach(manifest => addServiceManifestTableItem(app, table, manifest));
4
+ const defaultApplyManifests = (app, manifests)=>{
5
+ const core = app.getModule(CoreOutput);
6
+ const table = {
7
+ tableName: core.primaryDynamodbTableName,
8
+ hashKey: core.primaryDynamodbTableHashKey,
9
+ rangeKey: core.primaryDynamodbTableRangeKey
10
+ };
11
+ manifests.forEach((manifest)=>addServiceManifestTableItem(app, table, manifest));
12
12
  };
13
-
14
- /**
15
- * Augment the given app with `addServiceManifest` functionality.
16
- * @param {PulumiApp} app
17
- */
18
- export function withServiceManifest(app, applyManifests) {
19
- const manifests = {};
20
- function addServiceManifest(manifest) {
21
- manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);
22
- }
23
- app.decorateProgram(async (program, app) => {
24
- const output = await program({
25
- ...app,
26
- addServiceManifest
27
- });
28
- app.addHandler(() => {
29
- if (!applyManifests) {
30
- defaultApplyManifests(app, Object.values(manifests));
31
- return;
32
- }
33
- applyManifests(Object.values(manifests));
13
+ function withServiceManifest(app, applyManifests) {
14
+ const manifests = {};
15
+ function addServiceManifest(manifest) {
16
+ manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);
17
+ }
18
+ app.decorateProgram(async (program, app)=>{
19
+ const output = await program({
20
+ ...app,
21
+ addServiceManifest
22
+ });
23
+ app.addHandler(()=>{
24
+ if (!applyManifests) return void defaultApplyManifests(app, Object.values(manifests));
25
+ applyManifests(Object.values(manifests));
26
+ });
27
+ return output;
34
28
  });
35
- return output;
36
- });
37
-
38
- // Augment the original PulumiApp.
39
- return {
40
- ...app,
41
- addServiceManifest
42
- };
29
+ return {
30
+ ...app,
31
+ addServiceManifest
32
+ };
43
33
  }
34
+ export { withServiceManifest };
44
35
 
45
36
  //# sourceMappingURL=withServiceManifest.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["merge","addServiceManifestTableItem","CoreOutput","defaultApplyManifests","app","manifests","core","getModule","table","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","forEach","manifest","withServiceManifest","applyManifests","addServiceManifest","name","decorateProgram","program","output","addHandler","Object","values"],"sources":["withServiceManifest.ts"],"sourcesContent":["import merge from \"lodash/merge.js\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport type { ServiceManifest, TableDefinition } from \"./addServiceManifestTableItem.js\";\nimport { addServiceManifestTableItem } from \"./addServiceManifestTableItem.js\";\nimport { CoreOutput } from \"~/pulumi/apps/index.js\";\n\nexport interface WithServiceManifest {\n addServiceManifest(manifest: ServiceManifest): void;\n}\n\ninterface ApplyManifests {\n (manifests: ServiceManifest[]): void;\n}\n\nconst defaultApplyManifests = (app: PulumiApp, manifests: ServiceManifest[]) => {\n const core = app.getModule(CoreOutput);\n\n const table: TableDefinition = {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: core.primaryDynamodbTableRangeKey\n };\n\n manifests.forEach(manifest => addServiceManifestTableItem(app, table, manifest));\n};\n\n/**\n * Augment the given app with `addServiceManifest` functionality.\n * @param {PulumiApp} app\n */\nexport function withServiceManifest<T extends PulumiApp>(\n app: T,\n applyManifests?: ApplyManifests\n): T & WithServiceManifest {\n const manifests: Record<string, ServiceManifest> = {};\n\n function addServiceManifest(manifest: ServiceManifest) {\n manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);\n }\n\n app.decorateProgram<{ addServiceManifest: typeof addServiceManifest }>(async (program, app) => {\n const output = await program({\n ...app,\n addServiceManifest\n });\n\n app.addHandler(() => {\n if (!applyManifests) {\n defaultApplyManifests(app, Object.values(manifests));\n return;\n }\n\n applyManifests(Object.values(manifests));\n });\n\n return output;\n });\n\n // Augment the original PulumiApp.\n return {\n ...app,\n addService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ACjB,CAAC,CAAC;;EAEF;EACA,OAAO;IACH,GAAGnB,GAAG;IACNe;EACJ,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"pulumi/utils/withServiceManifest.js","sources":["../../../src/pulumi/utils/withServiceManifest.ts"],"sourcesContent":["import merge from \"lodash/merge.js\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport type { ServiceManifest, TableDefinition } from \"./addServiceManifestTableItem.js\";\nimport { addServiceManifestTableItem } from \"./addServiceManifestTableItem.js\";\nimport { CoreOutput } from \"~/pulumi/apps/index.js\";\n\nexport interface WithServiceManifest {\n addServiceManifest(manifest: ServiceManifest): void;\n}\n\ninterface ApplyManifests {\n (manifests: ServiceManifest[]): void;\n}\n\nconst defaultApplyManifests = (app: PulumiApp, manifests: ServiceManifest[]) => {\n const core = app.getModule(CoreOutput);\n\n const table: TableDefinition = {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: core.primaryDynamodbTableRangeKey\n };\n\n manifests.forEach(manifest => addServiceManifestTableItem(app, table, manifest));\n};\n\n/**\n * Augment the given app with `addServiceManifest` functionality.\n * @param {PulumiApp} app\n */\nexport function withServiceManifest<T extends PulumiApp>(\n app: T,\n applyManifests?: ApplyManifests\n): T & WithServiceManifest {\n const manifests: Record<string, ServiceManifest> = {};\n\n function addServiceManifest(manifest: ServiceManifest) {\n manifests[manifest.name] = merge({}, manifests[manifest.name], manifest);\n }\n\n app.decorateProgram<{ addServiceManifest: typeof addServiceManifest }>(async (program, app) => {\n const output = await program({\n ...app,\n addServiceManifest\n });\n\n app.addHandler(() => {\n if (!applyManifests) {\n defaultApplyManifests(app, Object.values(manifests));\n return;\n }\n\n applyManifests(Object.values(manifests));\n });\n\n return output;\n });\n\n // Augment the original PulumiApp.\n return {\n ...app,\n addServiceManifest\n };\n}\n"],"names":["defaultApplyManifests","app","manifests","core","CoreOutput","table","manifest","addServiceManifestTableItem","withServiceManifest","applyManifests","addServiceManifest","merge","program","output","Object"],"mappings":";;;AAcA,MAAMA,wBAAwB,CAACC,KAAgBC;IAC3C,MAAMC,OAAOF,IAAI,SAAS,CAACG;IAE3B,MAAMC,QAAyB;QAC3B,WAAWF,KAAK,wBAAwB;QACxC,SAASA,KAAK,2BAA2B;QACzC,UAAUA,KAAK,4BAA4B;IAC/C;IAEAD,UAAU,OAAO,CAACI,CAAAA,WAAYC,4BAA4BN,KAAKI,OAAOC;AAC1E;AAMO,SAASE,oBACZP,GAAM,EACNQ,cAA+B;IAE/B,MAAMP,YAA6C,CAAC;IAEpD,SAASQ,mBAAmBJ,QAAyB;QACjDJ,SAAS,CAACI,SAAS,IAAI,CAAC,GAAGK,MAAM,CAAC,GAAGT,SAAS,CAACI,SAAS,IAAI,CAAC,EAAEA;IACnE;IAEAL,IAAI,eAAe,CAAoD,OAAOW,SAASX;QACnF,MAAMY,SAAS,MAAMD,QAAQ;YACzB,GAAGX,GAAG;YACNS;QACJ;QAEAT,IAAI,UAAU,CAAC;YACX,IAAI,CAACQ,gBAAgB,YACjBT,sBAAsBC,KAAKa,OAAO,MAAM,CAACZ;YAI7CO,eAAeK,OAAO,MAAM,CAACZ;QACjC;QAEA,OAAOW;IACX;IAGA,OAAO;QACH,GAAGZ,GAAG;QACNS;IACJ;AACJ"}
@@ -1,16 +1,19 @@
1
1
  import { GetAppStackOutput } from "@webiny/project/abstractions/index.js";
2
- import { AdminStackOutputService as AdminStackOutputServiceAbstraction } from "../abstractions/index.js";
3
- export class DefaultAdminStackOutputServiceAbstraction {
4
- constructor(getAppStackOutput) {
5
- this.getAppStackOutput = getAppStackOutput;
6
- }
7
- async execute() {
8
- return this.getAppStackOutput.execute("admin");
9
- }
2
+ import { AdminStackOutputService } from "../abstractions/index.js";
3
+ class DefaultAdminStackOutputServiceAbstraction {
4
+ constructor(getAppStackOutput){
5
+ this.getAppStackOutput = getAppStackOutput;
6
+ }
7
+ async execute() {
8
+ return this.getAppStackOutput.execute("admin");
9
+ }
10
10
  }
11
- export const AdminStackOutputService = AdminStackOutputServiceAbstraction.createImplementation({
12
- implementation: DefaultAdminStackOutputServiceAbstraction,
13
- dependencies: [GetAppStackOutput]
11
+ const AdminStackOutputService_AdminStackOutputService = AdminStackOutputService.createImplementation({
12
+ implementation: DefaultAdminStackOutputServiceAbstraction,
13
+ dependencies: [
14
+ GetAppStackOutput
15
+ ]
14
16
  });
17
+ export { AdminStackOutputService_AdminStackOutputService as AdminStackOutputService, DefaultAdminStackOutputServiceAbstraction };
15
18
 
16
19
  //# sourceMappingURL=AdminStackOutputService.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GetAppStackOutput","AdminStackOutputService","AdminStackOutputServiceAbstraction","DefaultAdminStackOutputServiceAbstraction","constructor","getAppStackOutput","execute","createImplementation","implementation","dependencies"],"sources":["AdminStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { AdminStackOutputService as AdminStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultAdminStackOutputServiceAbstraction\n implements AdminStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends AdminStackOutputServiceAbstraction.Output =\n AdminStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"admin\");\n }\n}\n\nexport const AdminStackOutputService = AdminStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultAdminStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,uBAAuB,IAAIC,kCAAkC;AAEtE,OAAO,MAAMC,yCAAyC,CAEtD;EACIC,WAAWA,CAAkBC,iBAA8C,EAAE;IAAA,KAAhDA,iBAA8C,GAA9CA,iBAA8C;EAAG;EAE9E,MAAMC,OAAOA,CAAA,EAGgB;IACzB,OAAO,IAAI,CAACD,iBAAiB,CAACC,OAAO,CAAU,OAAO,CAAC;EAC3D;AACJ;AAEA,OAAO,MAAML,uBAAuB,GAAGC,kCAAkC,CAACK,oBAAoB,CAAC;EAC3FC,cAAc,EAAEL,yCAAyC;EACzDM,YAAY,EAAE,CAACT,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"services/AdminStackOutputService.js","sources":["../../src/services/AdminStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { AdminStackOutputService as AdminStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultAdminStackOutputServiceAbstraction\n implements AdminStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends AdminStackOutputServiceAbstraction.Output =\n AdminStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"admin\");\n }\n}\n\nexport const AdminStackOutputService = AdminStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultAdminStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"names":["DefaultAdminStackOutputServiceAbstraction","getAppStackOutput","AdminStackOutputService","AdminStackOutputServiceAbstraction","GetAppStackOutput"],"mappings":";;AAGO,MAAMA;IAGT,YAA6BC,iBAA8C,CAAE;aAAhDA,iBAAiB,GAAjBA;IAAiD;IAE9E,MAAM,UAGuB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAU;IACnD;AACJ;AAEO,MAAMC,kDAA0BC,wBAAAA,oBAAuD,CAAC;IAC3F,gBAAgBH;IAChB,cAAc;QAACI;KAAkB;AACrC"}
@@ -1,16 +1,19 @@
1
1
  import { GetAppStackOutput } from "@webiny/project/abstractions/index.js";
2
- import { ApiStackOutputService as ApiStackOutputServiceAbstraction } from "../abstractions/index.js";
3
- export class DefaultApiStackOutputServiceAbstraction {
4
- constructor(getAppStackOutput) {
5
- this.getAppStackOutput = getAppStackOutput;
6
- }
7
- async execute() {
8
- return this.getAppStackOutput.execute("api");
9
- }
2
+ import { ApiStackOutputService } from "../abstractions/index.js";
3
+ class DefaultApiStackOutputServiceAbstraction {
4
+ constructor(getAppStackOutput){
5
+ this.getAppStackOutput = getAppStackOutput;
6
+ }
7
+ async execute() {
8
+ return this.getAppStackOutput.execute("api");
9
+ }
10
10
  }
11
- export const ApiStackOutputService = ApiStackOutputServiceAbstraction.createImplementation({
12
- implementation: DefaultApiStackOutputServiceAbstraction,
13
- dependencies: [GetAppStackOutput]
11
+ const ApiStackOutputService_ApiStackOutputService = ApiStackOutputService.createImplementation({
12
+ implementation: DefaultApiStackOutputServiceAbstraction,
13
+ dependencies: [
14
+ GetAppStackOutput
15
+ ]
14
16
  });
17
+ export { ApiStackOutputService_ApiStackOutputService as ApiStackOutputService, DefaultApiStackOutputServiceAbstraction };
15
18
 
16
19
  //# sourceMappingURL=ApiStackOutputService.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GetAppStackOutput","ApiStackOutputService","ApiStackOutputServiceAbstraction","DefaultApiStackOutputServiceAbstraction","constructor","getAppStackOutput","execute","createImplementation","implementation","dependencies"],"sources":["ApiStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { ApiStackOutputService as ApiStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultApiStackOutputServiceAbstraction\n implements ApiStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends ApiStackOutputServiceAbstraction.Output =\n ApiStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"api\");\n }\n}\n\nexport const ApiStackOutputService = ApiStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultApiStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,qBAAqB,IAAIC,gCAAgC;AAElE,OAAO,MAAMC,uCAAuC,CAEpD;EACIC,WAAWA,CAAkBC,iBAA8C,EAAE;IAAA,KAAhDA,iBAA8C,GAA9CA,iBAA8C;EAAG;EAE9E,MAAMC,OAAOA,CAAA,EAGgB;IACzB,OAAO,IAAI,CAACD,iBAAiB,CAACC,OAAO,CAAU,KAAK,CAAC;EACzD;AACJ;AAEA,OAAO,MAAML,qBAAqB,GAAGC,gCAAgC,CAACK,oBAAoB,CAAC;EACvFC,cAAc,EAAEL,uCAAuC;EACvDM,YAAY,EAAE,CAACT,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"services/ApiStackOutputService.js","sources":["../../src/services/ApiStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { ApiStackOutputService as ApiStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultApiStackOutputServiceAbstraction\n implements ApiStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends ApiStackOutputServiceAbstraction.Output =\n ApiStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"api\");\n }\n}\n\nexport const ApiStackOutputService = ApiStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultApiStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"names":["DefaultApiStackOutputServiceAbstraction","getAppStackOutput","ApiStackOutputService","ApiStackOutputServiceAbstraction","GetAppStackOutput"],"mappings":";;AAGO,MAAMA;IAGT,YAA6BC,iBAA8C,CAAE;aAAhDA,iBAAiB,GAAjBA;IAAiD;IAE9E,MAAM,UAGuB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAU;IACnD;AACJ;AAEO,MAAMC,8CAAwBC,sBAAAA,oBAAqD,CAAC;IACvF,gBAAgBH;IAChB,cAAc;QAACI;KAAkB;AACrC"}
@@ -1,16 +1,19 @@
1
1
  import { GetAppStackOutput } from "@webiny/project/abstractions/index.js";
2
- import { CoreStackOutputService as CoreStackOutputServiceAbstraction } from "../abstractions/index.js";
3
- export class DefaultCoreStackOutputServiceAbstraction {
4
- constructor(getAppStackOutput) {
5
- this.getAppStackOutput = getAppStackOutput;
6
- }
7
- async execute() {
8
- return this.getAppStackOutput.execute("core");
9
- }
2
+ import { CoreStackOutputService } from "../abstractions/index.js";
3
+ class DefaultCoreStackOutputServiceAbstraction {
4
+ constructor(getAppStackOutput){
5
+ this.getAppStackOutput = getAppStackOutput;
6
+ }
7
+ async execute() {
8
+ return this.getAppStackOutput.execute("core");
9
+ }
10
10
  }
11
- export const CoreStackOutputService = CoreStackOutputServiceAbstraction.createImplementation({
12
- implementation: DefaultCoreStackOutputServiceAbstraction,
13
- dependencies: [GetAppStackOutput]
11
+ const CoreStackOutputService_CoreStackOutputService = CoreStackOutputService.createImplementation({
12
+ implementation: DefaultCoreStackOutputServiceAbstraction,
13
+ dependencies: [
14
+ GetAppStackOutput
15
+ ]
14
16
  });
17
+ export { CoreStackOutputService_CoreStackOutputService as CoreStackOutputService, DefaultCoreStackOutputServiceAbstraction };
15
18
 
16
19
  //# sourceMappingURL=CoreStackOutputService.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GetAppStackOutput","CoreStackOutputService","CoreStackOutputServiceAbstraction","DefaultCoreStackOutputServiceAbstraction","constructor","getAppStackOutput","execute","createImplementation","implementation","dependencies"],"sources":["CoreStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { CoreStackOutputService as CoreStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultCoreStackOutputServiceAbstraction\n implements CoreStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends CoreStackOutputServiceAbstraction.Output =\n CoreStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"core\");\n }\n}\n\nexport const CoreStackOutputService = CoreStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultCoreStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,sBAAsB,IAAIC,iCAAiC;AAEpE,OAAO,MAAMC,wCAAwC,CAErD;EACIC,WAAWA,CAAkBC,iBAA8C,EAAE;IAAA,KAAhDA,iBAA8C,GAA9CA,iBAA8C;EAAG;EAE9E,MAAMC,OAAOA,CAAA,EAGgB;IACzB,OAAO,IAAI,CAACD,iBAAiB,CAACC,OAAO,CAAU,MAAM,CAAC;EAC1D;AACJ;AAEA,OAAO,MAAML,sBAAsB,GAAGC,iCAAiC,CAACK,oBAAoB,CAAC;EACzFC,cAAc,EAAEL,wCAAwC;EACxDM,YAAY,EAAE,CAACT,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"services/CoreStackOutputService.js","sources":["../../src/services/CoreStackOutputService.ts"],"sourcesContent":["import { GetAppStackOutput } from \"@webiny/project/abstractions/index.js\";\nimport { CoreStackOutputService as CoreStackOutputServiceAbstraction } from \"../abstractions/index.js\";\n\nexport class DefaultCoreStackOutputServiceAbstraction\n implements CoreStackOutputServiceAbstraction.Interface\n{\n constructor(private readonly getAppStackOutput: GetAppStackOutput.Interface) {}\n\n async execute<\n TOutput extends CoreStackOutputServiceAbstraction.Output =\n CoreStackOutputServiceAbstraction.Output\n >(): Promise<TOutput | null> {\n return this.getAppStackOutput.execute<TOutput>(\"core\");\n }\n}\n\nexport const CoreStackOutputService = CoreStackOutputServiceAbstraction.createImplementation({\n implementation: DefaultCoreStackOutputServiceAbstraction,\n dependencies: [GetAppStackOutput]\n});\n"],"names":["DefaultCoreStackOutputServiceAbstraction","getAppStackOutput","CoreStackOutputService","CoreStackOutputServiceAbstraction","GetAppStackOutput"],"mappings":";;AAGO,MAAMA;IAGT,YAA6BC,iBAA8C,CAAE;aAAhDA,iBAAiB,GAAjBA;IAAiD;IAE9E,MAAM,UAGuB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAU;IACnD;AACJ;AAEO,MAAMC,gDAAyBC,uBAAAA,oBAAsD,CAAC;IACzF,gBAAgBH;IAChB,cAAc;QAACI;KAAkB;AACrC"}
@@ -1,16 +1,14 @@
1
1
  import { findUpSync } from "find-up";
2
2
  import path from "path";
3
3
  const TEMPLATES_FOLDER_NAME = "_templates";
4
- export const getTemplatesFolderPath = () => {
5
- const templatesFolderPath = findUpSync(TEMPLATES_FOLDER_NAME, {
6
- type: "directory",
7
- cwd: path.join(import.meta.dirname)
8
- });
9
- if (!templatesFolderPath) {
10
- // This should never happen because we're controlling the templates.
11
- throw new Error("Could not find the `appTemplates` folder. Something went terribly wrong.");
12
- }
13
- return templatesFolderPath;
4
+ const getTemplatesFolderPath = ()=>{
5
+ const templatesFolderPath = findUpSync(TEMPLATES_FOLDER_NAME, {
6
+ type: "directory",
7
+ cwd: path.join(import.meta.dirname)
8
+ });
9
+ if (!templatesFolderPath) throw new Error("Could not find the `appTemplates` folder. Something went terribly wrong.");
10
+ return templatesFolderPath;
14
11
  };
12
+ export { getTemplatesFolderPath };
15
13
 
16
14
  //# sourceMappingURL=getTemplatesFolderPath.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["findUpSync","path","TEMPLATES_FOLDER_NAME","getTemplatesFolderPath","templatesFolderPath","type","cwd","join","import","meta","dirname","Error"],"sources":["getTemplatesFolderPath.ts"],"sourcesContent":["import { findUpSync } from \"find-up\";\nimport path from \"path\";\n\nconst TEMPLATES_FOLDER_NAME = \"_templates\";\n\nexport const getTemplatesFolderPath = () => {\n const templatesFolderPath = findUpSync(TEMPLATES_FOLDER_NAME, {\n type: \"directory\",\n cwd: path.join(import.meta.dirname)\n });\n\n if (!templatesFolderPath) {\n // This should never happen because we're controlling the templates.\n throw new Error(\"Could not find the `appTemplates` folder. Something went terribly wrong.\");\n }\n\n return templatesFolderPath;\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,SAAS;AACpC,OAAOC,IAAI,MAAM,MAAM;AAEvB,MAAMC,qBAAqB,GAAG,YAAY;AAE1C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACxC,MAAMC,mBAAmB,GAAGJ,UAAU,CAACE,qBAAqB,EAAE;IAC1DG,IAAI,EAAE,WAAW;IACjBC,GAAG,EAAEL,IAAI,CAACM,IAAI,CAACC,MAAM,CAACC,IAAI,CAACC,OAAO;EACtC,CAAC,CAAC;EAEF,IAAI,CAACN,mBAAmB,EAAE;IACtB;IACA,MAAM,IAAIO,KAAK,CAAC,0EAA0E,CAAC;EAC/F;EAEA,OAAOP,mBAAmB;AAC9B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils/getTemplatesFolderPath.js","sources":["../../src/utils/getTemplatesFolderPath.ts"],"sourcesContent":["import { findUpSync } from \"find-up\";\nimport path from \"path\";\n\nconst TEMPLATES_FOLDER_NAME = \"_templates\";\n\nexport const getTemplatesFolderPath = () => {\n const templatesFolderPath = findUpSync(TEMPLATES_FOLDER_NAME, {\n type: \"directory\",\n cwd: path.join(import.meta.dirname)\n });\n\n if (!templatesFolderPath) {\n // This should never happen because we're controlling the templates.\n throw new Error(\"Could not find the `appTemplates` folder. Something went terribly wrong.\");\n }\n\n return templatesFolderPath;\n};\n"],"names":["TEMPLATES_FOLDER_NAME","getTemplatesFolderPath","templatesFolderPath","findUpSync","path","Error"],"mappings":";;AAGA,MAAMA,wBAAwB;AAEvB,MAAMC,yBAAyB;IAClC,MAAMC,sBAAsBC,WAAWH,uBAAuB;QAC1D,MAAM;QACN,KAAKI,KAAK,IAAI,CAAC,YAAY,OAAO;IACtC;IAEA,IAAI,CAACF,qBAED,MAAM,IAAIG,MAAM;IAGpB,OAAOH;AACX"}
package/utils/index.js CHANGED
@@ -1,3 +1 @@
1
1
  export { getTemplatesFolderPath } from "./getTemplatesFolderPath.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CorePulumi.js\";\nexport * from \"./ApiPulumi.js\";\nexport * from \"./AdminPulumi.js\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./services/CoreStackOutputService.js\";\nexport * from \"./services/ApiStackOutputService.js\";\nexport * from \"./services/AdminStackOutputService.js\";\nexport * from \"./features/pulumi/index.js\";\nexport * from \"./InvokeLambdaFunction.js\";\nexport * from \"./ApiGqlClient.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
package/apps/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./createCoreApp.js\";\nexport * from \"./createApiApp.js\";\nexport * from \"./createAdminApp.js\";\nexport * from \"./createAdminAppConfig.js\";\nexport * from \"./createReactAppConfig.js\";\nexport * from \"./createBlueGreenApp.js\";\nexport * from \"./createSyncSystemApp.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["Api","Admin","Cli","Infra","Project"],"sources":["extensions.ts"],"sourcesContent":["export { Api } from \"~/api.js\";\nexport { Admin } from \"~/admin.js\";\nexport { Cli } from \"~/cli.js\";\nexport { Infra } from \"~/infra.js\";\nexport { Project } from \"~/project.js\";\n"],"mappings":"AAAA,SAASA,GAAG;AACZ,SAASC,KAAK;AACd,SAASC,GAAG;AACZ,SAASC,KAAK;AACd,SAASC,OAAO","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["AdminPulumi","AdminStackOutputService","GetAdminStackOutput"],"sources":["admin.ts"],"sourcesContent":["export { AdminPulumi } from \"~/abstractions/features/pulumi/AdminPulumi.js\";\nexport { AdminStackOutputService as GetAdminStackOutput } from \"~/abstractions/services/AdminStackOutputService.js\";\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,SAASC,uBAAuB,IAAIC,mBAAmB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["ApiPulumi","ApiStackOutputService","GetApiStackOutput"],"sources":["api.ts"],"sourcesContent":["export { ApiPulumi } from \"~/abstractions/features/pulumi/ApiPulumi.js\";\nexport { ApiStackOutputService as GetApiStackOutput } from \"~/abstractions/services/ApiStackOutputService.js\";\n"],"mappings":"AAAA,SAASA,SAAS;AAClB,SAASC,qBAAqB,IAAIC,iBAAiB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["CorePulumi","CoreStackOutputService","GetCoreStackOutput"],"sources":["core.ts"],"sourcesContent":["export { CorePulumi } from \"~/abstractions/features/pulumi/CorePulumi.js\";\nexport { CoreStackOutputService as GetCoreStackOutput } from \"~/abstractions/services/CoreStackOutputService.js\";\n"],"mappings":"AAAA,SAASA,UAAU;AACnB,SAASC,sBAAsB,IAAIC,kBAAkB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["ApiStackOutputService","ApiStackOutput","CoreStackOutputService","CoreStackOutput","ApiGqlClient","AdminStackOutputService","AdminStackOutput","InvokeLambdaFunction"],"sources":["infra.ts"],"sourcesContent":["export {\n ApiStackOutputService as ApiStackOutput,\n CoreStackOutputService as CoreStackOutput,\n ApiGqlClient,\n AdminStackOutputService as AdminStackOutput,\n InvokeLambdaFunction\n} from \"~/abstractions/index.js\";\n"],"mappings":"AAAA,SACIA,qBAAqB,IAAIC,cAAc,EACvCC,sBAAsB,IAAIC,eAAe,EACzCC,YAAY,EACZC,uBAAuB,IAAIC,gBAAgB,EAC3CC,oBAAoB","ignoreList":[]}