@webiny/project 6.6.0-alpha.10 → 6.6.0-alpha.12
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/ProjectSdk.d.ts +8 -19
- package/ProjectSdk.js +1 -28
- package/ProjectSdk.js.map +1 -1
- package/abstractions/features/hooks/index.d.ts +0 -8
- package/abstractions/features/hooks/index.js +0 -8
- package/abstractions/features/index.d.ts +0 -8
- package/abstractions/features/index.js +0 -8
- package/abstractions/models/IAppModel.d.ts +0 -2
- package/abstractions/models/IProjectModel.d.ts +0 -2
- package/abstractions/services/InitHostingSdkService.d.ts +21 -0
- package/abstractions/services/InitHostingSdkService.js +5 -0
- package/abstractions/services/InitHostingSdkService.js.map +1 -0
- package/abstractions/services/ProjectInfoService/ProjectInfoService.d.ts +6 -6
- package/abstractions/services/ProjectInfoService/ProjectInfoService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/index.d.ts +0 -1
- package/abstractions/services/ProjectInfoService/index.js +0 -1
- package/abstractions/services/index.d.ts +1 -13
- package/abstractions/services/index.js +1 -13
- package/createProjectSdkContainer.js +1 -3
- package/createProjectSdkContainer.js.map +1 -1
- package/decorators/index.d.ts +0 -6
- package/decorators/index.js +0 -6
- package/defineExtension/types.d.ts +1 -1
- package/exports/infra/admin.d.ts +0 -2
- package/exports/infra/admin.js +0 -2
- package/exports/infra/api.d.ts +0 -2
- package/exports/infra/api.js +0 -2
- package/exports/infra/core.d.ts +0 -2
- package/exports/infra/core.js +0 -2
- package/exports/infra.d.ts +0 -2
- package/exports/infra.js +0 -2
- package/extensions/AdminWebsocketsUrl.d.ts +5 -3
- package/extensions/AdminWebsocketsUrl.js +1 -1
- package/extensions/AdminWebsocketsUrl.js.map +1 -1
- package/extensions/DatabaseSetup.d.ts +1 -0
- package/extensions/DatabaseSetup.js +4 -3
- package/extensions/DatabaseSetup.js.map +1 -1
- package/extensions/{pulumi/ProductionEnvironments.js → ProductionEnvironments.js} +2 -2
- package/extensions/ProductionEnvironments.js.map +1 -0
- package/extensions/api/Route/ApiRoute.d.ts +23 -0
- package/extensions/api/Route/ApiRoute.js +92 -0
- package/extensions/api/Route/ApiRoute.js.map +1 -0
- package/extensions/api/Route/index.d.ts +2 -0
- package/extensions/api/Route/index.js +2 -0
- package/extensions/api/Route/routePath.d.ts +21 -0
- package/extensions/api/Route/routePath.js +10 -0
- package/extensions/api/Route/routePath.js.map +1 -0
- package/extensions/api/index.d.ts +1 -0
- package/extensions/api/index.js +1 -0
- package/extensions/hooks/index.d.ts +0 -8
- package/extensions/hooks/index.js +0 -8
- package/extensions/hosting/extensionImplementations.d.ts +5 -4
- package/extensions/hosting/extensionImplementations.js.map +1 -1
- package/extensions/index.d.ts +7 -17
- package/extensions/index.js +5 -13
- package/extensions/index.js.map +1 -1
- package/features/GetProductionEnvironments/GetProductionEnvironments.js +1 -1
- package/features/GetProductionEnvironments/GetProductionEnvironments.js.map +1 -1
- package/features/hooks/index.d.ts +0 -8
- package/features/hooks/index.js +0 -8
- package/features/index.d.ts +0 -8
- package/features/index.js +0 -8
- package/index.d.ts +0 -4
- package/index.js +1 -5
- package/index.js.map +1 -1
- package/models/AppModel.js +1 -2
- package/models/AppModel.js.map +1 -1
- package/models/ProjectModel.js +0 -2
- package/models/ProjectModel.js.map +1 -1
- package/package.json +8 -14
- package/services/GetAppService/GetAppService.js +1 -3
- package/services/GetAppService/GetAppService.js.map +1 -1
- package/services/GetProjectService/GetProjectService.js +0 -2
- package/services/GetProjectService/GetProjectService.js.map +1 -1
- package/services/InitProjectSdkService/InitProjectSdkService.d.ts +6 -2
- package/services/InitProjectSdkService/InitProjectSdkService.js +18 -12
- package/services/InitProjectSdkService/InitProjectSdkService.js.map +1 -1
- package/services/InitProjectSdkService/registerHooks.js +4 -16
- package/services/InitProjectSdkService/registerHooks.js.map +1 -1
- package/services/InstallExtensionService/updateWebinyConfig.js +9 -23
- package/services/InstallExtensionService/updateWebinyConfig.js.map +1 -1
- package/services/ProjectInfoService/ProjectInfoService.d.ts +7 -3
- package/services/ProjectInfoService/ProjectInfoService.js +3 -11
- package/services/ProjectInfoService/ProjectInfoService.js.map +1 -1
- package/services/ProjectInfoService/index.d.ts +0 -1
- package/services/ProjectInfoService/index.js +0 -1
- package/services/SetProjectIdService/SetProjectIdService.js +2 -7
- package/services/SetProjectIdService/SetProjectIdService.js.map +1 -1
- package/services/index.d.ts +0 -12
- package/services/index.js +0 -12
- package/utils/ensureNamedImport.d.ts +12 -0
- package/utils/ensureNamedImport.js +27 -0
- package/utils/ensureNamedImport.js.map +1 -0
- package/utils/env/index.d.ts +0 -1
- package/utils/env/index.js +0 -1
- package/utils/index.d.ts +2 -0
- package/utils/index.js +2 -0
- package/utils/registerSrcExtensions.d.ts +13 -0
- package/utils/registerSrcExtensions.js +10 -0
- package/utils/registerSrcExtensions.js.map +1 -0
- package/abstractions/features/DeployApp.d.ts +0 -20
- package/abstractions/features/DeployApp.js +0 -5
- package/abstractions/features/DeployApp.js.map +0 -1
- package/abstractions/features/DestroyApp.d.ts +0 -18
- package/abstractions/features/DestroyApp.js +0 -5
- package/abstractions/features/DestroyApp.js.map +0 -1
- package/abstractions/features/ExportStack.d.ts +0 -18
- package/abstractions/features/ExportStack.js +0 -5
- package/abstractions/features/ExportStack.js.map +0 -1
- package/abstractions/features/GetAppOutput.d.ts +0 -18
- package/abstractions/features/GetAppOutput.js +0 -5
- package/abstractions/features/GetAppOutput.js.map +0 -1
- package/abstractions/features/GetAppStackOutput.d.ts +0 -22
- package/abstractions/features/GetAppStackOutput.js +0 -5
- package/abstractions/features/GetAppStackOutput.js.map +0 -1
- package/abstractions/features/GetPulumiResourceNamePrefix.d.ts +0 -7
- package/abstractions/features/GetPulumiResourceNamePrefix.js +0 -5
- package/abstractions/features/GetPulumiResourceNamePrefix.js.map +0 -1
- package/abstractions/features/RefreshApp.d.ts +0 -18
- package/abstractions/features/RefreshApp.js +0 -5
- package/abstractions/features/RefreshApp.js.map +0 -1
- package/abstractions/features/RunPulumiCommand.d.ts +0 -19
- package/abstractions/features/RunPulumiCommand.js +0 -5
- package/abstractions/features/RunPulumiCommand.js.map +0 -1
- package/abstractions/features/hooks/AdminAfterDeploy.d.ts +0 -9
- package/abstractions/features/hooks/AdminAfterDeploy.js +0 -5
- package/abstractions/features/hooks/AdminAfterDeploy.js.map +0 -1
- package/abstractions/features/hooks/AdminBeforeDeploy.d.ts +0 -9
- package/abstractions/features/hooks/AdminBeforeDeploy.js +0 -5
- package/abstractions/features/hooks/AdminBeforeDeploy.js.map +0 -1
- package/abstractions/features/hooks/AfterDeploy.d.ts +0 -9
- package/abstractions/features/hooks/AfterDeploy.js +0 -5
- package/abstractions/features/hooks/AfterDeploy.js.map +0 -1
- package/abstractions/features/hooks/ApiAfterDeploy.d.ts +0 -9
- package/abstractions/features/hooks/ApiAfterDeploy.js +0 -5
- package/abstractions/features/hooks/ApiAfterDeploy.js.map +0 -1
- package/abstractions/features/hooks/ApiBeforeDeploy.d.ts +0 -9
- package/abstractions/features/hooks/ApiBeforeDeploy.js +0 -5
- package/abstractions/features/hooks/ApiBeforeDeploy.js.map +0 -1
- package/abstractions/features/hooks/BeforeDeploy.d.ts +0 -9
- package/abstractions/features/hooks/BeforeDeploy.js +0 -5
- package/abstractions/features/hooks/BeforeDeploy.js.map +0 -1
- package/abstractions/features/hooks/CoreAfterDeploy.d.ts +0 -9
- package/abstractions/features/hooks/CoreAfterDeploy.js +0 -5
- package/abstractions/features/hooks/CoreAfterDeploy.js.map +0 -1
- package/abstractions/features/hooks/CoreBeforeDeploy.d.ts +0 -9
- package/abstractions/features/hooks/CoreBeforeDeploy.js +0 -5
- package/abstractions/features/hooks/CoreBeforeDeploy.js.map +0 -1
- package/abstractions/services/GetPulumiService.d.ts +0 -14
- package/abstractions/services/GetPulumiService.js +0 -5
- package/abstractions/services/GetPulumiService.js.map +0 -1
- package/abstractions/services/IsRemotePulumiBackendService.d.ts +0 -7
- package/abstractions/services/IsRemotePulumiBackendService.js +0 -5
- package/abstractions/services/IsRemotePulumiBackendService.js.map +0 -1
- package/abstractions/services/ListAppLambdaFunctionsService.d.ts +0 -23
- package/abstractions/services/ListAppLambdaFunctionsService.js +0 -5
- package/abstractions/services/ListAppLambdaFunctionsService.js.map +0 -1
- package/abstractions/services/ListDeployedEnvironmentsService.d.ts +0 -12
- package/abstractions/services/ListDeployedEnvironmentsService.js +0 -5
- package/abstractions/services/ListDeployedEnvironmentsService.js.map +0 -1
- package/abstractions/services/ProjectInfoService/GetPulumiVersionService.d.ts +0 -12
- package/abstractions/services/ProjectInfoService/GetPulumiVersionService.js +0 -5
- package/abstractions/services/ProjectInfoService/GetPulumiVersionService.js.map +0 -1
- package/abstractions/services/PulumiExportService.d.ts +0 -13
- package/abstractions/services/PulumiExportService.js +0 -6
- package/abstractions/services/PulumiExportService.js.map +0 -1
- package/abstractions/services/PulumiGetConfigPassphraseService.d.ts +0 -7
- package/abstractions/services/PulumiGetConfigPassphraseService.js +0 -5
- package/abstractions/services/PulumiGetConfigPassphraseService.js.map +0 -1
- package/abstractions/services/PulumiGetSecretsProviderService.d.ts +0 -7
- package/abstractions/services/PulumiGetSecretsProviderService.js +0 -5
- package/abstractions/services/PulumiGetSecretsProviderService.js.map +0 -1
- package/abstractions/services/PulumiGetStackOutputService.d.ts +0 -13
- package/abstractions/services/PulumiGetStackOutputService.js +0 -5
- package/abstractions/services/PulumiGetStackOutputService.js.map +0 -1
- package/abstractions/services/PulumiImportService.d.ts +0 -8
- package/abstractions/services/PulumiImportService.js +0 -5
- package/abstractions/services/PulumiImportService.js.map +0 -1
- package/abstractions/services/PulumiLoginService.d.ts +0 -16
- package/abstractions/services/PulumiLoginService.js +0 -5
- package/abstractions/services/PulumiLoginService.js.map +0 -1
- package/abstractions/services/PulumiSelectStackService.d.ts +0 -10
- package/abstractions/services/PulumiSelectStackService.js +0 -5
- package/abstractions/services/PulumiSelectStackService.js.map +0 -1
- package/abstractions/services/StackOutputCacheService.d.ts +0 -10
- package/abstractions/services/StackOutputCacheService.js +0 -5
- package/abstractions/services/StackOutputCacheService.js.map +0 -1
- package/abstractions/services/WatchedLambdaFunctionsService.d.ts +0 -28
- package/abstractions/services/WatchedLambdaFunctionsService.js +0 -5
- package/abstractions/services/WatchedLambdaFunctionsService.js.map +0 -1
- package/decorators/DeployAppClearWatchedLambdaFunctions.d.ts +0 -17
- package/decorators/DeployAppClearWatchedLambdaFunctions.js +0 -32
- package/decorators/DeployAppClearWatchedLambdaFunctions.js.map +0 -1
- package/decorators/DeployAppRefreshStackOutputCache.d.ts +0 -17
- package/decorators/DeployAppRefreshStackOutputCache.js +0 -32
- package/decorators/DeployAppRefreshStackOutputCache.js.map +0 -1
- package/decorators/DeployAppWithHooks.d.ts +0 -17
- package/decorators/DeployAppWithHooks.js +0 -58
- package/decorators/DeployAppWithHooks.js.map +0 -1
- package/decorators/DeployAppWithWatchedLambdaReplacement.d.ts +0 -17
- package/decorators/DeployAppWithWatchedLambdaReplacement.js +0 -39
- package/decorators/DeployAppWithWatchedLambdaReplacement.js.map +0 -1
- package/decorators/DestroyAppClearStackOutputCache.d.ts +0 -25
- package/decorators/DestroyAppClearStackOutputCache.js +0 -29
- package/decorators/DestroyAppClearStackOutputCache.js.map +0 -1
- package/decorators/GetPulumiServiceWithDownloadInfo.d.ts +0 -11
- package/decorators/GetPulumiServiceWithDownloadInfo.js +0 -27
- package/decorators/GetPulumiServiceWithDownloadInfo.js.map +0 -1
- package/extensions/hooks/AdminAfterDeploy.d.ts +0 -4
- package/extensions/hooks/AdminAfterDeploy.js +0 -23
- package/extensions/hooks/AdminAfterDeploy.js.map +0 -1
- package/extensions/hooks/AdminBeforeDeploy.d.ts +0 -4
- package/extensions/hooks/AdminBeforeDeploy.js +0 -23
- package/extensions/hooks/AdminBeforeDeploy.js.map +0 -1
- package/extensions/hooks/AfterDeploy.d.ts +0 -4
- package/extensions/hooks/AfterDeploy.js +0 -22
- package/extensions/hooks/AfterDeploy.js.map +0 -1
- package/extensions/hooks/ApiAfterDeploy.d.ts +0 -4
- package/extensions/hooks/ApiAfterDeploy.js +0 -23
- package/extensions/hooks/ApiAfterDeploy.js.map +0 -1
- package/extensions/hooks/ApiBeforeDeploy.d.ts +0 -4
- package/extensions/hooks/ApiBeforeDeploy.js +0 -23
- package/extensions/hooks/ApiBeforeDeploy.js.map +0 -1
- package/extensions/hooks/BeforeDeploy.d.ts +0 -4
- package/extensions/hooks/BeforeDeploy.js +0 -22
- package/extensions/hooks/BeforeDeploy.js.map +0 -1
- package/extensions/hooks/CoreAfterDeploy.d.ts +0 -4
- package/extensions/hooks/CoreAfterDeploy.js +0 -23
- package/extensions/hooks/CoreAfterDeploy.js.map +0 -1
- package/extensions/hooks/CoreBeforeDeploy.d.ts +0 -4
- package/extensions/hooks/CoreBeforeDeploy.js +0 -23
- package/extensions/hooks/CoreBeforeDeploy.js.map +0 -1
- package/extensions/pulumi/ProductionEnvironments.js.map +0 -1
- package/extensions/pulumi/PulumiResourceNamePrefix.d.ts +0 -4
- package/extensions/pulumi/PulumiResourceNamePrefix.js +0 -16
- package/extensions/pulumi/PulumiResourceNamePrefix.js.map +0 -1
- package/extensions/pulumi/index.d.ts +0 -2
- package/extensions/pulumi/index.js +0 -2
- package/features/DeployApp/DeployApp.d.ts +0 -14
- package/features/DeployApp/DeployApp.js +0 -86
- package/features/DeployApp/DeployApp.js.map +0 -1
- package/features/DeployApp/index.d.ts +0 -1
- package/features/DeployApp/index.js +0 -1
- package/features/DestroyApp/DestroyApp.d.ts +0 -14
- package/features/DestroyApp/DestroyApp.js +0 -66
- package/features/DestroyApp/DestroyApp.js.map +0 -1
- package/features/DestroyApp/index.d.ts +0 -1
- package/features/DestroyApp/index.js +0 -1
- package/features/ExportStack/ExportStack.d.ts +0 -9
- package/features/ExportStack/ExportStack.js +0 -26
- package/features/ExportStack/ExportStack.js.map +0 -1
- package/features/ExportStack/index.d.ts +0 -1
- package/features/ExportStack/index.js +0 -1
- package/features/GetAppOutput/GetAppOutput.d.ts +0 -12
- package/features/GetAppOutput/GetAppOutput.js +0 -51
- package/features/GetAppOutput/GetAppOutput.js.map +0 -1
- package/features/GetAppOutput/index.d.ts +0 -1
- package/features/GetAppOutput/index.js +0 -1
- package/features/GetAppStackOutput/GetAppStackOutput.d.ts +0 -10
- package/features/GetAppStackOutput/GetAppStackOutput.js +0 -26
- package/features/GetAppStackOutput/GetAppStackOutput.js.map +0 -1
- package/features/GetAppStackOutput/index.d.ts +0 -1
- package/features/GetAppStackOutput/index.js +0 -1
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.d.ts +0 -7
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js +0 -25
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js.map +0 -1
- package/features/GetPulumiResourceNamePrefix/index.d.ts +0 -1
- package/features/GetPulumiResourceNamePrefix/index.js +0 -1
- package/features/RefreshApp/RefreshApp.d.ts +0 -13
- package/features/RefreshApp/RefreshApp.js +0 -64
- package/features/RefreshApp/RefreshApp.js.map +0 -1
- package/features/RefreshApp/index.d.ts +0 -1
- package/features/RefreshApp/index.js +0 -1
- package/features/RunPulumiCommand/RunPulumiCommand.d.ts +0 -13
- package/features/RunPulumiCommand/RunPulumiCommand.js +0 -61
- package/features/RunPulumiCommand/RunPulumiCommand.js.map +0 -1
- package/features/RunPulumiCommand/index.d.ts +0 -1
- package/features/RunPulumiCommand/index.js +0 -1
- package/features/Watch/handler/handler.zip +0 -0
- package/features/Watch/initInvocationForwarding.d.ts +0 -9
- package/features/Watch/initInvocationForwarding.js +0 -91
- package/features/Watch/initInvocationForwarding.js.map +0 -1
- package/features/Watch/localInvocationWorker.d.ts +0 -1
- package/features/Watch/localInvocationWorker.js +0 -31
- package/features/Watch/localInvocationWorker.js.map +0 -1
- package/features/hooks/AdminAfterDeploy/AdminBeforeBuild.d.ts +0 -7
- package/features/hooks/AdminAfterDeploy/AdminBeforeBuild.js +0 -25
- package/features/hooks/AdminAfterDeploy/AdminBeforeBuild.js.map +0 -1
- package/features/hooks/AdminAfterDeploy/index.d.ts +0 -1
- package/features/hooks/AdminAfterDeploy/index.js +0 -1
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.d.ts +0 -7
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js +0 -25
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js.map +0 -1
- package/features/hooks/AdminBeforeDeploy/index.d.ts +0 -1
- package/features/hooks/AdminBeforeDeploy/index.js +0 -1
- package/features/hooks/AfterDeploy/AfterDeploy.d.ts +0 -7
- package/features/hooks/AfterDeploy/AfterDeploy.js +0 -25
- package/features/hooks/AfterDeploy/AfterDeploy.js.map +0 -1
- package/features/hooks/AfterDeploy/index.d.ts +0 -1
- package/features/hooks/AfterDeploy/index.js +0 -1
- package/features/hooks/ApiAfterDeploy/ApiBeforeBuild.d.ts +0 -7
- package/features/hooks/ApiAfterDeploy/ApiBeforeBuild.js +0 -25
- package/features/hooks/ApiAfterDeploy/ApiBeforeBuild.js.map +0 -1
- package/features/hooks/ApiAfterDeploy/index.d.ts +0 -1
- package/features/hooks/ApiAfterDeploy/index.js +0 -1
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.d.ts +0 -7
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js +0 -25
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js.map +0 -1
- package/features/hooks/ApiBeforeDeploy/index.d.ts +0 -1
- package/features/hooks/ApiBeforeDeploy/index.js +0 -1
- package/features/hooks/BeforeDeploy/BeforeDeploy.d.ts +0 -7
- package/features/hooks/BeforeDeploy/BeforeDeploy.js +0 -25
- package/features/hooks/BeforeDeploy/BeforeDeploy.js.map +0 -1
- package/features/hooks/BeforeDeploy/index.d.ts +0 -1
- package/features/hooks/BeforeDeploy/index.js +0 -1
- package/features/hooks/CoreAfterDeploy/CoreBeforeBuild.d.ts +0 -7
- package/features/hooks/CoreAfterDeploy/CoreBeforeBuild.js +0 -25
- package/features/hooks/CoreAfterDeploy/CoreBeforeBuild.js.map +0 -1
- package/features/hooks/CoreAfterDeploy/index.d.ts +0 -1
- package/features/hooks/CoreAfterDeploy/index.js +0 -1
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.d.ts +0 -7
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js +0 -25
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js.map +0 -1
- package/features/hooks/CoreBeforeDeploy/index.d.ts +0 -1
- package/features/hooks/CoreBeforeDeploy/index.js +0 -1
- package/services/InitProjectSdkService/registerPulumiExtensions.d.ts +0 -4
- package/services/InitProjectSdkService/registerPulumiExtensions.js +0 -16
- package/services/InitProjectSdkService/registerPulumiExtensions.js.map +0 -1
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.d.ts +0 -14
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js +0 -15
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js.map +0 -1
- package/services/IsRemotePulumiBackendService/index.d.ts +0 -1
- package/services/IsRemotePulumiBackendService/index.js +0 -1
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.d.ts +0 -18
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js +0 -61
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js.map +0 -1
- package/services/ListAppLambdaFunctionsService/index.d.ts +0 -1
- package/services/ListAppLambdaFunctionsService/index.js +0 -1
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.d.ts +0 -7
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js +0 -30
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js.map +0 -1
- package/services/ListDeployedEnvironmentsService/index.d.ts +0 -1
- package/services/ListDeployedEnvironmentsService/index.js +0 -1
- package/services/ProjectInfoService/GetPulumiVersionService.d.ts +0 -5
- package/services/ProjectInfoService/GetPulumiVersionService.js +0 -46
- package/services/ProjectInfoService/GetPulumiVersionService.js.map +0 -1
- package/services/PulumiExportService/PulumiExportService.d.ts +0 -13
- package/services/PulumiExportService/PulumiExportService.js +0 -50
- package/services/PulumiExportService/PulumiExportService.js.map +0 -1
- package/services/PulumiExportService/index.d.ts +0 -1
- package/services/PulumiExportService/index.js +0 -1
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.d.ts +0 -5
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js +0 -15
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js.map +0 -1
- package/services/PulumiGetConfigPassphraseService/index.d.ts +0 -1
- package/services/PulumiGetConfigPassphraseService/index.js +0 -1
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.d.ts +0 -5
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js +0 -15
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js.map +0 -1
- package/services/PulumiGetSecretsProviderService/index.d.ts +0 -1
- package/services/PulumiGetSecretsProviderService/index.js +0 -1
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.d.ts +0 -12
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js +0 -64
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js.map +0 -1
- package/services/PulumiGetStackOutputService/index.d.ts +0 -1
- package/services/PulumiGetStackOutputService/index.js +0 -1
- package/services/PulumiGetStackOutputService/mapStackOutput.d.ts +0 -1
- package/services/PulumiGetStackOutputService/mapStackOutput.js +0 -22
- package/services/PulumiGetStackOutputService/mapStackOutput.js.map +0 -1
- package/services/PulumiImportService/PulumiImportService.d.ts +0 -10
- package/services/PulumiImportService/PulumiImportService.js +0 -60
- package/services/PulumiImportService/PulumiImportService.js.map +0 -1
- package/services/PulumiImportService/index.d.ts +0 -1
- package/services/PulumiImportService/index.js +0 -1
- package/services/PulumiLoginService/PulumiLoginService.d.ts +0 -10
- package/services/PulumiLoginService/PulumiLoginService.js +0 -54
- package/services/PulumiLoginService/PulumiLoginService.js.map +0 -1
- package/services/PulumiLoginService/index.d.ts +0 -1
- package/services/PulumiLoginService/index.js +0 -1
- package/services/PulumiSelectStackService/PulumiSelectStackService.d.ts +0 -15
- package/services/PulumiSelectStackService/PulumiSelectStackService.js +0 -102
- package/services/PulumiSelectStackService/PulumiSelectStackService.js.map +0 -1
- package/services/PulumiSelectStackService/index.d.ts +0 -1
- package/services/PulumiSelectStackService/index.js +0 -1
- package/services/StackOutputCacheService/StackOutputCacheService.d.ts +0 -18
- package/services/StackOutputCacheService/StackOutputCacheService.js +0 -89
- package/services/StackOutputCacheService/StackOutputCacheService.js.map +0 -1
- package/services/StackOutputCacheService/index.d.ts +0 -1
- package/services/StackOutputCacheService/index.js +0 -1
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.d.ts +0 -13
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js +0 -54
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js.map +0 -1
- package/services/WatchedLambdaFunctionsService/index.d.ts +0 -1
- package/services/WatchedLambdaFunctionsService/index.js +0 -1
- package/utils/env/withPulumiConfigPassphrase.d.ts +0 -1
- package/utils/env/withPulumiConfigPassphrase.js +0 -7
- package/utils/env/withPulumiConfigPassphrase.js.map +0 -1
- /package/extensions/{pulumi/ProductionEnvironments.d.ts → ProductionEnvironments.d.ts} +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type IProjectModel } from "../../abstractions/models/index.js";
|
|
2
|
-
import { type IProjectConfigModel } from "../../abstractions/models/index.js";
|
|
3
|
-
import { Container } from "@webiny/di";
|
|
4
|
-
export declare const registerPulumiExtensions: (container: Container, projectExtensions: IProjectConfigModel, project: IProjectModel) => Promise<void>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ExtensionSrcResolver } from "../../utils/index.js";
|
|
2
|
-
const registerPulumiExtensions = async (container, projectExtensions, project)=>{
|
|
3
|
-
const pulumiExtensions = [
|
|
4
|
-
...projectExtensions.extensionsByType("Core/Pulumi"),
|
|
5
|
-
...projectExtensions.extensionsByType("Api/Pulumi"),
|
|
6
|
-
...projectExtensions.extensionsByType("Admin/Pulumi")
|
|
7
|
-
];
|
|
8
|
-
for (const pulumiExtension of pulumiExtensions){
|
|
9
|
-
const { src } = pulumiExtension.params;
|
|
10
|
-
const pulumiImpl = await ExtensionSrcResolver.importFromPath(src, project);
|
|
11
|
-
container.register(pulumiImpl).inSingletonScope();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
export { registerPulumiExtensions };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=registerPulumiExtensions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/InitProjectSdkService/registerPulumiExtensions.js","sources":["../../../src/services/InitProjectSdkService/registerPulumiExtensions.ts"],"sourcesContent":["import { type IProjectModel } from \"~/abstractions/models/index.js\";\nimport { type IProjectConfigModel } from \"~/abstractions/models/index.js\";\nimport { Container } from \"@webiny/di\";\nimport { ExtensionSrcResolver } from \"~/utils/index.js\";\n\nexport const registerPulumiExtensions = async (\n container: Container,\n projectExtensions: IProjectConfigModel,\n project: IProjectModel\n) => {\n const pulumiExtensions = [\n ...projectExtensions.extensionsByType(\"Core/Pulumi\"),\n ...projectExtensions.extensionsByType(\"Api/Pulumi\"),\n ...projectExtensions.extensionsByType(\"Admin/Pulumi\")\n ];\n\n for (const pulumiExtension of pulumiExtensions) {\n const { src } = pulumiExtension.params as { src: string };\n const pulumiImpl = await ExtensionSrcResolver.importFromPath(src, project);\n container.register(pulumiImpl).inSingletonScope();\n }\n};\n"],"names":["registerPulumiExtensions","container","projectExtensions","project","pulumiExtensions","pulumiExtension","src","pulumiImpl","ExtensionSrcResolver"],"mappings":";AAKO,MAAMA,2BAA2B,OACpCC,WACAC,mBACAC;IAEA,MAAMC,mBAAmB;WAClBF,kBAAkB,gBAAgB,CAAC;WACnCA,kBAAkB,gBAAgB,CAAC;WACnCA,kBAAkB,gBAAgB,CAAC;KACzC;IAED,KAAK,MAAMG,mBAAmBD,iBAAkB;QAC5C,MAAM,EAAEE,GAAG,EAAE,GAAGD,gBAAgB,MAAM;QACtC,MAAME,aAAa,MAAMC,qBAAqB,cAAc,CAACF,KAAKH;QAClEF,UAAU,QAAQ,CAACM,YAAY,gBAAgB;IACnD;AACJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IsRemotePulumiBackendService } from "../../abstractions/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Service to check if a remote Pulumi backend is configured via environment variables.
|
|
4
|
-
*
|
|
5
|
-
* Checks for the following environment variables:
|
|
6
|
-
* - WEBINY_CLI_PULUMI_BACKEND (canonical)
|
|
7
|
-
* - WEBINY_CLI_PULUMI_BACKEND_URL
|
|
8
|
-
* - WEBINY_PULUMI_BACKEND (legacy, kept for backwards compatibility)
|
|
9
|
-
* - PULUMI_LOGIN (fallback for standard Pulumi configuration)
|
|
10
|
-
*/
|
|
11
|
-
export declare class DefaultIsRemotePulumiBackendService implements IsRemotePulumiBackendService.Interface {
|
|
12
|
-
execute(): boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const isRemotePulumiBackendService: import("@webiny/di").Implementation<typeof DefaultIsRemotePulumiBackendService>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { IsRemotePulumiBackendService } from "../../abstractions/index.js";
|
|
3
|
-
class DefaultIsRemotePulumiBackendService {
|
|
4
|
-
execute() {
|
|
5
|
-
return !!(process.env.WEBINY_CLI_PULUMI_BACKEND || process.env.WEBINY_CLI_PULUMI_BACKEND_URL || process.env.WEBINY_PULUMI_BACKEND || process.env.PULUMI_LOGIN);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
const isRemotePulumiBackendService = createImplementation({
|
|
9
|
-
abstraction: IsRemotePulumiBackendService,
|
|
10
|
-
implementation: DefaultIsRemotePulumiBackendService,
|
|
11
|
-
dependencies: []
|
|
12
|
-
});
|
|
13
|
-
export { DefaultIsRemotePulumiBackendService, isRemotePulumiBackendService };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=IsRemotePulumiBackendService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js","sources":["../../../src/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { IsRemotePulumiBackendService } from \"~/abstractions/index.js\";\n\n/**\n * Service to check if a remote Pulumi backend is configured via environment variables.\n *\n * Checks for the following environment variables:\n * - WEBINY_CLI_PULUMI_BACKEND (canonical)\n * - WEBINY_CLI_PULUMI_BACKEND_URL\n * - WEBINY_PULUMI_BACKEND (legacy, kept for backwards compatibility)\n * - PULUMI_LOGIN (fallback for standard Pulumi configuration)\n */\nexport class DefaultIsRemotePulumiBackendService implements IsRemotePulumiBackendService.Interface {\n execute(): boolean {\n return !!(\n process.env.WEBINY_CLI_PULUMI_BACKEND ||\n process.env.WEBINY_CLI_PULUMI_BACKEND_URL ||\n process.env.WEBINY_PULUMI_BACKEND ||\n process.env.PULUMI_LOGIN\n );\n }\n}\n\nexport const isRemotePulumiBackendService = createImplementation({\n abstraction: IsRemotePulumiBackendService,\n implementation: DefaultIsRemotePulumiBackendService,\n dependencies: []\n});\n"],"names":["DefaultIsRemotePulumiBackendService","process","isRemotePulumiBackendService","createImplementation","IsRemotePulumiBackendService"],"mappings":";;AAYO,MAAMA;IACT,UAAmB;QACf,OAAO,CAAC,CACJC,CAAAA,QAAQ,GAAG,CAAC,yBAAyB,IACrCA,QAAQ,GAAG,CAAC,6BAA6B,IACzCA,QAAQ,GAAG,CAAC,qBAAqB,IACjCA,QAAQ,GAAG,CAAC,YAAW;IAE/B;AACJ;AAEO,MAAMC,+BAA+BC,qBAAqB;IAC7D,aAAaC;IACb,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./IsRemotePulumiBackendService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./IsRemotePulumiBackendService.js";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ListAppLambdaFunctionsService, PulumiExportService, LoggerService } from "../../abstractions/index.js";
|
|
2
|
-
import { type AppModel } from "../../models/index.js";
|
|
3
|
-
export declare class DefaultListAppLambdaFunctionsService implements ListAppLambdaFunctionsService.Interface {
|
|
4
|
-
private pulumiExportService;
|
|
5
|
-
private loggerService;
|
|
6
|
-
constructor(pulumiExportService: PulumiExportService.Interface, loggerService: LoggerService.Interface);
|
|
7
|
-
execute(app: AppModel, params?: ListAppLambdaFunctionsService.Params): Promise<{
|
|
8
|
-
list: {
|
|
9
|
-
name: string;
|
|
10
|
-
path: string;
|
|
11
|
-
}[];
|
|
12
|
-
meta: {
|
|
13
|
-
count: number;
|
|
14
|
-
totalCount: number;
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
17
|
-
}
|
|
18
|
-
export declare const listAppLambdaFunctionsService: import("@webiny/di").Implementation<typeof DefaultListAppLambdaFunctionsService>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { ListAppLambdaFunctionsService, LoggerService, PulumiExportService } from "../../abstractions/index.js";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { minimatch } from "minimatch";
|
|
5
|
-
class DefaultListAppLambdaFunctionsService {
|
|
6
|
-
constructor(pulumiExportService, loggerService){
|
|
7
|
-
this.pulumiExportService = pulumiExportService;
|
|
8
|
-
this.loggerService = loggerService;
|
|
9
|
-
}
|
|
10
|
-
async execute(app, params) {
|
|
11
|
-
const stackExport = await this.pulumiExportService.execute(app);
|
|
12
|
-
if (!stackExport) return {
|
|
13
|
-
list: [],
|
|
14
|
-
meta: {
|
|
15
|
-
count: 0,
|
|
16
|
-
totalCount: 0
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const resources = stackExport.deployment?.resources ?? [];
|
|
20
|
-
const allFunctionsList = resources.filter((r)=>"aws:lambda/function:Function" === r.type).filter((resource)=>{
|
|
21
|
-
const isAuthorizerFunction = resource.inputs.name.includes("watch-command-iot-authorizer");
|
|
22
|
-
return !isAuthorizerFunction;
|
|
23
|
-
});
|
|
24
|
-
let filteredFunctionsList = allFunctionsList.filter((resource)=>"." in resource.inputs.code.assets).map((resource)=>{
|
|
25
|
-
const fnName = resource.inputs.name;
|
|
26
|
-
const handlerBuildFolderPath = resource.inputs.code.assets["."].path;
|
|
27
|
-
const handlerPath = path.join(handlerBuildFolderPath, "handler.mjs");
|
|
28
|
-
return {
|
|
29
|
-
name: fnName,
|
|
30
|
-
path: handlerPath
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
if (params?.whitelist?.length) {
|
|
34
|
-
const functionNamesToMatch = Array.isArray(params.whitelist) ? params.whitelist : [
|
|
35
|
-
params.whitelist
|
|
36
|
-
];
|
|
37
|
-
filteredFunctionsList = filteredFunctionsList.filter((fn)=>functionNamesToMatch.some((pattern)=>{
|
|
38
|
-
if (pattern.includes("*")) return minimatch(fn.name, pattern);
|
|
39
|
-
return fn.name.includes(pattern);
|
|
40
|
-
}));
|
|
41
|
-
} else if ("api" === app.name) filteredFunctionsList = filteredFunctionsList.filter((fn)=>fn.name.includes("graphql"));
|
|
42
|
-
return {
|
|
43
|
-
list: filteredFunctionsList,
|
|
44
|
-
meta: {
|
|
45
|
-
count: filteredFunctionsList.length,
|
|
46
|
-
totalCount: allFunctionsList.length
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const listAppLambdaFunctionsService = createImplementation({
|
|
52
|
-
abstraction: ListAppLambdaFunctionsService,
|
|
53
|
-
implementation: DefaultListAppLambdaFunctionsService,
|
|
54
|
-
dependencies: [
|
|
55
|
-
PulumiExportService,
|
|
56
|
-
LoggerService
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
export { DefaultListAppLambdaFunctionsService, listAppLambdaFunctionsService };
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=ListAppLambdaFunctionsService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js","sources":["../../../src/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n ListAppLambdaFunctionsService,\n PulumiExportService,\n LoggerService\n} from \"~/abstractions/index.js\";\nimport { type AppModel } from \"~/models/index.js\";\nimport path from \"path\";\nimport { minimatch } from \"minimatch\";\n\ninterface ExpectedStackExport {\n deployment: {\n resources: Array<{\n type: string;\n inputs: {\n name: string;\n code: {\n assets: Record<string, { path: string }>;\n };\n };\n }>;\n };\n}\n\nexport class DefaultListAppLambdaFunctionsService\n implements ListAppLambdaFunctionsService.Interface\n{\n constructor(\n private pulumiExportService: PulumiExportService.Interface,\n private loggerService: LoggerService.Interface\n ) {}\n\n async execute(app: AppModel, params?: ListAppLambdaFunctionsService.Params) {\n const stackExport = await this.pulumiExportService.execute<ExpectedStackExport>(app);\n\n if (!stackExport) {\n // If no stack export is found, return an empty array. This is a valid scenario.\n // For example, watching the Admin app locally, but not deploying it.\n return {\n list: [],\n meta: {\n count: 0,\n totalCount: 0\n }\n };\n }\n\n // If an app is not deployed, resources will not exist.\n const resources = stackExport.deployment?.resources ?? [];\n\n const allFunctionsList = resources\n .filter(r => r.type === \"aws:lambda/function:Function\")\n // We don't need to watch the authorizer function.\n .filter(resource => {\n const isAuthorizerFunction = resource.inputs.name.includes(\n \"watch-command-iot-authorizer\"\n );\n return !isAuthorizerFunction;\n });\n\n let filteredFunctionsList = allFunctionsList\n // First, this filter ensures that Lambda@Edge functions are excluded. Second,\n // it also ensures a function is filtered out if a `pulumi refresh` was called.\n // This is because, when called, the paths in Pulumi state file disappear, and\n // we can't determine the path to the handler. Probably needs revisiting. 🤦♂️\n .filter(resource => {\n return \".\" in resource.inputs.code.assets;\n })\n .map(resource => {\n const fnName = resource.inputs.name;\n const handlerBuildFolderPath = resource.inputs.code.assets[\".\"].path;\n\n const handlerPath = path.join(handlerBuildFolderPath, \"handler.mjs\");\n return {\n name: fnName,\n path: handlerPath\n };\n });\n\n if (params?.whitelist?.length) {\n const functionNamesToMatch = Array.isArray(params.whitelist)\n ? params.whitelist\n : [params.whitelist];\n\n // `functionNamesToWatch` is an array of glob patterns, which denote which functions to watch.\n filteredFunctionsList = filteredFunctionsList.filter(fn => {\n return functionNamesToMatch.some(pattern => {\n if (pattern.includes(\"*\")) {\n return minimatch(fn.name, pattern);\n }\n\n return fn.name.includes(pattern);\n });\n });\n } else {\n // We've hardcoded this filtering here just because of lack of time.\n // With v5, these \"presets\" were located within `webiny.application.ts` files.\n if (app.name === \"api\") {\n filteredFunctionsList = filteredFunctionsList.filter(fn => {\n return fn.name.includes(\"graphql\");\n });\n }\n }\n\n return {\n list: filteredFunctionsList,\n meta: { count: filteredFunctionsList.length, totalCount: allFunctionsList.length }\n };\n }\n}\n\nexport const listAppLambdaFunctionsService = createImplementation({\n abstraction: ListAppLambdaFunctionsService,\n implementation: DefaultListAppLambdaFunctionsService,\n dependencies: [PulumiExportService, LoggerService]\n});\n"],"names":["DefaultListAppLambdaFunctionsService","pulumiExportService","loggerService","app","params","stackExport","resources","allFunctionsList","r","resource","isAuthorizerFunction","filteredFunctionsList","fnName","handlerBuildFolderPath","handlerPath","path","functionNamesToMatch","Array","fn","pattern","minimatch","listAppLambdaFunctionsService","createImplementation","ListAppLambdaFunctionsService","PulumiExportService","LoggerService"],"mappings":";;;;AAwBO,MAAMA;IAGT,YACYC,mBAAkD,EAClDC,aAAsC,CAChD;aAFUD,mBAAmB,GAAnBA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAM,QAAQC,GAAa,EAAEC,MAA6C,EAAE;QACxE,MAAMC,cAAc,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAsBF;QAEhF,IAAI,CAACE,aAGD,OAAO;YACH,MAAM,EAAE;YACR,MAAM;gBACF,OAAO;gBACP,YAAY;YAChB;QACJ;QAIJ,MAAMC,YAAYD,YAAY,UAAU,EAAE,aAAa,EAAE;QAEzD,MAAME,mBAAmBD,UACpB,MAAM,CAACE,CAAAA,IAAKA,AAAW,mCAAXA,EAAE,IAAI,EAElB,MAAM,CAACC,CAAAA;YACJ,MAAMC,uBAAuBD,SAAS,MAAM,CAAC,IAAI,CAAC,QAAQ,CACtD;YAEJ,OAAO,CAACC;QACZ;QAEJ,IAAIC,wBAAwBJ,iBAKvB,MAAM,CAACE,CAAAA,WACG,OAAOA,SAAS,MAAM,CAAC,IAAI,CAAC,MAAM,EAE5C,GAAG,CAACA,CAAAA;YACD,MAAMG,SAASH,SAAS,MAAM,CAAC,IAAI;YACnC,MAAMI,yBAAyBJ,SAAS,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;YAEpE,MAAMK,cAAcC,KAAK,IAAI,CAACF,wBAAwB;YACtD,OAAO;gBACH,MAAMD;gBACN,MAAME;YACV;QACJ;QAEJ,IAAIV,QAAQ,WAAW,QAAQ;YAC3B,MAAMY,uBAAuBC,MAAM,OAAO,CAACb,OAAO,SAAS,IACrDA,OAAO,SAAS,GAChB;gBAACA,OAAO,SAAS;aAAC;YAGxBO,wBAAwBA,sBAAsB,MAAM,CAACO,CAAAA,KAC1CF,qBAAqB,IAAI,CAACG,CAAAA;oBAC7B,IAAIA,QAAQ,QAAQ,CAAC,MACjB,OAAOC,UAAUF,GAAG,IAAI,EAAEC;oBAG9B,OAAOD,GAAG,IAAI,CAAC,QAAQ,CAACC;gBAC5B;QAER,OAGI,IAAIhB,AAAa,UAAbA,IAAI,IAAI,EACRQ,wBAAwBA,sBAAsB,MAAM,CAACO,CAAAA,KAC1CA,GAAG,IAAI,CAAC,QAAQ,CAAC;QAKpC,OAAO;YACH,MAAMP;YACN,MAAM;gBAAE,OAAOA,sBAAsB,MAAM;gBAAE,YAAYJ,iBAAiB,MAAM;YAAC;QACrF;IACJ;AACJ;AAEO,MAAMc,gCAAgCC,qBAAqB;IAC9D,aAAaC;IACb,gBAAgBvB;IAChB,cAAc;QAACwB;QAAqBC;KAAc;AACtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ListAppLambdaFunctionsService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ListAppLambdaFunctionsService.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { GetProjectService, ListDeployedEnvironmentsService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultListDeployedEnvironmentsService implements ListDeployedEnvironmentsService.Interface {
|
|
3
|
-
private getProjectService;
|
|
4
|
-
constructor(getProjectService: GetProjectService.Interface);
|
|
5
|
-
execute(): Promise<import("~/utils/index.js").IStack[]>;
|
|
6
|
-
}
|
|
7
|
-
export declare const listDeployedEnvironmentsService: import("@webiny/di").Implementation<typeof DefaultListDeployedEnvironmentsService>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetProjectService, ListDeployedEnvironmentsService } from "../../abstractions/index.js";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import fast_glob from "fast-glob";
|
|
5
|
-
import { splitStackName } from "../../utils/index.js";
|
|
6
|
-
const STACK_JSONS_GLOB = ".pulumi/**/apps/core/.pulumi/stacks/**/*.json";
|
|
7
|
-
class DefaultListDeployedEnvironmentsService {
|
|
8
|
-
constructor(getProjectService){
|
|
9
|
-
this.getProjectService = getProjectService;
|
|
10
|
-
}
|
|
11
|
-
async execute() {
|
|
12
|
-
const project = this.getProjectService.execute();
|
|
13
|
-
const pulumiCoreStackFilesPaths = fast_glob.sync(STACK_JSONS_GLOB, {
|
|
14
|
-
cwd: project.paths.rootFolder.toString(),
|
|
15
|
-
onlyFiles: true,
|
|
16
|
-
dot: true
|
|
17
|
-
});
|
|
18
|
-
return pulumiCoreStackFilesPaths.map((current)=>splitStackName(path.basename(current, ".json")));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const listDeployedEnvironmentsService = createImplementation({
|
|
22
|
-
abstraction: ListDeployedEnvironmentsService,
|
|
23
|
-
implementation: DefaultListDeployedEnvironmentsService,
|
|
24
|
-
dependencies: [
|
|
25
|
-
GetProjectService
|
|
26
|
-
]
|
|
27
|
-
});
|
|
28
|
-
export { DefaultListDeployedEnvironmentsService, listDeployedEnvironmentsService };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=ListDeployedEnvironmentsService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js","sources":["../../../src/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { GetProjectService, ListDeployedEnvironmentsService } from \"~/abstractions/index.js\";\nimport path from \"path\";\nimport glob from \"fast-glob\";\nimport { splitStackName } from \"~/utils/index.js\";\n\nconst STACK_JSONS_GLOB = \".pulumi/**/apps/core/.pulumi/stacks/**/*.json\";\n\nexport class DefaultListDeployedEnvironmentsService\n implements ListDeployedEnvironmentsService.Interface\n{\n constructor(private getProjectService: GetProjectService.Interface) {}\n\n async execute() {\n const project = this.getProjectService.execute();\n\n // We just get stack files for deployed Core application. That's enough\n // to determine into which environments the user has deployed their project.\n const pulumiCoreStackFilesPaths = glob.sync(STACK_JSONS_GLOB, {\n cwd: project.paths.rootFolder.toString(),\n onlyFiles: true,\n dot: true\n });\n\n return pulumiCoreStackFilesPaths.map(current => {\n return splitStackName(path.basename(current, \".json\"));\n });\n }\n}\n\nexport const listDeployedEnvironmentsService = createImplementation({\n abstraction: ListDeployedEnvironmentsService,\n implementation: DefaultListDeployedEnvironmentsService,\n dependencies: [GetProjectService]\n});\n"],"names":["STACK_JSONS_GLOB","DefaultListDeployedEnvironmentsService","getProjectService","project","pulumiCoreStackFilesPaths","glob","current","splitStackName","path","listDeployedEnvironmentsService","createImplementation","ListDeployedEnvironmentsService","GetProjectService"],"mappings":";;;;;AAMA,MAAMA,mBAAmB;AAElB,MAAMC;IAGT,YAAoBC,iBAA8C,CAAE;aAAhDA,iBAAiB,GAAjBA;IAAiD;IAErE,MAAM,UAAU;QACZ,MAAMC,UAAU,IAAI,CAAC,iBAAiB,CAAC,OAAO;QAI9C,MAAMC,4BAA4BC,UAAAA,IAAS,CAACL,kBAAkB;YAC1D,KAAKG,QAAQ,KAAK,CAAC,UAAU,CAAC,QAAQ;YACtC,WAAW;YACX,KAAK;QACT;QAEA,OAAOC,0BAA0B,GAAG,CAACE,CAAAA,UAC1BC,eAAeC,KAAK,QAAQ,CAACF,SAAS;IAErD;AACJ;AAEO,MAAMG,kCAAkCC,qBAAqB;IAChE,aAAaC;IACb,gBAAgBV;IAChB,cAAc;QAACW;KAAkB;AACrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ListDeployedEnvironmentsService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ListDeployedEnvironmentsService.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GetPulumiVersionService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultGetPulumiVersion implements GetPulumiVersionService.Interface {
|
|
3
|
-
execute(): import("../../abstractions/services/ProjectInfoService/GetPulumiVersionService").IGetPulumiVersionServiceResult;
|
|
4
|
-
}
|
|
5
|
-
export declare const getPulumiVersionService: import("@webiny/di").Implementation<typeof DefaultGetPulumiVersion>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetPulumiVersionService } from "../../abstractions/index.js";
|
|
3
|
-
import { execaSync } from "execa";
|
|
4
|
-
class DefaultGetPulumiVersion {
|
|
5
|
-
execute() {
|
|
6
|
-
const result = [
|
|
7
|
-
"",
|
|
8
|
-
""
|
|
9
|
-
];
|
|
10
|
-
try {
|
|
11
|
-
{
|
|
12
|
-
const { stdout } = execaSync("yarn", [
|
|
13
|
-
"info",
|
|
14
|
-
"@pulumi/pulumi",
|
|
15
|
-
"-A",
|
|
16
|
-
"-R",
|
|
17
|
-
"--name-only",
|
|
18
|
-
"--json"
|
|
19
|
-
]);
|
|
20
|
-
const match = stdout.match(/npm:(.*?)"/);
|
|
21
|
-
if (match) result[0] = match[1];
|
|
22
|
-
}
|
|
23
|
-
{
|
|
24
|
-
const { stdout } = execaSync("yarn", [
|
|
25
|
-
"info",
|
|
26
|
-
"@pulumi/aws",
|
|
27
|
-
"-A",
|
|
28
|
-
"-R",
|
|
29
|
-
"--name-only",
|
|
30
|
-
"--json"
|
|
31
|
-
]);
|
|
32
|
-
const match = stdout.match(/npm:(.*?)"/);
|
|
33
|
-
if (match) result[1] = match[1];
|
|
34
|
-
}
|
|
35
|
-
} catch {}
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const getPulumiVersionService = createImplementation({
|
|
40
|
-
abstraction: GetPulumiVersionService,
|
|
41
|
-
implementation: DefaultGetPulumiVersion,
|
|
42
|
-
dependencies: []
|
|
43
|
-
});
|
|
44
|
-
export { DefaultGetPulumiVersion, getPulumiVersionService };
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=GetPulumiVersionService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/ProjectInfoService/GetPulumiVersionService.js","sources":["../../../src/services/ProjectInfoService/GetPulumiVersionService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { GetPulumiVersionService } from \"~/abstractions/index.js\";\nimport { execaSync } from \"execa\";\n\nexport class DefaultGetPulumiVersion implements GetPulumiVersionService.Interface {\n execute() {\n const result: GetPulumiVersionService.Result = [\"\", \"\"];\n\n try {\n {\n const { stdout } = execaSync(\"yarn\", [\n \"info\",\n \"@pulumi/pulumi\",\n \"-A\",\n \"-R\",\n \"--name-only\",\n \"--json\"\n ]);\n\n const match = stdout.match(/npm:(.*?)\"/);\n if (match) {\n result[0] = match[1];\n }\n }\n\n {\n const { stdout } = execaSync(\"yarn\", [\n \"info\",\n \"@pulumi/aws\",\n \"-A\",\n \"-R\",\n \"--name-only\",\n \"--json\"\n ]);\n\n const match = stdout.match(/npm:(.*?)\"/);\n if (match) {\n result[1] = match[1];\n }\n }\n } catch {\n // Do nothing.\n }\n\n return result;\n }\n}\n\nexport const getPulumiVersionService = createImplementation({\n abstraction: GetPulumiVersionService,\n implementation: DefaultGetPulumiVersion,\n dependencies: []\n});\n"],"names":["DefaultGetPulumiVersion","result","stdout","execaSync","match","getPulumiVersionService","createImplementation","GetPulumiVersionService"],"mappings":";;;AAIO,MAAMA;IACT,UAAU;QACN,MAAMC,SAAyC;YAAC;YAAI;SAAG;QAEvD,IAAI;YACA;gBACI,MAAM,EAAEC,MAAM,EAAE,GAAGC,UAAU,QAAQ;oBACjC;oBACA;oBACA;oBACA;oBACA;oBACA;iBACH;gBAED,MAAMC,QAAQF,OAAO,KAAK,CAAC;gBAC3B,IAAIE,OACAH,MAAM,CAAC,EAAE,GAAGG,KAAK,CAAC,EAAE;YAE5B;YAEA;gBACI,MAAM,EAAEF,MAAM,EAAE,GAAGC,UAAU,QAAQ;oBACjC;oBACA;oBACA;oBACA;oBACA;oBACA;iBACH;gBAED,MAAMC,QAAQF,OAAO,KAAK,CAAC;gBAC3B,IAAIE,OACAH,MAAM,CAAC,EAAE,GAAGG,KAAK,CAAC,EAAE;YAE5B;QACJ,EAAE,OAAM,CAER;QAEA,OAAOH;IACX;AACJ;AAEO,MAAMI,0BAA0BC,qBAAqB;IACxD,aAAaC;IACb,gBAAgBP;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GetPulumiService, LoggerService, PulumiExportService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
2
|
-
import { type AppModel } from "../../models/index.js";
|
|
3
|
-
export declare class DefaultPulumiExportService implements PulumiExportService.Interface {
|
|
4
|
-
private getPulumiService;
|
|
5
|
-
private pulumiSelectStackService;
|
|
6
|
-
private loggerService;
|
|
7
|
-
constructor(getPulumiService: GetPulumiService.Interface, pulumiSelectStackService: PulumiSelectStackService.Interface, loggerService: LoggerService.Interface);
|
|
8
|
-
execute(app: AppModel): Promise<any>;
|
|
9
|
-
}
|
|
10
|
-
export declare const pulumiExportService: import("@webiny/di").Implementation<typeof DefaultPulumiExportService>;
|
|
11
|
-
/** @deprecated Use pulumiExportService instead */
|
|
12
|
-
export declare const pulumiGetStackExportService: import("@webiny/di").Implementation<typeof DefaultPulumiExportService>;
|
|
13
|
-
export declare const DefaultPulumiGetStackExportService: typeof DefaultPulumiExportService;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetPulumiService, LoggerService, PulumiExportService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
3
|
-
import { createEnvConfiguration, withPulumiConfigPassphrase } from "../../utils/env/index.js";
|
|
4
|
-
class DefaultPulumiExportService {
|
|
5
|
-
constructor(getPulumiService, pulumiSelectStackService, loggerService){
|
|
6
|
-
this.getPulumiService = getPulumiService;
|
|
7
|
-
this.pulumiSelectStackService = pulumiSelectStackService;
|
|
8
|
-
this.loggerService = loggerService;
|
|
9
|
-
}
|
|
10
|
-
async execute(app) {
|
|
11
|
-
const pulumi = await this.getPulumiService.execute({
|
|
12
|
-
app
|
|
13
|
-
});
|
|
14
|
-
await this.pulumiSelectStackService.execute(app);
|
|
15
|
-
const stackOutputString = await pulumi.run({
|
|
16
|
-
command: [
|
|
17
|
-
"stack",
|
|
18
|
-
"export"
|
|
19
|
-
],
|
|
20
|
-
args: {},
|
|
21
|
-
execa: {
|
|
22
|
-
env: createEnvConfiguration({
|
|
23
|
-
configurations: [
|
|
24
|
-
withPulumiConfigPassphrase()
|
|
25
|
-
]
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
try {
|
|
30
|
-
return JSON.parse(stackOutputString.stdout);
|
|
31
|
-
} catch {
|
|
32
|
-
this.loggerService.error("Could not parse stack export as JSON.", stackOutputString.stdout, app);
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
const pulumiExportService = createImplementation({
|
|
38
|
-
abstraction: PulumiExportService,
|
|
39
|
-
implementation: DefaultPulumiExportService,
|
|
40
|
-
dependencies: [
|
|
41
|
-
GetPulumiService,
|
|
42
|
-
PulumiSelectStackService,
|
|
43
|
-
LoggerService
|
|
44
|
-
]
|
|
45
|
-
});
|
|
46
|
-
const pulumiGetStackExportService = pulumiExportService;
|
|
47
|
-
const DefaultPulumiGetStackExportService = DefaultPulumiExportService;
|
|
48
|
-
export { DefaultPulumiExportService, DefaultPulumiGetStackExportService, pulumiExportService, pulumiGetStackExportService };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=PulumiExportService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiExportService/PulumiExportService.js","sources":["../../../src/services/PulumiExportService/PulumiExportService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n GetPulumiService,\n LoggerService,\n PulumiExportService,\n PulumiSelectStackService\n} from \"~/abstractions/index.js\";\nimport { type AppModel } from \"~/models/index.js\";\nimport { createEnvConfiguration, withPulumiConfigPassphrase } from \"~/utils/env/index.js\";\n\nexport class DefaultPulumiExportService implements PulumiExportService.Interface {\n constructor(\n private getPulumiService: GetPulumiService.Interface,\n private pulumiSelectStackService: PulumiSelectStackService.Interface,\n private loggerService: LoggerService.Interface\n ) {}\n\n async execute(app: AppModel) {\n const pulumi = await this.getPulumiService.execute({ app });\n\n await this.pulumiSelectStackService.execute(app);\n\n const stackOutputString = await pulumi.run({\n command: [\"stack\", \"export\"],\n args: {},\n execa: {\n env: createEnvConfiguration({\n configurations: [withPulumiConfigPassphrase()]\n })\n }\n });\n\n try {\n return JSON.parse(stackOutputString.stdout as string);\n } catch {\n this.loggerService.error(\n \"Could not parse stack export as JSON.\",\n stackOutputString.stdout,\n app\n );\n return null;\n }\n }\n}\n\nexport const pulumiExportService = createImplementation({\n abstraction: PulumiExportService,\n implementation: DefaultPulumiExportService,\n dependencies: [GetPulumiService, PulumiSelectStackService, LoggerService]\n});\n\n// Backwards compatibility\n/** @deprecated Use pulumiExportService instead */\nexport const pulumiGetStackExportService = pulumiExportService;\nexport const DefaultPulumiGetStackExportService = DefaultPulumiExportService;\n"],"names":["DefaultPulumiExportService","getPulumiService","pulumiSelectStackService","loggerService","app","pulumi","stackOutputString","createEnvConfiguration","withPulumiConfigPassphrase","JSON","pulumiExportService","createImplementation","PulumiExportService","GetPulumiService","PulumiSelectStackService","LoggerService","pulumiGetStackExportService","DefaultPulumiGetStackExportService"],"mappings":";;;AAUO,MAAMA;IACT,YACYC,gBAA4C,EAC5CC,wBAA4D,EAC5DC,aAAsC,CAChD;aAHUF,gBAAgB,GAAhBA;aACAC,wBAAwB,GAAxBA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAM,QAAQC,GAAa,EAAE;QACzB,MAAMC,SAAS,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAED;QAAI;QAEzD,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA;QAE5C,MAAME,oBAAoB,MAAMD,OAAO,GAAG,CAAC;YACvC,SAAS;gBAAC;gBAAS;aAAS;YAC5B,MAAM,CAAC;YACP,OAAO;gBACH,KAAKE,uBAAuB;oBACxB,gBAAgB;wBAACC;qBAA6B;gBAClD;YACJ;QACJ;QAEA,IAAI;YACA,OAAOC,KAAK,KAAK,CAACH,kBAAkB,MAAM;QAC9C,EAAE,OAAM;YACJ,IAAI,CAAC,aAAa,CAAC,KAAK,CACpB,yCACAA,kBAAkB,MAAM,EACxBF;YAEJ,OAAO;QACX;IACJ;AACJ;AAEO,MAAMM,sBAAsBC,qBAAqB;IACpD,aAAaC;IACb,gBAAgBZ;IAChB,cAAc;QAACa;QAAkBC;QAA0BC;KAAc;AAC7E;AAIO,MAAMC,8BAA8BN;AACpC,MAAMO,qCAAqCjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiExportService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiExportService.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PulumiGetConfigPassphraseService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultPulumiGetConfigPassphraseService implements PulumiGetConfigPassphraseService.Interface {
|
|
3
|
-
execute(): string;
|
|
4
|
-
}
|
|
5
|
-
export declare const pulumiGetConfigPassphraseService: import("@webiny/di").Implementation<typeof DefaultPulumiGetConfigPassphraseService>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { PulumiGetConfigPassphraseService } from "../../abstractions/index.js";
|
|
3
|
-
class DefaultPulumiGetConfigPassphraseService {
|
|
4
|
-
execute() {
|
|
5
|
-
return process.env.PULUMI_CONFIG_PASSPHRASE || "webiny";
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
const pulumiGetConfigPassphraseService = createImplementation({
|
|
9
|
-
abstraction: PulumiGetConfigPassphraseService,
|
|
10
|
-
implementation: DefaultPulumiGetConfigPassphraseService,
|
|
11
|
-
dependencies: []
|
|
12
|
-
});
|
|
13
|
-
export { DefaultPulumiGetConfigPassphraseService, pulumiGetConfigPassphraseService };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=PulumiGetConfigPassphraseService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js","sources":["../../../src/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { PulumiGetConfigPassphraseService } from \"~/abstractions/index.js\";\n\nexport class DefaultPulumiGetConfigPassphraseService\n implements PulumiGetConfigPassphraseService.Interface\n{\n execute() {\n return process.env.PULUMI_CONFIG_PASSPHRASE || \"webiny\";\n }\n}\n\nexport const pulumiGetConfigPassphraseService = createImplementation({\n abstraction: PulumiGetConfigPassphraseService,\n implementation: DefaultPulumiGetConfigPassphraseService,\n dependencies: []\n});\n"],"names":["DefaultPulumiGetConfigPassphraseService","process","pulumiGetConfigPassphraseService","createImplementation","PulumiGetConfigPassphraseService"],"mappings":";;AAGO,MAAMA;IAGT,UAAU;QACN,OAAOC,QAAQ,GAAG,CAAC,wBAAwB,IAAI;IACnD;AACJ;AAEO,MAAMC,mCAAmCC,qBAAqB;IACjE,aAAaC;IACb,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetConfigPassphraseService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetConfigPassphraseService.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PulumiGetSecretsProviderService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultPulumiGetSecretsProviderService implements PulumiGetSecretsProviderService.Interface {
|
|
3
|
-
execute(): string;
|
|
4
|
-
}
|
|
5
|
-
export declare const pulumiGetSecretsProviderService: import("@webiny/di").Implementation<typeof DefaultPulumiGetSecretsProviderService>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { PulumiGetSecretsProviderService } from "../../abstractions/index.js";
|
|
3
|
-
class DefaultPulumiGetSecretsProviderService {
|
|
4
|
-
execute() {
|
|
5
|
-
return process.env.PULUMI_SECRETS_PROVIDER || "passphrase";
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
const pulumiGetSecretsProviderService = createImplementation({
|
|
9
|
-
abstraction: PulumiGetSecretsProviderService,
|
|
10
|
-
implementation: DefaultPulumiGetSecretsProviderService,
|
|
11
|
-
dependencies: []
|
|
12
|
-
});
|
|
13
|
-
export { DefaultPulumiGetSecretsProviderService, pulumiGetSecretsProviderService };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=PulumiGetSecretsProviderService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js","sources":["../../../src/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { PulumiGetSecretsProviderService } from \"~/abstractions/index.js\";\n\nexport class DefaultPulumiGetSecretsProviderService\n implements PulumiGetSecretsProviderService.Interface\n{\n execute() {\n return process.env.PULUMI_SECRETS_PROVIDER || \"passphrase\";\n }\n}\n\nexport const pulumiGetSecretsProviderService = createImplementation({\n abstraction: PulumiGetSecretsProviderService,\n implementation: DefaultPulumiGetSecretsProviderService,\n dependencies: []\n});\n"],"names":["DefaultPulumiGetSecretsProviderService","process","pulumiGetSecretsProviderService","createImplementation","PulumiGetSecretsProviderService"],"mappings":";;AAGO,MAAMA;IAGT,UAAU;QACN,OAAOC,QAAQ,GAAG,CAAC,uBAAuB,IAAI;IAClD;AACJ;AAEO,MAAMC,kCAAkCC,qBAAqB;IAChE,aAAaC;IACb,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetSecretsProviderService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetSecretsProviderService.js";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GetPulumiService, LoggerService, PulumiGetStackOutputService, PulumiSelectStackService, StackOutputCacheService } from "../../abstractions/index.js";
|
|
2
|
-
import { type AppModel } from "../../models/index.js";
|
|
3
|
-
export declare class DefaultPulumiGetStackOutputService implements PulumiGetStackOutputService.Interface {
|
|
4
|
-
private getPulumiService;
|
|
5
|
-
private pulumiSelectStackService;
|
|
6
|
-
private loggerService;
|
|
7
|
-
private stackOutputCacheService;
|
|
8
|
-
constructor(getPulumiService: GetPulumiService.Interface, pulumiSelectStackService: PulumiSelectStackService.Interface, loggerService: LoggerService.Interface, stackOutputCacheService: StackOutputCacheService.Interface);
|
|
9
|
-
execute<TOutput extends Record<string, any> = Record<string, any>>(app: AppModel, params?: PulumiGetStackOutputService.Params): Promise<TOutput | null>;
|
|
10
|
-
private applyMapping;
|
|
11
|
-
}
|
|
12
|
-
export declare const pulumiGetStackOutputService: import("@webiny/di").Implementation<typeof DefaultPulumiGetStackOutputService>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetPulumiService, LoggerService, PulumiGetStackOutputService, PulumiSelectStackService, StackOutputCacheService } from "../../abstractions/index.js";
|
|
3
|
-
import { createEnvConfiguration, withPulumiConfigPassphrase } from "../../utils/env/index.js";
|
|
4
|
-
import { mapStackOutput } from "./mapStackOutput.js";
|
|
5
|
-
class DefaultPulumiGetStackOutputService {
|
|
6
|
-
constructor(getPulumiService, pulumiSelectStackService, loggerService, stackOutputCacheService){
|
|
7
|
-
this.getPulumiService = getPulumiService;
|
|
8
|
-
this.pulumiSelectStackService = pulumiSelectStackService;
|
|
9
|
-
this.loggerService = loggerService;
|
|
10
|
-
this.stackOutputCacheService = stackOutputCacheService;
|
|
11
|
-
}
|
|
12
|
-
async execute(app, params) {
|
|
13
|
-
if (!params?.skipCache) {
|
|
14
|
-
const cachedOutput = await this.stackOutputCacheService.read(app);
|
|
15
|
-
if (null !== cachedOutput) return this.applyMapping(cachedOutput, params?.map);
|
|
16
|
-
}
|
|
17
|
-
const pulumi = await this.getPulumiService.execute({
|
|
18
|
-
app
|
|
19
|
-
});
|
|
20
|
-
await this.pulumiSelectStackService.execute(app);
|
|
21
|
-
const stackOutputString = await pulumi.run({
|
|
22
|
-
command: [
|
|
23
|
-
"stack",
|
|
24
|
-
"output"
|
|
25
|
-
],
|
|
26
|
-
args: {
|
|
27
|
-
json: true
|
|
28
|
-
},
|
|
29
|
-
execa: {
|
|
30
|
-
env: createEnvConfiguration({
|
|
31
|
-
configurations: [
|
|
32
|
-
withPulumiConfigPassphrase()
|
|
33
|
-
]
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
try {
|
|
38
|
-
const stackOutputJson = JSON.parse(stackOutputString.stdout);
|
|
39
|
-
if (!stackOutputJson) return null;
|
|
40
|
-
await this.stackOutputCacheService.write(app, stackOutputJson);
|
|
41
|
-
return this.applyMapping(stackOutputJson, params?.map);
|
|
42
|
-
} catch {
|
|
43
|
-
this.loggerService.error("Could not parse stack output as JSON.", stackOutputString.stdout, app, params);
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
applyMapping(data, map) {
|
|
48
|
-
if (!map) return data;
|
|
49
|
-
return mapStackOutput(data, map);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const pulumiGetStackOutputService = createImplementation({
|
|
53
|
-
abstraction: PulumiGetStackOutputService,
|
|
54
|
-
implementation: DefaultPulumiGetStackOutputService,
|
|
55
|
-
dependencies: [
|
|
56
|
-
GetPulumiService,
|
|
57
|
-
PulumiSelectStackService,
|
|
58
|
-
LoggerService,
|
|
59
|
-
StackOutputCacheService
|
|
60
|
-
]
|
|
61
|
-
});
|
|
62
|
-
export { DefaultPulumiGetStackOutputService, pulumiGetStackOutputService };
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=PulumiGetStackOutputService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiGetStackOutputService/PulumiGetStackOutputService.js","sources":["../../../src/services/PulumiGetStackOutputService/PulumiGetStackOutputService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n GetPulumiService,\n LoggerService,\n PulumiGetStackOutputService,\n PulumiSelectStackService,\n StackOutputCacheService\n} from \"~/abstractions/index.js\";\nimport { type AppModel } from \"~/models/index.js\";\nimport { createEnvConfiguration, withPulumiConfigPassphrase } from \"~/utils/env/index.js\";\nimport { mapStackOutput } from \"./mapStackOutput.js\";\n\nexport class DefaultPulumiGetStackOutputService implements PulumiGetStackOutputService.Interface {\n constructor(\n private getPulumiService: GetPulumiService.Interface,\n private pulumiSelectStackService: PulumiSelectStackService.Interface,\n private loggerService: LoggerService.Interface,\n private stackOutputCacheService: StackOutputCacheService.Interface\n ) {}\n\n async execute<TOutput extends Record<string, any> = Record<string, any>>(\n app: AppModel,\n params?: PulumiGetStackOutputService.Params\n ): Promise<TOutput | null> {\n // Try to read from cache if skipCache is not true\n if (!params?.skipCache) {\n const cachedOutput = await this.stackOutputCacheService.read(app);\n if (cachedOutput !== null) {\n return this.applyMapping(cachedOutput, params?.map) as TOutput;\n }\n }\n\n const pulumi = await this.getPulumiService.execute({ app });\n\n await this.pulumiSelectStackService.execute(app);\n\n const stackOutputString = await pulumi.run({\n command: [\"stack\", \"output\"],\n args: {\n json: true\n },\n execa: {\n env: createEnvConfiguration({\n configurations: [withPulumiConfigPassphrase()]\n })\n }\n });\n\n try {\n const stackOutputJson = JSON.parse(stackOutputString.stdout as string);\n if (!stackOutputJson) {\n return null;\n }\n\n await this.stackOutputCacheService.write(app, stackOutputJson);\n\n return this.applyMapping(stackOutputJson, params?.map) as TOutput;\n } catch {\n this.loggerService.error(\n \"Could not parse stack output as JSON.\",\n stackOutputString.stdout,\n app,\n params\n );\n return null;\n }\n }\n\n private applyMapping(\n data: Record<string, any>,\n map?: Record<string, any>\n ): Record<string, any> {\n if (!map) {\n return data;\n }\n // If a mapping is provided, we map the output to the specified structure.\n return mapStackOutput(data, map);\n }\n}\n\nexport const pulumiGetStackOutputService = createImplementation({\n abstraction: PulumiGetStackOutputService,\n implementation: DefaultPulumiGetStackOutputService,\n dependencies: [\n GetPulumiService,\n PulumiSelectStackService,\n LoggerService,\n StackOutputCacheService\n ]\n});\n"],"names":["DefaultPulumiGetStackOutputService","getPulumiService","pulumiSelectStackService","loggerService","stackOutputCacheService","app","params","cachedOutput","pulumi","stackOutputString","createEnvConfiguration","withPulumiConfigPassphrase","stackOutputJson","JSON","data","map","mapStackOutput","pulumiGetStackOutputService","createImplementation","PulumiGetStackOutputService","GetPulumiService","PulumiSelectStackService","LoggerService","StackOutputCacheService"],"mappings":";;;;AAYO,MAAMA;IACT,YACYC,gBAA4C,EAC5CC,wBAA4D,EAC5DC,aAAsC,EACtCC,uBAA0D,CACpE;aAJUH,gBAAgB,GAAhBA;aACAC,wBAAwB,GAAxBA;aACAC,aAAa,GAAbA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QACFC,GAAa,EACbC,MAA2C,EACpB;QAEvB,IAAI,CAACA,QAAQ,WAAW;YACpB,MAAMC,eAAe,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAACF;YAC7D,IAAIE,AAAiB,SAAjBA,cACA,OAAO,IAAI,CAAC,YAAY,CAACA,cAAcD,QAAQ;QAEvD;QAEA,MAAME,SAAS,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAEH;QAAI;QAEzD,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA;QAE5C,MAAMI,oBAAoB,MAAMD,OAAO,GAAG,CAAC;YACvC,SAAS;gBAAC;gBAAS;aAAS;YAC5B,MAAM;gBACF,MAAM;YACV;YACA,OAAO;gBACH,KAAKE,uBAAuB;oBACxB,gBAAgB;wBAACC;qBAA6B;gBAClD;YACJ;QACJ;QAEA,IAAI;YACA,MAAMC,kBAAkBC,KAAK,KAAK,CAACJ,kBAAkB,MAAM;YAC3D,IAAI,CAACG,iBACD,OAAO;YAGX,MAAM,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAACP,KAAKO;YAE9C,OAAO,IAAI,CAAC,YAAY,CAACA,iBAAiBN,QAAQ;QACtD,EAAE,OAAM;YACJ,IAAI,CAAC,aAAa,CAAC,KAAK,CACpB,yCACAG,kBAAkB,MAAM,EACxBJ,KACAC;YAEJ,OAAO;QACX;IACJ;IAEQ,aACJQ,IAAyB,EACzBC,GAAyB,EACN;QACnB,IAAI,CAACA,KACD,OAAOD;QAGX,OAAOE,eAAeF,MAAMC;IAChC;AACJ;AAEO,MAAME,8BAA8BC,qBAAqB;IAC5D,aAAaC;IACb,gBAAgBnB;IAChB,cAAc;QACVoB;QACAC;QACAC;QACAC;KACH;AACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetStackOutputService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PulumiGetStackOutputService.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mapStackOutput: <T extends Record<string, any> = Record<string, any>>(output: Record<string, any>, map: Record<string, any>) => T;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import get from "lodash/get.js";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
const { yellow: yellow } = chalk;
|
|
4
|
-
const mapStackOutput = (output, map)=>{
|
|
5
|
-
const values = {};
|
|
6
|
-
const regex = /\${(.*)}/;
|
|
7
|
-
Object.keys(map).forEach((key)=>{
|
|
8
|
-
const valuePattern = map[key];
|
|
9
|
-
const match = regex.exec(valuePattern);
|
|
10
|
-
if (match) {
|
|
11
|
-
const [replace, valuePath] = match;
|
|
12
|
-
const value = get(output, valuePath);
|
|
13
|
-
if (!value) return void console.log(yellow(`Could not map "${valuePath}" to "${key}" - value missing.`));
|
|
14
|
-
if ("object" == typeof value && null !== value) values[key] = valuePattern.replace(replace, JSON.stringify(value));
|
|
15
|
-
else values[key] = valuePattern.replace(replace, value);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return values;
|
|
19
|
-
};
|
|
20
|
-
export { mapStackOutput };
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=mapStackOutput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiGetStackOutputService/mapStackOutput.js","sources":["../../../src/services/PulumiGetStackOutputService/mapStackOutput.ts"],"sourcesContent":["import get from \"lodash/get.js\";\nimport chalk from \"chalk\";\n\nconst { yellow } = chalk;\n\nexport const mapStackOutput = <T extends Record<string, any> = Record<string, any>>(\n output: Record<string, any>,\n map: Record<string, any>\n): T => {\n const values: T = {} as T;\n const regex = /\\${(.*)}/;\n\n Object.keys(map).forEach(key => {\n const valuePattern = map[key];\n const match = regex.exec(valuePattern);\n if (match) {\n const [replace, valuePath] = match;\n const value = get(output, valuePath);\n if (!value) {\n console.log(yellow(`Could not map \"${valuePath}\" to \"${key}\" - value missing.`));\n return;\n }\n /**\n * It is ok to expect error here.\n */\n if (typeof value === \"object\" && value !== null) {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, JSON.stringify(value));\n } else {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, value);\n }\n }\n });\n\n return values;\n};\n"],"names":["yellow","chalk","mapStackOutput","output","map","values","regex","Object","key","valuePattern","match","replace","valuePath","value","get","console","JSON"],"mappings":";;AAGA,MAAM,EAAEA,QAAAA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,iBAAiB,CAC1BC,QACAC;IAEA,MAAMC,SAAY,CAAC;IACnB,MAAMC,QAAQ;IAEdC,OAAO,IAAI,CAACH,KAAK,OAAO,CAACI,CAAAA;QACrB,MAAMC,eAAeL,GAAG,CAACI,IAAI;QAC7B,MAAME,QAAQJ,MAAM,IAAI,CAACG;QACzB,IAAIC,OAAO;YACP,MAAM,CAACC,SAASC,UAAU,GAAGF;YAC7B,MAAMG,QAAQC,IAAIX,QAAQS;YAC1B,IAAI,CAACC,OAAO,YACRE,QAAQ,GAAG,CAACf,OAAO,CAAC,eAAe,EAAEY,UAAU,MAAM,EAAEJ,IAAI,kBAAkB,CAAC;YAMlF,IAAI,AAAiB,YAAjB,OAAOK,SAAsBA,AAAU,SAAVA,OAE7BR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASK,KAAK,SAAS,CAACH;iBAG3DR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASE;QAEpD;IACJ;IAEA,OAAOR;AACX"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetPulumiService, LoggerService, PulumiImportService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
2
|
-
import { type AppModel } from "../../models/index.js";
|
|
3
|
-
export declare class DefaultPulumiImportService implements PulumiImportService.Interface {
|
|
4
|
-
private getPulumiService;
|
|
5
|
-
private pulumiSelectStackService;
|
|
6
|
-
private loggerService;
|
|
7
|
-
constructor(getPulumiService: GetPulumiService.Interface, pulumiSelectStackService: PulumiSelectStackService.Interface, loggerService: LoggerService.Interface);
|
|
8
|
-
execute(app: AppModel, state: Record<string, any>): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
export declare const pulumiImportService: import("@webiny/di").Implementation<typeof DefaultPulumiImportService>;
|