Skip to content

Commit c3957ca

Browse files
committed
chore(): nestjs notify process
1 parent 7c130f6 commit c3957ca

13 files changed

+203
-261
lines changed

.eslintignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
src/**/*.test.ts
2-
src/**/files/**
1+
lib/**/*.test.ts
2+
lib/**/files/**
3+
lib/channels/**
34
test/**
4-
*.spec.ts
5+
*.spec.ts

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Please check if your PR fulfills the following requirements:
55
- [ ] Tests for the changes have been added (for bug fixes / features)
66
- [ ] Docs have been added / updated (for bug fixes / features)
77

8-
98
## PR Type
109
What kind of change does this PR introduce?
1110

1211
<!-- Please check the one that applies to this PR using "x". -->
12+
1313
```
1414
[ ] Bugfix
1515
[ ] Feature
@@ -25,7 +25,6 @@ What kind of change does this PR introduce?
2525

2626
Issue Number: N/A
2727

28-
2928
## What is the new behavior?
3029

3130

@@ -37,5 +36,4 @@ Issue Number: N/A
3736

3837
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
3938

40-
41-
## Other information
39+
## Other information

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"singleQuote": true,
33
"trailingComma": "all"
4-
}
4+
}

CONTRIBUTING.md

Lines changed: 1 addition & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Nest
22

3-
We would love for you to contribute to Nest and help make it even better than it is
3+
We would love for you to contribute to NestJS Notify and help make it even better than it is
44
today! As a contributor, here are the guidelines we would like you to follow:
55

66
- [Code of Conduct](#coc)
@@ -10,244 +10,3 @@ today! As a contributor, here are the guidelines we would like you to follow:
1010
- [Submission Guidelines](#submit)
1111
- [Coding Rules](#rules)
1212
- [Commit Message Guidelines](#commit)
13-
<!-- - [Signing the CLA](#cla) -->
14-
15-
<!-- ## <a name="coc"></a> Code of Conduct
16-
Help us keep Nest open and inclusive. Please read and follow our [Code of Conduct][coc]. -->
17-
18-
## <a name="question"></a> Got a Question or Problem?
19-
20-
**Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.** You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/nestjs) where the questions should be tagged with tag `nestjs`.
21-
22-
Stack Overflow is a much better place to ask questions since:
23-
24-
<!-- - there are thousands of people willing to help on Stack Overflow [maybe one day] -->
25-
- questions and answers stay available for public viewing so your question / answer might help someone else
26-
- Stack Overflow's voting system assures that the best answers are prominently visible.
27-
28-
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
29-
30-
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
31-
32-
## <a name="issue"></a> Found a Bug?
33-
If you find a bug in the source code, you can help us by
34-
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can
35-
[submit a Pull Request](#submit-pr) with a fix.
36-
37-
## <a name="feature"></a> Missing a Feature?
38-
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
39-
Repository. If you would like to *implement* a new feature, please submit an issue with
40-
a proposal for your work first, to be sure that we can use it.
41-
Please consider what kind of change it is:
42-
43-
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
44-
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
45-
and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
46-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
47-
48-
## <a name="submit"></a> Submission Guidelines
49-
50-
### <a name="submit-issue"></a> Submitting an Issue
51-
52-
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
53-
54-
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using a repository or [Gist](https://gist.github.com/). Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
55-
56-
- version of NestJS used
57-
- 3rd-party libraries and their versions
58-
- and most importantly - a use-case that fails
59-
60-
<!--
61-
// TODO we need to create a playground, similar to plunkr
62-
63-
A minimal reproduce scenario using a repository or Gist allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If neither of these are not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem. -->
64-
65-
<!-- We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. -->
66-
67-
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
68-
69-
You can file new issues by filling out our [new issue form](https://github.com/nestjs/nest/issues/new).
70-
71-
72-
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
73-
Before you submit your Pull Request (PR) consider the following guidelines:
74-
75-
1. Search [GitHub](https://github.com/nestjs/nest/pulls) for an open or closed PR
76-
that relates to your submission. You don't want to duplicate effort.
77-
<!-- 1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
78-
We cannot accept code without this. -->
79-
1. Fork the nestjs/nest repo.
80-
1. Make your changes in a new git branch:
81-
82-
```shell
83-
git checkout -b my-fix-branch master
84-
```
85-
86-
1. Create your patch, **including appropriate test cases**.
87-
1. Follow our [Coding Rules](#rules).
88-
1. Run the full Nest test suite, as described in the [developer documentation][dev-doc],
89-
and ensure that all tests pass.
90-
1. Commit your changes using a descriptive commit message that follows our
91-
[commit message conventions](#commit). Adherence to these conventions
92-
is necessary because release notes are automatically generated from these messages.
93-
94-
```shell
95-
git commit -a
96-
```
97-
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
98-
99-
1. Push your branch to GitHub:
100-
101-
```shell
102-
git push origin my-fix-branch
103-
```
104-
105-
1. In GitHub, send a pull request to `nestjs:master`.
106-
* If we suggest changes then:
107-
* Make the required updates.
108-
* Re-run the Nest test suites to ensure tests are still passing.
109-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
110-
111-
```shell
112-
git rebase master -i
113-
git push -f
114-
```
115-
116-
That's it! Thank you for your contribution!
117-
118-
#### After your pull request is merged
119-
120-
After your pull request is merged, you can safely delete your branch and pull the changes
121-
from the main (upstream) repository:
122-
123-
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
124-
125-
```shell
126-
git push origin --delete my-fix-branch
127-
```
128-
129-
* Check out the master branch:
130-
131-
```shell
132-
git checkout master -f
133-
```
134-
135-
* Delete the local branch:
136-
137-
```shell
138-
git branch -D my-fix-branch
139-
```
140-
141-
* Update your master with the latest upstream version:
142-
143-
```shell
144-
git pull --ff upstream master
145-
```
146-
147-
## <a name="rules"></a> Coding Rules
148-
To ensure consistency throughout the source code, keep these rules in mind as you are working:
149-
150-
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
151-
<!--
152-
// We're working on auto-documentation.
153-
* All public API methods **must be documented**. (Details TBC). -->
154-
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
155-
**100 characters**. An automated formatter is available, see
156-
[DEVELOPER.md](docs/DEVELOPER.md#clang-format).
157-
158-
## <a name="commit"></a> Commit Message Guidelines
159-
160-
We have very precise rules over how our git commit messages can be formatted. This leads to **more
161-
readable messages** that are easy to follow when looking through the **project history**. But also,
162-
we use the git commit messages to **generate the Nest change log**.
163-
164-
### Commit Message Format
165-
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
166-
format that includes a **type**, a **scope** and a **subject**:
167-
168-
```
169-
<type>(<scope>): <subject>
170-
<BLANK LINE>
171-
<body>
172-
<BLANK LINE>
173-
<footer>
174-
```
175-
176-
The **header** is mandatory and the **scope** of the header is optional.
177-
178-
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
179-
to read on GitHub as well as in various git tools.
180-
181-
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
182-
183-
Samples: (even more [samples](https://github.com/nestjs/nest/commits/master))
184-
185-
```
186-
docs(changelog) update change log to beta.5
187-
```
188-
```
189-
fix(@nestjs/core) need to depend on latest rxjs and zone.js
190-
191-
The version in our package.json gets copied to the one we publish, and users need the latest of these.
192-
```
193-
194-
### Revert
195-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
196-
197-
### Type
198-
Must be one of the following:
199-
200-
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
201-
* **chore**: Updating tasks etc; no production code change
202-
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
203-
* **docs**: Documentation only changes
204-
* **feat**: A new feature
205-
* **fix**: A bug fix
206-
* **perf**: A code change that improves performance
207-
* **refactor**: A code change that neither fixes a bug nor adds a feature
208-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
209-
* **test**: Adding missing tests or correcting existing tests
210-
211-
212-
### Subject
213-
The subject contains succinct description of the change:
214-
215-
* use the imperative, present tense: "change" not "changed" nor "changes"
216-
* don't capitalize first letter
217-
* no dot (.) at the end
218-
219-
### Body
220-
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
221-
The body should include the motivation for the change and contrast this with previous behavior.
222-
223-
### Footer
224-
The footer should contain any information about **Breaking Changes** and is also the place to
225-
reference GitHub issues that this commit **Closes**.
226-
227-
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
228-
229-
A detailed explanation can be found in this [document][commit-message-format].
230-
231-
<!-- ## <a name="cla"></a> Signing the CLA
232-
233-
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
234-
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
235-
236-
* For individuals we have a [simple click-through form][individual-cla].
237-
* For corporations we'll need you to
238-
[print, sign and one of scan+email, fax or mail the form][corporate-cla]. -->
239-
240-
241-
<!-- [angular-group]: https://groups.google.com/forum/#!forum/angular -->
242-
<!-- [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md -->
243-
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
244-
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
245-
[dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
246-
[github]: https://github.com/nestjs/nest
247-
[gitter]: https://gitter.im/nestjs/nest
248-
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
249-
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
250-
[jsfiddle]: http://jsfiddle.net
251-
[plunker]: http://plnkr.co/edit
252-
[runnable]: http://runnable.com
253-
<!-- [stackoverflow]: http://stackoverflow.com/questions/tagged/angular -->

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#NesJS Notify
1+
#NesJS Notify

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './dist';

index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use strict';
2+
var __createBinding =
3+
(this && this.__createBinding) ||
4+
(Object.create
5+
? function (o, m, k, k2) {
6+
if (k2 === undefined) k2 = k;
7+
Object.defineProperty(o, k2, {
8+
enumerable: true,
9+
get: function () {
10+
return m[k];
11+
},
12+
});
13+
}
14+
: function (o, m, k, k2) {
15+
if (k2 === undefined) k2 = k;
16+
o[k2] = m[k];
17+
});
18+
var __exportStar =
19+
(this && this.__exportStar) ||
20+
function (m, exports) {
21+
for (var p in m)
22+
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
23+
__createBinding(exports, m, p);
24+
};
25+
exports.__esModule = true;
26+
__exportStar(require('./dist'), exports);

lib/channels/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

lib/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
<<<<<<< HEAD
2+
=======
3+
export * from './interfaces';
4+
>>>>>>> chore(): nestjs notify process
15
export * from './nestjs-notify.module';
26
export * from './nestjs-notify.service';

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* @interface NestjsNotifyModuleOptionsFactory
3-
* @property createNestjsNotifyOptions()
4-
*/
51
import { ModuleMetadata, Provider, Type } from '@nestjs/common';
62

73
/**
@@ -37,4 +33,6 @@ export interface NestjsNotifyModuleAsyncOptions
3733
/**
3834
* @interface NestjsNotifyModuleOptions
3935
*/
40-
export interface NestjsNotifyModuleOptions {}
36+
export interface NestjsNotifyModuleOptions {
37+
queue?: any;
38+
}

lib/interfaces/nestjs-notify.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface NestJsNotify {
99
* Get the channels the notification should broadcast on.
1010
* @returns {Type<INestjsNotifyChannel>[]} array
1111
*/
12-
broadcastOn(): Type<INestjsNotifyChannel>[];
12+
sendToChannels(): Type<INestjsNotifyChannel>[];
1313

1414
/**
1515
* Get the json representation of the notification.

0 commit comments

Comments
 (0)