@poppinss/hooks
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -9,5 +9,5 @@ "use strict"; | ||
* file that was distributed with this source code. | ||
*/ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Hooks_1 = require("./src/Hooks"); | ||
exports.Hooks = Hooks_1.Hooks; | ||
Object.defineProperty(exports, "Hooks", { enumerable: true, get: function () { return Hooks_1.Hooks; } }); |
@@ -9,4 +9,5 @@ "use strict"; | ||
* file that was distributed with this source code. | ||
*/ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Hooks = void 0; | ||
/** | ||
@@ -41,3 +42,3 @@ * Exposes the API to register before/after lifecycle hooks for a given action | ||
resolveHandler(handler) { | ||
if (typeof (handler) === 'string') { | ||
if (typeof handler === 'string') { | ||
this.ensureResolver(); | ||
@@ -103,3 +104,3 @@ return this.resolver.resolve(handler); | ||
for (let handler of handlers) { | ||
if (typeof (handler) === 'function') { | ||
if (typeof handler === 'function') { | ||
await handler(...data); | ||
@@ -106,0 +107,0 @@ } |
172
package.json
{ | ||
"name": "@poppinss/hooks", | ||
"version": "1.0.5", | ||
"description": "A no brainer hooks module for execute before/after lifecycle hooks", | ||
"main": "build/index.js", | ||
"files": [ | ||
"build/src", | ||
"build/index.d.ts", | ||
"build/index.js" | ||
], | ||
"scripts": { | ||
"mrm": "mrm --preset=@adonisjs/mrm-preset", | ||
"pretest": "npm run lint", | ||
"test": "node japaFile.js", | ||
"lint": "eslint . --ext=.ts", | ||
"clean": "del build", | ||
"compile": "npm run lint && npm run clean && tsc", | ||
"build": "npm run compile", | ||
"commit": "git-cz", | ||
"release": "np", | ||
"version": "npm run build" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"@adonisjs/fold": "6.x.x" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@adonisjs/fold": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@adonisjs/fold": "^6.3.5", | ||
"@adonisjs/mrm-preset": "^2.3.0", | ||
"@types/node": "^13.11.1", | ||
"commitizen": "^4.0.4", | ||
"cz-conventional-changelog": "^3.1.0", | ||
"del-cli": "^3.0.0", | ||
"doctoc": "^1.4.0", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-adonis": "^1.0.9", | ||
"husky": "^4.2.5", | ||
"japa": "^3.0.1", | ||
"mrm": "^2.2.1", | ||
"np": "^5.2.1", | ||
"ts-node": "^8.8.2", | ||
"typescript": "^3.8.3" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/poppinss/hooks.git" | ||
}, | ||
"keywords": [ | ||
"hooks", | ||
"poppinss" | ||
], | ||
"author": "virk,poppinss", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/poppinss/hooks/issues" | ||
}, | ||
"homepage": "https://github.com/poppinss/hooks#readme", | ||
"nyc": { | ||
"exclude": [ | ||
"test" | ||
], | ||
"extension": [ | ||
".ts" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md", | ||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" | ||
} | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"np": { | ||
"contents": ".", | ||
"anyBranch": false | ||
} | ||
"name": "@poppinss/hooks", | ||
"version": "1.0.6", | ||
"description": "A no brainer hooks module for execute before/after lifecycle hooks", | ||
"main": "build/index.js", | ||
"files": [ | ||
"build/src", | ||
"build/index.d.ts", | ||
"build/index.js" | ||
], | ||
"scripts": { | ||
"mrm": "mrm --preset=@adonisjs/mrm-preset", | ||
"pretest": "npm run lint", | ||
"test": "node japaFile.js", | ||
"lint": "eslint . --ext=.ts", | ||
"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 ." | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"@adonisjs/fold": "6.x.x" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@adonisjs/fold": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@adonisjs/fold": "^6.3.5", | ||
"@adonisjs/mrm-preset": "^2.3.6", | ||
"@types/node": "^14.0.14", | ||
"commitizen": "^4.1.2", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"del-cli": "^3.0.1", | ||
"doctoc": "^1.4.0", | ||
"eslint": "^7.4.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-adonis": "^1.0.14", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"husky": "^4.2.5", | ||
"japa": "^3.1.1", | ||
"mrm": "^2.3.3", | ||
"np": "^6.2.5", | ||
"prettier": "^2.0.5", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/poppinss/hooks.git" | ||
}, | ||
"keywords": [ | ||
"hooks", | ||
"poppinss" | ||
], | ||
"author": "virk,poppinss", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/poppinss/hooks/issues" | ||
}, | ||
"homepage": "https://github.com/poppinss/hooks#readme", | ||
"nyc": { | ||
"exclude": [ | ||
"test" | ||
], | ||
"extension": [ | ||
".ts" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md", | ||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" | ||
} | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"np": { | ||
"contents": ".", | ||
"anyBranch": false | ||
} | ||
} |
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
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
13161
169
18