Commit f4a4c780 authored by Jan Köster's avatar Jan Köster
Browse files

test

parent ce89de3b
Loading
Loading
Loading
Loading
Loading
+11 −4
Changes for bindings/nodejs/nodesjs.cpp: 11 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -271,9 +271,14 @@ namespace authdb_nds {
        }

    private:
        explicit AuthDBClientJS(authdb::client::ClientConnection& con)
            : _client(con) {}
        ~AuthDBClientJS() override = default;
        explicit AuthDBClientJS(Isolate* isolate, Local<Object> conObj,
                               authdb::client::ClientConnection& con)
            : _client(con) {
            _conRef.Reset(isolate, conObj);
        }
        ~AuthDBClientJS() override {
            _conRef.Reset();
        }

        /*  new Client(connectionObj)  */
        static void New(const FunctionCallbackInfo<Value>& args) {
@@ -301,7 +306,8 @@ namespace authdb_nds {
            }

            try {
                AuthDBClientJS* obj = new AuthDBClientJS(conWrap->wrapped());
                Local<Object> conObj = args[0]->ToObject(context).ToLocalChecked();
                AuthDBClientJS* obj = new AuthDBClientJS(isolate, conObj, conWrap->wrapped());
                obj->Wrap(args.This());
                args.GetReturnValue().Set(args.This());
            } catch (const std::exception& e) {
@@ -533,6 +539,7 @@ namespace authdb_nds {
        }

        static Persistent<Function> constructor;
        Persistent<Object> _conRef;
        authdb::client::Client _client;
    };

+25 −0
Changes for test/node_modules/.package-lock.json: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
  "name": "test",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "../../../../web-runtime/bin": {
      "name": "authdb-client",
      "version": "0.2.1",
      "hasInstallScript": true,
      "license": "BSD-3-Clause",
      "os": [
        "linux",
        "freebsd",
        "win32"
      ],
      "engines": {
        "node": ">=4.0.0"
      }
    },
    "node_modules/authdb-client": {
      "resolved": "../../../../web-runtime/bin",
      "link": true
    }
  }
}

test/package-lock.json

0 → 100644
+30 −0
Changes for test/package-lock.json: 30 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
  "name": "test",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "dependencies": {
        "authdb-client": "file:../../../../web-runtime/bin"
      }
    },
    "../../../../web-runtime/bin": {
      "name": "authdb-client",
      "version": "0.2.1",
      "hasInstallScript": true,
      "license": "BSD-3-Clause",
      "os": [
        "linux",
        "freebsd",
        "win32"
      ],
      "engines": {
        "node": ">=4.0.0"
      }
    },
    "node_modules/authdb-client": {
      "resolved": "../../../../web-runtime/bin",
      "link": true
    }
  }
}

test/package.json

0 → 100644
+5 −0
Changes for test/package.json: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
  "dependencies": {
    "authdb-client": "file:../../../../web-runtime/bin"
  }
}