couchdb-bulk2
Advanced tools
Comparing version 2.0.1 to 2.0.2
#!/usr/bin/env node | ||
const fs = require('fs') | ||
const split = require('split') | ||
// Lowest end of the recommended range | ||
// See https://docs.couchdb.org/en/stable/maintenance/performance.html#network | ||
const docsPerBulk = 1000 | ||
@@ -48,3 +51,3 @@ const [ url, file ] = process.argv.slice(2) | ||
if (batch.length >= 500) { | ||
if (batch.length >= docsPerBulk) { | ||
this.pause() | ||
@@ -51,0 +54,0 @@ await bulkPost(batch) |
{ | ||
"name": "couchdb-bulk2", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Pipe line-seperated JSON into CouchDB", | ||
@@ -31,2 +31,3 @@ "main": "cli.js", | ||
"dependencies": { | ||
"node-fetch": "^2.6.0", | ||
"split": "^1.0.1" | ||
@@ -33,0 +34,0 @@ }, |
@@ -9,3 +9,3 @@ # couchdb-bulk2 | ||
This is a fork from [couchdb-bulk](https://github.com/jo/couchdb-bulk), with the following modifications: | ||
* posts 500 docs per bulk request (instead of only 1) when the input is newline-delimited JSON | ||
* posts 1000 docs per bulk request (instead of only 1) when the input is newline-delimited JSON | ||
* drops supports for anything else than newline-delimited JSON (1 doc per line), assuming that getting to that data format is the job of another tool, such as [jq](https://stedolan.github.io/jq/) | ||
@@ -12,0 +12,0 @@ * drops supports for the module interface, only the CLI mode remains |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5950
71
2
+ Addednode-fetch@^2.6.0
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)