🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

electrode-ota-server-dao-mariadb

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrode-ota-server-dao-mariadb

Electrode OTA - MariaDB driver

latest
Source
npmnpm
Version
4.8.4
Version published
Weekly downloads
4
-63.64%
Maintainers
2
Weekly downloads
 
Created
Source

electrode-ota-server-dao-mariadb

An implementation of the Electrode OTA Server's data access layer using MariaDB as a back-end.

Usage

In your electrode ota server implementation, include this module as a dependency.

npm install --save electrode-ota-server-dao-mariadb

Update your OTA server configuration to override the DAO plugin. This is assuming your config is in JavaScript format (not JSON).

const conf = {
    plugins : {
        // ...

        "electrode-ota-server-dao-plugin" : {
            module : "electrode-ota-server-dao-mariadb",
            // connection options based on typeorm;
            // 'type' and 'entities' are defaulted but may be overriden
            options : {
                clusterConfig : {
                    canRetry : true,
                    defaultSelector : "ORDER",
                    removeNodeErrorCount : 5,
                    restoreNodeTimeout : 0,
                },
                poolConfigs : [{
                    database: "bento_ota",
                    host: "localhost",
                    password: "password",
                    port: 3306,
                    user: "user",
                }],
            }
        },

        // ...
    }
}

The clusterConfig is the settings for the mysql PoolCluster options.

The poolConfigs property is an array of Connection options.

The database schema can be found at electrode-ota-mariadb-schema

To run tests

Start docker MariaDB in electrode-ota-mariadb-schema

% docker-compose up ota-db

Run tests in this directory

% yarn test

Run build (compiles typescript)

% yarn build

Keywords

code-push

FAQs

Package last updated on 22 Feb 2021

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