@owlmeans/mailer 0.1.5

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.
@@ -0,0 +1,2 @@
1
+ export declare const MAILER_SERVICE = "mailer-service";
2
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const MAILER_SERVICE = 'mailer-service';
2
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type * from './types.js';
2
+ export * from './consts.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,aAAa,CAAA"}
package/build/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './consts.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { InitializedService } from '@owlmeans/context';
2
+ export interface MailMessage {
3
+ to: string;
4
+ subject: string;
5
+ text?: string;
6
+ html?: string;
7
+ }
8
+ /** Provider-agnostic email dispatch service */
9
+ export interface MailerService extends InitializedService {
10
+ send: (message: MailMessage) => Promise<void>;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,+CAA+C;AAC/C,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9C"}
package/build/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@owlmeans/mailer",
3
+ "version": "0.1.5",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsc -b",
8
+ "dev": "sleep 2 && nodemon -e ts,tsx,json --watch src --exec \"tsc -p ./tsconfig.json\"",
9
+ "watch": "tsc -b -w --preserveWatchOutput --pretty",
10
+ "test": "bun test ./tests"
11
+ },
12
+ "main": "build/index.js",
13
+ "module": "build/index.js",
14
+ "types": "build/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./build/index.js",
18
+ "require": "./build/index.js",
19
+ "default": "./build/index.js",
20
+ "module": "./build/index.js",
21
+ "types": "./build/index.d.ts"
22
+ }
23
+ },
24
+ "dependencies": {
25
+ "@owlmeans/context": "^0.1.5",
26
+ "@owlmeans/error": "^0.1.5"
27
+ },
28
+ "devDependencies": {
29
+ "@owlmeans/dep-config": "workspace:*",
30
+ "@types/bun": "^1.3.0",
31
+ "nodemon": "^3.1.11",
32
+ "npm-check": "^6.0.1",
33
+ "typescript": "^6.0.2"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ }
38
+ }
package/src/consts.ts ADDED
@@ -0,0 +1 @@
1
+ export const MAILER_SERVICE = 'mailer-service'
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type * from './types.js'
2
+ export * from './consts.js'
package/src/types.ts ADDED
@@ -0,0 +1,13 @@
1
+ import type { InitializedService } from '@owlmeans/context'
2
+
3
+ export interface MailMessage {
4
+ to: string
5
+ subject: string
6
+ text?: string
7
+ html?: string
8
+ }
9
+
10
+ /** Provider-agnostic email dispatch service */
11
+ export interface MailerService extends InitializedService {
12
+ send: (message: MailMessage) => Promise<void>
13
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": ["@owlmeans/dep-config/tsconfig.base.json"],
3
+ "compilerOptions": {
4
+ "rootDir": "./src/",
5
+ "outDir": "./build/"
6
+ },
7
+ "exclude": ["./dist/**/*", "./build/**/*", "./tests/**/*", "./*.ts"]
8
+ }