@accounts/common
Advanced tools
Comparing version 0.1.0-alpha.4d9cf8a2 to 0.1.0-alpha.54ae402d
@@ -1,1 +0,8 @@ | ||
export { UserObjectType, TokensType, LoginReturnType, SessionType, HashAlgorithm, PasswordType, CreateUserType, LoginUserIdentityType, PasswordLoginType, PasswordSignupFields } from './types'; | ||
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 }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var types_1 = require("./types"); | ||
exports.PasswordSignupFields = types_1.PasswordSignupFields; | ||
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; | ||
//# sourceMappingURL=index.js.map |
@@ -0,5 +1,13 @@ | ||
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?: object[]; | ||
emails?: EmailRecord[]; | ||
id: string; | ||
@@ -9,2 +17,14 @@ 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 { | ||
@@ -19,2 +39,7 @@ accessToken?: string; | ||
} | ||
export interface ImpersonateReturnType { | ||
authorized: boolean; | ||
tokens?: TokensType; | ||
user?: UserObjectType; | ||
} | ||
export interface SessionType { | ||
@@ -28,31 +53,2 @@ sessionId: string; | ||
} | ||
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", | ||
} | ||
export declare type HookListener = (event?: object) => void; |
"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.4d9cf8a2", | ||
"license": "MIT", | ||
"version": "0.1.0-alpha.54ae402d", | ||
"description": "Fullstack authentication and accounts-management", | ||
"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": "jest --coverage" | ||
"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" | ||
} | ||
} |
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
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
13789
22
234
2
0
1
4
+ Addedlodash@^4.16.4
+ Addedlodash@4.17.21(transitive)