ECS support infra - Introducing ECS feature flag read call via a common module
This module can be consumed for reading the latest feature flags set for a user in both desktop and web extension. The API call will currently honor userId, tenantId, region and tenantId filters. More filters support will be introduced in subsequent PR.
Covered: Why direct ECS API consumption here: ECS JS library is currently not supported for external repo - so this integration has a go ahead to directly consume the ECS API.
NOTE: AI generated details below this line:
This pull request introduces a new feature configuration system for the project, including the addition of a new ECSFeaturesClient class and related utilities. The most significant changes involve the creation of a set of new files in the src/common/ecs-features directory, each of which contributes to the overall functionality of the feature configuration system. Additionally, a minor change was made to src/web/client/utilities/commonUtil.ts.
Here is a detailed summary of the changes:
New Constants and Types:
-
src/common/ecs-features/constants.ts: Added constants related to the ECS feature system, such asECS_REQUEST_URL_TEMPLATEandPowerPagesClientName.
New Client for ECS Features:
-
src/common/ecs-features/ecsFeatureClient.ts: Introduced theECSFeaturesClientclass, which is responsible for initializing and getting the configuration of ECS features.
New Interfaces for ECS Features:
-
src/common/ecs-features/ecsFeatureFlagFilters.ts: Added theECSAPIFeatureFlagFiltersinterface, which represents the filters used for ECS API feature flags. -
src/common/ecs-features/ecsFeatureProperties.ts: Introduced theECSFeatureDefinitionandECSFeatureInfointerfaces, which represent the properties of an ECS feature. Also added a functioncreateECSFeatureDefinitionto create a feature object based on the feature definition.
New Utilities for ECS Features:
-
src/common/ecs-features/ecsFeatureUtil.ts: Added utility functions likegetECSRequestURLandpowerPagesFeatureClientto support the ECS feature system.
Feature Gates:
-
src/common/ecs-features/ecsFeatureGates.ts: Defined theEnableMultifileVscodeWebfeature and its fallback configuration.
Minor Change:
-
src/web/client/utilities/commonUtil.ts: A line break was added after thegetBackToStudioURLfunction.