Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enrise-estools

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enrise-estools - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "enrise-estools",
"version": "0.0.1",
"version": "0.0.2",
"description": "Elasticsearch tooling functions for managing indices and aliases.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,7 +8,11 @@ # Enrise estools

## API Documentation
## Usage
```
const estools = require('enrise-estooling');
npm install enrise-estools
const estools = require('enrise-estools');
```
## API Documentation
### `upgrade` | Upgrade a feeder- alias

@@ -15,0 +19,0 @@ Creates a new versioned index according to the mapping, and points the feeder- alias to it.

@@ -31,3 +31,3 @@ 'use strict';

if (!options.targetVersion) {
const indexVersion = await helpers.getIndexVersions(esClient, index)[0];
const indexVersion = (await helpers.getIndexVersions(esClient, index))[0];

@@ -34,0 +34,0 @@ options.targetVersion = indexVersion ? indexVersion + 1 : 1;

@@ -59,3 +59,3 @@ 'use strict';

getAliasVersion.returns(null);
getAliasVersion.resolves(null);

@@ -79,3 +79,3 @@ try {

getMapping.returns(null);
getMapping.resolves(null);

@@ -115,4 +115,4 @@ try {

getAliasVersion.returns(null);
getIndexVersions.returns([]);
getAliasVersion.resolves(null);
getIndexVersions.resolves([]);

@@ -135,4 +135,4 @@ await upgrade(esClient, 'enrise.nl-nl', options);

getIndexVersions.returns([3, 2, 1]);
getMapping.returns(mapping);
getIndexVersions.resolves([3, 2, 1]);
getMapping.resolves(mapping);

@@ -159,3 +159,3 @@ await upgrade(esClient, 'enrise.nl-nl', options);

updateAlias.throws('failed');
updateAlias.rejects('failed');

@@ -183,3 +183,3 @@ try {

getAliasVersion.returns(3);
getAliasVersion.resolves(3);
await upgrade(esClient, 'enrise.nl-nl', options);

@@ -197,3 +197,3 @@ chai.expect(getAliasVersion).to.have.been.calledWith(esClient, 'feeder-enrise.nl-nl');

getIndexVersions.returns([5, 2, 1]);
getIndexVersions.resolves([5, 2, 1]);
await upgrade(esClient, 'enrise.nl-nl', options);

@@ -212,3 +212,3 @@ chai.expect(getIndexVersions).to.have.been.calledWith(esClient, 'enrise.nl-nl');

getMapping.returns(otherMapping);
getMapping.resolves(otherMapping);
await upgrade(esClient, 'enrise.nl-nl', options);

@@ -230,4 +230,4 @@ chai.expect(getMapping).to.have.been.calledWith(esClient, 'enrise.nl-nl-v3');

getMapping.onCall(0).returns(mapping);
getMapping.onCall(1).returns(otherMapping);
getMapping.onCall(0).resolves(mapping);
getMapping.onCall(1).resolves(otherMapping);

@@ -268,4 +268,4 @@ await upgrade(esClient, 'enrise.nl-nl', options);

getAliasVersion.returns(null);
getIndexVersions.returns([]);
getAliasVersion.resolves(null);
getIndexVersions.resolves([]);

@@ -301,3 +301,3 @@ await upgrade(esClient, 'enrise.nl-nl', options);

getMapping.returns({});
getMapping.resolves({});
await upgrade(esClient, 'enrise.nl-nl', options);

@@ -304,0 +304,0 @@ chai.expect(getMapping).to.have.been.calledOnce;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc