Skip to content

Commit 61ece07

Browse files
committed
Upgrade tscore version to 0.8.0
1 parent 3142e05 commit 61ece07

File tree

11 files changed

+25
-20
lines changed

11 files changed

+25
-20
lines changed

github/client/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ exports.Client = class GithubClient {
2727
* @param {*} logger
2828
* @param {*} config
2929
*/
30-
constructor(container, logger, { repoConfig, apiConfig, commitConfig }) {
30+
constructor({ container, logger, config }) {
31+
const { repoConfig, apiConfig, commitConfig } = config;
3132
this.container = container;
3233
this.logger = logger;
3334

github/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = class GithubHelper {
2323
* @param {*} logger
2424
* @param {*} config
2525
*/
26-
constructor(container, logger, config) {
26+
constructor({ container, logger, config }) {
2727
this.container = container;
2828
this.logger = logger;
2929
this.config = config;
@@ -32,10 +32,14 @@ module.exports = class GithubHelper {
3232
this.apiConfig = this.config.api;
3333
this.commitConfig = this.config.commit;
3434

35-
this.client = new Client(container, logger, {
36-
repoConfig: this.repoConfig,
37-
apiConfig: this.apiConfig,
38-
commitConfig: this.commitConfig
35+
this.client = new Client({
36+
container,
37+
logger,
38+
config: {
39+
repoConfig: this.repoConfig,
40+
apiConfig: this.apiConfig,
41+
commitConfig: this.commitConfig
42+
}
3943
});
4044
}
4145

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"homepage": "https://github.com/dpjayasekara/boostnote-github-sync#readme",
2727
"dependencies": {
28-
"@dpjayasekara/tscore": "0.7.0",
28+
"@dpjayasekara/tscore": "0.8.0",
2929
"cson": "5.1.0",
3030
"dotenv": "6.2.0",
3131
"request": "2.88.0"

preprocessor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const readFile = promisify(fs.readFile);
99
const getStat = promisify(fs.stat);
1010

1111
class PreProcessor {
12-
constructor(container, logger) {
12+
constructor({ container, logger }) {
1313
this.container = container;
1414
this.logger = logger;
1515
this.platform = process.platform;

sync/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ module.exports = class Sync {
1111
* @param {Logger} logger
1212
* @param {Object} config
1313
*/
14-
constructor(container, logger, config) {
14+
constructor({ container, logger, config }) {
1515
this.container = container;
1616
this.logger = logger;
1717
this.config = config;
1818
this.queue = new SyncQueue();
19-
this.snippetPublisher = new SnippetPublisher(container, logger, config);
20-
this.markdownPublisher = new MarkdownPublisher(container, logger, config);
19+
this.snippetPublisher = new SnippetPublisher({ container, logger, config });
20+
this.markdownPublisher = new MarkdownPublisher({ container, logger, config });
2121
this.lock = new Lock();
2222
this.preprocessor = this.container.module('preprocessor');
2323
this.constants = this.container.module('constants');

sync/publishers/markdown-publisher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = class MarkdownPublisher {
55
* @param {Logger} logger
66
* @param {Object} config
77
*/
8-
constructor(container, logger, config) {
8+
constructor({ container, logger, config }) {
99
this.container = container;
1010
this.logger = logger;
1111
this.config = config;

sync/publishers/raw-publisher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = class RawPublisher {
55
* @param {Logger} logger
66
* @param {Object} config
77
*/
8-
constructor(container, logger, config) {
8+
constructor({ container, logger, config }) {
99
this.container = container;
1010
this.logger = logger;
1111
this.config = config;

sync/publishers/snippet-publisher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = class SnippetPublisher {
44
* @param {Map} container
55
* @param {Object} logger
66
*/
7-
constructor(container, logger) {
7+
constructor({ container, logger }) {
88
this.container = container;
99
this.logger = logger;
1010
this.github = this.container.module('github');

watcher/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ module.exports = class Watcher {
88
* @param {Logger} logger
99
* @param {Object} config
1010
*/
11-
constructor(container, logger, config) {
11+
constructor({ container, logger, config }) {
1212
this.container = container;
1313
this.logger = logger;
1414
this.config = config;
1515
this.watch = this.watch.bind(this);
1616

1717
this.sync = this.container.module('sync');
18-
this.localWatcher = new LocalWatcher(container, logger, config);
18+
this.localWatcher = new LocalWatcher({ container, logger, config });
1919

2020
this.container.on(Constants.EVENT.APPLICATION_START, this.watch);
2121
}

watcher/local-watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = class LocalWatcher {
1212
* @param {Logger} logger
1313
* @param {Object} config
1414
*/
15-
constructor(container, logger, config) {
15+
constructor({ container, logger, config }) {
1616
this.container = container;
1717
this.logger = logger;
1818
this.config = config;

0 commit comments

Comments
 (0)