mailpit-api 1.0.0

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.
@@ -0,0 +1,33 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 20
18
+ - run: npm ci
19
+ - run: npm test
20
+
21
+ publish-npm:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: 20
29
+ registry-url: https://registry.npmjs.org/
30
+ - run: npm ci
31
+ - run: npm publish
32
+ env:
33
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -0,0 +1,3 @@
1
+ # Ignore artifacts:
2
+ build
3
+ coverage
package/.prettierrc ADDED
@@ -0,0 +1 @@
1
+ {}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Matthew Spahr
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # mailpit-api
2
+
3
+ A NodeJS client library, written in TypeScript, to interact with the Mailpit API.
@@ -0,0 +1,10 @@
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+ import tseslint from "typescript-eslint";
4
+
5
+ export default [
6
+ { files: ["**/*.{js,mjs,cjs,ts}"] },
7
+ { languageOptions: { globals: globals.browser } },
8
+ pluginJs.configs.recommended,
9
+ ...tseslint.configs.recommended,
10
+ ];
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "mailpit-api",
3
+ "version": "1.0.0",
4
+ "description": "A NodeJS client library, written in TypeScript, to interact with the Mailpit API.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/mpspahr/mailpit-api.git"
8
+ },
9
+ "main": "index.ts",
10
+ "scripts": {
11
+ "test": "echo \"TODO: Add tests\" && exit 0",
12
+ "build": "tsc"
13
+ },
14
+ "keywords": [
15
+ "mailpit-api",
16
+ "mailpit",
17
+ "api",
18
+ "client",
19
+ "library",
20
+ "wrapper",
21
+ "email",
22
+ "typescript",
23
+ "nodejs"
24
+ ],
25
+ "author": "Matthew Spahr",
26
+ "license": "MIT",
27
+ "dependencies": {
28
+ "axios": "^1.7.2"
29
+ },
30
+ "devDependencies": {
31
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
32
+ "@typescript-eslint/parser": "^7.18.0",
33
+ "typescript-eslint": "^7.18.0",
34
+ "@eslint/js": "^8.57.0",
35
+ "@types/node": "^20.14.10",
36
+ "eslint": "^8.57.0",
37
+ "globals": "^15.8.0",
38
+ "prettier": "3.3.3",
39
+ "tsx": "^4.16.2"
40
+ }
41
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "module": "commonjs",
5
+ "declaration": true,
6
+ "outDir": "./dist",
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true
11
+ },
12
+ "include": ["src/**/*", "info.ts"],
13
+ "exclude": ["node_modules", "dist"]
14
+ }