{"_id":"@arve.knudsen/aerospike","_rev":"1-904c8f90ddeabe384734c9f2eeb1dafc","name":"@arve.knudsen/aerospike","dist-tags":{"latest":"3.7.2"},"versions":{"3.7.2":{"name":"@arve.knudsen/aerospike","version":"3.7.2","description":"Aerospike Client Library","keywords":["aerospike","database","nosql"],"homepage":"https://github.com/aknuds1/aerospike-client-nodejs","license":"Apache-2.0","main":"lib/aerospike","engines":{"node":">=4"},"os":["linux","darwin","win32"],"cpu":["x64"],"repository":{"type":"git","url":"git+https://github.com/aknuds1/aerospike-client-nodejs.git"},"bugs":{"url":"https://github.com/aknuds1/aerospike-client-nodejs/issues"},"scripts":{"test":"mocha","posttest":"standard","coverage":"nyc npm test && nyc --reporter=lcov report","codecov":"codecov","prepush":"npm test","apidocs":"jsdoc -c jsdoc.json","cppcheck":"cppcheck --quiet --enable=warning,style -I src/include src/main/","valgrind":"valgrind node ./node_modules/mocha/bin/_mocha -R dot -g '#slow' -i","install":"node-gyp rebuild"},"dependencies":{"bindings":"^1.3.0","minimatch":"^3.0.4","nan":"^2.11.1"},"devDependencies":{"chai":"^4.2.0","choma":"^1.2.1","codecov":"^3.1.0","deep-eql":"^3.0.1","dirty-chai":"^2.0.1","ink-docstrap":"^1.3.0","jsdoc":"^3.5.5","mocha":"^5.2.0","mocha-clean":"^1.0.0","nyc":"^11.2.1","standard":"^11.0","tmp":"^0.0.33","yargs":"^1.3.3"},"standard":{"ignore":["apidocs"]},"gypfile":true,"gitHead":"84927c636003437df784969a00557a7611ecf254","_id":"@arve.knudsen/aerospike@3.7.2","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"arve.knudsen","email":"arve.knudsen@gmail.com"},"dist":{"integrity":"sha512-Bfm04nzv5k1LYrMp4MghIf+fDavplQpBqx5p9Z4N0A9YDV2fbeeBf0E+Mnmt7R4WTvRJOGGY2yBmGaZUDWnpyw==","shasum":"4e7c4df87a9a638bbe951cc87df692b191889e67","tarball":"https://registry.npmjs.org/@arve.knudsen/aerospike/-/aerospike-3.7.2.tgz","fileCount":209,"unpackedSize":1486047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2bxCCRA9TVsSAnZWagAAAvwP/0J7MSjTYZGr6qvuwQwP\nokn9EqTmh9QyFuefvQqUiX+hzJ+QzEGZTQJ7qUAhTUw/Trs4RDt8sVSLGuN5\nUtyn74kkYgtPT1Wz1XJ6NUwr/1IMN2eGfZW+W4AroB5Y0aPoyLPeCVOuvdDR\nLgHAJP2voKvFG06wQD7HIoDIILv4F0z79Az9m3BtnDpiYP+yVqTScxyaMyg0\nC3P60fWEd4U2+dlQSnTWCHqnRqg/naKJ8TIZMIP4t/S4h4QVD4rITnzPexHV\nUKLMkHVQXhgc7ZgXDFT8kwgFzeCvrJC9KYu8xDCqiluemWiE8xYdzvf/E3zj\nxhWN5PYxyUkV/8J58y6UlA6A1aputmPWglxzhaEsEbUj12No9ZITMdhVMZz3\nPl9/vlxBPRqaGVenEiJESdb1cWKegy9Lf4rl5ACYBJp4rtcDiT+vz9mbDo6W\n3sXnZQS+XAk4Y+5AD8wKbjsMiuDvgOVrdLJp4N1D8QYJjVmhKZBJdKE+F+sM\nQHcKMCJVKVh0840HW0QHkjMY74dug+hSAFfE8rBAXQVw8f7aCRaV1VXuq4zo\noQ2nHSxP9wnfKlwTDmV0OtrjfJ+hxBJLgzf2vrGXaf1rKorBTku9aqB/ofFk\n96h1MRAGnLpiaHqjz5qDlv8LxPFLVW7n52v4cRzO/3mqxN6bIPECltDtjrdA\nwsr1\r\n=4l7h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8szM9kKXtJgJ6VDjQcs5vCZQ75HJLW4GY15gx48KnFAiEAt9hQDlkvXT1bBBkk16itIDrEJeR1CfBNKLcFABkF3Kw="}]},"maintainers":[{"name":"arve.knudsen","email":"arve.knudsen@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aerospike_3.7.2_1540996161367_0.9015777106584173"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-31T14:29:21.205Z","3.7.2":"2018-10-31T14:29:21.517Z","modified":"2022-04-04T15:41:12.791Z"},"maintainers":[{"name":"arve.knudsen","email":"arve.knudsen@gmail.com"}],"description":"Aerospike Client Library","homepage":"https://github.com/aknuds1/aerospike-client-nodejs","keywords":["aerospike","database","nosql"],"repository":{"type":"git","url":"git+https://github.com/aknuds1/aerospike-client-nodejs.git"},"bugs":{"url":"https://github.com/aknuds1/aerospike-client-nodejs/issues"},"license":"Apache-2.0","readme":"# Aerospike Node.js Client [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://travis-ci.org/aerospike/aerospike-client-nodejs.svg?branch=master\n[travis-url]: https://travis-ci.org/aerospike/aerospike-client-nodejs\n[codecov-image]: https://codecov.io/gh/aerospike/aerospike-client-nodejs/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/aerospike/aerospike-client-nodejs\n[npm-image]: https://img.shields.io/npm/v/aerospike.svg\n[npm-url]: https://www.npmjs.com/package/aerospike\n[downloads-image]: https://img.shields.io/npm/dm/aerospike.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=aerospike\n\nAn Aerospike add-on module for Node.js.\n\nThis module is compatible with Node.js v4.x (LTS), v6.x (LTS), v8.x (LTS) and\nv10.x. It supports the following operating systems: CentOS/RHEL 6/7, Debian\n7/8/9, Ubuntu 14.04/16.04/18.04, as well as many Linux destributions compatible\nwith one of these OS releases. macOS and Windows are also supported.\n\n- [Usage](#Usage)\n- [Prerequisites](#Prerequisites)\n- [Installation](#Installation)\n  - [Primer on Node.js Modules](#Primer-on-Node.js-Modules)\n  - [Installing via npm Registry](#Installing-via-npm-Registry)\n  - [Installing via Git Repository](#Installing-via-Git-Repository)\n  - [C Client Resolution](#C-Client-Resolution)\n    - [Force Download](#Force-Download)\n    - [Custom Search Path](#Custom-Search-Path)\n- [Documentation](#Documentation)\n- [Tests](#Tests)\n- [Benchmarks](#Benchmarks)\n\n<a name=\"Usage\"></a>\n## Usage\n\nThe following is very simple example how to create, update, read and remove a\nrecord using the Aerospike database.\n\n```js\nconst Aerospike = require('aerospike')\n\nconst config = {\n  hosts: '192.168.33.10:3000'\n}\nconst key = new Aerospike.Key('test', 'demo', 'demo')\n\nAerospike.connect(config)\n  .then(client => {\n    const bins = {\n      i: 123,\n      s: 'hello',\n      b: Buffer.from('world'),\n      d: new Aerospike.Double(3.1415),\n      g: Aerospike.GeoJSON.Point(103.913, 1.308),\n      l: [1, 'a', {x: 'y'}],\n      m: {foo: 4, bar: 7}\n    }\n    const meta = { ttl: 10000 }\n    const policy = new Aerospike.WritePolicy({\n      exists: Aerospike.policy.exists.CREATE_OR_REPLACE\n    })\n\n    return client.put(key, bins, meta, policy)\n      .then(() => {\n        const ops = [\n          Aerospike.operations.incr('i', 1),\n          Aerospike.operations.read('i'),\n          Aerospike.lists.append('l', 'z'),\n          Aerospike.maps.removeByKey('m', 'bar')\n        ]\n\n        return client.operate(key, ops)\n      })\n      .then(result => {\n        console.log(result.bins) // => { i: 124, l: 4, m: null }\n\n        return client.get(key)\n      })\n      .then(record => {\n        console.log(record.bins) // => { i: 124,\n                                 //      s: 'hello',\n                                 //      b: <Buffer 77 6f 72 6c 64>,\n                                 //      d: 3.1415,\n                                 //      g: '{\"type\":\"Point\",\"coordinates\":[103.913,1.308]}',\n                                 //      l: [ 1, 'a', { x: 'y' }, 'z' ],\n                                 //      m: { foo: 4 } }\n      })\n      .then(() => client.close())\n  })\n  .catch(error => {\n    console.error('Error: %s [%i]', error.message, error.code)\n    if (error.client) {\n      error.client.close()\n    }\n  })\n```\n\nMore examples illustrating the use of the API are located in the\n[`examples`](examples) directory.\n\nDetails about the API are available in the [`docs`](docs) directory.\n\n<a name=\"Prerequisites\"></a>\n## Prerequisites\n\nThe Aerospike Node.js client supports all Node.js [LTS\nreleases](https://github.com/nodejs/Release#release-schedule). To download and\ninstall the latest stable version of Node.js, visit\n[nodejs.org](http://nodejs.org/) or use the version that comes bundled with\nyour operating system.\n\nThe package includes a native add-on. `gcc`/`g++` v4.8 or newer or\n`clang`/`clang++` v3.4 or newer are required to build the add-on.\n\nThe Aerospike add-on depends on the Aerospike C client library, which is\ndownloaded during package installation. Either the cURL or Wget command line tool\nis required for this. See [\"C Client Resolution\"](#C-Client-Resolution) below for\nfurther information.\n\nThe package has the following compile time/run time dependencies:\n\n| Library Name | Description |\n| --- | --- |\n| libssl | |\n| libcrypto | Required for RIPEMD160 hash function. |\n| libz | Required for (optional) command compression. |\n\n### CentOS/RHEL\n\nTo install library prerequisites via `yum`:\n\n```bash\nsudo yum install gcc-c++ openssl-devel zlib-devel\n```\n\nNote: The `gcc` tool chain included in CentOS/RHEL 6.x is gcc-4.4. Building the\nAerospike add-on using Node.js v4 or later, requires gcc-4.8 or later. To\nupdate the gcc tool chain, you can install a recent version of the\n[Red Hat Developer Toolset](https://access.redhat.com/documentation/en/red-hat-developer-toolset/)\nor a compatible devtoolset version for CentOS.\n\n### Debian\n\nTo install library prerequisites via `apt-get`:\n\n```bash\nsudo apt-get install g++ libssl1.0.0 libssl-dev libz-dev\n```\n\n### Ubuntu\n\nTo install library prerequisites via `apt-get`:\n\n```bash\nsudo apt-get install g++ libssl1.0.0 libssl-dev libz-dev\n```\n\n### Mac OS X\n\nBefore starting with the Aerospike Nodejs Client, please make sure the following prerequisites are met:\n\n- Mac OS X 10.8 or greater.\n- Xcode 5 or greater.\n\n#### Openssl library installation in Mac OS X.\n\n```bash\n$ brew install openssl\n$ brew link openssl --force\n```\n\n### Windows\n\nSee [Prerequisites for Aerospike Node.js Client on Windows](https://github.com/aerospike/aerospike-client-nodejs/blob/master/README_WINDOWS.md).\n\n<a name=\"Installation\"></a>\n## Installation\n\nThe Aerospike Node.js client is a Node.js add-on module utilizing the Aerospike\nC client. The installation will attempt to build the add-on module prior to\ninstallation. The build step will resolve the Aerospike C client dependency as\ndescribed in [C Client Resolution](#C-Client-Resolution).\n\nThe Aerospike Node.js client can be installed like any other Node.js module, however\nwe provided the following information for those not so familiar with Node.js modules.\n\n<a name=\"Primer-on-Node.js-Modules\"></a>\n### Primer on Node.js Modules\n\nNode.js modules are containers of JavaScript code and a `package.json`, which defines\nthe module, its dependencies and requirements. Modules are usually installed as\ndependencies of others Node.js application or module. The modules are installed in\nthe application's `node_modules` directory, and can be utilized within the program\nby requiring the module by name.\n\nA module may be installed in global location via the `-g` flag. The global location\nis usually reserved for modules that are not directly depended on by an application,\nbut may have executables which you want to be able to call regardless of the\napplication. This is usually the case for tools like tools like `npm` and `mocha`.\n\n<a name=\"Installing-via-npm-Registry\"></a>\n### Installing via npm Registry\n\nInstalling via npm Registry is pretty simple and most common install method, as\nit only involves a single step.\n\nAlthough the module may be installed globally or locally, we recommend performing\nlocal installs.\n\nTo install the module as a dependency of your application, run the following\nfrom your application's directory:\n\n\t$ npm install aerospike\n\nIn most cases, an application should specify `aerospike` as a dependency in\nits `package.json`.\n\nOnce installed, the module can be required in the application:\n\n\tconst Aerospike = require('aerospike')\n\n<a name=\"Installing-via-Git-Repository\"></a>\n### Installing via Git Repository\n\nThe following is relevant for users who have cloned the repository, and want\nto install it as a dependency of their application.\n\nInstalling via Git Repository is slightly different from installing via npm\nregistry, in that you will be referencing the module by path, rather than name.\n\nAlthough the module may be installed globally or locally, we recommend performing\nlocal installs.\n\n#### Installing Globally\n\nThis option required root permissions. This will download the Aerospike C client\nonly once, which will improve the experience of using the module for many users.\nHowever, you will need to first install the package globally using root permissions.\n\nRun the following as a user with root permission or using the sudo command:\n\n\t$ npm install -g <PATH>\n\nWhere `<PATH>` is the path to the Aerospike Node.js client's Git respository is\nlocated. This will install the module in a globally accessible location.\n\nTo install the module as a dependency of your application, run the following\nfrom your application's directory:\n\n\t$ npm link aerospike\n\nLinking to the module does not require root permission.\n\nOnce linked, the module can be required in the application:\n\n\tconst Aerospike = require('aerospike')\n\n#### Installing Locally\n\nThis option does not require root permissions to install the module as a\ndependency of an application. However, it will require resolving the Aerospike\nC client each time you install the dependency, as it will need to exist local\nto the application.\n\nTo install the module as a dependency of your application, run the following\nfrom your application's directory:\n\n\t$ npm install <PATH>\n\nWhere `<PATH>` is the path to the Aerospike Node.js client's Git respository is\nlocated.\n\nOnce installed, the module can be required in the application:\n\n\tconst Aerospike = require('aerospike')\n\n<a name=\"C-Client-Resolution\"></a>\n### C Client Resolution\n\nWhen running `npm install`, `npm link` or `node-gyp rebuild`, the `.gyp`\nscript will run `scripts/aerospike-client-c.sh` to resolve the C client\ndependency.\n\nThe script will check for the following files in the search paths:\n\n- `lib/libaerospike.a`\n- `include/aerospike/aerospike.h`\n\nBy default, the search paths are:\n\n- `./aerospike-client-c`\n- `/usr`\n\nIf neither are found, then it will download the C client and create the\n`./aerospike-client-c` directory.\n\nYou can modify the C client resolution via:\n\n- [force download](#Force-Download) the C client\n- Specifying a [custom search path](#Custom-Search-Path) for the C client.\n\n<a name=\"Force-Download\"></a>\n#### Force Download\n\nTo force downloading of the C client, you can specify the `DOWNLOAD=1`\nenvironment variable. Example:\n\n    $ DOWNLOAD=1 npm install\n\n<a name=\"Custom-Search-Path\"></a>\n#### Custom Search Path\n\nIf you have the Aerospike C client installed in a non-standard location or\nbuilt from source, then you can specify the search path for the build step to\nuse while resolving the Aerospike C client library.\n\nUse the `PREFIX=<PATH>` environment variable to specify the search path for the\nAerospike C client. The `<PATH>` must be the path to a directory containing\n`lib` and `include` subdirectories.\n\nThe following is an example of specifying the path to the Aerospike C client\nbuild directory:\n\n    $ export PREFIX=~/aerospike-client-c/target/Linux-x86_64\n\n\n<a name=\"Documentation\"></a>\n## Documentation\n\nDetailed documentation of the client's API can be found at\n[http://www.aerospike.com/apidocs/nodejs](https://www.aerospike.com/apidocs/nodejs).\nThis documentation is build from the client's source using [JSDocs\nv3](http://usejsdoc.org/index.html) for every release.\n\nThe API docs also contain a few basic tutorials:\n\n* [Getting Started - Connecting to an Aerospike database cluster](https://www.aerospike.com/apidocs/nodejs/tutorial-getting_started.html)\n* [Managing Aerospike connections in a Node cluster](https://www.aerospike.com/apidocs/nodejs/tutorial-node_clusters.html)\n* [Handling asynchronous database operations using Callbacks, Promises or `async`/`await`](https://www.aerospike.com/apidocs/nodejs/tutorial-callbacks_promises_async_await.html)\n\nA variety of additional example applications are provided in the\n[`examples`](examples) directory of this repository.\n\nThe list of [backward incompatible API changes](docs/api-changes.md) by release.\n\n### API Versioning\n\nThe Aerospike Node.js client library follows [semantic versioning](http://semver.org/).\nChanges which break backwards compatibility will be indicated by an increase in\nthe major version number. Minor and patch releases, which increment only the\nsecond and third version number, will always be backwards compatible.\n\n\n<a name=\"Tests\"></a>\n## Tests\n\nThe client includes a comprehensive test suite using\n[Mocha](http://mochajs.org). The tests can be found in the ['test'](test)\ndirectory.\n\nBefore running the tests, you need to update the dependencies:\n\n    $ npm update\n\nTo run all the test cases:\n\n    $ npm test\n\nTo run the tests and also report on test coverage:\n\n    $ npm run coverage\n\n<a name=\"Benchmarks\"></a>\n## Benchmarks\n\nBenchmark utilies are provided in the [`benchmarks`](benchmarks) directory.\nSee the [`benchmarks/README.md`](benchmarks/README.md) for details.\n\n\n## License\n\nThe Aerospike Node.js Client is made available under the terms of the Apache\nLicense, Version 2, as stated in the file `LICENSE`.\n\nIndividual files may be made available under their own specific license, all\ncompatible with Apache License, Version 2. Please see individual files for\ndetails.\n","readmeFilename":"README.md"}