├── .commitlintrc.json
├── .eslintignore
├── .eslintrc.js
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ ├── feature_request.yml
│ └── regression.yml
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── changelog.yml
│ ├── publisher.yml
│ └── release.yml
├── .gitignore
├── .husky
├── commit-msg
└── pre-commit
├── .prettierrc
├── .releaserc.js
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.yml
├── LICENSE
├── README.md
├── SECURITY.md
├── index.d.ts
├── index.js
├── index.ts
├── lib
├── channels
│ └── .gitignore
├── constants
│ ├── index.ts
│ └── nestjs-notification-provider.constant.ts
├── index.ts
├── interfaces
│ ├── index.ts
│ ├── nestjs-notification-channel.interface.ts
│ ├── nestjs-notification-module.interface.ts
│ └── nestjs-notification.interface.ts
├── nestjs-notification.module.ts
└── nestjs-notification.service.ts
├── package-lock.json
├── package.json
├── renovate.json
├── test
└── jest-e2e.json
└── tsconfig.json
/.commitlintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@commitlint/config-angular"],
3 | "rules": {
4 | "subject-case": [
5 | 2,
6 | "always",
7 | ["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
8 | ],
9 | "type-enum": [
10 | 2,
11 | "always",
12 | [
13 | "build",
14 | "chore",
15 | "ci",
16 | "docs",
17 | "feat",
18 | "fix",
19 | "perf",
20 | "refactor",
21 | "style",
22 | "test",
23 | "revert",
24 | "BREAKING CHANGE"
25 | ]
26 | ]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | lib/**/*.test.ts
2 | lib/**/files/**
3 | lib/channels/**
4 | test/**
5 | *.spec.ts
6 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | parser: '@typescript-eslint/parser',
3 | parserOptions: {
4 | project: 'tsconfig.json',
5 | sourceType: 'module',
6 | },
7 | plugins: ['@typescript-eslint/eslint-plugin'],
8 | extends: [
9 | 'plugin:@typescript-eslint/recommended',
10 | 'plugin:prettier/recommended',
11 | ],
12 | root: true,
13 | env: {
14 | node: true,
15 | jest: true,
16 | },
17 | ignorePatterns: ['.eslintrc.js'],
18 | rules: {
19 | '@typescript-eslint/interface-name-prefix': 'off',
20 | '@typescript-eslint/explicit-function-return-type': 'off',
21 | '@typescript-eslint/explicit-module-boundary-types': 'off',
22 | '@typescript-eslint/no-explicit-any': 'off',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: "\U0001F41B Bug Report"
2 | description: "If something ins't working as expected \U0001F914"
3 | labels: ['bug']
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | ## :warning: We use GitHub Issues to track bug reports, feature requests and regressions
9 |
10 | If you are not sure that your issue is a bug, you could:
11 |
12 | - use [StackOverflow using the tag `nestjs-notification`](https://stackoverflow.com/questions/tagged/nestjs-notification)
13 |
14 | **NOTE:** You don't need to answer questions that you know that aren't relevant.
15 |
16 | ---
17 |
18 | - type: checkboxes
19 | attributes:
20 | label: 'Is there an existing issue for this?'
21 | description: 'Please search [here](./?q=is%3Aissue) to see if an issue already exists for the bug you encountered'
22 | options:
23 | - label: 'I have searched the existing issues'
24 | required: true
25 |
26 | - type: textarea
27 | validations:
28 | required: true
29 | attributes:
30 | label: 'Current behavior'
31 | description: 'How the issue manifests?'
32 |
33 | - type: input
34 | validations:
35 | required: true
36 | attributes:
37 | label: 'Minimum reproduction code'
38 | description: 'An URL to some git repository or gist that reproduces this issue. [Wtf is a minimum reproduction?](https://jmcdo29.github.io/wtf-is-a-minimum-reproduction)'
39 | placeholder: 'https://github.com/...'
40 |
41 | - type: textarea
42 | attributes:
43 | label: 'Steps to reproduce'
44 | description: |
45 | How the issue manifests?
46 | You could leave this blank if you alread write this in your reproduction code/repo
47 | placeholder: |
48 | 1. `npm i`
49 | 2. `npm build`
50 | 3. See error...
51 | - type: textarea
52 | validations:
53 | required: true
54 | attributes:
55 | label: 'Expected behavior'
56 | description: 'A clear and concise description of what you expected to happend (or code)'
57 |
58 | - type: markdown
59 | attributes:
60 | value: |
61 | ---
62 | - type: input
63 | validations:
64 | required: true
65 | attributes:
66 | label: 'Package version'
67 | description: |
68 | Which version of `@sinuos/nestjs-notification` are you using?
69 | **Tip**: Make sure that all of yours `@sinuos/*` dependencies are in sync!
70 | placeholder: '8.1.3'
71 |
72 | - type: input
73 | attributes:
74 | label: 'Node.js version'
75 | description: 'Which version of Node.js are you using?'
76 | placeholder: '14.17.6'
77 |
78 | - type: checkboxes
79 | attributes:
80 | label: 'In which operating systems have you tested?'
81 | options:
82 | - label: macOS
83 | - label: Windows
84 | - label: Linux
85 |
86 | - type: markdown
87 | attributes:
88 | value: |
89 | ---
90 | - type: textarea
91 | attributes:
92 | label: 'Other'
93 | description: |
94 | Anything else relevant? eg: Logs, OS version, IDE, package manager, etc.
95 | **Tip:** You can attach images, recordings or log files by clicking this area to highlight it and then dragging files in
96 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | ## To encourage contributors to use issue templates, we don't allow blank issues
2 | blank_issues_enabled: false
3 |
4 | contact_links:
5 | - name: "\u2753 Slack Community of NestJS"
6 | url: 'https://slack.com/sinuoslabs'
7 | about: 'Please ask support questions or discuss suggestions/enhancements here.'
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: "\U0001F680 Feature Request"
2 | description: "I have a suggestion \U0001F63B!"
3 | labels: ['feature']
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | ## :warning: We use GitHub Issues to track bug reports, feature requests and regressions
9 |
10 | If you are not sure that your issue is a bug, you could:
11 |
12 | - use [StackOverflow using the tag `nestjs-notification`](https://stackoverflow.com/questions/tagged/nestjs-notification)
13 |
14 | ---
15 |
16 | - type: checkboxes
17 | attributes:
18 | label: 'Is there an existing issue that is already proposing this?'
19 | description: 'Please search [here](./?q=is%3Aissue) to see if an issue already exists for the feature you are requesting'
20 | options:
21 | - label: 'I have searched the existing issues'
22 | required: true
23 |
24 | - type: textarea
25 | validations:
26 | required: true
27 | attributes:
28 | label: 'Is your feature request related to a problem? Please describe it'
29 | description: 'A clear and concise description of what the problem is'
30 | placeholder: |
31 | I have an issue when ...
32 | - type: textarea
33 | validations:
34 | required: true
35 | attributes:
36 | label: "Describe the solution you'd like"
37 | description: 'A clear and concise description of what you want to happen. Add any considered drawbacks'
38 |
39 | - type: textarea
40 | attributes:
41 | label: 'Teachability, documentation, adoption, migration strategy'
42 | description: 'If you can, explain how users will be able to use this and possibly write out a version the docs. Maybe a screenshot or design?'
43 |
44 | - type: textarea
45 | validations:
46 | required: true
47 | attributes:
48 | label: 'What is the motivation / use case for changing the behavior?'
49 | description: 'Describe the motivation or the concrete use case'
50 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/regression.yml:
--------------------------------------------------------------------------------
1 | name: "\U0001F4A5 Regression"
2 | description: 'Report an unexpected behavior while upgrading your Nest application!'
3 | labels: ['needs triage']
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | ## :warning: We use GitHub Issues to track bug reports, feature requests and regressions
9 |
10 | If you are not sure that your issue is a bug, you could:
11 |
12 | - use [StackOverflow using the tag `nestjs-notification`](https://stackoverflow.com/questions/tagged/nestjs-notification)
13 |
14 | **NOTE:** You don't need to answer questions that you know that aren't relevant.
15 |
16 | ---
17 |
18 | - type: checkboxes
19 | attributes:
20 | label: 'Is there an existing issue that is already proposing this?'
21 | description: 'Please search [here](./?q=is%3Aissue) to see if an issue already exists for the feature you are requesting'
22 | options:
23 | - label: 'I have searched the existing issues'
24 | required: true
25 |
26 | - type: input
27 | attributes:
28 | label: 'Potential Commit/PR that introduced the regression'
29 | description: 'If you have time to investigate, what PR/date/version introduced this issue'
30 | placeholder: 'PR #123 or commit 5b3c4a4'
31 |
32 | - type: input
33 | attributes:
34 | label: 'Versions'
35 | description: 'From which version of `@nestjs-notification/axios` to which version you are upgrading'
36 | placeholder: '8.1.0 -> 8.1.3'
37 |
38 | - type: textarea
39 | validations:
40 | required: true
41 | attributes:
42 | label: 'Describe the regression'
43 | description: 'A clear and concise description of what the regression is'
44 |
45 | - type: textarea
46 | attributes:
47 | label: 'Minimum reproduction code'
48 | description: |
49 | Please share a git repo, a gist, or step-by-step instructions. [Wtf is a minimum reproduction?](https://jmcdo29.github.io/wtf-is-a-minimum-reproduction)
50 | **Tip:** If you leave a minimum repository, we will understand your issue faster!
51 | value: |
52 | ```ts
53 |
54 | ```
55 |
56 | - type: textarea
57 | validations:
58 | required: true
59 | attributes:
60 | label: 'Expected behavior'
61 | description: 'A clear and concise description of what you expected to happend (or code)'
62 |
63 | - type: textarea
64 | attributes:
65 | label: 'Other'
66 | description: |
67 | Anything else relevant? eg: Logs, OS version, IDE, package manager, etc.
68 | **Tip:** You can attach images, recordings or log files by clicking this area to highlight it and then dragging files in
69 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## PR Checklist
2 |
3 | Please check if your PR fulfills the following requirements:
4 |
5 | - [ ] The commit message follows our guidelines: https://github.com/sinuoslabs/nestjs-notification/blob/main/CONTRIBUTING.md
6 | - [ ] Tests for the changes have been added (for bug fixes / features)
7 | - [ ] Docs have been added / updated (for bug fixes / features)
8 |
9 | ## PR Type
10 |
11 | What kind of change does this PR introduce?
12 |
13 |
14 |
15 | ```
16 | [ ] Bugfix
17 | [ ] Feature
18 | [ ] Code style update (formatting, local variables)
19 | [ ] Refactoring (no functional changes, no api changes)
20 | [ ] Build related changes
21 | [ ] CI related changes
22 | [ ] Other... Please describe:
23 | ```
24 |
25 | ## What is the current behavior?
26 |
27 |
28 |
29 | Issue Number: N/A
30 |
31 | ## What is the new behavior?
32 |
33 | ## Does this PR introduce a breaking change?
34 |
35 | ```
36 | [ ] Yes
37 | [ ] No
38 | ```
39 |
40 |
41 |
42 | ## Other information
43 |
--------------------------------------------------------------------------------
/.github/workflows/changelog.yml:
--------------------------------------------------------------------------------
1 | name: Changelog
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | generate_changelog:
9 | runs-on: ubuntu-latest
10 | name: Generate changelog for master branch
11 | steps:
12 | - uses: actions/checkout@v3
13 |
14 | - name: Generate changelog
15 | uses: charmixer/auto-changelog-action@v1
16 | with:
17 | token: ${{ secrets.GH_TOKEN }}
18 |
19 | - name: Commit files
20 | env:
21 | CI_USER: ${{ secrets.GH_USER }}
22 | CI_EMAIL: ${{ secrets.GH_EMAIL }}
23 | run: |
24 | git config --local user.email "$CI_EMAIL"
25 | git config --local user.name "$CI_USER"
26 | git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo "push=true" >> $GITHUB_ENV || echo "No changes to CHANGELOG.md"
27 |
28 | - name: Push changes
29 | if: env.push == 'true'
30 | env:
31 | CI_USER: ${{ secrets.GH_USER }}
32 | CI_TOKEN: ${{ secrets.GH_TOKEN }}
33 | run: |
34 | git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:main
35 |
--------------------------------------------------------------------------------
/.github/workflows/publisher.yml:
--------------------------------------------------------------------------------
1 | name: Publish Package
2 | on:
3 | release:
4 | types: [created]
5 | jobs:
6 | npm-publish:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | - uses: actions/setup-node@v3
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 }}
18 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: RELEASER
2 |
3 | on:
4 | push:
5 | branches: [main]
6 |
7 | jobs:
8 | Realeaser:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout source code
12 | uses: actions/checkout@v3
13 |
14 | - name: Use NodeJS v16
15 | uses: actions/setup-node@v3
16 | with:
17 | node-version: 16
18 |
19 | - name: Install dependencies
20 | run: npm ci
21 |
22 | - name: Create new release
23 | env:
24 | GH_TOKEN: ${{secrets.GH_TOKEN}}
25 | run: npx semantic-release
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # compiled output
2 | /dist
3 | /node_modules
4 |
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 | lerna-debug.log*
12 |
13 | # OS
14 | .DS_Store
15 |
16 | # Tests
17 | /coverage
18 | /.nyc_output
19 |
20 | # IDEs and editors
21 | /.idea
22 | .project
23 | .classpath
24 | .c9/
25 | *.launch
26 | .settings/
27 | *.sublime-workspace
28 |
29 | # IDE - VSCode
30 | .vscode/*
31 | !.vscode/settings.json
32 | !.vscode/tasks.json
33 | !.vscode/launch.json
34 | !.vscode/extensions.json
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx --no-install commitlint --edit ""
5 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx lint-staged
5 | npm run lint
6 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "all",
4 | "printWidth": 100
5 | }
6 |
--------------------------------------------------------------------------------
/.releaserc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | '@semantic-release/commit-analyzer',
4 | '@semantic-release/github',
5 | [
6 | '@semantic-release/npm',
7 | {
8 | npmPublish: false,
9 | },
10 | ],
11 | ['@semantic-release/release-notes-generator'],
12 | [
13 | '@semantic-release/git',
14 | {
15 | assets: ['package.json'],
16 | message: 'chore(release): release ${nextRelease.version}',
17 | },
18 | ],
19 | ],
20 | branches: ['main'],
21 | preset: 'angular',
22 | };
23 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | dao.houssene[at]gmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Nest
2 |
3 | We would love for you to contribute to NestJS notification and help make it even better than it is
4 | today! As a contributor, here are the guidelines we would like you to follow:
5 |
6 | - [Code of Conduct](#coc)
7 | - [Question or Problem?](#question)
8 | - [Issues and Bugs](#issue)
9 | - [Feature Requests](#feature)
10 | - [Submission Guidelines](#submit)
11 | - [Coding Rules](#rules)
12 | - [Commit Message Guidelines](#commit)
13 |
14 | ## Code of Conduct
15 |
16 | Help us keep Nest open and inclusive. Please read and follow our [Code of Conduct][coc].
17 |
18 | ## 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][stackoverflow] where the questions should be tagged with tag `nestjs-notification`.
21 |
22 | Stack Overflow is a much better place to ask questions since:
23 |
24 | - questions and answers stay available for public viewing, so your question / answer might help someone else
25 | - Stack Overflow's voting system assures that the best answers are prominently visible.
26 |
27 | To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
28 |
29 | ## Found a Bug?
30 |
31 | If you find a bug in the source code, you can help us by
32 | [submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can
33 | [submit a Pull Request](#submit-pr) with a fix.
34 |
35 | ## Missing a Feature?
36 |
37 | You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
38 | Repository. If you would like to _implement_ a new feature, please submit an issue with
39 | a proposal for your work first, to be sure that we can use it.
40 | Please consider what kind of change it is:
41 |
42 | - For a **Major Feature**, first open an issue and outline your proposal so that it can be
43 | discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
44 | 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".
45 | - **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
46 |
47 | ## Submission Guidelines
48 |
49 | ### Submitting an Issue
50 |
51 | 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.
52 |
53 | 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:
54 |
55 | - version of NestJS notification used
56 | - 3rd-party libraries and their versions
57 | - and most importantly - a use-case that fails
58 |
59 | 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.
60 |
61 | You can file new issues by filling out our [new issue form](https://github.com/sinuoslabs/nestjs-notification/issues/new).
62 |
63 | ### Submitting a Pull Request (PR)
64 |
65 | Before you submit your Pull Request (PR) consider the following guidelines:
66 |
67 | 1. Search [GitHub](https://github.com/sinuoslabs/nestjs-notification/pulls) for an open or closed PR
68 | that relates to your submission. You don't want to duplicate effort.
69 | 1. Fork the sinuoslabs/nestjs-notification repo.
70 | 1. Make your changes in a new git branch:
71 |
72 | ```shell
73 | git checkout -b my-fix-branch main
74 | ```
75 |
76 | 1. Create your patch, **including appropriate test cases**.
77 | 1. Follow our [Coding Rules](#rules).
78 | 1. Commit your changes using a descriptive commit message that follows our
79 | [commit message conventions](#commit). Adherence to these conventions
80 | is necessary because release notes are automatically generated from these messages.
81 |
82 | ```shell
83 | git commit -a
84 | ```
85 |
86 | Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
87 |
88 | 1. Push your branch to GitHub:
89 |
90 | ```shell
91 | git push origin my-fix-branch
92 | ```
93 |
94 | 1. In GitHub, send a pull request to `nestjs-notification:main`.
95 |
96 | - If we suggest changes then:
97 |
98 | - Make the required updates.
99 | - Re-run the Nest test suites to ensure tests are still passing.
100 | - Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
101 |
102 | ```shell
103 | git rebase main -i
104 | git push -f
105 | ```
106 |
107 | That's it! Thank you for your contribution!
108 |
109 | #### After your pull request is merged
110 |
111 | After your pull request is merged, you can safely delete your branch and pull the changes
112 | from the main (upstream) repository:
113 |
114 | - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
115 |
116 | ```shell
117 | git push origin --delete my-fix-branch
118 | ```
119 |
120 | - Check out the main branch:
121 |
122 | ```shell
123 | git checkout main -f
124 | ```
125 |
126 | - Delete the local branch:
127 |
128 | ```shell
129 | git branch -D my-fix-branch
130 | ```
131 |
132 | - Update your main with the latest upstream version:
133 |
134 | ```shell
135 | git pull --ff upstream main
136 | ```
137 |
138 | ## Coding Rules
139 |
140 | To ensure consistency throughout the source code, keep these rules in mind as you are working:
141 |
142 | - All features or bug fixes **must be tested** by one or more specs (unit-tests).
143 | - We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
144 | **100 characters**. An automated formatter is available.
145 |
146 | ## Commit Message Guidelines
147 |
148 | We have very precise rules over how our git commit messages can be formatted. This leads to **more
149 | readable messages** that are easy to follow when looking through the **project history**. But also,
150 | we use the git commit messages to **generate the NestJS notification change log**.
151 |
152 | ### Commit Message Format
153 |
154 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
155 | format that includes a **type**, a **scope**, and a **subject**:
156 |
157 | ```
158 | ():
159 |
160 |
161 |
162 |