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

@accounts/common

Package Overview
Dependencies
Maintainers
5
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accounts/common - npm Package Compare versions

Comparing version 0.1.0-alpha.58382c10 to 0.1.0-alpha.6b56dffc

src/index.ts

9

lib/index.d.ts

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

import * as validators from './validators';
import { AccountsError } from './errors';
import toUsernameAndEmail from './to-username-and-email';
import config from './config';
export { PasswordSignupFields } from './password-signup-fields';
export { AccountsCommonConfiguration, HashAlgorithm } from './config';
export * from './types';
export { validators, AccountsError, toUsernameAndEmail, config };
export { UserObjectType, TokensType, LoginReturnType, SessionType, HashAlgorithm, PasswordType, CreateUserType, LoginUserIdentityType, PasswordLoginType, PasswordSignupFields } from './types';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var validators = require("./validators");
exports.validators = validators;
var errors_1 = require("./errors");
exports.AccountsError = errors_1.AccountsError;
var to_username_and_email_1 = require("./to-username-and-email");
exports.toUsernameAndEmail = to_username_and_email_1.default;
var config_1 = require("./config");
exports.config = config_1.default;
var password_signup_fields_1 = require("./password-signup-fields");
exports.PasswordSignupFields = password_signup_fields_1.PasswordSignupFields;
var types_1 = require("./types");
exports.PasswordSignupFields = types_1.PasswordSignupFields;
//# sourceMappingURL=index.js.map

@@ -1,13 +0,5 @@

import { HashAlgorithm } from './config';
export declare type PasswordType = string | {
digest: string;
algorithm: HashAlgorithm;
};
export interface EmailRecord {
address: string;
}
export interface UserObjectType {
username?: string;
email?: string;
emails?: EmailRecord[];
emails?: object[];
id: string;

@@ -17,14 +9,2 @@ profile?: object;

}
export interface CreateUserType {
username?: string;
email?: string;
password?: PasswordType;
profile?: object;
}
export interface PasswordLoginUserIdentityType {
id?: string;
username?: string;
email?: string;
}
export declare type PasswordLoginUserType = string | PasswordLoginUserIdentityType;
export interface TokensType {

@@ -39,7 +19,2 @@ accessToken?: string;

}
export interface ImpersonateReturnType {
authorized: boolean;
tokens?: TokensType;
user?: UserObjectType;
}
export interface SessionType {

@@ -53,2 +28,31 @@ sessionId: string;

}
export declare type HookListener = (event?: object) => void;
export declare type HashAlgorithm = 'sha' | 'sha1' | 'sha224' | 'sha256' | 'sha384' | 'sha512' | 'md5' | 'ripemd160';
export declare type PasswordType = string | {
digest: string;
algorithm: HashAlgorithm;
};
export interface CreateUserType {
username?: string;
email?: string;
password?: PasswordType;
profile?: object;
}
export interface LoginUserIdentityType {
id?: string;
username?: string;
email?: string;
}
export interface PasswordLoginType {
user: string | LoginUserIdentityType;
password: PasswordType;
}
export declare const EMAIL_ONLY = "EMAIL_ONLY";
export declare const USERNAME_AND_EMAIL = "USERNAME_AND_EMAIL";
export declare const USERNAME_AND_OPTIONAL_EMAIL = "USERNAME_AND_OPTIONAL_EMAIL";
export declare const USERNAME_ONLY = "USERNAME_ONLY";
export declare enum PasswordSignupFields {
EMAIL_ONLY = "EMAIL_ONLY",
USERNAME_AND_EMAIL = "USERNAME_AND_EMAIL",
USERNAME_AND_OPTIONAL_EMAIL = "USERNAME_AND_OPTIONAL_EMAIL",
USERNAME_ONLY = "USERNAME_ONLY",
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EMAIL_ONLY = 'EMAIL_ONLY';
exports.USERNAME_AND_EMAIL = 'USERNAME_AND_EMAIL';
exports.USERNAME_AND_OPTIONAL_EMAIL = 'USERNAME_AND_OPTIONAL_EMAIL';
exports.USERNAME_ONLY = 'USERNAME_ONLY';
var PasswordSignupFields;
(function (PasswordSignupFields) {
PasswordSignupFields["EMAIL_ONLY"] = "EMAIL_ONLY";
PasswordSignupFields["USERNAME_AND_EMAIL"] = "USERNAME_AND_EMAIL";
PasswordSignupFields["USERNAME_AND_OPTIONAL_EMAIL"] = "USERNAME_AND_OPTIONAL_EMAIL";
PasswordSignupFields["USERNAME_ONLY"] = "USERNAME_ONLY";
})(PasswordSignupFields = exports.PasswordSignupFields || (exports.PasswordSignupFields = {}));
//# sourceMappingURL=types.js.map
{
"name": "@accounts/common",
"version": "0.1.0-alpha.58382c10",
"description": "Fullstack authentication and accounts-management",
"version": "0.1.0-alpha.6b56dffc",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "tsc --watch",
"clean": "rimraf lib",
"precompile": "npm run clean",
"compile": "tsc",
"prepublish": "npm run compile",
"test": "npm run testonly",
"test-ci": "npm lint && npm coverage",
"testonly": "jest",
"coverage": "npm run testonly -- --coverage",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"files": [
"lib"
],
"jest": {
"transform": {
".(ts|tsx)": "<rootDir>/../../node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$",
"moduleFileExtensions": [
"ts",
"js"
],
"mapCoverage": true
},
"repository": {
"type": "git",
"url": "https://github.com/js-accounts/accounts/tree/master/packages/common"
},
"keywords": [
"rest",
"graphql",
"grant",
"auth",
"authentication",
"accounts",
"users",
"oauth"
],
"author": "Tim Mikeladze",
"license": "MIT",
"devDependencies": {
"coveralls": "^2.11.14",
"localstorage-polyfill": "^1.0.1",
"regenerator-runtime": "^0.9.6",
"rimraf": "^2.6.1"
},
"dependencies": {
"lodash": "^4.16.4"
"coverage": "jest --coverage"
}
}

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