@qiwi/uniconfig-plugin-datatree
Advanced tools
Comparing version 3.2.2 to 3.3.0
@@ -0,1 +1,13 @@ | ||
# [@qiwi/uniconfig-plugin-datatree-v3.3.0](https://github.com/qiwi/uniconfig/compare/v3.2.2...v3.3.0) (2020-01-29) | ||
### Bug Fixes | ||
* **datatree:** handle arrays ([2e5d3f9](https://github.com/qiwi/uniconfig/commit/2e5d3f9fb78c877025414561e23a7ed06b04df9f)), closes [#217](https://github.com/qiwi/uniconfig/issues/217) | ||
### Features | ||
* **core:** pass execution context to pipe handlers ([9ca0ef8](https://github.com/qiwi/uniconfig/commit/9ca0ef81a0b2ead9215517e02b44564763547d39)) | ||
# [@qiwi/uniconfig-plugin-datatree-v3.2.2](https://github.com/qiwi/uniconfig/compare/v3.2.1...v3.2.2) (2019-12-29) | ||
@@ -2,0 +14,0 @@ |
{ | ||
"name": "@qiwi/uniconfig-plugin-datatree", | ||
"version": "3.2.2", | ||
"version": "3.3.0", | ||
"description": "uniconfig datatree plugin", | ||
@@ -9,3 +9,4 @@ "main": "target/es5/index.js", | ||
"clean": "rm -rf target", | ||
"jest": "NODE_ENV=test jest -w 1 --detectOpenHandles --config jest.config.json", | ||
"jest": "NODE_ENV=test BAZ=baz jest -w 1 --config jest.config.json", | ||
"test": "yarn run jest", | ||
"build:es5": "mkdir -p target/es5 && tsc -p tsconfig.build.json --target ES5 --outDir target/es5 -m CommonJS", | ||
@@ -37,12 +38,13 @@ "build:es6": "mkdir -p target/es6 && tsc -p tsconfig.build.json --target ES6 --outDir target/es6", | ||
"tslib": "^1.10.0", | ||
"@qiwi/uniconfig-core": "^3.2.1", | ||
"lodash": "^4.17.15" | ||
"@qiwi/uniconfig-core": "^3.2.2", | ||
"lodash": "^4.17.15", | ||
"@types/lodash": "^4.14.149" | ||
}, | ||
"devDependencies": { | ||
"typescript": "3.7.4", | ||
"@types/node": "^13.1.1", | ||
"ts-jest": "^24.2.0", | ||
"@types/jest": "^24.0.25", | ||
"jest": "^24.9.0" | ||
"typescript": "3.7.5", | ||
"@types/node": "^13.5.1", | ||
"ts-jest": "^25.0.0", | ||
"@types/jest": "^25.1.0", | ||
"jest": "^25.1.0" | ||
} | ||
} |
@@ -22,3 +22,3 @@ "use strict"; | ||
switch (true) { | ||
case /^\$.+:.*/.test(value): | ||
case typeof value === 'string' && /^\$.+:.*/.test(value): | ||
var _a = value.slice(1).split(':'), sourceName = _a[0], path = _a[1]; | ||
@@ -42,13 +42,13 @@ var source = sources[sourceName]; | ||
return result; | ||
}, {}); }; | ||
}, Array.isArray(data) ? [] : {}); }; | ||
exports.pipe = { | ||
name: exports.name, | ||
handleSync: function (input) { | ||
handleSync: function (_context, input) { | ||
var _a = input.sources, sources = _a === void 0 ? {} : _a, data = input.data; | ||
return exports.evaluate(data, lodash_1.mapValues(sources, function (_a) { | ||
var data = _a.data, pipeline = _a.pipeline; | ||
return uniconfig_core_1.pipeExecutor(data, pipeline, uniconfig_core_1.SYNC); | ||
return uniconfig_core_1.pipeExecutor(data, pipeline, uniconfig_core_1.SYNC, _context); | ||
})); | ||
}, | ||
handle: function (input) { | ||
handle: function (_context, input) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
@@ -62,3 +62,3 @@ var _a, sources, data, pairs; | ||
key: key, | ||
promise: uniconfig_core_1.pipeExecutor(data, pipeline, uniconfig_core_1.ASYNC), | ||
promise: uniconfig_core_1.pipeExecutor(data, pipeline, uniconfig_core_1.ASYNC, _context), | ||
}); | ||
@@ -65,0 +65,0 @@ }); |
@@ -19,3 +19,3 @@ import { __awaiter } from "tslib"; | ||
switch (true) { | ||
case /^\$.+:.*/.test(value): | ||
case typeof value === 'string' && /^\$.+:.*/.test(value): | ||
const [sourceName, path] = value.slice(1).split(':'); | ||
@@ -39,12 +39,12 @@ const source = sources[sourceName]; | ||
return result; | ||
}, {}); | ||
}, Array.isArray(data) ? [] : {}); | ||
export const pipe = { | ||
name, | ||
handleSync(input) { | ||
handleSync(_context, input) { | ||
const { sources = {}, data } = input; | ||
return evaluate(data, mapValues(sources, ({ data, pipeline }) => { | ||
return pipeExecutor(data, pipeline, SYNC); | ||
return pipeExecutor(data, pipeline, SYNC, _context); | ||
})); | ||
}, | ||
handle(input) { | ||
handle(_context, input) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -54,3 +54,3 @@ const { sources = {}, data } = input; | ||
key, | ||
promise: pipeExecutor(data, pipeline, ASYNC), | ||
promise: pipeExecutor(data, pipeline, ASYNC, _context), | ||
})); | ||
@@ -57,0 +57,0 @@ return Promise |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19056
4
+ Added@types/lodash@^4.14.149
+ Added@types/lodash@4.17.15(transitive)
Updated@qiwi/uniconfig-core@^3.2.2