Skip to content

Commit

Permalink
feat: upgrade @gabliam/core to v3
Browse files Browse the repository at this point in the history
incompatible with @gabliam/core v2
  • Loading branch information
eyolas committed Oct 3, 2017
1 parent 839babc commit 366dbd7
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 27 deletions.
41 changes: 39 additions & 2 deletions packages/log4js/README.md
Expand Up @@ -8,14 +8,51 @@

Gabliam plugin for add log4js.

# How to use

## Install

```sh
$ npm install @gabliam/log4js
```

## How to use

Add plugin

```typescript
import { Gabliam } from '@gabliam/core';

const gab = new Gabliam({
scanPath: p,
configPath: p
});

gab.addPlugin(Log4jsPlugin);

gab.buildAndStart();

```

In class

```typescript
import { Service } from '@gabliam/core';
import { log4js } from '@gabliam/log4js';

@Service()
export class SampleService {
public logger = log4js.getLogger(TestLog.name);

test() {
this.logger.info('Info');
this.logger.debug('debug');
this.logger.error('error');
this.logger.fatal('fatal');
this.logger.warn('warn');
}
}

```


# License

Expand Down
6 changes: 3 additions & 3 deletions packages/log4js/package.json
Expand Up @@ -71,14 +71,14 @@
"joi": "^10.6.0"
},
"devDependencies": {
"@gabliam/core": "^2.4.0",
"@gabliam/core": "^3.0.0",
"@types/jest": "^20.0.7",
"@types/joi": "^10.4.0",
"@types/sinon": "^2.3.3",
"commitizen": "^2.9.6",
"conventional-changelog-cli": "^1.3.1",
"cz-conventional-changelog": "^2.0.0",
"husky": "^0.13.4",
"husky": "^0.14.3",
"jest": "^20.0.4",
"joi": "^10.6.0",
"lint-staged": "^4.0.0",
Expand All @@ -92,7 +92,7 @@
"ts-jest": "^20.0.10",
"tslint": "^5.4.3",
"tslint-eslint-rules": "^4.1.1",
"typescript": "^2.3.4",
"typescript": "^2.4.2",
"vrsource-tslint-rules": "^5.1.0"
},
"dependencies": {
Expand Down
6 changes: 4 additions & 2 deletions packages/log4js/src/log4js-plugin.ts
Expand Up @@ -2,11 +2,13 @@ import {
interfaces as coreInterfaces,
Scan,
inversifyInterfaces,
Registry
Registry,
Plugin
} from '@gabliam/core';
import { log4js } from './log4js';

@Scan(__dirname)
@Plugin()
@Scan()
export class Log4jsPlugin implements coreInterfaces.GabliamPlugin {
async destroy(container: inversifyInterfaces.Container, registry: Registry) {
return new Promise<void>(resolve => {
Expand Down
71 changes: 51 additions & 20 deletions packages/log4js/yarn.lock
Expand Up @@ -2,16 +2,19 @@
# yarn lockfile v1


"@gabliam/core@^2.4.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@gabliam/core/-/core-2.8.0.tgz#0e8037b40f4db52b3010c95f4ed427fba690740a"
"@gabliam/core@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@gabliam/core/-/core-3.0.0.tgz#f5cf8eae8c05308ae896abe302a9378473732870"
dependencies:
debug "^2.6.1"
caller "^1.0.1"
debug "^3.0.0"
glob "^7.1.1"
inversify "^4.3.0"
inversify-logger-middleware "^3.0.0"
js-yaml "^3.8.1"
lodash "^4.17.4"
shortstop "^1.0.3"
shortstop-handlers "^1.0.1"

"@types/express-serve-static-core@*":
version "4.0.49"
Expand Down Expand Up @@ -259,6 +262,10 @@ async@^2.1.4:
dependencies:
lodash "^4.14.0"

async@~0.2.10:
version "0.2.10"
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"

async@~2.1.2:
version "2.1.5"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc"
Expand Down Expand Up @@ -559,6 +566,10 @@ cachedir@^1.1.0:
dependencies:
os-homedir "^1.0.1"

caller@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/caller/-/caller-1.0.1.tgz#b851860f70e195db3d277395aa1a7e23ea30ecf5"

callsites@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
Expand Down Expand Up @@ -942,7 +953,7 @@ core-js@^2.4.0, core-js@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086"

core-util-is@1.0.2, core-util-is@~1.0.0:
core-util-is@1.0.2, core-util-is@^1.0.1, core-util-is@~1.0.0, core-util-is@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"

Expand Down Expand Up @@ -1072,7 +1083,7 @@ dateformat@^1.0.11, dateformat@^1.0.12:
get-stdin "^4.0.1"
meow "^3.3.0"

debug@2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.1, debug@^2.6.3, debug@^2.6.8:
debug@2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.3, debug@^2.6.8:
version "2.6.8"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
dependencies:
Expand All @@ -1084,6 +1095,12 @@ debug@2.6.0:
dependencies:
ms "0.7.2"

debug@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.0.0.tgz#1d2feae53349047b08b264ec41906ba17a8516e4"
dependencies:
ms "2.0.0"

debug@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
Expand Down Expand Up @@ -1383,10 +1400,6 @@ find-node-modules@1.0.4:
findup-sync "0.4.2"
merge "^1.2.0"

find-parent-dir@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"

find-root@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a"
Expand Down Expand Up @@ -1910,14 +1923,13 @@ https-proxy-agent@1, https-proxy-agent@^1.0.0:
debug "2"
extend "3"

husky@^0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/husky/-/husky-0.13.4.tgz#48785c5028de3452a51c48c12c4f94b2124a1407"
husky@^0.14.3:
version "0.14.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3"
dependencies:
chalk "^1.1.3"
find-parent-dir "^0.3.0"
is-ci "^1.0.9"
is-ci "^1.0.10"
normalize-path "^1.0.0"
strip-indent "^2.0.0"

iconv-lite@0.4.13:
version "0.4.13"
Expand Down Expand Up @@ -2051,7 +2063,7 @@ is-builtin-module@^1.0.0:
dependencies:
builtin-modules "^1.0.0"

is-ci@^1.0.10, is-ci@^1.0.9:
is-ci@^1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
dependencies:
Expand Down Expand Up @@ -4088,6 +4100,21 @@ shellwords@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"

shortstop-handlers@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/shortstop-handlers/-/shortstop-handlers-1.0.1.tgz#0755acb6604c76c9c0e76a9e943f93790bab1dc4"
dependencies:
caller "^1.0.1"
core-util-is "^1.0.1"
glob "^7.0.5"

shortstop@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/shortstop/-/shortstop-1.0.3.tgz#d43769c36fee7e20a3b9bfd2d0878935ff86e7c6"
dependencies:
async "~0.2.10"
core-util-is "~1.0.1"

signal-exit@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
Expand Down Expand Up @@ -4332,6 +4359,10 @@ strip-indent@^1.0.1:
dependencies:
get-stdin "^4.0.1"

strip-indent@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"

strip-json-comments@2.0.1, strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
Expand Down Expand Up @@ -4572,9 +4603,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^2.3.4:
version "2.5.0"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.0.tgz#60989e74cad93c28fe35f7f7b41fe9b205a25701"
typescript@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844"

uglify-js@^2.6:
version "2.8.29"
Expand Down

0 comments on commit 366dbd7

Please sign in to comment.