@technomoron/mail-magic 1.0.38 → 1.0.41
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/CHANGES +48 -0
- package/README.md +7 -2
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/esm/api/assets.d.ts +9 -0
- package/dist/esm/api/auth.d.ts +2 -0
- package/dist/esm/api/auth.js +17 -8
- package/dist/esm/api/forms.d.ts +9 -0
- package/dist/esm/api/forms.js +7 -4
- package/dist/esm/api/mailer.d.ts +11 -0
- package/dist/esm/api/mailer.js +8 -7
- package/dist/esm/bin/mail-magic.d.ts +2 -0
- package/dist/esm/bin/mail-magic.js +0 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/models/db.d.ts +5 -0
- package/dist/esm/models/db.js +2 -2
- package/dist/esm/models/domain.d.ts +24 -0
- package/dist/esm/models/domain.js +0 -2
- package/dist/esm/models/form.d.ts +50 -0
- package/dist/esm/models/form.js +16 -15
- package/dist/esm/models/init.d.ts +12 -0
- package/dist/esm/models/init.js +7 -28
- package/dist/esm/models/recipient.d.ts +24 -0
- package/dist/esm/models/recipient.js +0 -2
- package/dist/esm/models/txmail.d.ts +42 -0
- package/dist/esm/models/txmail.js +0 -2
- package/dist/esm/models/user.d.ts +33 -0
- package/dist/esm/models/user.js +0 -2
- package/dist/esm/server.d.ts +8 -0
- package/dist/esm/store/envloader.d.ts +188 -0
- package/dist/esm/store/envloader.js +14 -4
- package/dist/esm/store/store.d.ts +37 -0
- package/dist/esm/store/store.js +6 -7
- package/dist/esm/swagger.d.ts +10 -0
- package/dist/esm/types.d.ts +32 -0
- package/dist/esm/util/captcha.d.ts +7 -0
- package/dist/esm/util/captcha.js +4 -1
- package/dist/esm/util/email.d.ts +3 -0
- package/dist/esm/util/form-replyto.d.ts +6 -0
- package/dist/esm/util/form-submission.d.ts +24 -0
- package/dist/esm/util/forms.d.ts +140 -0
- package/dist/esm/util/forms.js +18 -32
- package/dist/esm/util/paths.d.ts +15 -0
- package/dist/esm/util/paths.js +17 -0
- package/dist/esm/util/ratelimit.d.ts +16 -0
- package/dist/esm/util/ratelimit.js +6 -1
- package/dist/esm/util/route.d.ts +1 -0
- package/dist/esm/util/shared-template-flatten.d.ts +17 -0
- package/dist/esm/util/shared-template-flatten.js +41 -0
- package/dist/esm/util/uploads.d.ts +10 -0
- package/dist/esm/util/utils.d.ts +27 -0
- package/dist/esm/util.d.ts +7 -0
- package/docs/swagger/openapi.json +16 -12
- package/docs/tutorial.md +2 -2
- package/examples/.env-dist +21 -0
- package/examples/README.md +74 -0
- package/examples/data/example.test/form-template/base.njk +4 -0
- package/examples/data/example.test/form-template/en/base.njk +1 -0
- package/examples/data/example.test/form-template/en/change-password.njk +5 -0
- package/examples/data/example.test/form-template/en/confirm-account.njk +5 -0
- package/examples/data/example.test/form-template/en/contact.njk +5 -0
- package/examples/data/example.test/form-template/en/partials/fields.njk +5 -0
- package/examples/data/example.test/form-template/en/welcome-signup.njk +5 -0
- package/examples/data/example.test/form-template/nb/base.njk +1 -0
- package/examples/data/example.test/form-template/nb/change-password.njk +5 -0
- package/examples/data/example.test/form-template/nb/confirm-account.njk +5 -0
- package/examples/data/example.test/form-template/nb/contact.njk +5 -0
- package/examples/data/example.test/form-template/nb/partials/fields.njk +5 -0
- package/examples/data/example.test/form-template/nb/welcome-signup.njk +5 -0
- package/examples/data/example.test/form-template/partials/header.njk +1 -0
- package/examples/data/example.test/tx-template/base.njk +16 -0
- package/examples/data/example.test/tx-template/en/base.njk +1 -0
- package/examples/data/example.test/tx-template/en/change-password.njk +7 -0
- package/examples/data/example.test/tx-template/en/confirm.njk +6 -0
- package/examples/data/example.test/tx-template/en/invoice.njk +8 -0
- package/examples/data/example.test/tx-template/en/partials/header.njk +1 -0
- package/examples/data/example.test/tx-template/en/partials/line-items.njk +14 -0
- package/examples/data/example.test/tx-template/en/receipt.njk +7 -0
- package/examples/data/example.test/tx-template/en/welcome.njk +5 -0
- package/examples/data/example.test/tx-template/nb/base.njk +1 -0
- package/examples/data/example.test/tx-template/nb/change-password.njk +6 -0
- package/examples/data/example.test/tx-template/nb/confirm.njk +6 -0
- package/examples/data/example.test/tx-template/nb/invoice.njk +7 -0
- package/examples/data/example.test/tx-template/nb/partials/header.njk +1 -0
- package/examples/data/example.test/tx-template/nb/receipt.njk +6 -0
- package/examples/data/example.test/tx-template/nb/welcome.njk +5 -0
- package/examples/data/example.test/tx-template/partials/header.njk +7 -0
- package/examples/data/init-data.json +213 -0
- package/examples/scripts/mm-api.ts +206 -0
- package/examples/scripts/public-form.ts +100 -0
- package/examples/scripts/send-messages.ts +114 -0
- package/package.json +90 -85
package/package.json
CHANGED
|
@@ -1,86 +1,91 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
2
|
+
"name": "@technomoron/mail-magic",
|
|
3
|
+
"version": "1.0.41",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mail-magic": "dist/esm/bin/mail-magic.js"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/cjs/index.d.ts",
|
|
13
|
+
"import": "./dist/esm/index.js",
|
|
14
|
+
"require": "./dist/cjs/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"docs",
|
|
20
|
+
"examples",
|
|
21
|
+
"README.md",
|
|
22
|
+
"CHANGES"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/technomoron/mail-magic.git",
|
|
27
|
+
"directory": "packages/server"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": "Bjørn Erik Jacobsen",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"copyright": "Copyright (c) 2025 Bjørn Erik Jacobsen",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/technomoron/mail-magic/issues"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@technomoron/api-server-base": "2.0.0-beta.20",
|
|
38
|
+
"@technomoron/env-loader": "^1.0.8",
|
|
39
|
+
"@technomoron/unyuck": "^1.0.4",
|
|
40
|
+
"bcryptjs": "^3.0.2",
|
|
41
|
+
"dotenv": "^16.4.5",
|
|
42
|
+
"email-addresses": "^5.0.0",
|
|
43
|
+
"html-to-text": "^9.0.5",
|
|
44
|
+
"nanoid": "^5.1.6",
|
|
45
|
+
"nodemailer": "^6.10.1",
|
|
46
|
+
"nunjucks": "^3.2.4",
|
|
47
|
+
"sequelize": "^6.37.7",
|
|
48
|
+
"sqlite3": "^5.1.7",
|
|
49
|
+
"swagger-jsdoc": "^6.2.8",
|
|
50
|
+
"swagger-ui-express": "^5.0.1",
|
|
51
|
+
"zod": "^4.1.5"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/express": "^5.0.6",
|
|
55
|
+
"@types/html-to-text": "^9.0.4",
|
|
56
|
+
"@types/nodemailer": "^6.4.19",
|
|
57
|
+
"@types/nunjucks": "^3.2.6",
|
|
58
|
+
"@types/supertest": "^6.0.3",
|
|
59
|
+
"mailparser": "^3.9.1",
|
|
60
|
+
"nodemon": "^3.1.10",
|
|
61
|
+
"smtp-server": "^3.18.0",
|
|
62
|
+
"supertest": "^7.1.4",
|
|
63
|
+
"tsx": "^4.20.5",
|
|
64
|
+
"typescript": "^5.9.3",
|
|
65
|
+
"vitest": "^4.0.16"
|
|
66
|
+
},
|
|
67
|
+
"homepage": "https://github.com/technomoron/mail-magic#readme",
|
|
68
|
+
"scripts": {
|
|
69
|
+
"start": "node dist/esm/index.js",
|
|
70
|
+
"dev": "NODE_ENV=development nodemon --watch 'src/**/*.ts' --watch 'config/**/*.*' --watch '.env' --exec 'tsx' src/index.ts",
|
|
71
|
+
"run": "NODE_ENV=production run-s start",
|
|
72
|
+
"sync:shared": "node ../../scripts/sync-shared-code.cjs >/dev/null",
|
|
73
|
+
"build:esm": "tsc --project tsconfig/tsconfig.esm.json",
|
|
74
|
+
"build:cjs": "node scripts/add-shebang.cjs --cjs-only",
|
|
75
|
+
"build": "run-s sync:shared build:esm build:cjs",
|
|
76
|
+
"postbuild": "node scripts/add-shebang.cjs",
|
|
77
|
+
"test:unit": "vitest run --silent --reporter=dot",
|
|
78
|
+
"test": "run-s --silent sync:shared test:unit",
|
|
79
|
+
"test:watch": "vitest",
|
|
80
|
+
"scrub": "rimraf ./node_modules/ ./dist/ pnpm-lock.yaml package-lock.json yarn.lock",
|
|
81
|
+
"lint": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --no-error-on-unmatched-pattern ./",
|
|
82
|
+
"lintfix": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --fix --no-error-on-unmatched-pattern ./",
|
|
83
|
+
"pretty": "node ../../node_modules/prettier/bin/prettier.cjs --config ../../.prettierrc --write \"**/*.{js,jsx,cjs,mjs,ts,tsx,mts,vue,json,md}\"",
|
|
84
|
+
"format": "run-s lintfix pretty",
|
|
85
|
+
"cleanbuild": "run-s clean:dist format build",
|
|
86
|
+
"lintconfig": "node ../../lintconfig.cjs",
|
|
87
|
+
"clean:dist": "rimraf ./dist/",
|
|
88
|
+
"release": "bash ../../scripts/release-package.sh .",
|
|
89
|
+
"release:check": "bash ../../scripts/release-package-check.sh ."
|
|
90
|
+
}
|
|
91
|
+
}
|