Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meteorrn/core",
"version": "2.27.1",
"version": "2.28.1",
"description": "Meteor Client for React Native",
"type": "module",
"main": "dist/src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
import type DDP from '../lib/ddp';

export type KeyStorage = {
getItem(key: string): Promise<string | null> | string | null;
setItem(key: string, value: string): Promise<void> | void;
removeItem(key: string): Promise<void> | void;
getItem(key: string): Promise<string | null>;
setItem(key: string, value: string): Promise<void>;
removeItem(key: string): Promise<void>;
};

export type LoggerPayload = object | string;
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ const { useTracker, withTracker, Mongo, ReactiveDict } = MeteorAugmented;

export { useTracker, Accounts, withTracker, Mongo, ReactiveDict, Tracker };
export { Vent } from './vent';
export type { LoginFailurePayload } from './user/User';
export default MeteorAugmented;
8 changes: 4 additions & 4 deletions src/user/Accounts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Data from '../Data';
import call from '../Call';
import User from './User';
import User, { type LoginFailurePayload } from './User';
import { hashPassword } from '../../lib/utils';
import Meteor from '../Meteor';

Expand Down Expand Up @@ -31,7 +31,7 @@ class AccountsPassword {
options.password = hashPassword(options.password) as any;

User._startLoggingIn();
call('createUser', options, (err: any, result: any) => {
call('createUser', options, async (err: any, result: any) => {
if (Meteor.isVerbose) {
let errText: string;
if (err instanceof Error) {
Expand Down Expand Up @@ -63,7 +63,7 @@ class AccountsPassword {
}

User._endLoggingIn();
User._handleLoginCallback(err, result);
await User._handleLoginCallback(err, result);
callback(err);
});
};
Expand Down Expand Up @@ -180,7 +180,7 @@ class AccountsPassword {
/**
* Register a callback to be called after a login attempt fails.
*/
onLoginFailure = (cb: (...args: any[]) => void) => {
onLoginFailure = (cb: (payload: LoginFailurePayload) => void) => {
Data.on('onLoginFailure', cb);
};

Expand Down
Loading
Loading