Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@tryghost/adapter-manager

Package Overview
Dependencies
Maintainers
22
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/adapter-manager

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

latest
Source
npmnpm
Version
0.2.33
Version published
Weekly downloads
442
-18%
Maintainers
22
Weekly downloads
 
Created
Source

Adapter Manager

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

Install

npm install @tryghost/adapter-manager --save

or

yarn add @tryghost/adapter-manager

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();

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  • git clone this repo & cd into it as usual
  • Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.

FAQs

Package last updated on 22 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts