Comparing version 4.4.2 to 4.4.3
# bedrock ChangeLog | ||
## 4.4.3 - 2021-12-08 | ||
### Fixed | ||
- Ensure primary process does not exit before logger completes or errors so | ||
that the proper error code is returned. | ||
- Ensure an orderly exit is performed when nothing else is scheduled to | ||
run on the event loop on the primary process. | ||
## 4.4.2 - 2021-11-04 | ||
@@ -4,0 +12,0 @@ |
@@ -54,2 +54,3 @@ /*! | ||
// FIXME: v2.0.0: remove when removing warnings below. | ||
// see: https://github.com/digitalbazaar/bedrock/issues/93 | ||
const _warningShown = { | ||
@@ -62,2 +63,3 @@ cache: false, | ||
// FIXME: v2.0.0: remove warning and default and throw exception . | ||
// see: https://github.com/digitalbazaar/bedrock/issues/93 | ||
//throw new BedrockError( | ||
@@ -76,2 +78,3 @@ // 'bedrock.config.paths.cache not set.', | ||
// FIXME: v2.0.0: remove warning and default and throw exception . | ||
// see: https://github.com/digitalbazaar/bedrock/issues/93 | ||
//throw new BedrockError( | ||
@@ -428,2 +431,3 @@ // 'bedrock.config.paths.log not set.', | ||
// FIXME: use child logger | ||
// see: https://github.com/digitalbazaar/bedrock/issues/90 | ||
const logger = loggers.get('app'); | ||
@@ -434,3 +438,2 @@ const logPrefix = '[bedrock/primary]'; | ||
if(process.env.running_under_istanbul) { | ||
// TODO: does this need adjusting after fixing the worker `cwd` issue? | ||
// re-call cover with no reporting and using pid named output | ||
@@ -448,2 +451,3 @@ cluster.setupMaster({ | ||
// TODO: Remove all use of config.core.master in next major release (5.x) | ||
// see: https://github.com/digitalbazaar/bedrock/issues/89 | ||
const processTitle = config.core.master ? | ||
@@ -464,5 +468,4 @@ config.core.master.title : config.core.primary.title; | ||
// the first time `process.exit()` is called on the primary, attempt to do | ||
// an orderly exit | ||
process.once('exit', async function() { | ||
// if nothing else is scheduled on the event loop, attempt an orderly exit | ||
process.once('beforeExit', async function() { | ||
await _exit(); | ||
@@ -525,2 +528,3 @@ }); | ||
// FIXME: use child logger | ||
// https://github.com/digitalbazaar/bedrock/issues/90 | ||
const logger = loggers.get('app'); | ||
@@ -787,6 +791,6 @@ const logPrefix = '[bedrock/worker]'; | ||
logger.info( | ||
`${logPrefix} primary process exiting with code "${code}".`, {code}, | ||
() => { | ||
resolve(); | ||
}); | ||
`${logPrefix} primary process exiting with code "${code}".`, {code}); | ||
logger.once('finish', () => resolve()); | ||
logger.once('error', () => resolve()); | ||
logger.end(); | ||
}); | ||
@@ -793,0 +797,0 @@ await p; |
@@ -43,2 +43,3 @@ /*! | ||
// TODO: Remove in next major release (5.x) | ||
// see: https://github.com/digitalbazaar/bedrock/issues/89 | ||
config.core.master = {}; | ||
@@ -45,0 +46,0 @@ |
@@ -46,2 +46,3 @@ /*! | ||
// TODO: run in parallel | ||
// see: https://github.com/digitalbazaar/bedrock/issues/88 | ||
for(const fileLogger of fileLoggers) { | ||
@@ -48,0 +49,0 @@ const dirname = path.dirname(fileLogger.filename); |
@@ -80,2 +80,3 @@ /*! | ||
* TODO: look into better stack parsing libraries. | ||
* See: https://github.com/digitalbazaar/bedrock/issues/87 | ||
*/ | ||
@@ -103,2 +104,3 @@ function _parseStack(stack) { | ||
// FIXME: add parse error handling | ||
// see: https://github.com/digitalbazaar/bedrock/issues/87 | ||
return stack; | ||
@@ -105,0 +107,0 @@ } |
{ | ||
"name": "bedrock", | ||
"version": "4.4.2", | ||
"version": "4.4.3", | ||
"description": "A core foundation for rich Web applications.", | ||
@@ -16,3 +16,3 @@ "license": "SEE LICENSE IN LICENSE.md", | ||
"start": "node index.js", | ||
"lint": "eslint '*.js' 'lib/**.js' 'test/**.js'" | ||
"lint": "eslint ." | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
@@ -48,3 +48,3 @@ <img src="https://digitalbazaar.com/wp-content/uploads/BedrockLogo.png"> | ||
Create a MEAN stack application: | ||
Create a typical application: | ||
@@ -56,8 +56,3 @@ ```js | ||
require('bedrock-express'); | ||
require('bedrock-docs'); | ||
require('bedrock-i18n'); | ||
require('bedrock-mongodb'); | ||
require('bedrock-protractor'); | ||
require('bedrock-request-limiter'); | ||
require('bedrock-requirejs'); | ||
require('bedrock-server'); | ||
@@ -67,2 +62,3 @@ require('bedrock-session-mongodb'); | ||
require('bedrock-views'); | ||
require('bedrock-webpack'); | ||
@@ -72,14 +68,7 @@ bedrock.start(); | ||
To include the [AngularJS][]-based frontend, `bower install` these modules: | ||
To include the [Vue.js][]-based frontend, `npm install` these modules: | ||
``` | ||
bedrock-angular | ||
bedrock-angular-alert | ||
bedrock-angular-filters | ||
bedrock-angular-form | ||
bedrock-angular-lazy-compile | ||
bedrock-angular-modal | ||
bedrock-angular-model | ||
bedrock-angular-selector | ||
bedrock-angular-ui | ||
bedrock-vue | ||
bedrock-quasar | ||
``` | ||
@@ -109,3 +98,2 @@ | ||
const bedrock = require('bedrock'); | ||
const {promisify} = require('util'); | ||
@@ -118,3 +106,3 @@ // modules | ||
bedrock.events.on('bedrock-mongodb.ready', async () => { | ||
await promisify(database.openCollections)(['people']); | ||
await database.openCollections(['people']); | ||
}); | ||
@@ -732,17 +720,16 @@ | ||
[bedrock-jobs][] provides a background job scheduler. | ||
[bedrock-webpack][] provides webpack configuration and build tools for | ||
frontend bundling. | ||
[bedrock-requirejs][] provides a client-side module loader and | ||
autoconfiguration capabilities for bower components. | ||
[bedrock-views][] provides infrastructure for serving single page | ||
applications. | ||
[bedrock-views][] provides server-rendered views with HTML5 + Bootstrap3. | ||
[bedrock-vue][] layers on top of [bedrock-views][] to provide | ||
client-rendered Vue.js views. | ||
[bedrock-angular][] layers on top of [bedrock-views][] to provide | ||
client-rendered AngularJS views. | ||
[bedrock-quasar][] layers on top of [bedrock-vue][] to provide | ||
client-rendered Quasar components. | ||
[bedrock-idp][] provides user identity and public key management. | ||
[bedrock-account][] provides user account management. | ||
[bedrock-protractor][] integrates [protractor][] with Bedrock, exposing a | ||
powerful end-to-end [AngularJS][] test framework to Bedrock modules. | ||
Other Bedrock modules provide REST APIs, user account management, strong | ||
@@ -824,3 +811,3 @@ cryptography support, DoS protection, digital signatures, Linked Data, and | ||
Copyright (c) 2011-2015 Digital Bazaar, Inc. | ||
Copyright (c) 2011-2021 Digital Bazaar, Inc. | ||
All Rights Reserved | ||
@@ -837,17 +824,14 @@ | ||
[LICENSE]: LICENSE.md | ||
[AngularJS]: https://github.com/angular/angular.js | ||
[Vue.js]: https://vuejs.org/ | ||
[JSON-LD]: http://json-ld.org | ||
[JSON-LD context]: http://www.w3.org/TR/json-ld/#the-context | ||
[Linked Data]: http://en.wikipedia.org/wiki/Linked_data | ||
[bedrock-angular]: https://github.com/digitalbazaar/bedrock-angular | ||
[bedrock-account]: https://github.com/digitalbazaar/bedrock-account | ||
[bedrock-express]: https://github.com/digitalbazaar/bedrock-express | ||
[bedrock-idp]: https://github.com/digitalbazaar/bedrock-idp | ||
[bedrock-jobs]: https://github.com/digitalbazaar/bedrock-jobs | ||
[bedrock-mongodb]: https://github.com/digitalbazaar/bedrock-mongodb | ||
[bedrock-protractor]: https://github.com/digitalbazaar/bedrock-protractor | ||
[bedrock-requirejs]: https://github.com/digitalbazaar/bedrock-requirejs | ||
[bedrock-seed]: https://github.com/digitalbazaar/bedrock-seed | ||
[bedrock-quasar]: https://github.com/digitalbazaar/bedrock-quasar | ||
[bedrock-server]: https://github.com/digitalbazaar/bedrock-server | ||
[bedrock-views]: https://github.com/digitalbazaar/bedrock-views | ||
[protractor]: https://github.com/angular/protractor | ||
[bedrock-vue]: https://github.com/digitalbazaar/bedrock-vue | ||
[winston]: https://github.com/winstonjs/winston |
@@ -153,3 +153,3 @@ /*! | ||
}); | ||
config.p1.should.equal(object['p1']); | ||
config.p1.should.equal(object.p1); | ||
Object.keys(config.p1).length.should.equal(0); | ||
@@ -638,2 +638,3 @@ config.p2.c1.should.equal(object['p2.c1']); | ||
// TODO: add test that adds logger early | ||
// see: https://github.com/digitalbazaar/bedrock/issues/92 | ||
@@ -645,2 +646,3 @@ /* | ||
// TODO: test w/custom logger that writes to string, not file | ||
// see: https://github.com/digitalbazaar/bedrock/issues/91 | ||
bedrock.loggers.addTransport('test', new winston.transports.File({ | ||
@@ -647,0 +649,0 @@ level: 'debug', |
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
157390
2408
829