refactor(@embark/embark-logger): move logger into own package

This commit is contained in:
Pascal Precht 2019-04-26 14:56:40 +02:00 committed by Pascal Precht
parent 69ced6d894
commit a874c38d72
14 changed files with 95 additions and 9 deletions

View File

@ -0,0 +1,4 @@
engine-strict = true
package-lock = false
save-exact = true
scripts-prepend-node-path = true

View File

@ -0,0 +1,6 @@
# `embark-logger`
Logger utilities for Embark
Visit [embark.status.im](https://embark.status.im/) to get started with
[Embark](https://github.com/embark-framework/embark).

View File

@ -0,0 +1,69 @@
{
"name": "embark-logger",
"version": "4.1.0-beta.0",
"author": "Iuri Matias <iuri.matias@gmail.com>",
"contributors": [],
"description": "Logging utilities for Embark",
"homepage": "https://github.com/embark-framework/embark/tree/master/packages/embark-logger#readme",
"bugs": "https://github.com/embark-framework/embark/issues",
"keywords": [
"blockchain",
"dapps",
"ethereum",
"ipfs",
"serverless",
"solc",
"solidity"
],
"files": [
"dist"
],
"license": "MIT",
"repository": {
"directory": "packages/embark-logger",
"type": "git",
"url": "https://github.com/embark-framework/embark.git"
},
"main": "./dist/index.js",
"scripts": {
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
"ci": "npm run qa",
"clean": "npm run reset",
"lint": "npm-run-all lint:*",
"lint:js": "eslint src/",
"// lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
"package": "npm pack",
"// qa": "npm-run-all lint typecheck build package",
"qa": "npm-run-all lint build package",
"reset": "npx rimraf dist embark-*.tgz package",
"start": "npm run watch",
"// typecheck": "tsc",
"watch": "run-p watch:*",
"watch:build": "npm run build -- --verbose --watch",
"// watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch"
},
"eslintConfig": {
"extends": "../../.eslintrc.json"
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"colors": "1.3.2",
"date-and-time": "0.6.2",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {
"@babel/cli": "7.2.3",
"@babel/core": "7.2.2",
"cross-env": "5.2.0",
"eslint": "5.7.0",
"npm-run-all": "4.1.5",
"rimraf": "2.6.3",
"tslint": "5.11.0",
"typescript": "3.3.1"
},
"engines": {
"node": ">=8.12.0",
"npm": ">=6.4.1",
"yarn": ">=1.12.3"
}
}

View File

@ -1,5 +1,5 @@
require('colors');
let fs = require('./fs.js');
const fs = require('fs');
const date = require('date-and-time');
const { escapeHtml } = require('embark-utils');
const util = require('util');

View File

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"]
}

View File

@ -0,0 +1,3 @@
{
"extends": "../../tslint.json"
}

View File

@ -87,6 +87,7 @@
"deep-equal": "1.0.1",
"ejs": "2.6.1",
"embark-compiler": "^4.0.0",
"embark-logger": "^4.1.0-beta.0",
"embark-process-logs-api": "^4.1.0-beta.0",
"embark-profiler": "^4.1.0-beta.0",
"embark-reset": "^4.1.0-beta.0",

View File

@ -1,6 +1,6 @@
let async = require('async');
const constants = require('../lib/constants');
const Logger = require('../lib/core/logger');
const Logger = require('embark-logger');
const {reset: embarkReset, paths: defaultResetPaths} = require('embark-reset');
const fs = require('../lib/core/fs.js');
@ -21,7 +21,6 @@ class EmbarkController {
initConfig(env, options) {
let Events = require('../lib/core/events.js');
let Logger = require('../lib/core/logger.js');
let Config = require('../lib/core/config.js');
this.events = new Events();

View File

@ -2,6 +2,7 @@ const async = require('async');
const utils = require('../utils/utils');
const IPC = require('./ipc');
const Logger = require('embark-logger');
class Engine {
constructor(options) {
@ -25,7 +26,6 @@ class Engine {
init(_options, callback) {
callback = callback || function() {};
const Events = require('./events.js');
const Logger = require('./logger.js');
const Config = require('./config.js');
let options = _options || {};

View File

@ -1,4 +1,5 @@
let version = require('../../package.json').version;
const Logger = require('embark-logger');
class Embark {
@ -9,7 +10,6 @@ class Embark {
initConfig(env, options) {
let Events = require('./core/events.js');
let Logger = require('./core/logger.js');
let Config = require('./core/config.js');
this.events = new Events();

View File

@ -10,7 +10,7 @@ const Proxy = require('./proxy');
const Ipc = require('../../core/ipc');
import {defaultHost, dockerHostSwap} from 'embark-utils';
const Logger = require('../../core/logger');
const Logger = require('embark-logger');
// time between IPC connection attempts (in ms)
const IPC_CONNECT_INTERVAL = 2000;

View File

@ -2,7 +2,7 @@
let Console = require('../lib/modules/console/');
let Plugins = require('../lib/core/plugins.js');
let IPC = require('../lib/core/ipc.js');
let Logger = require('../lib/core/logger.js');
let Logger = require('embark-logger');
let assert = require('assert');
let version = require('../../package.json').version;

View File

@ -3,7 +3,7 @@ import { File, Types } from "../lib/core/file";
let ContractsManager = require('../lib/modules/contracts_manager/index.js');
let Compiler = require('embark-compiler');
let Logger = require('../lib/core/logger.js');
let Logger = require('embark-logger');
let TestLogger = require('../lib/utils/test_logger');
let Events = require('../lib/core/events');
let Ipc = require('../lib/core/ipc.js');

View File

@ -2,7 +2,7 @@
const {expect} = require('chai');
const sinon = require('sinon');
const Events = require('../../lib/core/events');
const Logger = require('../../lib/core/logger');
const Logger = require('embark-logger');
const transactionUtils = require('../../lib/utils/transactionUtils');
const ConsoleListener = require('../../lib/modules/console_listener');
const IPC = require('../../lib/core/ipc.js');