@flowscripter/dynamic-cli-framework
    Preparing search index...

    Class DefaultKeyValueService

    Bound permanently to a single scope's data at construction - never re-pointed afterward. Create a separate instance per scope (see KeyValueServiceProvider.getScopedKeyValueService), rather than sharing one instance across scopes.

    Implements

    Index
    • Get the value for a specified key in the keystore.

      Recursively resolves any string leaf - at any depth within the stored value - which is a secret sentinel, retrieving its actual value via SecretService. This covers both values written via set using a nested Secret, and secret references a user hand-embeds directly (nested arbitrarily deep) in the CLI's JSON config file.

      Type Parameters

      • T extends ValueNode = ValueNode

      Parameters

      • key: string

      Returns Promise<T>

    • Set a value for a specified key in the keystore.

      Any node within value wrapped in Secret - at any depth - is serialized as JSON and stored as an OS-native secret via SecretService, with a sentinel reference kept in its place in the stored structure. All other data is stored as plain (unencrypted) config data. Storing a secret requires that the service was constructed with secret support enabled.

      Parameters

      • key: string
      • value: SettableValueNode

      Returns Promise<void>