@nospamproxy/core
    Preparing search index...

    The evaluator service to evaluate the API versions. Used to filter out incompatible (due to incompatible API version range) routes and menus.

    Note that during bootstrapping phase, a singleton instance is registered. Hence, instead of creating a new evaluator, you can get it injected.

    Index

    Constructors

    • Parameters

      • baseServiceEndpoint: string
      • httpClient: HttpClient

      Returns ApiVersionEvaluator

    Accessors

    • get currentApiVersions(): Readonly<Map<string, SemVer | null>>

      Returns Readonly<Map<string, SemVer | null>>

    Methods

    • Returns void

    • Verifies if the given version specification is satisfied by the current versions of the APIs.

      Parameters

      • OptionalversionSpecs: Readonly<Record<string, string>> | null

      Returns boolean

      true if the specification is satisfied, else false.

      evaluator.isApiVersionsSatisfied({
      foo: '^1.5',
      bar: '<2.3',
      });
    • Verifies if the version specification for the given app is satisfied by the current versions of the APIs.

      Parameters

      • app: Partial<MenuApp>

        For which the version specification needs to be evaluated.

      Returns boolean

      true if the specification is satisfied, else false.

      evaluator.isApiVersionsSatisfiedForApp({
      settings: {
      apiVersions: {
      foo: '^1.5',
      bar: '<2.3',
      }
      }
      });
    • Helper method that can be used to wait for initialization.

      Returns Promise<void>