@zodash/onion
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.7](https://github.com/zcorky/zodash/compare/@zodash/onion@0.1.6...@zodash/onion@0.1.7) (2021-09-22) | ||
**Note:** Version bump only for package @zodash/onion | ||
## [0.1.6](https://github.com/zcorky/zodash/compare/@zodash/onion@0.1.5...@zodash/onion@0.1.6) (2021-03-25) | ||
@@ -8,0 +16,0 @@ |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -30,17 +21,15 @@ exports.Onion = void 0; | ||
} | ||
return (input, output) => __awaiter(this, void 0, void 0, function* () { | ||
return async (input, output) => { | ||
const context = this.createContext(input, output); | ||
yield this.handler(context); | ||
await this.handler(context); | ||
return context; | ||
}); | ||
}; | ||
} | ||
execute(input) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (!this._callback) { | ||
this._callback = this.callback(); | ||
} | ||
const output = {}; | ||
const context = yield this._callback(input, output); | ||
return context.output; | ||
}); | ||
async execute(input) { | ||
if (!this._callback) { | ||
this._callback = this.callback(); | ||
} | ||
const output = {}; | ||
const context = await this._callback(input, output); | ||
return context.output; | ||
} | ||
@@ -47,0 +36,0 @@ createContext(input, output) { |
{ | ||
"name": "@zodash/onion", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "simple onion model", | ||
@@ -60,3 +60,5 @@ "keywords": [ | ||
"scripts": { | ||
"build": "tsc", | ||
"build": "yarn clean && tsc", | ||
"watch": "yarn clean && tsc -w", | ||
"clean": "rm -rf lib", | ||
"test": "jest -w 1", | ||
@@ -69,5 +71,5 @@ "coverage": "codecov" | ||
"dependencies": { | ||
"@zodash/compose": "^0.1.6" | ||
"@zodash/compose": "^0.1.7" | ||
}, | ||
"gitHead": "bd85904bdf3094ed8d65df0fa57c695c74d4dc87" | ||
"gitHead": "94dc8d1577cd67a4cf89884b10c23eb9caeef9f7" | ||
} |
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
9310
65
Updated@zodash/compose@^0.1.7