Skip to content

Commit 7c130f6

Browse files
committed
fix(): publish action
1 parent 22ba62b commit 7c130f6

18 files changed

+70
-39
lines changed

.github/workflows/publisher.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
npm-publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '16.x'
13+
registry-url: 'https://registry.npmjs.org'
14+
- run: npm ci
15+
- run: npm run publish:npm
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }}

lib/channels/fcm/firebase-cloud-messaging-channel.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NestJsNotify } from "../../interfaces";
1+
import { NestJsNotify } from '../../interfaces';
22

33
export interface IFirebaseCloudMessagingChannel extends NestJsNotify {
44
/**
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
3-
import { IFirebaseCloudMessagingChannel } from "./firebase-cloud-messaging-channel.interface";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
3+
import { IFirebaseCloudMessagingChannel } from './firebase-cloud-messaging-channel.interface';
44

55
@Injectable()
66
export class FirebaseCloudMessagingChannel implements INestjsNotifyChannel {
77
constructor() {
88
//
99
}
1010

11-
public async send(notification: IFirebaseCloudMessagingChannel): Promise<any> {
11+
public async send(
12+
notification: IFirebaseCloudMessagingChannel,
13+
): Promise<any> {
1214
return Promise.resolve(undefined);
1315
}
1416
}

lib/channels/nexmo/nexmo.channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
33

44
@Injectable()
55
export class NexmoChannel implements INestjsNotifyChannel {

lib/channels/sendgrid/sendgrid.channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
33

44
@Injectable()
55
export class SendgridChannel implements INestjsNotifyChannel {

lib/channels/slack/slack.channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
33

44
@Injectable()
55
export class SlackChannel implements INestjsNotifyChannel {

lib/channels/telegram/telegram-channel.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NestJsNotify } from "../../interfaces";
1+
import { NestJsNotify } from '../../interfaces';
22

33
/** Telegram channel model
44
* @interface ITelegramChannel

lib/channels/telegram/telegram.channel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
3-
import { ITelegramChannel } from "./telegram-channel.interface";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
3+
import { ITelegramChannel } from './telegram-channel.interface';
44

55
@Injectable()
66
export class TelegramChannel implements INestjsNotifyChannel {

lib/channels/twilio/twilio.channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
33

44
@Injectable()
55
export class TwilioChannel implements INestjsNotifyChannel {

lib/channels/twitter/twitter.channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { INestjsNotifyChannel } from "../../interfaces";
1+
import { Injectable } from '@nestjs/common';
2+
import { INestjsNotifyChannel } from '../../interfaces';
33

44
@Injectable()
55
export class TwitterChannel implements INestjsNotifyChannel {

lib/channels/webhook/webhook-channel.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NestJsNotify } from "../../interfaces";
1+
import { NestJsNotify } from '../../interfaces';
22

33
/**
44
* Webhook channel model
@@ -19,4 +19,4 @@ export interface IWebhookChannel extends NestJsNotify {
1919
* @returns {any} http payload data
2020
*/
2121
toWebhook?(): any;
22-
}
22+
}

lib/channels/webhook/webhook.channel.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Injectable } from "@nestjs/common";
2-
import { HttpService } from "@nestjs/axios";
1+
import { Injectable } from '@nestjs/common';
2+
import { HttpService } from '@nestjs/axios';
33
import { AxiosResponse } from 'axios';
4-
import { IWebhookChannel } from "./webhook-channel.interface";
5-
import { INestjsNotifyChannel } from "../../interfaces";
4+
import { IWebhookChannel } from './webhook-channel.interface';
5+
import { INestjsNotifyChannel } from '../../interfaces';
66

77
@Injectable()
88
export class WebhookChannel implements INestjsNotifyChannel {
@@ -18,7 +18,9 @@ export class WebhookChannel implements INestjsNotifyChannel {
1818
* @param {IWebhookChannel} notification
1919
* @return Promise<AxiosResponse<any>>
2020
*/
21-
public async send(notification: IWebhookChannel): Promise<AxiosResponse<any>> {
21+
public async send(
22+
notification: IWebhookChannel,
23+
): Promise<AxiosResponse<any>> {
2224
return Promise.resolve(undefined);
2325
}
2426
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const NESTJS_NOTIFY_OPTIONS = 'NESTJS_NOTIFY_OPTIONS';
1+
export const NESTJS_NOTIFY_OPTIONS = 'NESTJS_NOTIFY_OPTIONS';

lib/interfaces/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './nestjs-notify.interface';
22
export * from './nestjs-notify-module.interface';
3-
export * from './nestjs-notify-channel.interface'
3+
export * from './nestjs-notify-channel.interface';

lib/interfaces/nestjs-notify-channel.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NestJsNotify } from "./nestjs-notify.interface";
1+
import { NestJsNotify } from './nestjs-notify.interface';
22

33
/**
44
* @interface INestjsNotifyChannel
@@ -11,4 +11,4 @@ export interface INestjsNotifyChannel {
1111
* @return Promise<any>
1212
*/
1313
send(notification: NestJsNotify): Promise<any>;
14-
}
14+
}

lib/interfaces/nestjs-notify-module.interface.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
* @interface NestjsNotifyModuleOptionsFactory
33
* @property createNestjsNotifyOptions()
44
*/
5-
import { ModuleMetadata, Provider, Type } from "@nestjs/common";
5+
import { ModuleMetadata, Provider, Type } from '@nestjs/common';
66

77
/**
88
* @interface NestjsNotifyModuleOptionsFactory
99
* @property createNestjsNotifyOptions()
1010
*/
1111
export interface NestjsNotifyModuleOptionsFactory {
12-
createNestjsNotifyOptions(): Promise<NestjsNotifyModuleOptions> | NestjsNotifyModuleOptions;
12+
createNestjsNotifyOptions():
13+
| Promise<NestjsNotifyModuleOptions>
14+
| NestjsNotifyModuleOptions;
1315
}
1416

1517
/**
@@ -35,4 +37,4 @@ export interface NestjsNotifyModuleAsyncOptions
3537
/**
3638
* @interface NestjsNotifyModuleOptions
3739
*/
38-
export interface NestjsNotifyModuleOptions {}
40+
export interface NestjsNotifyModuleOptions {}

lib/interfaces/nestjs-notify.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Type } from '@nestjs/common';
2-
import { INestjsNotifyChannel } from "./nestjs-notify-channel.interface";
2+
import { INestjsNotifyChannel } from './nestjs-notify-channel.interface';
33

44
/**
55
* @interface NestJsNotify
@@ -16,4 +16,4 @@ export interface NestJsNotify {
1616
* @returns json
1717
*/
1818
toPayload?(): Record<string, any>;
19-
}
19+
}

package.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"name": "nestjs-notify",
2+
"name": "@sinuos/nestjs-notification",
33
"version": "0.0.0",
4-
"description": "",
5-
"author": "",
4+
"description": "NestJS notification based on channel",
65
"license": "MIT",
76
"keywords": [
87
"nest",
@@ -70,9 +69,18 @@
7069
"lint-staged": {
7170
"**/*": "pretty-quick --staged"
7271
},
72+
"author": {
73+
"name": "Houssene Dao",
74+
"email": "[email protected]",
75+
"url": "https://twitter.com/houssenedao"
76+
},
77+
"homepage": "https://github.com/sinuoslabs/nestjs-notification#readme",
78+
"bugs": {
79+
"url": "https://github.com/sinuoslabs/nestjs-notification/issues"
80+
},
7381
"repository": {
7482
"type": "git",
75-
"url": "https://github.com/themartiangeeks/nestjs-notify"
83+
"url": "https://github.com/sinuoslabs/nestjs-notification"
7684
},
7785
"jest": {
7886
"moduleFileExtensions": [

0 commit comments

Comments
 (0)