Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

screwdriver-executor-router

Package Overview
Dependencies
Maintainers
8
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screwdriver-executor-router - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

26

index.js

@@ -59,3 +59,7 @@ 'use strict';

name: 'weighted',
check: () => this.getWeightedExecutor(this._executors)
check: buildConfig => {
const allowedExecutors = this.checkExclusions(this._executors, buildConfig.container);
return this.getWeightedExecutor(allowedExecutors);
}
},

@@ -98,2 +102,22 @@ {

/**
* Checks if executor is excluded for a container.
* @method checkExclusions
* @param {Array} executors
* @param {String} container
*/
checkExclusions(executors, container) {
return executors.filter(executor => {
const { exclusions } = executor;
if (!exclusions) return true;
return !exclusions.some(item => {
const regEx = new RegExp(item, 'gi');
return container.match(regEx);
});
});
}
/**
* Evaluates the executor rules by priority and returns the first matching executor

@@ -100,0 +124,0 @@ * @method getExecutor

2

package.json
{
"name": "screwdriver-executor-router",
"version": "1.1.1",
"version": "1.2.0",
"description": "A generic plugin for routing builds to specified executors",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc