New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cronapi-pouchdb

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cronapi-pouchdb - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

bower.json
{
"name": "cronapi-pouchdb",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/CronApp/cronapi-pouchdb",

@@ -5,0 +5,0 @@ "authors": [

{
"createLocalDatabase": "Criar banco de dados local",
"createLocalDatabaseDescription": "Cria um banco de dados local",
"databaseName": "Nome do banco de dados",
"adapterType": "Tipo de adaptador de conexão",
"createRemoteDatabase": "Criar banco de dados remoto",
"createRemoteDatabaseDescription": "Cria um banco de dados remoto",
"username": "Nome de usuário",
"password": "Senha",
"getDatabaseInfo": "Obter informações do banco de dados",
"getDatabaseInfoDescription": "Obter informações do banco de dados criado",
"databaseRef": "Referência do banco de dados",
"error": "Erro",
"success": "Sucesso",
"compactDatabase": "Compactar banco de dados",
"compactDatabaseDescription": "Compacta banco de dados",
"options": "Opções",
"deleteDatabase": "Deletar banco de dados",
"deleteDatabaseDescription": "Deleta banco de dados",
"updateDoc": "Atualizar documento",
"updateDocDescription": "Atualiza um documento",
"doc": "Documento",
"createDoc": "Criar documento",
"createDocDescription": "Cria um documento",
"putAttachment": "Adicionar Anexo",
"putAttachmentDescription": "Adiciona um anexo",
"docId": "Id do documento",
"docRev": "Revisão do documento",
"attachmentId": "Id do anexo",
"attachment": "Anexo",
"attachmentType": "Tipo de anexo",
"getAttachment": "Obter anexo",
"getAttachmentDescription": "Obtém um anexo",
"removeAttachment": "Remover Anexo",
"removeAttachmentDescription": "Remove o anexo",
"getDoc": "Obter documento",
"getDocDescription": "Obtém documento",
"getAllDoc": "Obter todos os documentos",
"getAllDocDescription": "Obtém todos os documentos",
"notifyChanges": "Notificar mudanças",
"notifyChangesDescription": "Notifica mudanças",
"statementChange": "Evento de Mudança",
"statementComplete": "Evento de Conclusão",
"cancelNotifyChanges": "Cancelar notificação de mudanças",
"cancelNotifyChangesDescription": "Cancela as notificações de mudança",
"deleteDoc": "Deletar documento",
"deleteDocDescription": "Deleta um documento",
"deleteDocById": "Deletar documento por Id",
"deleteDocByIdDescription": "Deleta um documento por seu Id",
"query": "Consulta",
"queryDescription": "Realiza uma consulta",
"statementMap": "Operação de consulta",
"emit": "Emitir retorno da consulta",
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado"
"localDatabase": "Local database",
"createLocalDatabase": "Create local database",
"createLocalDatabaseDescription": "Creates a local database",
"databaseName": "Database name",
"adapterType": "Adapter type",
"createRemoteDatabase": "Create remote database",
"createRemoteDatabaseDescription": "Creates a remote database",
"username": "Username",
"password": "Password",
"getDatabaseInfo": "Get database info",
"getDatabaseInfoDescription": "Gets database info",
"databaseRef": "Database reference",
"error": "Error",
"success": "Success",
"compactDatabase": "Compact database",
"compactDatabaseDescription": "Compacts the database",
"options": "Options",
"deleteDatabase": "Delete database",
"deleteDatabaseDescription": "Deletes the database",
"updateDoc": "Update document",
"updateDocDescription": "Updates a document",
"doc": "Document",
"createDoc": "Create document",
"createDocDescription": "Creates a document",
"putAttachment": "Put attachment",
"putAttachmentDescription": "Puts an attachment",
"docId": "Document Id",
"docRev": "Document revision",
"attachmentId": "Attachment Id",
"attachment": "Attachment",
"attachmentType": "Attachment type",
"getAttachment": "Get attachment",
"getAttachmentDescription": "Gets an attachment",
"removeAttachment": "Remove attachment",
"removeAttachmentDescription": "Removes an attachment",
"getDoc": "Get document",
"getDocDescription": "Gets a document",
"getAllDoc": "Get all documents",
"getAllDocDescription": "Gets all documents",
"notifyChanges": "Notify changes",
"notifyChangesDescription": "Notify changes",
"statementChange": "On change event",
"statementComplete": "On complete event",
"cancelNotifyChanges": "Cancel notify changes",
"cancelNotifyChangesDescription": "Cancels notify changes",
"deleteDoc": "Delete document",
"deleteDocDescription": "Deletes a document",
"deleteDocById": "Delete document by Id",
"deleteDocByIdDescription": "Deletes a document by Id",
"query": "Query",
"queryDescription": "Query",
"statementMap": "Query statement",
"emit": "Emit query return",
"emitDescription": "Emit to the query event the found document based on criteria",
"createDocLote": "Create documents",
"createDocLoteDescription" : "Create document list",
"docs": "Documents",
"revId": "Id Revision"
}
{
"localDatabase": "Banco de dados local",
"createLocalDatabase": "Criar banco de dados local",

@@ -54,3 +55,7 @@ "createLocalDatabaseDescription": "Cria um banco de dados local",

"emit": "Emitir retorno da consulta",
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado"
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado",
"createDocLote": "Criar documentos",
"createDocLoteDescription" : "Cria uma lista de documentos",
"docs": "Documentos",
"revId": "Id da Revisão"
}
(function(){"use strict";
/**
* @categoryName {{localDatabase}}
*/this.cronapi=this.cronapi||{},this.cronapi.pouchdb={},
*/this.cronapi.pouchdb={},
//Ref: https://pouchdb.com/

@@ -12,3 +12,3 @@ /**

*/
module.exports.createLocalDatabase=this.cronapi.pouchdb.createLocalDatabase=function(/** @type {ObjectType.STRING} @description {{databaseName}} */n,/** @type {ObjectType.STRING} @description {{adapterType}} @blockType util_dropdown @keys idb|websql|cordova-sqlite|memory|localstorage @values idb|websql|cordova-sqlite|memory|localstorage */t){return new PouchDB(n||"myDB.db",{adapter:t})},
this.cronapi.pouchdb.createLocalDatabase=function(/** @type {ObjectType.STRING} @description {{databaseName}} */n,/** @type {ObjectType.STRING} @description {{adapterType}} @blockType util_dropdown @keys idb|websql|cordova-sqlite|memory|localstorage @values idb|websql|cordova-sqlite|memory|localstorage */t){return new PouchDB(n||"myDB.db",{adapter:t})},
/**

@@ -44,3 +44,3 @@ * @type function

*/
this.cronapi.pouchdb.updateDoc=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.OBJECT} @description {{doc}} */t,/** @type {ObjectType.OBJECT} @description {{options}} */c,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */i){n.put(t,c,function(n,t){n?o(n):i(t)})},
this.cronapi.pouchdb.updateDoc=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.OBJECT} @description {{doc}} */t,/** @type {ObjectType.OBJECT} @description {{options}} */c,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */i){null==c&&(c={}),n.put(t,c,function(n,t){n?o(n):i(t)})},
/**

@@ -54,6 +54,12 @@ * @type function

* @type function
* @name {{createDocLote}}
* @description {{createDocLoteDescription}}
*/
this.cronapi.pouchdb.createDocLote=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.OBJECT} @description {{docs}} */t,/** @type {ObjectType.OBJECT} @description {{options}} */c,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */i){n.bulkDocs(t,c,function(n,t){n?o(n):i(t)})},
/**
* @type function
* @name {{putAttachment}}
* @description {{putAttachmentDescription}}
*/
this.cronapi.pouchdb.putAttachment=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docId}} */t,/** @type {ObjectType.STRING} @description {{docRev}} */c,/** @type {ObjectType.STRING} @description {{attachmentId}} */o,/** @type {ObjectType.OBJECT} @description {{attachment}} */i,/** @type {ObjectType.STRING} @description {{attachmentType}} */e,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */u,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */a){n.putAttachment(t,o,c,i,e,function(n,t){n?u(n):a(t)})},
this.cronapi.pouchdb.putAttachment=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docId}} */t,/** @type {ObjectType.STRING} @description {{docRev}} */c,/** @type {ObjectType.STRING} @description {{attachmentId}} */o,/** @type {ObjectType.OBJECT} @description {{attachment}} */i,/** @type {ObjectType.STRING} @description {{attachmentType}} */u,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */e,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */a){n.putAttachment(t,o,c,i,u,function(n,t){n?e(n):a(t)})},
/**

@@ -70,3 +76,3 @@ * @type function

*/
this.cronapi.pouchdb.removeAttachment=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docId}} */t,/** @type {ObjectType.STRING} @description {{attachmentId}} */c,/** @type {ObjectType.STRING} @description {{docRev}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */i,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */e){n.removeAttachment(t,c,o,function(n,t){n?i(n):e(t)})},
this.cronapi.pouchdb.removeAttachment=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docId}} */t,/** @type {ObjectType.STRING} @description {{attachmentId}} */c,/** @type {ObjectType.STRING} @description {{docRev}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */i,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */u){n.removeAttachment(t,c,o,function(n,t){n?i(n):u(t)})},
/**

@@ -108,3 +114,3 @@ * @type function

*/
this.cronapi.pouchdb.deleteByIdDoc=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docRev}} */t,/** @type {ObjectType.STRING} @description {{revId}} */c,/** @type {ObjectType.OBJECT} @description {{options}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */i,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */e){n.remove(docId,t,o,function(n,t){n?i(n):e(t)})},
this.cronapi.pouchdb.deleteByIdDoc=function(/** @type {ObjectType.OBJECT} @description {{databaseRef}} */n,/** @type {ObjectType.STRING} @description {{docId}} */t,/** @type {ObjectType.STRING} @description {{revId}} */c,/** @type {ObjectType.OBJECT} @description {{options}} */o,/**@type {ObjectType.STATEMENTSENDER} @description {{error}} */i,/**@type {ObjectType.STATEMENTSENDER} @description {{success}} */u){n.remove(t,c,o,function(n,t){n?i(n):u(t)})},
/**

@@ -111,0 +117,0 @@ * @type function

{
"name": "cronapi-pouchdb",
"version": "1.0.0",
"version": "1.1.0",
"description": "A PouchDb plugin for CronApp",

@@ -5,0 +5,0 @@ "main": "pouchdb.cronapi.js",

{
"createLocalDatabase": "Criar banco de dados local",
"createLocalDatabaseDescription": "Cria um banco de dados local",
"databaseName": "Nome do banco de dados",
"adapterType": "Tipo de adaptador de conexão",
"createRemoteDatabase": "Criar banco de dados remoto",
"createRemoteDatabaseDescription": "Cria um banco de dados remoto",
"username": "Nome de usuário",
"password": "Senha",
"getDatabaseInfo": "Obter informações do banco de dados",
"getDatabaseInfoDescription": "Obter informações do banco de dados criado",
"databaseRef": "Referência do banco de dados",
"error": "Erro",
"success": "Sucesso",
"compactDatabase": "Compactar banco de dados",
"compactDatabaseDescription": "Compacta banco de dados",
"options": "Opções",
"deleteDatabase": "Deletar banco de dados",
"deleteDatabaseDescription": "Deleta banco de dados",
"updateDoc": "Atualizar documento",
"updateDocDescription": "Atualiza um documento",
"doc": "Documento",
"createDoc": "Criar documento",
"createDocDescription": "Cria um documento",
"putAttachment": "Adicionar Anexo",
"putAttachmentDescription": "Adiciona um anexo",
"docId": "Id do documento",
"docRev": "Revisão do documento",
"attachmentId": "Id do anexo",
"attachment": "Anexo",
"attachmentType": "Tipo de anexo",
"getAttachment": "Obter anexo",
"getAttachmentDescription": "Obtém um anexo",
"removeAttachment": "Remover Anexo",
"removeAttachmentDescription": "Remove o anexo",
"getDoc": "Obter documento",
"getDocDescription": "Obtém documento",
"getAllDoc": "Obter todos os documentos",
"getAllDocDescription": "Obtém todos os documentos",
"notifyChanges": "Notificar mudanças",
"notifyChangesDescription": "Notifica mudanças",
"statementChange": "Evento de Mudança",
"statementComplete": "Evento de Conclusão",
"cancelNotifyChanges": "Cancelar notificação de mudanças",
"cancelNotifyChangesDescription": "Cancela as notificações de mudança",
"deleteDoc": "Deletar documento",
"deleteDocDescription": "Deleta um documento",
"deleteDocById": "Deletar documento por Id",
"deleteDocByIdDescription": "Deleta um documento por seu Id",
"query": "Consulta",
"queryDescription": "Realiza uma consulta",
"statementMap": "Operação de consulta",
"emit": "Emitir retorno da consulta",
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado"
"localDatabase": "Local database",
"createLocalDatabase": "Create local database",
"createLocalDatabaseDescription": "Creates a local database",
"databaseName": "Database name",
"adapterType": "Adapter type",
"createRemoteDatabase": "Create remote database",
"createRemoteDatabaseDescription": "Creates a remote database",
"username": "Username",
"password": "Password",
"getDatabaseInfo": "Get database info",
"getDatabaseInfoDescription": "Gets database info",
"databaseRef": "Database reference",
"error": "Error",
"success": "Success",
"compactDatabase": "Compact database",
"compactDatabaseDescription": "Compacts the database",
"options": "Options",
"deleteDatabase": "Delete database",
"deleteDatabaseDescription": "Deletes the database",
"updateDoc": "Update document",
"updateDocDescription": "Updates a document",
"doc": "Document",
"createDoc": "Create document",
"createDocDescription": "Creates a document",
"putAttachment": "Put attachment",
"putAttachmentDescription": "Puts an attachment",
"docId": "Document Id",
"docRev": "Document revision",
"attachmentId": "Attachment Id",
"attachment": "Attachment",
"attachmentType": "Attachment type",
"getAttachment": "Get attachment",
"getAttachmentDescription": "Gets an attachment",
"removeAttachment": "Remove attachment",
"removeAttachmentDescription": "Removes an attachment",
"getDoc": "Get document",
"getDocDescription": "Gets a document",
"getAllDoc": "Get all documents",
"getAllDocDescription": "Gets all documents",
"notifyChanges": "Notify changes",
"notifyChangesDescription": "Notify changes",
"statementChange": "On change event",
"statementComplete": "On complete event",
"cancelNotifyChanges": "Cancel notify changes",
"cancelNotifyChangesDescription": "Cancels notify changes",
"deleteDoc": "Delete document",
"deleteDocDescription": "Deletes a document",
"deleteDocById": "Delete document by Id",
"deleteDocByIdDescription": "Deletes a document by Id",
"query": "Query",
"queryDescription": "Query",
"statementMap": "Query statement",
"emit": "Emit query return",
"emitDescription": "Emit to the query event the found document based on criteria",
"createDocLote": "Create documents",
"createDocLoteDescription" : "Create document list",
"docs": "Documents",
"revId": "Id Revision"
}
{
"localDatabase": "Banco de dados local",
"createLocalDatabase": "Criar banco de dados local",

@@ -54,3 +55,7 @@ "createLocalDatabaseDescription": "Cria um banco de dados local",

"emit": "Emitir retorno da consulta",
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado"
"emitDescription": "Emite um evento à consulta informando que o documento foi encontrado",
"createDocLote": "Criar documentos",
"createDocLoteDescription" : "Cria uma lista de documentos",
"docs": "Documentos",
"revId": "Id da Revisão"
}

@@ -7,6 +7,7 @@ (function () {

*/
this.cronapi = this.cronapi || {};
this.cronapi.pouchdb = {};
//Ref: https://pouchdb.com/
/**

@@ -18,3 +19,3 @@ * @type function

*/
module.exports.createLocalDatabase = this.cronapi.pouchdb.createLocalDatabase = function (/** @type {ObjectType.STRING} @description {{databaseName}} */ dbName, /** @type {ObjectType.STRING} @description {{adapterType}} @blockType util_dropdown @keys idb|websql|cordova-sqlite|memory|localstorage @values idb|websql|cordova-sqlite|memory|localstorage */ adapterType) {
this.cronapi.pouchdb.createLocalDatabase = function (/** @type {ObjectType.STRING} @description {{databaseName}} */ dbName, /** @type {ObjectType.STRING} @description {{adapterType}} @blockType util_dropdown @keys idb|websql|cordova-sqlite|memory|localstorage @values idb|websql|cordova-sqlite|memory|localstorage */ adapterType) {
let db = new PouchDB(dbName || 'myDB.db', { adapter: adapterType });

@@ -93,2 +94,5 @@ return db;

this.cronapi.pouchdb.updateDoc = function (/** @type {ObjectType.OBJECT} @description {{databaseRef}} */ db, /** @type {ObjectType.OBJECT} @description {{doc}} */ doc, /** @type {ObjectType.OBJECT} @description {{options}} */ options, /**@type {ObjectType.STATEMENTSENDER} @description {{error}} */ statementError, /**@type {ObjectType.STATEMENTSENDER} @description {{success}} */ statementSuccess) {
if(options == null) options = {};
db.put(doc, options, function (err, response) {

@@ -120,2 +124,17 @@ if (err) {

* @type function
* @name {{createDocLote}}
* @description {{createDocLoteDescription}}
*/
this.cronapi.pouchdb.createDocLote = function (/** @type {ObjectType.OBJECT} @description {{databaseRef}} */ db, /** @type {ObjectType.OBJECT} @description {{docs}} */ docs, /** @type {ObjectType.OBJECT} @description {{options}} */ options, /**@type {ObjectType.STATEMENTSENDER} @description {{error}} */ statementError, /**@type {ObjectType.STATEMENTSENDER} @description {{success}} */ statementSuccess) {
db.bulkDocs(docs, options , function (err, response) {
if (err) {
statementError(err);
} else {
statementSuccess(response);
}
});
};
/**
* @type function
* @name {{putAttachment}}

@@ -241,4 +260,4 @@ * @description {{putAttachmentDescription}}

*/
this.cronapi.pouchdb.deleteByIdDoc = function (/** @type {ObjectType.OBJECT} @description {{databaseRef}} */ db, /** @type {ObjectType.STRING} @description {{docRev}} */ docRev, /** @type {ObjectType.STRING} @description {{revId}} */ revId, /** @type {ObjectType.OBJECT} @description {{options}} */ options, /**@type {ObjectType.STATEMENTSENDER} @description {{error}} */ statementError, /**@type {ObjectType.STATEMENTSENDER} @description {{success}} */ statementSuccess) {
db.remove(docId, docRev, options, function (err, response) {
this.cronapi.pouchdb.deleteByIdDoc = function (/** @type {ObjectType.OBJECT} @description {{databaseRef}} */ db, /** @type {ObjectType.STRING} @description {{docId}} */ docId, /** @type {ObjectType.STRING} @description {{revId}} */ revId, /** @type {ObjectType.OBJECT} @description {{options}} */ options, /**@type {ObjectType.STATEMENTSENDER} @description {{error}} */ statementError, /**@type {ObjectType.STATEMENTSENDER} @description {{success}} */ statementSuccess) {
db.remove(docId, revId, options, function (err, response) {
if (err) {

@@ -245,0 +264,0 @@ statementError(err);

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