pouchdb-adapter-idb
Advanced tools
Comparing version 6.4.2 to 6.4.3
@@ -52,6 +52,6 @@ import { assign, pick, changesHandler, nextTick, clone, filterChange, uuid, guardedConsole, toPromise, hasLocalStorage } from 'pouchdb-utils'; | ||
// format for the revision trees other than JSON. | ||
function encodeMetadata(metadata, winningRev, deleted) { | ||
function encodeMetadata(metadata, winningRev$$1, deleted) { | ||
return { | ||
data: safeJsonStringify(metadata), | ||
winningRev: winningRev, | ||
winningRev: winningRev$$1, | ||
deletedOrLocal: deleted ? '1' : '0', | ||
@@ -439,6 +439,6 @@ seq: metadata.seq, // highest seq for this doc | ||
function writeDoc(docInfo, winningRev, winningRevIsDeleted, newRevIsDeleted, | ||
function writeDoc(docInfo, winningRev$$1, winningRevIsDeleted, newRevIsDeleted, | ||
isUpdate, delta, resultsIdx, callback) { | ||
docInfo.metadata.winningRev = winningRev; | ||
docInfo.metadata.winningRev = winningRev$$1; | ||
docInfo.metadata.deleted = winningRevIsDeleted; | ||
@@ -457,3 +457,3 @@ | ||
if (hasAttachments) { | ||
return writeAttachments(docInfo, winningRev, winningRevIsDeleted, | ||
return writeAttachments(docInfo, winningRev$$1, winningRevIsDeleted, | ||
isUpdate, resultsIdx, callback); | ||
@@ -465,7 +465,7 @@ } | ||
finishDoc(docInfo, winningRev, winningRevIsDeleted, | ||
finishDoc(docInfo, winningRev$$1, winningRevIsDeleted, | ||
isUpdate, resultsIdx, callback); | ||
} | ||
function finishDoc(docInfo, winningRev, winningRevIsDeleted, | ||
function finishDoc(docInfo, winningRev$$1, winningRevIsDeleted, | ||
isUpdate, resultsIdx, callback) { | ||
@@ -494,3 +494,3 @@ | ||
// delete metadata.rev; | ||
var metadataToStore = encodeMetadata(metadata, winningRev, | ||
var metadataToStore = encodeMetadata(metadata, winningRev$$1, | ||
winningRevIsDeleted); | ||
@@ -529,3 +529,3 @@ var metaDataReq = docStore.put(metadataToStore); | ||
function writeAttachments(docInfo, winningRev, winningRevIsDeleted, | ||
function writeAttachments(docInfo, winningRev$$1, winningRevIsDeleted, | ||
isUpdate, resultsIdx, callback) { | ||
@@ -541,3 +541,3 @@ | ||
if (numDone === attachments.length) { | ||
finishDoc(docInfo, winningRev, winningRevIsDeleted, | ||
finishDoc(docInfo, winningRev$$1, winningRevIsDeleted, | ||
isUpdate, resultsIdx, callback); | ||
@@ -557,3 +557,3 @@ } | ||
delete att.data; | ||
att.revpos = parseInt(winningRev, 10); | ||
att.revpos = parseInt(winningRev$$1, 10); | ||
var digest = att.digest; | ||
@@ -856,4 +856,4 @@ saveAttachment(digest, data, attachmentSaved); | ||
// want to block the main cursor while we're fetching the doc | ||
function fetchDocAsynchronously(metadata, row, winningRev) { | ||
var key = metadata.id + "::" + winningRev; | ||
function fetchDocAsynchronously(metadata, row, winningRev$$1) { | ||
var key = metadata.id + "::" + winningRev$$1; | ||
docIdRevIndex.get(key).onsuccess = function onGetDoc(e) { | ||
@@ -871,3 +871,3 @@ row.doc = decodeDoc(e.target.result); | ||
function allDocsInner(winningRev, metadata) { | ||
function allDocsInner(winningRev$$1, metadata) { | ||
var row = { | ||
@@ -877,3 +877,3 @@ id: metadata.id, | ||
value: { | ||
rev: winningRev | ||
rev: winningRev$$1 | ||
} | ||
@@ -892,3 +892,3 @@ }; | ||
if (opts.include_docs) { | ||
fetchDocAsynchronously(metadata, row, winningRev); | ||
fetchDocAsynchronously(metadata, row, winningRev$$1); | ||
} | ||
@@ -910,4 +910,4 @@ } | ||
var metadata = decodeMetadata(batchValue); | ||
var winningRev = metadata.winningRev; | ||
allDocsInner(winningRev, metadata); | ||
var winningRev$$1 = metadata.winningRev; | ||
allDocsInner(winningRev$$1, metadata); | ||
} | ||
@@ -985,4 +985,4 @@ } | ||
return new Promise(function (resolve) { | ||
var blob = blob(['']); | ||
var req = txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key'); | ||
var blob$$1 = blob(['']); | ||
var req = txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob$$1, 'key'); | ||
@@ -1669,6 +1669,6 @@ req.onsuccess = function () { | ||
compactRevs(revs, docId, txn); | ||
var winningRev = metadata.winningRev; | ||
var winningRev$$1 = metadata.winningRev; | ||
var deleted = metadata.deleted; | ||
txn.objectStore(DOC_STORE).put( | ||
encodeMetadata(metadata, winningRev, deleted)); | ||
encodeMetadata(metadata, winningRev$$1, deleted)); | ||
}; | ||
@@ -1675,0 +1675,0 @@ txn.onabort = idbError(callback); |
{ | ||
"name": "pouchdb-adapter-idb", | ||
"version": "6.4.2", | ||
"version": "6.4.3", | ||
"description": "PouchDB adapter using IndexedDB as its data store.", | ||
@@ -12,10 +12,10 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"pouchdb-adapter-utils": "6.4.2", | ||
"pouchdb-binary-utils": "6.4.2", | ||
"pouchdb-collections": "6.4.2", | ||
"pouchdb-errors": "6.4.2", | ||
"pouchdb-json": "6.4.2", | ||
"pouchdb-merge": "6.4.2", | ||
"pouchdb-promise": "6.4.2", | ||
"pouchdb-utils": "6.4.2" | ||
"pouchdb-adapter-utils": "6.4.3", | ||
"pouchdb-binary-utils": "6.4.3", | ||
"pouchdb-collections": "6.4.3", | ||
"pouchdb-errors": "6.4.3", | ||
"pouchdb-json": "6.4.3", | ||
"pouchdb-merge": "6.4.3", | ||
"pouchdb-promise": "6.4.3", | ||
"pouchdb-utils": "6.4.3" | ||
}, | ||
@@ -22,0 +22,0 @@ "module": "./lib/index.es.js", |
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
128815
+ Addedpouchdb-adapter-utils@6.4.3(transitive)
+ Addedpouchdb-binary-utils@6.4.3(transitive)
+ Addedpouchdb-collections@6.4.3(transitive)
+ Addedpouchdb-errors@6.4.3(transitive)
+ Addedpouchdb-json@6.4.3(transitive)
+ Addedpouchdb-md5@6.4.3(transitive)
+ Addedpouchdb-merge@6.4.3(transitive)
+ Addedpouchdb-promise@6.4.3(transitive)
+ Addedpouchdb-utils@6.4.3(transitive)
- Removedpouchdb-adapter-utils@6.4.2(transitive)
- Removedpouchdb-binary-utils@6.4.2(transitive)
- Removedpouchdb-collections@6.4.2(transitive)
- Removedpouchdb-errors@6.4.2(transitive)
- Removedpouchdb-json@6.4.2(transitive)
- Removedpouchdb-md5@6.4.2(transitive)
- Removedpouchdb-merge@6.4.2(transitive)
- Removedpouchdb-promise@6.4.2(transitive)
- Removedpouchdb-utils@6.4.2(transitive)
Updatedpouchdb-adapter-utils@6.4.3
Updatedpouchdb-binary-utils@6.4.3
Updatedpouchdb-collections@6.4.3
Updatedpouchdb-errors@6.4.3
Updatedpouchdb-json@6.4.3
Updatedpouchdb-merge@6.4.3
Updatedpouchdb-promise@6.4.3
Updatedpouchdb-utils@6.4.3