@accounts/common
Advanced tools
Comparing version 0.1.0-alpha.58382c10 to 0.1.0-alpha.6b56dffc
@@ -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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
0
0
5347
10
162
3
1
1
- Removedlodash@^4.16.4
- Removedlodash@4.17.21(transitive)