Skip to content

Commit

Permalink
deps.ts again - 0.6.2
Browse files Browse the repository at this point in the history
Signed-off-by: Jersey <[email protected]>
  • Loading branch information
williamhorning committed Apr 1, 2024
1 parent 4bbe336 commit 6b5e0d5
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/bolt-discord/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export async function todiscord(
data: new Uint8Array(await (await fetch(a.file)).arrayBuffer())
}
];
})
})
: undefined,
username: message.author.username,
wait: true
Expand Down
2 changes: 1 addition & 1 deletion packages/bolt-guilded/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function tocore(
name: embed.author.name || 'embed author',
iconUrl: embed.author.iconURL || undefined,
url: embed.author.url || undefined
}
}
: undefined,
image: embed.image || undefined,
thumbnail: embed.thumbnail || undefined,
Expand Down
4 changes: 2 additions & 2 deletions packages/bolt-matrix/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function messageToCore(
? `${sender.avatar_url?.replace(
'mxc://',
`${homeserverUrl}/_matrix/media/v3/thumbnail/`
)}?width=96&height=96&method=scale`
)}?width=96&height=96&method=scale`
: undefined
},
channel: event.room_id,
Expand All @@ -75,7 +75,7 @@ export async function messageToCore(
? (event.content.formatted_body as string).replace(
/<mx-reply>(.*?)<\/mx-reply>/i,
''
)
)
: ((event.content['m.new_content']?.body ||
event.content.body) as string),
reply: async (msg: message<unknown>) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/bolt-revolt/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class revolt_plugin extends plugin<{ token: string }> {
timestamp: message.editedAt
? Temporal.Instant.fromEpochMilliseconds(
message.editedAt?.getUTCMilliseconds()
)
)
: Temporal.Now.instant()
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/_tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from 'assert_eq';
import { assertEquals } from 'jsr:@std/assert@^0.219.1/assert_equals';
import {
cmd_help_output,
migrations_five,
Expand Down
9 changes: 1 addition & 8 deletions packages/lightning/deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"name": "@jersey/lightning",
"version": "0.6.1",
"imports": {
"assert_eq": "jsr:@std/assert@^0.219.1/assert_equals",
"event": "jsr:@denosaurs/event@^2.0.2",
"mongo": "jsr:@db/mongo@^0.33.0",
"r2d2": "jsr:@iuioiua/[email protected]",
"std_args": "jsr:@std/cli@^0.219.1/parse_args"
},
"version": "0.6.2",
"exports": {
".": "./mod.ts",
"./bridges": "./src/bridges/mod.ts",
Expand Down
5 changes: 5 additions & 0 deletions packages/lightning/deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { MongoClient } from 'jsr:@db/mongo@^0.33.0';
export type { Collection, Document } from 'jsr:@db/mongo@^0.33.0';
export { EventEmitter } from 'jsr:@denosaurs/event@^2.0.2';
export { RedisClient } from 'jsr:@iuioiua/[email protected]';
export { parseArgs } from 'jsr:@std/cli@^0.219.1/parse_args';
5 changes: 2 additions & 3 deletions packages/lightning/lightning.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { EventEmitter } from 'event';
import type { MongoClient } from 'mongo';
import { RedisClient } from 'r2d2';
import type { MongoClient } from './deps.ts';
import { EventEmitter, RedisClient } from './deps.ts';
import { bridges } from './src/bridges/mod.ts';
import { commands } from './src/commands.ts';
import type { plugin } from './src/plugins.ts';
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/bridges/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Collection } from 'mongo';
import type { Collection } from '../../deps.ts';
import type { lightning } from '../../lightning.ts';
import type {
bridge_document,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseArgs } from 'std_args';
import { parseArgs } from '../deps.ts';
import type { lightning } from '../lightning.ts';
import { default_commands } from './default_commands.ts';
import type { command, command_arguments } from './types.ts';
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/migrations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Document } from 'mongo';
import type { Document } from '../deps.ts';
import type { versions } from './types.ts';

type doc = {
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventEmitter } from 'event';
import { EventEmitter } from '../deps.ts';
import type { lightning } from '../lightning.ts';
import type {
bridge_platform,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Document } from 'mongo';
import type { Document } from '../deps.ts';
import type { lightning } from '../lightning.ts';
import type { commands } from './commands.ts';
import type { plugin } from './plugins.ts';
Expand Down
5 changes: 3 additions & 2 deletions packages/lightning/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Document } from 'mongo';
import type { Document } from '../deps.ts';
import { fourbetafive, fourfourbeta } from './migrations.ts';
import type { config, err, message, migration, versions } from './types.ts';

Expand Down Expand Up @@ -69,7 +69,7 @@ export async function log_error(
const uuid = _id ? _id() : crypto.randomUUID();
const error_hook = Deno.env.get('LIGHTNING_ERROR_HOOK');

if (error_hook)
if (error_hook) {
await (
await fetch(error_hook, {
method: 'POST',
Expand All @@ -79,6 +79,7 @@ export async function log_error(
})
})
).text();
}

console.error(`%cLightning Error ${uuid}`, 'color: red');
console.error(e, extra);
Expand Down

0 comments on commit 6b5e0d5

Please sign in to comment.