Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing error: loading non-context-aware native module in renderer #53

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .github/workflows/ci.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .idea/codeStyles/codeStyleConfig.xml
100644 → 100755
Empty file.
Empty file modified .idea/dictionaries/pokusew.xml
100644 → 100755
Empty file.
Empty file modified .idea/encodings.xml
100644 → 100755
Empty file.
Empty file modified .idea/jsLibraryMappings.xml
100644 → 100755
Empty file.
Empty file modified .idea/misc.xml
100644 → 100755
Empty file.
Empty file modified .idea/modules.xml
100644 → 100755
Empty file.
Empty file modified .idea/node-pcsclite.iml
100644 → 100755
Empty file.
Empty file modified .idea/vcs.xml
100644 → 100755
Empty file.
Empty file modified .idea/watcherTasks.xml
100644 → 100755
Empty file.
Empty file modified .npmignore
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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?**
Expand Down
Empty file modified binding.gyp
100644 → 100755
Empty file.
Empty file modified index.d.ts
100644 → 100755
Empty file.
Empty file modified lib/pcsclite.js
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 8 additions & 3 deletions src/addon.cpp
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#include "pcsclite.h"
#include "cardreader.h"

void init_all(v8::Local<v8::Object> target) {
using namespace v8;
using namespace node;

void init_all(Local<Object> 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
Empty file modified src/cardreader.cpp
100644 → 100755
Empty file.
Empty file modified src/cardreader.h
100644 → 100755
Empty file.
Empty file modified src/common.h
100644 → 100755
Empty file.
Empty file modified src/pcsclite.cpp
100644 → 100755
Empty file.
Empty file modified src/pcsclite.h
100644 → 100755
Empty file.
Empty file modified test/test.js
100644 → 100755
Empty file.
Empty file modified yarn.lock
100644 → 100755
Empty file.