Skip to content

Commit

Permalink
1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed Jul 18, 2024
1 parent bd6ebf7 commit 6a327e8
Showing 5 changed files with 18 additions and 10 deletions.
7 changes: 4 additions & 3 deletions dependencies.d.txt
Original file line number Diff line number Diff line change
@@ -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<Client>
'@sern/client': Client;
'publisher': Publisher;
}
}

4 changes: 2 additions & 2 deletions template-js/package.json
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 5 additions & 2 deletions template-js/src/index.js
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions template-ts/package.json
Original file line number Diff line number Diff line change
@@ -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",
6 changes: 5 additions & 1 deletion template-ts/src/index.ts
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6a327e8

Please sign in to comment.