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

@vtex/api

Package Overview
Dependencies
Maintainers
5
Versions
890
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtex/api - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

128

lib/AppsClient.js

@@ -15,130 +15,2 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
const routes = {

@@ -145,0 +17,0 @@ Apps: (account, workspace) => `/${ account }/${ workspace }/apps`,

@@ -13,130 +13,2 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
const data = (_ref) => {

@@ -146,3 +18,2 @@ let _data = _ref.data;

};
class Client {

@@ -149,0 +20,0 @@ constructor(authToken, userAgent, baseURL) {

@@ -9,131 +9,2 @@ 'use strict';

exports.vtexid = vtexid;
Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
function api(env) {

@@ -140,0 +11,0 @@ return {

@@ -21,130 +21,2 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
module.exports = {

@@ -151,0 +23,0 @@ AppsClient: _AppsClient2.default,

@@ -31,130 +31,2 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
const routes = {

@@ -167,3 +39,2 @@ Registry: (account, workspace) => `/${ account }/${ workspace }/registry`,

};
class RegistryClient extends _Client2.default {

@@ -170,0 +41,0 @@ constructor(authToken, userAgent) {

129

lib/VBaseClient.js

@@ -23,132 +23,5 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
const DEFAULT_WORKSPACE = 'master';
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
const DEFAULT_WORKSPACE = 'master';
const routes = {

@@ -155,0 +28,0 @@ Account: account => `/${ account }`,

@@ -15,130 +15,2 @@ 'use strict';

Function.prototype.$asyncbind = function anonymous(self, catcher) {
var resolver = this;
if (catcher === true) {
if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = function factory(tick) {
var _tasks = [];
if (!tick) {
try {
tick = process.nextTick;
} catch (ex) {
tick = function tick(p) {
setTimeout(p, 0);
};
}
}
function _untask() {
for (var i = 0; i < _tasks.length; i += 2) {
var t = _tasks[i + 1],
r = _tasks[i];
for (var j = 0; j < t.length; j++) t[j].call(null, r);
}
_tasks = [];
}
function isThenable(obj) {
return obj && obj instanceof Object && typeof obj.then === 'function';
}
function EagerThenable(resolver) {
function done(inline) {
var w;
if (_sync || phase < 0 || (w = _thens[phase]).length === 0) return;
_tasks.push(result, w);
_thens = [[], []];
if (_tasks.length === 2) inline ? _untask() : tick(_untask);
}
function resolveThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 0;
result = x;
done(true);
}
function rejectThen(x) {
if (phase >= 0) return;
if (isThenable(x)) return x.then(resolveThen, rejectThen);
phase = 1;
result = x;
done(true);
}
function settler(resolver, rejecter) {
_thens[0].push(resolver);
_thens[1].push(rejecter);
done();
}
function toString() {
return 'EagerThenable{' + {
'-1': 'pending',
0: 'resolved',
1: 'rejected'
}[phase] + '}=' + result.toString();
}
function guard() {
try {
resolver.call(null, resolveThen, rejectThen);
} catch (ex) {
rejectThen(ex);
}
}
this.then = settler;
this.toString = toString;
var _thens = [[], []],
_sync = true,
phase = -1,
result;
guard();
_sync = false;
done();
}
EagerThenable.resolve = function (v) {
return isThenable(v) ? v : {
then: function then(resolve, reject) {
return resolve(v);
}
};
};
return EagerThenable;
}();
return new Function.prototype.$asyncbind.EagerThenable(boundThen);
}
if (catcher) {
if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher);
return then;
}
function then(result, error) {
try {
return result && result instanceof Object && typeof result.then === 'function' ? result.then(then, catcher) : resolver.call(self, result, error || catcher);
} catch (ex) {
return (error || catcher)(ex);
}
}
function boundThen(result, error) {
return resolver.call(self, result, error);
}
boundThen.then = boundThen;
return boundThen;
};
const routes = {

@@ -145,0 +17,0 @@ Start: () => '/start',

14

package.json
{
"name": "@vtex/api",
"version": "0.10.2",
"version": "0.10.3",
"description": "VTEX I/O API client",
"main": "./lib/index.js",
"scripts": {
"clean": "rimraf lib/",
"ava": "ava",

@@ -15,3 +16,3 @@ "test": "run-s lint flow ava",

"lint": "eslint src",
"prepublish": "run-s build copy test"
"prepublish": "run-s clean build copy test"
},

@@ -36,5 +37,4 @@ "engines": {

"ava": "^0.16.0",
"babel-cli": "^6.9.0",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-cli": "^6.16.0",
"babel-eslint": "^6.1.2",
"babel-plugin-transform-flow-strip-types": "^6.14.0",

@@ -53,9 +53,7 @@ "babel-preset-es2015-node4": "^2.1.0",

"ava": {
"verbose": true,
"failFast": true,
"require": [
"babel-register"
],
"babel": "inherit"
]
}
}

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