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

@adonisjs/hash

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/hash - npm Package Compare versions

Comparing version 6.0.7 to 7.0.0

6

build/adonis-typings/hash.d.ts
declare module '@ioc:Adonis/Core/Hash' {
import { IocContract } from '@adonisjs/fold';
import { ApplicationContract } from '@ioc:Adonis/Core/Application';
import { ManagerContract } from '@poppinss/manager';

@@ -14,3 +14,2 @@ /**

*/
hash(value: string): Promise<string>;
make(value: string): Promise<string>;

@@ -110,3 +109,3 @@ /**

*/
export interface HashContract extends ManagerContract<IocContract, HashDriverContract, HashDriverContract, {
export interface HashContract extends ManagerContract<ApplicationContract, HashDriverContract, HashDriverContract, {
[P in keyof HashersList]: HashersList[P]['implementation'];

@@ -118,3 +117,2 @@ }> {

*/
hash(value: string): ReturnType<HashDriverContract['hash']>;
make(value: string): ReturnType<HashDriverContract['make']>;

@@ -121,0 +119,0 @@ /**

@@ -17,3 +17,3 @@ "use strict";

this.app.container.singleton('Adonis/Core/Hash', () => {
const config = this.app.container.use('Adonis/Core/Config').get('hash', {});
const config = this.app.container.resolveBinding('Adonis/Core/Config').get('hash', {});
const { Hash } = require('../src/Hash');

@@ -20,0 +20,0 @@ return new Hash(this, config);

@@ -24,6 +24,2 @@ /// <reference path="../../adonis-typings/hash.d.ts" />

/**
* Alias for [[this.make]]
*/
hash(value: string): Promise<string>;
/**
* Hash a value using argon algorithm. The options can be used to override

@@ -30,0 +26,0 @@ * default settings.

@@ -44,9 +44,2 @@ "use strict";

/**
* Alias for [[this.make]]
*/
hash(value) {
process.emitWarning('DeprecationWarning', 'Hash.hash() is deprecated. Use Hash.make() instead');
return this.make(value);
}
/**
* Hash a value using argon algorithm. The options can be used to override

@@ -53,0 +46,0 @@ * default settings.

@@ -14,6 +14,2 @@ /// <reference path="../../adonis-typings/hash.d.ts" />

/**
* Alias for [[this.make]]
*/
hash(value: string): Promise<string>;
/**
* Returns hash for a given value

@@ -20,0 +16,0 @@ */

@@ -30,9 +30,2 @@ "use strict";

/**
* Alias for [[this.make]]
*/
hash(value) {
process.emitWarning('DeprecationWarning', 'Hash.hash() is deprecated. Use Hash.make() instead');
return this.make(value);
}
/**
* Returns hash for a given value

@@ -39,0 +32,0 @@ */

@@ -9,6 +9,2 @@ /// <reference path="../../adonis-typings/hash.d.ts" />

/**
* Alias for [[this.make]]
*/
hash(value: string): Promise<string>;
/**
* Returns hash for a given value

@@ -15,0 +11,0 @@ */

@@ -20,12 +20,6 @@ "use strict";

/**
* Alias for [[this.make]]
*/
hash(value) {
return Promise.resolve(value);
}
/**
* Returns hash for a given value
*/
make(value) {
return this.hash(value);
return Promise.resolve(value);
}

@@ -32,0 +26,0 @@ /**

/// <reference path="../../adonis-typings/hash.d.ts" />
import { Manager } from '@poppinss/manager';
import { IocContract } from '@adonisjs/fold';
import { ApplicationContract } from '@ioc:Adonis/Core/Application';
import { HashConfig, HashContract, HashDriverContract, HashersList } from '@ioc:Adonis/Core/Hash';

@@ -9,3 +9,3 @@ /**

*/
export declare class Hash<Config extends HashConfig> extends Manager<IocContract, HashDriverContract, HashDriverContract, {
export declare class Hash<Config extends HashConfig> extends Manager<ApplicationContract, HashDriverContract, HashDriverContract, {
[P in keyof HashersList]: HashersList[P]['implementation'];

@@ -24,3 +24,3 @@ }> implements HashContract {

get isFaked(): boolean;
constructor(container: any, config: Config);
constructor(application: ApplicationContract, config: Config);
/**

@@ -70,6 +70,2 @@ * Validate config

/**
* Alias for [[this.make]]
*/
hash(value: string): never | any;
/**
* Hash value using the default driver

@@ -76,0 +72,0 @@ */

@@ -20,4 +20,4 @@ "use strict";

class Hash extends manager_1.Manager {
constructor(container, config) {
super(container);
constructor(application, config) {
super(application);
this.config = config;

@@ -102,11 +102,2 @@ this.singleton = true;

/**
* Alias for [[this.make]]
*/
hash(value) {
if (this.fakeDriver) {
return this.fakeDriver.hash(value);
}
return this.use().hash(value);
}
/**
* Hash value using the default driver

@@ -113,0 +104,0 @@ */

{
"name": "@adonisjs/hash",
"version": "6.0.7",
"description": "Multi driver hash module with support for PHC string formats",
"main": "build/providers/HashProvider",
"files": [
"build/adonis-typings",
"build/providers",
"build/src",
"build/standalone.d.ts",
"build/standalone.js"
],
"scripts": {
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test": "node japaFile.js",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz",
"release": "np",
"version": "npm run build",
"format": "prettier --write .",
"prepublishOnly": "npm run build",
"lint": "eslint . --ext=.ts",
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json adonisjs/hash"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/poppinss/hash.git"
},
"keywords": [
"hash",
"bcrypt",
"argon2"
],
"author": "poppinss,virk",
"license": "MIT",
"bugs": {
"url": "https://github.com/poppinss/hash/issues"
},
"homepage": "https://github.com/poppinss/hash#readme",
"devDependencies": {
"@adonisjs/application": "^3.0.21",
"@adonisjs/mrm-preset": "^2.4.0",
"@adonisjs/require-ts": "^1.1.0",
"@poppinss/dev-utils": "^1.0.11",
"@types/node": "^14.14.9",
"argon2": "^0.27.0",
"bcrypt": "^5.0.0",
"commitizen": "^4.2.2",
"cz-conventional-changelog": "^3.3.0",
"del-cli": "^3.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-adonis": "^1.0.15",
"eslint-plugin-prettier": "^3.1.4",
"github-label-sync": "^2.0.0",
"husky": "^4.3.0",
"japa": "^3.1.1",
"mrm": "^2.5.12",
"np": "^7.0.0",
"npm-audit-html": "^1.5.0",
"phc-argon2": "^1.0.11",
"phc-bcrypt": "^1.0.4",
"prettier": "^2.2.0",
"typescript": "^4.1.2"
},
"nyc": {
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"husky": {
"hooks": {
"pre-commit": "npm audit --production --json | ./node_modules/.bin/npm-audit-html && git add npm-audit.html",
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"np": {
"contents": ".",
"anyBranch": false
},
"dependencies": {
"@phc/format": "^1.0.0",
"@poppinss/manager": "^3.0.8",
"@poppinss/utils": "^2.5.9"
},
"peerDependencies": {
"@adonisjs/application": "^3.0.0"
},
"publishConfig": {
"access": "public",
"tag": "latest"
}
"name": "@adonisjs/hash",
"version": "7.0.0",
"description": "Multi driver hash module with support for PHC string formats",
"main": "build/providers/HashProvider",
"files": [
"build/adonis-typings",
"build/providers",
"build/src",
"build/standalone.d.ts",
"build/standalone.js"
],
"scripts": {
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test": "node japaFile.js",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz",
"release": "np",
"version": "npm run build",
"format": "prettier --write .",
"prepublishOnly": "npm run build",
"lint": "eslint . --ext=.ts",
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json adonisjs/hash"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/poppinss/hash.git"
},
"keywords": [
"hash",
"bcrypt",
"argon2"
],
"author": "poppinss,virk",
"license": "MIT",
"bugs": {
"url": "https://github.com/poppinss/hash/issues"
},
"homepage": "https://github.com/poppinss/hash#readme",
"devDependencies": {
"@adonisjs/application": "^4.0.2",
"@adonisjs/mrm-preset": "^3.0.0",
"@adonisjs/require-ts": "^2.0.2",
"@poppinss/dev-utils": "^1.1.0",
"@types/node": "^14.14.25",
"argon2": "^0.27.1",
"bcrypt": "^5.0.0",
"commitizen": "^4.2.3",
"cz-conventional-changelog": "^3.3.0",
"del-cli": "^3.0.1",
"eslint": "^7.19.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-adonis": "^1.2.0",
"eslint-plugin-prettier": "^3.3.1",
"github-label-sync": "^2.0.0",
"husky": "^5.0.9",
"japa": "^3.1.1",
"mrm": "^2.5.18",
"np": "^7.3.0",
"phc-argon2": "^1.1.0",
"phc-bcrypt": "^1.0.5",
"prettier": "^2.2.1",
"typescript": "^4.1.4"
},
"nyc": {
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"husky": {
"hooks": {
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"np": {
"contents": ".",
"anyBranch": false
},
"dependencies": {
"@phc/format": "^1.0.0",
"@poppinss/manager": "^4.0.0",
"@poppinss/utils": "^3.0.2"
},
"peerDependencies": {
"@adonisjs/application": "^4.0.0"
},
"publishConfig": {
"access": "public",
"tag": "latest"
}
}

@@ -16,3 +16,3 @@ <div align="center">

[![circleci-image]][circleci-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url] [![audit-report-image]][audit-report-url]
[![circleci-image]][circleci-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url] [![synk-image]][synk-url]

@@ -53,3 +53,3 @@ </div>

[audit-report-image]: https://img.shields.io/badge/-Audit%20Report-blueviolet?style=for-the-badge
[audit-report-url]: https://htmlpreview.github.io/?https://github.com/adonisjs/hash/blob/develop/npm-audit.html "audit-report"
[synk-image]: https://img.shields.io/snyk/vulnerabilities/github/adonisjs/hash?label=Synk%20Vulnerabilities&style=for-the-badge
[synk-url]: https://snyk.io/test/github/adonisjs/hash?targetFile=package.json "synk"
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