@webiny/project 6.3.0 → 6.4.0-beta.0
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/GracefulError.js +13 -15
- package/GracefulError.js.map +1 -1
- package/ProjectError.js +11 -13
- package/ProjectError.js.map +1 -1
- package/ProjectSdk.js +113 -129
- package/ProjectSdk.js.map +1 -1
- package/abstractions/createAbstraction.js +3 -2
- package/abstractions/createAbstraction.js.map +1 -1
- package/abstractions/features/BuildApp.js +2 -1
- package/abstractions/features/BuildApp.js.map +1 -1
- package/abstractions/features/BuildExtension.js +2 -1
- package/abstractions/features/BuildExtension.js.map +1 -1
- package/abstractions/features/DeployApp.js +2 -1
- package/abstractions/features/DeployApp.js.map +1 -1
- package/abstractions/features/DestroyApp.js +2 -1
- package/abstractions/features/DestroyApp.js.map +1 -1
- package/abstractions/features/ExportStack.js +2 -1
- package/abstractions/features/ExportStack.js.map +1 -1
- package/abstractions/features/GetApp.js +2 -1
- package/abstractions/features/GetApp.js.map +1 -1
- package/abstractions/features/GetAppOutput.js +2 -1
- package/abstractions/features/GetAppOutput.js.map +1 -1
- package/abstractions/features/GetAppStackOutput.js +2 -6
- package/abstractions/features/GetAppStackOutput.js.map +1 -1
- package/abstractions/features/GetFeatureFlags.js +2 -1
- package/abstractions/features/GetFeatureFlags.js.map +1 -1
- package/abstractions/features/GetLogger.js +2 -1
- package/abstractions/features/GetLogger.js.map +1 -1
- package/abstractions/features/GetProductionEnvironments.js +2 -1
- package/abstractions/features/GetProductionEnvironments.js.map +1 -1
- package/abstractions/features/GetProject.js +2 -1
- package/abstractions/features/GetProject.js.map +1 -1
- package/abstractions/features/GetProjectConfig.js +2 -1
- package/abstractions/features/GetProjectConfig.js.map +1 -1
- package/abstractions/features/GetProjectInfo.js +2 -1
- package/abstractions/features/GetProjectInfo.js.map +1 -1
- package/abstractions/features/GetPulumiResourceNamePrefix.js +2 -1
- package/abstractions/features/GetPulumiResourceNamePrefix.js.map +1 -1
- package/abstractions/features/InstallExtension.js +2 -1
- package/abstractions/features/InstallExtension.js.map +1 -1
- package/abstractions/features/IsCi.js +2 -1
- package/abstractions/features/IsCi.js.map +1 -1
- package/abstractions/features/IsTelemetryEnabled.js +2 -1
- package/abstractions/features/IsTelemetryEnabled.js.map +1 -1
- package/abstractions/features/IsWcpEnabled.js +2 -1
- package/abstractions/features/IsWcpEnabled.js.map +1 -1
- package/abstractions/features/IsWebinyJsRepo.js +2 -1
- package/abstractions/features/IsWebinyJsRepo.js.map +1 -1
- package/abstractions/features/RefreshApp.js +2 -1
- package/abstractions/features/RefreshApp.js.map +1 -1
- package/abstractions/features/RunPulumiCommand.js +2 -1
- package/abstractions/features/RunPulumiCommand.js.map +1 -1
- package/abstractions/features/ValidateProjectConfig.js +2 -1
- package/abstractions/features/ValidateProjectConfig.js.map +1 -1
- package/abstractions/features/Watch.js +2 -1
- package/abstractions/features/Watch.js.map +1 -1
- package/abstractions/features/hooks/AdminAfterBuild.js +2 -1
- package/abstractions/features/hooks/AdminAfterBuild.js.map +1 -1
- package/abstractions/features/hooks/AdminAfterDeploy.js +2 -1
- package/abstractions/features/hooks/AdminAfterDeploy.js.map +1 -1
- package/abstractions/features/hooks/AdminBeforeBuild.js +2 -1
- package/abstractions/features/hooks/AdminBeforeBuild.js.map +1 -1
- package/abstractions/features/hooks/AdminBeforeDeploy.js +2 -1
- package/abstractions/features/hooks/AdminBeforeDeploy.js.map +1 -1
- package/abstractions/features/hooks/AdminBeforeWatch.js +2 -1
- package/abstractions/features/hooks/AdminBeforeWatch.js.map +1 -1
- package/abstractions/features/hooks/AfterBuild.js +2 -1
- package/abstractions/features/hooks/AfterBuild.js.map +1 -1
- package/abstractions/features/hooks/AfterDeploy.js +2 -1
- package/abstractions/features/hooks/AfterDeploy.js.map +1 -1
- package/abstractions/features/hooks/ApiAfterBuild.js +2 -1
- package/abstractions/features/hooks/ApiAfterBuild.js.map +1 -1
- package/abstractions/features/hooks/ApiAfterDeploy.js +2 -1
- package/abstractions/features/hooks/ApiAfterDeploy.js.map +1 -1
- package/abstractions/features/hooks/ApiBeforeBuild.js +2 -1
- package/abstractions/features/hooks/ApiBeforeBuild.js.map +1 -1
- package/abstractions/features/hooks/ApiBeforeDeploy.js +2 -1
- package/abstractions/features/hooks/ApiBeforeDeploy.js.map +1 -1
- package/abstractions/features/hooks/ApiBeforeWatch.js +2 -1
- package/abstractions/features/hooks/ApiBeforeWatch.js.map +1 -1
- package/abstractions/features/hooks/BeforeBuild.js +2 -1
- package/abstractions/features/hooks/BeforeBuild.js.map +1 -1
- package/abstractions/features/hooks/BeforeDeploy.js +2 -1
- package/abstractions/features/hooks/BeforeDeploy.js.map +1 -1
- package/abstractions/features/hooks/BeforeWatch.js +2 -1
- package/abstractions/features/hooks/BeforeWatch.js.map +1 -1
- package/abstractions/features/hooks/CoreAfterBuild.js +2 -1
- package/abstractions/features/hooks/CoreAfterBuild.js.map +1 -1
- package/abstractions/features/hooks/CoreAfterDeploy.js +2 -1
- package/abstractions/features/hooks/CoreAfterDeploy.js.map +1 -1
- package/abstractions/features/hooks/CoreBeforeBuild.js +2 -1
- package/abstractions/features/hooks/CoreBeforeBuild.js.map +1 -1
- package/abstractions/features/hooks/CoreBeforeDeploy.js +2 -1
- package/abstractions/features/hooks/CoreBeforeDeploy.js.map +1 -1
- package/abstractions/features/hooks/CoreBeforeWatch.js +2 -1
- package/abstractions/features/hooks/CoreBeforeWatch.js.map +1 -1
- package/abstractions/features/hooks/index.js +0 -2
- package/abstractions/features/index.js +0 -2
- package/abstractions/index.js +0 -2
- package/abstractions/models/IAppModel.js +0 -3
- package/abstractions/models/IAppPackageModel.js +0 -3
- package/abstractions/models/IPathModel.js +0 -3
- package/abstractions/models/IProjectConfigDto.js +0 -3
- package/abstractions/models/IProjectConfigModel.js +0 -3
- package/abstractions/models/IProjectModel.js +0 -3
- package/abstractions/models/IUrlModel.js +0 -3
- package/abstractions/models/IWcpEnvironmentDto.js +0 -3
- package/abstractions/models/IWcpEnvironmentModel.js +0 -3
- package/abstractions/models/IWcpUserDto.js +0 -3
- package/abstractions/models/IWcpUserModel.js +0 -3
- package/abstractions/models/IWcpUserPatDto.js +0 -3
- package/abstractions/models/IWcpUserPatModel.js +0 -3
- package/abstractions/models/PackagesBuilder/IPackagesBuilder.js +0 -3
- package/abstractions/models/PackagesBuilder/IRunnableBuildProcess.js +0 -3
- package/abstractions/models/PackagesBuilder/IRunnableBuildProcesses.js +0 -3
- package/abstractions/models/PackagesBuilder/index.js +0 -3
- package/abstractions/models/index.js +0 -3
- package/abstractions/services/BuildAppWorkspaceService.js +2 -1
- package/abstractions/services/BuildAppWorkspaceService.js.map +1 -1
- package/abstractions/services/BuildProjectWorkspaceService.js +2 -1
- package/abstractions/services/BuildProjectWorkspaceService.js.map +1 -1
- package/abstractions/services/GetAppPackagesService.js +2 -1
- package/abstractions/services/GetAppPackagesService.js.map +1 -1
- package/abstractions/services/GetAppService.js +2 -1
- package/abstractions/services/GetAppService.js.map +1 -1
- package/abstractions/services/GetCwdService.js +2 -1
- package/abstractions/services/GetCwdService.js.map +1 -1
- package/abstractions/services/GetProjectConfigService.js +2 -1
- package/abstractions/services/GetProjectConfigService.js.map +1 -1
- package/abstractions/services/GetProjectIdService.js +2 -1
- package/abstractions/services/GetProjectIdService.js.map +1 -1
- package/abstractions/services/GetProjectService.js +2 -1
- package/abstractions/services/GetProjectService.js.map +1 -1
- package/abstractions/services/GetProjectVersionService.js +2 -1
- package/abstractions/services/GetProjectVersionService.js.map +1 -1
- package/abstractions/services/GetPulumiService.js +2 -1
- package/abstractions/services/GetPulumiService.js.map +1 -1
- package/abstractions/services/InitProjectSdkService.js +2 -1
- package/abstractions/services/InitProjectSdkService.js.map +1 -1
- package/abstractions/services/InstallExtensionService.js +2 -1
- package/abstractions/services/InstallExtensionService.js.map +1 -1
- package/abstractions/services/IsRemotePulumiBackendService.js +2 -1
- package/abstractions/services/IsRemotePulumiBackendService.js.map +1 -1
- package/abstractions/services/ListAppLambdaFunctionsService.js +2 -1
- package/abstractions/services/ListAppLambdaFunctionsService.js.map +1 -1
- package/abstractions/services/ListDeployedEnvironmentsService.js +2 -1
- package/abstractions/services/ListDeployedEnvironmentsService.js.map +1 -1
- package/abstractions/services/ListPackagesInAppWorkspaceService.js +2 -1
- package/abstractions/services/ListPackagesInAppWorkspaceService.js.map +1 -1
- package/abstractions/services/ListPackagesService.js +2 -1
- package/abstractions/services/ListPackagesService.js.map +1 -1
- package/abstractions/services/LoadEnvVarsService.js +2 -1
- package/abstractions/services/LoadEnvVarsService.js.map +1 -1
- package/abstractions/services/LocalStorageService.js +2 -1
- package/abstractions/services/LocalStorageService.js.map +1 -1
- package/abstractions/services/LoggerService.js +2 -1
- package/abstractions/services/LoggerService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/GetIsCiService.js +2 -1
- package/abstractions/services/ProjectInfoService/GetIsCiService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/GetNpmVersionService.js +2 -1
- package/abstractions/services/ProjectInfoService/GetNpmVersionService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/GetNpxVersionService.js +2 -1
- package/abstractions/services/ProjectInfoService/GetNpxVersionService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/GetPulumiVersionService.js +2 -1
- package/abstractions/services/ProjectInfoService/GetPulumiVersionService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/GetYarnVersionService.js +2 -1
- package/abstractions/services/ProjectInfoService/GetYarnVersionService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/ProjectInfoService.js +2 -1
- package/abstractions/services/ProjectInfoService/ProjectInfoService.js.map +1 -1
- package/abstractions/services/ProjectInfoService/index.js +0 -2
- package/abstractions/services/ProjectSdkParamsService.js +2 -1
- package/abstractions/services/ProjectSdkParamsService.js.map +1 -1
- package/abstractions/services/PulumiExportService.js +3 -4
- package/abstractions/services/PulumiExportService.js.map +1 -1
- package/abstractions/services/PulumiGetConfigPassphraseService.js +2 -1
- package/abstractions/services/PulumiGetConfigPassphraseService.js.map +1 -1
- package/abstractions/services/PulumiGetSecretsProviderService.js +2 -1
- package/abstractions/services/PulumiGetSecretsProviderService.js.map +1 -1
- package/abstractions/services/PulumiGetStackOutputService.js +2 -1
- package/abstractions/services/PulumiGetStackOutputService.js.map +1 -1
- package/abstractions/services/PulumiImportService.js +2 -1
- package/abstractions/services/PulumiImportService.js.map +1 -1
- package/abstractions/services/PulumiLoginService.js +2 -1
- package/abstractions/services/PulumiLoginService.js.map +1 -1
- package/abstractions/services/PulumiSelectStackService.js +2 -1
- package/abstractions/services/PulumiSelectStackService.js.map +1 -1
- package/abstractions/services/SetProjectIdService.js +2 -1
- package/abstractions/services/SetProjectIdService.js.map +1 -1
- package/abstractions/services/StdioService.js +2 -1
- package/abstractions/services/StdioService.js.map +1 -1
- package/abstractions/services/UiService.js +2 -1
- package/abstractions/services/UiService.js.map +1 -1
- package/abstractions/services/ValidateProjectConfigService.js +2 -1
- package/abstractions/services/ValidateProjectConfigService.js.map +1 -1
- package/abstractions/services/WatchedLambdaFunctionsService.js +2 -1
- package/abstractions/services/WatchedLambdaFunctionsService.js.map +1 -1
- package/abstractions/services/WcpService.js +2 -1
- package/abstractions/services/WcpService.js.map +1 -1
- package/abstractions/services/index.js +0 -2
- package/abstractions/types.js +0 -3
- package/components/Wcp.js +27 -38
- package/components/Wcp.js.map +1 -1
- package/createProjectSdkContainer.js +103 -112
- package/createProjectSdkContainer.js.map +1 -1
- package/decorators/BuildAppWithHooks.js +54 -44
- package/decorators/BuildAppWithHooks.js.map +1 -1
- package/decorators/DeployAppClearWatchedLambdaFunctions.js +27 -29
- package/decorators/DeployAppClearWatchedLambdaFunctions.js.map +1 -1
- package/decorators/DeployAppRefreshStackOutputCache.js +26 -30
- package/decorators/DeployAppRefreshStackOutputCache.js.map +1 -1
- package/decorators/DeployAppWithHooks.js +51 -41
- package/decorators/DeployAppWithHooks.js.map +1 -1
- package/decorators/DeployAppWithWatchedLambdaReplacement.js +33 -37
- package/decorators/DeployAppWithWatchedLambdaReplacement.js.map +1 -1
- package/decorators/GetFeatureFlagsWithLicense.js +36 -57
- package/decorators/GetFeatureFlagsWithLicense.js.map +1 -1
- package/decorators/GetPulumiServiceWithDownloadInfo.js +21 -19
- package/decorators/GetPulumiServiceWithDownloadInfo.js.map +1 -1
- package/decorators/WatchWithHooks.js +30 -27
- package/decorators/WatchWithHooks.js.map +1 -1
- package/decorators/index.js +0 -2
- package/defineExtension/createExtensionDefinition.js +12 -19
- package/defineExtension/createExtensionDefinition.js.map +1 -1
- package/defineExtension/createExtensionReactComponent.js +40 -46
- package/defineExtension/createExtensionReactComponent.js.map +1 -1
- package/defineExtension/defineExtension.js +8 -9
- package/defineExtension/defineExtension.js.map +1 -1
- package/defineExtension/index.js +0 -2
- package/defineExtension/models/ExtensionDefinitionModel.js +11 -10
- package/defineExtension/models/ExtensionDefinitionModel.js.map +1 -1
- package/defineExtension/models/ExtensionInstanceModel.js +23 -24
- package/defineExtension/models/ExtensionInstanceModel.js.map +1 -1
- package/defineExtension/models/index.js +0 -2
- package/defineExtension/types.js +0 -3
- package/defineExtension/zodTypes/zodSrcPath.js +35 -61
- package/defineExtension/zodTypes/zodSrcPath.js.map +1 -1
- package/exports/infra/admin.js +0 -2
- package/exports/infra/api.js +0 -2
- package/exports/infra/core.js +0 -2
- package/exports/infra.js +0 -2
- package/extensions/AdminBuildParam.js +105 -147
- package/extensions/AdminBuildParam.js.map +1 -1
- package/extensions/AdminExtension.js +64 -90
- package/extensions/AdminExtension.js.map +1 -1
- package/extensions/ApiBuildParam.js +71 -97
- package/extensions/ApiBuildParam.js.map +1 -1
- package/extensions/ApiExtension.js +71 -92
- package/extensions/ApiExtension.js.map +1 -1
- package/extensions/DatabaseSetup.js +14 -9
- package/extensions/DatabaseSetup.js.map +1 -1
- package/extensions/EnvVar.js +12 -16
- package/extensions/EnvVar.js.map +1 -1
- package/extensions/ExtensionDefinitions.js +11 -10
- package/extensions/ExtensionDefinitions.js.map +1 -1
- package/extensions/FeatureFlags.js +47 -48
- package/extensions/FeatureFlags.js.map +1 -1
- package/extensions/Project/EnsureApiDeployedBeforeAdminBuild.js +20 -21
- package/extensions/Project/EnsureApiDeployedBeforeAdminBuild.js.map +1 -1
- package/extensions/Project/EnsureApiDeployedBeforeAdminWatch.js +20 -21
- package/extensions/Project/EnsureApiDeployedBeforeAdminWatch.js.map +1 -1
- package/extensions/Project/EnsureApiDeployedBeforeWatch.js +20 -21
- package/extensions/Project/EnsureApiDeployedBeforeWatch.js.map +1 -1
- package/extensions/Project/EnsureCoreDeployedBeforeApiDeploy.js +22 -25
- package/extensions/Project/EnsureCoreDeployedBeforeApiDeploy.js.map +1 -1
- package/extensions/Project/EnsureTelemetryEnabledForOss.js +25 -28
- package/extensions/Project/EnsureTelemetryEnabledForOss.js.map +1 -1
- package/extensions/Project/SetAdminAppEnvVarsBeforeBuild.js +29 -34
- package/extensions/Project/SetAdminAppEnvVarsBeforeBuild.js.map +1 -1
- package/extensions/Project/SetAdminAppEnvVarsBeforeWatch.js +30 -35
- package/extensions/Project/SetAdminAppEnvVarsBeforeWatch.js.map +1 -1
- package/extensions/Project/ShowConfigChangeInfoBeforeAdminWatch.js +12 -9
- package/extensions/Project/ShowConfigChangeInfoBeforeAdminWatch.js.map +1 -1
- package/extensions/Project/ShowConfigChangeInfoBeforeApiWatch.js +12 -9
- package/extensions/Project/ShowConfigChangeInfoBeforeApiWatch.js.map +1 -1
- package/extensions/Project/TelemetryNoLongerNewUser.js +7 -7
- package/extensions/Project/TelemetryNoLongerNewUser.js.map +1 -1
- package/extensions/Project/ValidateEncryptionBeforeDeploy.js +22 -23
- package/extensions/Project/ValidateEncryptionBeforeDeploy.js.map +1 -1
- package/extensions/Project/ValidateProductionPulumiState.js +25 -28
- package/extensions/Project/ValidateProductionPulumiState.js.map +1 -1
- package/extensions/Project/WcpInjectTelemetryClientAfterBuild.js +46 -51
- package/extensions/Project/WcpInjectTelemetryClientAfterBuild.js.map +1 -1
- package/extensions/Project.js +29 -30
- package/extensions/Project.js.map +1 -1
- package/extensions/ProjectDecorator.js +13 -16
- package/extensions/ProjectDecorator.js.map +1 -1
- package/extensions/ProjectId.js +11 -13
- package/extensions/ProjectId.js.map +1 -1
- package/extensions/ProjectImplementation.js +14 -17
- package/extensions/ProjectImplementation.js.map +1 -1
- package/extensions/Telemetry.js +10 -9
- package/extensions/Telemetry.js.map +1 -1
- package/extensions/hooks/AdminAfterBuild.js +16 -19
- package/extensions/hooks/AdminAfterBuild.js.map +1 -1
- package/extensions/hooks/AdminAfterDeploy.js +16 -19
- package/extensions/hooks/AdminAfterDeploy.js.map +1 -1
- package/extensions/hooks/AdminBeforeBuild.js +16 -19
- package/extensions/hooks/AdminBeforeBuild.js.map +1 -1
- package/extensions/hooks/AdminBeforeDeploy.js +16 -19
- package/extensions/hooks/AdminBeforeDeploy.js.map +1 -1
- package/extensions/hooks/AdminBeforeWatch.js +16 -19
- package/extensions/hooks/AdminBeforeWatch.js.map +1 -1
- package/extensions/hooks/AfterBuild.js +15 -18
- package/extensions/hooks/AfterBuild.js.map +1 -1
- package/extensions/hooks/AfterDeploy.js +15 -18
- package/extensions/hooks/AfterDeploy.js.map +1 -1
- package/extensions/hooks/ApiAfterBuild.js +16 -19
- package/extensions/hooks/ApiAfterBuild.js.map +1 -1
- package/extensions/hooks/ApiAfterDeploy.js +16 -19
- package/extensions/hooks/ApiAfterDeploy.js.map +1 -1
- package/extensions/hooks/ApiBeforeBuild.js +16 -19
- package/extensions/hooks/ApiBeforeBuild.js.map +1 -1
- package/extensions/hooks/ApiBeforeDeploy.js +16 -19
- package/extensions/hooks/ApiBeforeDeploy.js.map +1 -1
- package/extensions/hooks/ApiBeforeWatch.js +16 -19
- package/extensions/hooks/ApiBeforeWatch.js.map +1 -1
- package/extensions/hooks/BeforeBuild.js +15 -18
- package/extensions/hooks/BeforeBuild.js.map +1 -1
- package/extensions/hooks/BeforeDeploy.js +15 -18
- package/extensions/hooks/BeforeDeploy.js.map +1 -1
- package/extensions/hooks/BeforeWatch.js +15 -18
- package/extensions/hooks/BeforeWatch.js.map +1 -1
- package/extensions/hooks/CoreAfterBuild.js +16 -19
- package/extensions/hooks/CoreAfterBuild.js.map +1 -1
- package/extensions/hooks/CoreAfterDeploy.js +16 -19
- package/extensions/hooks/CoreAfterDeploy.js.map +1 -1
- package/extensions/hooks/CoreBeforeBuild.js +16 -19
- package/extensions/hooks/CoreBeforeBuild.js.map +1 -1
- package/extensions/hooks/CoreBeforeDeploy.js +16 -19
- package/extensions/hooks/CoreBeforeDeploy.js.map +1 -1
- package/extensions/hooks/CoreBeforeWatch.js +16 -19
- package/extensions/hooks/CoreBeforeWatch.js.map +1 -1
- package/extensions/hooks/index.js +0 -2
- package/extensions/index.js +43 -57
- package/extensions/index.js.map +1 -1
- package/extensions/infra/Ci.js +8 -24
- package/extensions/infra/Ci.js.map +1 -1
- package/extensions/infra/Env.js +35 -92
- package/extensions/infra/Env.js.map +1 -1
- package/extensions/infra/index.js +0 -2
- package/extensions/pulumi/AdminStackOutputValue.js +13 -12
- package/extensions/pulumi/AdminStackOutputValue.js.map +1 -1
- package/extensions/pulumi/ApiStackOutputValue.js +13 -12
- package/extensions/pulumi/ApiStackOutputValue.js.map +1 -1
- package/extensions/pulumi/CoreStackOutputValue.js +13 -12
- package/extensions/pulumi/CoreStackOutputValue.js.map +1 -1
- package/extensions/pulumi/ProductionEnvironments.js +29 -39
- package/extensions/pulumi/ProductionEnvironments.js.map +1 -1
- package/extensions/pulumi/PulumiResourceNamePrefix.js +10 -9
- package/extensions/pulumi/PulumiResourceNamePrefix.js.map +1 -1
- package/extensions/pulumi/index.js +0 -2
- package/features/BuildApp/BuildApp.js +49 -40
- package/features/BuildApp/BuildApp.js.map +1 -1
- package/features/BuildApp/PackagesBuilder/PackagesBuilder.js +34 -39
- package/features/BuildApp/PackagesBuilder/PackagesBuilder.js.map +1 -1
- package/features/BuildApp/PackagesBuilder/RunnableBuildProcess.js +39 -33
- package/features/BuildApp/PackagesBuilder/RunnableBuildProcess.js.map +1 -1
- package/features/BuildApp/PackagesBuilder/RunnableBuildProcesses.js +39 -46
- package/features/BuildApp/PackagesBuilder/RunnableBuildProcesses.js.map +1 -1
- package/features/BuildApp/PackagesBuilder/worker.js +26 -34
- package/features/BuildApp/PackagesBuilder/worker.js.map +1 -1
- package/features/BuildApp/index.js +0 -2
- package/features/DeployApp/DeployApp.js +79 -79
- package/features/DeployApp/DeployApp.js.map +1 -1
- package/features/DeployApp/index.js +0 -2
- package/features/DestroyApp/DestroyApp.js +60 -46
- package/features/DestroyApp/DestroyApp.js.map +1 -1
- package/features/DestroyApp/index.js +0 -2
- package/features/ExportStack/ExportStack.js +21 -16
- package/features/ExportStack/ExportStack.js.map +1 -1
- package/features/ExportStack/index.js +0 -2
- package/features/GetApp/GetApp.js +14 -11
- package/features/GetApp/GetApp.js.map +1 -1
- package/features/GetApp/index.js +0 -2
- package/features/GetAppOutput/GetAppOutput.js +44 -33
- package/features/GetAppOutput/GetAppOutput.js.map +1 -1
- package/features/GetAppOutput/index.js +0 -2
- package/features/GetAppStackOutput/GetAppStackOutput.js +20 -15
- package/features/GetAppStackOutput/GetAppStackOutput.js.map +1 -1
- package/features/GetAppStackOutput/index.js +0 -2
- package/features/GetFeatureFlags/GetFeatureFlags.js +20 -19
- package/features/GetFeatureFlags/GetFeatureFlags.js.map +1 -1
- package/features/GetFeatureFlags/index.js +0 -2
- package/features/GetLogger/GetLogger.js +14 -11
- package/features/GetLogger/GetLogger.js.map +1 -1
- package/features/GetLogger/index.js +0 -2
- package/features/GetProductionEnvironments/GetProductionEnvironments.js +24 -19
- package/features/GetProductionEnvironments/GetProductionEnvironments.js.map +1 -1
- package/features/GetProductionEnvironments/index.js +0 -2
- package/features/GetProject/GetProject.js +14 -11
- package/features/GetProject/GetProject.js.map +1 -1
- package/features/GetProject/index.js +0 -2
- package/features/GetProjectConfig/GetProjectConfig.js +14 -11
- package/features/GetProjectConfig/GetProjectConfig.js.map +1 -1
- package/features/GetProjectConfig/index.js +0 -2
- package/features/GetProjectInfo/GetProjectInfo.js +14 -11
- package/features/GetProjectInfo/GetProjectInfo.js.map +1 -1
- package/features/GetProjectInfo/index.js +0 -2
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js +18 -17
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js.map +1 -1
- package/features/GetPulumiResourceNamePrefix/index.js +0 -2
- package/features/InstallExtension/InstallExtension.js +14 -11
- package/features/InstallExtension/InstallExtension.js.map +1 -1
- package/features/InstallExtension/index.js +0 -2
- package/features/IsCi/IsCi.js +14 -11
- package/features/IsCi/IsCi.js.map +1 -1
- package/features/IsCi/index.js +0 -2
- package/features/IsTelemetryEnabled/IsTelemetryEnabled.js +19 -18
- package/features/IsTelemetryEnabled/IsTelemetryEnabled.js.map +1 -1
- package/features/IsTelemetryEnabled/index.js +0 -2
- package/features/IsWcpEnabled/IsWcpEnabled.js +15 -12
- package/features/IsWcpEnabled/IsWcpEnabled.js.map +1 -1
- package/features/IsWcpEnabled/index.js +0 -2
- package/features/IsWebinyJsRepo/IsWebinyJsRepo.js +17 -14
- package/features/IsWebinyJsRepo/IsWebinyJsRepo.js.map +1 -1
- package/features/IsWebinyJsRepo/index.js +0 -2
- package/features/RefreshApp/RefreshApp.js +57 -46
- package/features/RefreshApp/RefreshApp.js.map +1 -1
- package/features/RefreshApp/index.js +0 -2
- package/features/RunPulumiCommand/RunPulumiCommand.js +54 -43
- package/features/RunPulumiCommand/RunPulumiCommand.js.map +1 -1
- package/features/RunPulumiCommand/index.js +0 -2
- package/features/ValidateProjectConfig/ValidateProjectConfig.js +14 -11
- package/features/ValidateProjectConfig/ValidateProjectConfig.js.map +1 -1
- package/features/ValidateProjectConfig/index.js +0 -2
- package/features/Watch/Watch.js +178 -181
- package/features/Watch/Watch.js.map +1 -1
- package/features/Watch/getIotEndpoint.js +14 -12
- package/features/Watch/getIotEndpoint.js.map +1 -1
- package/features/Watch/index.js +0 -2
- package/features/Watch/initInvocationForwarding.js +76 -95
- package/features/Watch/initInvocationForwarding.js.map +1 -1
- package/features/Watch/localInvocationWorker.js +24 -33
- package/features/Watch/localInvocationWorker.js.map +1 -1
- package/features/Watch/replaceLambdaFunctions.js +61 -84
- package/features/Watch/replaceLambdaFunctions.js.map +1 -1
- package/features/Watch/watchers/BasePackagesWatcher.js +10 -13
- package/features/Watch/watchers/BasePackagesWatcher.js.map +1 -1
- package/features/Watch/watchers/MultiplePackagesWatcher.js +11 -12
- package/features/Watch/watchers/MultiplePackagesWatcher.js.map +1 -1
- package/features/Watch/watchers/PackagesWatcher.js +15 -18
- package/features/Watch/watchers/PackagesWatcher.js.map +1 -1
- package/features/Watch/watchers/RunnableWatchProcess.js +41 -40
- package/features/Watch/watchers/RunnableWatchProcess.js.map +1 -1
- package/features/Watch/watchers/RunnableWatchProcesses.js +35 -34
- package/features/Watch/watchers/RunnableWatchProcesses.js.map +1 -1
- package/features/Watch/watchers/SinglePackageWatcher.js +11 -8
- package/features/Watch/watchers/SinglePackageWatcher.js.map +1 -1
- package/features/Watch/watchers/WebinyConfigWatcher.js +30 -40
- package/features/Watch/watchers/WebinyConfigWatcher.js.map +1 -1
- package/features/Watch/watchers/ZeroPackagesWatcher.js +5 -5
- package/features/Watch/watchers/ZeroPackagesWatcher.js.map +1 -1
- package/features/Watch/watchers/utils/measureDuration.js +7 -8
- package/features/Watch/watchers/utils/measureDuration.js.map +1 -1
- package/features/Watch/watchers/worker.js +12 -21
- package/features/Watch/watchers/worker.js.map +1 -1
- package/features/hooks/AdminAfterBuild/AdminBeforeBuild.js +19 -15
- package/features/hooks/AdminAfterBuild/AdminBeforeBuild.js.map +1 -1
- package/features/hooks/AdminAfterBuild/index.js +0 -2
- package/features/hooks/AdminAfterDeploy/AdminBeforeBuild.js +19 -15
- package/features/hooks/AdminAfterDeploy/AdminBeforeBuild.js.map +1 -1
- package/features/hooks/AdminAfterDeploy/index.js +0 -2
- package/features/hooks/AdminBeforeBuild/AdminBeforeBuild.js +19 -15
- package/features/hooks/AdminBeforeBuild/AdminBeforeBuild.js.map +1 -1
- package/features/hooks/AdminBeforeBuild/index.js +0 -2
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js +19 -15
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js.map +1 -1
- package/features/hooks/AdminBeforeDeploy/index.js +0 -2
- package/features/hooks/AdminBeforeWatch/AdminBeforeWatch.js +18 -14
- package/features/hooks/AdminBeforeWatch/AdminBeforeWatch.js.map +1 -1
- package/features/hooks/AdminBeforeWatch/index.js +0 -2
- package/features/hooks/AfterBuild/AfterBuild.js +19 -15
- package/features/hooks/AfterBuild/AfterBuild.js.map +1 -1
- package/features/hooks/AfterBuild/index.js +0 -2
- package/features/hooks/AfterDeploy/AfterDeploy.js +19 -15
- package/features/hooks/AfterDeploy/AfterDeploy.js.map +1 -1
- package/features/hooks/AfterDeploy/index.js +0 -2
- package/features/hooks/ApiAfterBuild/ApiBeforeBuild.js +18 -14
- package/features/hooks/ApiAfterBuild/ApiBeforeBuild.js.map +1 -1
- package/features/hooks/ApiAfterBuild/index.js +0 -2
- package/features/hooks/ApiAfterDeploy/ApiBeforeBuild.js +18 -14
- package/features/hooks/ApiAfterDeploy/ApiBeforeBuild.js.map +1 -1
- package/features/hooks/ApiAfterDeploy/index.js +0 -2
- package/features/hooks/ApiBeforeBuild/ApiBeforeBuild.js +18 -14
- package/features/hooks/ApiBeforeBuild/ApiBeforeBuild.js.map +1 -1
- package/features/hooks/ApiBeforeBuild/index.js +0 -2
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js +18 -14
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js.map +1 -1
- package/features/hooks/ApiBeforeDeploy/index.js +0 -2
- package/features/hooks/ApiBeforeWatch/ApiBeforeWatch.js +18 -14
- package/features/hooks/ApiBeforeWatch/ApiBeforeWatch.js.map +1 -1
- package/features/hooks/ApiBeforeWatch/index.js +0 -2
- package/features/hooks/BeforeBuild/BeforeBuild.js +19 -15
- package/features/hooks/BeforeBuild/BeforeBuild.js.map +1 -1
- package/features/hooks/BeforeBuild/index.js +0 -2
- package/features/hooks/BeforeDeploy/BeforeDeploy.js +19 -15
- package/features/hooks/BeforeDeploy/BeforeDeploy.js.map +1 -1
- package/features/hooks/BeforeDeploy/index.js +0 -2
- package/features/hooks/BeforeWatch/BeforeWatch.js +19 -15
- package/features/hooks/BeforeWatch/BeforeWatch.js.map +1 -1
- package/features/hooks/BeforeWatch/index.js +0 -2
- package/features/hooks/CoreAfterBuild/CoreBeforeBuild.js +18 -14
- package/features/hooks/CoreAfterBuild/CoreBeforeBuild.js.map +1 -1
- package/features/hooks/CoreAfterBuild/index.js +0 -2
- package/features/hooks/CoreAfterDeploy/CoreBeforeBuild.js +18 -14
- package/features/hooks/CoreAfterDeploy/CoreBeforeBuild.js.map +1 -1
- package/features/hooks/CoreAfterDeploy/index.js +0 -2
- package/features/hooks/CoreBeforeBuild/CoreBeforeBuild.js +18 -14
- package/features/hooks/CoreBeforeBuild/CoreBeforeBuild.js.map +1 -1
- package/features/hooks/CoreBeforeBuild/index.js +0 -2
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js +18 -14
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js.map +1 -1
- package/features/hooks/CoreBeforeDeploy/index.js +0 -2
- package/features/hooks/CoreBeforeWatch/CoreBeforeWatch.js +18 -14
- package/features/hooks/CoreBeforeWatch/CoreBeforeWatch.js.map +1 -1
- package/features/hooks/CoreBeforeWatch/index.js +0 -2
- package/features/hooks/index.js +0 -2
- package/features/index.js +0 -2
- package/index.js +5 -10
- package/index.js.map +1 -1
- package/models/AppModel.js +20 -19
- package/models/AppModel.js.map +1 -1
- package/models/AppPackageModel.js +10 -9
- package/models/AppPackageModel.js.map +1 -1
- package/models/PathModel.js +23 -26
- package/models/PathModel.js.map +1 -1
- package/models/ProjectConfigModel.js +12 -16
- package/models/ProjectConfigModel.js.map +1 -1
- package/models/ProjectModel.js +37 -36
- package/models/ProjectModel.js.map +1 -1
- package/models/UrlModel.js +23 -23
- package/models/UrlModel.js.map +1 -1
- package/models/WcpEnvironmentModel.js +23 -22
- package/models/WcpEnvironmentModel.js.map +1 -1
- package/models/WcpUserModel.js +13 -12
- package/models/WcpUserModel.js.map +1 -1
- package/models/WcpUserPatModel.js +12 -11
- package/models/WcpUserPatModel.js.map +1 -1
- package/models/index.js +0 -2
- package/package.json +14 -14
- package/rslib-runtime.js +14 -0
- package/rslib-runtime.js.map +1 -0
- package/services/BuildAppWorkspaceService/BuildAppWorkspaceService.js +62 -69
- package/services/BuildAppWorkspaceService/BuildAppWorkspaceService.js.map +1 -1
- package/services/BuildAppWorkspaceService/index.js +0 -2
- package/services/BuildProjectWorkspaceService/BuildProjectWorkspaceService.js +21 -17
- package/services/BuildProjectWorkspaceService/BuildProjectWorkspaceService.js.map +1 -1
- package/services/BuildProjectWorkspaceService/index.js +0 -2
- package/services/GetAppPackagesService/GetAppPackagesService.js +24 -23
- package/services/GetAppPackagesService/GetAppPackagesService.js.map +1 -1
- package/services/GetAppPackagesService/index.js +0 -2
- package/services/GetAppService/GetAppService.js +24 -27
- package/services/GetAppService/GetAppService.js.map +1 -1
- package/services/GetAppService/index.js +0 -2
- package/services/GetCwdService/GetCwdService.js +15 -12
- package/services/GetCwdService/GetCwdService.js.map +1 -1
- package/services/GetCwdService/index.js +0 -2
- package/services/GetProjectConfigService/EnvContext.js +29 -38
- package/services/GetProjectConfigService/EnvContext.js.map +1 -1
- package/services/GetProjectConfigService/GetProjectConfigService.js +102 -115
- package/services/GetProjectConfigService/GetProjectConfigService.js.map +1 -1
- package/services/GetProjectConfigService/ProductionEnvironmentsContext.js +13 -18
- package/services/GetProjectConfigService/ProductionEnvironmentsContext.js.map +1 -1
- package/services/GetProjectConfigService/WcpProjectLicenseContext.js +32 -37
- package/services/GetProjectConfigService/WcpProjectLicenseContext.js.map +1 -1
- package/services/GetProjectConfigService/index.js +0 -2
- package/services/GetProjectConfigService/renderConfig.js +32 -38
- package/services/GetProjectConfigService/renderConfig.js.map +1 -1
- package/services/GetProjectConfigService/renderConfigWorker.js +37 -48
- package/services/GetProjectConfigService/renderConfigWorker.js.map +1 -1
- package/services/GetProjectIdService/GetProjectIdService.js +22 -23
- package/services/GetProjectIdService/GetProjectIdService.js.map +1 -1
- package/services/GetProjectIdService/index.js +0 -2
- package/services/GetProjectService/GetProjectService.js +43 -45
- package/services/GetProjectService/GetProjectService.js.map +1 -1
- package/services/GetProjectService/index.js +0 -2
- package/services/GetProjectVersionService/GetProjectVersionService.js +23 -22
- package/services/GetProjectVersionService/GetProjectVersionService.js.map +1 -1
- package/services/GetProjectVersionService/index.js +0 -2
- package/services/GetPulumiService/GetPulumiService.js +36 -41
- package/services/GetPulumiService/GetPulumiService.js.map +1 -1
- package/services/GetPulumiService/index.js +0 -2
- package/services/InitProjectSdkService/InitProjectSdkService.js +36 -46
- package/services/InitProjectSdkService/InitProjectSdkService.js.map +1 -1
- package/services/InitProjectSdkService/applyEnvVars.js +5 -8
- package/services/InitProjectSdkService/applyEnvVars.js.map +1 -1
- package/services/InitProjectSdkService/applyWcpEnvVars.js +91 -136
- package/services/InitProjectSdkService/applyWcpEnvVars.js.map +1 -1
- package/services/InitProjectSdkService/index.js +0 -2
- package/services/InitProjectSdkService/registerDecorators.js +10 -7
- package/services/InitProjectSdkService/registerDecorators.js.map +1 -1
- package/services/InitProjectSdkService/registerHooks.js +30 -7
- package/services/InitProjectSdkService/registerHooks.js.map +1 -1
- package/services/InitProjectSdkService/registerImplementations.js +10 -11
- package/services/InitProjectSdkService/registerImplementations.js.map +1 -1
- package/services/InitProjectSdkService/registerPulumiExtensions.js +12 -9
- package/services/InitProjectSdkService/registerPulumiExtensions.js.map +1 -1
- package/services/InstallExtensionService/InstallExtensionService.js +78 -121
- package/services/InstallExtensionService/InstallExtensionService.js.map +1 -1
- package/services/InstallExtensionService/downloadFolderFromS3.js +46 -65
- package/services/InstallExtensionService/downloadFolderFromS3.js.map +1 -1
- package/services/InstallExtensionService/index.js +0 -2
- package/services/InstallExtensionService/mergePackageJson.js +15 -25
- package/services/InstallExtensionService/mergePackageJson.js.map +1 -1
- package/services/InstallExtensionService/types.js +0 -3
- package/services/InstallExtensionService/updateWebinyConfig.js +60 -137
- package/services/InstallExtensionService/updateWebinyConfig.js.map +1 -1
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js +9 -17
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js.map +1 -1
- package/services/IsRemotePulumiBackendService/index.js +0 -2
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js +50 -73
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js.map +1 -1
- package/services/ListAppLambdaFunctionsService/index.js +0 -2
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js +21 -23
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js.map +1 -1
- package/services/ListDeployedEnvironmentsService/index.js +0 -2
- package/services/ListPackagesInAppWorkspaceService/ListPackagesInAppWorkspaceService.js +34 -29
- package/services/ListPackagesInAppWorkspaceService/ListPackagesInAppWorkspaceService.js.map +1 -1
- package/services/ListPackagesInAppWorkspaceService/index.js +0 -2
- package/services/ListPackagesService/ListPackagesService.js +81 -114
- package/services/ListPackagesService/ListPackagesService.js.map +1 -1
- package/services/ListPackagesService/index.js +0 -2
- package/services/LoadEnvVarsService/LoadEnvVarsService.js +28 -29
- package/services/LoadEnvVarsService/LoadEnvVarsService.js.map +1 -1
- package/services/LoadEnvVarsService/index.js +0 -2
- package/services/LocalStorageService/LocalStorageService.js +41 -44
- package/services/LocalStorageService/LocalStorageService.js.map +1 -1
- package/services/LocalStorageService/index.js +0 -2
- package/services/LoggerService/LoggerService.js +76 -84
- package/services/LoggerService/LoggerService.js.map +1 -1
- package/services/LoggerService/index.js +0 -2
- package/services/ProjectInfoService/GetIsCiService.js +9 -8
- package/services/ProjectInfoService/GetIsCiService.js.map +1 -1
- package/services/ProjectInfoService/GetNpmVersionService.js +9 -8
- package/services/ProjectInfoService/GetNpmVersionService.js.map +1 -1
- package/services/ProjectInfoService/GetNpxVersionService.js +9 -8
- package/services/ProjectInfoService/GetNpxVersionService.js.map +1 -1
- package/services/ProjectInfoService/GetPulumiVersionService.js +38 -30
- package/services/ProjectInfoService/GetPulumiVersionService.js.map +1 -1
- package/services/ProjectInfoService/GetYarnVersionService.js +9 -8
- package/services/ProjectInfoService/GetYarnVersionService.js.map +1 -1
- package/services/ProjectInfoService/ProjectInfoService.js +56 -51
- package/services/ProjectInfoService/ProjectInfoService.js.map +1 -1
- package/services/ProjectInfoService/index.js +0 -2
- package/services/ProjectSdkParamsService/ProjectSdkParamsService.js +37 -34
- package/services/ProjectSdkParamsService/ProjectSdkParamsService.js.map +1 -1
- package/services/ProjectSdkParamsService/index.js +0 -2
- package/services/PulumiExportService/PulumiExportService.js +42 -35
- package/services/PulumiExportService/PulumiExportService.js.map +1 -1
- package/services/PulumiExportService/index.js +0 -2
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js +9 -8
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js.map +1 -1
- package/services/PulumiGetConfigPassphraseService/index.js +0 -2
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js +9 -8
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js.map +1 -1
- package/services/PulumiGetSecretsProviderService/index.js +0 -2
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js +108 -100
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js.map +1 -1
- package/services/PulumiGetStackOutputService/index.js +0 -2
- package/services/PulumiGetStackOutputService/mapStackOutput.js +17 -29
- package/services/PulumiGetStackOutputService/mapStackOutput.js.map +1 -1
- package/services/PulumiImportService/PulumiImportService.js +48 -45
- package/services/PulumiImportService/PulumiImportService.js.map +1 -1
- package/services/PulumiImportService/index.js +0 -2
- package/services/PulumiLoginService/PulumiLoginService.js +43 -40
- package/services/PulumiLoginService/PulumiLoginService.js.map +1 -1
- package/services/PulumiLoginService/index.js +0 -2
- package/services/PulumiSelectStackService/PulumiSelectStackService.js +91 -86
- package/services/PulumiSelectStackService/PulumiSelectStackService.js.map +1 -1
- package/services/PulumiSelectStackService/index.js +0 -2
- package/services/SetProjectIdService/SetProjectIdService.js +43 -57
- package/services/SetProjectIdService/SetProjectIdService.js.map +1 -1
- package/services/SetProjectIdService/index.js +0 -2
- package/services/StdioService/StdioService.js +15 -14
- package/services/StdioService/StdioService.js.map +1 -1
- package/services/StdioService/index.js +0 -2
- package/services/UiService/UiService.js +55 -58
- package/services/UiService/UiService.js.map +1 -1
- package/services/UiService/index.js +0 -2
- package/services/ValidateProjectConfigService/ValidateProjectConfigService.js +18 -19
- package/services/ValidateProjectConfigService/ValidateProjectConfigService.js.map +1 -1
- package/services/ValidateProjectConfigService/index.js +0 -2
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js +47 -54
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js.map +1 -1
- package/services/WatchedLambdaFunctionsService/index.js +0 -2
- package/services/WcpService/CreateUserPat.js +20 -23
- package/services/WcpService/CreateUserPat.js.map +1 -1
- package/services/WcpService/GenerateUserPat.js +15 -18
- package/services/WcpService/GenerateUserPat.js.map +1 -1
- package/services/WcpService/GetPatFromLocalStorage.js +9 -10
- package/services/WcpService/GetPatFromLocalStorage.js.map +1 -1
- package/services/WcpService/GetProjectEnvironment.js +34 -47
- package/services/WcpService/GetProjectEnvironment.js.map +1 -1
- package/services/WcpService/GetProjectLicense.js +28 -38
- package/services/WcpService/GetProjectLicense.js.map +1 -1
- package/services/WcpService/GetUser.js +43 -46
- package/services/WcpService/GetUser.js.map +1 -1
- package/services/WcpService/GetUserPat.js +20 -23
- package/services/WcpService/GetUserPat.js.map +1 -1
- package/services/WcpService/LogoutUser.js +9 -8
- package/services/WcpService/LogoutUser.js.map +1 -1
- package/services/WcpService/StorePatToLocalStorage.js +9 -10
- package/services/WcpService/StorePatToLocalStorage.js.map +1 -1
- package/services/WcpService/UnsetPatFromLocalStorage.js +9 -10
- package/services/WcpService/UnsetPatFromLocalStorage.js.map +1 -1
- package/services/WcpService/WcpGqlClient.js +6 -5
- package/services/WcpService/WcpGqlClient.js.map +1 -1
- package/services/WcpService/WcpService.js +74 -75
- package/services/WcpService/WcpService.js.map +1 -1
- package/services/WcpService/index.js +0 -2
- package/services/index.js +0 -2
- package/utils/ExtensionSrcResolver.js +51 -106
- package/utils/ExtensionSrcResolver.js.map +1 -1
- package/utils/constants.js +8 -7
- package/utils/constants.js.map +1 -1
- package/utils/createPathResolver.js +2 -5
- package/utils/createPathResolver.js.map +1 -1
- package/utils/env/configuration.js +16 -25
- package/utils/env/configuration.js.map +1 -1
- package/utils/env/index.js +0 -2
- package/utils/env/types.js +0 -3
- package/utils/env/withEnv.js +4 -7
- package/utils/env/withEnv.js.map +1 -1
- package/utils/env/withEnvVariant.js +8 -11
- package/utils/env/withEnvVariant.js.map +1 -1
- package/utils/env/withProjectName.js +4 -9
- package/utils/env/withProjectName.js.map +1 -1
- package/utils/env/withPulumiConfigPassphrase.js +4 -8
- package/utils/env/withPulumiConfigPassphrase.js.map +1 -1
- package/utils/env/withRegion.js +10 -17
- package/utils/env/withRegion.js.map +1 -1
- package/utils/getRandomColorForString.js +86 -8
- package/utils/getRandomColorForString.js.map +1 -1
- package/utils/getStackName.js +11 -18
- package/utils/getStackName.js.map +1 -1
- package/utils/getTemplatesFolderPath.js +6 -8
- package/utils/getTemplatesFolderPath.js.map +1 -1
- package/utils/index.js +0 -2
- package/utils/isValidRegionName.js +8 -13
- package/utils/isValidRegionName.js.map +1 -1
- package/utils/isValidVariantName.js +11 -10
- package/utils/isValidVariantName.js.map +1 -1
- package/utils/measureDuration.js +7 -8
- package/utils/measureDuration.js.map +1 -1
- package/utils/projectSdkContext.js +23 -39
- package/utils/projectSdkContext.js.map +1 -1
- package/utils/regions.js +75 -63
- package/utils/regions.js.map +1 -1
- package/utils/registerExtension.js +6 -15
- package/utils/registerExtension.js.map +1 -1
- package/utils/requireConfig.js +7 -12
- package/utils/requireConfig.js.map +1 -1
- package/utils/toImportSpecifier.js +3 -9
- package/utils/toImportSpecifier.js.map +1 -1
- package/abstractions/features/hooks/index.js.map +0 -1
- package/abstractions/features/index.js.map +0 -1
- package/abstractions/index.js.map +0 -1
- package/abstractions/models/IAppModel.js.map +0 -1
- package/abstractions/models/IAppPackageModel.js.map +0 -1
- package/abstractions/models/IPathModel.js.map +0 -1
- package/abstractions/models/IProjectConfigDto.js.map +0 -1
- package/abstractions/models/IProjectConfigModel.js.map +0 -1
- package/abstractions/models/IProjectModel.js.map +0 -1
- package/abstractions/models/IUrlModel.js.map +0 -1
- package/abstractions/models/IWcpEnvironmentDto.js.map +0 -1
- package/abstractions/models/IWcpEnvironmentModel.js.map +0 -1
- package/abstractions/models/IWcpUserDto.js.map +0 -1
- package/abstractions/models/IWcpUserModel.js.map +0 -1
- package/abstractions/models/IWcpUserPatDto.js.map +0 -1
- package/abstractions/models/IWcpUserPatModel.js.map +0 -1
- package/abstractions/models/PackagesBuilder/IPackagesBuilder.js.map +0 -1
- package/abstractions/models/PackagesBuilder/IRunnableBuildProcess.js.map +0 -1
- package/abstractions/models/PackagesBuilder/IRunnableBuildProcesses.js.map +0 -1
- package/abstractions/models/PackagesBuilder/index.js.map +0 -1
- package/abstractions/models/index.js.map +0 -1
- package/abstractions/services/ProjectInfoService/index.js.map +0 -1
- package/abstractions/services/index.js.map +0 -1
- package/abstractions/types.js.map +0 -1
- package/decorators/index.js.map +0 -1
- package/defineExtension/index.js.map +0 -1
- package/defineExtension/models/index.js.map +0 -1
- package/defineExtension/types.js.map +0 -1
- package/exports/infra/admin.js.map +0 -1
- package/exports/infra/api.js.map +0 -1
- package/exports/infra/core.js.map +0 -1
- package/exports/infra.js.map +0 -1
- package/extensions/hooks/index.js.map +0 -1
- package/extensions/infra/index.js.map +0 -1
- package/extensions/pulumi/index.js.map +0 -1
- package/features/BuildApp/index.js.map +0 -1
- package/features/DeployApp/index.js.map +0 -1
- package/features/DestroyApp/index.js.map +0 -1
- package/features/ExportStack/index.js.map +0 -1
- package/features/GetApp/index.js.map +0 -1
- package/features/GetAppOutput/index.js.map +0 -1
- package/features/GetAppStackOutput/index.js.map +0 -1
- package/features/GetFeatureFlags/index.js.map +0 -1
- package/features/GetLogger/index.js.map +0 -1
- package/features/GetProductionEnvironments/index.js.map +0 -1
- package/features/GetProject/index.js.map +0 -1
- package/features/GetProjectConfig/index.js.map +0 -1
- package/features/GetProjectInfo/index.js.map +0 -1
- package/features/GetPulumiResourceNamePrefix/index.js.map +0 -1
- package/features/InstallExtension/index.js.map +0 -1
- package/features/IsCi/index.js.map +0 -1
- package/features/IsTelemetryEnabled/index.js.map +0 -1
- package/features/IsWcpEnabled/index.js.map +0 -1
- package/features/IsWebinyJsRepo/index.js.map +0 -1
- package/features/RefreshApp/index.js.map +0 -1
- package/features/RunPulumiCommand/index.js.map +0 -1
- package/features/ValidateProjectConfig/index.js.map +0 -1
- package/features/Watch/index.js.map +0 -1
- package/features/hooks/AdminAfterBuild/index.js.map +0 -1
- package/features/hooks/AdminAfterDeploy/index.js.map +0 -1
- package/features/hooks/AdminBeforeBuild/index.js.map +0 -1
- package/features/hooks/AdminBeforeDeploy/index.js.map +0 -1
- package/features/hooks/AdminBeforeWatch/index.js.map +0 -1
- package/features/hooks/AfterBuild/index.js.map +0 -1
- package/features/hooks/AfterDeploy/index.js.map +0 -1
- package/features/hooks/ApiAfterBuild/index.js.map +0 -1
- package/features/hooks/ApiAfterDeploy/index.js.map +0 -1
- package/features/hooks/ApiBeforeBuild/index.js.map +0 -1
- package/features/hooks/ApiBeforeDeploy/index.js.map +0 -1
- package/features/hooks/ApiBeforeWatch/index.js.map +0 -1
- package/features/hooks/BeforeBuild/index.js.map +0 -1
- package/features/hooks/BeforeDeploy/index.js.map +0 -1
- package/features/hooks/BeforeWatch/index.js.map +0 -1
- package/features/hooks/CoreAfterBuild/index.js.map +0 -1
- package/features/hooks/CoreAfterDeploy/index.js.map +0 -1
- package/features/hooks/CoreBeforeBuild/index.js.map +0 -1
- package/features/hooks/CoreBeforeDeploy/index.js.map +0 -1
- package/features/hooks/CoreBeforeWatch/index.js.map +0 -1
- package/features/hooks/index.js.map +0 -1
- package/features/index.js.map +0 -1
- package/models/index.js.map +0 -1
- package/services/BuildAppWorkspaceService/index.js.map +0 -1
- package/services/BuildProjectWorkspaceService/index.js.map +0 -1
- package/services/GetAppPackagesService/index.js.map +0 -1
- package/services/GetAppService/index.js.map +0 -1
- package/services/GetCwdService/index.js.map +0 -1
- package/services/GetProjectConfigService/index.js.map +0 -1
- package/services/GetProjectIdService/index.js.map +0 -1
- package/services/GetProjectService/index.js.map +0 -1
- package/services/GetProjectVersionService/index.js.map +0 -1
- package/services/GetPulumiService/index.js.map +0 -1
- package/services/InitProjectSdkService/index.js.map +0 -1
- package/services/InstallExtensionService/index.js.map +0 -1
- package/services/InstallExtensionService/types.js.map +0 -1
- package/services/IsRemotePulumiBackendService/index.js.map +0 -1
- package/services/ListAppLambdaFunctionsService/index.js.map +0 -1
- package/services/ListDeployedEnvironmentsService/index.js.map +0 -1
- package/services/ListPackagesInAppWorkspaceService/index.js.map +0 -1
- package/services/ListPackagesService/index.js.map +0 -1
- package/services/LoadEnvVarsService/index.js.map +0 -1
- package/services/LocalStorageService/index.js.map +0 -1
- package/services/LoggerService/index.js.map +0 -1
- package/services/ProjectInfoService/index.js.map +0 -1
- package/services/ProjectSdkParamsService/index.js.map +0 -1
- package/services/PulumiExportService/index.js.map +0 -1
- package/services/PulumiGetConfigPassphraseService/index.js.map +0 -1
- package/services/PulumiGetSecretsProviderService/index.js.map +0 -1
- package/services/PulumiGetStackOutputService/index.js.map +0 -1
- package/services/PulumiImportService/index.js.map +0 -1
- package/services/PulumiLoginService/index.js.map +0 -1
- package/services/PulumiSelectStackService/index.js.map +0 -1
- package/services/SetProjectIdService/index.js.map +0 -1
- package/services/StdioService/index.js.map +0 -1
- package/services/UiService/index.js.map +0 -1
- package/services/ValidateProjectConfigService/index.js.map +0 -1
- package/services/WatchedLambdaFunctionsService/index.js.map +0 -1
- package/services/WcpService/index.js.map +0 -1
- package/services/index.js.map +0 -1
- package/utils/env/index.js.map +0 -1
- package/utils/env/types.js.map +0 -1
- package/utils/index.js.map +0 -1
|
@@ -6,105 +6,86 @@ const WEBINY_WATCH_FN_INVOCATION_EVENT = "webiny.watch.functionInvocation";
|
|
|
6
6
|
const WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT = "webiny.watch.functionInvocationResult";
|
|
7
7
|
const WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT = "webiny.watch.functionInvocationHandshake";
|
|
8
8
|
const WATCH_WORKER_PATH = path.join(import.meta.dirname, "localInvocationWorker.js");
|
|
9
|
-
const jsonStringifyAndCompress = input
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const jsonStringifyAndCompress = (input)=>{
|
|
10
|
+
const jsonStringInput = JSON.stringify(input);
|
|
11
|
+
return compress(jsonStringInput);
|
|
12
12
|
};
|
|
13
|
-
const decompressAndJsonParse = async input
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
await client.publish(iotEndpointTopic, JSON.stringify({
|
|
36
|
-
eventType: WEBINY_WATCH_FN_INVOCATION_HANDSHAKE_EVENT,
|
|
37
|
-
eventId: new Date().getTime(),
|
|
38
|
-
data: {
|
|
39
|
-
originalEventId: payload.eventId,
|
|
40
|
-
compressedResult: null,
|
|
41
|
-
compressedError: null
|
|
42
|
-
}
|
|
43
|
-
}));
|
|
44
|
-
const invokedLambdaFunction = functionsList.list.find(lambdaFunction => lambdaFunction.name === payload.data.functionName);
|
|
45
|
-
if (!invokedLambdaFunction) {
|
|
46
|
-
throw new Error(`Lambda function "${payload.data.functionName}" not found.`);
|
|
47
|
-
}
|
|
48
|
-
try {
|
|
49
|
-
const result = await new Promise(async (resolve, reject) => {
|
|
50
|
-
const worker = new Worker(WATCH_WORKER_PATH, {
|
|
51
|
-
env: {
|
|
52
|
-
...payload.data.env,
|
|
53
|
-
WEBINY_WATCH_LOCAL_INVOCATION: "1"
|
|
54
|
-
},
|
|
55
|
-
workerData: {
|
|
56
|
-
handler: {
|
|
57
|
-
path: invokedLambdaFunction.path,
|
|
58
|
-
args: await decompressAndJsonParse(payload.data.compressedArgs)
|
|
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
|
|
59
33
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
+
}));
|
|
89
85
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
console.log(error);
|
|
93
|
-
await client.publish(iotEndpointTopic, JSON.stringify({
|
|
94
|
-
eventType: WEBINY_WATCH_FN_INVOCATION_RESULT_EVENT,
|
|
95
|
-
eventId: new Date().getTime(),
|
|
96
|
-
data: {
|
|
97
|
-
originalEventId: payload.eventId,
|
|
98
|
-
compressedResult: null,
|
|
99
|
-
compressedError: await jsonStringifyAndCompress({
|
|
100
|
-
message: error.message,
|
|
101
|
-
stack: error.stack
|
|
102
|
-
})
|
|
103
|
-
}
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
return client;
|
|
86
|
+
});
|
|
87
|
+
return client;
|
|
108
88
|
};
|
|
89
|
+
export { initInvocationForwarding };
|
|
109
90
|
|
|
110
91
|
//# sourceMappingURL=initInvocationForwarding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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,40 +1,31 @@
|
|
|
1
1
|
import { parentPort, workerData } from "worker_threads";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
-
import
|
|
4
|
-
const {
|
|
5
|
-
handler: handlerParams
|
|
6
|
-
} = workerData;
|
|
3
|
+
import node_path from "node:path";
|
|
4
|
+
const { handler: handlerParams } = workerData;
|
|
7
5
|
try {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
handler
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
error: null
|
|
18
|
-
}));
|
|
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
|
+
}));
|
|
19
15
|
} catch (error) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
stack
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
} finally {
|
|
37
|
-
process.exit(0);
|
|
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);
|
|
38
29
|
}
|
|
39
30
|
|
|
40
31
|
//# sourceMappingURL=localInvocationWorker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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,95 +1,72 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
-
import
|
|
2
|
+
import p_retry from "p-retry";
|
|
3
3
|
import { GetFunctionConfigurationCommand, LambdaClient, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand } from "@webiny/aws-sdk/client-lambda/index.js";
|
|
4
4
|
const WATCH_MODE_NOTE_IN_DESCRIPTION = " (💡 local development mode, redeploy to remove)";
|
|
5
5
|
const DEFAULT_INCREASE_TIMEOUT = 120;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const stackExport = await exportStackState.execute(app);
|
|
23
|
-
if (!stackExport) {
|
|
24
|
-
// If no stack export is found, return an empty array. This is a valid scenario.
|
|
25
|
-
// For example, watching the Admin app locally, but not deploying it.
|
|
26
|
-
logger.info("No AWS Lambda functions to replace.");
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Find the URNs of Lambda functions that will be replaced
|
|
31
|
-
const functionNamesToUpdate = functionsList.list.map(fn => fn.name);
|
|
32
|
-
const replacedFunctionUrns = [];
|
|
33
|
-
if (stackExport.deployment?.resources) {
|
|
34
|
-
for (const resource of stackExport.deployment.resources) {
|
|
35
|
-
if (resource.type === "aws:lambda/function:Function") {
|
|
36
|
-
const functionName = resource.inputs?.name;
|
|
37
|
-
if (functionName && functionNamesToUpdate.includes(functionName)) {
|
|
38
|
-
replacedFunctionUrns.push(resource.urn);
|
|
39
|
-
logger.debug(`Will replace Lambda function: ${functionName} (${resource.urn})`);
|
|
6
|
+
const replaceLambdaFunctions = async ({ app, deploymentId, iotEndpoint, iotEndpointTopic, sessionId, functionsList, increaseTimeout, localExecutionHandshakeTimeout, dependencies })=>{
|
|
7
|
+
const { loggerService: logger, pulumiExportService: exportStackState, watchedLambdaFunctionsService } = dependencies;
|
|
8
|
+
const stackExport = await exportStackState.execute(app);
|
|
9
|
+
if (!stackExport) {
|
|
10
|
+
logger.info("No AWS Lambda functions to replace.");
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const functionNamesToUpdate = functionsList.list.map((fn)=>fn.name);
|
|
14
|
+
const replacedFunctionUrns = [];
|
|
15
|
+
if (stackExport.deployment?.resources) {
|
|
16
|
+
for (const resource of stackExport.deployment.resources)if ("aws:lambda/function:Function" === resource.type) {
|
|
17
|
+
const functionName = resource.inputs?.name;
|
|
18
|
+
if (functionName && functionNamesToUpdate.includes(functionName)) {
|
|
19
|
+
replacedFunctionUrns.push(resource.urn);
|
|
20
|
+
logger.debug(`Will replace Lambda function: ${functionName} (${resource.urn})`);
|
|
21
|
+
}
|
|
40
22
|
}
|
|
41
|
-
}
|
|
42
23
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
24
|
+
if (replacedFunctionUrns.length > 0) {
|
|
25
|
+
watchedLambdaFunctionsService.markDirty({
|
|
26
|
+
name: app.name,
|
|
27
|
+
deploymentId
|
|
28
|
+
}, replacedFunctionUrns);
|
|
29
|
+
logger.info(`Marked ${replacedFunctionUrns.length} Lambda function(s) for replacement on next deployment.`);
|
|
30
|
+
}
|
|
31
|
+
logger.info("replacing %s AWS Lambda function(s).", functionsList.meta.count);
|
|
32
|
+
const lambdaClient = new LambdaClient();
|
|
33
|
+
const replacementsPromises = functionsList.list.map(async (fn)=>{
|
|
34
|
+
const getFnConfigCmd = new GetFunctionConfigurationCommand({
|
|
35
|
+
FunctionName: fn.name
|
|
36
|
+
});
|
|
37
|
+
const lambdaFnConfiguration = await lambdaClient.send(getFnConfigCmd);
|
|
38
|
+
const updateFnCodeCmd = new UpdateFunctionCodeCommand({
|
|
39
|
+
FunctionName: fn.name,
|
|
40
|
+
ZipFile: fs.readFileSync(import.meta.dirname + "/handler/handler.zip")
|
|
41
|
+
});
|
|
42
|
+
await lambdaClient.send(updateFnCodeCmd);
|
|
43
|
+
let Description = lambdaFnConfiguration.Description || "";
|
|
44
|
+
if (!Description.endsWith(WATCH_MODE_NOTE_IN_DESCRIPTION)) Description += WATCH_MODE_NOTE_IN_DESCRIPTION;
|
|
45
|
+
const Timeout = increaseTimeout || DEFAULT_INCREASE_TIMEOUT;
|
|
46
|
+
await p_retry(()=>lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
47
|
+
FunctionName: fn.name,
|
|
48
|
+
Timeout,
|
|
49
|
+
Description,
|
|
50
|
+
Environment: {
|
|
51
|
+
Variables: {
|
|
52
|
+
...lambdaFnConfiguration.Environment?.Variables,
|
|
53
|
+
WEBINY_WATCH: JSON.stringify({
|
|
54
|
+
enabled: true,
|
|
55
|
+
localExecutionHandshakeTimeout,
|
|
56
|
+
sessionId,
|
|
57
|
+
iotEndpoint,
|
|
58
|
+
iotEndpointTopic,
|
|
59
|
+
functionName: fn.name
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})));
|
|
58
64
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
ZipFile: fs.readFileSync(import.meta.dirname + "/handler/handler.zip")
|
|
65
|
+
return Promise.all(replacementsPromises).then((res)=>{
|
|
66
|
+
logger.info("%s AWS Lambda function(s) replaced.", functionsList.meta.count);
|
|
67
|
+
return res;
|
|
63
68
|
});
|
|
64
|
-
await lambdaClient.send(updateFnCodeCmd);
|
|
65
|
-
let Description = lambdaFnConfiguration.Description || "";
|
|
66
|
-
if (!Description.endsWith(WATCH_MODE_NOTE_IN_DESCRIPTION)) {
|
|
67
|
-
Description += WATCH_MODE_NOTE_IN_DESCRIPTION;
|
|
68
|
-
}
|
|
69
|
-
const Timeout = increaseTimeout || DEFAULT_INCREASE_TIMEOUT;
|
|
70
|
-
await pRetry(() => lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
71
|
-
FunctionName: fn.name,
|
|
72
|
-
Timeout,
|
|
73
|
-
Description,
|
|
74
|
-
Environment: {
|
|
75
|
-
Variables: {
|
|
76
|
-
...lambdaFnConfiguration.Environment?.Variables,
|
|
77
|
-
WEBINY_WATCH: JSON.stringify({
|
|
78
|
-
enabled: true,
|
|
79
|
-
localExecutionHandshakeTimeout,
|
|
80
|
-
sessionId,
|
|
81
|
-
iotEndpoint,
|
|
82
|
-
iotEndpointTopic,
|
|
83
|
-
functionName: fn.name
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
})));
|
|
88
|
-
});
|
|
89
|
-
return Promise.all(replacementsPromises).then(res => {
|
|
90
|
-
logger.info("%s AWS Lambda function(s) replaced.", functionsList.meta.count);
|
|
91
|
-
return res;
|
|
92
|
-
});
|
|
93
69
|
};
|
|
70
|
+
export { replaceLambdaFunctions };
|
|
94
71
|
|
|
95
72
|
//# sourceMappingURL=replaceLambdaFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/Watch/replaceLambdaFunctions.js","sources":["../../../src/features/Watch/replaceLambdaFunctions.ts"],"sourcesContent":["import fs from \"fs\";\nimport pRetry from \"p-retry\";\nimport {\n GetFunctionConfigurationCommand,\n LambdaClient,\n UpdateFunctionCodeCommand,\n UpdateFunctionConfigurationCommand\n} from \"@webiny/aws-sdk/client-lambda/index.js\";\nimport {\n type ListAppLambdaFunctionsService,\n type LoggerService,\n type PulumiExportService,\n type WatchedLambdaFunctionsService,\n type UiService\n} from \"~/abstractions/index.js\";\nimport { type AppModel } from \"~/models/index.js\";\n\nconst WATCH_MODE_NOTE_IN_DESCRIPTION = \" (💡 local development mode, redeploy to remove)\";\nconst DEFAULT_INCREASE_TIMEOUT = 120;\n\nexport interface IReplaceLambdaFunctionsParams {\n app: AppModel;\n deploymentId: string | undefined;\n iotEndpoint: string;\n iotEndpointTopic: string;\n sessionId: number;\n functionsList: ListAppLambdaFunctionsService.Result;\n increaseTimeout?: number;\n localExecutionHandshakeTimeout?: number;\n dependencies: {\n uiService: UiService.Interface;\n loggerService: LoggerService.Interface;\n pulumiExportService: PulumiExportService.Interface;\n watchedLambdaFunctionsService: WatchedLambdaFunctionsService.Interface;\n };\n}\n\nexport const replaceLambdaFunctions = async ({\n app,\n deploymentId,\n iotEndpoint,\n iotEndpointTopic,\n sessionId,\n functionsList,\n increaseTimeout,\n localExecutionHandshakeTimeout,\n dependencies\n}: IReplaceLambdaFunctionsParams) => {\n const {\n loggerService: logger,\n pulumiExportService: exportStackState,\n watchedLambdaFunctionsService\n } = dependencies;\n\n const stackExport = await exportStackState.execute(app);\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 logger.info(\"No AWS Lambda functions to replace.\");\n return [];\n }\n\n // Find the URNs of Lambda functions that will be replaced\n const functionNamesToUpdate = functionsList.list.map(fn => fn.name);\n const replacedFunctionUrns: string[] = [];\n\n if (stackExport.deployment?.resources) {\n for (const resource of stackExport.deployment.resources) {\n if (resource.type === \"aws:lambda/function:Function\") {\n const functionName = resource.inputs?.name;\n if (functionName && functionNamesToUpdate.includes(functionName)) {\n replacedFunctionUrns.push(resource.urn);\n logger.debug(`Will replace Lambda function: ${functionName} (${resource.urn})`);\n }\n }\n }\n }\n\n // Mark these functions as needing replacement on next deployment\n if (replacedFunctionUrns.length > 0) {\n watchedLambdaFunctionsService.markDirty(\n { name: app.name, deploymentId },\n replacedFunctionUrns\n );\n logger.info(\n `Marked ${replacedFunctionUrns.length} Lambda function(s) for replacement on next deployment.`\n );\n }\n\n logger.info(\"replacing %s AWS Lambda function(s).\", functionsList.meta.count);\n const lambdaClient = new LambdaClient();\n\n const replacementsPromises = functionsList.list.map(async fn => {\n const getFnConfigCmd = new GetFunctionConfigurationCommand({ FunctionName: fn.name });\n const lambdaFnConfiguration = await lambdaClient.send(getFnConfigCmd);\n\n const updateFnCodeCmd = new UpdateFunctionCodeCommand({\n FunctionName: fn.name,\n ZipFile: fs.readFileSync(import.meta.dirname + \"/handler/handler.zip\")\n });\n\n await lambdaClient.send(updateFnCodeCmd);\n\n let Description = lambdaFnConfiguration.Description || \"\";\n if (!Description.endsWith(WATCH_MODE_NOTE_IN_DESCRIPTION)) {\n Description += WATCH_MODE_NOTE_IN_DESCRIPTION;\n }\n\n const Timeout = increaseTimeout || DEFAULT_INCREASE_TIMEOUT;\n\n await pRetry(() =>\n lambdaClient.send(\n new UpdateFunctionConfigurationCommand({\n FunctionName: fn.name,\n Timeout,\n Description,\n Environment: {\n Variables: {\n ...lambdaFnConfiguration.Environment?.Variables,\n WEBINY_WATCH: JSON.stringify({\n enabled: true,\n localExecutionHandshakeTimeout,\n sessionId,\n iotEndpoint,\n iotEndpointTopic,\n functionName: fn.name\n })\n }\n }\n })\n )\n );\n });\n\n return Promise.all(replacementsPromises).then(res => {\n logger.info(\"%s AWS Lambda function(s) replaced.\", functionsList.meta.count);\n return res;\n });\n};\n"],"names":["WATCH_MODE_NOTE_IN_DESCRIPTION","DEFAULT_INCREASE_TIMEOUT","replaceLambdaFunctions","app","deploymentId","iotEndpoint","iotEndpointTopic","sessionId","functionsList","increaseTimeout","localExecutionHandshakeTimeout","dependencies","logger","exportStackState","watchedLambdaFunctionsService","stackExport","functionNamesToUpdate","fn","replacedFunctionUrns","resource","functionName","lambdaClient","LambdaClient","replacementsPromises","getFnConfigCmd","GetFunctionConfigurationCommand","lambdaFnConfiguration","updateFnCodeCmd","UpdateFunctionCodeCommand","fs","Description","Timeout","pRetry","UpdateFunctionConfigurationCommand","JSON","Promise","res"],"mappings":";;;AAiBA,MAAMA,iCAAiC;AACvC,MAAMC,2BAA2B;AAmB1B,MAAMC,yBAAyB,OAAO,EACzCC,GAAG,EACHC,YAAY,EACZC,WAAW,EACXC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,EACbC,eAAe,EACfC,8BAA8B,EAC9BC,YAAY,EACgB;IAC5B,MAAM,EACF,eAAeC,MAAM,EACrB,qBAAqBC,gBAAgB,EACrCC,6BAA6B,EAChC,GAAGH;IAEJ,MAAMI,cAAc,MAAMF,iBAAiB,OAAO,CAACV;IACnD,IAAI,CAACY,aAAa;QAGdH,OAAO,IAAI,CAAC;QACZ,OAAO,EAAE;IACb;IAGA,MAAMI,wBAAwBR,cAAc,IAAI,CAAC,GAAG,CAACS,CAAAA,KAAMA,GAAG,IAAI;IAClE,MAAMC,uBAAiC,EAAE;IAEzC,IAAIH,YAAY,UAAU,EAAE,WACxB;QAAA,KAAK,MAAMI,YAAYJ,YAAY,UAAU,CAAC,SAAS,CACnD,IAAII,AAAkB,mCAAlBA,SAAS,IAAI,EAAqC;YAClD,MAAMC,eAAeD,SAAS,MAAM,EAAE;YACtC,IAAIC,gBAAgBJ,sBAAsB,QAAQ,CAACI,eAAe;gBAC9DF,qBAAqB,IAAI,CAACC,SAAS,GAAG;gBACtCP,OAAO,KAAK,CAAC,CAAC,8BAA8B,EAAEQ,aAAa,EAAE,EAAED,SAAS,GAAG,CAAC,CAAC,CAAC;YAClF;QACJ;IACJ;IAIJ,IAAID,qBAAqB,MAAM,GAAG,GAAG;QACjCJ,8BAA8B,SAAS,CACnC;YAAE,MAAMX,IAAI,IAAI;YAAEC;QAAa,GAC/Bc;QAEJN,OAAO,IAAI,CACP,CAAC,OAAO,EAAEM,qBAAqB,MAAM,CAAC,uDAAuD,CAAC;IAEtG;IAEAN,OAAO,IAAI,CAAC,wCAAwCJ,cAAc,IAAI,CAAC,KAAK;IAC5E,MAAMa,eAAe,IAAIC;IAEzB,MAAMC,uBAAuBf,cAAc,IAAI,CAAC,GAAG,CAAC,OAAMS;QACtD,MAAMO,iBAAiB,IAAIC,gCAAgC;YAAE,cAAcR,GAAG,IAAI;QAAC;QACnF,MAAMS,wBAAwB,MAAML,aAAa,IAAI,CAACG;QAEtD,MAAMG,kBAAkB,IAAIC,0BAA0B;YAClD,cAAcX,GAAG,IAAI;YACrB,SAASY,GAAG,YAAY,CAAC,YAAY,OAAO,GAAG;QACnD;QAEA,MAAMR,aAAa,IAAI,CAACM;QAExB,IAAIG,cAAcJ,sBAAsB,WAAW,IAAI;QACvD,IAAI,CAACI,YAAY,QAAQ,CAAC9B,iCACtB8B,eAAe9B;QAGnB,MAAM+B,UAAUtB,mBAAmBR;QAEnC,MAAM+B,QAAO,IACTX,aAAa,IAAI,CACb,IAAIY,mCAAmC;gBACnC,cAAchB,GAAG,IAAI;gBACrBc;gBACAD;gBACA,aAAa;oBACT,WAAW;wBACP,GAAGJ,sBAAsB,WAAW,EAAE,SAAS;wBAC/C,cAAcQ,KAAK,SAAS,CAAC;4BACzB,SAAS;4BACTxB;4BACAH;4BACAF;4BACAC;4BACA,cAAcW,GAAG,IAAI;wBACzB;oBACJ;gBACJ;YACJ;IAGZ;IAEA,OAAOkB,QAAQ,GAAG,CAACZ,sBAAsB,IAAI,CAACa,CAAAA;QAC1CxB,OAAO,IAAI,CAAC,uCAAuCJ,cAAc,IAAI,CAAC,KAAK;QAC3E,OAAO4B;IACX;AACJ"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
prepare() {
|
|
12
|
-
throw new Error("Not implemented.");
|
|
13
|
-
}
|
|
1
|
+
class BasePackagesWatcher {
|
|
2
|
+
constructor({ packages, params, logger }){
|
|
3
|
+
this.packages = packages;
|
|
4
|
+
this.params = params;
|
|
5
|
+
this.logger = logger;
|
|
6
|
+
}
|
|
7
|
+
prepare() {
|
|
8
|
+
throw new Error("Not implemented.");
|
|
9
|
+
}
|
|
14
10
|
}
|
|
11
|
+
export { BasePackagesWatcher };
|
|
15
12
|
|
|
16
13
|
//# sourceMappingURL=BasePackagesWatcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/Watch/watchers/BasePackagesWatcher.js","sources":["../../../../src/features/Watch/watchers/BasePackagesWatcher.ts"],"sourcesContent":["import { type ListPackagesService, type LoggerService, type Watch } from \"~/abstractions/index.js\";\n\nimport { type RunnableWatchProcesses } from \"./RunnableWatchProcesses.js\";\n\nexport interface IBasePackagesWatcherParams {\n packages: IBasePackagesWatcherPackage[];\n logger: LoggerService.Interface;\n params: Watch.Params;\n}\n\nexport type IBasePackagesWatcherPackage = ListPackagesService.Package;\n\nexport class BasePackagesWatcher {\n public readonly packages: IBasePackagesWatcherPackage[];\n public readonly params: Watch.Params;\n public readonly logger: LoggerService.Interface;\n\n public constructor({ packages, params, logger }: IBasePackagesWatcherParams) {\n this.packages = packages;\n this.params = params;\n this.logger = logger;\n }\n\n public prepare(): RunnableWatchProcesses {\n throw new Error(\"Not implemented.\");\n }\n}\n"],"names":["BasePackagesWatcher","packages","params","logger","Error"],"mappings":"AAYO,MAAMA;IAKT,YAAmB,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,MAAM,EAA8B,CAAE;QACzE,IAAI,CAAC,QAAQ,GAAGF;QAChB,IAAI,CAAC,MAAM,GAAGC;QACd,IAAI,CAAC,MAAM,GAAGC;IAClB;IAEO,UAAkC;QACrC,MAAM,IAAIC,MAAM;IACpB;AACJ"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { BasePackagesWatcher } from "./BasePackagesWatcher.js";
|
|
2
2
|
import { RunnableWatchProcess } from "./RunnableWatchProcess.js";
|
|
3
3
|
import { RunnableWatchProcesses } from "./RunnableWatchProcesses.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
4
|
+
class MultiplePackagesWatcher extends BasePackagesWatcher {
|
|
5
|
+
prepare() {
|
|
6
|
+
const packages = this.packages;
|
|
7
|
+
this.logger.debug("Building %s packages...", packages.length);
|
|
8
|
+
this.logger.debug("The following packages will be watched for changes:", packages);
|
|
9
|
+
return new RunnableWatchProcesses(packages.map((pkg)=>new RunnableWatchProcess({
|
|
10
|
+
buildParams: this.params,
|
|
11
|
+
pkg
|
|
12
|
+
})));
|
|
13
|
+
}
|
|
16
14
|
}
|
|
15
|
+
export { MultiplePackagesWatcher };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=MultiplePackagesWatcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/Watch/watchers/MultiplePackagesWatcher.js","sources":["../../../../src/features/Watch/watchers/MultiplePackagesWatcher.ts"],"sourcesContent":["import { BasePackagesWatcher } from \"./BasePackagesWatcher.js\";\nimport { RunnableWatchProcess } from \"./RunnableWatchProcess.js\";\nimport { RunnableWatchProcesses } from \"./RunnableWatchProcesses.js\";\n\nexport class MultiplePackagesWatcher extends BasePackagesWatcher {\n public override prepare() {\n const packages = this.packages;\n this.logger.debug(`Building %s packages...`, packages.length);\n this.logger.debug(\"The following packages will be watched for changes:\", packages);\n\n return new RunnableWatchProcesses(\n packages.map(pkg => {\n return new RunnableWatchProcess({\n buildParams: this.params,\n pkg\n });\n })\n );\n }\n}\n"],"names":["MultiplePackagesWatcher","BasePackagesWatcher","packages","RunnableWatchProcesses","pkg","RunnableWatchProcess"],"mappings":";;;AAIO,MAAMA,gCAAgCC;IACzB,UAAU;QACtB,MAAMC,WAAW,IAAI,CAAC,QAAQ;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2BA,SAAS,MAAM;QAC5D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uDAAuDA;QAEzE,OAAO,IAAIC,uBACPD,SAAS,GAAG,CAACE,CAAAA,MACF,IAAIC,qBAAqB;gBAC5B,aAAa,IAAI,CAAC,MAAM;gBACxBD;YACJ;IAGZ;AACJ"}
|