Skip to content

Commit

Permalink
publish esets as NPM module
Browse files Browse the repository at this point in the history
- repackaged from haraka/Haraka
  • Loading branch information
msimerson committed May 8, 2024
1 parent 473b409 commit f81fd99
Show file tree
Hide file tree
Showing 22 changed files with 235 additions and 331 deletions.
6 changes: 3 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
engines:
eslint:
enabled: true
channel: "eslint-6"
channel: "eslint-8"
config:
config: ".eslintrc.yaml"

ratings:
paths:
- "**.js"
paths:
- "**.js"
21 changes: 2 additions & 19 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@ env:
node: true
es6: true
mocha: true
es2022: true

plugins:
- haraka

extends:
- eslint:recommended
- plugin:haraka/recommended

rules:
indent: [2, 2, {"SwitchCase": 1}]

root: true

globals:
OK: true
CONT: true
DENY: true
DENYSOFT: true
DENYDISCONNECT: true
DENYSOFTDISCONNECT: true
extends: ["@haraka"]
11 changes: 6 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Fixes #

Changes proposed in this pull request:
-
-

-
-

Fixes #

Checklist:

- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
- [ ] package.json.version bumped
- [ ] published to NPM (will be done by @core)
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: production
34 changes: 0 additions & 34 deletions .github/workflows/ci-test-win.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/ci-test.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on: [push, pull_request]

env:
CI: true

jobs:
lint:
uses: haraka/.github/.github/workflows/lint.yml@master

# coverage:
# uses: haraka/.github/.github/workflows/coverage.yml@master
# secrets: inherit

ubuntu:
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

windows:
needs: [lint]
uses: haraka/.github/.github/workflows/windows.yml@master
13 changes: 13 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "18 7 * * 4"

jobs:
codeql:
uses: haraka/.github/.github/workflows/codeql.yml@master
32 changes: 0 additions & 32 deletions .github/workflows/coveralls.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/lint.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: publish

on:
push:
branches:
- master
paths:
- package.json

env:
CI: true

jobs:
publish:
uses: haraka/.github/.github/workflows/publish.yml@master
secrets: inherit
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ jspm_packages
.node_repl_history

package-lock.json
bower_components
# Optional npm cache directory
.npmrc
.idea
.DS_Store
haraka-update.sh
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".release"]
path = .release
url = [email protected]:msimerson/.release.git
1 change: 1 addition & 0 deletions .release
Submodule .release added at 7cd570
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.0.0] - 2024-05-08

- repackaged from haraka/Haraka

[1.0.0]: https://github.com/haraka/haraka-plugin-template/releases/tag/v1.0.0
4 changes: 0 additions & 4 deletions Changes.md

This file was deleted.

83 changes: 17 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,30 @@
[![Unix Build Status][ci-img]][ci-url]
[![Windows Build Status][ci-win-img]][ci-win-url]
[![CI Test Status][ci-img]][ci-url]
[![Code Climate][clim-img]][clim-url]
[![NPM][npm-img]][npm-url]

# haraka-plugin-template

Clone me, to create a new plugin!

# Template Instructions

These instructions will not self-destruct after use. Use and destroy.

See also, [How to Write a Plugin](https://github.com/haraka/Haraka/wiki/Write-a-Plugin) and [Plugins.md](https://github.com/haraka/Haraka/blob/master/docs/Plugins.md) for additional plugin writing information.

## Create a new repo for your plugin

Haraka plugins are named like `haraka-plugin-something`. All the namespace after `haraka-plugin-` is yours for the taking. Please check the [Plugins](https://github.com/haraka/Haraka/blob/master/Plugins.md) page and a Google search to see what plugins already exist.

Once you've settled on a name, create the GitHub repo. On the repo's main page, click the _Clone or download_ button and copy the URL. Then paste that URL into a local ENV variable with a command like this:

```sh
export MY_GITHUB_ORG=haraka
export MY_PLUGIN_NAME=haraka-plugin-SOMETHING
```

Clone and rename the template repo:

```sh
git clone [email protected]:haraka/haraka-plugin-template.git
mv haraka-plugin-template $MY_PLUGIN_NAME
cd $MY_PLUGIN_NAME
git remote rm origin
git remote add origin "[email protected]:$MY_GITHUB_ORG/$MY_PLUGIN_NAME.git"
```

Now you'll have a local git repo to begin authoring your plugin

## rename boilerplate

Replaces all uses of the word `template` with your plugin's name.

./redress.sh [something]
[![NPM][npm-img]][npm-url]

You'll then be prompted to update package.json and then force push this repo onto the GitHub repo you've created earlier.
# haraka-plugin-esets

This plugin allows virus scanning with ESET Mail Security for Linux/BSD.

# Add your content here
Install the software as per the intructions from ESET and enable this plugin
and it will scan each message using the "esets_cli" command which defaults to
/opt/eset/esets/bin/esets_cli.

## INSTALL
### Configure

```sh
cd /path/to/local/haraka
npm install haraka-plugin-template
echo "template" >> config/plugins
service haraka restart
```

### Configuration

If the default configuration is not sufficient, copy the config file from the distribution into your haraka config dir and then modify it:

```sh
cp node_modules/haraka-plugin-template/config/template.ini config/template.ini
$EDITOR config/template.ini
cp node_modules/haraka-plugin-esets/config/esets.ini config/esets.ini
$EDITOR config/esets.ini
```

## USAGE


<!-- leave these buried at the bottom of the document -->
[ci-img]: https://github.com/haraka/haraka-plugin-template/workflows/Plugin%20Tests/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-template/actions?query=workflow%3A%22Plugin+Tests%22
[ci-win-img]: https://github.com/haraka/haraka-plugin-template/workflows/Plugin%20Tests%20-%20Windows/badge.svg
[ci-win-url]: https://github.com/haraka/haraka-plugin-template/actions?query=workflow%3A%22Plugin+Tests+-+Windows%22
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-template/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-template
[npm-img]: https://nodei.co/npm/haraka-plugin-template.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-template

[ci-img]: https://github.com/haraka/haraka-plugin-esets/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-esets/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-esets/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-esets
[npm-img]: https://nodei.co/npm/haraka-plugin-esets.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-esets
File renamed without changes.
Loading

0 comments on commit f81fd99

Please sign in to comment.