@webiny/project-aws 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.eb81deee7e
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.
- package/_templates/appTemplates/admin/src/index.tsx +0 -3
- package/_templates/appTemplates/api/graphql/package.json +3 -11
- package/_templates/appTemplates/api/graphql/src/index.ts +19 -76
- package/_templates/extensions/OpenSearch/api/graphql/src/index.ts +17 -90
- package/_templates/extensions/OpenSearch/coreDdbToEsHandler/dynamoToElastic/src/index.ts +19 -12
- package/abstractions/ApiGqlClient.js +3 -2
- package/abstractions/ApiGqlClient.js.map +1 -1
- package/abstractions/InvokeLambdaFunction.js +3 -2
- package/abstractions/InvokeLambdaFunction.js.map +1 -1
- package/abstractions/features/pulumi/AdminPulumi.js +2 -1
- package/abstractions/features/pulumi/AdminPulumi.js.map +1 -1
- package/abstractions/features/pulumi/ApiPulumi.js +2 -1
- package/abstractions/features/pulumi/ApiPulumi.js.map +1 -1
- package/abstractions/features/pulumi/CorePulumi.js +2 -1
- package/abstractions/features/pulumi/CorePulumi.js.map +1 -1
- package/abstractions/features/pulumi/SetAdminCustomDomains.d.ts +9 -0
- package/abstractions/features/pulumi/SetAdminCustomDomains.js +5 -0
- package/abstractions/features/pulumi/SetAdminCustomDomains.js.map +1 -0
- package/abstractions/features/pulumi/SetApiCustomDomains.d.ts +9 -0
- package/abstractions/features/pulumi/SetApiCustomDomains.js +5 -0
- package/abstractions/features/pulumi/SetApiCustomDomains.js.map +1 -0
- package/abstractions/features/pulumi/index.d.ts +2 -0
- package/abstractions/features/pulumi/index.js +2 -2
- package/abstractions/index.js +0 -2
- package/abstractions/services/AdminStackOutputService.js +2 -1
- package/abstractions/services/AdminStackOutputService.js.map +1 -1
- package/abstractions/services/ApiStackOutputService.js +2 -1
- package/abstractions/services/ApiStackOutputService.js.map +1 -1
- package/abstractions/services/CoreStackOutputService.js +2 -1
- package/abstractions/services/CoreStackOutputService.js.map +1 -1
- package/admin.d.ts +6 -0
- package/admin.js +7 -4
- package/admin.js.map +1 -1
- package/api.d.ts +7 -4
- package/api.js +15 -12
- package/api.js.map +1 -1
- package/apps/createAdminApp.d.ts +1 -1
- package/apps/createAdminApp.js +11 -12
- package/apps/createAdminApp.js.map +1 -1
- package/apps/createAdminAppConfig.js +12 -18
- package/apps/createAdminAppConfig.js.map +1 -1
- package/apps/createApiApp.d.ts +8 -0
- package/apps/createApiApp.js +17 -22
- package/apps/createApiApp.js.map +1 -1
- package/apps/createBlueGreenApp.js +13 -16
- package/apps/createBlueGreenApp.js.map +1 -1
- package/apps/createCoreApp.d.ts +13 -13
- package/apps/createCoreApp.js +12 -13
- package/apps/createCoreApp.js.map +1 -1
- package/apps/createReactAppConfig.d.ts +0 -7
- package/apps/createReactAppConfig.js +56 -69
- package/apps/createReactAppConfig.js.map +1 -1
- package/apps/createSyncSystemApp.js +8 -7
- package/apps/createSyncSystemApp.js.map +1 -1
- package/apps/index.js +0 -2
- package/cli.js +3 -2
- package/cli.js.map +1 -1
- package/exports/extensions.js +0 -2
- package/exports/infra/admin.d.ts +1 -0
- package/exports/infra/admin.js +1 -2
- package/exports/infra/api.d.ts +1 -0
- package/exports/infra/api.js +1 -2
- package/exports/infra/core.js +0 -2
- package/exports/infra.js +1 -3
- package/extensions/ApiLambdaFunction.js +45 -56
- package/extensions/ApiLambdaFunction.js.map +1 -1
- package/extensions/ApiRoute.d.ts +5 -5
- package/extensions/ApiRoute.js +78 -106
- package/extensions/ApiRoute.js.map +1 -1
- package/extensions/AwsDefaultRegion.js +17 -16
- package/extensions/AwsDefaultRegion.js.map +1 -1
- package/extensions/BackgroundTasks.d.ts +4 -0
- package/extensions/BackgroundTasks.js +24 -0
- package/extensions/BackgroundTasks.js.map +1 -0
- package/extensions/Cms/ModelFieldCompression.js +16 -15
- package/extensions/Cms/ModelFieldCompression.js.map +1 -1
- package/extensions/Mailer/Smtp.js +15 -14
- package/extensions/Mailer/Smtp.js.map +1 -1
- package/extensions/Mailer/Smtp.test.js +117 -131
- package/extensions/Mailer/Smtp.test.js.map +1 -1
- package/extensions/Mailer/SmtpParamsSchema.js +11 -14
- package/extensions/Mailer/SmtpParamsSchema.js.map +1 -1
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js +25 -30
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js.map +1 -1
- package/extensions/OpenSearch/EnsureOsWasDeployed.js +14 -24
- package/extensions/OpenSearch/EnsureOsWasDeployed.js.map +1 -1
- package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js +25 -21
- package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js.map +1 -1
- package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js +26 -22
- package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js.map +1 -1
- package/extensions/OpenSearch.js +30 -31
- package/extensions/OpenSearch.js.map +1 -1
- package/extensions/ProjectAws/AdminStackOutputService.js +0 -2
- package/extensions/ProjectAws/ApiStackOutputService.js +0 -2
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.d.ts +1 -1
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +66 -76
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -1
- package/extensions/ProjectAws/AutoInstall.js +15 -14
- package/extensions/ProjectAws/AutoInstall.js.map +1 -1
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js +15 -19
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js.map +1 -1
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js +56 -45
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js.map +1 -1
- package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js +57 -55
- package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js.map +1 -1
- package/extensions/ProjectAws/BuildAppWorkspace.d.ts +3 -2
- package/extensions/ProjectAws/BuildAppWorkspace.js +78 -56
- package/extensions/ProjectAws/BuildAppWorkspace.js.map +1 -1
- package/extensions/ProjectAws/BuildProjectWorkspace.d.ts +12 -0
- package/extensions/ProjectAws/BuildProjectWorkspace.js +30 -0
- package/extensions/ProjectAws/BuildProjectWorkspace.js.map +1 -0
- package/extensions/ProjectAws/CoreStackOutputService.js +0 -2
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.d.ts +11 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js +30 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js.map +1 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.d.ts +11 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js +30 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js.map +1 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.d.ts +11 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js +30 -0
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js.map +1 -0
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js +27 -31
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js.map +1 -1
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.d.ts +11 -0
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js +31 -0
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js.map +1 -0
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.d.ts +13 -0
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js +34 -0
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js.map +1 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js +24 -38
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js.map +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js +22 -17
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js.map +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js +22 -17
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js.map +1 -1
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js +20 -21
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js.map +1 -1
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.d.ts +8 -0
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.js +14 -0
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.js.map +1 -0
- package/extensions/ProjectAws/UploadAdminAppToS3.js +54 -59
- package/extensions/ProjectAws/UploadAdminAppToS3.js.map +1 -1
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.d.ts +12 -0
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js +31 -0
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js.map +1 -0
- package/extensions/ProjectAws/ValidateProductionPulumiState.d.ts +12 -0
- package/extensions/ProjectAws/ValidateProductionPulumiState.js +33 -0
- package/extensions/ProjectAws/ValidateProductionPulumiState.js.map +1 -0
- package/extensions/ProjectAws/definitions.js +11 -6
- package/extensions/ProjectAws/definitions.js.map +1 -1
- package/extensions/ProjectAws.js +59 -46
- package/extensions/ProjectAws.js.map +1 -1
- package/extensions/RegisterRoutesPulumi.js +24 -32
- package/extensions/RegisterRoutesPulumi.js.map +1 -1
- package/extensions/definitions.js +9 -4
- package/extensions/definitions.js.map +1 -1
- package/extensions/index.d.ts +0 -1
- package/extensions/index.js +0 -3
- package/extensions/routePath.d.ts +20 -0
- package/extensions/routePath.js +13 -0
- package/extensions/routePath.js.map +1 -0
- package/features/ApiGqlClient.js +46 -51
- package/features/ApiGqlClient.js.map +1 -1
- package/features/InvokeLambdaFunction.js +30 -32
- package/features/InvokeLambdaFunction.js.map +1 -1
- package/features/Watch/AwsWatch.d.ts +17 -0
- package/features/Watch/AwsWatch.js +108 -0
- package/features/Watch/AwsWatch.js.map +1 -0
- package/features/Watch/getIotEndpoint.d.ts +2 -0
- package/features/Watch/getIotEndpoint.js +18 -0
- package/features/Watch/getIotEndpoint.js.map +1 -0
- package/features/Watch/handler/handler.zip +0 -0
- package/features/Watch/replaceLambdaFunctions.d.ts +19 -0
- package/features/Watch/replaceLambdaFunctions.js +72 -0
- package/features/Watch/replaceLambdaFunctions.js.map +1 -0
- package/features/index.js +0 -2
- package/index.d.ts +1 -0
- package/index.js +1 -2
- package/infra.d.ts +18 -0
- package/infra.js +62 -60
- package/infra.js.map +1 -1
- package/package.json +24 -20
- package/project.d.ts +26 -11
- package/project.js +8 -6
- package/project.js.map +1 -1
- package/pulumi/apps/admin/createAdminPulumiApp.d.ts +1 -1
- package/pulumi/apps/admin/createAdminPulumiApp.js +40 -46
- package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -1
- package/pulumi/apps/admin/index.js +0 -2
- package/pulumi/apps/api/ApiBackgroundTask.js +157 -137
- package/pulumi/apps/api/ApiBackgroundTask.js.map +1 -1
- package/pulumi/apps/api/ApiCloudfront.js +290 -130
- package/pulumi/apps/api/ApiCloudfront.js.map +1 -1
- package/pulumi/apps/api/ApiFileManager.js +34 -33
- package/pulumi/apps/api/ApiFileManager.js.map +1 -1
- package/pulumi/apps/api/ApiGateway.js +67 -74
- package/pulumi/apps/api/ApiGateway.js.map +1 -1
- package/pulumi/apps/api/ApiGraphql.js +223 -152
- package/pulumi/apps/api/ApiGraphql.js.map +1 -1
- package/pulumi/apps/api/ApiGraphqlStream.d.ts +29 -0
- package/pulumi/apps/api/ApiGraphqlStream.js +58 -0
- package/pulumi/apps/api/ApiGraphqlStream.js.map +1 -0
- package/pulumi/apps/api/ApiOutput.js +30 -31
- package/pulumi/apps/api/ApiOutput.js.map +1 -1
- package/pulumi/apps/api/ApiScheduler.js +94 -92
- package/pulumi/apps/api/ApiScheduler.js.map +1 -1
- package/pulumi/apps/api/ApiWebsocket.js +141 -133
- package/pulumi/apps/api/ApiWebsocket.js.map +1 -1
- package/pulumi/apps/api/backgroundTask/definition.js +122 -144
- package/pulumi/apps/api/backgroundTask/definition.js.map +1 -1
- package/pulumi/apps/api/backgroundTask/policy.js +37 -23
- package/pulumi/apps/api/backgroundTask/policy.js.map +1 -1
- package/pulumi/apps/api/backgroundTask/role.js +29 -29
- package/pulumi/apps/api/backgroundTask/role.js.map +1 -1
- package/pulumi/apps/api/backgroundTask/types.js +9 -11
- package/pulumi/apps/api/backgroundTask/types.js.map +1 -1
- package/pulumi/apps/api/createApiPulumiApp.d.ts +8 -0
- package/pulumi/apps/api/createApiPulumiApp.js +228 -277
- package/pulumi/apps/api/createApiPulumiApp.js.map +1 -1
- package/pulumi/apps/api/handleGuardDutyEvents.js +54 -51
- package/pulumi/apps/api/handleGuardDutyEvents.js.map +1 -1
- package/pulumi/apps/api/index.d.ts +1 -0
- package/pulumi/apps/api/index.js +1 -2
- package/pulumi/apps/awsUtils.d.ts +1 -1
- package/pulumi/apps/awsUtils.js +22 -25
- package/pulumi/apps/awsUtils.js.map +1 -1
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js +37 -40
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js.map +1 -1
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js +83 -91
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js.map +1 -1
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js +17 -16
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js.map +1 -1
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js +13 -12
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js.map +1 -1
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js +9 -14
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js.map +1 -1
- package/pulumi/apps/blueGreen/cloudfront/createOriginId.js +5 -7
- package/pulumi/apps/blueGreen/cloudfront/createOriginId.js.map +1 -1
- package/pulumi/apps/blueGreen/constants.js +15 -3
- package/pulumi/apps/blueGreen/constants.js.map +1 -1
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js +78 -104
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js.map +1 -1
- package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js +20 -26
- package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js.map +1 -1
- package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js +17 -20
- package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js.map +1 -1
- package/pulumi/apps/blueGreen/domains/getApplicationDomains.js +52 -62
- package/pulumi/apps/blueGreen/domains/getApplicationDomains.js.map +1 -1
- package/pulumi/apps/blueGreen/domains/resolveDomains.js +24 -38
- package/pulumi/apps/blueGreen/domains/resolveDomains.js.map +1 -1
- package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js +7 -14
- package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js.map +1 -1
- package/pulumi/apps/blueGreen/functions/handler.js +1 -57
- package/pulumi/apps/blueGreen/functions/handler.js.map +1 -1
- package/pulumi/apps/blueGreen/types.js +0 -3
- package/pulumi/apps/blueGreen/validation/validateDeployments.js +19 -24
- package/pulumi/apps/blueGreen/validation/validateDeployments.js.map +1 -1
- package/pulumi/apps/common/CoreOutput.js +35 -38
- package/pulumi/apps/common/CoreOutput.js.map +1 -1
- package/pulumi/apps/common/VpcConfig.js +20 -20
- package/pulumi/apps/common/VpcConfig.js.map +1 -1
- package/pulumi/apps/common/index.js +0 -2
- package/pulumi/apps/core/CoreAuditLogsDynamo.js +245 -182
- package/pulumi/apps/core/CoreAuditLogsDynamo.js.map +1 -1
- package/pulumi/apps/core/CoreCognito.d.ts +1 -0
- package/pulumi/apps/core/CoreCognito.js +120 -106
- package/pulumi/apps/core/CoreCognito.js.map +1 -1
- package/pulumi/apps/core/CoreDynamo.js +91 -70
- package/pulumi/apps/core/CoreDynamo.js.map +1 -1
- package/pulumi/apps/core/CoreEventBus.js +10 -9
- package/pulumi/apps/core/CoreEventBus.js.map +1 -1
- package/pulumi/apps/core/CoreFileManager.d.ts +1 -0
- package/pulumi/apps/core/CoreFileManager.js +98 -68
- package/pulumi/apps/core/CoreFileManager.js.map +1 -1
- package/pulumi/apps/core/CoreOpenSearch.d.ts +1 -1
- package/pulumi/apps/core/CoreOpenSearch.js +281 -305
- package/pulumi/apps/core/CoreOpenSearch.js.map +1 -1
- package/pulumi/apps/core/CoreVpc.js +155 -156
- package/pulumi/apps/core/CoreVpc.js.map +1 -1
- package/pulumi/apps/core/WatchCommand.js +94 -96
- package/pulumi/apps/core/WatchCommand.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/amazon.js +16 -22
- package/pulumi/apps/core/cognitoIdentityProviders/amazon.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/apple.js +16 -17
- package/pulumi/apps/core/cognitoIdentityProviders/apple.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js +52 -50
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/facebook.js +16 -17
- package/pulumi/apps/core/cognitoIdentityProviders/facebook.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js +7 -8
- package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/google.js +16 -17
- package/pulumi/apps/core/cognitoIdentityProviders/google.js.map +1 -1
- package/pulumi/apps/core/cognitoIdentityProviders/index.js +0 -2
- package/pulumi/apps/core/cognitoIdentityProviders/oidc.js +17 -18
- package/pulumi/apps/core/cognitoIdentityProviders/oidc.js.map +1 -1
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js +251 -188
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js.map +1 -1
- package/pulumi/apps/core/createCorePulumiApp.d.ts +13 -13
- package/pulumi/apps/core/createCorePulumiApp.js +229 -281
- package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
- package/pulumi/apps/core/index.js +0 -2
- package/pulumi/apps/core/webinyWatchCommand/handler.d.ts +1 -1
- package/pulumi/apps/core/webinyWatchCommand/handler.js +45 -32
- package/pulumi/apps/core/webinyWatchCommand/handler.js.map +1 -1
- package/pulumi/apps/createAppBucket.js +157 -146
- package/pulumi/apps/createAppBucket.js.map +1 -1
- package/pulumi/apps/customDomain.js +7 -6
- package/pulumi/apps/customDomain.js.map +1 -1
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js +8 -7
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js +6 -7
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getOsConfigFromExtension.js +17 -41
- package/pulumi/apps/extensions/getOsConfigFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getVpcConfigFromExtension.d.ts +4 -4
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js +13 -25
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js.map +1 -1
- package/pulumi/apps/index.js +0 -3
- package/pulumi/apps/lambdaUtils.js +57 -61
- package/pulumi/apps/lambdaUtils.js.map +1 -1
- package/pulumi/apps/react/createReactPulumiApp.d.ts +1 -1
- package/pulumi/apps/react/createReactPulumiApp.js +109 -130
- package/pulumi/apps/react/createReactPulumiApp.js.map +1 -1
- package/pulumi/apps/react/index.js +0 -2
- package/pulumi/apps/syncSystem/SyncSystemDynamo.js +77 -62
- package/pulumi/apps/syncSystem/SyncSystemDynamo.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js +74 -57
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemEventBus.js +77 -71
- package/pulumi/apps/syncSystem/SyncSystemEventBus.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemLambda.d.ts +1 -1
- package/pulumi/apps/syncSystem/SyncSystemLambda.js +154 -86
- package/pulumi/apps/syncSystem/SyncSystemLambda.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemOutput.js +14 -13
- package/pulumi/apps/syncSystem/SyncSystemOutput.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js +56 -60
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemSQS.js +25 -49
- package/pulumi/apps/syncSystem/SyncSystemSQS.js.map +1 -1
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js +44 -43
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js.map +1 -1
- package/pulumi/apps/syncSystem/addTableItems.js +35 -45
- package/pulumi/apps/syncSystem/addTableItems.js.map +1 -1
- package/pulumi/apps/syncSystem/api/addServiceManifest.js +12 -14
- package/pulumi/apps/syncSystem/api/addServiceManifest.js.map +1 -1
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js +49 -55
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js.map +1 -1
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js +88 -40
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js.map +1 -1
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js +37 -43
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js.map +1 -1
- package/pulumi/apps/syncSystem/api/attachS3Permissions.js +51 -47
- package/pulumi/apps/syncSystem/api/attachS3Permissions.js.map +1 -1
- package/pulumi/apps/syncSystem/api/index.js +28 -46
- package/pulumi/apps/syncSystem/api/index.js.map +1 -1
- package/pulumi/apps/syncSystem/constants.js +2 -1
- package/pulumi/apps/syncSystem/constants.js.map +1 -1
- package/pulumi/apps/syncSystem/createSyncResourceName.js +2 -7
- package/pulumi/apps/syncSystem/createSyncResourceName.js.map +1 -1
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js +102 -167
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js.map +1 -1
- package/pulumi/apps/syncSystem/customApp.js +12 -16
- package/pulumi/apps/syncSystem/customApp.js.map +1 -1
- package/pulumi/apps/syncSystem/getSyncSystemOutput.d.ts +1 -1
- package/pulumi/apps/syncSystem/getSyncSystemOutput.js +6 -7
- package/pulumi/apps/syncSystem/getSyncSystemOutput.js.map +1 -1
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js +108 -42
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js.map +1 -1
- package/pulumi/apps/syncSystem/types.js +0 -3
- package/pulumi/constants.js +2 -1
- package/pulumi/constants.js.map +1 -1
- package/pulumi/env/awsRegion.js +3 -2
- package/pulumi/env/awsRegion.js.map +1 -1
- package/pulumi/env/base.js +11 -27
- package/pulumi/env/base.js.map +1 -1
- package/pulumi/env/env.js +3 -2
- package/pulumi/env/env.js.map +1 -1
- package/pulumi/env/projectName.js +3 -2
- package/pulumi/env/projectName.js.map +1 -1
- package/pulumi/env/variant.js +4 -3
- package/pulumi/env/variant.js.map +1 -1
- package/pulumi/extensions/AdminCustomDomains.js +15 -11
- package/pulumi/extensions/AdminCustomDomains.js.map +1 -1
- package/pulumi/extensions/AdminPulumi.js +16 -19
- package/pulumi/extensions/AdminPulumi.js.map +1 -1
- package/pulumi/extensions/ApiCustomDomains.js +15 -11
- package/pulumi/extensions/ApiCustomDomains.js.map +1 -1
- package/pulumi/extensions/ApiPulumi.js +16 -19
- package/pulumi/extensions/ApiPulumi.js.map +1 -1
- package/pulumi/extensions/AwsTags.js +11 -10
- package/pulumi/extensions/AwsTags.js.map +1 -1
- package/pulumi/extensions/BlueGreenDeployments.js +29 -26
- package/pulumi/extensions/BlueGreenDeployments.js.map +1 -1
- package/pulumi/extensions/CorePulumi.js +16 -19
- package/pulumi/extensions/CorePulumi.js.map +1 -1
- package/pulumi/extensions/OpenSearch.js +16 -15
- package/pulumi/extensions/OpenSearch.js.map +1 -1
- package/pulumi/extensions/Vpc.js +21 -20
- package/pulumi/extensions/Vpc.js.map +1 -1
- package/pulumi/extensions/index.d.ts +16 -16
- package/pulumi/extensions/index.js +12 -10
- package/pulumi/extensions/index.js.map +1 -1
- package/pulumi/features/AdminPulumi/AdminPulumi.js +18 -14
- package/pulumi/features/AdminPulumi/AdminPulumi.js.map +1 -1
- package/pulumi/features/AdminPulumi/index.js +0 -2
- package/pulumi/features/ApiPulumi/ApiPulumi.js +18 -14
- package/pulumi/features/ApiPulumi/ApiPulumi.js.map +1 -1
- package/pulumi/features/ApiPulumi/index.js +0 -2
- package/pulumi/features/CorePulumi/CorePulumi.js +18 -14
- package/pulumi/features/CorePulumi/CorePulumi.js.map +1 -1
- package/pulumi/features/CorePulumi/index.js +0 -2
- package/pulumi/features/DefaultSetAdminCustomDomains.d.ts +8 -0
- package/pulumi/features/DefaultSetAdminCustomDomains.js +12 -0
- package/pulumi/features/DefaultSetAdminCustomDomains.js.map +1 -0
- package/pulumi/features/DefaultSetApiCustomDomains.d.ts +8 -0
- package/pulumi/features/DefaultSetApiCustomDomains.js +12 -0
- package/pulumi/features/DefaultSetApiCustomDomains.js.map +1 -0
- package/pulumi/features/index.d.ts +2 -0
- package/pulumi/features/index.js +2 -2
- package/pulumi/getAwsProjectSdk.d.ts +12 -0
- package/pulumi/getAwsProjectSdk.js +6 -0
- package/pulumi/getAwsProjectSdk.js.map +1 -0
- package/pulumi/getStackOutput.d.ts +7 -0
- package/pulumi/getStackOutput.js +8 -0
- package/pulumi/getStackOutput.js.map +1 -0
- package/pulumi/index.js +0 -2
- package/pulumi/types.js +0 -3
- package/pulumi/utils/addDomainsUrlsOutputs.js +20 -37
- package/pulumi/utils/addDomainsUrlsOutputs.js.map +1 -1
- package/pulumi/utils/addServiceManifestTableItem.js +12 -15
- package/pulumi/utils/addServiceManifestTableItem.js.map +1 -1
- package/pulumi/utils/crawlDirectory.js +10 -15
- package/pulumi/utils/crawlDirectory.js.map +1 -1
- package/pulumi/utils/createAssetArchive.js +5 -6
- package/pulumi/utils/createAssetArchive.js.map +1 -1
- package/pulumi/utils/dynamodb.js +26 -27
- package/pulumi/utils/dynamodb.js.map +1 -1
- package/pulumi/utils/getPresignedPost.js +27 -30
- package/pulumi/utils/getPresignedPost.js.map +1 -1
- package/pulumi/utils/index.js +1 -3
- package/pulumi/utils/lambdaEnvVariables.js +30 -54
- package/pulumi/utils/lambdaEnvVariables.js.map +1 -1
- package/pulumi/utils/tagResources.js +248 -28
- package/pulumi/utils/tagResources.js.map +1 -1
- package/pulumi/utils/uploadFolderToS3.js +101 -131
- package/pulumi/utils/uploadFolderToS3.js.map +1 -1
- package/pulumi/utils/withServiceManifest.js +28 -37
- package/pulumi/utils/withServiceManifest.js.map +1 -1
- package/registerAwsProjectFeatures.d.ts +8 -0
- package/registerAwsProjectFeatures.js +55 -0
- package/registerAwsProjectFeatures.js.map +1 -0
- package/services/AdminStackOutputService.js +14 -11
- package/services/AdminStackOutputService.js.map +1 -1
- package/services/ApiStackOutputService.js +14 -11
- package/services/ApiStackOutputService.js.map +1 -1
- package/services/CoreStackOutputService.js +14 -11
- package/services/CoreStackOutputService.js.map +1 -1
- package/services/GetPulumiService/GetPulumiService.d.ts +8 -0
- package/services/GetPulumiService/GetPulumiService.js +44 -0
- package/services/GetPulumiService/GetPulumiService.js.map +1 -0
- package/utils/getPulumiBaseTemplatesFolderPath.d.ts +1 -0
- package/utils/getPulumiBaseTemplatesFolderPath.js +10 -0
- package/utils/getPulumiBaseTemplatesFolderPath.js.map +1 -0
- package/utils/getTemplatesFolderPath.js +8 -10
- package/utils/getTemplatesFolderPath.js.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -2
- package/_templates/appTemplates/api/graphql/src/security.ts +0 -43
- package/abstractions/features/pulumi/index.js.map +0 -1
- package/abstractions/index.js.map +0 -1
- package/apps/index.js.map +0 -1
- package/exports/extensions.js.map +0 -1
- package/exports/infra/admin.js.map +0 -1
- package/exports/infra/api.js.map +0 -1
- package/exports/infra/core.js.map +0 -1
- package/exports/infra.js.map +0 -1
- package/extensions/Encryption.d.ts +0 -10
- package/extensions/Encryption.js +0 -35
- package/extensions/Encryption.js.map +0 -1
- package/extensions/ProjectAws/AdminStackOutputService.js.map +0 -1
- package/extensions/ProjectAws/ApiStackOutputService.js.map +0 -1
- package/extensions/ProjectAws/CoreStackOutputService.js.map +0 -1
- package/extensions/index.js.map +0 -1
- package/features/index.js.map +0 -1
- package/index.js.map +0 -1
- package/pulumi/apps/admin/index.js.map +0 -1
- package/pulumi/apps/api/index.js.map +0 -1
- package/pulumi/apps/blueGreen/types.js.map +0 -1
- package/pulumi/apps/common/index.js.map +0 -1
- package/pulumi/apps/core/cognitoIdentityProviders/index.js.map +0 -1
- package/pulumi/apps/core/index.js.map +0 -1
- package/pulumi/apps/index.js.map +0 -1
- package/pulumi/apps/react/index.js.map +0 -1
- package/pulumi/apps/syncSystem/types.js.map +0 -1
- package/pulumi/features/AdminPulumi/index.js.map +0 -1
- package/pulumi/features/ApiPulumi/index.js.map +0 -1
- package/pulumi/features/CorePulumi/index.js.map +0 -1
- package/pulumi/features/index.js.map +0 -1
- package/pulumi/index.js.map +0 -1
- package/pulumi/types.js.map +0 -1
- package/pulumi/utils/index.js.map +0 -1
- package/utils/index.js.map +0 -1
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AdminBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
declare class EnsureApiDeployedBeforeAdminWatchImpl implements AdminBeforeWatch.Interface {
|
|
3
|
+
private getAppStackOutput;
|
|
4
|
+
private projectSdkParamsService;
|
|
5
|
+
constructor(getAppStackOutput: GetAppStackOutput.Interface, projectSdkParamsService: ProjectSdkParamsService.Interface);
|
|
6
|
+
execute(params: AdminBeforeWatch.Params): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const EnsureApiDeployedBeforeAdminWatch: typeof EnsureApiDeployedBeforeAdminWatchImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IAdminBeforeWatch>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AdminBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { GracefulError } from "@webiny/project";
|
|
3
|
+
const NO_DEPLOYMENT_CHECKS_FLAG_NAME = "--no-deployment-checks";
|
|
4
|
+
class EnsureApiDeployedBeforeAdminWatchImpl {
|
|
5
|
+
constructor(getAppStackOutput, projectSdkParamsService){
|
|
6
|
+
this.getAppStackOutput = getAppStackOutput;
|
|
7
|
+
this.projectSdkParamsService = projectSdkParamsService;
|
|
8
|
+
}
|
|
9
|
+
async execute(params) {
|
|
10
|
+
if (false === params.deploymentChecks) return;
|
|
11
|
+
const output = await this.getAppStackOutput.execute("api");
|
|
12
|
+
const apiDeployed = output && Object.keys(output).length > 0;
|
|
13
|
+
if (apiDeployed) return;
|
|
14
|
+
const sdkParams = this.projectSdkParamsService.get();
|
|
15
|
+
const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;
|
|
16
|
+
const error = new Error("Cannot watch Admin before deploying API.");
|
|
17
|
+
const message = "Before watching %s, please build %s first by running: %s. If you think this is a mistake, you can also try skipping deployment checks by appending the %s flag. Learn more: https://webiny.link/deployment-checks";
|
|
18
|
+
throw GracefulError.from(error, message, "Admin", "API", cmd, NO_DEPLOYMENT_CHECKS_FLAG_NAME);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const EnsureApiDeployedBeforeAdminWatch = AdminBeforeWatch.createImplementation({
|
|
22
|
+
implementation: EnsureApiDeployedBeforeAdminWatchImpl,
|
|
23
|
+
dependencies: [
|
|
24
|
+
GetAppStackOutput,
|
|
25
|
+
ProjectSdkParamsService
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
export { EnsureApiDeployedBeforeAdminWatch };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=EnsureApiDeployedBeforeAdminWatch.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
declare class EnsureApiDeployedBeforeWatchImpl implements ApiBeforeWatch.Interface {
|
|
3
|
+
private getAppStackOutput;
|
|
4
|
+
private projectSdkParamsService;
|
|
5
|
+
constructor(getAppStackOutput: GetAppStackOutput.Interface, projectSdkParamsService: ProjectSdkParamsService.Interface);
|
|
6
|
+
execute(params: ApiBeforeWatch.Params): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const EnsureApiDeployedBeforeWatch: typeof EnsureApiDeployedBeforeWatchImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IApiBeforeWatch>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ApiBeforeWatch, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { GracefulError } from "@webiny/project";
|
|
3
|
+
const NO_DEPLOYMENT_CHECKS_FLAG_NAME = "--no-deployment-checks";
|
|
4
|
+
class EnsureApiDeployedBeforeWatchImpl {
|
|
5
|
+
constructor(getAppStackOutput, projectSdkParamsService){
|
|
6
|
+
this.getAppStackOutput = getAppStackOutput;
|
|
7
|
+
this.projectSdkParamsService = projectSdkParamsService;
|
|
8
|
+
}
|
|
9
|
+
async execute(params) {
|
|
10
|
+
if (false === params.deploymentChecks) return;
|
|
11
|
+
const output = await this.getAppStackOutput.execute("api");
|
|
12
|
+
const apiDeployed = output && Object.keys(output).length > 0;
|
|
13
|
+
if (apiDeployed) return;
|
|
14
|
+
const error = new Error("Cannot watch API before deploying it.");
|
|
15
|
+
const sdkParams = this.projectSdkParamsService.get();
|
|
16
|
+
const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;
|
|
17
|
+
const message = "Before watching %s, please deploy it first by running: %s. If you think this is a mistake, you can also try skipping deployment checks by appending the %s flag. Learn more: https://webiny.link/deployment-checks";
|
|
18
|
+
throw GracefulError.from(error, message, "API", cmd, NO_DEPLOYMENT_CHECKS_FLAG_NAME);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const EnsureApiDeployedBeforeWatch = ApiBeforeWatch.createImplementation({
|
|
22
|
+
implementation: EnsureApiDeployedBeforeWatchImpl,
|
|
23
|
+
dependencies: [
|
|
24
|
+
GetAppStackOutput,
|
|
25
|
+
ProjectSdkParamsService
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
export { EnsureApiDeployedBeforeWatch };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=EnsureApiDeployedBeforeWatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js","sources":["../../../src/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.ts"],"sourcesContent":["import {\n ApiBeforeWatch,\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 EnsureApiDeployedBeforeWatchImpl implements ApiBeforeWatch.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: ApiBeforeWatch.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 error = new Error(`Cannot watch API before deploying it.`);\n const sdkParams = this.projectSdkParamsService.get();\n const cmd = `yarn webiny deploy api --env ${sdkParams.env}`;\n\n const message = [\n `Before watching %s, please deploy it 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(error, message, \"API\", cmd, NO_DEPLOYMENT_CHECKS_FLAG_NAME);\n }\n}\n\nexport const EnsureApiDeployedBeforeWatch = ApiBeforeWatch.createImplementation({\n implementation: EnsureApiDeployedBeforeWatchImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["NO_DEPLOYMENT_CHECKS_FLAG_NAME","EnsureApiDeployedBeforeWatchImpl","getAppStackOutput","projectSdkParamsService","params","output","apiDeployed","Object","error","Error","sdkParams","cmd","message","GracefulError","EnsureApiDeployedBeforeWatch","ApiBeforeWatch","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;AAOA,MAAMA,iCAAiC;AAEvC,MAAMC;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA6B,EAAE;QAEzC,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,QAAQ,IAAIC,MAAM;QACxB,MAAMC,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAMC,MAAM,CAAC,6BAA6B,EAAED,UAAU,GAAG,EAAE;QAE3D,MAAME,UAAU;QAOhB,MAAMC,cAAc,IAAI,CAACL,OAAOI,SAAS,OAAOD,KAAKX;IACzD;AACJ;AAEO,MAAMc,+BAA+BC,eAAe,oBAAoB,CAAC;IAC5E,gBAAgBd;IAChB,cAAc;QAACe;QAAmBC;KAAwB;AAC9D"}
|
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
import { BeforeDeploy, LoggerService } from "@webiny/project/abstractions/index.js";
|
|
2
2
|
import { GracefulError } from "@webiny/project";
|
|
3
|
-
import { STS } from "@webiny/aws-sdk/client-sts";
|
|
4
3
|
class EnsureAwsCredentialsBeforeDeployImpl {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
async execute() {
|
|
9
|
-
process.env.AWS_SDK_LOAD_CONFIG = "true";
|
|
10
|
-
const sts = new STS({});
|
|
11
|
-
try {
|
|
12
|
-
await sts.getCallerIdentity({});
|
|
13
|
-
} catch (err) {
|
|
14
|
-
this.loggerService.debug({
|
|
15
|
-
err
|
|
16
|
-
}, "AWS credentials error.");
|
|
17
|
-
throw GracefulError.from(new Error("AWS credentials are not configured correctly."), 'No valid AWS credentials were found. Run "aws configure" or set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before deploying. Learn more: https://webiny.link/aws-credentials');
|
|
4
|
+
constructor(loggerService){
|
|
5
|
+
this.loggerService = loggerService;
|
|
18
6
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
async execute() {
|
|
8
|
+
const { STS } = await import("@webiny/aws-sdk/client-sts/index.js");
|
|
9
|
+
process.env.AWS_SDK_LOAD_CONFIG = "true";
|
|
10
|
+
const sts = new STS({});
|
|
11
|
+
try {
|
|
12
|
+
await sts.getCallerIdentity({});
|
|
13
|
+
} catch (err) {
|
|
14
|
+
this.loggerService.debug({
|
|
15
|
+
err
|
|
16
|
+
}, "AWS credentials error.");
|
|
17
|
+
throw GracefulError.from(new Error("AWS credentials are not configured correctly."), 'No valid AWS credentials were found. Run "aws configure" or set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before deploying. Learn more: https://webiny.link/aws-credentials');
|
|
18
|
+
}
|
|
19
|
+
const region = await sts.config.region();
|
|
20
|
+
if (!region) throw GracefulError.from(new Error("AWS region is not defined."), "No AWS region is set. Define the AWS_REGION environment variable or set a default region in your AWS profile. Learn more: https://webiny.link/aws-region");
|
|
21
|
+
process.env.AWS_REGION = region;
|
|
22
|
+
const { accessKeyId } = await sts.config.credentials();
|
|
23
|
+
const profile = process.env.AWS_PROFILE;
|
|
24
|
+
if (profile) this.loggerService.info(`Using profile "${profile}" in "${region}" region.`);
|
|
25
|
+
else this.loggerService.info(`Using access key ID "${accessKeyId}" in "${region}" region.`);
|
|
22
26
|
}
|
|
23
|
-
process.env.AWS_REGION = region;
|
|
24
|
-
const {
|
|
25
|
-
accessKeyId
|
|
26
|
-
} = await sts.config.credentials();
|
|
27
|
-
const profile = process.env.AWS_PROFILE;
|
|
28
|
-
if (profile) {
|
|
29
|
-
this.loggerService.info(`Using profile "${profile}" in "${region}" region.`);
|
|
30
|
-
} else {
|
|
31
|
-
this.loggerService.info(`Using access key ID "${accessKeyId}" in "${region}" region.`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
27
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
const EnsureAwsCredentialsBeforeDeploy = BeforeDeploy.createImplementation({
|
|
29
|
+
implementation: EnsureAwsCredentialsBeforeDeployImpl,
|
|
30
|
+
dependencies: [
|
|
31
|
+
LoggerService
|
|
32
|
+
]
|
|
38
33
|
});
|
|
34
|
+
export { EnsureAwsCredentialsBeforeDeploy };
|
|
39
35
|
|
|
40
36
|
//# sourceMappingURL=EnsureAwsCredentialsBeforeDeploy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js","sources":["../../../src/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.ts"],"sourcesContent":["import { BeforeDeploy, LoggerService } from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nclass EnsureAwsCredentialsBeforeDeployImpl implements BeforeDeploy.Interface {\n constructor(private loggerService: LoggerService.Interface) {}\n\n async execute() {\n // Loaded here rather than at the top of the file. Validating the project config imports this\n // hook on every command, and only a deploy needs the STS client.\n const { STS } = await import(\"@webiny/aws-sdk/client-sts/index.js\");\n\n process.env.AWS_SDK_LOAD_CONFIG = \"true\";\n const sts = new STS({});\n\n try {\n await sts.getCallerIdentity({});\n } catch (err) {\n this.loggerService.debug({ err }, \"AWS credentials error.\");\n throw GracefulError.from(\n new Error(\"AWS credentials are not configured correctly.\"),\n 'No valid AWS credentials were found. Run \"aws configure\" or set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before deploying. Learn more: https://webiny.link/aws-credentials'\n );\n }\n\n const region = await sts.config.region();\n if (!region) {\n throw GracefulError.from(\n new Error(\"AWS region is not defined.\"),\n \"No AWS region is set. Define the AWS_REGION environment variable or set a default region in your AWS profile. Learn more: https://webiny.link/aws-region\"\n );\n }\n\n process.env.AWS_REGION = region;\n\n const { accessKeyId } = await sts.config.credentials();\n const profile = process.env.AWS_PROFILE;\n\n if (profile) {\n this.loggerService.info(`Using profile \"${profile}\" in \"${region}\" region.`);\n } else {\n this.loggerService.info(`Using access key ID \"${accessKeyId}\" in \"${region}\" region.`);\n }\n }\n}\n\nexport const EnsureAwsCredentialsBeforeDeploy = BeforeDeploy.createImplementation({\n implementation: EnsureAwsCredentialsBeforeDeployImpl,\n dependencies: [LoggerService]\n});\n"],"names":["EnsureAwsCredentialsBeforeDeployImpl","loggerService","STS","process","sts","err","GracefulError","Error","region","accessKeyId","profile","EnsureAwsCredentialsBeforeDeploy","BeforeDeploy","LoggerService"],"mappings":";;AAGA,MAAMA;IACF,YAAoBC,aAAsC,CAAE;aAAxCA,aAAa,GAAbA;IAAyC;IAE7D,MAAM,UAAU;QAGZ,MAAM,EAAEC,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC;QAE7BC,QAAQ,GAAG,CAAC,mBAAmB,GAAG;QAClC,MAAMC,MAAM,IAAIF,IAAI,CAAC;QAErB,IAAI;YACA,MAAME,IAAI,iBAAiB,CAAC,CAAC;QACjC,EAAE,OAAOC,KAAK;YACV,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAAEA;YAAI,GAAG;YAClC,MAAMC,cAAc,IAAI,CACpB,IAAIC,MAAM,kDACV;QAER;QAEA,MAAMC,SAAS,MAAMJ,IAAI,MAAM,CAAC,MAAM;QACtC,IAAI,CAACI,QACD,MAAMF,cAAc,IAAI,CACpB,IAAIC,MAAM,+BACV;QAIRJ,QAAQ,GAAG,CAAC,UAAU,GAAGK;QAEzB,MAAM,EAAEC,WAAW,EAAE,GAAG,MAAML,IAAI,MAAM,CAAC,WAAW;QACpD,MAAMM,UAAUP,QAAQ,GAAG,CAAC,WAAW;QAEvC,IAAIO,SACA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAEA,QAAQ,MAAM,EAAEF,OAAO,SAAS,CAAC;aAE3E,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAEC,YAAY,MAAM,EAAED,OAAO,SAAS,CAAC;IAE7F;AACJ;AAEO,MAAMG,mCAAmCC,aAAa,oBAAoB,CAAC;IAC9E,gBAAgBZ;IAChB,cAAc;QAACa;KAAc;AACjC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiBeforeDeploy, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
declare class EnsureCoreDeployedBeforeApiDeployImpl implements ApiBeforeDeploy.Interface {
|
|
3
|
+
private getAppStackOutput;
|
|
4
|
+
private projectSdkParamsService;
|
|
5
|
+
constructor(getAppStackOutput: GetAppStackOutput.Interface, projectSdkParamsService: ProjectSdkParamsService.Interface);
|
|
6
|
+
execute(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const EnsureCoreDeployedBeforeApiDeploy: typeof EnsureCoreDeployedBeforeApiDeployImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IApiBeforeDeploy>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ApiBeforeDeploy, GetAppStackOutput, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { GracefulError } from "@webiny/project";
|
|
3
|
+
class EnsureCoreDeployedBeforeApiDeployImpl {
|
|
4
|
+
constructor(getAppStackOutput, projectSdkParamsService){
|
|
5
|
+
this.getAppStackOutput = getAppStackOutput;
|
|
6
|
+
this.projectSdkParamsService = projectSdkParamsService;
|
|
7
|
+
}
|
|
8
|
+
async execute() {
|
|
9
|
+
const output = await this.getAppStackOutput.execute("core");
|
|
10
|
+
const coreDeployed = output && Object.keys(output).length > 0;
|
|
11
|
+
if (coreDeployed) return;
|
|
12
|
+
const sdkParams = this.projectSdkParamsService.get();
|
|
13
|
+
const { variant, env } = sdkParams;
|
|
14
|
+
let variantCmd = "";
|
|
15
|
+
if (variant) variantCmd = ` --variant ${variant}`;
|
|
16
|
+
const error = new Error("Cannot deploy API before deploying Core.");
|
|
17
|
+
const message = "Before deploying %s, please deploy %s first by running: %s.";
|
|
18
|
+
const cmd = `yarn webiny deploy core --env ${env}${variantCmd}`;
|
|
19
|
+
throw GracefulError.from(error, message, "API", "Core", cmd);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const EnsureCoreDeployedBeforeApiDeploy = ApiBeforeDeploy.createImplementation({
|
|
23
|
+
implementation: EnsureCoreDeployedBeforeApiDeployImpl,
|
|
24
|
+
dependencies: [
|
|
25
|
+
GetAppStackOutput,
|
|
26
|
+
ProjectSdkParamsService
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
export { EnsureCoreDeployedBeforeApiDeploy };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=EnsureCoreDeployedBeforeApiDeploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js","sources":["../../../src/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.ts"],"sourcesContent":["import {\n ApiBeforeDeploy,\n GetAppStackOutput,\n ProjectSdkParamsService\n} from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nclass EnsureCoreDeployedBeforeApiDeployImpl implements ApiBeforeDeploy.Interface {\n constructor(\n private getAppStackOutput: GetAppStackOutput.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute() {\n const output = await this.getAppStackOutput.execute(\"core\");\n\n const coreDeployed = output && Object.keys(output).length > 0;\n if (coreDeployed) {\n return;\n }\n\n const sdkParams = this.projectSdkParamsService.get();\n const { variant, env } = sdkParams;\n\n let variantCmd = \"\";\n if (variant) {\n variantCmd = ` --variant ${variant}`;\n }\n\n const error = new Error(`Cannot deploy API before deploying Core.`);\n\n const message = [`Before deploying %s, please`, `deploy %s first by running: %s.`].join(\n \" \"\n );\n\n const cmd = `yarn webiny deploy core --env ${env}${variantCmd}`;\n throw GracefulError.from(error, message, \"API\", \"Core\", cmd);\n }\n}\n\nexport const EnsureCoreDeployedBeforeApiDeploy = ApiBeforeDeploy.createImplementation({\n implementation: EnsureCoreDeployedBeforeApiDeployImpl,\n dependencies: [GetAppStackOutput, ProjectSdkParamsService]\n});\n"],"names":["EnsureCoreDeployedBeforeApiDeployImpl","getAppStackOutput","projectSdkParamsService","output","coreDeployed","Object","sdkParams","variant","env","variantCmd","error","Error","message","cmd","GracefulError","EnsureCoreDeployedBeforeApiDeploy","ApiBeforeDeploy","GetAppStackOutput","ProjectSdkParamsService"],"mappings":";;AAOA,MAAMA;IACF,YACYC,iBAA8C,EAC9CC,uBAA0D,CACpE;aAFUD,iBAAiB,GAAjBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,UAAU;QACZ,MAAMC,SAAS,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAEpD,MAAMC,eAAeD,UAAUE,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG;QAC5D,IAAIC,cACA;QAGJ,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAClD,MAAM,EAAEC,OAAO,EAAEC,GAAG,EAAE,GAAGF;QAEzB,IAAIG,aAAa;QACjB,IAAIF,SACAE,aAAa,CAAC,WAAW,EAAEF,SAAS;QAGxC,MAAMG,QAAQ,IAAIC,MAAM;QAExB,MAAMC,UAAU;QAIhB,MAAMC,MAAM,CAAC,8BAA8B,EAAEL,MAAMC,YAAY;QAC/D,MAAMK,cAAc,IAAI,CAACJ,OAAOE,SAAS,OAAO,QAAQC;IAC5D;AACJ;AAEO,MAAME,oCAAoCC,gBAAgB,oBAAoB,CAAC;IAClF,gBAAgBhB;IAChB,cAAc;QAACiB;QAAmBC;KAAwB;AAC9D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BeforeDeploy, IsCi, IsTelemetryEnabled, IsWcpEnabled, IsWebinyJsRepo } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
declare class EnsureTelemetryEnabledForOssImpl implements BeforeDeploy.Interface {
|
|
3
|
+
private isTelemetryEnabled;
|
|
4
|
+
private isWcpEnabled;
|
|
5
|
+
private isWebinyJsRepo;
|
|
6
|
+
private isCi;
|
|
7
|
+
constructor(isTelemetryEnabled: IsTelemetryEnabled.Interface, isWcpEnabled: IsWcpEnabled.Interface, isWebinyJsRepo: IsWebinyJsRepo.Interface, isCi: IsCi.Interface);
|
|
8
|
+
execute(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare const EnsureTelemetryEnabledForOss: typeof EnsureTelemetryEnabledForOssImpl & {
|
|
11
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/project/abstractions/features").IBeforeDeploy>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BeforeDeploy, IsCi, IsTelemetryEnabled, IsWcpEnabled, IsWebinyJsRepo } from "@webiny/project/abstractions/index.js";
|
|
2
|
+
import { GracefulError } from "@webiny/project";
|
|
3
|
+
class EnsureTelemetryEnabledForOssImpl {
|
|
4
|
+
constructor(isTelemetryEnabled, isWcpEnabled, isWebinyJsRepo, isCi){
|
|
5
|
+
this.isTelemetryEnabled = isTelemetryEnabled;
|
|
6
|
+
this.isWcpEnabled = isWcpEnabled;
|
|
7
|
+
this.isWebinyJsRepo = isWebinyJsRepo;
|
|
8
|
+
this.isCi = isCi;
|
|
9
|
+
}
|
|
10
|
+
async execute() {
|
|
11
|
+
if (this.isCi.execute()) return;
|
|
12
|
+
const isDevRepo = this.isWebinyJsRepo.execute();
|
|
13
|
+
if (isDevRepo) return;
|
|
14
|
+
const telemetryEnabled = await this.isTelemetryEnabled.execute();
|
|
15
|
+
const wcpEnabled = await this.isWcpEnabled.execute();
|
|
16
|
+
if (!telemetryEnabled && !wcpEnabled) {
|
|
17
|
+
const message = "You are trying to deploy your project, but telemetry is currently disabled. The open-source edition of Webiny requires telemetry to be enabled. To proceed with the deployment, please re-enable telemetry or upgrade your project via https://www.webiny.com/pricing. Learn more: https://webiny.link/telemetry-oss";
|
|
18
|
+
const error = new Error("Cannot deploy with telemetry disabled in OSS edition.");
|
|
19
|
+
throw GracefulError.from(error, message);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const EnsureTelemetryEnabledForOss = BeforeDeploy.createImplementation({
|
|
24
|
+
implementation: EnsureTelemetryEnabledForOssImpl,
|
|
25
|
+
dependencies: [
|
|
26
|
+
IsTelemetryEnabled,
|
|
27
|
+
IsWcpEnabled,
|
|
28
|
+
IsWebinyJsRepo,
|
|
29
|
+
IsCi
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
export { EnsureTelemetryEnabledForOss };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=EnsureTelemetryEnabledForOss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/EnsureTelemetryEnabledForOss.js","sources":["../../../src/extensions/ProjectAws/EnsureTelemetryEnabledForOss.ts"],"sourcesContent":["import {\n BeforeDeploy,\n IsCi,\n IsTelemetryEnabled,\n IsWcpEnabled,\n IsWebinyJsRepo\n} from \"@webiny/project/abstractions/index.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nclass EnsureTelemetryEnabledForOssImpl implements BeforeDeploy.Interface {\n constructor(\n private isTelemetryEnabled: IsTelemetryEnabled.Interface,\n private isWcpEnabled: IsWcpEnabled.Interface,\n private isWebinyJsRepo: IsWebinyJsRepo.Interface,\n private isCi: IsCi.Interface\n ) {}\n\n async execute() {\n // Skip telemetry checks in CI environments\n if (this.isCi.execute()) {\n return;\n }\n\n // Don't enforce telemetry validation in the webiny-js development repository\n const isDevRepo = this.isWebinyJsRepo.execute();\n if (isDevRepo) {\n return;\n }\n\n const telemetryEnabled = await this.isTelemetryEnabled.execute();\n const wcpEnabled = await this.isWcpEnabled.execute();\n\n // If telemetry is disabled and WCP is not connected, throw an error\n if (!telemetryEnabled && !wcpEnabled) {\n const message = [\n `You are trying to deploy your project, but telemetry is currently disabled.`,\n `The open-source edition of Webiny requires telemetry to be enabled.`,\n `To proceed with the deployment, please re-enable telemetry or upgrade your project via https://www.webiny.com/pricing.`,\n `Learn more: https://webiny.link/telemetry-oss`\n ].join(\" \");\n\n const error = new Error(\"Cannot deploy with telemetry disabled in OSS edition.\");\n\n throw GracefulError.from(error, message);\n }\n }\n}\n\nexport const EnsureTelemetryEnabledForOss = BeforeDeploy.createImplementation({\n implementation: EnsureTelemetryEnabledForOssImpl,\n dependencies: [IsTelemetryEnabled, IsWcpEnabled, IsWebinyJsRepo, IsCi]\n});\n"],"names":["EnsureTelemetryEnabledForOssImpl","isTelemetryEnabled","isWcpEnabled","isWebinyJsRepo","isCi","isDevRepo","telemetryEnabled","wcpEnabled","message","error","Error","GracefulError","EnsureTelemetryEnabledForOss","BeforeDeploy","IsTelemetryEnabled","IsWcpEnabled","IsWebinyJsRepo","IsCi"],"mappings":";;AASA,MAAMA;IACF,YACYC,kBAAgD,EAChDC,YAAoC,EACpCC,cAAwC,EACxCC,IAAoB,CAC9B;aAJUH,kBAAkB,GAAlBA;aACAC,YAAY,GAAZA;aACAC,cAAc,GAAdA;aACAC,IAAI,GAAJA;IACT;IAEH,MAAM,UAAU;QAEZ,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,IACjB;QAIJ,MAAMC,YAAY,IAAI,CAAC,cAAc,CAAC,OAAO;QAC7C,IAAIA,WACA;QAGJ,MAAMC,mBAAmB,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO;QAC9D,MAAMC,aAAa,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO;QAGlD,IAAI,CAACD,oBAAoB,CAACC,YAAY;YAClC,MAAMC,UAAU;YAOhB,MAAMC,QAAQ,IAAIC,MAAM;YAExB,MAAMC,cAAc,IAAI,CAACF,OAAOD;QACpC;IACJ;AACJ;AAEO,MAAMI,+BAA+BC,aAAa,oBAAoB,CAAC;IAC1E,gBAAgBb;IAChB,cAAc;QAACc;QAAoBC;QAAcC;QAAgBC;KAAK;AAC1E"}
|
|
@@ -1,43 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
async execute() {
|
|
6
|
-
const {
|
|
7
|
-
projectSdkParamsService,
|
|
8
|
-
coreStackOutputService,
|
|
9
|
-
apiStackOutputService
|
|
10
|
-
} = this.di;
|
|
11
|
-
const sdkParams = projectSdkParamsService.get();
|
|
12
|
-
|
|
13
|
-
// Set basic admin env vars
|
|
14
|
-
process.env.PORT = process.env.PORT || "3001";
|
|
15
|
-
process.env.WEBINY_ADMIN_ENV = sdkParams.env;
|
|
16
|
-
process.env.WEBINY_ADMIN_TRASH_BIN_RETENTION_PERIOD_DAYS = process.env.WEBINY_TRASH_BIN_RETENTION_PERIOD_DAYS || "";
|
|
17
|
-
|
|
18
|
-
// Load Core app stack output (automatically uses env/variant/region from ProjectSdkParamsService)
|
|
19
|
-
const coreOutput = await coreStackOutputService.execute();
|
|
20
|
-
if (coreOutput) {
|
|
21
|
-
process.env.WEBINY_ADMIN_DEPLOYMENT_ID = coreOutput.deploymentId;
|
|
22
|
-
|
|
23
|
-
// Set Cognito user pool domain if available
|
|
24
|
-
if (coreOutput.cognitoUserPoolDomain) {
|
|
25
|
-
process.env.REACT_APP_USER_POOL_DOMAIN = coreOutput.cognitoUserPoolDomain;
|
|
26
|
-
}
|
|
1
|
+
class SetAdminEnvVars {
|
|
2
|
+
constructor(di){
|
|
3
|
+
this.di = di;
|
|
27
4
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
5
|
+
async execute() {
|
|
6
|
+
const { projectSdkParamsService, coreStackOutputService, apiStackOutputService } = this.di;
|
|
7
|
+
const sdkParams = projectSdkParamsService.get();
|
|
8
|
+
process.env.PORT = process.env.PORT || "3001";
|
|
9
|
+
process.env.WEBINY_ADMIN_ENV = sdkParams.env;
|
|
10
|
+
process.env.WEBINY_ADMIN_TRASH_BIN_RETENTION_PERIOD_DAYS = process.env.WEBINY_TRASH_BIN_RETENTION_PERIOD_DAYS || "";
|
|
11
|
+
const coreOutput = await coreStackOutputService.execute();
|
|
12
|
+
if (coreOutput) {
|
|
13
|
+
process.env.WEBINY_ADMIN_DEPLOYMENT_ID = coreOutput.deploymentId;
|
|
14
|
+
if (coreOutput.cognitoUserPoolDomain) process.env.REACT_APP_USER_POOL_DOMAIN = coreOutput.cognitoUserPoolDomain;
|
|
15
|
+
}
|
|
16
|
+
const apiOutput = await apiStackOutputService.execute();
|
|
17
|
+
if (apiOutput) {
|
|
18
|
+
process.env.REACT_APP_USER_POOL_REGION = apiOutput.region;
|
|
19
|
+
process.env.WEBINY_ADMIN_API_URL = apiOutput.apiUrl;
|
|
20
|
+
process.env.REACT_APP_USER_POOL_ID = apiOutput.cognitoUserPoolId;
|
|
21
|
+
process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID = apiOutput.cognitoAppClientId;
|
|
22
|
+
process.env.REACT_APP_USER_POOL_PASSWORD_POLICY = JSON.stringify(apiOutput.cognitoUserPoolPasswordPolicy);
|
|
23
|
+
process.env.REACT_APP_WEBSOCKET_URL = apiOutput.websocketApiUrl;
|
|
24
|
+
}
|
|
39
25
|
}
|
|
40
|
-
}
|
|
41
26
|
}
|
|
27
|
+
export { SetAdminEnvVars };
|
|
42
28
|
|
|
43
29
|
//# sourceMappingURL=SetAdminEnvVars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js","sources":["../../../../src/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.ts"],"sourcesContent":["import { ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { CoreStackOutputService, ApiStackOutputService } from \"../../../abstractions/index.js\";\n\ninterface ISetAdminEnvVarsDi {\n projectSdkParamsService: ProjectSdkParamsService.Interface;\n coreStackOutputService: CoreStackOutputService.Interface;\n apiStackOutputService: ApiStackOutputService.Interface;\n}\n\nexport class SetAdminEnvVars {\n di: ISetAdminEnvVarsDi;\n\n constructor(di: ISetAdminEnvVarsDi) {\n this.di = di;\n }\n\n async execute() {\n const { projectSdkParamsService, coreStackOutputService, apiStackOutputService } = this.di;\n const sdkParams = projectSdkParamsService.get();\n\n // Set basic admin env vars\n process.env.PORT = process.env.PORT || \"3001\";\n process.env.WEBINY_ADMIN_ENV = sdkParams.env;\n process.env.WEBINY_ADMIN_TRASH_BIN_RETENTION_PERIOD_DAYS =\n process.env.WEBINY_TRASH_BIN_RETENTION_PERIOD_DAYS || \"\";\n\n // Load Core app stack output (automatically uses env/variant/region from ProjectSdkParamsService)\n const coreOutput = await coreStackOutputService.execute<{\n deploymentId: string;\n cognitoUserPoolDomain?: string;\n }>();\n\n if (coreOutput) {\n process.env.WEBINY_ADMIN_DEPLOYMENT_ID = coreOutput.deploymentId;\n\n // Set Cognito user pool domain if available\n if (coreOutput.cognitoUserPoolDomain) {\n process.env.REACT_APP_USER_POOL_DOMAIN = coreOutput.cognitoUserPoolDomain;\n }\n }\n\n // Load API app stack output (automatically uses env/variant/region from ProjectSdkParamsService)\n const apiOutput = await apiStackOutputService.execute<{\n region: string;\n apiUrl: string;\n cognitoUserPoolId: string;\n cognitoAppClientId: string;\n cognitoUserPoolPasswordPolicy: any;\n websocketApiUrl: string;\n }>();\n\n if (apiOutput) {\n process.env.REACT_APP_USER_POOL_REGION = apiOutput.region;\n // Admin API URL, read by createRootContainer / Admin.tsx / playgrounds / api-info.\n process.env.WEBINY_ADMIN_API_URL = apiOutput.apiUrl;\n process.env.REACT_APP_USER_POOL_ID = apiOutput.cognitoUserPoolId;\n process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID = apiOutput.cognitoAppClientId;\n process.env.REACT_APP_USER_POOL_PASSWORD_POLICY = JSON.stringify(\n apiOutput.cognitoUserPoolPasswordPolicy\n );\n process.env.REACT_APP_WEBSOCKET_URL = apiOutput.websocketApiUrl;\n }\n }\n}\n"],"names":["SetAdminEnvVars","di","projectSdkParamsService","coreStackOutputService","apiStackOutputService","sdkParams","process","coreOutput","apiOutput","JSON"],"mappings":"AASO,MAAMA;IAGT,YAAYC,EAAsB,CAAE;QAChC,IAAI,CAAC,EAAE,GAAGA;IACd;IAEA,MAAM,UAAU;QACZ,MAAM,EAAEC,uBAAuB,EAAEC,sBAAsB,EAAEC,qBAAqB,EAAE,GAAG,IAAI,CAAC,EAAE;QAC1F,MAAMC,YAAYH,wBAAwB,GAAG;QAG7CI,QAAQ,GAAG,CAAC,IAAI,GAAGA,QAAQ,GAAG,CAAC,IAAI,IAAI;QACvCA,QAAQ,GAAG,CAAC,gBAAgB,GAAGD,UAAU,GAAG;QAC5CC,QAAQ,GAAG,CAAC,4CAA4C,GACpDA,QAAQ,GAAG,CAAC,sCAAsC,IAAI;QAG1D,MAAMC,aAAa,MAAMJ,uBAAuB,OAAO;QAKvD,IAAII,YAAY;YACZD,QAAQ,GAAG,CAAC,0BAA0B,GAAGC,WAAW,YAAY;YAGhE,IAAIA,WAAW,qBAAqB,EAChCD,QAAQ,GAAG,CAAC,0BAA0B,GAAGC,WAAW,qBAAqB;QAEjF;QAGA,MAAMC,YAAY,MAAMJ,sBAAsB,OAAO;QASrD,IAAII,WAAW;YACXF,QAAQ,GAAG,CAAC,0BAA0B,GAAGE,UAAU,MAAM;YAEzDF,QAAQ,GAAG,CAAC,oBAAoB,GAAGE,UAAU,MAAM;YACnDF,QAAQ,GAAG,CAAC,sBAAsB,GAAGE,UAAU,iBAAiB;YAChEF,QAAQ,GAAG,CAAC,iCAAiC,GAAGE,UAAU,kBAAkB;YAC5EF,QAAQ,GAAG,CAAC,mCAAmC,GAAGG,KAAK,SAAS,CAC5DD,UAAU,6BAA6B;YAE3CF,QAAQ,GAAG,CAAC,uBAAuB,GAAGE,UAAU,eAAe;QACnE;IACJ;AACJ"}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import { AdminBeforeBuild, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiStackOutputService, CoreStackOutputService } from "../../../abstractions/index.js";
|
|
3
3
|
import { SetAdminEnvVars } from "./SetAdminEnvVars.js";
|
|
4
4
|
class SetAdminEnvVarsBeforeBuildImpl {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
constructor(projectSdkParamsService, coreStackOutputService, apiStackOutputService){
|
|
6
|
+
this.projectSdkParamsService = projectSdkParamsService;
|
|
7
|
+
this.coreStackOutputService = coreStackOutputService;
|
|
8
|
+
this.apiStackOutputService = apiStackOutputService;
|
|
9
|
+
}
|
|
10
|
+
async execute() {
|
|
11
|
+
const setAdminEnvVars = new SetAdminEnvVars({
|
|
12
|
+
projectSdkParamsService: this.projectSdkParamsService,
|
|
13
|
+
coreStackOutputService: this.coreStackOutputService,
|
|
14
|
+
apiStackOutputService: this.apiStackOutputService
|
|
15
|
+
});
|
|
16
|
+
await setAdminEnvVars.execute();
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const SetAdminEnvVarsBeforeBuild = AdminBeforeBuild.createImplementation({
|
|
20
|
+
implementation: SetAdminEnvVarsBeforeBuildImpl,
|
|
21
|
+
dependencies: [
|
|
22
|
+
ProjectSdkParamsService,
|
|
23
|
+
CoreStackOutputService,
|
|
24
|
+
ApiStackOutputService
|
|
25
|
+
]
|
|
22
26
|
});
|
|
27
|
+
export { SetAdminEnvVarsBeforeBuild };
|
|
23
28
|
|
|
24
29
|
//# sourceMappingURL=SetAdminEnvVarsBeforeBuild.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js","sources":["../../../../src/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.ts"],"sourcesContent":["import { AdminBeforeBuild, ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { CoreStackOutputService, ApiStackOutputService } from \"../../../abstractions/index.js\";\nimport { SetAdminEnvVars } from \"./SetAdminEnvVars.js\";\n\nclass SetAdminEnvVarsBeforeBuildImpl implements AdminBeforeBuild.Interface {\n constructor(\n private projectSdkParamsService: ProjectSdkParamsService.Interface,\n private coreStackOutputService: CoreStackOutputService.Interface,\n private apiStackOutputService: ApiStackOutputService.Interface\n ) {}\n\n async execute() {\n const setAdminEnvVars = new SetAdminEnvVars({\n projectSdkParamsService: this.projectSdkParamsService,\n coreStackOutputService: this.coreStackOutputService,\n apiStackOutputService: this.apiStackOutputService\n });\n\n await setAdminEnvVars.execute();\n }\n}\n\nexport const SetAdminEnvVarsBeforeBuild = AdminBeforeBuild.createImplementation({\n implementation: SetAdminEnvVarsBeforeBuildImpl,\n dependencies: [ProjectSdkParamsService, CoreStackOutputService, ApiStackOutputService]\n});\n"],"names":["SetAdminEnvVarsBeforeBuildImpl","projectSdkParamsService","coreStackOutputService","apiStackOutputService","setAdminEnvVars","SetAdminEnvVars","SetAdminEnvVarsBeforeBuild","AdminBeforeBuild","ProjectSdkParamsService","CoreStackOutputService","ApiStackOutputService"],"mappings":";;;AAIA,MAAMA;IACF,YACYC,uBAA0D,EAC1DC,sBAAwD,EACxDC,qBAAsD,CAChE;aAHUF,uBAAuB,GAAvBA;aACAC,sBAAsB,GAAtBA;aACAC,qBAAqB,GAArBA;IACT;IAEH,MAAM,UAAU;QACZ,MAAMC,kBAAkB,IAAIC,gBAAgB;YACxC,yBAAyB,IAAI,CAAC,uBAAuB;YACrD,wBAAwB,IAAI,CAAC,sBAAsB;YACnD,uBAAuB,IAAI,CAAC,qBAAqB;QACrD;QAEA,MAAMD,gBAAgB,OAAO;IACjC;AACJ;AAEO,MAAME,6BAA6BC,iBAAiB,oBAAoB,CAAC;IAC5E,gBAAgBP;IAChB,cAAc;QAACQ;QAAyBC;QAAwBC;KAAsB;AAC1F"}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import { AdminBeforeWatch, ProjectSdkParamsService } from "@webiny/project/abstractions/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiStackOutputService, CoreStackOutputService } from "../../../abstractions/index.js";
|
|
3
3
|
import { SetAdminEnvVars } from "./SetAdminEnvVars.js";
|
|
4
4
|
class SetAdminEnvVarsBeforeWatchImpl {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
constructor(projectSdkParamsService, coreStackOutputService, apiStackOutputService){
|
|
6
|
+
this.projectSdkParamsService = projectSdkParamsService;
|
|
7
|
+
this.coreStackOutputService = coreStackOutputService;
|
|
8
|
+
this.apiStackOutputService = apiStackOutputService;
|
|
9
|
+
}
|
|
10
|
+
async execute() {
|
|
11
|
+
const setAdminEnvVars = new SetAdminEnvVars({
|
|
12
|
+
projectSdkParamsService: this.projectSdkParamsService,
|
|
13
|
+
coreStackOutputService: this.coreStackOutputService,
|
|
14
|
+
apiStackOutputService: this.apiStackOutputService
|
|
15
|
+
});
|
|
16
|
+
await setAdminEnvVars.execute();
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const SetAdminEnvVarsBeforeWatch = AdminBeforeWatch.createImplementation({
|
|
20
|
+
implementation: SetAdminEnvVarsBeforeWatchImpl,
|
|
21
|
+
dependencies: [
|
|
22
|
+
ProjectSdkParamsService,
|
|
23
|
+
CoreStackOutputService,
|
|
24
|
+
ApiStackOutputService
|
|
25
|
+
]
|
|
22
26
|
});
|
|
27
|
+
export { SetAdminEnvVarsBeforeWatch };
|
|
23
28
|
|
|
24
29
|
//# sourceMappingURL=SetAdminEnvVarsBeforeWatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js","sources":["../../../../src/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.ts"],"sourcesContent":["import { AdminBeforeWatch, ProjectSdkParamsService } from \"@webiny/project/abstractions/index.js\";\nimport { CoreStackOutputService, ApiStackOutputService } from \"../../../abstractions/index.js\";\nimport { SetAdminEnvVars } from \"./SetAdminEnvVars.js\";\n\nclass SetAdminEnvVarsBeforeWatchImpl implements AdminBeforeWatch.Interface {\n constructor(\n private projectSdkParamsService: ProjectSdkParamsService.Interface,\n private coreStackOutputService: CoreStackOutputService.Interface,\n private apiStackOutputService: ApiStackOutputService.Interface\n ) {}\n\n async execute() {\n const setAdminEnvVars = new SetAdminEnvVars({\n projectSdkParamsService: this.projectSdkParamsService,\n coreStackOutputService: this.coreStackOutputService,\n apiStackOutputService: this.apiStackOutputService\n });\n\n await setAdminEnvVars.execute();\n }\n}\n\nexport const SetAdminEnvVarsBeforeWatch = AdminBeforeWatch.createImplementation({\n implementation: SetAdminEnvVarsBeforeWatchImpl,\n dependencies: [ProjectSdkParamsService, CoreStackOutputService, ApiStackOutputService]\n});\n"],"names":["SetAdminEnvVarsBeforeWatchImpl","projectSdkParamsService","coreStackOutputService","apiStackOutputService","setAdminEnvVars","SetAdminEnvVars","SetAdminEnvVarsBeforeWatch","AdminBeforeWatch","ProjectSdkParamsService","CoreStackOutputService","ApiStackOutputService"],"mappings":";;;AAIA,MAAMA;IACF,YACYC,uBAA0D,EAC1DC,sBAAwD,EACxDC,qBAAsD,CAChE;aAHUF,uBAAuB,GAAvBA;aACAC,sBAAsB,GAAtBA;aACAC,qBAAqB,GAArBA;IACT;IAEH,MAAM,UAAU;QACZ,MAAMC,kBAAkB,IAAIC,gBAAgB;YACxC,yBAAyB,IAAI,CAAC,uBAAuB;YACrD,wBAAwB,IAAI,CAAC,sBAAsB;YACnD,uBAAuB,IAAI,CAAC,qBAAqB;QACrD;QAEA,MAAMD,gBAAgB,OAAO;IACjC;AACJ;AAEO,MAAME,6BAA6BC,iBAAiB,oBAAoB,CAAC;IAC5E,gBAAgBP;IAChB,cAAc;QAACQ;QAAyBC;QAAwBC;KAAsB;AAC1F"}
|
|
@@ -2,29 +2,28 @@ import { GetProjectConfigService } from "@webiny/project/abstractions/index.js";
|
|
|
2
2
|
import { DatabaseSetup } from "@webiny/project/extensions/index.js";
|
|
3
3
|
import { CorePulumi } from "../../abstractions/features/pulumi/index.js";
|
|
4
4
|
class SetDatabaseSetupOutputImpl {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
app.addOutputs({
|
|
20
|
-
databaseSetup: "ddb"
|
|
21
|
-
});
|
|
5
|
+
constructor(getProjectConfigService){
|
|
6
|
+
this.getProjectConfigService = getProjectConfigService;
|
|
7
|
+
}
|
|
8
|
+
async execute(app) {
|
|
9
|
+
const projectConfig = await this.getProjectConfigService.execute();
|
|
10
|
+
const [databaseSetupExtension] = projectConfig.extensionsByType(DatabaseSetup);
|
|
11
|
+
if (databaseSetupExtension) {
|
|
12
|
+
const databaseSetup = databaseSetupExtension.params.setupName;
|
|
13
|
+
app.addOutputs({
|
|
14
|
+
databaseSetup
|
|
15
|
+
});
|
|
16
|
+
} else app.addOutputs({
|
|
17
|
+
databaseSetup: "ddb"
|
|
18
|
+
});
|
|
22
19
|
}
|
|
23
|
-
}
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const SetDatabaseSetupOutput = CorePulumi.createImplementation({
|
|
22
|
+
implementation: SetDatabaseSetupOutputImpl,
|
|
23
|
+
dependencies: [
|
|
24
|
+
GetProjectConfigService
|
|
25
|
+
]
|
|
28
26
|
});
|
|
27
|
+
export { SetDatabaseSetupOutput };
|
|
29
28
|
|
|
30
29
|
//# sourceMappingURL=SetDatabaseSetupOutput.js.map
|