@equinor/echo-base v0.7.5

echo-base
Everything a Echo web need for enabling micro frontend development.
This library was generated with Nx.
How to develop and release EchoCore
Check the readme in the NX libraries folder.
Available NPM scripts
lint-basebuild-basetest-base
What's new
v0.7.0:
- Moved to Monorepo
- Updated some Typescript Types: they caused build errors with the Monorepo setup
v0.6.0:
- Fixed error reporting to application insights, it now properly reports all properties including innerErrorsProperties.
- Fixed
baseError, it now properly supports nested innerErrors. Exception/inner Error used to overwrite each others property if they had the same name. BaseErrornow has errorTraceId, either from backEnd, or a unique frontEnd idBaseErrorhelper methods added for getting properties or propertyByName
It's recommended to create your own error types, extending BaseError, and decorate it with your own fields:
export class PdfError extends BaseError {
docNo: string;
constructor(args: { message: string; docNo: string; innerError?: Error }) {
super({ name: 'PdfError', message: args.message, innerError: args.innerError });
this.docNo = args.docNo;
}
}Breaking Changes
v0.6.0:
- Renamed
initializeErrortoinitializeNetworkErrorand simplified it. It now only takesNetworkErrorArgsas argument. BaseErrornow properly support nested (and nested-nested) errors with argumentinnerError.
Earlier properties with the same name would overwrite each other.exceptionargument renamed toinnerError, of typeRecord<string, unknown> | ErrorBaseErrordoesn't add properties directly onto itself anymore, but uses nested errors with argumentinnerError.- Instead of
BaseError.allProperties()["someCustomProperty"]useBaseError.findPropertyByName("someCustomProperty"). Since we now useinnerErrorof typeErroror Record<string, unknown>, the property has been moved from baseErrorproperty to baseError.innerErrorproperty. - Moved
EchoEventsenum toEchoCore. - Changed types for
EventHubevent keys in all functions fromstring | EchoEventstostringonly.
v0.5.0:
- SubClasses of BaseError will not get the name of the class automatically anymore, but have to specify it. This to avoid name obfuscation/minify to a single letter in appInsight.
Example implementation:
export class CustomError extends BaseError {
constructor(args: ErrorArgs) {
super({ ...args, name: 'CustomError' });
}
}12 months ago
6 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago