tso-data-models
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -38,7 +38,3 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var node_fetch_1 = __importDefault(require("node-fetch")); | ||
var ExchangeAPI = /** @class */ (function () { | ||
@@ -52,17 +48,10 @@ function ExchangeAPI(endpoint, exchangeInterface) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var resultData, data, listOfResults; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
if (!this._dueForUpdate()) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, (0, node_fetch_1.default)(this.endpoint)]; | ||
case 1: | ||
resultData = _a.sent(); | ||
return [4 /*yield*/, resultData.json()]; | ||
case 2: | ||
data = _a.sent(); | ||
listOfResults = this.exchangeInterface.processResponse(data); | ||
_a.label = 3; | ||
case 3: return [2 /*return*/]; | ||
if (this._dueForUpdate()) { | ||
// const resultData = await fetch(this.endpoint); | ||
// const data = await resultData.json(); | ||
// const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data); | ||
// this._writeDataToCSV(listOfResults); | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
@@ -69,0 +58,0 @@ }); |
{ | ||
"name": "tso-data-models", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "", | ||
@@ -16,6 +16,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@types/node-fetch": "^3.0.3", | ||
"ethers": "^5.4.6", | ||
"node-fetch": "^3.0.0" | ||
"ethers": "^5.4.6" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import fetch from 'node-fetch'; | ||
//import fetch from 'node-fetch'; | ||
import DataPoint, { DataPointFactory } from '../data-point/DataPoint'; | ||
@@ -17,5 +17,5 @@ import ExchangeInterface from './ExchangeInterface' | ||
if (this._dueForUpdate()) { | ||
const resultData = await fetch(this.endpoint); | ||
const data = await resultData.json(); | ||
const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data); | ||
// const resultData = await fetch(this.endpoint); | ||
// const data = await resultData.json(); | ||
// const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data); | ||
// this._writeDataToCSV(listOfResults); | ||
@@ -22,0 +22,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
36918
547
- Removed@types/node-fetch@^3.0.3
- Removednode-fetch@^3.0.0
- Removed@types/node-fetch@3.0.3(transitive)
- Removeddata-uri-to-buffer@4.0.1(transitive)
- Removedfetch-blob@3.2.0(transitive)
- Removedformdata-polyfill@4.0.10(transitive)
- Removednode-domexception@1.0.0(transitive)
- Removednode-fetch@3.3.2(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)