Skip to content

Commit 9e3b9b2

Browse files
author
John Gilbert
committed
enabled pipelines env var
1 parent 420d280 commit 9e3b9b2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-lambda-stream",
3-
"version": "1.1.13",
3+
"version": "1.1.14",
44
"description": "Create stream processors with AWS Lambda functions.",
55
"keywords": [
66
"aws",

src/pipelines/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export const initializeFrom = (rules) => rules.reduce(
4949
);
5050

5151
const assemble = (opt) => (head, includeFaultHandler = true) => {
52-
const enabledPipelines = (opt.ENABLED_PIPELINES || process.env.ENABLED_PIPELINES)?.split(',');
53-
const disabledPipelines = (opt.DISABLED_PIPELINES || process.env.DISABLED_PIPELINES)?.split(',');
52+
const enabledPipelines = (opt.ENABLED_PIPELINES || process.env.ENABLED_PIPELINES)?.split(',').map((pipeline) => pipeline.trim());
53+
const disabledPipelines = (opt.DISABLED_PIPELINES || process.env.DISABLED_PIPELINES)?.split(',').map((pipeline) => pipeline.trim());
5454
const keys = Object.keys(thePipelines)
5555
.filter((k) => !disabledPipelines?.includes(k))
5656
.filter((k) =>

test/unit/pipelines/pipelines.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('pipelines/index.js', () => {
5252
});
5353

5454
it('should only run enabled pipelines - string', (done) => {
55-
process.env.ENABLED_PIPELINES = 'p1,p1b';
55+
process.env.ENABLED_PIPELINES = 'p1,p1b '; // extra space on purpose
5656
let counter = 0;
5757

5858
const count = (uow) => {

0 commit comments

Comments
 (0)