kinvey-js-sdk
Advanced tools
Comparing version 3.13.0-next.26 to 3.13.0-next.27
@@ -7,2 +7,5 @@ "use strict"; | ||
var config_1 = require("./config"); | ||
var query_1 = require("./query"); | ||
var aggregation_1 = require("./aggregation"); | ||
var kinvey_1 = require("./errors/kinvey"); | ||
var queue = new p_queue_1.default({ concurrency: 1 }); | ||
@@ -37,3 +40,7 @@ function generateId(length) { | ||
switch (_a.label) { | ||
case 0: return [4, this.storageAdapter.find(this.dbName, this.collectionName)]; | ||
case 0: | ||
if (query && !(query instanceof query_1.Query)) { | ||
throw new kinvey_1.KinveyError('Invalid query. It must be an instance of the Query class.'); | ||
} | ||
return [4, this.storageAdapter.find(this.dbName, this.collectionName)]; | ||
case 1: | ||
@@ -54,3 +61,7 @@ docs = _a.sent(); | ||
switch (_a.label) { | ||
case 0: return [4, this.find()]; | ||
case 0: | ||
if (!(aggregation instanceof aggregation_1.Aggregation)) { | ||
throw new kinvey_1.KinveyError('Invalid aggregation. It must be an instance of the Aggregation class.'); | ||
} | ||
return [4, this.find()]; | ||
case 1: | ||
@@ -57,0 +68,0 @@ docs = _a.sent(); |
@@ -16,2 +16,3 @@ "use strict"; | ||
var signup_1 = require("./signup"); | ||
var signupWithIdentity_1 = require("./signupWithIdentity"); | ||
var update_1 = require("./update"); | ||
@@ -36,2 +37,3 @@ var getActiveUser_1 = require("./getActiveUser"); | ||
user_1.User.signup = signup_1.signup; | ||
user_1.User.signUpWithIdentity = signupWithIdentity_1.signUpWithIdentity; | ||
user_1.User.update = update_1.update; | ||
@@ -38,0 +40,0 @@ user_1.User.verifyEmail = verifyEmail_1.verifyEmail; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var isString_1 = tslib_1.__importDefault(require("lodash/isString")); | ||
var isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject")); | ||
var activeUser_1 = require("../errors/activeUser"); | ||
@@ -14,3 +14,3 @@ var kinvey_1 = require("../errors/kinvey"); | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var activeUser, credentials, request, response, session; | ||
var activeUser, credentials, timeout, request, response, session; | ||
return tslib_1.__generator(this, function (_a) { | ||
@@ -20,10 +20,12 @@ switch (_a.label) { | ||
activeUser = getActiveUser_1.getActiveUser(); | ||
credentials = { username: username, password: password }; | ||
timeout = options.timeout; | ||
if (activeUser) { | ||
throw new activeUser_1.ActiveUserError('An active user already exists. Please logout the active user before you login.'); | ||
} | ||
if (isString_1.default(username)) { | ||
credentials = { username: username, password: password }; | ||
} | ||
else { | ||
if (isPlainObject_1.default(username)) { | ||
credentials = username; | ||
if (isPlainObject_1.default(password)) { | ||
timeout = password.timeout; | ||
} | ||
} | ||
@@ -44,3 +46,3 @@ if (credentials.username) { | ||
body: credentials, | ||
timeout: options.timeout | ||
timeout: timeout | ||
}); | ||
@@ -47,0 +49,0 @@ return [4, request.execute()]; |
@@ -1,1 +0,1 @@ | ||
export default function signupWithIdentity(): Promise<void>; | ||
export declare function signUpWithIdentity(): Promise<void>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
var kinvey_1 = require("../errors/kinvey"); | ||
function signupWithIdentity() { | ||
function signUpWithIdentity() { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
@@ -13,3 +13,3 @@ return tslib_1.__generator(this, function (_a) { | ||
} | ||
exports.default = signupWithIdentity; | ||
exports.signUpWithIdentity = signUpWithIdentity; | ||
//# sourceMappingURL=signupWithIdentity.js.map |
@@ -12,3 +12,2 @@ "use strict"; | ||
var live_1 = require("../live"); | ||
var log_1 = require("../log"); | ||
var utils_1 = require("./utils"); | ||
@@ -253,4 +252,2 @@ var User = (function () { | ||
error_1 = _a.sent(); | ||
log_1.log.error('Logout request failed.'); | ||
log_1.log.error(error_1.message); | ||
return [3, 4]; | ||
@@ -257,0 +254,0 @@ case 4: |
{ | ||
"name": "kinvey-js-sdk", | ||
"description": "Kinvey JavaScript SDK for JavaScript applications.", | ||
"version": "3.13.0-next.26", | ||
"version": "3.13.0-next.27", | ||
"license": "Apache-2.0", | ||
@@ -55,3 +55,2 @@ "homepage": "https://github.com/Kinvey/js-sdk/tree/master/packages/js-sdk", | ||
"p-queue": "~4.0.0", | ||
"pubnub": "git+https://github.com/thomasconner/javascript.git#develop", | ||
"rxjs": "~6.4.0", | ||
@@ -58,0 +57,0 @@ "sift": "~7.0.1", |
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
Sorry, the diff of this file is not supported yet
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
448675
19
6444