Skip to content

Commit

Permalink
Fix exporting logger (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname authored and bz888 committed Sep 21, 2022
1 parent 4fc9977 commit 2976842
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 7 additions & 0 deletions packages/node-core/logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2020-2022 OnFinality Limited authors & contributors
// SPDX-License-Identifier: Apache-2.0

// A standalone entrypoint for logger so we can import `@subql/node-core/logger`
const logger = require('./dist/logger');

module.exports = logger;
9 changes: 2 additions & 7 deletions packages/node-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@
"license": "Apache-2.0",
"files": [
"src/global.d.ts",
"/dist"
"/dist",
"logger.js"
],
"exports": {
"./logger": {
"import": "./src/logger",
"require": "./dist/logger.js"
}
},
"dependencies": {
"@nestjs/common": "^8.2.6",
"@nestjs/event-emitter": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/node-core/src/indexer/benchmark.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import {OnEvent} from '@nestjs/event-emitter';
import {Interval} from '@nestjs/schedule';
import {NodeConfig} from '@subql/node-core/configure';
import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';
import {NodeConfig} from '../configure';
import {IndexerEvent, ProcessBlockPayload, ProcessedBlockCountPayload, TargetBlockPayload} from '../events';
import {getLogger} from '../logger';
import {delay} from '../utils/promise';
Expand Down

0 comments on commit 2976842

Please sign in to comment.