Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Support for option resolvers #9

@asilvas

Description

@asilvas

This would allow custom callbacks to be invoked to fetch the actual values asynchronously. Especially handy for secure options, or options stored in a central location.

Could look something like:

  // dev.yaml
  MySpecialKey:
    resolver: my-special-resolver-module
  // my-special-resolver-module.js
  module.exports = function(key, originalValue, cb) {
    // do something here to determine actual value
    cb(null, actualValue);
  };

And not that it would useful, but another side-effect of this feature would be to transform values (not sure why you'd do that, but seems an interesting possibility). Since the resolver has the original value (if values is defined), it technically could compute/transform a different value as a result.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions