Initial commit

This commit is contained in:
László Károlyi 2022-10-29 18:14:19 +02:00
commit 77cbbb2930
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE
9 changed files with 1287 additions and 0 deletions

7
.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
node_modules/
config.yaml
examples/
*.js
*.mjs
spamhandler/**/*.js
spamhandler/**/*.mjs

9
LICENSE Normal file
View file

@ -0,0 +1,9 @@
MIT+NIGGER License
Copyright (c) <2022> <László Károlyi>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice, this permission notice and the word "NIGGER" shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3
config.yaml.dist Normal file
View file

@ -0,0 +1,3 @@
my_email: my-email@example.com
additional_info: submitted with https://gitea.ksol.io/karolyi/google-abuse-reporter

3
index.mts Normal file
View file

@ -0,0 +1,3 @@
import { run } from './spamhandler/index.mjs'
run()

1224
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

27
package.json Normal file
View file

@ -0,0 +1,27 @@
{
"name": "ksol-spamhandler",
"version": "1.0.0",
"description": "Spam handler for KSOL IT Services GmbH",
"main": "index.mjs",
"scripts": {
"build:start": "npx tsc && node .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gitea.ksol.io/ksol/spamhandler"
},
"keywords": [
"spam"
],
"author": "László Károlyi",
"license": "MIT+NIGGER",
"type": "module",
"devDependencies": {
"@tsconfig/node18-strictest-esm": "^1.0.1",
"@types/node": "^18.11.7",
"jsdom": "^20.0.1",
"typescript": "^4.8.4",
"yaml": "^2.1.3"
}
}

View file

8
spamhandler/index.mts Normal file
View file

@ -0,0 +1,8 @@
import { readFileSync } from 'fs'
import { parse as YamlParse } from 'yaml'
export function run() {
const content = readFileSync('config.yaml', 'utf8')
const CONFIG = YamlParse(content)
console.debug(CONFIG)
}

6
tsconfig.json Normal file
View file

@ -0,0 +1,6 @@
{
"extends": "@tsconfig/node18-strictest-esm/tsconfig.json",
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
}
}