diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml old mode 100644 new mode 100755 diff --git a/.idea/dictionaries/pokusew.xml b/.idea/dictionaries/pokusew.xml old mode 100644 new mode 100755 diff --git a/.idea/encodings.xml b/.idea/encodings.xml old mode 100644 new mode 100755 diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml old mode 100644 new mode 100755 diff --git a/.idea/misc.xml b/.idea/misc.xml old mode 100644 new mode 100755 diff --git a/.idea/modules.xml b/.idea/modules.xml old mode 100644 new mode 100755 diff --git a/.idea/node-pcsclite.iml b/.idea/node-pcsclite.iml old mode 100644 new mode 100755 diff --git a/.idea/vcs.xml b/.idea/vcs.xml old mode 100644 new mode 100755 diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml old mode 100644 new mode 100755 diff --git a/.npmignore b/.npmignore old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 5e22ddd3..d29f9930 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # node-pcsclite -[![npm](https://img.shields.io/npm/v/@pokusew/pcsclite.svg)](https://www.npmjs.com/package/@pokusew/pcsclite) -[![build status](https://img.shields.io/github/actions/workflow/status/pokusew/node-pcsclite/ci.yml?logo=github)](https://github.com/pokusew/node-pcsclite/actions/workflows/ci.yml) +[![npm](https://img.shields.io/npm/v/@mbarrie2/pcsclite.svg)](https://www.npmjs.com/package/@mbarrie2/pcsclite) +[![build status](https://img.shields.io/github/actions/workflow/status/mbarrie2/node-pcsclite/ci.yml?logo=github)](https://github.com/mbarrie2/node-pcsclite/actions/workflows/ci.yml) [![node-pcsclite channel on discord](https://img.shields.io/badge/discord-join%20chat-61dafb.svg?logo=discord&logoColor=white)](https://discord.gg/bg3yazg) +This package is written by @pokusew/pcsclite. Fixed "making the module context aware for applications" error for applications in **Electron** + Bindings over pcsclite to access Smart Cards. It works in **Linux**, **macOS** and **Windows**. > 📌 **Looking for library to work easy with NFC tags?** diff --git a/binding.gyp b/binding.gyp old mode 100644 new mode 100755 diff --git a/index.d.ts b/index.d.ts old mode 100644 new mode 100755 diff --git a/lib/pcsclite.js b/lib/pcsclite.js old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 index dad5d953..dc45adc5 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@pokusew/pcsclite", - "version": "0.6.0", + "name": "@mbarrie2/pcsclite", + "version": "0.6.2", "description": "Bindings over PC/SC to access Smart Cards", "keywords": [ "nfc", diff --git a/src/addon.cpp b/src/addon.cpp old mode 100644 new mode 100755 index c1d8b772..040eadc2 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -1,11 +1,16 @@ #include "pcsclite.h" #include "cardreader.h" -void init_all(v8::Local target) { +using namespace v8; +using namespace node; + +void init_all(Local target) { PCSCLite::init(target); CardReader::init(target); } -// see https://nodejs.org/api/addons.html#context-aware-addons -// see https://github.com/nodejs/nan/blob/v2.18.0/nan.h#L165 +#if NODE_MAJOR_VERSION >= 10 NAN_MODULE_WORKER_ENABLED(pcsclite, init_all) +#else +NODE_MODULE(pcsclite, init_all) +#endif \ No newline at end of file diff --git a/src/cardreader.cpp b/src/cardreader.cpp old mode 100644 new mode 100755 diff --git a/src/cardreader.h b/src/cardreader.h old mode 100644 new mode 100755 diff --git a/src/common.h b/src/common.h old mode 100644 new mode 100755 diff --git a/src/pcsclite.cpp b/src/pcsclite.cpp old mode 100644 new mode 100755 diff --git a/src/pcsclite.h b/src/pcsclite.h old mode 100644 new mode 100755 diff --git a/test/test.js b/test/test.js old mode 100644 new mode 100755 diff --git a/yarn.lock b/yarn.lock old mode 100644 new mode 100755