@develit-services/notification 0.0.25 → 0.0.27

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/dist/@types.d.cts CHANGED
@@ -3,7 +3,7 @@ export { n as IPushNotification, o as ISlack, N as NotificationQueueMessage, S a
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CNBJ5Beq.cjs';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.jEQePmaL.cjs';
7
7
  import 'zod';
8
8
  import 'zod/v4';
9
9
  import './shared/notification.BJyMXKGH.cjs';
package/dist/@types.d.mts CHANGED
@@ -3,7 +3,7 @@ export { n as IPushNotification, o as ISlack, N as NotificationQueueMessage, S a
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CNBJ5Beq.mjs';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.jEQePmaL.mjs';
7
7
  import 'zod';
8
8
  import 'zod/v4';
9
9
  import './shared/notification.BJyMXKGH.mjs';
package/dist/@types.d.ts CHANGED
@@ -3,7 +3,7 @@ export { n as IPushNotification, o as ISlack, N as NotificationQueueMessage, S a
3
3
  import { InternalError } from '@develit-io/backend-sdk';
4
4
  import twilio from 'twilio';
5
5
  import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
6
- export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.CNBJ5Beq.js';
6
+ export { b as NotificationServiceEnv, a as NotificationServiceEnvironmentConfig, N as NotificationServiceWranglerConfig } from './shared/notification.jEQePmaL.js';
7
7
  import 'zod';
8
8
  import 'zod/v4';
9
9
  import './shared/notification.BJyMXKGH.js';
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  function defineNotificationServiceWrangler(config) {
4
- const { name, envs } = config;
4
+ const { project, name, envs } = config;
5
5
  const base = {
6
- name,
6
+ name: `${project}-${name}`,
7
7
  main: "./src/index.ts",
8
8
  compatibility_date: "2025-06-04",
9
9
  compatibility_flags: ["nodejs_compat"],
@@ -17,17 +17,17 @@ function defineNotificationServiceWrangler(config) {
17
17
  preview_urls: false,
18
18
  workers_dev: false,
19
19
  vars: {
20
- //secrets
21
- EMAIL_API_KEY: "",
22
- SMS_AUTH_TOKEN: "",
23
- //vars
20
+ // Secrets
21
+ EMAIL_API_KEY: "[SECRET]",
22
+ SMS_AUTH_TOKEN: "[SECRET]",
23
+ // Variables
24
24
  ...envs.local.vars,
25
25
  ENVIRONMENT: "localhost"
26
26
  },
27
27
  d1_databases: [
28
28
  {
29
29
  binding: "NOTIFICATION_D1",
30
- database_name: name,
30
+ database_name: `${project}-${name}`,
31
31
  database_id: envs.local.d1.id,
32
32
  migrations_dir: "./src/database/migrations"
33
33
  }
@@ -36,7 +36,7 @@ function defineNotificationServiceWrangler(config) {
36
36
  producers: [
37
37
  {
38
38
  binding: "NOTIFICATIONS_QUEUE",
39
- queue: `${name}`
39
+ queue: `${project}-notifications`
40
40
  }
41
41
  ],
42
42
  consumers: [
@@ -44,7 +44,7 @@ function defineNotificationServiceWrangler(config) {
44
44
  queue: `${name}`,
45
45
  max_batch_size: 1,
46
46
  max_batch_timeout: 5,
47
- dead_letter_queue: `${name}-dlq`
47
+ dead_letter_queue: `${project}-notification-dlq`
48
48
  }
49
49
  ]
50
50
  },
@@ -61,7 +61,7 @@ function defineNotificationServiceWrangler(config) {
61
61
  d1_databases: [
62
62
  {
63
63
  binding: "NOTIFICATION_D1",
64
- database_name: `${name}-${envName}`,
64
+ database_name: `${project}-${name}-${envName}`,
65
65
  database_id: envCfg.d1.id,
66
66
  migrations_dir: "./src/database/migrations"
67
67
  }
@@ -70,15 +70,15 @@ function defineNotificationServiceWrangler(config) {
70
70
  producers: [
71
71
  {
72
72
  binding: "NOTIFICATIONS_QUEUE",
73
- queue: `${name}-${envName}`
73
+ queue: `${project}-notifications-${envName}`
74
74
  }
75
75
  ],
76
76
  consumers: [
77
77
  {
78
- queue: `${name}-${envName}`,
78
+ queue: `${project}-notifications-${envName}`,
79
79
  max_batch_size: envCfg.queue?.max_batch_size ?? 1,
80
80
  max_batch_timeout: envCfg.queue?.max_batch_timeout ?? 5,
81
- dead_letter_queue: `${name}-dlq-${envName}`
81
+ dead_letter_queue: `${project}-notifications-dlq-${envName}`
82
82
  }
83
83
  ]
84
84
  }
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CNBJ5Beq.cjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.jEQePmaL.cjs';
2
2
 
3
3
  /** biome-ignore-all lint/suspicious/noExplicitAny: allow any */
4
4
 
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CNBJ5Beq.mjs';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.jEQePmaL.mjs';
2
2
 
3
3
  /** biome-ignore-all lint/suspicious/noExplicitAny: allow any */
4
4
 
@@ -1,4 +1,4 @@
1
- import { N as NotificationServiceWranglerConfig } from '../shared/notification.CNBJ5Beq.js';
1
+ import { N as NotificationServiceWranglerConfig } from '../shared/notification.jEQePmaL.js';
2
2
 
3
3
  /** biome-ignore-all lint/suspicious/noExplicitAny: allow any */
4
4
 
@@ -1,7 +1,7 @@
1
1
  function defineNotificationServiceWrangler(config) {
2
- const { name, envs } = config;
2
+ const { project, name, envs } = config;
3
3
  const base = {
4
- name,
4
+ name: `${project}-${name}`,
5
5
  main: "./src/index.ts",
6
6
  compatibility_date: "2025-06-04",
7
7
  compatibility_flags: ["nodejs_compat"],
@@ -15,17 +15,17 @@ function defineNotificationServiceWrangler(config) {
15
15
  preview_urls: false,
16
16
  workers_dev: false,
17
17
  vars: {
18
- //secrets
19
- EMAIL_API_KEY: "",
20
- SMS_AUTH_TOKEN: "",
21
- //vars
18
+ // Secrets
19
+ EMAIL_API_KEY: "[SECRET]",
20
+ SMS_AUTH_TOKEN: "[SECRET]",
21
+ // Variables
22
22
  ...envs.local.vars,
23
23
  ENVIRONMENT: "localhost"
24
24
  },
25
25
  d1_databases: [
26
26
  {
27
27
  binding: "NOTIFICATION_D1",
28
- database_name: name,
28
+ database_name: `${project}-${name}`,
29
29
  database_id: envs.local.d1.id,
30
30
  migrations_dir: "./src/database/migrations"
31
31
  }
@@ -34,7 +34,7 @@ function defineNotificationServiceWrangler(config) {
34
34
  producers: [
35
35
  {
36
36
  binding: "NOTIFICATIONS_QUEUE",
37
- queue: `${name}`
37
+ queue: `${project}-notifications`
38
38
  }
39
39
  ],
40
40
  consumers: [
@@ -42,7 +42,7 @@ function defineNotificationServiceWrangler(config) {
42
42
  queue: `${name}`,
43
43
  max_batch_size: 1,
44
44
  max_batch_timeout: 5,
45
- dead_letter_queue: `${name}-dlq`
45
+ dead_letter_queue: `${project}-notification-dlq`
46
46
  }
47
47
  ]
48
48
  },
@@ -59,7 +59,7 @@ function defineNotificationServiceWrangler(config) {
59
59
  d1_databases: [
60
60
  {
61
61
  binding: "NOTIFICATION_D1",
62
- database_name: `${name}-${envName}`,
62
+ database_name: `${project}-${name}-${envName}`,
63
63
  database_id: envCfg.d1.id,
64
64
  migrations_dir: "./src/database/migrations"
65
65
  }
@@ -68,15 +68,15 @@ function defineNotificationServiceWrangler(config) {
68
68
  producers: [
69
69
  {
70
70
  binding: "NOTIFICATIONS_QUEUE",
71
- queue: `${name}-${envName}`
71
+ queue: `${project}-notifications-${envName}`
72
72
  }
73
73
  ],
74
74
  consumers: [
75
75
  {
76
- queue: `${name}-${envName}`,
76
+ queue: `${project}-notifications-${envName}`,
77
77
  max_batch_size: envCfg.queue?.max_batch_size ?? 1,
78
78
  max_batch_timeout: envCfg.queue?.max_batch_timeout ?? 5,
79
- dead_letter_queue: `${name}-dlq-${envName}`
79
+ dead_letter_queue: `${project}-notifications-dlq-${envName}`
80
80
  }
81
81
  ]
82
82
  }
@@ -18,6 +18,7 @@ interface NotificationServiceEnvironmentConfig {
18
18
  };
19
19
  }
20
20
  interface NotificationServiceWranglerConfig {
21
+ project: string;
21
22
  name: string;
22
23
  envs: {
23
24
  local: NotificationServiceEnvironmentConfig;
@@ -18,6 +18,7 @@ interface NotificationServiceEnvironmentConfig {
18
18
  };
19
19
  }
20
20
  interface NotificationServiceWranglerConfig {
21
+ project: string;
21
22
  name: string;
22
23
  envs: {
23
24
  local: NotificationServiceEnvironmentConfig;
@@ -18,6 +18,7 @@ interface NotificationServiceEnvironmentConfig {
18
18
  };
19
19
  }
20
20
  interface NotificationServiceWranglerConfig {
21
+ project: string;
21
22
  name: string;
22
23
  envs: {
23
24
  local: NotificationServiceEnvironmentConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/notification",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -30,7 +30,7 @@
30
30
  "./dist"
31
31
  ],
32
32
  "scripts": {
33
- "dev": "wrangler dev --port 9232 --persist-to ../../.wrangler/state",
33
+ "dev": "wrangler dev --port 9233 --persist-to ../../.wrangler/state",
34
34
  "wrangler:generate": "bunx develit wrangler:generate",
35
35
  "db:init": "wrangler d1 execute develit-notification --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
36
36
  "db:generate": "drizzle-kit generate",