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

proxima_datareader

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxima_datareader - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

76

dist/index.js

@@ -54,3 +54,3 @@ "use strict";

var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var searchTypes, renderTypes, fileTypes, messages, searchParams, _searchParams, searchTypeName, keysDataType, _getKeysData, _getKeysData2, keys, keysFolder, resFolder, functionNames, processingType, resFolderFilesList, jsonFilesList, fileToRender, selectedDataPath, _params, filesSource, paths, _$partition, _$partition2, emptySources, notEmptySources, processedDataPath, processData, totalInfo, params;
var searchTypes, renderTypes, fileTypes, messages, searchParams, _searchParams, searchTypeName, keysDataType, _getKeysData, _getKeysData2, keys, keysFolder, resFolder, resFolderFilesList, jsonFilesList, fileToRender, selectedDataPath, _params, filesSource, paths, _$partition, _$partition2, emptySources, notEmptySources, processedDataPath, functionNames, processingType, totalInfo, params;

@@ -93,13 +93,2 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

functionNames = _lodash["default"].keys(calculators);
processingType = (0, _askUser.selectProcessingType)(functionNames);
if (processingType) {
_context.next = 16;
break;
}
return _context.abrupt("return");
case 16:
resFolderFilesList = _fs["default"].readdirSync(resFolder);

@@ -111,3 +100,3 @@ jsonFilesList = resFolderFilesList.filter(function (fileName) {

if (!(jsonFilesList.length > 0)) {
_context.next = 25;
_context.next = 23;
break;

@@ -119,3 +108,3 @@ }

if (!fileToRender) {
_context.next = 25;
_context.next = 23;
break;

@@ -126,6 +115,15 @@ }

_params = (0, _askUser.getRenderParams)(renderTypes, resFolder);
(0, _rendering["default"])(selectedDataPath, _params, processingType);
if (_params) {
_context.next = 21;
break;
}
return _context.abrupt("return");
case 25:
case 21:
(0, _rendering["default"])(selectedDataPath, _params);
return _context.abrupt("return");
case 23:
filesSource = (0, _askUser.getFilesSource)(_defaults.defaultValues);

@@ -138,27 +136,37 @@ paths = (0, _processors.makePaths)(filesSource, fileTypes);

if (!(emptySources.length > 0)) {
_context.next = 31;
_context.next = 29;
break;
}
_context.next = 31;
_context.next = 29;
return (0, _askUser.writeDownPaths)(emptySources, resFolder, 'empty');
case 31:
case 29:
// const encodingPos = readlineSync.keyInSelect(encodings, 'Please select files encoding');
// const [encoding] = encodings;
processedDataPath = (0, _askUser.getProcessedDataPath)(resFolder);
functionNames = _lodash["default"].keys(calculators);
processingType = (0, _askUser.selectProcessingType)(functionNames);
if (processingType) {
_context.next = 34;
break;
}
return _context.abrupt("return");
case 34:
messages.onGoing();
_context.next = 35;
_context.next = 37;
return (0, _processors.makeDataStream)(notEmptySources, searchTypeName, keys, resFolder);
case 35:
processData = calculators[processingType];
_context.next = 38;
return (0, _processors.makeStructuredData)(resFolder, processData);
case 37:
_context.next = 39;
return (0, _processors.makeStructuredData)(resFolder, processingType);
case 38:
case 39:
totalInfo = _context.sent;
if (!(_lodash["default"].size(totalInfo) === 0)) {
_context.next = 42;
_context.next = 43;
break;

@@ -170,11 +178,11 @@ }

case 42:
_context.next = 44;
case 43:
_context.next = 45;
return (0, _processors.writeToJson)(totalInfo, processedDataPath);
case 44:
case 45:
params = (0, _askUser.getRenderParams)(renderTypes, resFolder);
if (params) {
_context.next = 47;
_context.next = 48;
break;

@@ -185,6 +193,6 @@ }

case 47:
(0, _rendering["default"])(processedDataPath, params, processingType);
case 48:
(0, _rendering["default"])(processedDataPath, params);
case 48:
case 49:
case "end":

@@ -221,2 +229,2 @@ return _context.stop();

exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJhcHAiLCJzZWFyY2hUeXBlcyIsImRlZmF1bHRWYWx1ZXMiLCJyZW5kZXJUeXBlcyIsImZp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Wildcard(require("./calculations"));
var _StreamReader = _interopRequireDefault(require("./StreamReader"));

@@ -98,3 +100,3 @@

var makeStructuredData = function makeStructuredData(resFolder, processData) {
var makeStructuredData = function makeStructuredData(resFolder, processingType) {
return new Promise(function (resolve, reject) {

@@ -105,3 +107,5 @@ var totalInfo = {};

if (!processData) {
var processDataFn = calculators[processingType];
if (!processDataFn) {
resolve(totalInfo);

@@ -117,5 +121,9 @@ return;

processData(filePath, selectedData, totalInfo);
processDataFn(filePath, selectedData, totalInfo);
}).on('end', function () {
resolve(totalInfo);
var data = {
processedBy: processingType,
totalInfo: totalInfo
};
resolve(data);
}).on('error', reject);

@@ -183,2 +191,2 @@ });

exports.selectZeroMovements = selectZeroMovements;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wcm9jZXNzaW5nL3Byb2Nlc3NvcnMuanMiXSwibmFtZXMiOlsibWFrZVBhdGhzIiwic291cmNlIiwiZmlsZVR5cGVzIiwicGF0aHNMaXN0IiwiaW5mbyIsImZzIiwic3RhdFN5bmMiLCJzaXplIiwiaXNEaXJlY3RvcnkiLCJmaWxlRXh0IiwicGF0aCIsImV4dG5hbWUiLCJpc0NvcnJlY3RGb3JtYXQiLCJpbmNsdWRlcyIsImRpckNvbnRlbnQiLCJyZWFkZGlyU3luYyIsInJlc0NvbnRlbnRDb2xsIiwicmVkdWNlIiwiYWNjIiwibmFtZSIsImlubmVyUGF0aCIsImpvaW4iLCJtYWtlRGF0YVN0cmVhbSIsInBhdGhEYXRhQ29sbCIsInNlYXJjaFR5cGUiLCJrZXlzIiwicmVzRm9sZGVyIiwicmVhZGFibGVQYXRocyIsIkN1c3RvbVJlYWRlciIsIm9iamVjdE1vZGUiLCJoaWdoV2F0ZXJNYXJrIiwid3JpdGVDb2xsIiwiY3JlYXRlV3JpdGVTdHJlYW0iLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsInBpcGU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fSk7XG5cbiAgICByZXR1cm4gaGFzWmVyb3M7XG4gIH0pO1xuXG4gIGNvbnN0IFt6ZXJvQ291bnRzLCByZXN0XSA9IHNlcGFyYXRlZEl0ZW1zO1xuICBjb25zdCBbbWF0Y2hlZFBhdGhzXSA9IF8udW56aXAoemVyb0NvdW50cyk7XG4gIGNvbnN0IFtkYXRhUGF0aHNdID0gXy51bnppcChyZXN0KTtcblxuICByZXR1cm4gW21hdGNoZWRQYXRocywgZGF0YVBhdGhzXTtcbn07XG4iXX0=

@@ -34,5 +34,19 @@ "use strict";

var renderAndWrite = function renderAndWrite(content, renderFn, renderedDataPath) {
var renderFunctions = {
processByStores: {
total: _totalValues["default"].bind(null, 'brNick'),
detailed: _detailedByStores["default"]
},
processByChainDrugCodes: {
total: _totalValues["default"].bind(null, 'chainDrugCode'),
detailed: _detailedByChainCodes["default"]
}
};
var renderAndWrite = function renderAndWrite(content, renderedDataPath, renderType) {
var data = JSON.parse(content);
var renderedDataColl = renderFn(data);
var processedBy = data.processedBy,
totalInfo = data.totalInfo;
var render = renderFunctions[processedBy][renderType];
var renderedDataColl = render(totalInfo);

@@ -51,14 +65,3 @@ var renderedToDestination = _fs["default"].createWriteStream(renderedDataPath);

var _default = function _default(processedDataPath, params, renderingType) {
var renderFunctions = {
processByStores: {
total: _totalValues["default"].bind(null, 'brNick'),
detailed: _detailedByStores["default"]
},
processByChainDrugCodes: {
total: _totalValues["default"].bind(null, 'chainDrugCode'),
detailed: _detailedByChainCodes["default"]
}
};
var _default = function _default(processedDataPath, params) {
var _params = _slicedToArray(params, 2),

@@ -68,3 +71,2 @@ renderedDataPath = _params[0],

var render = renderFunctions[renderingType][renderType];
var content = '';

@@ -75,3 +77,3 @@

}).on('end', function () {
renderAndWrite(content, render, renderedDataPath);
renderAndWrite(content, renderedDataPath, renderType);
});

@@ -81,2 +83,2 @@ };

exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3Vy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SZW5kZXJlZERhdGEgPSBuZXcgQ3VzdG9tUmVhZGVyKHJlbmRlcmVkRGF0YUNvbGwsIHtcbiAgICBvYmplY3RNb2RlOiB0cnVlLFxuICAgIGhpZ2hXYXRlck1hcms6IDEsXG4gIH0pO1xuXG4gIG1ha2VSZWFkYWJsZVJlbmRlcmVkRGF0YVxuICAgIC5waXBlKG1ha2VGaW5hbFN0cihyZW5kZXJlZERhdGFDb2xsKSlcbiAgICAucGlwZShyZW5kZXJlZFRvRGVzdGluYXRpb24pXG4gICAgLm9uKCdmaW5pc2gnLCAoKSA9PiB7XG4gICAgICBjb25zb2xlLmxvZyhgUmVuZGVyZWQgZGF0YSBhcmUgc2F2ZWQgaW4gJHtyZW5kZXJlZERhdGFQYXRofVxcbmApO1xuICAgICAgY29uc29sZS5sb2coJ1xcbi0tLS0tLS0gQWxsIGRhdGEgYXJlIHByb2Nlc3NlZCAtLS0tLS0tXFxuJyk7XG4gICAgfSk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCAocHJvY2Vzc2VkRGF0YVBhdGgsIHBhcmFtcykgPT4ge1xuICBjb25zdCBbcmVuZGVyZWREYXRhUGF0aCwgcmVuZGVyVHlwZV0gPSBwYXJhbXM7XG4gIGxldCBjb250ZW50ID0gJyc7XG4gIGZzLmNyZWF0ZVJlYWRTdHJlYW0ocHJvY2Vzc2VkRGF0YVBhdGgpXG4gICAgLm9uKCdkYXRhJywgKGNodW5rKSA9PiB7XG4gICAgICBjb250ZW50ICs9IGNodW5rO1xuICAgIH0pXG4gICAgLm9uKCdlbmQnLCAoKSA9PiB7XG4gICAgICByZW5kZXJBbmRXcml0ZShjb250ZW50LCByZW5kZXJlZERhdGFQYXRoLCByZW5kZXJUeXBlKTtcbiAgICB9KTtcbn07XG4iXX0=
{
"name": "proxima_datareader",
"version": "1.5.0",
"version": "1.5.1",
"description": "data reader & selector 4 incoming data files having 1 of following extensions: \n'.mdr', '.mwr', '.mmr', '.mdi', '.mwi', '.mmi'",

@@ -5,0 +5,0 @@ "scripts": {

@@ -52,8 +52,2 @@ import fs from 'fs';

const functionNames = _.keys(calculators);
const processingType = selectProcessingType(functionNames);
if (!processingType) {
return;
}
const resFolderFilesList = fs.readdirSync(resFolder);

@@ -67,3 +61,6 @@ const jsonFilesList = resFolderFilesList

const params = getRenderParams(renderTypes, resFolder);
makeRender(selectedDataPath, params, processingType);
if (!params) {
return;
}
makeRender(selectedDataPath, params);
return;

@@ -82,7 +79,11 @@ }

const processedDataPath = getProcessedDataPath(resFolder);
const functionNames = _.keys(calculators);
const processingType = selectProcessingType(functionNames);
if (!processingType) {
return;
}
messages.onGoing();
await makeDataStream(notEmptySources, searchTypeName, keys, resFolder);
const processData = calculators[processingType];
const totalInfo = await makeStructuredData(resFolder, processData);
const totalInfo = await makeStructuredData(resFolder, processingType);
if (_.size(totalInfo) === 0) {

@@ -97,3 +98,3 @@ messages.noData();

}
makeRender(processedDataPath, params, processingType);
makeRender(processedDataPath, params);
};

@@ -100,0 +101,0 @@

@@ -6,2 +6,3 @@ import fs from 'fs';

import * as streams from './transformStreams';
import * as calculators from './calculations';
import CustomReader from './StreamReader';

@@ -49,6 +50,7 @@ import 'regenerator-runtime';

export const makeStructuredData = (resFolder, processData) => new Promise((resolve, reject) => {
export const makeStructuredData = (resFolder, processingType) => new Promise((resolve, reject) => {
const totalInfo = {};
const readable = fs.createReadStream(`${resFolder}/temp_data.txt`);
if (!processData) {
const processDataFn = calculators[processingType];
if (!processDataFn) {
resolve(totalInfo);

@@ -61,6 +63,7 @@ return;

const [filePath, selectedData] = dataPair.split('---');
processData(filePath, selectedData, totalInfo);
processDataFn(filePath, selectedData, totalInfo);
})
.on('end', () => {
resolve(totalInfo);
const data = { processedBy: processingType, totalInfo };
resolve(data);
})

@@ -67,0 +70,0 @@ .on('error', reject);

@@ -8,6 +8,18 @@ import fs from 'fs';

const renderFunctions = {
processByStores: {
total: total.bind(null, 'brNick'),
detailed: detailedByStores,
},
processByChainDrugCodes: {
total: total.bind(null, 'chainDrugCode'),
detailed: detailedByCodes,
},
};
const renderAndWrite = (content, renderFn, renderedDataPath) => {
const renderAndWrite = (content, renderedDataPath, renderType) => {
const data = JSON.parse(content);
const renderedDataColl = renderFn(data);
const { processedBy, totalInfo } = data;
const render = renderFunctions[processedBy][renderType];
const renderedDataColl = render(totalInfo);
const renderedToDestination = fs.createWriteStream(renderedDataPath);

@@ -29,16 +41,4 @@

export default (processedDataPath, params, renderingType) => {
const renderFunctions = {
processByStores: {
total: total.bind(null, 'brNick'),
detailed: detailedByStores,
},
processByChainDrugCodes: {
total: total.bind(null, 'chainDrugCode'),
detailed: detailedByCodes,
},
};
export default (processedDataPath, params) => {
const [renderedDataPath, renderType] = params;
const render = renderFunctions[renderingType][renderType];
let content = '';

@@ -50,4 +50,4 @@ fs.createReadStream(processedDataPath)

.on('end', () => {
renderAndWrite(content, render, renderedDataPath);
renderAndWrite(content, renderedDataPath, renderType);
});
};
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