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

workbox-background-sync

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-background-sync - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

build/importScripts/workbox-background-sync.dev.v0.0.2.js

51

build/test/background-sync-queue-plugin.js

@@ -16,6 +16,6 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.goog.backgroundSyncQueue.test.BackgroundSyncQueuePlugin = (function () {
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
this.workbox.backgroundSync.test.BackgroundSyncQueuePlugin = (function () {
'use strict';

@@ -725,3 +725,3 @@

var stackframe = createCommonjsModule(function (module, exports) {
(function(root, factory) {
(function (root, factory) {
'use strict';

@@ -736,3 +736,3 @@ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.

}
}(commonjsGlobal, function() {
}(commonjsGlobal, function () {
'use strict';

@@ -748,3 +748,3 @@ function _isNumber(n) {

function _getter(p) {
return function() {
return function () {
return this[p];

@@ -759,6 +759,5 @@ };

var props = booleanProps.concat(numericProps, stringProps, arrayProps);
function StackFrame(obj) {
if (obj instanceof Object) {
var props = booleanProps.concat(numericProps.concat(stringProps.concat(arrayProps)));
for (var i = 0; i < props.length; i++) {

@@ -773,6 +772,6 @@ if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {

StackFrame.prototype = {
getArgs: function() {
getArgs: function () {
return this.args;
},
setArgs: function(v) {
setArgs: function (v) {
if (Object.prototype.toString.call(v) !== '[object Array]') {

@@ -784,6 +783,6 @@ throw new TypeError('Args must be an Array');

getEvalOrigin: function() {
getEvalOrigin: function () {
return this.evalOrigin;
},
setEvalOrigin: function(v) {
setEvalOrigin: function (v) {
if (v instanceof StackFrame) {

@@ -798,3 +797,3 @@ this.evalOrigin = v;

toString: function() {
toString: function () {
var functionName = this.getFunctionName() || '{anonymous}';

@@ -811,4 +810,4 @@ var args = '(' + (this.getArgs() || []).join(',') + ')';

StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function (p) {
return function (v) {
this[p] = Boolean(v);

@@ -821,4 +820,4 @@ };

StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function (p) {
return function (v) {
if (!_isNumber(v)) {

@@ -834,4 +833,4 @@ throw new TypeError(p + ' must be a Number');

StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function (p) {
return function (v) {
this[p] = String(v);

@@ -1374,3 +1373,3 @@ };

* When you want to push the requests manually
* let bgQueue = new goog.backgroundSyncQueue.Queue();
* let bgQueue = new workbox.backgroundSync.Queue();
* self.addEventListener('fetch', function(e) {

@@ -1491,3 +1490,3 @@ * if (e.request.url.startsWith('https://jsonplaceholder.typicode.com')) {

* // requests
* let bgQueue = new goog.backgroundSync.QueuePlugin({callbacks:
* let bgQueue = new workbox.backgroundSync.QueuePlugin({callbacks:
* {

@@ -1504,12 +1503,12 @@ * onResponse: async(hash, res) => {

*
* const requestWrapper = new goog.runtimeCaching.RequestWrapper({
* const requestWrapper = new workbox.runtimeCaching.RequestWrapper({
* plugins: [bgQueue],
* });
*
* const route = new goog.routing.RegExpRoute({
* const route = new workbox.routing.RegExpRoute({
* regExp: new RegExp('^https://jsonplaceholder.typicode.com'),
* handler: new goog.runtimeCaching.NetworkOnly({requestWrapper}),
* handler: new workbox.runtimeCaching.NetworkOnly({requestWrapper}),
* });
*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -1516,0 +1515,0 @@ *

@@ -16,6 +16,6 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.goog.backgroundSyncQueue.test.BackgroundSyncQueue = (function () {
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
this.workbox.backgroundSync.test.BackgroundSyncQueue = (function () {
'use strict';

@@ -725,3 +725,3 @@

var stackframe = createCommonjsModule(function (module, exports) {
(function(root, factory) {
(function (root, factory) {
'use strict';

@@ -736,3 +736,3 @@ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.

}
}(commonjsGlobal, function() {
}(commonjsGlobal, function () {
'use strict';

@@ -748,3 +748,3 @@ function _isNumber(n) {

function _getter(p) {
return function() {
return function () {
return this[p];

@@ -759,6 +759,5 @@ };

var props = booleanProps.concat(numericProps, stringProps, arrayProps);
function StackFrame(obj) {
if (obj instanceof Object) {
var props = booleanProps.concat(numericProps.concat(stringProps.concat(arrayProps)));
for (var i = 0; i < props.length; i++) {

@@ -773,6 +772,6 @@ if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {

StackFrame.prototype = {
getArgs: function() {
getArgs: function () {
return this.args;
},
setArgs: function(v) {
setArgs: function (v) {
if (Object.prototype.toString.call(v) !== '[object Array]') {

@@ -784,6 +783,6 @@ throw new TypeError('Args must be an Array');

getEvalOrigin: function() {
getEvalOrigin: function () {
return this.evalOrigin;
},
setEvalOrigin: function(v) {
setEvalOrigin: function (v) {
if (v instanceof StackFrame) {

@@ -798,3 +797,3 @@ this.evalOrigin = v;

toString: function() {
toString: function () {
var functionName = this.getFunctionName() || '{anonymous}';

@@ -811,4 +810,4 @@ var args = '(' + (this.getArgs() || []).join(',') + ')';

StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function (p) {
return function (v) {
this[p] = Boolean(v);

@@ -821,4 +820,4 @@ };

StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function (p) {
return function (v) {
if (!_isNumber(v)) {

@@ -834,4 +833,4 @@ throw new TypeError(p + ' must be a Number');

StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function (p) {
return function (v) {
this[p] = String(v);

@@ -1374,3 +1373,3 @@ };

* When you want to push the requests manually
* let bgQueue = new goog.backgroundSyncQueue.Queue();
* let bgQueue = new workbox.backgroundSync.Queue();
* self.addEventListener('fetch', function(e) {

@@ -1377,0 +1376,0 @@ * if (e.request.url.startsWith('https://jsonplaceholder.typicode.com')) {

@@ -16,5 +16,5 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
(function (exports) {

@@ -36,3 +36,3 @@ 'use strict';

var stackframe = createCommonjsModule(function (module, exports) {
(function(root, factory) {
(function (root, factory) {
'use strict';

@@ -47,3 +47,3 @@ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.

}
}(commonjsGlobal, function() {
}(commonjsGlobal, function () {
'use strict';

@@ -59,3 +59,3 @@ function _isNumber(n) {

function _getter(p) {
return function() {
return function () {
return this[p];

@@ -70,6 +70,5 @@ };

var props = booleanProps.concat(numericProps, stringProps, arrayProps);
function StackFrame(obj) {
if (obj instanceof Object) {
var props = booleanProps.concat(numericProps.concat(stringProps.concat(arrayProps)));
for (var i = 0; i < props.length; i++) {

@@ -84,6 +83,6 @@ if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {

StackFrame.prototype = {
getArgs: function() {
getArgs: function () {
return this.args;
},
setArgs: function(v) {
setArgs: function (v) {
if (Object.prototype.toString.call(v) !== '[object Array]') {

@@ -95,6 +94,6 @@ throw new TypeError('Args must be an Array');

getEvalOrigin: function() {
getEvalOrigin: function () {
return this.evalOrigin;
},
setEvalOrigin: function(v) {
setEvalOrigin: function (v) {
if (v instanceof StackFrame) {

@@ -109,3 +108,3 @@ this.evalOrigin = v;

toString: function() {
toString: function () {
var functionName = this.getFunctionName() || '{anonymous}';

@@ -122,4 +121,4 @@ var args = '(' + (this.getArgs() || []).join(',') + ')';

StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function (p) {
return function (v) {
this[p] = Boolean(v);

@@ -132,4 +131,4 @@ };

StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function (p) {
return function (v) {
if (!_isNumber(v)) {

@@ -145,4 +144,4 @@ throw new TypeError(p + ' must be a Number');

StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function (p) {
return function (v) {
this[p] = String(v);

@@ -510,3 +509,3 @@ };

}((this.goog.backgroundSyncQueue.test.BroadcastManager = this.goog.backgroundSyncQueue.test.BroadcastManager || {})));
}((this.workbox.backgroundSync.test.BroadcastManager = this.workbox.backgroundSync.test.BroadcastManager || {})));
//# sourceMappingURL=broadcast-manager.js.map

@@ -16,5 +16,5 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
(function (exports) {

@@ -43,3 +43,3 @@ 'use strict';

}((this.goog.backgroundSyncQueue.test.Constants = this.goog.backgroundSyncQueue.test.Constants || {})));
}((this.workbox.backgroundSync.test.Constants = this.workbox.backgroundSync.test.Constants || {})));
//# sourceMappingURL=constants.js.map

@@ -16,6 +16,6 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.goog.backgroundSyncQueue.test.IdbHelper = (function () {
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
this.workbox.backgroundSync.test.IdbHelper = (function () {
'use strict';

@@ -22,0 +22,0 @@

@@ -16,5 +16,5 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
(function (exports) {

@@ -593,3 +593,3 @@ 'use strict';

}((this.goog.backgroundSyncQueue.test.QueueUtils = this.goog.backgroundSyncQueue.test.QueueUtils || {})));
}((this.workbox.backgroundSync.test.QueueUtils = this.workbox.backgroundSync.test.QueueUtils || {})));
//# sourceMappingURL=queue-utils.js.map

@@ -16,6 +16,6 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.goog.backgroundSyncQueue.test.RequestManager = (function () {
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
this.workbox.backgroundSync.test.RequestManager = (function () {
'use strict';

@@ -22,0 +22,0 @@

@@ -16,6 +16,6 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.goog.backgroundSyncQueue.test.RequestQueue = (function () {
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
this.workbox.backgroundSync.test.RequestQueue = (function () {
'use strict';

@@ -403,3 +403,3 @@

var stackframe = createCommonjsModule(function (module, exports) {
(function(root, factory) {
(function (root, factory) {
'use strict';

@@ -414,3 +414,3 @@ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.

}
}(commonjsGlobal, function() {
}(commonjsGlobal, function () {
'use strict';

@@ -426,3 +426,3 @@ function _isNumber(n) {

function _getter(p) {
return function() {
return function () {
return this[p];

@@ -437,6 +437,5 @@ };

var props = booleanProps.concat(numericProps, stringProps, arrayProps);
function StackFrame(obj) {
if (obj instanceof Object) {
var props = booleanProps.concat(numericProps.concat(stringProps.concat(arrayProps)));
for (var i = 0; i < props.length; i++) {

@@ -451,6 +450,6 @@ if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {

StackFrame.prototype = {
getArgs: function() {
getArgs: function () {
return this.args;
},
setArgs: function(v) {
setArgs: function (v) {
if (Object.prototype.toString.call(v) !== '[object Array]') {

@@ -462,6 +461,6 @@ throw new TypeError('Args must be an Array');

getEvalOrigin: function() {
getEvalOrigin: function () {
return this.evalOrigin;
},
setEvalOrigin: function(v) {
setEvalOrigin: function (v) {
if (v instanceof StackFrame) {

@@ -476,3 +475,3 @@ this.evalOrigin = v;

toString: function() {
toString: function () {
var functionName = this.getFunctionName() || '{anonymous}';

@@ -489,4 +488,4 @@ var args = '(' + (this.getArgs() || []).join(',') + ')';

StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function (p) {
return function (v) {
this[p] = Boolean(v);

@@ -499,4 +498,4 @@ };

StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function (p) {
return function (v) {
if (!_isNumber(v)) {

@@ -512,4 +511,4 @@ throw new TypeError(p + ' must be a Number');

StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
return function(v) {
StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function (p) {
return function (v) {
this[p] = String(v);

@@ -516,0 +515,0 @@ };

@@ -16,5 +16,5 @@ /*

this.goog = this.goog || {};
this.goog.backgroundSyncQueue = this.goog.backgroundSyncQueue || {};
this.goog.backgroundSyncQueue.test = this.goog.backgroundSyncQueue.test || {};
this.workbox = this.workbox || {};
this.workbox.backgroundSync = this.workbox.backgroundSync || {};
this.workbox.backgroundSync.test = this.workbox.backgroundSync.test || {};
(function (exports) {

@@ -532,3 +532,3 @@ 'use strict';

}((this.goog.backgroundSyncQueue.test.ResponseManager = this.goog.backgroundSyncQueue.test.ResponseManager || {})));
}((this.workbox.backgroundSync.test.ResponseManager = this.workbox.backgroundSync.test.ResponseManager || {})));
//# sourceMappingURL=response-manager.js.map
{
"name": "workbox-background-sync",
"version": "0.0.1",
"version": "0.0.2",
"description": "Queues failed requests and uses the Background Sync API to replay those requests at a later time when the network state has changed.",

@@ -24,4 +24,4 @@ "keywords": [

"homepage": "https://github.com/GoogleChrome/sw-helpers/tree/master/packages/workbox-background-sync",
"main": "build/importScripts/workbox-background-sync.prod.v0.0.1.js",
"module": "build/modules/workbox-background-sync.prod.v0.0.1.mjs"
"main": "build/importScripts/workbox-background-sync.prod.v0.0.2.js",
"module": "build/modules/workbox-background-sync.prod.v0.0.2.mjs"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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