@farmart-tech/brave-window-core
    Preparing search index...

    Class FeatureConfig

    Manages maintenance window configurations and provides evaluation logic for downtimes.

    const config = new FeatureConfig('my-feature', remoteConfig);
    if (config.getIsInMaintenance()) {
    showMaintenancePage();
    }
    Index

    Constructors

    Properties

    featureName: string

    Methods

    • Finds the currently active release plan based on current time.

      Returns FeatureReleasePlan | null

      The active release plan, or null if no downtime is currently active

      const currentDowntime = config.getActiveRelease();
      if (currentDowntime) {
      console.log(`Downtime ends at: ${currentDowntime.downtimeEndAt}`);
      }
    • Retrieves the current version string from configuration.

      Returns string | null

      The version string, or null if not set

    • Internal

      Checks if the configuration data came from the global workspace.

      Returns boolean

      True if global fallback data

    • Determines if the feature is currently in a maintenance window for the given scope.

      Parameters

      • scope: string = '*'

        The application scope to check (e.g., 'web', 'ios', or '*' for any)

      • strategy: MaintenanceStrategy = 'auto'

        Maintenance strategy to apply ('auto', 'always', or 'none')

      Returns boolean

      True if currently in maintenance

      const isMaintenance = config.getIsInMaintenance('ios', 'auto');
      
    • Finds the next scheduled release plan in the future.

      Returns FeatureReleasePlan | null

      The next upcoming release plan, or null if none are scheduled

      const nextDowntime = config.getNextActiveRelease();
      if (nextDowntime) {
      notifyUsers(`Planned maintenance on ${nextDowntime.downtimeStartAt}`);
      }