diff --git a/dependencies.d.txt b/dependencies.d.txt index 9f26b76..0623f44 100644 --- a/dependencies.d.txt +++ b/dependencies.d.txt @@ -4,16 +4,17 @@ * Service(s) api rely on this file to provide a better developer experience. */ -import type { Logging, ErrorHandling, CoreDependencies, Singleton } from '@sern/handler' +import type { CoreDependencies } from '@sern/handler'; import type { Client } from 'discord.js' - +import type { Publisher } from '@sern/publisher' /** * Note: You usually would not need to modify this unless there is an urgent need to break the contracts provided. * You would need to modify this to add your custom Services, however. */ declare global { interface Dependencies extends CoreDependencies { - '@sern/client': Singleton + '@sern/client': Client; + 'publisher': Publisher; } } diff --git a/template-js/package.json b/template-js/package.json index b93100e..f50340c 100644 --- a/template-js/package.json +++ b/template-js/package.json @@ -15,10 +15,10 @@ "discord.js" ], "dependencies": { - "@sern/handler": "^3.0.3", + "@sern/handler": "^4.0.0", "discord.js": "latest", "dotenv": "^16.3.1", - "@sern/publisher": "^1.0.0" + "@sern/publisher": "^1.1.1" }, "devDependencies": { "@types/node": "^18.0.25" diff --git a/template-js/src/index.js b/template-js/src/index.js index 813ab2d..3fe5298 100644 --- a/template-js/src/index.js +++ b/template-js/src/index.js @@ -22,8 +22,11 @@ const client = new Client({ */ await makeDependencies(({ add }) => { add('@sern/client', client); - - add('publisher', new Publisher()); + add('publisher', deps => new Publisher( + deps['@sern/modules'], + deps['@sern/emitter'], + deps['@sern/logger'] + )); }); //View docs for all options diff --git a/template-ts/package.json b/template-ts/package.json index 85155ef..67387e5 100644 --- a/template-ts/package.json +++ b/template-ts/package.json @@ -16,10 +16,10 @@ "discord.js" ], "dependencies": { - "@sern/handler": "^3.0.3", + "@sern/handler": "^4.0.0", "discord.js": "latest", "dotenv": "^16.3.1", - "@sern/publisher": "^1.0.0" + "@sern/publisher": "^1.1.1" }, "devDependencies": { "@types/node": "^17.0.25", diff --git a/template-ts/src/index.ts b/template-ts/src/index.ts index 67b47e7..2882726 100644 --- a/template-ts/src/index.ts +++ b/template-ts/src/index.ts @@ -21,7 +21,11 @@ const client = new Client({ */ await makeDependencies(({ add }) => { add('@sern/client', client); - add('publisher', new Publisher()); + add('publisher', deps => new Publisher( + deps['@sern/modules'], + deps['@sern/emitter'], + deps['@sern/logger'] + )); }); //View docs for all options