Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

chore: make keytar context aware #182

Merged
merged 1 commit into from
May 16, 2019
Merged
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
16 changes: 10 additions & 6 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,18 @@ NAN_METHOD(FindCredentials) {
Nan::AsyncQueueWorker(worker);
sergiou87 marked this conversation as resolved.
Show resolved Hide resolved
}

void Init(v8::Local<v8::Object> exports) {
Nan::SetMethod(exports, "getPassword", GetPassword);
Nan::SetMethod(exports, "setPassword", SetPassword);
Nan::SetMethod(exports, "deletePassword", DeletePassword);
Nan::SetMethod(exports, "findPassword", FindPassword);
Nan::SetMethod(exports, "findCredentials", FindCredentials);
NAN_MODULE_INIT(Init) {
Nan::SetMethod(target, "getPassword", GetPassword);
Nan::SetMethod(target, "setPassword", SetPassword);
Nan::SetMethod(target, "deletePassword", DeletePassword);
Nan::SetMethod(target, "findPassword", FindPassword);
Nan::SetMethod(target, "findCredentials", FindCredentials);
}

} // namespace

#if NODE_MAJOR_VERSION >= 10
NAN_MODULE_WORKER_ENABLED(keytar, Init)
#else
NODE_MODULE(keytar, Init)
#endif