npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

com.zumero.cordova

v3.0.2

Published

Zumero Sync Plugin

Readme

Zumero PhoneGap Plugin for iOS and Android

This plugin allows applications built on PhoneGap to synchronize with Zumero for SQL Server (ZSS).

Zumero objects

Zumero

You'll need a single Zumero object, created by requiring the Zumero module:

var zumero = cordova.require("cordova/plugin/zumero");

Methods:

sync

sync( fullPath, 
      encryptionKey, 
      serverURL, 
      dbFileName, 
      scheme, user, password, 
      successCallback, errorCallback)
  • fullPath: the full name of the local SQLite database
  • encryptionKey: this db's SQLCipher encryption key, or null
  • serverUrl: the URL of your Zumero instance
  • dbFileName: the name of the remote dbfile
  • scheme: the authentication scheme (or null)
  • user: the user name (or null)
  • password: the password (or null)
  • successCallback: function, called when the operation succeeds
  • errorCallback: function, called when the operation fails (optional)

Example

zumero.sync("/data/data/com.example.myapp/mydb", 
   "",
   "https://zss.example.com", 
   "mydb", 
   '{"scheme_type":"table", "table":"users"}',
   "user", 
   "password", 
   function() {
      // success
   },
   function(result) {
      // failure - result.code and result.message will
      // contain details
   }
);

quarantineSinceLastSync

quarantineSinceLastSync( fullPath, 
      encryptionKey, 
      successCallback, errorCallback)
  • fullPath: the full name of the local SQLite database
  • encryptionKey: this db's SQLCipher encryption key, or null
  • successCallback: function, called when the operation succeeds. The quarantineID of the newly created quarantine package is sent as the only argument to this function.
  • errorCallback: function, called when the operation fails (optional)

Example

zumero.quarantineSinceLastSync("/data/data/com.example.myapp/mydb", 
   "",
   function(quarantineID) {
      // success
   },
   function(result) {
      // failure - result.code and result.message will
      // contain details
   }
);

syncQuarantine

syncQuarantine( fullPath, 
      encryptionKey, 
      quarantineID, 
      serverURL, 
      dbFileName, 
      scheme, user, password, 
      successCallback, errorCallback)
  • fullPath: the full name of the local SQLite database
  • encryptionKey: this db's SQLCipher encryption key, or null
  • quarantineID: the quarantineID that was returned from quarantineSinceLastSync
  • serverUrl: the URL of your Zumero instance
  • dbFileName: the name of the remote dbfile
  • scheme: the authentication scheme (or null)
  • user: the user name (or null)
  • password: the password (or null)
  • successCallback: function, called when the operation succeeds
  • errorCallback: function, called when the operation fails (optional)

Example

zumero.syncQuarantine("/data/data/com.example.myapp/mydb", 
   "",
   1,
   "https://zss.example.com", 
   "mydb", 
   '{"scheme_type":"table", "table":"users"}',
   "user", 
   "password", 
   function() {
      // success
   },
   function(result) {
      // failure - result.code and result.message will
      // contain details
   }
);

deleteQuarantine

deleteQuarantine( fullPath, 
      encryptionKey, 
      quarantineID, 
      successCallback, errorCallback)
  • fullPath: the full name of the local SQLite database
  • encryptionKey: this db's SQLCipher encryption key, or null
  • quarantineID: the quarantineID that was returned from quarantineSinceLastSync
  • successCallback: function, called when the operation succeeds.
  • errorCallback: function, called when the operation fails (optional)

Example

zumero.deleteQuarantine("/data/data/com.example.myapp/mydb", 
   "",
   1,
   function() {
      // success
   },
   function(result) {
      // failure - result.code and result.message will
      // contain details
   }
);

References

For more information on authorization schemes, dbfiles, and sync, see the Zumero Client API docs.

Zumero needs the full path to the dbfile being synchronized; you'll either need to know where your SQLite library stores its files (and if it changes their filenames) and add that information to your Zumero calls, or use a SQLite library that exposes the full name of an opened dbfile.

A Zumero-modified fork of the lite4cordova SQLite plugin can be found at github.com/zumero/Cordova-SQLitePlugin (and is required by this plugin) - it extends the openDatabase method's "success" handler function, adding a "full path" parameter after the "message" parameter. This is the path you'd use when synching.

var db = window.sqlitePlugin.openDatabase( {name: dbName, location: 'default'},
    function(msg, fullname) {
        // save for later
        myDbFilename = fullname;

        // sync right now
        zumero.sync(fullname, 
           "https://zss.example.com", 
           dbName, 
           '{"scheme_type":"table", "table":"users"}',
           "syncuser", 
           "syncpassword", 
           function() {
              // success
           },
           null
        );
    }
);