fix(core): update
This commit is contained in:
parent
51438acdd2
commit
c2e032bbf4
26
readme.md
Normal file
26
readme.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# @pushrocks/smartlog-source-ora
|
||||||
|
a smartlog source wrapping ora for local display
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartlog-source-ora)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartlog-source-ora)
|
||||||
|
* [github.com (source mirror)](https://github.com/pushrocks/smartlog-source-ora)
|
||||||
|
* [docs (typedoc)](https://pushrocks.gitlab.io/smartlog-source-ora/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[![build status](https://gitlab.com/pushrocks/smartlog-source-ora/badges/master/build.svg)](https://gitlab.com/pushrocks/smartlog-source-ora/commits/master)
|
||||||
|
[![coverage report](https://gitlab.com/pushrocks/smartlog-source-ora/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartlog-source-ora/commits/master)
|
||||||
|
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartlog-source-ora.svg)](https://www.npmjs.com/package/@pushrocks/smartlog-source-ora)
|
||||||
|
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartlog-source-ora/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartlog-source-ora)
|
||||||
|
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
|
@ -3,12 +3,12 @@ import * as smartlogSourceOra from '../ts/index';
|
|||||||
|
|
||||||
let smartOra: smartlogSourceOra.SmartlogSourceOra;
|
let smartOra: smartlogSourceOra.SmartlogSourceOra;
|
||||||
|
|
||||||
tap.test('should create an ora instance', async (tools) => {
|
tap.test('should create an ora instance', async tools => {
|
||||||
smartOra = new smartlogSourceOra.SmartlogSourceOra();
|
smartOra = new smartlogSourceOra.SmartlogSourceOra();
|
||||||
expect(smartOra).to.be.instanceOf(smartlogSourceOra.SmartlogSourceOra);
|
expect(smartOra).to.be.instanceOf(smartlogSourceOra.SmartlogSourceOra);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should start', async (tools) => {
|
tap.test('should start', async tools => {
|
||||||
smartOra.text('getting started...');
|
smartOra.text('getting started...');
|
||||||
await tools.delayFor(2000);
|
await tools.delayFor(2000);
|
||||||
smartOra.finishSuccess();
|
smartOra.finishSuccess();
|
||||||
|
@ -6,9 +6,9 @@ export class SmartlogSourceOra {
|
|||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
public text (textArg: string) {
|
public text(textArg: string) {
|
||||||
this.oraInstance.text = textArg;
|
this.oraInstance.text = textArg;
|
||||||
if(!this.started) {
|
if (!this.started) {
|
||||||
this.started = true;
|
this.started = true;
|
||||||
this.oraInstance.start();
|
this.oraInstance.start();
|
||||||
}
|
}
|
||||||
@ -18,12 +18,12 @@ export class SmartlogSourceOra {
|
|||||||
this.oraInstance.stop();
|
this.oraInstance.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public finishSuccess (textArg?: string) {
|
public finishSuccess(textArg?: string) {
|
||||||
this.oraInstance.succeed(textArg);
|
this.oraInstance.succeed(textArg);
|
||||||
this.started = false;
|
this.started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public finishFail () {
|
public finishFail() {
|
||||||
this.oraInstance.fail();
|
this.oraInstance.fail();
|
||||||
this.started = false;
|
this.started = false;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
// pushrocks scope
|
// pushrocks scope
|
||||||
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
|
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
|
||||||
|
|
||||||
export {
|
export { smartlogInterfaces };
|
||||||
smartlogInterfaces
|
|
||||||
};
|
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import ora from 'ora';
|
import ora from 'ora';
|
||||||
|
|
||||||
export {
|
export { ora };
|
||||||
ora
|
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user