lib/runtime/adapters.js
function checkCompatible(type, modulePath, location) {
    var adapterPackage = require(path.join(modulePath, 'package.json'));
    var adapterJuttleVersion = adapterPackage.juttleAdapterAPI;
    if (!adapterJuttleVersion) {
        throw errors.compileError('INCOMPATIBLE-ADAPTER', {
            type,
            adapterJuttleVersion: '(unknown)',
            apiVersion: JuttleAdapterAPI.version,
            location
        });
    }

    if (!semver.satisfies(JuttleAdapterAPI.version, adapterJuttleVersion)) {
        throw errors.compileError('INCOMPATIBLE-ADAPTER', {
            type,
            adapterJuttleVersion,
            apiVersion: JuttleAdapterAPI.version,
            location
        });
    }
}
function checkCompatible(type, modulePath, location) {
    var adapterPackage = require(path.join(modulePath, 'package.json'));
    var adapterJuttleVersion = adapterPackage.juttleAdapterAPI;
    if (!adapterJuttleVersion) {
        throw errors.compileError('INCOMPATIBLE-ADAPTER', {
            type,
            adapterJuttleVersion: '(unknown)',
            apiVersion: JuttleAdapterAPI.version,
            location
        });
    }

    if (!semver.satisfies(JuttleAdapterAPI.version, adapterJuttleVersion)) {
        throw errors.compileError('INCOMPATIBLE-ADAPTER', {
            type,
            adapterJuttleVersion,
            apiVersion: JuttleAdapterAPI.version,
            location
        });
    }
}
function checkCompatible ( type , modulePath , location ) { var adapterPackage = require ( path . join ( modulePath , 'package.json' ) ) ; var adapterJuttleVersion = adapterPackage . juttleAdapterAPI ; if ( ! adapterJuttleVersion ) { throw errors . compileError ( 'INCOMPATIBLE-ADAPTER' , { type , adapterJuttleVersion : '(unknown)' , apiVersion : JuttleAdapterAPI . version , location } ) ; } if ( ! semver . satisfies ( JuttleAdapterAPI . version , adapterJuttleVersion ) ) { throw errors . compileError ( 'INCOMPATIBLE-ADAPTER' , { type , adapterJuttleVersion , apiVersion : JuttleAdapterAPI . version , location } ) ; } }
Check whether the given adapter is compatible with this version of the juttle runtime by extracting the juttleAdapterAPI entry from the adapter's package.json and comparing it to the declared version of the API.
Check whether the given adapter is compatible with this version of the juttle runtime by extracting the juttleAdapterAPI entry from the adapter s package . json and comparing it to the declared version of the API .