BREAKING CHANGE(core): switch to esm
This commit is contained in:
parent
d5d6d7bf79
commit
964666902f
@ -12,6 +12,9 @@ stages:
|
||||
- release
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
@ -97,10 +100,9 @@ codequality:
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci command npm install -g typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
@ -120,11 +122,10 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci node install stable
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "smartlog",
|
||||
"shortDescription": "minimalistic distributed and extensible logging tool",
|
||||
"description": "minimalistic distributed and extensible logging tool",
|
||||
"npmPackagename": "@pushrocks/smartlog",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
|
22962
package-lock.json
generated
22962
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,8 @@
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web && tsbundle npm)",
|
||||
"format": "(gitzone format)"
|
||||
"format": "(gitzone format)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
@ -48,5 +49,6 @@
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "module"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartlog from '../ts/index';
|
||||
import * as smartlog from '../ts/index.js';
|
||||
|
||||
let testConsoleLog: smartlog.ConsoleLog;
|
||||
let testSmartLog: smartlog.Smartlog;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartlog from '../ts/index';
|
||||
import * as smartlog from '../ts/index.js';
|
||||
|
||||
let testConsoleLog: smartlog.ConsoleLog;
|
||||
let testSmartLog: smartlog.Smartlog;
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartlog',
|
||||
version: '3.0.0',
|
||||
description: 'minimalistic distributed and extensible logging tool'
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import { ConsoleLog } from './smartlog.classes.consolelog';
|
||||
import { LogGroup } from './smartlog.classes.loggroup';
|
||||
import { Smartlog } from './smartlog.classes.smartlog';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
import { ConsoleLog } from './smartlog.classes.consolelog.js';
|
||||
import { LogGroup } from './smartlog.classes.loggroup.js';
|
||||
import { Smartlog } from './smartlog.classes.smartlog.js';
|
||||
|
||||
export { ConsoleLog, LogGroup, Smartlog };
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
|
||||
/**
|
||||
* a console log optimized for smartlog
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import { Smartlog } from './smartlog.classes.smartlog';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
import { Smartlog } from './smartlog.classes.smartlog.js';
|
||||
|
||||
export class LogGroup {
|
||||
public smartlogRef: Smartlog;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
|
||||
import { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
|
||||
import { LogRouter } from './smartlog.classes.logrouter';
|
||||
import { LogGroup } from '.';
|
||||
import { LogRouter } from './smartlog.classes.logrouter.js';
|
||||
import { LogGroup } from './smartlog.classes.loggroup.js';
|
||||
|
||||
export interface ISmartlogContructorOptions {
|
||||
logContext: plugins.smartlogInterfaces.ILogContext;
|
||||
@ -24,7 +24,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
|
||||
constructor(optionsArg: ISmartlogContructorOptions) {
|
||||
this.logContext = optionsArg.logContext;
|
||||
this.minimumLogLevel = optionsArg.minimumLogLevel;
|
||||
this.minimumLogLevel = optionsArg.minimumLogLevel || 'silly';
|
||||
}
|
||||
|
||||
// ============
|
||||
@ -50,7 +50,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
default:
|
||||
this.log('info', logString);
|
||||
}
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
// fileStream.write(args[0]);
|
||||
write.apply(process.stdout, args);
|
||||
@ -60,7 +60,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
process.stderr.write = (...args: any) => {
|
||||
if (!args[0].startsWith('LOG')) {
|
||||
this.log('error', args[0]);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
// fileStream.write(args[0]);
|
||||
write.apply(process.stderr, args);
|
||||
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Loading…
Reference in New Issue
Block a user