@strav/signal 0.2.4 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/signal",
3
- "version": "0.2.4",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "Communication layer for the Strav framework — mail, notifications, and broadcasting",
6
6
  "license": "MIT",
@@ -30,11 +30,11 @@
30
30
  "./providers/*": "./src/providers/*.ts"
31
31
  },
32
32
  "peerDependencies": {
33
- "@strav/kernel": "0.1.4",
34
- "@strav/http": "0.1.4",
35
- "@strav/view": "0.1.4",
36
- "@strav/database": "0.1.4",
37
- "@strav/queue": "0.1.4"
33
+ "@strav/kernel": "0.2.6",
34
+ "@strav/http": "0.2.6",
35
+ "@strav/view": "0.2.6",
36
+ "@strav/database": "0.2.6",
37
+ "@strav/queue": "0.2.6"
38
38
  },
39
39
  "dependencies": {
40
40
  "nodemailer": "^6.10.0",
@@ -1,9 +1,5 @@
1
1
  import type { ServerWebSocket } from 'bun'
2
- import Context from '@strav/http/http/context'
3
- import { compose } from '@strav/http/http/middleware'
4
- import type { Middleware } from '@strav/http/http/middleware'
5
- import type Router from '@strav/http/http/router'
6
- import type { WebSocketData } from '@strav/http/http/router'
2
+ import { Context, compose, type Middleware, type Router, type WebSocketData } from '@strav/http'
7
3
 
8
4
  // ---------------------------------------------------------------------------
9
5
  // Types
@@ -11,7 +11,7 @@ export type { BroadcastOptions } from './client.ts'
11
11
 
12
12
  import BroadcastManager from './broadcast_manager.ts'
13
13
  import type { AuthorizeCallback, ChannelConfig, BootOptions } from './broadcast_manager.ts'
14
- import type Router from '@strav/http/http/router'
14
+ import type { Router } from '@strav/http'
15
15
 
16
16
  /**
17
17
  * Broadcast helper — convenience object that delegates to `BroadcastManager`.
@@ -1,7 +1,7 @@
1
1
  import MailManager from './mail_manager.ts'
2
2
  import { ViewEngine } from '@strav/view'
3
3
  import { inlineCss } from './css_inliner.ts'
4
- import Queue from '@strav/queue/queue/queue'
4
+ import { Queue } from '@strav/queue'
5
5
  import type { MailMessage, MailResult, MailAttachment } from './types.ts'
6
6
 
7
7
  /**
@@ -1,6 +1,6 @@
1
- import { inject } from '@strav/kernel/core/inject'
2
- import { ConfigurationError } from '@strav/kernel/exceptions/errors'
3
- import Configuration from '@strav/kernel/config/configuration'
1
+ import { inject } from '@strav/kernel'
2
+ import { ConfigurationError } from '@strav/kernel'
3
+ import { Configuration } from '@strav/kernel'
4
4
  import { SmtpTransport } from './transports/smtp_transport.ts'
5
5
  import { ResendTransport } from './transports/resend_transport.ts'
6
6
  import { SendGridTransport } from './transports/sendgrid_transport.ts'
@@ -1,5 +1,5 @@
1
1
  import crypto from 'node:crypto'
2
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
2
+ import { ExternalServiceError } from '@strav/kernel'
3
3
  import type { MailTransport, MailMessage, MailResult, AlibabaConfig } from '../types.ts'
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import type { MailTransport, MailMessage, MailResult, MailgunConfig } from '../types.ts'
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import type { MailTransport, MailMessage, MailResult, ResendConfig } from '../types.ts'
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import type { MailTransport, MailMessage, MailResult, SendGridConfig } from '../types.ts'
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { NotificationChannel, Notifiable, NotificationPayload } from '../types.ts'
2
- import Database from '@strav/database/database/database'
2
+ import { Database } from '@strav/database'
3
3
 
4
4
  /**
5
5
  * Stores notifications in the `_strav_notifications` table.
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import type {
3
3
  NotificationChannel,
4
4
  Notifiable,
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@strav/kernel/exceptions/errors'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import type {
3
3
  NotificationChannel,
4
4
  Notifiable,
@@ -1,9 +1,9 @@
1
1
  import NotificationManager from './notification_manager.ts'
2
2
  import type { BaseNotification } from './base_notification.ts'
3
3
  import type { Notifiable, NotificationRecord } from './types.ts'
4
- import Queue from '@strav/queue/queue/queue'
5
- import Emitter from '@strav/kernel/events/emitter'
6
- import Database from '@strav/database/database/database'
4
+ import { Queue } from '@strav/queue'
5
+ import { Emitter } from '@strav/kernel'
6
+ import { Database } from '@strav/database'
7
7
 
8
8
  /**
9
9
  * Send a notification to one or more recipients.
@@ -1,12 +1,12 @@
1
- import { inject } from '@strav/kernel/core/inject'
2
- import Configuration from '@strav/kernel/config/configuration'
3
- import Database from '@strav/database/database/database'
1
+ import { inject } from '@strav/kernel'
2
+ import { Configuration } from '@strav/kernel'
3
+ import { Database } from '@strav/database'
4
4
  import type { NotificationChannel, NotificationConfig, EventNotificationBinding } from './types.ts'
5
5
  import { EmailChannel } from './channels/email_channel.ts'
6
6
  import { DatabaseChannel } from './channels/database_channel.ts'
7
7
  import { WebhookChannel } from './channels/webhook_channel.ts'
8
8
  import { DiscordChannel } from './channels/discord_channel.ts'
9
- import { ConfigurationError } from '@strav/kernel/exceptions/errors'
9
+ import { ConfigurationError } from '@strav/kernel'
10
10
 
11
11
  /**
12
12
  * Central notification configuration hub.
@@ -1,8 +1,8 @@
1
- import ServiceProvider from '@strav/kernel/core/service_provider'
2
- import type Application from '@strav/kernel/core/application'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import BroadcastManager from '../broadcast/broadcast_manager.ts'
4
4
  import type { BootOptions } from '../broadcast/broadcast_manager.ts'
5
- import Router from '@strav/http/http/router'
5
+ import { Router } from '@strav/http'
6
6
 
7
7
  export default class BroadcastProvider extends ServiceProvider {
8
8
  readonly name = 'broadcast'
@@ -1,5 +1,5 @@
1
- import ServiceProvider from '@strav/kernel/core/service_provider'
2
- import type Application from '@strav/kernel/core/application'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import MailManager from '../mail/mail_manager.ts'
4
4
 
5
5
  export default class MailProvider extends ServiceProvider {
@@ -1,5 +1,5 @@
1
- import ServiceProvider from '@strav/kernel/core/service_provider'
2
- import type Application from '@strav/kernel/core/application'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import NotificationManager from '../notification/notification_manager.ts'
4
4
 
5
5
  export interface NotificationProviderOptions {