Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dexie-cloud-addon

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dexie-cloud-addon - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5

6

dist/dexie-cloud.js

@@ -21,3 +21,3 @@ (function (global, factory) {

*
* Version 1.0.0-alpha.4, Fri Oct 30 2020
* Version 1.0.0-alpha.5, Fri Oct 30 2020
*

@@ -264,3 +264,3 @@ * http://dexie.org

db.cloud = {
version: "1.0.0-alpha.4",
version: "1.0.0-alpha.5",
options: { databaseUrl: "" },

@@ -277,3 +277,3 @@ schema: {},

}
dexieCloud.version = "1.0.0-alpha.4";
dexieCloud.version = "1.0.0-alpha.5";
Dexie__default['default'].Cloud = dexieCloud;

@@ -280,0 +280,0 @@ Dexie__default['default'].addons.push(dexieCloud);

@@ -1,1 +0,1 @@

import Dexie from"dexie";var __assign=function(){return(__assign=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)},b64encode="undefined"!=typeof Buffer?function(e){return ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"):Buffer.from(e).toString("base64")}:function(e){return btoa(String.fromCharCode.apply(null,e))};function b64LexEncode(e){return b64ToLex(b64encode(e))}function b64ToLex(e){for(var r="",t=0,n=e.length;t<n;t++)r+=ENCODE_TABLE[e[t]];return r}for(var DECODE_TABLE={"-":"=",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",A:"K",B:"L",C:"M",D:"N",E:"O",F:"P",G:"Q",H:"R",I:"S",J:"T",K:"U",L:"V",M:"W",N:"X",O:"Y",P:"Z",Q:"a",R:"b",S:"c",T:"d",U:"e",V:"f",W:"g",X:"h",Y:"i",Z:"j",_:"k",a:"l",b:"m",c:"n",d:"o",e:"p",f:"q",g:"r",h:"s",i:"t",j:"u",k:"v",l:"w",m:"x",n:"y",o:"z",p:"0",q:"1",r:"2",s:"3",t:"4",u:"5",v:"6",w:"7",x:"8",y:"9",z:"+","~":"/"},ENCODE_TABLE={},_i=0,_a=Object.keys(DECODE_TABLE);_i<_a.length;_i++){var c=_a[_i];ENCODE_TABLE[DECODE_TABLE[c]]=c}function getEffectiveKeys(e,r){var t;return"delete"===r.type?r.keys:(null===(t=r.keys)||void 0===t?void 0:t.slice())||r.values.map(e.extractKey)}function applyToUpperBitFix(e,r){return(1&r?e[0].toUpperCase():e[0].toLowerCase())+(2&r?e[1].toUpperCase():e[1].toLowerCase())+(4&r?e[2].toUpperCase():e[2].toLowerCase())}var consonants=/b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|x|y|z/i;function generateTablePrefix(e,r){for(var t="",n=0,i=e.length;n<i&&t.length<3;++n)consonants.test(e[n])&&(t+=e[n].toLowerCase());for(;r.has(t);){if(/\d/g.test(t)){if(!((t=t.substr(0,t.length-1)+(t[t.length-1]+1)).length>3))continue;t=t.substr(0,3)}else if(t.length<3){t+="2";continue}for(var a=1,o=t;r.has(o)&&a<8;)o=applyToUpperBitFix(t,a),++a;if(a<8)t=o;else{var s=t.charCodeAt(2)+1&127;t=t.substr(0,2)+String.fromCharCode(s)}}return t}var time=0;function generateKey(e){var r=new Uint8Array(18),t=new Uint8Array(r.buffer,0,6),n=Date.now();time>=n?++time:time=n,t[0]=time/1099511627776,t[1]=time/4294967296,t[2]=time/16777216,t[3]=time/65536,t[4]=time/256,t[5]=time;var i=new Uint8Array(r.buffer,6);return crypto.getRandomValues(i),e+b64LexEncode(new Uint8Array(r.buffer))}function createIdGenerationMiddleware(e){return{stack:"dbcore",name:"idGenerationMiddleware",create:function(r){var t=new Set;return r.schema.tables.forEach((function(r){var n=e[r.name]||(e[r.name]={}),i=generateTablePrefix(r.name,t);t.add(i),n.idPrefix=i})),__assign(__assign({},r),{table:function(t){var n=r.table(t),i=e[t];return(null==i?void 0:i.generatedGlobalId)?__assign(__assign({},n),{mutate:function(r){if("add"===r.type||"put"===r.type){var a=null,o=getEffectiveKeys(n.schema.primaryKey,r);return o.forEach((function(s,u){if(void 0===s)o[u]=generateKey(e[t].idPrefix),n.schema.primaryKey.outbound||(a||(a=r.values.slice()),a[u]=Dexie.deepClone(a[u]),Dexie.setByKeyPath(a[u],n.schema.primaryKey.keyPath,o[u]));else if("string"!=typeof s||!s.startsWith(i.idPrefix))throw new Dexie.ConstraintError('The ID "'+s+'" is not valid for table "'+t+'". The ID must be a string prefixed with "'+i.idPrefix+'"')})),n.mutate(__assign(__assign({},r),{keys:o,values:a||r.values}))}return n.mutate(r)}}):n}})}}}function overrideParseStoresSpec(e,r){return function(t,n){var i=__assign(__assign({},t),{_cloud:"id"});return Object.keys(t).forEach((function(e){/^\@/.test(t[e])&&(i[e]=t[e].substr(1),r[e]={generatedGlobalId:!0})})),e.call(this,i,n)}}function dexieCloud(e){e.cloud={version:"1.0.0-alpha.4",options:{databaseUrl:""},schema:{},configure:function(r){return e.cloud.options=r,Promise.resolve()}},e.Version.prototype._parseStoresSpec=Dexie.override(e.Version.prototype._parseStoresSpec,(function(r){return overrideParseStoresSpec(r,e.cloud.schema)})),e.use(createIdGenerationMiddleware(e.cloud.schema))}dexieCloud.version="1.0.0-alpha.4",Dexie.Cloud=dexieCloud,Dexie.addons.push(dexieCloud);export default dexieCloud;export{dexieCloud};
import Dexie from"dexie";var __assign=function(){return(__assign=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)},b64encode="undefined"!=typeof Buffer?function(e){return ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"):Buffer.from(e).toString("base64")}:function(e){return btoa(String.fromCharCode.apply(null,e))};function b64LexEncode(e){return b64ToLex(b64encode(e))}function b64ToLex(e){for(var r="",t=0,n=e.length;t<n;t++)r+=ENCODE_TABLE[e[t]];return r}for(var DECODE_TABLE={"-":"=",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",A:"K",B:"L",C:"M",D:"N",E:"O",F:"P",G:"Q",H:"R",I:"S",J:"T",K:"U",L:"V",M:"W",N:"X",O:"Y",P:"Z",Q:"a",R:"b",S:"c",T:"d",U:"e",V:"f",W:"g",X:"h",Y:"i",Z:"j",_:"k",a:"l",b:"m",c:"n",d:"o",e:"p",f:"q",g:"r",h:"s",i:"t",j:"u",k:"v",l:"w",m:"x",n:"y",o:"z",p:"0",q:"1",r:"2",s:"3",t:"4",u:"5",v:"6",w:"7",x:"8",y:"9",z:"+","~":"/"},ENCODE_TABLE={},_i=0,_a=Object.keys(DECODE_TABLE);_i<_a.length;_i++){var c=_a[_i];ENCODE_TABLE[DECODE_TABLE[c]]=c}function getEffectiveKeys(e,r){var t;return"delete"===r.type?r.keys:(null===(t=r.keys)||void 0===t?void 0:t.slice())||r.values.map(e.extractKey)}function applyToUpperBitFix(e,r){return(1&r?e[0].toUpperCase():e[0].toLowerCase())+(2&r?e[1].toUpperCase():e[1].toLowerCase())+(4&r?e[2].toUpperCase():e[2].toLowerCase())}var consonants=/b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|x|y|z/i;function generateTablePrefix(e,r){for(var t="",n=0,i=e.length;n<i&&t.length<3;++n)consonants.test(e[n])&&(t+=e[n].toLowerCase());for(;r.has(t);){if(/\d/g.test(t)){if(!((t=t.substr(0,t.length-1)+(t[t.length-1]+1)).length>3))continue;t=t.substr(0,3)}else if(t.length<3){t+="2";continue}for(var a=1,o=t;r.has(o)&&a<8;)o=applyToUpperBitFix(t,a),++a;if(a<8)t=o;else{var s=t.charCodeAt(2)+1&127;t=t.substr(0,2)+String.fromCharCode(s)}}return t}var time=0;function generateKey(e){var r=new Uint8Array(18),t=new Uint8Array(r.buffer,0,6),n=Date.now();time>=n?++time:time=n,t[0]=time/1099511627776,t[1]=time/4294967296,t[2]=time/16777216,t[3]=time/65536,t[4]=time/256,t[5]=time;var i=new Uint8Array(r.buffer,6);return crypto.getRandomValues(i),e+b64LexEncode(new Uint8Array(r.buffer))}function createIdGenerationMiddleware(e){return{stack:"dbcore",name:"idGenerationMiddleware",create:function(r){var t=new Set;return r.schema.tables.forEach((function(r){var n=e[r.name]||(e[r.name]={}),i=generateTablePrefix(r.name,t);t.add(i),n.idPrefix=i})),__assign(__assign({},r),{table:function(t){var n=r.table(t),i=e[t];return(null==i?void 0:i.generatedGlobalId)?__assign(__assign({},n),{mutate:function(r){if("add"===r.type||"put"===r.type){var a=null,o=getEffectiveKeys(n.schema.primaryKey,r);return o.forEach((function(s,u){if(void 0===s)o[u]=generateKey(e[t].idPrefix),n.schema.primaryKey.outbound||(a||(a=r.values.slice()),a[u]=Dexie.deepClone(a[u]),Dexie.setByKeyPath(a[u],n.schema.primaryKey.keyPath,o[u]));else if("string"!=typeof s||!s.startsWith(i.idPrefix))throw new Dexie.ConstraintError('The ID "'+s+'" is not valid for table "'+t+'". The ID must be a string prefixed with "'+i.idPrefix+'"')})),n.mutate(__assign(__assign({},r),{keys:o,values:a||r.values}))}return n.mutate(r)}}):n}})}}}function overrideParseStoresSpec(e,r){return function(t,n){var i=__assign(__assign({},t),{_cloud:"id"});return Object.keys(t).forEach((function(e){/^\@/.test(t[e])&&(i[e]=t[e].substr(1),r[e]={generatedGlobalId:!0})})),e.call(this,i,n)}}function dexieCloud(e){e.cloud={version:"1.0.0-alpha.5",options:{databaseUrl:""},schema:{},configure:function(r){return e.cloud.options=r,Promise.resolve()}},e.Version.prototype._parseStoresSpec=Dexie.override(e.Version.prototype._parseStoresSpec,(function(r){return overrideParseStoresSpec(r,e.cloud.schema)})),e.use(createIdGenerationMiddleware(e.cloud.schema))}dexieCloud.version="1.0.0-alpha.5",Dexie.Cloud=dexieCloud,Dexie.addons.push(dexieCloud);export default dexieCloud;export{dexieCloud};

@@ -11,3 +11,3 @@ /* ==========================================================================

*
* Version 1.0.0-alpha.4, Fri Oct 30 2020
* Version 1.0.0-alpha.5, Fri Oct 30 2020
*

@@ -261,3 +261,3 @@ * http://dexie.org

db.cloud = {
version: "1.0.0-alpha.4",
version: "1.0.0-alpha.5",
options: { databaseUrl: "" },

@@ -274,3 +274,3 @@ schema: {},

}
dexieCloud.version = "1.0.0-alpha.4";
dexieCloud.version = "1.0.0-alpha.5";
Dexie.Cloud = dexieCloud;

@@ -277,0 +277,0 @@ Dexie.addons.push(dexieCloud);

@@ -1,1 +0,1 @@

import Dexie from"dexie";const b64encode="undefined"!=typeof Buffer?e=>ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"):Buffer.from(e).toString("base64"):e=>btoa(String.fromCharCode.apply(null,e));function b64LexEncode(e){return b64ToLex(b64encode(e))}function b64ToLex(e){for(var t="",r=0,o=e.length;r<o;r++)t+=ENCODE_TABLE[e[r]];return t}const DECODE_TABLE={"-":"=",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",A:"K",B:"L",C:"M",D:"N",E:"O",F:"P",G:"Q",H:"R",I:"S",J:"T",K:"U",L:"V",M:"W",N:"X",O:"Y",P:"Z",Q:"a",R:"b",S:"c",T:"d",U:"e",V:"f",W:"g",X:"h",Y:"i",Z:"j",_:"k",a:"l",b:"m",c:"n",d:"o",e:"p",f:"q",g:"r",h:"s",i:"t",j:"u",k:"v",l:"w",m:"x",n:"y",o:"z",p:"0",q:"1",r:"2",s:"3",t:"4",u:"5",v:"6",w:"7",x:"8",y:"9",z:"+","~":"/"},ENCODE_TABLE={};for(const e of Object.keys(DECODE_TABLE))ENCODE_TABLE[DECODE_TABLE[e]]=e;function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys?.slice()||t.values.map(e.extractKey)}function applyToUpperBitFix(e,t){return(1&t?e[0].toUpperCase():e[0].toLowerCase())+(2&t?e[1].toUpperCase():e[1].toLowerCase())+(4&t?e[2].toUpperCase():e[2].toLowerCase())}const consonants=/b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|x|y|z/i;function generateTablePrefix(e,t){let r="";for(let t=0,o=e.length;t<o&&r.length<3;++t)consonants.test(e[t])&&(r+=e[t].toLowerCase());for(;t.has(r);){if(/\d/g.test(r)){if(r=r.substr(0,r.length-1)+(r[r.length-1]+1),!(r.length>3))continue;r=r.substr(0,3)}else if(r.length<3){r+="2";continue}let e=1,o=r;for(;t.has(o)&&e<8;)o=applyToUpperBitFix(r,e),++e;if(e<8)r=o;else{let e=r.charCodeAt(2)+1&127;r=r.substr(0,2)+String.fromCharCode(e)}}return r}let time=0;function generateKey(e){const t=new Uint8Array(18),r=new Uint8Array(t.buffer,0,6),o=Date.now();time>=o?++time:time=o,r[0]=time/1099511627776,r[1]=time/4294967296,r[2]=time/16777216,r[3]=time/65536,r[4]=time/256,r[5]=time;const n=new Uint8Array(t.buffer,6);crypto.getRandomValues(n);return e+b64LexEncode(new Uint8Array(t.buffer))}function createIdGenerationMiddleware(e){return{stack:"dbcore",name:"idGenerationMiddleware",create:t=>{const r=new Set;return t.schema.tables.forEach(t=>{const o=e[t.name]||(e[t.name]={}),n=generateTablePrefix(t.name,r);r.add(n),o.idPrefix=n}),{...t,table:r=>{const o=t.table(r),n=e[r];return n?.generatedGlobalId?{...o,mutate:t=>{if("add"===t.type||"put"===t.type){let i=null;const a=getEffectiveKeys(o.schema.primaryKey,t);return a.forEach((s,u)=>{if(void 0===s)a[u]=generateKey(e[r].idPrefix),o.schema.primaryKey.outbound||(i||(i=t.values.slice()),i[u]=Dexie.deepClone(i[u]),Dexie.setByKeyPath(i[u],o.schema.primaryKey.keyPath,a[u]));else if("string"!=typeof s||!s.startsWith(n.idPrefix))throw new Dexie.ConstraintError(`The ID "${s}" is not valid for table "${r}". The ID must be a string prefixed with "${n.idPrefix}"`)}),o.mutate({...t,keys:a,values:i||t.values})}return o.mutate(t)}}:o}}}}}function overrideParseStoresSpec(e,t){return function(r,o){const n={...r,_cloud:"id"};return Object.keys(r).forEach(e=>{/^\@/.test(r[e])&&(n[e]=r[e].substr(1),t[e]={generatedGlobalId:!0})}),e.call(this,n,o)}}function dexieCloud(e){e.cloud={version:"1.0.0-alpha.4",options:{databaseUrl:""},schema:{},configure:t=>(e.cloud.options=t,Promise.resolve())},e.Version.prototype._parseStoresSpec=Dexie.override(e.Version.prototype._parseStoresSpec,t=>overrideParseStoresSpec(t,e.cloud.schema)),e.use(createIdGenerationMiddleware(e.cloud.schema))}dexieCloud.version="1.0.0-alpha.4",Dexie.Cloud=dexieCloud,Dexie.addons.push(dexieCloud);export default dexieCloud;export{dexieCloud};
import Dexie from"dexie";const b64encode="undefined"!=typeof Buffer?e=>ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"):Buffer.from(e).toString("base64"):e=>btoa(String.fromCharCode.apply(null,e));function b64LexEncode(e){return b64ToLex(b64encode(e))}function b64ToLex(e){for(var t="",r=0,o=e.length;r<o;r++)t+=ENCODE_TABLE[e[r]];return t}const DECODE_TABLE={"-":"=",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",A:"K",B:"L",C:"M",D:"N",E:"O",F:"P",G:"Q",H:"R",I:"S",J:"T",K:"U",L:"V",M:"W",N:"X",O:"Y",P:"Z",Q:"a",R:"b",S:"c",T:"d",U:"e",V:"f",W:"g",X:"h",Y:"i",Z:"j",_:"k",a:"l",b:"m",c:"n",d:"o",e:"p",f:"q",g:"r",h:"s",i:"t",j:"u",k:"v",l:"w",m:"x",n:"y",o:"z",p:"0",q:"1",r:"2",s:"3",t:"4",u:"5",v:"6",w:"7",x:"8",y:"9",z:"+","~":"/"},ENCODE_TABLE={};for(const e of Object.keys(DECODE_TABLE))ENCODE_TABLE[DECODE_TABLE[e]]=e;function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys?.slice()||t.values.map(e.extractKey)}function applyToUpperBitFix(e,t){return(1&t?e[0].toUpperCase():e[0].toLowerCase())+(2&t?e[1].toUpperCase():e[1].toLowerCase())+(4&t?e[2].toUpperCase():e[2].toLowerCase())}const consonants=/b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|x|y|z/i;function generateTablePrefix(e,t){let r="";for(let t=0,o=e.length;t<o&&r.length<3;++t)consonants.test(e[t])&&(r+=e[t].toLowerCase());for(;t.has(r);){if(/\d/g.test(r)){if(r=r.substr(0,r.length-1)+(r[r.length-1]+1),!(r.length>3))continue;r=r.substr(0,3)}else if(r.length<3){r+="2";continue}let e=1,o=r;for(;t.has(o)&&e<8;)o=applyToUpperBitFix(r,e),++e;if(e<8)r=o;else{let e=r.charCodeAt(2)+1&127;r=r.substr(0,2)+String.fromCharCode(e)}}return r}let time=0;function generateKey(e){const t=new Uint8Array(18),r=new Uint8Array(t.buffer,0,6),o=Date.now();time>=o?++time:time=o,r[0]=time/1099511627776,r[1]=time/4294967296,r[2]=time/16777216,r[3]=time/65536,r[4]=time/256,r[5]=time;const n=new Uint8Array(t.buffer,6);crypto.getRandomValues(n);return e+b64LexEncode(new Uint8Array(t.buffer))}function createIdGenerationMiddleware(e){return{stack:"dbcore",name:"idGenerationMiddleware",create:t=>{const r=new Set;return t.schema.tables.forEach(t=>{const o=e[t.name]||(e[t.name]={}),n=generateTablePrefix(t.name,r);r.add(n),o.idPrefix=n}),{...t,table:r=>{const o=t.table(r),n=e[r];return n?.generatedGlobalId?{...o,mutate:t=>{if("add"===t.type||"put"===t.type){let i=null;const a=getEffectiveKeys(o.schema.primaryKey,t);return a.forEach((s,u)=>{if(void 0===s)a[u]=generateKey(e[r].idPrefix),o.schema.primaryKey.outbound||(i||(i=t.values.slice()),i[u]=Dexie.deepClone(i[u]),Dexie.setByKeyPath(i[u],o.schema.primaryKey.keyPath,a[u]));else if("string"!=typeof s||!s.startsWith(n.idPrefix))throw new Dexie.ConstraintError(`The ID "${s}" is not valid for table "${r}". The ID must be a string prefixed with "${n.idPrefix}"`)}),o.mutate({...t,keys:a,values:i||t.values})}return o.mutate(t)}}:o}}}}}function overrideParseStoresSpec(e,t){return function(r,o){const n={...r,_cloud:"id"};return Object.keys(r).forEach(e=>{/^\@/.test(r[e])&&(n[e]=r[e].substr(1),t[e]={generatedGlobalId:!0})}),e.call(this,n,o)}}function dexieCloud(e){e.cloud={version:"1.0.0-alpha.5",options:{databaseUrl:""},schema:{},configure:t=>(e.cloud.options=t,Promise.resolve())},e.Version.prototype._parseStoresSpec=Dexie.override(e.Version.prototype._parseStoresSpec,t=>overrideParseStoresSpec(t,e.cloud.schema)),e.use(createIdGenerationMiddleware(e.cloud.schema))}dexieCloud.version="1.0.0-alpha.5",Dexie.Cloud=dexieCloud,Dexie.addons.push(dexieCloud);export default dexieCloud;export{dexieCloud};
{
"name": "dexie-cloud-addon",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"description": "Dexie addon that syncs with to Dexie Cloud",

@@ -12,3 +12,2 @@ "main": "dist/dexie-cloud.js",

},
"bin": "./dexie-cloud",
"repository": {

@@ -15,0 +14,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet

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