update ci
This commit is contained in:
parent
9d386f7c45
commit
824efb1fc8
@ -15,7 +15,9 @@ stages:
|
|||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install legacy
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -24,7 +26,9 @@ testLEGACY:
|
|||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -32,7 +36,9 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -40,7 +46,8 @@ testSTABLE:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
2
dist/beautylog.console.js
vendored
2
dist/beautylog.console.js
vendored
@ -39,4 +39,4 @@ exports.beautyConsole = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
route(true);
|
route(true);
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2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0FBQyxDQUFDO1FBQ04sa0JBQWtCLEdBQUcsQ0FBQyxDQUFBO1FBQ3RCLGVBQWUsR0FBRyxVQUFVLENBQUE7UUFDNUIsV0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFBO0lBQ2pCLENBQUM7QUFDSCxDQUFDLENBQUE7QUFDRCxJQUFJLGVBQWUsR0FBVyxFQUFFLENBQUE7QUFDaEMsSUFBSSxrQkFBa0IsR0FBVyxDQUFDLENBQUEifQ==
|
@ -1,12 +1,11 @@
|
|||||||
import { tap, expect } from 'tapbundle'
|
import { tap, expect } from 'tapbundle'
|
||||||
|
import * as smartdelay from 'smartdelay'
|
||||||
import beautylog = require('../dist/index')
|
|
||||||
import * as beautyremote from 'beautyremote'
|
|
||||||
|
|
||||||
import * as qenv from 'qenv'
|
import * as qenv from 'qenv'
|
||||||
let testQenv = new qenv.Qenv(process.cwd(), process.cwd() + '/.nogit')
|
let testQenv = new qenv.Qenv(process.cwd(), process.cwd() + '/.nogit')
|
||||||
|
|
||||||
import * as smartdelay from 'smartdelay'
|
import * as beautyremote from 'beautyremote'
|
||||||
|
import beautylog = require('../ts/index')
|
||||||
|
|
||||||
tap.test('.registerRemote should accept a beautyremote', async () => {
|
tap.test('.registerRemote should accept a beautyremote', async () => {
|
||||||
let myRemote = new beautyremote.Loggly({
|
let myRemote = new beautyremote.Loggly({
|
||||||
|
@ -7,34 +7,34 @@ let nativeError = console.error
|
|||||||
/**
|
/**
|
||||||
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
||||||
*/
|
*/
|
||||||
let route = function(statusArg: boolean){
|
let route = function (statusArg: boolean) {
|
||||||
if (statusArg === true) {
|
if (statusArg === true) {
|
||||||
console.log = beautyConsole.log
|
console.log = beautyConsole.log
|
||||||
console.error = beautyConsole.error
|
console.error = beautyConsole.error
|
||||||
} else {
|
} else {
|
||||||
console.log = nativeLog
|
console.log = nativeLog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export let beautyConsole = {
|
export let beautyConsole = {
|
||||||
log: function(logArg: any) {
|
log: function (logArg: any) {
|
||||||
if (oraActive) {
|
if (oraActive) {
|
||||||
activeOra.pause()
|
activeOra.pause()
|
||||||
nativeLog.apply(nativeLog, arguments)
|
nativeLog.apply(nativeLog, arguments)
|
||||||
activeOra.start()
|
activeOra.start()
|
||||||
} else {
|
} else {
|
||||||
nativeLog.apply(nativeLog, arguments)
|
nativeLog.apply(nativeLog, arguments)
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(){
|
|
||||||
if (oraActive) {
|
|
||||||
activeOra.pause()
|
|
||||||
nativeLog.apply(nativeError, arguments)
|
|
||||||
activeOra.start()
|
|
||||||
} else {
|
|
||||||
nativeLog.apply(nativeError, arguments)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
if (oraActive) {
|
||||||
|
activeOra.pause()
|
||||||
|
nativeLog.apply(nativeError, arguments)
|
||||||
|
activeOra.start()
|
||||||
|
} else {
|
||||||
|
nativeLog.apply(nativeError, arguments)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
route(true)
|
route(true)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
|
|
||||||
import {internalLog} from './beautylog.log.helpers'
|
import { internalLog } from './beautylog.log.helpers'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* logs an info to console
|
* logs an info to console
|
||||||
@ -9,11 +9,11 @@ import {internalLog} from './beautylog.log.helpers'
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export let log = (logText) => {
|
export let log = (logText) => {
|
||||||
return internalLog('log',logText)
|
return internalLog('log', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
export let info = (logText) => {
|
export let info = (logText) => {
|
||||||
return internalLog('info',logText)
|
return internalLog('info', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,7 +22,7 @@ export let info = (logText) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let ok = (logText) => {
|
export let ok = (logText) => {
|
||||||
return internalLog('ok',logText)
|
return internalLog('ok', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,7 +31,7 @@ export let ok = (logText) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let success = (logText) => {
|
export let success = (logText) => {
|
||||||
return internalLog('success',logText)
|
return internalLog('success', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ export let success = (logText) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let warn = (logText) => {
|
export let warn = (logText) => {
|
||||||
return internalLog('warn',logText)
|
return internalLog('warn', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +49,7 @@ export let warn = (logText) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let error = (logText) => {
|
export let error = (logText) => {
|
||||||
return internalLog('error',logText)
|
return internalLog('error', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,14 +58,14 @@ export let error = (logText) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let dir = (logText) => {
|
export let dir = (logText) => {
|
||||||
return internalLog('dir',logText)
|
return internalLog('dir', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* note
|
* note
|
||||||
*/
|
*/
|
||||||
export let note = (logText) => {
|
export let note = (logText) => {
|
||||||
return internalLog('note', logText)
|
return internalLog('note', logText)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,22 +74,22 @@ export let note = (logText) => {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export let newLine = (linesArg: number = 1) => {
|
export let newLine = (linesArg: number = 1) => {
|
||||||
for (let i = 0; i < linesArg; i++) {
|
for (let i = 0; i < linesArg; i++) {
|
||||||
console.log('\n')
|
console.log('\n')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* logs a reduced log that only logs changes of consequential log messages
|
* logs a reduced log that only logs changes of consequential log messages
|
||||||
*/
|
*/
|
||||||
export let logReduced = (logTextArg: string,repeatEveryTimesArg: number = 0) => {
|
export let logReduced = (logTextArg: string, repeatEveryTimesArg: number = 0) => {
|
||||||
if (logTextArg === previousMessage && (repeatEveryTimesArg === 0 || sameMessageCounter !== repeatEveryTimesArg)) {
|
if (logTextArg === previousMessage && (repeatEveryTimesArg === 0 || sameMessageCounter !== repeatEveryTimesArg)) {
|
||||||
sameMessageCounter++
|
sameMessageCounter++
|
||||||
} else {
|
} else {
|
||||||
sameMessageCounter = 0
|
sameMessageCounter = 0
|
||||||
previousMessage = logTextArg
|
previousMessage = logTextArg
|
||||||
log(logTextArg)
|
log(logTextArg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let previousMessage: string = ''
|
let previousMessage: string = ''
|
||||||
let sameMessageCounter: number = 0
|
let sameMessageCounter: number = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user