@webiny/project 6.6.0-alpha.10 → 6.6.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/{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 +20 -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 +6 -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/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/index.d.ts +0 -12
- package/services/index.js +0 -12
- package/utils/env/index.d.ts +0 -1
- package/utils/env/index.js +0 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -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,51 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { BuildAppWorkspaceService, GetApp, GetAppOutput, GetPulumiService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
3
|
-
import { createEnvConfiguration, withPulumiConfigPassphrase } from "../../utils/env/index.js";
|
|
4
|
-
class DefaultGetAppOutput {
|
|
5
|
-
constructor(getApp, buildAppWorkspaceService, pulumiSelectStackService, getPulumiService){
|
|
6
|
-
this.getApp = getApp;
|
|
7
|
-
this.buildAppWorkspaceService = buildAppWorkspaceService;
|
|
8
|
-
this.pulumiSelectStackService = pulumiSelectStackService;
|
|
9
|
-
this.getPulumiService = getPulumiService;
|
|
10
|
-
}
|
|
11
|
-
async execute(params) {
|
|
12
|
-
await this.buildAppWorkspaceService.execute(params.app);
|
|
13
|
-
const app = this.getApp.execute(params.app);
|
|
14
|
-
await this.pulumiSelectStackService.execute(app);
|
|
15
|
-
const pulumi = await this.getPulumiService.execute({
|
|
16
|
-
app
|
|
17
|
-
});
|
|
18
|
-
const env = createEnvConfiguration({
|
|
19
|
-
configurations: [
|
|
20
|
-
withPulumiConfigPassphrase()
|
|
21
|
-
]
|
|
22
|
-
});
|
|
23
|
-
return {
|
|
24
|
-
pulumiProcess: pulumi.run({
|
|
25
|
-
command: [
|
|
26
|
-
"stack",
|
|
27
|
-
"output"
|
|
28
|
-
],
|
|
29
|
-
args: {
|
|
30
|
-
json: params.json || false
|
|
31
|
-
},
|
|
32
|
-
execa: {
|
|
33
|
-
env
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const getAppOutput = createImplementation({
|
|
40
|
-
abstraction: GetAppOutput,
|
|
41
|
-
implementation: DefaultGetAppOutput,
|
|
42
|
-
dependencies: [
|
|
43
|
-
GetApp,
|
|
44
|
-
BuildAppWorkspaceService,
|
|
45
|
-
PulumiSelectStackService,
|
|
46
|
-
GetPulumiService
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
export { DefaultGetAppOutput, getAppOutput };
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=GetAppOutput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/GetAppOutput/GetAppOutput.js","sources":["../../../src/features/GetAppOutput/GetAppOutput.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n BuildAppWorkspaceService,\n GetApp,\n GetAppOutput,\n GetPulumiService,\n PulumiSelectStackService\n} from \"~/abstractions/index.js\";\nimport { createEnvConfiguration, withPulumiConfigPassphrase } from \"~/utils/env/index.js\";\n\nexport class DefaultGetAppOutput implements GetAppOutput.Interface {\n constructor(\n private getApp: GetApp.Interface,\n private buildAppWorkspaceService: BuildAppWorkspaceService.Interface,\n private pulumiSelectStackService: PulumiSelectStackService.Interface,\n private getPulumiService: GetPulumiService.Interface\n ) {}\n\n async execute(params: GetAppOutput.Params) {\n await this.buildAppWorkspaceService.execute(params.app);\n\n const app = this.getApp.execute(params.app);\n\n await this.pulumiSelectStackService.execute(app);\n\n const pulumi = await this.getPulumiService.execute({ app });\n\n const env = createEnvConfiguration({\n configurations: [withPulumiConfigPassphrase()]\n });\n\n return {\n pulumiProcess: pulumi.run({\n command: [\"stack\", \"output\"],\n args: {\n json: params.json || false\n },\n execa: { env }\n })\n };\n }\n}\n\nexport const getAppOutput = createImplementation({\n abstraction: GetAppOutput,\n implementation: DefaultGetAppOutput,\n dependencies: [GetApp, BuildAppWorkspaceService, PulumiSelectStackService, GetPulumiService]\n});\n"],"names":["DefaultGetAppOutput","getApp","buildAppWorkspaceService","pulumiSelectStackService","getPulumiService","params","app","pulumi","env","createEnvConfiguration","withPulumiConfigPassphrase","getAppOutput","createImplementation","GetAppOutput","GetApp","BuildAppWorkspaceService","PulumiSelectStackService","GetPulumiService"],"mappings":";;;AAUO,MAAMA;IACT,YACYC,MAAwB,EACxBC,wBAA4D,EAC5DC,wBAA4D,EAC5DC,gBAA4C,CACtD;aAJUH,MAAM,GAANA;aACAC,wBAAwB,GAAxBA;aACAC,wBAAwB,GAAxBA;aACAC,gBAAgB,GAAhBA;IACT;IAEH,MAAM,QAAQC,MAA2B,EAAE;QACvC,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA,OAAO,GAAG;QAEtD,MAAMC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAACD,OAAO,GAAG;QAE1C,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACC;QAE5C,MAAMC,SAAS,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAED;QAAI;QAEzD,MAAME,MAAMC,uBAAuB;YAC/B,gBAAgB;gBAACC;aAA6B;QAClD;QAEA,OAAO;YACH,eAAeH,OAAO,GAAG,CAAC;gBACtB,SAAS;oBAAC;oBAAS;iBAAS;gBAC5B,MAAM;oBACF,MAAMF,OAAO,IAAI,IAAI;gBACzB;gBACA,OAAO;oBAAEG;gBAAI;YACjB;QACJ;IACJ;AACJ;AAEO,MAAMG,eAAeC,qBAAqB;IAC7C,aAAaC;IACb,gBAAgBb;IAChB,cAAc;QAACc;QAAQC;QAA0BC;QAA0BC;KAAiB;AAChG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetAppOutput.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetAppOutput.js";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BuildAppWorkspaceService, GetApp, GetAppStackOutput, PulumiGetStackOutputService } from "../../abstractions/index.js";
|
|
2
|
-
import { type AppName } from "../../abstractions/types.js";
|
|
3
|
-
export declare class DefaultGetAppStackOutput implements GetAppStackOutput.Interface {
|
|
4
|
-
private getAppService;
|
|
5
|
-
private buildAppWorkspaceService;
|
|
6
|
-
private pulumiGetStackOutputService;
|
|
7
|
-
constructor(getAppService: GetApp.Interface, buildAppWorkspaceService: BuildAppWorkspaceService.Interface, pulumiGetStackOutputService: PulumiGetStackOutputService.Interface);
|
|
8
|
-
execute<TOutput extends GetAppStackOutput.StackOutput = GetAppStackOutput.StackOutput>(appName: AppName): Promise<TOutput | null>;
|
|
9
|
-
}
|
|
10
|
-
export declare const getAppStackOutput: import("@webiny/di").Implementation<typeof DefaultGetAppStackOutput>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { BuildAppWorkspaceService, GetAppService, GetAppStackOutput, PulumiGetStackOutputService } from "../../abstractions/index.js";
|
|
3
|
-
class DefaultGetAppStackOutput {
|
|
4
|
-
constructor(getAppService, buildAppWorkspaceService, pulumiGetStackOutputService){
|
|
5
|
-
this.getAppService = getAppService;
|
|
6
|
-
this.buildAppWorkspaceService = buildAppWorkspaceService;
|
|
7
|
-
this.pulumiGetStackOutputService = pulumiGetStackOutputService;
|
|
8
|
-
}
|
|
9
|
-
async execute(appName) {
|
|
10
|
-
await this.buildAppWorkspaceService.execute(appName);
|
|
11
|
-
const app = this.getAppService.execute(appName);
|
|
12
|
-
return this.pulumiGetStackOutputService.execute(app);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const getAppStackOutput = createImplementation({
|
|
16
|
-
abstraction: GetAppStackOutput,
|
|
17
|
-
implementation: DefaultGetAppStackOutput,
|
|
18
|
-
dependencies: [
|
|
19
|
-
GetAppService,
|
|
20
|
-
BuildAppWorkspaceService,
|
|
21
|
-
PulumiGetStackOutputService
|
|
22
|
-
]
|
|
23
|
-
});
|
|
24
|
-
export { DefaultGetAppStackOutput, getAppStackOutput };
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=GetAppStackOutput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/GetAppStackOutput/GetAppStackOutput.js","sources":["../../../src/features/GetAppStackOutput/GetAppStackOutput.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n BuildAppWorkspaceService,\n GetApp,\n GetAppService,\n GetAppStackOutput,\n PulumiGetStackOutputService\n} from \"~/abstractions/index.js\";\nimport { type AppName } from \"~/abstractions/types.js\";\n\nexport class DefaultGetAppStackOutput implements GetAppStackOutput.Interface {\n constructor(\n private getAppService: GetApp.Interface,\n private buildAppWorkspaceService: BuildAppWorkspaceService.Interface,\n private pulumiGetStackOutputService: PulumiGetStackOutputService.Interface\n ) {}\n\n async execute<TOutput extends GetAppStackOutput.StackOutput = GetAppStackOutput.StackOutput>(\n appName: AppName\n ) {\n await this.buildAppWorkspaceService.execute(appName);\n\n const app = this.getAppService.execute(appName);\n return this.pulumiGetStackOutputService.execute<TOutput>(app);\n }\n}\n\nexport const getAppStackOutput = createImplementation({\n abstraction: GetAppStackOutput,\n implementation: DefaultGetAppStackOutput,\n dependencies: [GetAppService, BuildAppWorkspaceService, PulumiGetStackOutputService]\n});\n"],"names":["DefaultGetAppStackOutput","getAppService","buildAppWorkspaceService","pulumiGetStackOutputService","appName","app","getAppStackOutput","createImplementation","GetAppStackOutput","GetAppService","BuildAppWorkspaceService","PulumiGetStackOutputService"],"mappings":";;AAUO,MAAMA;IACT,YACYC,aAA+B,EAC/BC,wBAA4D,EAC5DC,2BAAkE,CAC5E;aAHUF,aAAa,GAAbA;aACAC,wBAAwB,GAAxBA;aACAC,2BAA2B,GAA3BA;IACT;IAEH,MAAM,QACFC,OAAgB,EAClB;QACE,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA;QAE5C,MAAMC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAACD;QACvC,OAAO,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAUC;IAC7D;AACJ;AAEO,MAAMC,oBAAoBC,qBAAqB;IAClD,aAAaC;IACb,gBAAgBR;IAChB,cAAc;QAACS;QAAeC;QAA0BC;KAA4B;AACxF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetAppStackOutput.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetAppStackOutput.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { GetProjectConfigService, GetPulumiResourceNamePrefix } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultGetPulumiResourceNamePrefix implements GetPulumiResourceNamePrefix.Interface {
|
|
3
|
-
private getProjectConfigService;
|
|
4
|
-
constructor(getProjectConfigService: GetProjectConfigService.Interface);
|
|
5
|
-
execute(): Promise<string>;
|
|
6
|
-
}
|
|
7
|
-
export declare const getPulumiResourceNamePrefix: import("@webiny/di").Implementation<typeof DefaultGetPulumiResourceNamePrefix>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetProjectConfigService, GetPulumiResourceNamePrefix } from "../../abstractions/index.js";
|
|
3
|
-
import { PulumiResourceNamePrefix } from "../../extensions/pulumi/index.js";
|
|
4
|
-
class DefaultGetPulumiResourceNamePrefix {
|
|
5
|
-
constructor(getProjectConfigService){
|
|
6
|
-
this.getProjectConfigService = getProjectConfigService;
|
|
7
|
-
}
|
|
8
|
-
async execute() {
|
|
9
|
-
const projectConfig = await this.getProjectConfigService.execute();
|
|
10
|
-
let pulumiResourceNamePrefix = "wby-";
|
|
11
|
-
const [pulumiResourceNamePrefixExt] = projectConfig.extensionsByType(PulumiResourceNamePrefix);
|
|
12
|
-
if (pulumiResourceNamePrefixExt) pulumiResourceNamePrefix = pulumiResourceNamePrefixExt.params.prefix;
|
|
13
|
-
return pulumiResourceNamePrefix;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
const getPulumiResourceNamePrefix = createImplementation({
|
|
17
|
-
abstraction: GetPulumiResourceNamePrefix,
|
|
18
|
-
implementation: DefaultGetPulumiResourceNamePrefix,
|
|
19
|
-
dependencies: [
|
|
20
|
-
GetProjectConfigService
|
|
21
|
-
]
|
|
22
|
-
});
|
|
23
|
-
export { DefaultGetPulumiResourceNamePrefix, getPulumiResourceNamePrefix };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=GetPulumiResourceNamePrefix.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js","sources":["../../../src/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { GetProjectConfigService, GetPulumiResourceNamePrefix } from \"~/abstractions/index.js\";\nimport { PulumiResourceNamePrefix as PulumiResourceNamePrefixExt } from \"~/extensions/pulumi/index.js\";\n\nexport class DefaultGetPulumiResourceNamePrefix implements GetPulumiResourceNamePrefix.Interface {\n constructor(private getProjectConfigService: GetProjectConfigService.Interface) {}\n async execute() {\n const projectConfig = await this.getProjectConfigService.execute();\n\n let pulumiResourceNamePrefix = \"wby-\";\n const [pulumiResourceNamePrefixExt] = projectConfig.extensionsByType(\n PulumiResourceNamePrefixExt\n );\n\n if (pulumiResourceNamePrefixExt) {\n pulumiResourceNamePrefix = pulumiResourceNamePrefixExt.params.prefix;\n }\n\n return pulumiResourceNamePrefix;\n }\n}\n\nexport const getPulumiResourceNamePrefix = createImplementation({\n abstraction: GetPulumiResourceNamePrefix,\n implementation: DefaultGetPulumiResourceNamePrefix,\n dependencies: [GetProjectConfigService]\n});\n"],"names":["DefaultGetPulumiResourceNamePrefix","getProjectConfigService","projectConfig","pulumiResourceNamePrefix","pulumiResourceNamePrefixExt","PulumiResourceNamePrefixExt","getPulumiResourceNamePrefix","createImplementation","GetPulumiResourceNamePrefix","GetProjectConfigService"],"mappings":";;;AAIO,MAAMA;IACT,YAAoBC,uBAA0D,CAAE;aAA5DA,uBAAuB,GAAvBA;IAA6D;IACjF,MAAM,UAAU;QACZ,MAAMC,gBAAgB,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO;QAEhE,IAAIC,2BAA2B;QAC/B,MAAM,CAACC,4BAA4B,GAAGF,cAAc,gBAAgB,CAChEG;QAGJ,IAAID,6BACAD,2BAA2BC,4BAA4B,MAAM,CAAC,MAAM;QAGxE,OAAOD;IACX;AACJ;AAEO,MAAMG,8BAA8BC,qBAAqB;IAC5D,aAAaC;IACb,gBAAgBR;IAChB,cAAc;QAACS;KAAwB;AAC3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetPulumiResourceNamePrefix.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GetPulumiResourceNamePrefix.js";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RefreshApp, GetApp, GetProject, GetPulumiService, ProjectSdkParamsService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultRefreshApp implements RefreshApp.Interface {
|
|
3
|
-
private getApp;
|
|
4
|
-
private getProject;
|
|
5
|
-
private pulumiSelectStackService;
|
|
6
|
-
private getPulumiService;
|
|
7
|
-
private projectSdkParamsService;
|
|
8
|
-
constructor(getApp: GetApp.Interface, getProject: GetProject.Interface, pulumiSelectStackService: PulumiSelectStackService.Interface, getPulumiService: GetPulumiService.Interface, projectSdkParamsService: ProjectSdkParamsService.Interface);
|
|
9
|
-
execute(params: RefreshApp.Params): Promise<{
|
|
10
|
-
pulumiProcess: import("@webiny/pulumi-sdk/Pulumi").PulumiProcess;
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
export declare const refreshApp: import("@webiny/di").Implementation<typeof DefaultRefreshApp>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetApp, GetProject, GetPulumiService, ProjectSdkParamsService, PulumiSelectStackService, RefreshApp } from "../../abstractions/index.js";
|
|
3
|
-
import { createEnvConfiguration, withEnv, withEnvVariant, withProjectName, withPulumiConfigPassphrase, withRegion } from "../../utils/env/index.js";
|
|
4
|
-
class DefaultRefreshApp {
|
|
5
|
-
constructor(getApp, getProject, pulumiSelectStackService, getPulumiService, projectSdkParamsService){
|
|
6
|
-
this.getApp = getApp;
|
|
7
|
-
this.getProject = getProject;
|
|
8
|
-
this.pulumiSelectStackService = pulumiSelectStackService;
|
|
9
|
-
this.getPulumiService = getPulumiService;
|
|
10
|
-
this.projectSdkParamsService = projectSdkParamsService;
|
|
11
|
-
}
|
|
12
|
-
async execute(params) {
|
|
13
|
-
const app = this.getApp.execute(params.app);
|
|
14
|
-
const sdkParams = this.projectSdkParamsService.get();
|
|
15
|
-
if (!sdkParams.env) throw new Error('Please specify environment, for example "dev".');
|
|
16
|
-
await this.pulumiSelectStackService.execute(app);
|
|
17
|
-
const pulumi = await this.getPulumiService.execute({
|
|
18
|
-
app
|
|
19
|
-
});
|
|
20
|
-
const project = await this.getProject.execute();
|
|
21
|
-
const env = createEnvConfiguration({
|
|
22
|
-
configurations: [
|
|
23
|
-
withRegion({
|
|
24
|
-
region: sdkParams.region
|
|
25
|
-
}),
|
|
26
|
-
withEnv({
|
|
27
|
-
env: sdkParams.env
|
|
28
|
-
}),
|
|
29
|
-
withEnvVariant({
|
|
30
|
-
variant: sdkParams.variant
|
|
31
|
-
}),
|
|
32
|
-
withPulumiConfigPassphrase(),
|
|
33
|
-
withProjectName({
|
|
34
|
-
project
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
pulumiProcess: pulumi.run({
|
|
40
|
-
command: "refresh",
|
|
41
|
-
args: {
|
|
42
|
-
yes: true
|
|
43
|
-
},
|
|
44
|
-
execa: {
|
|
45
|
-
env
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const refreshApp = createImplementation({
|
|
52
|
-
abstraction: RefreshApp,
|
|
53
|
-
implementation: DefaultRefreshApp,
|
|
54
|
-
dependencies: [
|
|
55
|
-
GetApp,
|
|
56
|
-
GetProject,
|
|
57
|
-
PulumiSelectStackService,
|
|
58
|
-
GetPulumiService,
|
|
59
|
-
ProjectSdkParamsService
|
|
60
|
-
]
|
|
61
|
-
});
|
|
62
|
-
export { DefaultRefreshApp, refreshApp };
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=RefreshApp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/RefreshApp/RefreshApp.js","sources":["../../../src/features/RefreshApp/RefreshApp.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n RefreshApp,\n GetApp,\n GetProject,\n GetPulumiService,\n ProjectSdkParamsService,\n PulumiSelectStackService\n} from \"~/abstractions/index.js\";\nimport {\n createEnvConfiguration,\n withEnv,\n withEnvVariant,\n withProjectName,\n withPulumiConfigPassphrase,\n withRegion\n} from \"~/utils/env/index.js\";\n\nexport class DefaultRefreshApp implements RefreshApp.Interface {\n constructor(\n private getApp: GetApp.Interface,\n private getProject: GetProject.Interface,\n private pulumiSelectStackService: PulumiSelectStackService.Interface,\n private getPulumiService: GetPulumiService.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: RefreshApp.Params) {\n const app = this.getApp.execute(params.app);\n const sdkParams = this.projectSdkParamsService.get();\n\n if (!sdkParams.env) {\n throw new Error(`Please specify environment, for example \"dev\".`);\n }\n\n await this.pulumiSelectStackService.execute(app);\n\n const pulumi = await this.getPulumiService.execute({ app });\n const project = await this.getProject.execute();\n\n const env = createEnvConfiguration({\n configurations: [\n withRegion({ region: sdkParams.region }),\n withEnv({ env: sdkParams.env }),\n withEnvVariant({ variant: sdkParams.variant }),\n withPulumiConfigPassphrase(),\n withProjectName({ project })\n ]\n });\n\n return {\n pulumiProcess: pulumi.run({\n command: \"refresh\",\n args: {\n yes: true\n },\n execa: { env }\n })\n };\n }\n}\n\nexport const refreshApp = createImplementation({\n abstraction: RefreshApp,\n implementation: DefaultRefreshApp,\n dependencies: [\n GetApp,\n GetProject,\n PulumiSelectStackService,\n GetPulumiService,\n ProjectSdkParamsService\n ]\n});\n"],"names":["DefaultRefreshApp","getApp","getProject","pulumiSelectStackService","getPulumiService","projectSdkParamsService","params","app","sdkParams","Error","pulumi","project","env","createEnvConfiguration","withRegion","withEnv","withEnvVariant","withPulumiConfigPassphrase","withProjectName","refreshApp","createImplementation","RefreshApp","GetApp","GetProject","PulumiSelectStackService","GetPulumiService","ProjectSdkParamsService"],"mappings":";;;AAkBO,MAAMA;IACT,YACYC,MAAwB,EACxBC,UAAgC,EAChCC,wBAA4D,EAC5DC,gBAA4C,EAC5CC,uBAA0D,CACpE;aALUJ,MAAM,GAANA;aACAC,UAAU,GAAVA;aACAC,wBAAwB,GAAxBA;aACAC,gBAAgB,GAAhBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAAyB,EAAE;QACrC,MAAMC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAACD,OAAO,GAAG;QAC1C,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAElD,IAAI,CAACA,UAAU,GAAG,EACd,MAAM,IAAIC,MAAM;QAGpB,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACF;QAE5C,MAAMG,SAAS,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAEH;QAAI;QACzD,MAAMI,UAAU,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO;QAE7C,MAAMC,MAAMC,uBAAuB;YAC/B,gBAAgB;gBACZC,WAAW;oBAAE,QAAQN,UAAU,MAAM;gBAAC;gBACtCO,QAAQ;oBAAE,KAAKP,UAAU,GAAG;gBAAC;gBAC7BQ,eAAe;oBAAE,SAASR,UAAU,OAAO;gBAAC;gBAC5CS;gBACAC,gBAAgB;oBAAEP;gBAAQ;aAC7B;QACL;QAEA,OAAO;YACH,eAAeD,OAAO,GAAG,CAAC;gBACtB,SAAS;gBACT,MAAM;oBACF,KAAK;gBACT;gBACA,OAAO;oBAAEE;gBAAI;YACjB;QACJ;IACJ;AACJ;AAEO,MAAMO,aAAaC,qBAAqB;IAC3C,aAAaC;IACb,gBAAgBrB;IAChB,cAAc;QACVsB;QACAC;QACAC;QACAC;QACAC;KACH;AACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RefreshApp.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RefreshApp.js";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RunPulumiCommand, GetApp, GetProject, GetPulumiService, ProjectSdkParamsService, PulumiSelectStackService } from "../../abstractions/index.js";
|
|
2
|
-
export declare class DefaultRunPulumiCommand implements RunPulumiCommand.Interface {
|
|
3
|
-
private getApp;
|
|
4
|
-
private getProject;
|
|
5
|
-
private pulumiSelectStackService;
|
|
6
|
-
private getPulumiService;
|
|
7
|
-
private projectSdkParamsService;
|
|
8
|
-
constructor(getApp: GetApp.Interface, getProject: GetProject.Interface, pulumiSelectStackService: PulumiSelectStackService.Interface, getPulumiService: GetPulumiService.Interface, projectSdkParamsService: ProjectSdkParamsService.Interface);
|
|
9
|
-
execute(params: RunPulumiCommand.Params): Promise<{
|
|
10
|
-
pulumiProcess: import("@webiny/pulumi-sdk/Pulumi").PulumiProcess;
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
export declare const runPulumiCommand: import("@webiny/di").Implementation<typeof DefaultRunPulumiCommand>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/di";
|
|
2
|
-
import { GetApp, GetProject, GetPulumiService, ProjectSdkParamsService, PulumiSelectStackService, RunPulumiCommand } from "../../abstractions/index.js";
|
|
3
|
-
import { createEnvConfiguration, withEnv, withEnvVariant, withProjectName, withPulumiConfigPassphrase, withRegion } from "../../utils/env/index.js";
|
|
4
|
-
class DefaultRunPulumiCommand {
|
|
5
|
-
constructor(getApp, getProject, pulumiSelectStackService, getPulumiService, projectSdkParamsService){
|
|
6
|
-
this.getApp = getApp;
|
|
7
|
-
this.getProject = getProject;
|
|
8
|
-
this.pulumiSelectStackService = pulumiSelectStackService;
|
|
9
|
-
this.getPulumiService = getPulumiService;
|
|
10
|
-
this.projectSdkParamsService = projectSdkParamsService;
|
|
11
|
-
}
|
|
12
|
-
async execute(params) {
|
|
13
|
-
const app = this.getApp.execute(params.app);
|
|
14
|
-
const sdkParams = this.projectSdkParamsService.get();
|
|
15
|
-
if (!sdkParams.env) throw new Error('Please specify environment, for example "dev".');
|
|
16
|
-
await this.pulumiSelectStackService.execute(app);
|
|
17
|
-
const pulumi = await this.getPulumiService.execute({
|
|
18
|
-
app
|
|
19
|
-
});
|
|
20
|
-
const project = this.getProject.execute();
|
|
21
|
-
const env = createEnvConfiguration({
|
|
22
|
-
configurations: [
|
|
23
|
-
withRegion({
|
|
24
|
-
region: sdkParams.region
|
|
25
|
-
}),
|
|
26
|
-
withEnv({
|
|
27
|
-
env: sdkParams.env
|
|
28
|
-
}),
|
|
29
|
-
withEnvVariant({
|
|
30
|
-
variant: sdkParams.variant
|
|
31
|
-
}),
|
|
32
|
-
withPulumiConfigPassphrase(),
|
|
33
|
-
withProjectName({
|
|
34
|
-
project
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
pulumiProcess: pulumi.run({
|
|
40
|
-
command: params.command,
|
|
41
|
-
execa: {
|
|
42
|
-
env
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const runPulumiCommand = createImplementation({
|
|
49
|
-
abstraction: RunPulumiCommand,
|
|
50
|
-
implementation: DefaultRunPulumiCommand,
|
|
51
|
-
dependencies: [
|
|
52
|
-
GetApp,
|
|
53
|
-
GetProject,
|
|
54
|
-
PulumiSelectStackService,
|
|
55
|
-
GetPulumiService,
|
|
56
|
-
ProjectSdkParamsService
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
export { DefaultRunPulumiCommand, runPulumiCommand };
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=RunPulumiCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/RunPulumiCommand/RunPulumiCommand.js","sources":["../../../src/features/RunPulumiCommand/RunPulumiCommand.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n RunPulumiCommand,\n GetApp,\n GetProject,\n GetPulumiService,\n ProjectSdkParamsService,\n PulumiSelectStackService\n} from \"~/abstractions/index.js\";\nimport {\n createEnvConfiguration,\n withEnv,\n withEnvVariant,\n withProjectName,\n withPulumiConfigPassphrase,\n withRegion\n} from \"~/utils/env/index.js\";\n\nexport class DefaultRunPulumiCommand implements RunPulumiCommand.Interface {\n constructor(\n private getApp: GetApp.Interface,\n private getProject: GetProject.Interface,\n private pulumiSelectStackService: PulumiSelectStackService.Interface,\n private getPulumiService: GetPulumiService.Interface,\n private projectSdkParamsService: ProjectSdkParamsService.Interface\n ) {}\n\n async execute(params: RunPulumiCommand.Params) {\n const app = this.getApp.execute(params.app);\n const sdkParams = this.projectSdkParamsService.get();\n\n if (!sdkParams.env) {\n throw new Error(`Please specify environment, for example \"dev\".`);\n }\n\n await this.pulumiSelectStackService.execute(app);\n\n const pulumi = await this.getPulumiService.execute({ app });\n const project = this.getProject.execute();\n\n const env = createEnvConfiguration({\n configurations: [\n withRegion({ region: sdkParams.region }),\n withEnv({ env: sdkParams.env }),\n withEnvVariant({ variant: sdkParams.variant }),\n withPulumiConfigPassphrase(),\n withProjectName({ project })\n ]\n });\n\n return {\n pulumiProcess: pulumi.run({\n command: params.command as string[],\n execa: { env }\n })\n };\n }\n}\n\nexport const runPulumiCommand = createImplementation({\n abstraction: RunPulumiCommand,\n implementation: DefaultRunPulumiCommand,\n dependencies: [\n GetApp,\n GetProject,\n PulumiSelectStackService,\n GetPulumiService,\n ProjectSdkParamsService\n ]\n});\n"],"names":["DefaultRunPulumiCommand","getApp","getProject","pulumiSelectStackService","getPulumiService","projectSdkParamsService","params","app","sdkParams","Error","pulumi","project","env","createEnvConfiguration","withRegion","withEnv","withEnvVariant","withPulumiConfigPassphrase","withProjectName","runPulumiCommand","createImplementation","RunPulumiCommand","GetApp","GetProject","PulumiSelectStackService","GetPulumiService","ProjectSdkParamsService"],"mappings":";;;AAkBO,MAAMA;IACT,YACYC,MAAwB,EACxBC,UAAgC,EAChCC,wBAA4D,EAC5DC,gBAA4C,EAC5CC,uBAA0D,CACpE;aALUJ,MAAM,GAANA;aACAC,UAAU,GAAVA;aACAC,wBAAwB,GAAxBA;aACAC,gBAAgB,GAAhBA;aACAC,uBAAuB,GAAvBA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAE;QAC3C,MAAMC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAACD,OAAO,GAAG;QAC1C,MAAME,YAAY,IAAI,CAAC,uBAAuB,CAAC,GAAG;QAElD,IAAI,CAACA,UAAU,GAAG,EACd,MAAM,IAAIC,MAAM;QAGpB,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACF;QAE5C,MAAMG,SAAS,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAEH;QAAI;QACzD,MAAMI,UAAU,IAAI,CAAC,UAAU,CAAC,OAAO;QAEvC,MAAMC,MAAMC,uBAAuB;YAC/B,gBAAgB;gBACZC,WAAW;oBAAE,QAAQN,UAAU,MAAM;gBAAC;gBACtCO,QAAQ;oBAAE,KAAKP,UAAU,GAAG;gBAAC;gBAC7BQ,eAAe;oBAAE,SAASR,UAAU,OAAO;gBAAC;gBAC5CS;gBACAC,gBAAgB;oBAAEP;gBAAQ;aAC7B;QACL;QAEA,OAAO;YACH,eAAeD,OAAO,GAAG,CAAC;gBACtB,SAASJ,OAAO,OAAO;gBACvB,OAAO;oBAAEM;gBAAI;YACjB;QACJ;IACJ;AACJ;AAEO,MAAMO,mBAAmBC,qBAAqB;IACjD,aAAaC;IACb,gBAAgBrB;IAChB,cAAc;QACVsB;QACAC;QACAC;QACAC;QACAC;KACH;AACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RunPulumiCommand.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RunPulumiCommand.js";
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import mqtt from "mqtt";
|
|
2
|
-
import type { ListAppLambdaFunctionsService } from "../../abstractions/index.js";
|
|
3
|
-
export interface IInitInvocationForwardingParams {
|
|
4
|
-
iotEndpoint: string;
|
|
5
|
-
iotEndpointTopic: string;
|
|
6
|
-
sessionId: number;
|
|
7
|
-
functionsList: ListAppLambdaFunctionsService.Result;
|
|
8
|
-
}
|
|
9
|
-
export declare const initInvocationForwarding: ({ iotEndpoint, iotEndpointTopic, sessionId, functionsList }: IInitInvocationForwardingParams) => Promise<mqtt.MqttClient>;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { Worker } from "worker_threads";
|
|
3
|
-
import { compress, decompress } from "@webiny/utils/features/compression/legacy/gzip.js";
|
|
4
|
-
import mqtt from "mqtt";
|
|
5
|
-
const WEBINY_WATCH_FN_INVOCATION_EVENT = "webiny.watch.functionInvocation";
|
|
6
|
-
const WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT = "webiny.watch.functionInvocationResult";
|
|
7
|
-
const WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT = "webiny.watch.functionInvocationHandshake";
|
|
8
|
-
const WATCH_WORKER_PATH = path.join(import.meta.dirname, "localInvocationWorker.js");
|
|
9
|
-
const jsonStringifyAndCompress = (input)=>{
|
|
10
|
-
const jsonStringInput = JSON.stringify(input);
|
|
11
|
-
return compress(jsonStringInput);
|
|
12
|
-
};
|
|
13
|
-
const decompressAndJsonParse = async (input)=>{
|
|
14
|
-
const inputBuffer = Buffer.from(input);
|
|
15
|
-
const jsonStringResult = await decompress(inputBuffer);
|
|
16
|
-
const value = jsonStringResult?.toString ? jsonStringResult.toString("utf-8") : jsonStringResult;
|
|
17
|
-
return JSON.parse(value);
|
|
18
|
-
};
|
|
19
|
-
const initInvocationForwarding = async ({ iotEndpoint, iotEndpointTopic, sessionId, functionsList })=>{
|
|
20
|
-
const client = await mqtt.connectAsync(iotEndpoint);
|
|
21
|
-
await client.subscribeAsync(iotEndpointTopic);
|
|
22
|
-
client.on("message", async (_, message)=>{
|
|
23
|
-
const payload = JSON.parse(message.toString());
|
|
24
|
-
if (payload.eventType !== WEBINY_WATCH_FN_INVOCATION_EVENT) return;
|
|
25
|
-
if (payload.data.sessionId !== sessionId) return;
|
|
26
|
-
await client.publish(iotEndpointTopic, JSON.stringify({
|
|
27
|
-
eventType: WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT,
|
|
28
|
-
eventId: new Date().getTime(),
|
|
29
|
-
data: {
|
|
30
|
-
originalEventId: payload.eventId,
|
|
31
|
-
compressedResult: null,
|
|
32
|
-
compressedError: null
|
|
33
|
-
}
|
|
34
|
-
}));
|
|
35
|
-
const invokedLambdaFunction = functionsList.list.find((lambdaFunction)=>lambdaFunction.name === payload.data.functionName);
|
|
36
|
-
if (!invokedLambdaFunction) throw new Error(`Lambda function "${payload.data.functionName}" not found.`);
|
|
37
|
-
try {
|
|
38
|
-
const result = await new Promise(async (resolve, reject)=>{
|
|
39
|
-
const worker = new Worker(WATCH_WORKER_PATH, {
|
|
40
|
-
env: {
|
|
41
|
-
...payload.data.env,
|
|
42
|
-
WEBINY_WATCH_LOCAL_INVOCATION: "1"
|
|
43
|
-
},
|
|
44
|
-
workerData: {
|
|
45
|
-
handler: {
|
|
46
|
-
path: invokedLambdaFunction.path,
|
|
47
|
-
args: await decompressAndJsonParse(payload.data.compressedArgs)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const { default: exitHook } = await import("exit-hook");
|
|
52
|
-
const unsubscribeExitHook = exitHook(async ()=>{
|
|
53
|
-
await worker.terminate();
|
|
54
|
-
});
|
|
55
|
-
worker.on("message", (message)=>{
|
|
56
|
-
unsubscribeExitHook();
|
|
57
|
-
const { success, result, error } = JSON.parse(message);
|
|
58
|
-
if (success) resolve(result);
|
|
59
|
-
else reject(error);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
await client.publish(iotEndpointTopic, JSON.stringify({
|
|
63
|
-
eventType: WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT,
|
|
64
|
-
eventId: new Date().getTime(),
|
|
65
|
-
data: {
|
|
66
|
-
originalEventId: payload.eventId,
|
|
67
|
-
compressedResult: await jsonStringifyAndCompress(result),
|
|
68
|
-
compressedError: null
|
|
69
|
-
}
|
|
70
|
-
}));
|
|
71
|
-
} catch (error) {
|
|
72
|
-
console.log(error);
|
|
73
|
-
await client.publish(iotEndpointTopic, JSON.stringify({
|
|
74
|
-
eventType: WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT,
|
|
75
|
-
eventId: new Date().getTime(),
|
|
76
|
-
data: {
|
|
77
|
-
originalEventId: payload.eventId,
|
|
78
|
-
compressedResult: null,
|
|
79
|
-
compressedError: await jsonStringifyAndCompress({
|
|
80
|
-
message: error.message,
|
|
81
|
-
stack: error.stack
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
return client;
|
|
88
|
-
};
|
|
89
|
-
export { initInvocationForwarding };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=initInvocationForwarding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/Watch/initInvocationForwarding.js","sources":["../../../src/features/Watch/initInvocationForwarding.ts"],"sourcesContent":["import path from \"path\";\nimport { Worker } from \"worker_threads\";\nimport { compress, decompress } from \"@webiny/utils/features/compression/legacy/gzip.js\";\nimport mqtt from \"mqtt\";\nimport type { ListAppLambdaFunctionsService } from \"~/abstractions/index.js\";\n\nconst WEBINY_WATCH_FN_INVOCATION_EVENT = \"webiny.watch.functionInvocation\";\nconst WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT = \"webiny.watch.functionInvocationResult\";\nconst WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT = \"webiny.watch.functionInvocationHandshake\";\n\nconst WATCH_WORKER_PATH = path.join(import.meta.dirname, \"localInvocationWorker.js\");\n\nconst jsonStringifyAndCompress = (input: Record<string, any>): Promise<Buffer> => {\n const jsonStringInput = JSON.stringify(input);\n return compress(jsonStringInput);\n};\n\nconst decompressAndJsonParse = async (input: string) => {\n const inputBuffer = Buffer.from(input);\n const jsonStringResult = await decompress(inputBuffer);\n\n const value = jsonStringResult?.toString\n ? jsonStringResult.toString(\"utf-8\")\n : (jsonStringResult as unknown as string);\n\n return JSON.parse(value);\n};\n\nexport interface IInitInvocationForwardingParams {\n iotEndpoint: string;\n iotEndpointTopic: string;\n sessionId: number;\n functionsList: ListAppLambdaFunctionsService.Result;\n}\n\nexport const initInvocationForwarding = async ({\n iotEndpoint,\n iotEndpointTopic,\n sessionId,\n functionsList\n}: IInitInvocationForwardingParams) => {\n const client = await mqtt.connectAsync(iotEndpoint);\n\n await client.subscribeAsync(iotEndpointTopic);\n\n client.on(\"message\", async (_, message) => {\n const payload = JSON.parse(message.toString());\n\n if (payload.eventType !== WEBINY_WATCH_FN_INVOCATION_EVENT) {\n return;\n }\n\n if (payload.data.sessionId !== sessionId) {\n return;\n }\n\n await client.publish(\n iotEndpointTopic,\n JSON.stringify({\n eventType: WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT,\n eventId: new Date().getTime(),\n data: {\n originalEventId: payload.eventId,\n compressedResult: null,\n compressedError: null\n }\n })\n );\n\n const invokedLambdaFunction = functionsList.list.find(\n lambdaFunction => lambdaFunction.name === payload.data.functionName\n );\n if (!invokedLambdaFunction) {\n throw new Error(`Lambda function \"${payload.data.functionName}\" not found.`);\n }\n\n try {\n const result = await new Promise<Record<string, any>>(async (resolve, reject) => {\n const worker = new Worker(WATCH_WORKER_PATH, {\n env: { ...payload.data.env, WEBINY_WATCH_LOCAL_INVOCATION: \"1\" },\n workerData: {\n handler: {\n path: invokedLambdaFunction.path,\n args: await decompressAndJsonParse(payload.data.compressedArgs)\n }\n }\n });\n\n const { default: exitHook } = await import(\n /* webpackChunkName: \"exit-hook\" */ \"exit-hook\"\n );\n\n const unsubscribeExitHook = exitHook(async () => {\n await worker.terminate();\n });\n\n worker.on(\"message\", message => {\n unsubscribeExitHook();\n\n const { success, result, error } = JSON.parse(message);\n if (success) {\n resolve(result);\n } else {\n reject(error);\n }\n });\n });\n\n await client.publish(\n iotEndpointTopic,\n JSON.stringify({\n eventType: WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT,\n eventId: new Date().getTime(),\n data: {\n originalEventId: payload.eventId,\n compressedResult: await jsonStringifyAndCompress(result),\n compressedError: null\n }\n })\n );\n } catch (error) {\n console.log(error);\n await client.publish(\n iotEndpointTopic,\n JSON.stringify({\n eventType: WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT,\n eventId: new Date().getTime(),\n data: {\n originalEventId: payload.eventId,\n compressedResult: null,\n compressedError: await jsonStringifyAndCompress({\n message: error.message,\n stack: error.stack\n })\n }\n })\n );\n }\n });\n\n return client;\n};\n"],"names":["WEBINY_WATCH_FN_INVOCATION_EVENT","WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT","WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT","WATCH_WORKER_PATH","path","jsonStringifyAndCompress","input","jsonStringInput","JSON","compress","decompressAndJsonParse","inputBuffer","Buffer","jsonStringResult","decompress","value","initInvocationForwarding","iotEndpoint","iotEndpointTopic","sessionId","functionsList","client","mqtt","_","message","payload","Date","invokedLambdaFunction","lambdaFunction","Error","result","Promise","resolve","reject","worker","Worker","exitHook","unsubscribeExitHook","success","error","console"],"mappings":";;;;AAMA,MAAMA,mCAAmC;AACzC,MAAMC,0CAA0C;AAChD,MAAMC,6CAA6C;AAEnD,MAAMC,oBAAoBC,KAAK,IAAI,CAAC,YAAY,OAAO,EAAE;AAEzD,MAAMC,2BAA2B,CAACC;IAC9B,MAAMC,kBAAkBC,KAAK,SAAS,CAACF;IACvC,OAAOG,SAASF;AACpB;AAEA,MAAMG,yBAAyB,OAAOJ;IAClC,MAAMK,cAAcC,OAAO,IAAI,CAACN;IAChC,MAAMO,mBAAmB,MAAMC,WAAWH;IAE1C,MAAMI,QAAQF,kBAAkB,WAC1BA,iBAAiB,QAAQ,CAAC,WACzBA;IAEP,OAAOL,KAAK,KAAK,CAACO;AACtB;AASO,MAAMC,2BAA2B,OAAO,EAC3CC,WAAW,EACXC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,EACiB;IAC9B,MAAMC,SAAS,MAAMC,KAAK,YAAY,CAACL;IAEvC,MAAMI,OAAO,cAAc,CAACH;IAE5BG,OAAO,EAAE,CAAC,WAAW,OAAOE,GAAGC;QAC3B,MAAMC,UAAUjB,KAAK,KAAK,CAACgB,QAAQ,QAAQ;QAE3C,IAAIC,QAAQ,SAAS,KAAKzB,kCACtB;QAGJ,IAAIyB,QAAQ,IAAI,CAAC,SAAS,KAAKN,WAC3B;QAGJ,MAAME,OAAO,OAAO,CAChBH,kBACAV,KAAK,SAAS,CAAC;YACX,WAAWN;YACX,SAAS,IAAIwB,OAAO,OAAO;YAC3B,MAAM;gBACF,iBAAiBD,QAAQ,OAAO;gBAChC,kBAAkB;gBAClB,iBAAiB;YACrB;QACJ;QAGJ,MAAME,wBAAwBP,cAAc,IAAI,CAAC,IAAI,CACjDQ,CAAAA,iBAAkBA,eAAe,IAAI,KAAKH,QAAQ,IAAI,CAAC,YAAY;QAEvE,IAAI,CAACE,uBACD,MAAM,IAAIE,MAAM,CAAC,iBAAiB,EAAEJ,QAAQ,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;QAG/E,IAAI;YACA,MAAMK,SAAS,MAAM,IAAIC,QAA6B,OAAOC,SAASC;gBAClE,MAAMC,SAAS,IAAIC,OAAOhC,mBAAmB;oBACzC,KAAK;wBAAE,GAAGsB,QAAQ,IAAI,CAAC,GAAG;wBAAE,+BAA+B;oBAAI;oBAC/D,YAAY;wBACR,SAAS;4BACL,MAAME,sBAAsB,IAAI;4BAChC,MAAM,MAAMjB,uBAAuBe,QAAQ,IAAI,CAAC,cAAc;wBAClE;oBACJ;gBACJ;gBAEA,MAAM,EAAE,SAASW,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAN;gBAIpC,MAAMC,sBAAsBD,SAAS;oBACjC,MAAMF,OAAO,SAAS;gBAC1B;gBAEAA,OAAO,EAAE,CAAC,WAAWV,CAAAA;oBACjBa;oBAEA,MAAM,EAAEC,OAAO,EAAER,MAAM,EAAES,KAAK,EAAE,GAAG/B,KAAK,KAAK,CAACgB;oBAC9C,IAAIc,SACAN,QAAQF;yBAERG,OAAOM;gBAEf;YACJ;YAEA,MAAMlB,OAAO,OAAO,CAChBH,kBACAV,KAAK,SAAS,CAAC;gBACX,WAAWP;gBACX,SAAS,IAAIyB,OAAO,OAAO;gBAC3B,MAAM;oBACF,iBAAiBD,QAAQ,OAAO;oBAChC,kBAAkB,MAAMpB,yBAAyByB;oBACjD,iBAAiB;gBACrB;YACJ;QAER,EAAE,OAAOS,OAAO;YACZC,QAAQ,GAAG,CAACD;YACZ,MAAMlB,OAAO,OAAO,CAChBH,kBACAV,KAAK,SAAS,CAAC;gBACX,WAAWP;gBACX,SAAS,IAAIyB,OAAO,OAAO;gBAC3B,MAAM;oBACF,iBAAiBD,QAAQ,OAAO;oBAChC,kBAAkB;oBAClB,iBAAiB,MAAMpB,yBAAyB;wBAC5C,SAASkC,MAAM,OAAO;wBACtB,OAAOA,MAAM,KAAK;oBACtB;gBACJ;YACJ;QAER;IACJ;IAEA,OAAOlB;AACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { parentPort, workerData } from "worker_threads";
|
|
2
|
-
import { pathToFileURL } from "node:url";
|
|
3
|
-
import node_path from "node:path";
|
|
4
|
-
const { handler: handlerParams } = workerData;
|
|
5
|
-
try {
|
|
6
|
-
const handlerPath = handlerParams.path;
|
|
7
|
-
const importSpecifier = node_path.isAbsolute(handlerPath) ? pathToFileURL(handlerPath).href : handlerPath;
|
|
8
|
-
const { handler } = await import(importSpecifier);
|
|
9
|
-
const result = await handler(...handlerParams.args);
|
|
10
|
-
parentPort.postMessage(JSON.stringify({
|
|
11
|
-
success: true,
|
|
12
|
-
result,
|
|
13
|
-
error: null
|
|
14
|
-
}));
|
|
15
|
-
} catch (error) {
|
|
16
|
-
const { message, code, data, stack } = error;
|
|
17
|
-
parentPort.postMessage(JSON.stringify({
|
|
18
|
-
success: false,
|
|
19
|
-
result: null,
|
|
20
|
-
error: {
|
|
21
|
-
message,
|
|
22
|
-
code,
|
|
23
|
-
data,
|
|
24
|
-
stack
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
} finally{
|
|
28
|
-
process.exit(0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=localInvocationWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/Watch/localInvocationWorker.js","sources":["../../../src/features/Watch/localInvocationWorker.ts"],"sourcesContent":["import { parentPort, workerData } from \"worker_threads\";\nimport { pathToFileURL } from \"node:url\";\nimport path from \"node:path\";\n\nconst { handler: handlerParams } = workerData;\n\ntry {\n const handlerPath = handlerParams.path;\n const importSpecifier = path.isAbsolute(handlerPath)\n ? pathToFileURL(handlerPath).href\n : handlerPath;\n const { handler } = await import(importSpecifier);\n\n const result = await handler(...handlerParams.args);\n parentPort!.postMessage(JSON.stringify({ success: true, result, error: null }));\n} catch (error) {\n const { message, code, data, stack } = error;\n\n parentPort!.postMessage(\n JSON.stringify({\n success: false,\n result: null,\n error: { message, code, data, stack }\n })\n );\n} finally {\n process.exit(0);\n}\n"],"names":["handlerParams","workerData","handlerPath","importSpecifier","path","pathToFileURL","handler","result","parentPort","JSON","error","message","code","data","stack","process"],"mappings":";;;AAIA,MAAM,EAAE,SAASA,aAAa,EAAE,GAAGC;AAEnC,IAAI;IACA,MAAMC,cAAcF,cAAc,IAAI;IACtC,MAAMG,kBAAkBC,UAAAA,UAAe,CAACF,eAClCG,cAAcH,aAAa,IAAI,GAC/BA;IACN,MAAM,EAAEI,OAAO,EAAE,GAAG,MAAM,MAAM,CAACH;IAEjC,MAAMI,SAAS,MAAMD,WAAWN,cAAc,IAAI;IAClDQ,WAAAA,WAAuB,CAACC,KAAK,SAAS,CAAC;QAAE,SAAS;QAAMF;QAAQ,OAAO;IAAK;AAChF,EAAE,OAAOG,OAAO;IACZ,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGJ;IAEvCF,WAAAA,WAAuB,CACnBC,KAAK,SAAS,CAAC;QACX,SAAS;QACT,QAAQ;QACR,OAAO;YAAEE;YAASC;YAAMC;YAAMC;QAAM;IACxC;AAER,SAAU;IACNC,QAAQ,IAAI,CAAC;AACjB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AdminAfterDeploy } from "../../../abstractions/index.js";
|
|
2
|
-
export declare class CompositeAdminAfterDeploy implements AdminAfterDeploy.Interface {
|
|
3
|
-
private AdminAfterDeploy;
|
|
4
|
-
constructor(AdminAfterDeploy: AdminAfterDeploy.Interface[]);
|
|
5
|
-
execute(params: AdminAfterDeploy.Params): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export declare const adminAfterDeploy: import("@webiny/di").Implementation<typeof CompositeAdminAfterDeploy>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createComposite } from "@webiny/di";
|
|
2
|
-
import { AdminAfterDeploy as index_js_AdminAfterDeploy } from "../../../abstractions/index.js";
|
|
3
|
-
class CompositeAdminAfterDeploy {
|
|
4
|
-
constructor(AdminAfterDeploy){
|
|
5
|
-
this.AdminAfterDeploy = AdminAfterDeploy;
|
|
6
|
-
}
|
|
7
|
-
async execute(params) {
|
|
8
|
-
for (const beforeBuild of this.AdminAfterDeploy)await beforeBuild.execute(params);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
const adminAfterDeploy = createComposite({
|
|
12
|
-
abstraction: index_js_AdminAfterDeploy,
|
|
13
|
-
implementation: CompositeAdminAfterDeploy,
|
|
14
|
-
dependencies: [
|
|
15
|
-
[
|
|
16
|
-
index_js_AdminAfterDeploy,
|
|
17
|
-
{
|
|
18
|
-
multiple: true
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
});
|
|
23
|
-
export { CompositeAdminAfterDeploy, adminAfterDeploy };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=AdminBeforeBuild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/hooks/AdminAfterDeploy/AdminBeforeBuild.js","sources":["../../../../src/features/hooks/AdminAfterDeploy/AdminBeforeBuild.ts"],"sourcesContent":["import { createComposite } from \"@webiny/di\";\nimport { AdminAfterDeploy } from \"~/abstractions/index.js\";\n\nexport class CompositeAdminAfterDeploy implements AdminAfterDeploy.Interface {\n constructor(private AdminAfterDeploy: AdminAfterDeploy.Interface[]) {}\n\n async execute(params: AdminAfterDeploy.Params) {\n for (const beforeBuild of this.AdminAfterDeploy) {\n await beforeBuild.execute(params);\n }\n }\n}\n\nexport const adminAfterDeploy = createComposite({\n abstraction: AdminAfterDeploy,\n implementation: CompositeAdminAfterDeploy,\n dependencies: [[AdminAfterDeploy, { multiple: true }]]\n});\n"],"names":["CompositeAdminAfterDeploy","AdminAfterDeploy","params","beforeBuild","adminAfterDeploy","createComposite"],"mappings":";;AAGO,MAAMA;IACT,YAAoBC,gBAA8C,CAAE;aAAhDA,gBAAgB,GAAhBA;IAAiD;IAErE,MAAM,QAAQC,MAA+B,EAAE;QAC3C,KAAK,MAAMC,eAAe,IAAI,CAAC,gBAAgB,CAC3C,MAAMA,YAAY,OAAO,CAACD;IAElC;AACJ;AAEO,MAAME,mBAAmBC,gBAAgB;IAC5C,aAAaJ;IACb,gBAAgBD;IAChB,cAAc;QAAC;YAACC;YAAkB;gBAAE,UAAU;YAAK;SAAE;KAAC;AAC1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./AdminBeforeBuild.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./AdminBeforeBuild.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AdminBeforeDeploy } from "../../../abstractions/index.js";
|
|
2
|
-
export declare class CompositeAdminBeforeDeploy implements AdminBeforeDeploy.Interface {
|
|
3
|
-
private AdminBeforeDeploy;
|
|
4
|
-
constructor(AdminBeforeDeploy: AdminBeforeDeploy.Interface[]);
|
|
5
|
-
execute(params: AdminBeforeDeploy.Params): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export declare const adminBeforeDeploy: import("@webiny/di").Implementation<typeof CompositeAdminBeforeDeploy>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createComposite } from "@webiny/di";
|
|
2
|
-
import { AdminBeforeDeploy as index_js_AdminBeforeDeploy } from "../../../abstractions/index.js";
|
|
3
|
-
class CompositeAdminBeforeDeploy {
|
|
4
|
-
constructor(AdminBeforeDeploy){
|
|
5
|
-
this.AdminBeforeDeploy = AdminBeforeDeploy;
|
|
6
|
-
}
|
|
7
|
-
async execute(params) {
|
|
8
|
-
for (const beforeDeploy of this.AdminBeforeDeploy)await beforeDeploy.execute(params);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
const adminBeforeDeploy = createComposite({
|
|
12
|
-
abstraction: index_js_AdminBeforeDeploy,
|
|
13
|
-
implementation: CompositeAdminBeforeDeploy,
|
|
14
|
-
dependencies: [
|
|
15
|
-
[
|
|
16
|
-
index_js_AdminBeforeDeploy,
|
|
17
|
-
{
|
|
18
|
-
multiple: true
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
});
|
|
23
|
-
export { CompositeAdminBeforeDeploy, adminBeforeDeploy };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=AdminBeforeDeploy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js","sources":["../../../../src/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.ts"],"sourcesContent":["import { createComposite } from \"@webiny/di\";\nimport { AdminBeforeDeploy } from \"~/abstractions/index.js\";\n\nexport class CompositeAdminBeforeDeploy implements AdminBeforeDeploy.Interface {\n constructor(private AdminBeforeDeploy: AdminBeforeDeploy.Interface[]) {}\n\n async execute(params: AdminBeforeDeploy.Params) {\n for (const beforeDeploy of this.AdminBeforeDeploy) {\n await beforeDeploy.execute(params);\n }\n }\n}\n\nexport const adminBeforeDeploy = createComposite({\n abstraction: AdminBeforeDeploy,\n implementation: CompositeAdminBeforeDeploy,\n dependencies: [[AdminBeforeDeploy, { multiple: true }]]\n});\n"],"names":["CompositeAdminBeforeDeploy","AdminBeforeDeploy","params","beforeDeploy","adminBeforeDeploy","createComposite"],"mappings":";;AAGO,MAAMA;IACT,YAAoBC,iBAAgD,CAAE;aAAlDA,iBAAiB,GAAjBA;IAAmD;IAEvE,MAAM,QAAQC,MAAgC,EAAE;QAC5C,KAAK,MAAMC,gBAAgB,IAAI,CAAC,iBAAiB,CAC7C,MAAMA,aAAa,OAAO,CAACD;IAEnC;AACJ;AAEO,MAAME,oBAAoBC,gBAAgB;IAC7C,aAAaJ;IACb,gBAAgBD;IAChB,cAAc;QAAC;YAACC;YAAmB;gBAAE,UAAU;YAAK;SAAE;KAAC;AAC3D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./AdminBeforeDeploy.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./AdminBeforeDeploy.js";
|