Commit 56c0b881 authored by Stephan Handuwala's avatar Stephan Handuwala 🏋🏻

Merge branch 'master' into 'master'

Master

See merge request !2
parents d3c9afc8 219a95db
File added
CouchDB databse management
\ No newline at end of file
CouchDB databse management
sample configuration file 'config.js'
\ No newline at end of file
module.exports = [{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "hellow"
},
{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "_users"
},
{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "hello",
"view_document": {
"_id": "_design/viewModel_views",
"views": {
"activeStatusCount": {
"map": "function (doc) {\n if(typeof(doc.active_status) === 'boolean'){\n emit([doc.active_status], 1)\n }\n}",
"reduce": "_count"
}
},
"updates": {
"add_update": "function(doc, req){ var reqb = JSON.parse(req.body); if (!doc){ return[ reqb, 'NEW DOC']; } else { reqb['_rev'] = doc['_rev']; return [reqb, 'UPDATE DOC'] }}"
},
"language": "javascript"
},
"index_document": {
"_id": "_design/indexes",
"language": "query",
"views": {
"position": {
"map": {
"fields": {
"position": "desc "
},
"partial_filter_selector": {}
},
"reduce": "_count",
"options": {
"def": {
"fields": ["position"]
}
}
}
}
},
"update_handler": {
"_id": "_design/handler",
"updates": {
"handler": "function(doc, req){ var reqb = JSON.parse(req.body); if (!doc){ var newDoc = { _id:req.uuid, type: reqb.type, origin_id: reqb.origin_id, locale: reqb.locale, values_translation: reqb.values_translation}; return[ newDoc, 'NEW DOC']; } else { return [reqb, 'UPDATE DOC'] } }"
},
"language": "javascript"
}
}
]
\ No newline at end of file
node_modules/*
//const nano = require('nano')('http://' + couch_user + ':' + couch_password + '@vg_prodsupp_couchdb:5984');
const hash = require('object-hash');
const Schema = require("validate");
function generateSchema() {
return new Promise(async (resolve, reject) => {
var schema = new Schema({
user_name: {
type: String,
required: true,
},
password: {
type: String,
required: true,
},
service_url: {
type: String,
required: true,
},
service_port: {
type: Number,
required: true
},
db_name: {
type: String,
required: true,
},
});
return resolve(schema);
});
}
function validateDbmodel(data) {
return new Promise(async (resolve, reject) => {
try {
var json = JSON.parse(JSON.stringify(data));
var schema = await generateSchema()
var error = await schema.validate(json);
if (error.length == 0) {
return resolve();
} else {
return reject('Model Validation error');
}
} catch (error) {
return reject(error);
}
});
}
function dbconnectionMaker(user, password, url, port) {
return new Promise(async (resolve, reject) => {
var nano = require('nano')('http://' + user + ':' + password + '@' + url + ':' + port);
return resolve(nano);
});
}
function checkDbexist(connection, db) {
return new Promise(async (resolve, reject) => {
connection.db.get(db).then((body) => {
return resolve(true);
}).catch(error => {
if (error.statusCode != undefined && error.statusCode == 404) {
return resolve(false);
} else {
return reject(error);
}
})
})
}
function dbcreate(connection, db) {
return new Promise(async (resolve, reject) => {
connection.db.create(db).then(async function (data) {
return resolve(data);
}).catch(error => {
return reject(error);
})
});
}
function selectDb(connection, dbname) {
return new Promise(async (resolve, reject) => {
var seletedDb = connection.db.use(dbname);
return resolve(seletedDb);
});
}
function checkDocumentExist(selectDb, id) {
return new Promise(async (resolve, reject) => {
selectDb.get(id).then((body) => {
// console.log(body);
return resolve(body)
}).catch(error => {
if (error.statusCode != undefined && error.statusCode == 404) {
return resolve(false);
} else {
return reject(error);
}
});
});
}
function insertDocument(selectDb, doc) {
return new Promise(async (resolve, reject) => {
selectDb
.insert(doc)
.then(insert => {
return resolve(insert);
}).catch(err => {
return reject(err);
});
});
}
module.exports = {
createDB: async function createDB(config) {
return new Promise(async (resolve, reject) => {
var infologs = [];
for (var i = 0; i < config.length; i++) {
var singleElement = config[i];
var viewinfodoc, indexinfodoc, updatehandleinfodoc, loopinfo = {};
try {
try {
await validateDbmodel(singleElement);
loopinfo['db_name'] = singleElement.db_name
} catch (error) {
loopinfo['error'] = 'Db Model Validation Error';
loopinfo['debug_info'] = error;
infologs.push(loopinfo);
continue;
}
var db = await dbconnectionMaker(singleElement.user_name, singleElement.password, singleElement.service_url, singleElement.service_port);
try {
var dbexist = await checkDbexist(db, singleElement.db_name);
loopinfo['dbexist'] = true;
} catch (error) {
loopinfo['error'] = 'Db Exist check error';
loopinfo['debug_info'] = error;
infologs.push(loopinfo);
continue;
}
if (dbexist == false) {
loopinfo['dbexist'] = false;
try {
await dbcreate(db, singleElement.db_name);
loopinfo['create db '] = true;
} catch (error) {
loopinfo['error'] = 'Db Create Error';
loopinfo['debug_info'] = error;
infologs.push(loopinfo);
continue;
}
// db does not exist create new one
}
var select_db = await selectDb(db, singleElement.db_name);
/* view_document */
if (singleElement.view_document != undefined && singleElement.view_document._id != undefined) {
try {
var viewDoc = await checkDocumentExist(select_db, singleElement.view_document._id);
if (viewDoc === false) {
try {
var insertViewmodel = await insertDocument(select_db, singleElement.view_document);
viewinfodoc = 'Document not found insert as new';
} catch (error) {
viewinfodoc = {
'error': 'Insert View model error 1',
"debug": error
};
}
//console.log('insertViewmodel :>> ', insertViewmodel);
} else {
var rev = viewDoc._rev;
delete viewDoc._rev;
var dbhash = hash(viewDoc);
var viewModelhash = hash(singleElement.view_document);
if (dbhash != viewModelhash) {
try {
singleElement.view_document._rev = rev;
var insertViewmodel = await insertDocument(select_db, singleElement.view_document);
console.log('insertViewmodel :>> ', insertViewmodel);
viewinfodoc = 'Document found does not Equals to old one';
} catch (error) {
viewinfodoc = {
'error': 'Insert View model error 2',
"debug": error
};
}
} else {
viewinfodoc = 'Document found Equals to old one';
}
}
loopinfo['view_document'] = viewinfodoc;
} catch (error) {
loopinfo['error'] = 'view_document check exist error';
loopinfo['debug_info'] = error;
}
}
/* index_document */
if (singleElement.index_document != undefined && singleElement.index_document._id != undefined) {
try {
var doc = await checkDocumentExist(select_db, singleElement.index_document._id);
if (doc === false) {
try {
var insertViewmodel = await insertDocument(select_db, singleElement.index_document);
indexinfodoc = 'Document not found insert as new';
console.log('index_document :>> ', index_document);
} catch (error) {
indexinfodoc = {
'error': 'Insert Index document error',
"debug": error
};
}
} else {
var rev = doc._rev;
delete doc._rev;
var dbhash = hash(doc);
var Modelhash = hash(singleElement.index_document);
if (dbhash != Modelhash) {
try {
singleElement.index_document._rev = rev;
var insertmodel = await insertDocument(select_db, singleElement.index_document);
indexinfodoc = 'Document found does not Equals to old one';
console.log('insertmodel :>> ', insertmodel);
} catch (error) {
indexinfodoc = {
'error': 'Insert View model error',
"debug": error
};
}
} else {
indexinfodoc = 'Document found Equals to old one';
}
}
loopinfo['index_document'] = indexinfodoc;
} catch (error) {
loopinfo['error'] = 'index_document check exist error';
loopinfo['debug_info'] = error;
}
}
/* update handler */
if (singleElement.update_handler != undefined && singleElement.update_handler._id != undefined) {
//updatehandleinfodoc
try {
var doc = await checkDocumentExist(select_db, singleElement.update_handler._id);
if (doc === false) {
try {
var insertmodel = await insertDocument(select_db, singleElement.update_handler);
console.log('index_document :>> ', insertmodel);
updatehandleinfodoc = 'Document not found insert as new';
} catch (error) {
updatehandleinfodoc = {
'error': 'Insert Update handler document error',
"debug": error
};
}
} else {
var rev = doc._rev;
delete doc._rev;
var dbhash = hash(doc);
var Modelhash = hash(singleElement.update_handler);
if (dbhash != Modelhash) {
try {
singleElement.update_handler._rev = rev;
var insertmodel = await insertDocument(select_db, singleElement.update_handler);
console.log('insertmodel :>> ', insertmodel);
updatehandleinfodoc = 'Document found does not Equals to old one';
} catch (error) {
updatehandleinfodoc = {
'error': 'Insert Update handler document error',
"debug": error
};
}
} else {
updatehandleinfodoc = 'Document found Equals to old one';
}
}
} catch (error) {
loopinfo['error'] = 'Update handler check exist error';
loopinfo['debug_info'] = error;
}
loopinfo['Update_handler_document'] = updatehandleinfodoc;
}
infologs.push(loopinfo);
} catch (error) {
infologs.push({
"db_name": singleElement.db_name,
"error": error
})
console.log('error', error)
}
}
return resolve(infologs);
})
}
}
\ No newline at end of file
const Schema = require("validate");
const model = new Schema({
user_name: {
type: String,
required: true,
},
password: {
type: String,
required: true,
},
service_url: {
type: String,
required: true,
},
service_port: {
type: Number,
required: true
},
db_name: {
type: String,
required: true,
},
});
module.exports = model;
\ No newline at end of file
{
"name": "@coutch_db_create/coutch_db_create",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/caseless": {
"version": "0.12.2",
"resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz",
"integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w=="
},
"@types/node": {
"version": "14.6.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.3.tgz",
"integrity": "sha512-pC/hkcREG6YfDfui1FBmj8e20jFU5Exjw4NYDm8kEdrW+mOh0T1Zve8DWKnS7ZIZvgncrctcNCXF4Q2I+loyww=="
},
"@types/request": {
"version": "2.48.5",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz",
"integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==",
"requires": {
"@types/caseless": "*",
"@types/node": "*",
"@types/tough-cookie": "*",
"form-data": "^2.5.0"
}
},
"@types/tough-cookie": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz",
"integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A=="
},
"ajv": {
"version": "6.12.4",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"browser-request": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz",
"integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc="
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"cloudant-follow": {
"version": "0.18.2",
"resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz",
"integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==",
"requires": {
"browser-request": "~0.3.0",
"debug": "^4.0.1",
"request": "^2.88.0"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"component-type": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz",
"integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"eivindfjeldstad-dot": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/eivindfjeldstad-dot/-/eivindfjeldstad-dot-0.0.1.tgz",
"integrity": "sha1-IvyXa/rzBuCDmjHbjoITSA+vuJM="
},
"errs": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz",
"integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk="
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
"integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"requires": {
"ajv": "^6.12.3",
"har-schema": "^2.0.0"
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
"requires": {
"mime-db": "1.44.0"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"nano": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz",
"integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==",
"requires": {
"@types/request": "^2.48.4",
"cloudant-follow": "^0.18.2",
"debug": "^4.1.1",
"errs": "^0.3.2",
"request": "^2.88.0"
}
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"object-hash": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.3.tgz",
"integrity": "sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg=="
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"dependencies": {
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
}
}
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"typecast": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/typecast/-/typecast-0.0.1.tgz",
"integrity": "sha1-//t13La98d744pO2tuiT1sHtGd4="
},
"uri-js": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
"integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
"requires": {
"punycode": "^2.1.0"
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"validate": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/validate/-/validate-5.1.0.tgz",
"integrity": "sha512-Y+vJv+xR3XsaQM8W1rQvwc6is/sgCUBv3lvNKc2DZ1HcVcEWAaHVSFB5uoxkQnw2riUq77Rg5nv1u8YuuSu/Zw==",
"requires": {
"component-type": "1.2.1",
"eivindfjeldstad-dot": "0.0.1",
"typecast": "0.0.1"
}
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
}
}
}
{
"name": "couch_db_create",
"version": "1.0.0",
"description": "ls -l",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gitlab.com/sachinda/npm_db_create.git"
},
"author": "Parywaylabs",
"license": "ISC",
"bugs": {
"url": "https://gitlab.com/sachinda/npm_db_create/issues"
},
"homepage": "https://gitlab.com/sachinda/npm_db_create#readme",
"dependencies": {
"nano": "^8.2.2",
"object-hash": "^2.0.3",
"validate": "^5.1.0"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment