haraka-plugin-karma 1.0.13 → 2.0.1
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/.codeclimate.yml +16 -1
- package/.eslintrc.yaml +3 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/workflows/ci.yml +50 -0
- package/.github/workflows/codeql.yml +14 -0
- package/.github/workflows/publish.yml +16 -0
- package/Changes.md +30 -13
- package/README.md +3 -5
- package/index.js +442 -524
- package/package.json +7 -7
- package/test/karma.js +299 -299
- package/.travis.yml +0 -21
- package/appveyor.yml +0 -20
package/.codeclimate.yml
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
engines:
|
|
2
2
|
eslint:
|
|
3
3
|
enabled: true
|
|
4
|
-
channel: "eslint-
|
|
4
|
+
channel: "eslint-8"
|
|
5
5
|
config:
|
|
6
6
|
config: ".eslintrc.yaml"
|
|
7
7
|
|
|
8
|
+
checks:
|
|
9
|
+
return-statements:
|
|
10
|
+
enabled: false
|
|
11
|
+
similar-code:
|
|
12
|
+
enabled: false
|
|
13
|
+
method-lines:
|
|
14
|
+
config:
|
|
15
|
+
threshold: 50
|
|
16
|
+
method-complexity:
|
|
17
|
+
config:
|
|
18
|
+
threshold: 20
|
|
19
|
+
file-lines:
|
|
20
|
+
config:
|
|
21
|
+
threshold: 900
|
|
22
|
+
|
|
8
23
|
ratings:
|
|
9
24
|
paths:
|
|
10
25
|
- "**.js"
|
package/.eslintrc.yaml
CHANGED
|
@@ -2,6 +2,7 @@ env:
|
|
|
2
2
|
node: true
|
|
3
3
|
es6: true
|
|
4
4
|
mocha: true
|
|
5
|
+
es2020: true
|
|
5
6
|
|
|
6
7
|
plugins: [ haraka ]
|
|
7
8
|
|
|
@@ -11,6 +12,8 @@ root: true
|
|
|
11
12
|
|
|
12
13
|
rules:
|
|
13
14
|
indent: [2, 2, { SwitchCase: 1 } ]
|
|
15
|
+
semi: [ error, never ]
|
|
16
|
+
semi-style: [ error, last ]
|
|
14
17
|
|
|
15
18
|
globals:
|
|
16
19
|
OK: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**System Info:**
|
|
11
|
+
|
|
12
|
+
Please report your OS, Node version, and Haraka version by running this shell script on your Haraka server and replacing this section with the output.
|
|
13
|
+
|
|
14
|
+
echo "Haraka | $(haraka -v)"; echo " --- | :--- "; echo "Node | $(node -v)"; echo "OS | $(uname -a)"; echo "openssl | $(openssl version)"
|
|
15
|
+
|
|
16
|
+
**Describe the bug**
|
|
17
|
+
A clear and concise description of what the bug is.
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Observed behavior**
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
**Steps To Reproduce**
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
**Additional context**
|
|
29
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [ push ]
|
|
4
|
+
|
|
5
|
+
env:
|
|
6
|
+
CI: true
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
|
|
10
|
+
lint:
|
|
11
|
+
uses: haraka/.github/.github/workflows/lint.yml@master
|
|
12
|
+
|
|
13
|
+
test:
|
|
14
|
+
needs: lint
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
services:
|
|
17
|
+
redis:
|
|
18
|
+
image: redis
|
|
19
|
+
ports:
|
|
20
|
+
- 6379:6379
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ ubuntu-latest ]
|
|
24
|
+
node-version: [ 14, 16, 18 ]
|
|
25
|
+
fail-fast: false
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
- uses: actions/setup-node@v3
|
|
29
|
+
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
|
|
30
|
+
with:
|
|
31
|
+
node-version: ${{ matrix.node-version }}
|
|
32
|
+
- run: npm install
|
|
33
|
+
- run: npm test
|
|
34
|
+
|
|
35
|
+
test-win:
|
|
36
|
+
needs: lint
|
|
37
|
+
runs-on: ${{ matrix.os }}
|
|
38
|
+
strategy:
|
|
39
|
+
matrix:
|
|
40
|
+
os: [ windows-latest ]
|
|
41
|
+
node-version: [ 14, 16, 18 ]
|
|
42
|
+
fail-fast: false
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v3
|
|
45
|
+
- uses: actions/setup-node@v3
|
|
46
|
+
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
|
|
47
|
+
with:
|
|
48
|
+
node-version: ${{ matrix.node-version }}
|
|
49
|
+
- run: npm install
|
|
50
|
+
- run: npm test
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
# The branches below must be a subset of the branches above
|
|
8
|
+
branches: [ master ]
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '18 7 * * 4'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
codeql:
|
|
14
|
+
uses: haraka/.github/.github/workflows/codeql.yml@master
|
package/Changes.md
CHANGED
|
@@ -1,67 +1,84 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
### 2.0.1 - 2022-05-27
|
|
3
|
+
|
|
4
|
+
- chore(ci): depend on shared GHA workflows
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### 2.0.0 - 2022-03-29
|
|
8
|
+
|
|
9
|
+
- remove lots of plugin=this
|
|
10
|
+
- remove unnecessary braces and trailing ;
|
|
11
|
+
- some promises.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### 1.0.14 - 2022-02-14
|
|
15
|
+
|
|
16
|
+
- try to unsubscribe in case connection is marked to skip during transaction
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1.0.13 - 2019-04-23
|
|
3
20
|
|
|
4
21
|
- add 'exists' pattern
|
|
5
22
|
|
|
6
23
|
|
|
7
|
-
|
|
24
|
+
### 1.0.12 - 2019-03-08
|
|
8
25
|
|
|
9
|
-
- don't interfere with STARTLS and AUTH when
|
|
26
|
+
- don't interfere with STARTLS and AUTH when karma is listed above those plugins in config/plugins
|
|
10
27
|
|
|
11
28
|
|
|
12
|
-
|
|
29
|
+
### 1.0.11 - 2017-10-25
|
|
13
30
|
|
|
14
31
|
- private addresses and flagged connections exemption
|
|
15
32
|
|
|
16
33
|
|
|
17
|
-
|
|
34
|
+
### 1.0.10 - 2017-08-30
|
|
18
35
|
|
|
19
36
|
- add TLS awards #19
|
|
20
37
|
|
|
21
38
|
|
|
22
|
-
|
|
39
|
+
### 1.0.9 - 2017-07-29
|
|
23
40
|
|
|
24
41
|
- splash on some es6
|
|
25
42
|
- add AppVeyor CI testing
|
|
26
43
|
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
### 1.0.8 - 2017-06-26
|
|
29
46
|
|
|
30
47
|
- revert #9, it breaks current Haraka deployments
|
|
31
48
|
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
### 1.0.7 - 2017-06-16
|
|
34
51
|
|
|
35
52
|
- update for eslint 4 compat
|
|
36
53
|
- Add results_redis_publish=true for haraka-results changes #9
|
|
37
54
|
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
### 1.0.6 - 2017-05-04
|
|
40
57
|
|
|
41
58
|
- emit error if redis plugin didn't create connection
|
|
42
59
|
|
|
43
60
|
|
|
44
|
-
|
|
61
|
+
### 1.0.5 - 2017-02-06
|
|
45
62
|
|
|
46
63
|
- move merge_redis_ini into load_karma_ini, so it also gets applied
|
|
47
64
|
after a karma.ini change
|
|
48
65
|
- skip redis operations when no connection exists
|
|
49
66
|
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
### 1.0.4 - 2017-01-29
|
|
52
69
|
|
|
53
70
|
- use the new haraka-plugin-redis
|
|
54
71
|
- remove exceptions for soft denials. This makes denial time simpler.
|
|
55
72
|
- rules updates
|
|
56
73
|
|
|
57
74
|
|
|
58
|
-
|
|
75
|
+
### 1.0.3 - 2017-01-27
|
|
59
76
|
|
|
60
77
|
- add rule #280 for known-senders
|
|
61
78
|
- add support for 'length' type, with eq, gt, and lt operators
|
|
62
79
|
- use shared haraka-eslint
|
|
63
80
|
|
|
64
81
|
|
|
65
|
-
|
|
82
|
+
### 1.0.2 - 2017-01-24
|
|
66
83
|
|
|
67
84
|
- use redis.merge_redis_ini()
|
package/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
[![Build Status][ci-img]][ci-url]
|
|
2
|
-
[![Windows Build Status][ci-win-img]][ci-win-url]
|
|
3
2
|
[![Code Climate][clim-img]][clim-url]
|
|
4
3
|
[![NPM][npm-img]][npm-url]
|
|
5
4
|
|
|
@@ -204,11 +203,10 @@ Expect to use karma *with* content filters.
|
|
|
204
203
|
[snf-url]: http://haraka.github.io/manual/plugins/messagesniffer.html
|
|
205
204
|
[results-url]: http://haraka.github.io/manual/Results.html
|
|
206
205
|
|
|
206
|
+
[![CI]()]()
|
|
207
207
|
|
|
208
|
-
[ci-img]: https://
|
|
209
|
-
[ci-url]: https://
|
|
210
|
-
[ci-win-img]: https://ci.appveyor.com/api/projects/status/eut008hijj7gt995?svg=true
|
|
211
|
-
[ci-win-url]: https://ci.appveyor.com/project/msimerson/haraka-plugin-karma
|
|
208
|
+
[ci-img]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml/badge.svg
|
|
209
|
+
[ci-url]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml
|
|
212
210
|
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-karma/coverage.svg
|
|
213
211
|
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-karma
|
|
214
212
|
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-karma/badges/gpa.svg
|