|
|
@ -1,7 +1,6 @@
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
const isArguments = require("is-arguments");
|
|
|
|
const isArguments = require("is-arguments");
|
|
|
|
const flatten = require("flatten");
|
|
|
|
|
|
|
|
const asExpression = require("as-expression");
|
|
|
|
const asExpression = require("as-expression");
|
|
|
|
const syncpipe = require("syncpipe");
|
|
|
|
const syncpipe = require("syncpipe");
|
|
|
|
|
|
|
|
|
|
|
@ -68,7 +67,7 @@ function applyDefinitions(args, definitions, remainingArgumentsIndex) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
errors: syncpipe(results, [
|
|
|
|
errors: syncpipe(results, [
|
|
|
|
(_) => _.map((result) => result.errors),
|
|
|
|
(_) => _.map((result) => result.errors),
|
|
|
|
(_) => flatten(_) // TODO: Switch to `Array#flat` once Node 10.x goes EOL (April 2021)
|
|
|
|
(_) => _.flat(Infinity)
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
newValue: results.map((result) => result.newValue)
|
|
|
|
newValue: results.map((result) => result.newValue)
|
|
|
|
};
|
|
|
|
};
|
|
|
|