diff --git a/dist/index.js b/dist/index.js index 2b0b9d1..c505d8f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -230,45 +230,3 @@ var MUPSaobracajnaApi = /** @class */ (function () { }()); exports.MUPSaobracajnaApi = MUPSaobracajnaApi; exports.default = MUPSaobracajnaApi; -/* EXAMPLE */ -var smartcard = require("smartcard"); -var devices = new smartcard.Devices(); -devices.on("device-activated", function (e) { - console.log("---Device:", e.device.name); - console.log("Waiting for card..."); - e.device.on("card-inserted", function (e) { - console.log("---Card:", e.card.getAtr()); - _test(e.device.name); - }); -}); -console.log("Waiting for device..."); -var _test = function (device) { return __awaiter(void 0, void 0, void 0, function () { - var celik, data, e_1; - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - console.log("---START---"); - celik = new MUPSaobracajnaApi(device); - _b.label = 1; - case 1: - _b.trys.push([1, 3, 4, 6]); - return [4 /*yield*/, celik.readAllData()]; - case 2: - data = _b.sent(); - console.log(data); - return [3 /*break*/, 6]; - case 3: - e_1 = _b.sent(); - console.log((_a = e_1.message) !== null && _a !== void 0 ? _a : new Error(e_1)); - return [3 /*break*/, 6]; - case 4: return [4 /*yield*/, celik.end()]; - case 5: - _b.sent(); - console.log("---END---"); - process.exit(); - return [7 /*endfinally*/]; - case 6: return [2 /*return*/]; - } - }); -}); }; diff --git a/package.json b/package.json index e6c4ba6..a274cb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node_saobracajna_api", - "version": "1.0.0-2", + "version": "1.0.0-3", "description": "NodeJS Wrapper around SaobracajnaAPI (MUP RS) for reading vehicle cards", "main": "./dist/index.js", "module": "./dist/index.js",