@strav/cli 1.0.0-alpha.24 → 1.0.0-alpha.25

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/cli",
3
- "version": "1.0.0-alpha.24",
3
+ "version": "1.0.0-alpha.25",
4
4
  "description": "Strav CLI layer — Command base, signature parser, ConsoleProvider, interactive prompts on top of @strav/kernel's ConsoleKernel",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -19,7 +19,7 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@strav/kernel": "1.0.0-alpha.24"
22
+ "@strav/kernel": "1.0.0-alpha.25"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@types/bun": ">=1.3.14"
@@ -11,7 +11,7 @@ export class MakeMail extends MakeCommand {
11
11
 
12
12
  protected stub(name: string): string {
13
13
  const cls = pascal(name)
14
- return `import { Mailable, type Message } from '@strav/signal'
14
+ return `import { Mailable, type Message } from '@strav/mail'
15
15
 
16
16
  export class ${cls} extends Mailable<unknown> {
17
17
  build(payload: unknown): Message {
@@ -11,12 +11,21 @@ export class MakeNotification extends MakeCommand {
11
11
 
12
12
  protected stub(name: string): string {
13
13
  const cls = pascal(name)
14
- return `// ${cls} notification
15
- // Implement channels (mail, database, broadcast) once @strav/signal notifications land.
16
- export class ${cls} {
17
- via(): string[] {
14
+ return `import { BaseNotification, type Notifiable } from '@strav/notification'
15
+ import { type Message } from '@strav/mail'
16
+
17
+ export class ${cls} extends BaseNotification {
18
+ override via(_notifiable: Notifiable): readonly string[] {
18
19
  return ['mail']
19
20
  }
21
+
22
+ override toMail(_notifiable: Notifiable): Message {
23
+ return {
24
+ to: [],
25
+ subject: '${cls}',
26
+ text: 'Edit packages/.../notifications/${snake(name)}.ts',
27
+ }
28
+ }
20
29
  }
21
30
  `
22
31
  }