@produck/duck-web
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -5,4 +5,5 @@ 'use strict'; | ||
const normalize = require('./src/normalizeOptions'); | ||
const Application = require('./src/Application'); | ||
module.exports = function DuckWeb(options) { | ||
module.exports = Object.assign(function DuckWeb(options) { | ||
const ApplicationOptionsList = normalize(options); | ||
@@ -53,2 +54,4 @@ const applications = {}; | ||
}; | ||
}; | ||
}, { | ||
Application | ||
}); |
{ | ||
"name": "@produck/duck-web", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "", | ||
@@ -29,11 +29,11 @@ "author": "ChaosLee <lichao@or-change.cn>", | ||
"devDependencies": { | ||
"mocha": "^8.2.1" | ||
"mocha": "^8.3.2" | ||
}, | ||
"dependencies": { | ||
"@produck/duck": "^0.6.4", | ||
"ajv": "^7.0.3", | ||
"ajv-keywords": "^4.0.0", | ||
"@produck/duck": "^0.6.5", | ||
"ajv": "^8.0.1", | ||
"ajv-keywords": "^5.0.0", | ||
"debug": "^4.3.1" | ||
}, | ||
"gitHead": "ba41f9a6841ae6c8947d262346c3dd458ead184e" | ||
"gitHead": "cd1aa12dae6470119b26ebb5362d5e4963db39c4" | ||
} |
@@ -6,16 +6,4 @@ 'use strict'; | ||
const AjvKeywords = require('ajv-keywords'); | ||
const Application = require('./Application'); | ||
function DefaultApplicationProvider({ product }) { | ||
return function DefaultApplication(...args) { | ||
console.log(...args); | ||
return function requestListener(_request, response) { | ||
response.end(JSON.stringify({ | ||
meta: product.meta, | ||
components: product.components | ||
}, null, ' ')); | ||
}; | ||
}; | ||
} | ||
module.exports = Normalizer({ | ||
@@ -27,3 +15,3 @@ defaults() { | ||
description: 'Default application example can view `meta`, `components`, `duck` of `product`.', | ||
Application: DefaultApplicationProvider | ||
Application: Application.Default | ||
} | ||
@@ -30,0 +18,0 @@ ]; |
7012
9
188
- Removedajv@7.2.4(transitive)
- Removedajv-keywords@4.0.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removeduri-js@4.4.1(transitive)
Updated@produck/duck@^0.6.5
Updatedajv@^8.0.1
Updatedajv-keywords@^5.0.0