Ghost/ghost/adapter-manager
Daniel Lockyer 713a81455d
Deleted types/ folders
- these should no longer be needed because the cross-linking of packages
  makes jsdoc types Just Work ™️
2022-08-04 19:42:22 +02:00
..
lib
test Remove trailing commas from .eslintrc.js files 2020-08-04 14:48:07 +01:00
.eslintrc.js
index.js
package.json Pinned dependencies (#15100) 2022-07-26 16:06:00 +02:00
README.md

Adapter Manager

A manager for retrieving custom "adapters" - can be used to abstract away from custom implementations

Usage

const AdapterManager = require('@tryghost/adapter-manager');

const adapterManager = new AdapterManager({
    pathsToAdapters: [
        '/path/to/custom/adapters',
        '/path/to/default/adapters'
    ]
});

class MailAdapterBase {
    someMethod() {}
}

adapterManager.register('mail', MailAdapterBase);

const mailAdapterInstance = adapterManager.getAdapter('mail', 'direct', mailConfig);

mailAdapterInstance.someMethod();