mirror of
https://github.com/axllent/mailpit.git
synced 2026-03-11 04:57:00 +00:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eea79f0c8 | ||
|
|
39767e979c | ||
|
|
4e2f02ee0a | ||
|
|
5a04534314 | ||
|
|
6725a809d5 | ||
|
|
64a067cff9 | ||
|
|
58dbccc0a7 | ||
|
|
3ef320d277 | ||
|
|
18e95b699e | ||
|
|
fc89655b7f | ||
|
|
ff9a6ff491 | ||
|
|
adce75ab8f | ||
|
|
12903cae60 | ||
|
|
7f55511c82 | ||
|
|
309036fb6d | ||
|
|
48387c3a13 | ||
|
|
a2ab350aff | ||
|
|
c150f1ba50 | ||
|
|
48bec0c8f6 | ||
|
|
fef2628c3f | ||
|
|
e5888ede8b | ||
|
|
374a760b88 | ||
|
|
0fdfa13a38 | ||
|
|
b41df78c4f | ||
|
|
870e523c97 | ||
|
|
0b391b5c37 | ||
|
|
c01f473e79 | ||
|
|
3c27fd715b | ||
|
|
714596a13a | ||
|
|
9ae02daf1a | ||
|
|
b6750600cb | ||
|
|
78e871e9b3 | ||
|
|
8ff2a5cf6a | ||
|
|
4a88d1fc24 | ||
|
|
d4268b8ae1 | ||
|
|
1b47716f5f | ||
|
|
42e6d71415 | ||
|
|
cd5789dda2 | ||
|
|
cd2a9d433a | ||
|
|
fe0dfe41e7 | ||
|
|
bee3174c78 | ||
|
|
a3187d5499 | ||
|
|
dc7f047b9a | ||
|
|
f3bb522143 | ||
|
|
3a41d56cc6 | ||
|
|
db5d8f672a | ||
|
|
3d96b2cad0 | ||
|
|
34c1748f4b | ||
|
|
52120abefd | ||
|
|
086142e977 | ||
|
|
078f42f4ea | ||
|
|
df5ded49b8 | ||
|
|
3bd1eca2ab | ||
|
|
95b54ce8a4 | ||
|
|
eb3330939d | ||
|
|
50b5f8667a | ||
|
|
a121c08dc4 | ||
|
|
9ff9b783cc |
1
.github/workflows/release-build.yml
vendored
1
.github/workflows/release-build.yml
vendored
@@ -44,4 +44,5 @@ jobs:
|
||||
extra_files: LICENSE README.md
|
||||
md5sum: false
|
||||
overwrite: true
|
||||
retry: 5
|
||||
ldflags: -w -X "github.com/axllent/mailpit/config.Version=${{ github.ref_name }}"
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/node_modules/
|
||||
/send
|
||||
/sendmail/sendmail
|
||||
/server/ui/dist
|
||||
/Makefile
|
||||
/mailpit*
|
||||
|
||||
69
CHANGELOG.md
69
CHANGELOG.md
@@ -2,6 +2,75 @@
|
||||
|
||||
Notable changes to Mailpit will be documented in this file.
|
||||
|
||||
## [v1.6.19]
|
||||
|
||||
### Fix
|
||||
- Only display sendmail help when sendmail subcommand is invoked
|
||||
|
||||
|
||||
## [v1.6.18]
|
||||
|
||||
### API
|
||||
- Sort tags before saving
|
||||
|
||||
### UI
|
||||
- Add option to enable tag colors based on tag name hash
|
||||
- Display message tags below subject in message overview
|
||||
|
||||
|
||||
## [v1.6.17]
|
||||
|
||||
### Fix
|
||||
- Add single dash arguments support to sendmail command ([#123](https://github.com/axllent/mailpit/issues/123))
|
||||
|
||||
|
||||
## [v1.6.16]
|
||||
|
||||
### Bugfix
|
||||
- Fix sendmail/startup panic
|
||||
|
||||
|
||||
## [v1.6.15]
|
||||
|
||||
### Feature
|
||||
- Add `sendmail -bs` functionality
|
||||
|
||||
|
||||
## [v1.6.14]
|
||||
|
||||
### Feature
|
||||
- Add ability to delete or mark search results read
|
||||
- Set tags via X-Tags message header
|
||||
|
||||
### Libs
|
||||
- Update node modules
|
||||
|
||||
|
||||
## [v1.6.13]
|
||||
|
||||
### Feature
|
||||
- Add SMTP LOGIN authentication method for message relay
|
||||
|
||||
|
||||
## [v1.6.12]
|
||||
|
||||
### Feature
|
||||
- Add Message-Id to MessageSummary ([#116](https://github.com/axllent/mailpit/issues/116))
|
||||
|
||||
### Swagger
|
||||
- Update swagger field descriptions, add MessageID
|
||||
|
||||
|
||||
## [v1.6.11]
|
||||
|
||||
### Libs
|
||||
- Update node modules
|
||||
- Update Go modules
|
||||
|
||||
### UI
|
||||
- Check for secure context instead of HTTPS ([#114](https://github.com/axllent/mailpit/issues/114))
|
||||
|
||||
|
||||
## [v1.6.10]
|
||||
|
||||
### Libs
|
||||
|
||||
@@ -24,7 +24,7 @@ Mailpit is inspired by [MailHog](#why-rewrite-mailhog), but much, much faster.
|
||||
- Advanced mail search ([see wiki](https://github.com/axllent/mailpit/wiki/Mail-search))
|
||||
- Message tagging ([see wiki](https://github.com/axllent/mailpit/wiki/Tagging))
|
||||
- Real-time web UI updates using web sockets for new mail
|
||||
- Optional browser notifications for new mail (HTTPS only)
|
||||
- Optional browser notifications for new mail (HTTPS and `localhost` only)
|
||||
- Configurable automatic email pruning (default keeps the most recent 500 emails)
|
||||
- Email storage either in a temporary or persistent database ([see wiki](https://github.com/axllent/mailpit/wiki/Email-storage))
|
||||
- Fast SMTP processing & storing - approximately 70-100 emails per second depending on CPU, network speed & email size, easily handling tens of thousands of emails
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
sendmail "github.com/axllent/mailpit/sendmail/cmd"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
smtpAddr = "localhost:1025"
|
||||
fromAddr string
|
||||
)
|
||||
|
||||
// sendmailCmd represents the sendmail command
|
||||
var sendmailCmd = &cobra.Command{
|
||||
Use: "sendmail [flags] [recipients]",
|
||||
Short: "A sendmail command replacement for Mailpit",
|
||||
Long: `A sendmail command replacement for Mailpit.
|
||||
|
||||
You can optionally create a symlink called 'sendmail' to the Mailpit binary.`,
|
||||
Run: func(_ *cobra.Command, _ []string) {
|
||||
|
||||
sendmail.Run()
|
||||
},
|
||||
}
|
||||
@@ -25,13 +20,17 @@ You can optionally create a symlink called 'sendmail' to the Mailpit binary.`,
|
||||
func init() {
|
||||
rootCmd.AddCommand(sendmailCmd)
|
||||
|
||||
// these are simply repeated for cli consistency
|
||||
sendmailCmd.Flags().StringVarP(&fromAddr, "from", "f", fromAddr, "SMTP sender")
|
||||
sendmailCmd.Flags().StringVarP(&smtpAddr, "smtp-addr", "S", smtpAddr, "SMTP server address")
|
||||
sendmailCmd.Flags().BoolVarP(&sendmail.Verbose, "verbose", "v", false, "Verbose mode (sends debug output to stderr)")
|
||||
sendmailCmd.Flags().BoolP("long-b", "b", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
sendmailCmd.Flags().BoolP("long-i", "i", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
sendmailCmd.Flags().BoolP("long-o", "o", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
sendmailCmd.Flags().BoolP("long-s", "s", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
sendmailCmd.Flags().BoolP("long-t", "t", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
// print out manual help screen
|
||||
sendmailCmd.SetHelpTemplate(sendmail.HelpTemplate([]string{os.Args[0], "sendmail"}))
|
||||
|
||||
// these are simply repeated for cli consistency as cobra/viper does not allow
|
||||
// multi-letter single-dash variables (-bs)
|
||||
sendmailCmd.Flags().StringVarP(&sendmail.FromAddr, "from", "f", sendmail.FromAddr, "SMTP sender")
|
||||
sendmailCmd.Flags().StringVarP(&sendmail.SMTPAddr, "smtp-addr", "S", sendmail.SMTPAddr, "SMTP server address")
|
||||
sendmailCmd.Flags().BoolVarP(&sendmail.UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||
sendmailCmd.Flags().BoolVarP(&sendmail.UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||
sendmailCmd.Flags().BoolP("verbose", "v", false, "Verbose mode (sends debug output to stderr)")
|
||||
sendmailCmd.Flags().BoolP("long-i", "i", false, "Ignored")
|
||||
sendmailCmd.Flags().BoolP("long-o", "o", false, "Ignored")
|
||||
sendmailCmd.Flags().BoolP("long-t", "t", false, "Ignored")
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/axllent/mailpit/utils/logger"
|
||||
"github.com/axllent/mailpit/utils/tools"
|
||||
"github.com/mattn/go-shellwords"
|
||||
"github.com/tg123/go-htpasswd"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -41,7 +42,7 @@ var (
|
||||
// UIAuthFile for basic authentication
|
||||
UIAuthFile string
|
||||
|
||||
// UIAuth used for euthentication
|
||||
// UIAuth used for authentication
|
||||
UIAuth *htpasswd.File
|
||||
|
||||
// Webroot to define the base path for the UI and API
|
||||
@@ -71,8 +72,8 @@ var (
|
||||
// SMTPCLITags is used to map the CLI args
|
||||
SMTPCLITags string
|
||||
|
||||
// TagRegexp is the allowed tag characters
|
||||
TagRegexp = regexp.MustCompile(`^([a-zA-Z0-9\-\ \_]){3,}$`)
|
||||
// ValidTagRegexp represents a valid tag
|
||||
ValidTagRegexp = regexp.MustCompile(`^([a-zA-Z0-9\-\ \_]){3,}$`)
|
||||
|
||||
// SMTPTags are expressions to apply tags to new mail
|
||||
SMTPTags []AutoTag
|
||||
@@ -86,7 +87,7 @@ var (
|
||||
// ReleaseEnabled is whether message releases are enabled, requires a valid SMTPRelayConfigFile
|
||||
ReleaseEnabled = false
|
||||
|
||||
// SMTPRelayAllIncoming is whether to relay all incoming messages via preconfgured SMTP server.
|
||||
// SMTPRelayAllIncoming is whether to relay all incoming messages via pre-configured SMTP server.
|
||||
// Use with extreme caution!
|
||||
SMTPRelayAllIncoming = false
|
||||
|
||||
@@ -115,11 +116,11 @@ type smtpRelayConfigStruct struct {
|
||||
Port int `yaml:"port"`
|
||||
STARTTLS bool `yaml:"starttls"`
|
||||
AllowInsecure bool `yaml:"allow-insecure"`
|
||||
Auth string `yaml:"auth"` // none, plain, cram-md5
|
||||
Auth string `yaml:"auth"` // none, plain, login, cram-md5
|
||||
Username string `yaml:"username"` // plain & cram-md5
|
||||
Password string `yaml:"password"` // plain
|
||||
Secret string `yaml:"secret"` // cram-md5
|
||||
ReturnPath string `yaml:"return-path"` // allows overriding the boune address
|
||||
ReturnPath string `yaml:"return-path"` // allow overriding the bounce address
|
||||
RecipientAllowlist string `yaml:"recipient-allowlist"` // regex, if set needs to match for mails to be relayed
|
||||
RecipientAllowlistRegexp *regexp.Regexp
|
||||
}
|
||||
@@ -219,8 +220,8 @@ func VerifyConfig() error {
|
||||
for _, a := range args {
|
||||
t := strings.Split(a, "=")
|
||||
if len(t) > 1 {
|
||||
tag := strings.TrimSpace(t[0])
|
||||
if !TagRegexp.MatchString(tag) || len(tag) == 0 {
|
||||
tag := tools.CleanTag(t[0])
|
||||
if !ValidTagRegexp.MatchString(tag) || len(tag) == 0 {
|
||||
return fmt.Errorf("Invalid tag (%s) - can only contain spaces, letters, numbers, - & _", tag)
|
||||
}
|
||||
match := strings.TrimSpace(strings.ToLower(strings.Join(t[1:], "=")))
|
||||
@@ -285,6 +286,11 @@ func parseRelayConfig(c string) error {
|
||||
if SMTPRelayConfig.Username == "" || SMTPRelayConfig.Password == "" {
|
||||
return fmt.Errorf("SMTP relay host username or password not set for PLAIN authentication (%s)", c)
|
||||
}
|
||||
} else if SMTPRelayConfig.Auth == "login" {
|
||||
SMTPRelayConfig.Auth = "login"
|
||||
if SMTPRelayConfig.Username == "" || SMTPRelayConfig.Password == "" {
|
||||
return fmt.Errorf("SMTP relay host username or password not set for LOGIN authentication (%s)", c)
|
||||
}
|
||||
} else if strings.HasPrefix(SMTPRelayConfig.Auth, "cram") {
|
||||
SMTPRelayConfig.Auth = "cram-md5"
|
||||
if SMTPRelayConfig.Username == "" || SMTPRelayConfig.Secret == "" {
|
||||
|
||||
@@ -15,6 +15,7 @@ Returns a JSON summary of the message and attachments.
|
||||
```json
|
||||
{
|
||||
"ID": "d7a5543b-96dd-478b-9b60-2b465c9884de",
|
||||
"MessageID": "12345.67890@localhost",
|
||||
"Read": true,
|
||||
"From": {
|
||||
"Name": "John Doe",
|
||||
@@ -31,6 +32,7 @@ Returns a JSON summary of the message and attachments.
|
||||
"ReplyTo": [],
|
||||
"Subject": "Message subject",
|
||||
"Date": "2016-09-07T16:46:00+13:00",
|
||||
"Tags": ["test"],
|
||||
"Text": "Plain text MIME part of the email",
|
||||
"HTML": "HTML MIME part (if exists)",
|
||||
"Size": 79499,
|
||||
|
||||
@@ -31,9 +31,11 @@ List messages in the mailbox. Messages are returned in the order of latest recei
|
||||
"unread": 500,
|
||||
"count": 50,
|
||||
"start": 0,
|
||||
"tags": ["test"],
|
||||
"messages": [
|
||||
{
|
||||
"ID": "1c575821-70ba-466f-8cee-2e1cf0fcdd0f",
|
||||
"MessageID": "12345.67890@localhost",
|
||||
"Read": false,
|
||||
"From": {
|
||||
"Name": "John Doe",
|
||||
@@ -54,6 +56,7 @@ List messages in the mailbox. Messages are returned in the order of latest recei
|
||||
"Bcc": [],
|
||||
"Subject": "Message subject",
|
||||
"Created": "2022-10-03T21:35:32.228605299+13:00",
|
||||
"Tags": ["test"],
|
||||
"Size": 6144,
|
||||
"Attachments": 0
|
||||
},
|
||||
|
||||
@@ -30,6 +30,7 @@ Matching messages are returned in the order of latest received to oldest.
|
||||
"messages": [
|
||||
{
|
||||
"ID": "1c575821-70ba-466f-8cee-2e1cf0fcdd0f",
|
||||
"MessageID": "12345.67890@localhost",
|
||||
"Read": false,
|
||||
"From": {
|
||||
"Name": "John Doe",
|
||||
|
||||
6
go.mod
6
go.mod
@@ -14,6 +14,7 @@ require (
|
||||
github.com/leporo/sqlf v1.4.0
|
||||
github.com/mattn/go-shellwords v1.0.12
|
||||
github.com/mhale/smtpd v0.8.0
|
||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/sirupsen/logrus v1.9.2
|
||||
github.com/spf13/cobra v1.7.0
|
||||
@@ -36,10 +37,11 @@ require (
|
||||
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/reiver/go-oi v1.0.0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
|
||||
@@ -49,7 +51,7 @@ require (
|
||||
golang.org/x/mod v0.10.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/tools v0.9.1 // indirect
|
||||
golang.org/x/tools v0.9.3 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
lukechampine.com/uint128 v1.3.0 // indirect
|
||||
modernc.org/cc/v3 v3.40.0 // indirect
|
||||
|
||||
12
go.sum
12
go.sum
@@ -76,8 +76,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leporo/sqlf v1.4.0 h1:SyWnX/8GSGOzVmanG0Ub1c04mR9nNl6Tq3IeFKX2/4c=
|
||||
github.com/leporo/sqlf v1.4.0/go.mod h1:pgN9yKsAnQ+2ewhbZogr98RcasUjPsHF3oXwPPhHvBw=
|
||||
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
|
||||
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
@@ -93,6 +93,10 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/reiver/go-oi v1.0.0 h1:nvECWD7LF+vOs8leNGV/ww+F2iZKf3EYjYZ527turzM=
|
||||
github.com/reiver/go-oi v1.0.0/go.mod h1:RrDBct90BAhoDTxB1fenZwfykqeGvhI6LsNfStJoEkI=
|
||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e h1:quuzZLi72kkJjl+f5AQ93FMcadG19WkS7MO6TXFOSas=
|
||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e/go.mod h1:+5vNVvEWwEIx86DB9Ke/+a5wBI464eDRo3eF0LcfpWg=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
@@ -175,8 +179,8 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
|
||||
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
|
||||
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
604
package-lock.json
generated
604
package-lock.json
generated
@@ -12,6 +12,7 @@
|
||||
"bootstrap": "^5.2.0",
|
||||
"bootstrap-icons": "^1.9.1",
|
||||
"bootstrap5-tags": "^1.4.41",
|
||||
"color-hash": "^2.0.2",
|
||||
"moment": "^2.29.4",
|
||||
"prismjs": "^1.29.0",
|
||||
"rapidoc": "^9.3.4",
|
||||
@@ -35,9 +36,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.21.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz",
|
||||
"integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==",
|
||||
"version": "7.22.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz",
|
||||
"integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==",
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@@ -46,11 +47,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime-corejs3": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.5.tgz",
|
||||
"integrity": "sha512-FRqFlFKNazWYykft5zvzuEl1YyTDGsIRrjV9rvxvYkUC7W/ueBng1X68Xd6uRMzAaJ0xMKn08/wem5YS1lpX8w==",
|
||||
"version": "7.22.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.22.3.tgz",
|
||||
"integrity": "sha512-6bdmknScYKmt8I9VjsJuKKGr+TwUb555FTf6tT1P/ANlCjTHCiYLhiQ4X/O7J731w5NOqu8c1aYHEVuOwPz7jA==",
|
||||
"dependencies": {
|
||||
"core-js-pure": "^3.25.1",
|
||||
"core-js-pure": "^3.30.2",
|
||||
"regenerator-runtime": "^0.13.11"
|
||||
},
|
||||
"engines": {
|
||||
@@ -428,359 +429,349 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
|
||||
"version": "2.11.8",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ast": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.69.3.tgz",
|
||||
"integrity": "sha512-orGw/gihk7RmorxibwalthDS58B7QaEBd31fK+/aFx6QqEO1tEO35F850BiL2B5C8TaK8C2Tey01AZTXCxYmfw==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.70.0.tgz",
|
||||
"integrity": "sha512-zQ1RUkXjx5NPYv1bmkoXwlQi7oJC7DJqYi0syTQKswJZDbOkHCwz8cDP/YystOEOL+yyIN7i5EQBIHfy5yAMmA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2",
|
||||
"unraw": "=2.0.1"
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2",
|
||||
"unraw": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-core": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.69.3.tgz",
|
||||
"integrity": "sha512-EIQiJUuT/V9nGkHOYYFP0QNgAW7Y4QwrQzldDzy9ltcHbOKY3TNh/QzYvO0+HvKSv9W7u7WTMH/kaRaSsaZsGw==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.70.0.tgz",
|
||||
"integrity": "sha512-nUw0aehnhm2BUd17pbCLUuyd4E5bsn+K3teYLGs8Z/LGo9gpjZ/BMTL3H/3+F42ZRux79/3b6QksDj4f9yeSpg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-ast": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"minim": "=0.23.8",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"short-unique-id": "=4.4.4",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-ast": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"minim": "~0.23.8",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"short-unique-id": "^4.4.4",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-json-pointer": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.69.3.tgz",
|
||||
"integrity": "sha512-VYXqLY8f2fkaS/d+vVQEMEOEZRXAgGm5tCMx4C7uaU+wC+SKPH/zTh+qElbkaXQr4nfLjbphBsHh31doCyBEjw==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.70.0.tgz",
|
||||
"integrity": "sha512-6MSgWgl1juBMiK4lFp/IBuWO21FB6dm+T9PnRIl2D8tSESndhNHfk3EPkfrfXDOtCK2gqij52w9JorRKEfxfWw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-api-design-systems": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-0.69.3.tgz",
|
||||
"integrity": "sha512-oTwIG8LyKnU4/m8BtAOc+X572+nH4gjxITYtw0L8f4a8Iv1b8LHS0KRzG7c/LVUGtMijpv3aBKPV6QvWhjrrtg==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-0.70.0.tgz",
|
||||
"integrity": "sha512-CA/5cyLWr1lC4oqoEm3BNbQ7ZLXQWhCK6ddTGckgrFNj4j6TxJycC83JGFvt8K2M9uSNRTh7t6b1o1kRzQ+Scg==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-asyncapi-2": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.69.3.tgz",
|
||||
"integrity": "sha512-98HgNbZWqPHqf+EyXs/GcAnayA08/mfN7YlXIRRIys+rll4M/1b+ap+BkTnJ+le3Kra7DhIQ8ucQuEJ+Ik1Sxg==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.70.0.tgz",
|
||||
"integrity": "sha512-P7r6LZR1o8BVGcY+j4HWWlIk1XhP8H2tL7XCHJ3fmYCgqrbdyo3pJxZujfddbvI/TT4/8YMfq2fat6MMu0DhfQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-7": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-7": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-json-schema-draft-4": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.69.3.tgz",
|
||||
"integrity": "sha512-/tMeoz1IHEblc3OwWC812NQFLITOnexjGVujG5Wvsr9ZnTkRb+0g7CbXuooujwfcEY+++o2+kCUgy4SBQFIIlQ==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.70.0.tgz",
|
||||
"integrity": "sha512-Y8O8Xl4P2cKDIunsvDV5Gvq+BVN/uIN5rJ5axHsZt0PL1D0c2Ypu6uCBDNb6iPdUZ3REpzemYNi2eZanL5gKtQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-json-schema-draft-6": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-0.69.3.tgz",
|
||||
"integrity": "sha512-B/6zPFYW1xE66Uc/jOdZVZMEe0+444heTMlpGJGejTy6pNRxCTOsv+B63QzctJv410dHPxGeMRZMeff9wQPBDA==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-0.70.0.tgz",
|
||||
"integrity": "sha512-xaYZ7NeivNZreYzaufNLpxAqusjAXji8Ls+HArzgZWdpjddnN2wvHDEkF8gPBdYMRWiXWLKzXFey/ZhOSwLi9Q==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-json-schema-draft-7": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-0.69.3.tgz",
|
||||
"integrity": "sha512-EkgPlKPQZ3XBkbxAFh2lXsLcyIwRikARFD3RlupsKjAHVFbH7cImbPxb+MnjacfwgVreMk34OWuXqjnGZ8lG1Q==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-0.70.0.tgz",
|
||||
"integrity": "sha512-yy1cha8GiIHBfhK31ycTSd3UwWzQGjWcSLAl7dfT/UpemcHn4wGzJtoFx+tqpGHwpUie3qpEm7ReLRrYzeg0Ew==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-6": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-6": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-openapi-3-0": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.69.3.tgz",
|
||||
"integrity": "sha512-iScwP+SzX8SJMrgChZbdS60Ode/zXfesNaDA+HkNBLbfSrri4/C5FTB0gfWOG0gCGPq+1K5dHlgLrEgogfAARw==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.70.0.tgz",
|
||||
"integrity": "sha512-wEw5uHd1/XqgkwvGM1DrhwPsDWcMNedxHybq0b7Bp2ZE7QWI4V/OS1gOnYpBvB6OUpHkEc5c2z++hr6fd0FhHQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-ns-openapi-3-1": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.69.3.tgz",
|
||||
"integrity": "sha512-J+yIsTBTn7rzfj+vaCXRRdOCrL4kxwnS3P/h4lXb82EZnPU/EbJi+C0LK7O24/vXpeBVRr+OpDfnhpospanMJg==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.70.0.tgz",
|
||||
"integrity": "sha512-0d8IPy7A9lCjscXsw260j07xTQu8ExG3OpFxSJPOwQsrZ6X2Oooaq/0e0hnK15ngaVQzv9Iq8pBXSpJ/oJD8Ww==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.69.3.tgz",
|
||||
"integrity": "sha512-y8xOaSaZVphITajH12T1EHLuZB9kw79DTdQRYoMC+BqZQbsPv3/mLWXS1STQU9oR/PZBA9FJcgAFdThaRgi8UA==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.70.0.tgz",
|
||||
"integrity": "sha512-mXR+0EjOa+1trve5xGKmhDSXdIs8zMMJAN9KlnPvAVVezpoDLgg8s687qfPyNmfRmYcnO/18X8pn3/WhQCVFHA==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-api-design-systems": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-api-design-systems": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.69.3.tgz",
|
||||
"integrity": "sha512-zMc+Dy7zl7cT8YduaUEpvLkRDVfZp8jZ1v13VjueX/VhsSXK0DW+OX/Mc8CU1Qx6Gg6tUMKxqmILdXZwxCrh6Q==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.70.0.tgz",
|
||||
"integrity": "sha512-sfQq2cetMAH9CWS9UINTDdZ+Hs735C6CojtG6dkeA+BJe0gJg+NmQI2qwePQ1jY9p9D+lHMMl56ispYQQnaCjg==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-api-design-systems": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-api-design-systems": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.69.3.tgz",
|
||||
"integrity": "sha512-BbsBxxZxTMX2rKgVKJtqPoAsER0JvCe1pt3NUBLuQssugvpwaqimIsKC65dwspHFGSn0CVdBKA4n/XhZ3aT7tw==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.70.0.tgz",
|
||||
"integrity": "sha512-u35roIPmq9zvXKfuGyMzY9gZMj1kTLmFSdCvOA5JvysEQLSx59s/Qs4um+BLvH2Z9/D5DYVb2cnyujTIVmoMYg==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.69.3.tgz",
|
||||
"integrity": "sha512-lae39qaKrkls+iVzYuc9CUyCbRl80wNK8iBWriSVETv5IwlVS6wywtTxCqtzcpd5K+m9KqXAlSkd+Z2AS9cWuQ==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.70.0.tgz",
|
||||
"integrity": "sha512-NYxbr+BFDf6y92+o8sFaQ0UWxh72jNo8TkCl1/JYSrc5QuLSIu5UIMbjtLPGY+82okMRxCwjG7dCd8h62/KpiQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-json": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.69.3.tgz",
|
||||
"integrity": "sha512-Z1CqG9OcV4WVESdQ1D0s5JUa2jeF8hpw4RupMDJ4lRoKTVeIDS5Qb7OOhIGeKpK2DgMep9SN2ULYJdgldPtq/A==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.70.0.tgz",
|
||||
"integrity": "sha512-j0Pb4Xg1VdFaCwYInF9qQxCDpaznzgse4oSUy1uJkLK0W/eC6bLNHyDGJmxR/TAqxY4yzb5zNCJnlJkjZqKxkQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-ast": "^0.69.3",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2",
|
||||
"@swagger-api/apidom-ast": "^0.70.0",
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2",
|
||||
"tree-sitter": "=0.20.1",
|
||||
"tree-sitter-json": "=0.20.0",
|
||||
"web-tree-sitter": "=0.20.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.69.3.tgz",
|
||||
"integrity": "sha512-f5Xby5hAGy4VujkV74UA61UkSVRsNzhcBaW0IIapVVepFEclfU7J3dGvfkMIXv5Bg0infGeKddIUZUY61JN88w==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.70.0.tgz",
|
||||
"integrity": "sha512-GsQH3GaOWVnGYtd+jajrsXjn1N0JqH1cQz/RoyxaD2zeI0LDW3efXGfa2zr3tFWqxTPrdOIMu6irH8aWtiC5sA==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.69.3.tgz",
|
||||
"integrity": "sha512-Yq3k/d89Nmf+ePD5EIIkhXNti2Ru5XMqOXDbNQGKHH00e252Q+c+QF2A7Pgdy0xP3oA9OoYTGHLtL0ncmzYB9A==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.70.0.tgz",
|
||||
"integrity": "sha512-e8bUiTa+q4xTS77hZC9pyg6U91rWlbfXBhzUGAn6fB+JF4PXxyep6sH+8JbJvGjI6DFvvuiwzRvVFt6DyKFhZg==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.69.3.tgz",
|
||||
"integrity": "sha512-X4Qtg/0n0l2leWBBZC8+7Kj6eP3pqB4WCWlacoWuldz8WBDBuffTBmTV/qe6gKdI4DW6mX5ovxDf+tz2tr0ppQ==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.70.0.tgz",
|
||||
"integrity": "sha512-4dwRV9uhjuIziV5Z9742RpVCo+QtrQDrGxh5pQaTbU8mNvXdrZ7ebFOxYQIPmxGcPAbxm1x6dvicUvhs97Lsrg==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.69.3.tgz",
|
||||
"integrity": "sha512-ZW/2T92HZT2RQOPW1VOa78VyDYD5wwR9EGNKXBsfMCnl0zVHwhwwkn/GgsYS0VDk56t43ww5DHM976q4ukF6Ew==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.70.0.tgz",
|
||||
"integrity": "sha512-u/JE8maz+PSm3prCTE9jx0XaK1/+kxoFT1v7l9AXqAyczsyQ/FMPNUvQ8Qyr/Jad5wHW6IcIIhqG79n4e819JQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.69.3.tgz",
|
||||
"integrity": "sha512-HJ/OiXnVoUshwKrfaHDq4LfKeKxBsa6Bmo8NVdSZiRfeA1Y/fAx9mWW5xSzTADxmc6yA2MevnfIoq7W0NX6SSQ==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.70.0.tgz",
|
||||
"integrity": "sha512-DfJ9f7Qm6QdmGJMMHicksEZKRJYR0yY9KTF+UKPBGChakXxr9Gt6ZkxWwRz0ataPFJZbW+Q8/P56Mrp/ETH+WQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-ast": "^0.69.3",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2",
|
||||
"@swagger-api/apidom-ast": "^0.70.0",
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2",
|
||||
"tree-sitter": "=0.20.1",
|
||||
"tree-sitter-yaml": "=0.5.0",
|
||||
"web-tree-sitter": "=0.20.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-reference": {
|
||||
"version": "0.69.3",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.69.3.tgz",
|
||||
"integrity": "sha512-dimoVsW4COR4TUTgOqTnXSZAIdYOepIudWOvca2fGOcXg85eBMS4xJlNHx1095Fm664y5y8DVxIYe1oLu9gjVA==",
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.70.0.tgz",
|
||||
"integrity": "sha512-HKfDmfQQc/RmdSdOpN/WtGF+97WjgRmvIdt3FmuPTqFRM4CeGpDM/MXvcxa71sN1yUx/o6LkRRwYSqDlYfutIw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.7",
|
||||
"@swagger-api/apidom-core": "^0.69.3",
|
||||
"@types/ramda": "=0.29.0",
|
||||
"axios": "=1.3.6",
|
||||
"minimatch": "=7.4.3",
|
||||
"process": "=0.11.10",
|
||||
"ramda": "=0.29.0",
|
||||
"ramda-adjunct": "=4.0.0",
|
||||
"stampit": "=4.3.2"
|
||||
"@swagger-api/apidom-core": "^0.70.0",
|
||||
"@types/ramda": "~0.29.1",
|
||||
"axios": "^1.4.0",
|
||||
"minimatch": "^7.4.3",
|
||||
"process": "^0.11.10",
|
||||
"ramda": "~0.29.0",
|
||||
"ramda-adjunct": "^4.0.0",
|
||||
"stampit": "^4.3.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@swagger-api/apidom-json-pointer": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.69.3",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.69.3",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@swagger-api/apidom-reference/node_modules/axios": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz",
|
||||
"integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
"@swagger-api/apidom-json-pointer": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-asyncapi-2": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-0": "^0.70.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-json": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.70.0",
|
||||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.70.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/ramda": {
|
||||
"version": "0.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.29.0.tgz",
|
||||
"integrity": "sha512-TY9eKsklU43CmAbFJPKDUyBjleZ4EFAkbJeQRF4e8byGkOw1CjDcwg5EGa0Bgf0Kgs9BE9OU4UzQWnQDHnvMtA==",
|
||||
"version": "0.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.29.2.tgz",
|
||||
"integrity": "sha512-JxvBGR3G4gV3RTOBugVHAAOD6iiv2WjlJ8BHr0s7KALdPpx2l+didoTuoJMmrA0eqpUaCm/slKP4TmxMRihd8g==",
|
||||
"dependencies": {
|
||||
"types-ramda": "^0.29.1"
|
||||
"types-ramda": "^0.29.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/trusted-types": {
|
||||
@@ -789,36 +780,36 @@
|
||||
"integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g=="
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
|
||||
"integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
|
||||
"integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.21.3",
|
||||
"@vue/shared": "3.3.2",
|
||||
"@vue/shared": "3.3.4",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
|
||||
"integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
|
||||
"integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.3.2",
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/compiler-core": "3.3.4",
|
||||
"@vue/shared": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
|
||||
"integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
|
||||
"integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.20.15",
|
||||
"@vue/compiler-core": "3.3.2",
|
||||
"@vue/compiler-dom": "3.3.2",
|
||||
"@vue/compiler-ssr": "3.3.2",
|
||||
"@vue/reactivity-transform": "3.3.2",
|
||||
"@vue/shared": "3.3.2",
|
||||
"@vue/compiler-core": "3.3.4",
|
||||
"@vue/compiler-dom": "3.3.4",
|
||||
"@vue/compiler-ssr": "3.3.4",
|
||||
"@vue/reactivity-transform": "3.3.4",
|
||||
"@vue/shared": "3.3.4",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.0",
|
||||
"postcss": "^8.1.10",
|
||||
@@ -826,69 +817,69 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
|
||||
"integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
|
||||
"integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.3.2",
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/compiler-dom": "3.3.4",
|
||||
"@vue/shared": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
|
||||
"integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
|
||||
"integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/shared": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/reactivity-transform": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
|
||||
"integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
|
||||
"integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.20.15",
|
||||
"@vue/compiler-core": "3.3.2",
|
||||
"@vue/shared": "3.3.2",
|
||||
"@vue/compiler-core": "3.3.4",
|
||||
"@vue/shared": "3.3.4",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-core": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
|
||||
"integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
|
||||
"integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "3.3.2",
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/reactivity": "3.3.4",
|
||||
"@vue/shared": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-dom": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
|
||||
"integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
|
||||
"integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.3.2",
|
||||
"@vue/shared": "3.3.2",
|
||||
"@vue/runtime-core": "3.3.4",
|
||||
"@vue/shared": "3.3.4",
|
||||
"csstype": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/server-renderer": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
|
||||
"integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
|
||||
"integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-ssr": "3.3.2",
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/compiler-ssr": "3.3.4",
|
||||
"@vue/shared": "3.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3.3.2"
|
||||
"vue": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
|
||||
"integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
|
||||
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
@@ -1039,9 +1030,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/bootstrap": {
|
||||
"version": "5.2.3",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz",
|
||||
"integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.0.tgz",
|
||||
"integrity": "sha512-UnBV3E3v4STVNQdms6jSGO2CvOkjUMdDAVR2V5N4uCMdaIkaQjbcEAMqRimDHIs4uqBYzDAKCQwCB+97tJgHQw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
@@ -1053,7 +1044,7 @@
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@popperjs/core": "^2.11.6"
|
||||
"@popperjs/core": "^2.11.7"
|
||||
}
|
||||
},
|
||||
"node_modules/bootstrap-icons": {
|
||||
@@ -1173,6 +1164,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-hash": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/color-hash/-/color-hash-2.0.2.tgz",
|
||||
"integrity": "sha512-6exeENAqBTuIR1wIo36mR8xVVBv6l1hSLd7Qmvf6158Ld1L15/dbahR9VUOiX7GmGJBCnQyS0EY+I8x+wa7egg=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
@@ -1784,9 +1780,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "7.4.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.3.tgz",
|
||||
"integrity": "sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==",
|
||||
"version": "7.4.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz",
|
||||
"integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
@@ -1975,9 +1971,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.23",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
|
||||
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
|
||||
"version": "8.4.24",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz",
|
||||
"integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -2373,15 +2369,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/swagger-client": {
|
||||
"version": "3.19.7",
|
||||
"resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.19.7.tgz",
|
||||
"integrity": "sha512-5U4+tksrzVODZaLTtivzS9be6u7rX5ZSWFKDIYWsy8HCwt9FH1ANrrGpY1wDHydpOeaySbxMjMaqEM9cGWxOuQ==",
|
||||
"version": "3.19.8",
|
||||
"resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.19.8.tgz",
|
||||
"integrity": "sha512-+zfLp+1U6kOK+o9QyYDWMXxMYGKiOK20LFjNDtZsVzscbg1S3REKW5BaH9zioWKtK1x2zZWeiqnhNKDL8WgLTQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs3": "^7.20.13",
|
||||
"@swagger-api/apidom-core": ">=0.69.3 <1.0.0",
|
||||
"@swagger-api/apidom-json-pointer": ">=0.69.3 <1.0.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": ">=0.69.3 <1.0.0",
|
||||
"@swagger-api/apidom-reference": ">=0.69.3 <1.0.0",
|
||||
"@swagger-api/apidom-core": ">=0.70.0 <1.0.0",
|
||||
"@swagger-api/apidom-json-pointer": ">=0.70.0 <1.0.0",
|
||||
"@swagger-api/apidom-ns-openapi-3-1": ">=0.70.0 <1.0.0",
|
||||
"@swagger-api/apidom-reference": ">=0.70.0 <1.0.0",
|
||||
"cookie": "~0.5.0",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"deepmerge": "~4.3.0",
|
||||
@@ -2517,9 +2513,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/types-ramda": {
|
||||
"version": "0.29.2",
|
||||
"resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.29.2.tgz",
|
||||
"integrity": "sha512-HpLcR0ly2EfXQwG8VSI5ov6ml7PvtT+u+cp+7lZLu7q4nhnPDVW+rUTC1uy/SNs4aAyTUXri5M/LyhgvjEXJDg==",
|
||||
"version": "0.29.3",
|
||||
"resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.29.3.tgz",
|
||||
"integrity": "sha512-6z8/UCI5/kRorQ91Mo+TUXImHpGAhmhg8ZIdT/tNrG+xSQvDwJXYyT5Nlw2U5VpoKetUZVqQXYYLQyq5Bzccsg==",
|
||||
"dependencies": {
|
||||
"ts-toolbelt": "^9.6.0"
|
||||
}
|
||||
@@ -2545,15 +2541,15 @@
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
|
||||
"integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
|
||||
"integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.3.2",
|
||||
"@vue/compiler-sfc": "3.3.2",
|
||||
"@vue/runtime-dom": "3.3.2",
|
||||
"@vue/server-renderer": "3.3.2",
|
||||
"@vue/shared": "3.3.2"
|
||||
"@vue/compiler-dom": "3.3.4",
|
||||
"@vue/compiler-sfc": "3.3.4",
|
||||
"@vue/runtime-dom": "3.3.4",
|
||||
"@vue/server-renderer": "3.3.4",
|
||||
"@vue/shared": "3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/web-streams-polyfill": {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"bootstrap": "^5.2.0",
|
||||
"bootstrap-icons": "^1.9.1",
|
||||
"bootstrap5-tags": "^1.4.41",
|
||||
"color-hash": "^2.0.2",
|
||||
"moment": "^2.29.4",
|
||||
"prismjs": "^1.29.0",
|
||||
"rapidoc": "^9.3.4",
|
||||
|
||||
@@ -3,8 +3,16 @@ package cmd
|
||||
|
||||
/**
|
||||
* Bare bones sendmail drop-in replacement borrowed from MailHog
|
||||
*
|
||||
* It uses a bit of a hack for flag parsing in order to be compatible
|
||||
* with the cobra sendmail subcommand, as sendmail uses `-bc` which
|
||||
* is not POSIX compatible.
|
||||
*
|
||||
* The -bs command-line switch causes sendmail to run a single SMTP session in the
|
||||
* foreground over its standard input and output, and then exit. The SMTP session
|
||||
* is exactly like a network SMTP session. Usually, one or more messages are
|
||||
* submitted to sendmail for delivery.
|
||||
*/
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
@@ -13,21 +21,27 @@ import (
|
||||
"net/smtp"
|
||||
"os"
|
||||
"os/user"
|
||||
"strings"
|
||||
|
||||
"github.com/axllent/mailpit/config"
|
||||
"github.com/axllent/mailpit/utils/logger"
|
||||
"github.com/reiver/go-telnet"
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
var (
|
||||
// Verbose flag
|
||||
Verbose bool
|
||||
// SMTPAddr address
|
||||
SMTPAddr = "localhost:1025"
|
||||
// FromAddr email address
|
||||
FromAddr string
|
||||
|
||||
fromAddr string
|
||||
// UseB - used to set from `-bs`
|
||||
UseB bool
|
||||
// UseS - used to set from `-bs`
|
||||
UseS bool
|
||||
)
|
||||
|
||||
// Run the Mailpit sendmail replacement.
|
||||
func Run() {
|
||||
func init() {
|
||||
host, err := os.Hostname()
|
||||
if err != nil {
|
||||
host = "localhost"
|
||||
@@ -39,47 +53,68 @@ func Run() {
|
||||
username = user.Username
|
||||
}
|
||||
|
||||
if fromAddr == "" {
|
||||
fromAddr = username + "@" + host
|
||||
if FromAddr == "" {
|
||||
FromAddr = username + "@" + host
|
||||
}
|
||||
}
|
||||
|
||||
smtpAddr := "localhost:1025"
|
||||
var recip []string
|
||||
// Run the Mailpit sendmail replacement.
|
||||
func Run() {
|
||||
var recipients []string
|
||||
|
||||
// defaults from envars if provided
|
||||
if len(os.Getenv("MP_SENDMAIL_SMTP_ADDR")) > 0 {
|
||||
smtpAddr = os.Getenv("MP_SENDMAIL_SMTP_ADDR")
|
||||
SMTPAddr = os.Getenv("MP_SENDMAIL_SMTP_ADDR")
|
||||
}
|
||||
if len(os.Getenv("MP_SENDMAIL_FROM")) > 0 {
|
||||
fromAddr = os.Getenv("MP_SENDMAIL_FROM")
|
||||
FromAddr = os.Getenv("MP_SENDMAIL_FROM")
|
||||
}
|
||||
|
||||
// override defaults from cli flags
|
||||
flag.StringVarP(&fromAddr, "from", "f", fromAddr, "SMTP sender address")
|
||||
flag.StringVarP(&smtpAddr, "smtp-addr", "S", smtpAddr, "SMTP server address")
|
||||
flag.BoolVarP(&Verbose, "verbose", "v", false, "Verbose mode (sends debug output to stderr)")
|
||||
flag.BoolP("long-b", "b", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
flag.BoolP("long-i", "i", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
flag.BoolP("long-o", "o", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
flag.BoolP("long-s", "s", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
flag.BoolP("long-t", "t", false, "Ignored. This flag exists for sendmail compatibility.")
|
||||
flag.CommandLine.SortFlags = false
|
||||
flag.StringVarP(&FromAddr, "from", "f", FromAddr, "SMTP sender")
|
||||
flag.StringVarP(&SMTPAddr, "smtp-addr", "S", SMTPAddr, "SMTP server address")
|
||||
flag.BoolVarP(&UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||
flag.BoolVarP(&UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||
flag.BoolP("verbose", "v", false, "Ignored")
|
||||
flag.BoolP("long-i", "i", false, "Ignored")
|
||||
flag.BoolP("long-o", "o", false, "Ignored")
|
||||
flag.BoolP("long-t", "t", false, "Ignored")
|
||||
|
||||
// set the default help
|
||||
flag.Usage = func() {
|
||||
fmt.Printf("A sendmail command replacement for Mailpit (%s).\n\n", config.Version)
|
||||
fmt.Printf("Usage:\n %s [flags] [recipients]\n", os.Args[0])
|
||||
fmt.Println("\nFlags:")
|
||||
flag.PrintDefaults()
|
||||
fmt.Println(HelpTemplate(os.Args[0:1]))
|
||||
}
|
||||
|
||||
var showHelp bool
|
||||
// avoid 'pflag: help requested' error
|
||||
flag.BoolVarP(&showHelp, "help", "h", false, "")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
// allow recipient to be passed as an argument
|
||||
recip = flag.Args()
|
||||
// allow recipients to be passed as an argument
|
||||
recipients = flag.Args()
|
||||
|
||||
if Verbose {
|
||||
fmt.Fprintln(os.Stdout, smtpAddr, fromAddr)
|
||||
if showHelp {
|
||||
flag.Usage()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// ensure -bs is set
|
||||
if UseB && !UseS || !UseB && UseS {
|
||||
fmt.Printf("error: use -bs")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// handles `sendmail -bs`
|
||||
if UseB && UseS {
|
||||
var caller telnet.Caller = telnet.StandardCaller
|
||||
|
||||
// telnet directly to SMTP
|
||||
if err := telnet.DialToAndCall(SMTPAddr, caller); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(os.Stdin)
|
||||
@@ -96,8 +131,8 @@ func Run() {
|
||||
|
||||
addresses := []string{}
|
||||
|
||||
if len(recip) > 0 {
|
||||
addresses = recip
|
||||
if len(recipients) > 0 {
|
||||
addresses = recipients
|
||||
} else {
|
||||
// get all recipients in To, Cc and Bcc
|
||||
if to, err := msg.Header.AddressList("To"); err == nil {
|
||||
@@ -117,9 +152,28 @@ func Run() {
|
||||
}
|
||||
}
|
||||
|
||||
err = smtp.SendMail(smtpAddr, nil, fromAddr, addresses, body)
|
||||
err = smtp.SendMail(SMTPAddr, nil, FromAddr, addresses, body)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "error sending mail")
|
||||
logger.Log().Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// HelpTemplate returns a string of the help
|
||||
func HelpTemplate(args []string) string {
|
||||
return fmt.Sprintf(`A sendmail command replacement for Mailpit (%s)
|
||||
|
||||
Usage: %s [flags] [recipients] < message
|
||||
|
||||
See: https://github.com/axllent/mailpit
|
||||
|
||||
Flags:
|
||||
-S string SMTP server address (default "localhost:1025")
|
||||
-f string Set the envelope sender address (default "%s")
|
||||
-bs Handle SMTP commands on standard input
|
||||
-t Ignored
|
||||
-i Ignored
|
||||
-o Ignored
|
||||
-v Ignored
|
||||
`, config.Version, strings.Join(args, " "), FromAddr)
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ func GetMessage(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: Message ID
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
//
|
||||
@@ -188,7 +188,7 @@ func DownloadAttachment(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: Message ID
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
// + name: PartID
|
||||
@@ -237,7 +237,7 @@ func GetHeaders(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: Message ID
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
//
|
||||
@@ -284,7 +284,7 @@ func DownloadRaw(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: Message ID
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
//
|
||||
@@ -330,7 +330,7 @@ func DeleteMessages(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ids
|
||||
// in: body
|
||||
// description: Message IDs to delete
|
||||
// description: Database IDs to delete
|
||||
// required: false
|
||||
// type: DeleteRequest
|
||||
//
|
||||
@@ -381,7 +381,7 @@ func SetReadStatus(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ids
|
||||
// in: body
|
||||
// description: Message IDs to update
|
||||
// description: Database IDs to update
|
||||
// required: false
|
||||
// type: SetReadStatusRequest
|
||||
//
|
||||
@@ -459,7 +459,7 @@ func SetTags(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ids
|
||||
// in: body
|
||||
// description: Message IDs to update
|
||||
// description: Database IDs to update
|
||||
// required: true
|
||||
// type: SetTagsRequest
|
||||
//
|
||||
@@ -502,7 +502,7 @@ func ReleaseMessage(w http.ResponseWriter, r *http.Request) {
|
||||
//
|
||||
// # Release message
|
||||
//
|
||||
// Release a message via a preconfigured external SMTP server..
|
||||
// Release a message via a pre-configured external SMTP server..
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
@@ -515,7 +515,7 @@ func ReleaseMessage(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: Message ID
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
// + name: to
|
||||
|
||||
@@ -39,12 +39,12 @@ func Thumbnail(w http.ResponseWriter, r *http.Request) {
|
||||
// Parameters:
|
||||
// + name: ID
|
||||
// in: path
|
||||
// description: message id
|
||||
// description: Database ID
|
||||
// required: true
|
||||
// type: string
|
||||
// + name: PartID
|
||||
// in: path
|
||||
// description: attachment part id
|
||||
// description: Attachment part ID
|
||||
// required: true
|
||||
// type: string
|
||||
//
|
||||
|
||||
@@ -68,10 +68,10 @@ func Listen() {
|
||||
isReady.Store(true)
|
||||
|
||||
if config.UITLSCert != "" && config.UITLSKey != "" {
|
||||
logger.Log().Infof("[http] starting secure server on https://%s%s", logger.CleanIP(config.HTTPListen), config.Webroot)
|
||||
logger.Log().Infof("[http] starting secure server on https://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
||||
logger.Log().Fatal(http.ListenAndServeTLS(config.HTTPListen, config.UITLSCert, config.UITLSKey, nil))
|
||||
} else {
|
||||
logger.Log().Infof("[http] starting server on http://%s%s", logger.CleanIP(config.HTTPListen), config.Webroot)
|
||||
logger.Log().Infof("[http] starting server on http://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
||||
logger.Log().Fatal(http.ListenAndServe(config.HTTPListen, nil))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,10 @@ func Send(from string, to []string, msg []byte) error {
|
||||
a = smtp.PlainAuth("", config.SMTPRelayConfig.Username, config.SMTPRelayConfig.Password, config.SMTPRelayConfig.Host)
|
||||
}
|
||||
|
||||
if config.SMTPRelayConfig.Auth == "login" {
|
||||
a = LoginAuth(config.SMTPRelayConfig.Username, config.SMTPRelayConfig.Password)
|
||||
}
|
||||
|
||||
if config.SMTPRelayConfig.Auth == "cram-md5" {
|
||||
a = smtp.CRAMMD5Auth(config.SMTPRelayConfig.Username, config.SMTPRelayConfig.Secret)
|
||||
}
|
||||
@@ -103,3 +107,33 @@ func Send(from string, to []string, msg []byte) error {
|
||||
|
||||
return c.Quit()
|
||||
}
|
||||
|
||||
// Custom implementation of LOGIN SMTP authentication
|
||||
// @see https://gist.github.com/andelf/5118732
|
||||
type loginAuth struct {
|
||||
username, password string
|
||||
}
|
||||
|
||||
// LoginAuth authentication
|
||||
func LoginAuth(username, password string) smtp.Auth {
|
||||
return &loginAuth{username, password}
|
||||
}
|
||||
|
||||
func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
|
||||
return "LOGIN", []byte{}, nil
|
||||
}
|
||||
|
||||
func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
|
||||
if more {
|
||||
switch string(fromServer) {
|
||||
case "Username:":
|
||||
return []byte(a.username), nil
|
||||
case "Password:":
|
||||
return []byte(a.password), nil
|
||||
default:
|
||||
return nil, errors.New("Unknown fromServer")
|
||||
}
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ func mailHandler(origin net.Addr, from string, to []string, data []byte) error {
|
||||
|
||||
_, err = storage.Store(data)
|
||||
if err != nil {
|
||||
logger.Log().Errorf("[db] error storing message: %d", err.Error())
|
||||
logger.Log().Errorf("[db] error storing message: %s", err.Error())
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script>
|
||||
import commonMixins from './mixins.js';
|
||||
import Message from './templates/Message.vue';
|
||||
import MessageSummary from './templates/MessageSummary.vue';
|
||||
import MessageRelease from './templates/MessageRelease.vue';
|
||||
import MessageToast from './templates/MessageToast.vue';
|
||||
import moment from 'moment';
|
||||
import Tinycon from 'tinycon';
|
||||
import commonMixins from './mixins.js'
|
||||
import Message from './templates/Message.vue'
|
||||
import MessageSummary from './templates/MessageSummary.vue'
|
||||
import MessageRelease from './templates/MessageRelease.vue'
|
||||
import MessageToast from './templates/MessageToast.vue'
|
||||
import moment from 'moment'
|
||||
import Tinycon from 'tinycon'
|
||||
|
||||
export default {
|
||||
mixins: [commonMixins],
|
||||
@@ -74,6 +74,13 @@ export default {
|
||||
},
|
||||
canNext: function () {
|
||||
return this.total > (this.start + this.count);
|
||||
},
|
||||
unreadInSearch: function () {
|
||||
if (!this.searching) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.items.filter(i => !i.Read).length;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -83,7 +90,7 @@ export default {
|
||||
this.currentPath = window.location.hash.slice(1);
|
||||
});
|
||||
|
||||
this.notificationsSupported = 'https:' == document.location.protocol
|
||||
this.notificationsSupported = window.isSecureContext
|
||||
&& ("Notification" in window && Notification.permission !== "denied");
|
||||
this.notificationsEnabled = this.notificationsSupported && Notification.permission == "granted";
|
||||
|
||||
@@ -93,6 +100,27 @@ export default {
|
||||
fallback: false
|
||||
});
|
||||
|
||||
moment.updateLocale('en', {
|
||||
relativeTime: {
|
||||
future: "in %s",
|
||||
past: "%s ago",
|
||||
s: 'seconds',
|
||||
ss: '%d secs',
|
||||
m: "a minute",
|
||||
mm: "%d mins",
|
||||
h: "an hour",
|
||||
hh: "%d hours",
|
||||
d: "a day",
|
||||
dd: "%d days",
|
||||
w: "a week",
|
||||
ww: "%d weeks",
|
||||
M: "a month",
|
||||
MM: "%d months",
|
||||
y: "a year",
|
||||
yy: "%d years"
|
||||
}
|
||||
});
|
||||
|
||||
this.connect();
|
||||
this.getUISettings();
|
||||
this.loadMessages();
|
||||
@@ -304,6 +332,24 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// delete messages displayed in current search
|
||||
deleteSearch: function () {
|
||||
let ids = this.items.map(item => item.ID);
|
||||
|
||||
if (!ids.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let uri = 'api/v1/messages';
|
||||
self.delete(uri, { 'ids': ids }, function (response) {
|
||||
window.location.hash = "";
|
||||
self.scrollInPlace = true;
|
||||
self.loadMessages();
|
||||
});
|
||||
},
|
||||
|
||||
// delete all messages from mailbox
|
||||
deleteAll: function () {
|
||||
let self = this;
|
||||
let uri = 'api/v1/messages';
|
||||
@@ -313,6 +359,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// mark current message as read
|
||||
markUnread: function () {
|
||||
let self = this;
|
||||
if (!self.message) {
|
||||
@@ -326,6 +373,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// mark all messages in mailbox as read
|
||||
markAllRead: function () {
|
||||
let self = this;
|
||||
let uri = 'api/v1/messages'
|
||||
@@ -336,6 +384,24 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// mark messages in current search as read
|
||||
markSearchRead: function () {
|
||||
let ids = this.items.map(item => item.ID);
|
||||
|
||||
if (!ids.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let uri = 'api/v1/messages';
|
||||
self.put(uri, { 'read': true, 'ids': ids }, function (response) {
|
||||
window.location.hash = "";
|
||||
self.scrollInPlace = true;
|
||||
self.loadMessages();
|
||||
});
|
||||
},
|
||||
|
||||
// mark selected messages as read
|
||||
markSelectedRead: function () {
|
||||
let self = this;
|
||||
if (!self.selected.length) {
|
||||
@@ -349,6 +415,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// mark selected messages as unread
|
||||
markSelectedUnread: function () {
|
||||
let self = this;
|
||||
if (!self.selected.length) {
|
||||
@@ -362,7 +429,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// test of any selected emails are unread
|
||||
// test if any selected emails are unread
|
||||
selectedHasUnread: function () {
|
||||
if (!this.selected.length) {
|
||||
return false;
|
||||
@@ -609,7 +676,8 @@ export default {
|
||||
},
|
||||
|
||||
setMessageToast: function (m) {
|
||||
if (this.toastMessage) {
|
||||
// don't display if browser notifications are enabled, or a toast is already displayed
|
||||
if (this.notificationsEnabled || this.toastMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -708,7 +776,8 @@ export default {
|
||||
<span v-if="!total" class="ms-2">Mailpit</span>
|
||||
</a>
|
||||
<div v-if="total" class="ms-md-2 d-flex bg-white border rounded-start flex-fill position-relative">
|
||||
<input type="text" class="form-control border-0" v-model.trim="search" placeholder="Search mailbox">
|
||||
<input type="text" class="form-control border-0" aria-label="Search" v-model.trim="search"
|
||||
placeholder="Search mailbox">
|
||||
<span class="btn btn-link position-absolute end-0 text-muted" v-if="search"
|
||||
v-on:click="resetSearch"><i class="bi bi-x-circle"></i></span>
|
||||
</div>
|
||||
@@ -719,13 +788,22 @@ export default {
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 col-lg-5 text-end mt-2 mt-lg-0" v-if="!message && total">
|
||||
<button v-if="total" class="btn btn-danger float-start d-md-none me-2" data-bs-toggle="modal"
|
||||
data-bs-target="#DeleteAllModal" title="Delete all messages">
|
||||
<button v-if="searching && items.length" class="btn btn-danger float-start d-md-none me-2"
|
||||
data-bs-toggle="modal" data-bs-target="#DeleteSearchModal" :disabled="!items" title="Delete results">
|
||||
<i class="bi bi-trash-fill"></i>
|
||||
</button>
|
||||
<button v-else class="btn btn-danger float-start d-md-none me-2" data-bs-toggle="modal"
|
||||
data-bs-target="#DeleteAllModal" :disabled="!total || searching" title="Delete all messages">
|
||||
<i class="bi bi-trash-fill"></i>
|
||||
</button>
|
||||
|
||||
<button v-if="unread" class="btn btn-light float-start d-md-none" data-bs-toggle="modal"
|
||||
data-bs-target="#MarkAllReadModal" title="Mark all read">
|
||||
<button v-if="searching && items.length" class="btn btn-light float-start d-md-none" data-bs-toggle="modal"
|
||||
data-bs-target="#MarkSearchReadModal" :disabled="!unreadInSearch"
|
||||
:title="'Mark ' + formatNumber(unreadInSearch) + ' read'">
|
||||
<i class="bi bi-check2-square"></i>
|
||||
</button>
|
||||
<button v-else class="btn btn-light float-start d-md-none" data-bs-toggle="modal"
|
||||
data-bs-target="#MarkAllReadModal" :disabled="!unread || searching">
|
||||
<i class="bi bi-check2-square"></i>
|
||||
</button>
|
||||
|
||||
@@ -765,10 +843,10 @@ export default {
|
||||
class="list-group-item list-group-item-action" :class="!searching && !message ? 'active' : ''">
|
||||
<template v-if="isConnected">
|
||||
<i class="bi bi-envelope-fill me-1" v-if="!searching && !message"></i>
|
||||
<i class="bi bi-arrow-return-left" v-else></i>
|
||||
<i class="bi bi-arrow-return-left me-1" v-else></i>
|
||||
</template>
|
||||
<i class="bi bi-arrow-clockwise me-1" v-else></i>
|
||||
<span v-if="message" class="ms-1">Return</span>
|
||||
<span v-if="message" class="ms-1 me-1">Return</span>
|
||||
<span v-else class="ms-1">Inbox</span>
|
||||
<span class="badge rounded-pill ms-1 float-end text-bg-secondary" title="Unread messages">
|
||||
{{ formatNumber(unread) }}
|
||||
@@ -776,38 +854,49 @@ export default {
|
||||
</a>
|
||||
|
||||
<template v-if="!message && !selected.length">
|
||||
<button class="list-group-item list-group-item-action" data-bs-toggle="modal"
|
||||
<button v-if="searching && items.length" class="list-group-item list-group-item-action"
|
||||
data-bs-toggle="modal" data-bs-target="#MarkSearchReadModal" :disabled="!unreadInSearch">
|
||||
<i class="bi bi-eye-fill me-1"></i>
|
||||
Mark {{ formatNumber(unreadInSearch) }} read
|
||||
</button>
|
||||
<button v-else class="list-group-item list-group-item-action" data-bs-toggle="modal"
|
||||
data-bs-target="#MarkAllReadModal" :disabled="!unread || searching">
|
||||
<i class="bi bi-eye-fill"></i>
|
||||
<i class="bi bi-eye-fill me-1"></i>
|
||||
Mark all read
|
||||
</button>
|
||||
|
||||
<button class="list-group-item list-group-item-action" data-bs-toggle="modal"
|
||||
<button v-if="searching && items.length" class="list-group-item list-group-item-action"
|
||||
data-bs-toggle="modal" data-bs-target="#DeleteSearchModal" :disabled="!items">
|
||||
<i class="bi bi-trash-fill me-1 text-danger"></i>
|
||||
Delete {{ formatNumber(items.length) }} message<span v-if="items.length > 1">s</span>
|
||||
</button>
|
||||
<button v-else class="list-group-item list-group-item-action" data-bs-toggle="modal"
|
||||
data-bs-target="#DeleteAllModal" :disabled="!total || searching">
|
||||
<i class="bi bi-trash-fill me-1 text-danger"></i>
|
||||
Delete all
|
||||
</button>
|
||||
|
||||
<button class="list-group-item list-group-item-action" data-bs-toggle="modal"
|
||||
data-bs-target="#EnableNotificationsModal"
|
||||
v-if="isConnected && notificationsSupported && !notificationsEnabled">
|
||||
<i class="bi bi-bell"></i>
|
||||
<i class="bi bi-bell me-1"></i>
|
||||
Enable alerts
|
||||
</button>
|
||||
</template>
|
||||
<template v-if="!message && selected.length">
|
||||
<button class="list-group-item list-group-item-action" :disabled="!selectedHasUnread()"
|
||||
v-on:click="markSelectedRead">
|
||||
<i class="bi bi-eye-fill"></i>
|
||||
<i class="bi bi-eye-fill me-1"></i>
|
||||
Mark read
|
||||
</button>
|
||||
<button class="list-group-item list-group-item-action" :disabled="!selectedHasRead()"
|
||||
v-on:click="markSelectedUnread">
|
||||
<i class="bi bi-eye-slash"></i>
|
||||
<i class="bi bi-eye-slash me-1"></i>
|
||||
Mark unread
|
||||
</button>
|
||||
<button class="list-group-item list-group-item-action" v-on:click="deleteMessages">
|
||||
<i class="bi bi-trash-fill me-1 text-danger"></i>
|
||||
Delete
|
||||
Delete selected
|
||||
</button>
|
||||
<button class="list-group-item list-group-item-action" v-on:click="selected = []">
|
||||
<i class="bi bi-x-circle me-1"></i>
|
||||
@@ -817,9 +906,23 @@ export default {
|
||||
</div>
|
||||
|
||||
<template v-if="!selected.length && tags.length && !message">
|
||||
<h6 class="mt-4 text-muted"><small>Tags</small></h6>
|
||||
<div class="list-group mt-2 mb-5">
|
||||
<button class="list-group-item list-group-item-action" v-for="tag in tags"
|
||||
<div class="mt-4 text-muted">
|
||||
<button class="btn btn-sm dropdown-toggle ms-n1" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Tags
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<button class="dropdown-item" @click="toggleTagColors()">
|
||||
<template v-if="showTagColors">Hide</template>
|
||||
<template v-else>Show</template>
|
||||
tag colors
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list-group mt-1 mb-5">
|
||||
<button class="list-group-item list-group-item-action small px-2" v-for="tag in tags"
|
||||
:style="showTagColors ? { borderLeftColor: colorHash(tag), borderLeftWidth: '4px' } : ''"
|
||||
v-on:click="tagSearch($event, tag)" :class="inSearch(tag) ? 'active' : ''">
|
||||
<i class="bi bi-tag-fill" v-if="inSearch(tag)"></i>
|
||||
<i class="bi bi-tag" v-else></i>
|
||||
@@ -830,7 +933,7 @@ export default {
|
||||
|
||||
<MessageSummary v-if="message" :message="message"></MessageSummary>
|
||||
|
||||
<div class="position-fixed bottom-0 bg-white py-2 text-muted w-100">
|
||||
<div class="position-fixed bottom-0 bg-white py-2 text-muted small w-100">
|
||||
<a href="#" class="text-muted" v-on:click="loadInfo">
|
||||
<i class="bi bi-info-circle-fill"></i>
|
||||
About
|
||||
@@ -838,13 +941,13 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-10 col-md-9 mh-100 pe-0">
|
||||
<div class="col-lg-10 col-md-9 mh-100 ps-0 ps-md-2 pe-0">
|
||||
<div class="mh-100" style="overflow-y: auto;" :class="message ? 'd-none' : ''" id="message-page">
|
||||
<div class="list-group my-2" v-if="items.length">
|
||||
<a v-for="message in items" :href="'#' + message.ID"
|
||||
<a v-for="message in items" :href="'#' + message.ID" :key="message.ID"
|
||||
v-on:click.ctrl="toggleSelected($event, message.ID)"
|
||||
v-on:click.shift="selectRange($event, message.ID)"
|
||||
class="row message d-flex small list-group-item list-group-item-action border-start-0 border-end-0"
|
||||
class="row gx-1 message d-flex small list-group-item list-group-item-action border-start-0 border-end-0"
|
||||
:class="message.Read ? 'read' : '', isSelected(message.ID) ? 'selected' : ''">
|
||||
<div class="col-lg-3">
|
||||
<div class="d-lg-none float-end text-muted text-nowrap small">
|
||||
@@ -870,18 +973,21 @@ export default {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mt-2 mt-lg-0">
|
||||
<span class="badge text-bg-secondary me-1" v-for="t in message.Tags"
|
||||
:title="'Filter messages tagged with ' + t" v-on:click="tagSearch($event, t)">
|
||||
{{ t }}
|
||||
</span>
|
||||
<b>{{ message.Subject != "" ? message.Subject : "[ no subject ]" }}</b>
|
||||
<div class="col-lg-6 col-xxl-7 mt-2 mt-lg-0">
|
||||
<div><b>{{ message.Subject != "" ? message.Subject : "[ no subject ]" }}</b></div>
|
||||
<div>
|
||||
<span class="badge me-1" v-for="t in message.Tags"
|
||||
:style="showTagColors ? { backgroundColor: colorHash(t) } : { backgroundColor: '#6c757d' }"
|
||||
:title="'Filter messages tagged with ' + t" v-on:click="tagSearch($event, t)">
|
||||
{{ t }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-none d-lg-block col-1 small text-end text-muted">
|
||||
<i class="bi bi-paperclip float-start h6" v-if="message.Attachments"></i>
|
||||
{{ getFileSize(message.Size) }}
|
||||
</div>
|
||||
<div class="d-none d-lg-block col-2 small text-end text-muted">
|
||||
<div class="d-none d-lg-block col-2 col-xxl-1 small text-end text-muted">
|
||||
{{ getRelativeCreated(message) }}
|
||||
</div>
|
||||
</a>
|
||||
@@ -928,6 +1034,29 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="DeleteSearchModal" tabindex="-1" aria-labelledby="DeleteSearchModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="DeleteSearchModalLabel">
|
||||
Delete {{ formatNumber(items.length) }} search result<span v-if="items.length > 1">s</span>?
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
This will permanently delete {{ formatNumber(items.length) }} message<span v-if="total > 1">s</span>.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal"
|
||||
v-on:click="deleteSearch">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="MarkAllReadModal" tabindex="-1" aria-labelledby="MarkAllReadModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
@@ -948,6 +1077,30 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="MarkSearchReadModal" tabindex="-1" aria-labelledby="MarkSearchReadModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="MarkSearchReadModalLabel">
|
||||
Mark {{ formatNumber(unreadInSearch) }} search result<span v-if="unreadInSearch > 1">s</span> as
|
||||
read?
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
This will mark {{ formatNumber(unreadInSearch) }} message<span v-if="unread > 1">s</span> as read.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-success" data-bs-dismiss="modal"
|
||||
v-on:click="markSearchRead">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="EnableNotificationsModal" tabindex="-1" aria-labelledby="EnableNotificationsModalLabel"
|
||||
aria-hidden="true">
|
||||
|
||||
@@ -5,3 +5,4 @@ $font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetic
|
||||
$link-decoration: none;
|
||||
$primary: #2c3e50;
|
||||
$list-group-disabled-color: #adb5bd;
|
||||
$enable-negative-margins: true;
|
||||
|
||||
1
server/ui-src/assets/bootstrap.scss
vendored
1
server/ui-src/assets/bootstrap.scss
vendored
@@ -4,6 +4,7 @@
|
||||
// Configuration
|
||||
@import "../../../node_modules/bootstrap/scss/functions";
|
||||
@import "../../../node_modules/bootstrap/scss/variables";
|
||||
@import "../../../node_modules/bootstrap/scss/variables-dark";
|
||||
@import "../../../node_modules/bootstrap/scss/maps";
|
||||
@import "../../../node_modules/bootstrap/scss/mixins";
|
||||
@import "../../../node_modules/bootstrap/scss/utilities";
|
||||
|
||||
@@ -1,22 +1,32 @@
|
||||
import axios from 'axios';
|
||||
import { Modal } from 'bootstrap';
|
||||
import moment from 'moment';
|
||||
import axios from 'axios'
|
||||
import { Modal } from 'bootstrap'
|
||||
import moment from 'moment'
|
||||
import ColorHash from 'color-hash'
|
||||
|
||||
|
||||
// FakeModal is used to return a fake Bootstrap modal
|
||||
// if the ID returns nothing
|
||||
// if the ID returns nothing to prevent errors.
|
||||
function FakeModal() { }
|
||||
FakeModal.prototype.hide = function () { alert('close fake modal') }
|
||||
FakeModal.prototype.show = function () { alert('open fake modal') }
|
||||
FakeModal.prototype.hide = function () { }
|
||||
FakeModal.prototype.show = function () { }
|
||||
|
||||
// Set up the color hash generator lightness and hue to ensure darker colors
|
||||
const colorHash = new ColorHash({ lightness: 0.3, saturation: [0.35, 0.5, 0.65] });
|
||||
|
||||
/* Common mixin functions used in apps */
|
||||
const commonMixins = {
|
||||
data() {
|
||||
return {
|
||||
loading: 0
|
||||
loading: 0,
|
||||
tagColorCache: {},
|
||||
showTagColors: true
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.showTagColors = localStorage.getItem('showTagsColors')
|
||||
},
|
||||
|
||||
methods: {
|
||||
getFileSize: function (bytes) {
|
||||
var i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
@@ -201,6 +211,27 @@ const commonMixins = {
|
||||
}
|
||||
|
||||
return 'bi-file-arrow-down-fill';
|
||||
},
|
||||
|
||||
// Returns a hex color based on a string.
|
||||
// Values are stored in an array for faster lookup / processing.
|
||||
colorHash: function (s) {
|
||||
if (this.tagColorCache[s] != undefined) {
|
||||
return this.tagColorCache[s]
|
||||
}
|
||||
this.tagColorCache[s] = colorHash.hex(s)
|
||||
|
||||
return this.tagColorCache[s]
|
||||
},
|
||||
|
||||
toggleTagColors: function () {
|
||||
if (this.showTagColors) {
|
||||
localStorage.removeItem('showTagsColors')
|
||||
this.showTagColors = false
|
||||
} else {
|
||||
localStorage.setItem('showTagsColors', '1')
|
||||
this.showTagColors = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Message ID",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -103,7 +103,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Message ID",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -142,7 +142,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Message ID",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -183,14 +183,14 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "message id",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "attachment part id",
|
||||
"description": "Attachment part ID",
|
||||
"name": "PartID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -224,7 +224,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Message ID",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -242,7 +242,7 @@
|
||||
},
|
||||
"/api/v1/message/{ID}/release": {
|
||||
"post": {
|
||||
"description": "Release a message via a preconfigured external SMTP server..",
|
||||
"description": "Release a message via a pre-configured external SMTP server..",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -261,7 +261,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Message ID",
|
||||
"description": "Database ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -347,11 +347,11 @@
|
||||
"operationId": "SetReadStatus",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Message IDs to update",
|
||||
"description": "Database IDs to update",
|
||||
"name": "ids",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"description": "Message IDs to update",
|
||||
"description": "Database IDs to update",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/SetReadStatusRequest"
|
||||
}
|
||||
@@ -385,11 +385,11 @@
|
||||
"operationId": "Delete",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Message IDs to delete",
|
||||
"description": "Database IDs to delete",
|
||||
"name": "ids",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"description": "Message IDs to delete",
|
||||
"description": "Database IDs to delete",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeleteRequest"
|
||||
}
|
||||
@@ -466,12 +466,12 @@
|
||||
"operationId": "SetTags",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Message IDs to update",
|
||||
"description": "Database IDs to update",
|
||||
"name": "ids",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"description": "Message IDs to update",
|
||||
"description": "Database IDs to update",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/SetTagsRequest"
|
||||
}
|
||||
@@ -751,6 +751,10 @@
|
||||
"description": "Database ID",
|
||||
"type": "string"
|
||||
},
|
||||
"MessageID": {
|
||||
"description": "Message ID",
|
||||
"type": "string"
|
||||
},
|
||||
"Read": {
|
||||
"description": "Read status",
|
||||
"type": "boolean"
|
||||
@@ -901,6 +905,10 @@
|
||||
"description": "Whether message relaying (release) is enabled",
|
||||
"type": "boolean"
|
||||
},
|
||||
"RecipientAllowlist": {
|
||||
"description": "Allowlist of accepted recipients",
|
||||
"type": "string"
|
||||
},
|
||||
"ReturnPath": {
|
||||
"description": "Enforced Return-Path (if set) for relay bounces",
|
||||
"type": "string"
|
||||
|
||||
@@ -117,10 +117,6 @@ type DBMailSummary struct {
|
||||
To []*mail.Address
|
||||
Cc []*mail.Address
|
||||
Bcc []*mail.Address
|
||||
// Subject string
|
||||
// Size int
|
||||
// Inline int
|
||||
// Attachments int
|
||||
}
|
||||
|
||||
// InitDB will initialise the database
|
||||
@@ -211,7 +207,7 @@ func Close() {
|
||||
|
||||
// Store will save an email to the database tables
|
||||
func Store(body []byte) (string, error) {
|
||||
// Parse message body with enmime.
|
||||
// Parse message body with enmime
|
||||
env, err := enmime.ReadEnvelope(bytes.NewReader(body))
|
||||
if err != nil {
|
||||
logger.Log().Warningf("[db] %s", err.Error())
|
||||
@@ -255,7 +251,16 @@ func Store(body []byte) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
tagData := findTags(&body)
|
||||
// extract tags from body matches based on --tag
|
||||
tagStr := findTagsInRawMessage(&body)
|
||||
|
||||
// extract tags from X-Tags header
|
||||
headerTags := strings.TrimSpace(env.Root.Header.Get("X-Tags"))
|
||||
if headerTags != "" {
|
||||
tagStr += "," + headerTags
|
||||
}
|
||||
|
||||
tagData := uniqueTagsFromString(tagStr)
|
||||
|
||||
tagJSON, err := json.Marshal(tagData)
|
||||
if err != nil {
|
||||
@@ -303,6 +308,7 @@ func Store(body []byte) (string, error) {
|
||||
|
||||
c.Created = created
|
||||
c.ID = id
|
||||
c.MessageID = messageID
|
||||
c.Attachments = attachments
|
||||
c.Subject = subject
|
||||
c.Size = size
|
||||
@@ -321,7 +327,7 @@ func List(start, limit int) ([]MessageSummary, error) {
|
||||
results := []MessageSummary{}
|
||||
|
||||
q := sqlf.From("mailbox").
|
||||
Select(`Created, ID, Subject, Metadata, Size, Attachments, Read, Tags`).
|
||||
Select(`Created, ID, MessageID, Subject, Metadata, Size, Attachments, Read, Tags`).
|
||||
OrderBy("Created DESC").
|
||||
Limit(limit).
|
||||
Offset(start)
|
||||
@@ -329,6 +335,7 @@ func List(start, limit int) ([]MessageSummary, error) {
|
||||
if err := q.QueryAndClose(nil, db, func(row *sql.Rows) {
|
||||
var created int64
|
||||
var id string
|
||||
var messageID string
|
||||
var subject string
|
||||
var metadata string
|
||||
var size int
|
||||
@@ -337,7 +344,7 @@ func List(start, limit int) ([]MessageSummary, error) {
|
||||
var read int
|
||||
em := MessageSummary{}
|
||||
|
||||
if err := row.Scan(&created, &id, &subject, &metadata, &size, &attachments, &read, &tags); err != nil {
|
||||
if err := row.Scan(&created, &id, &messageID, &subject, &metadata, &size, &attachments, &read, &tags); err != nil {
|
||||
logger.Log().Error(err)
|
||||
return
|
||||
}
|
||||
@@ -354,6 +361,7 @@ func List(start, limit int) ([]MessageSummary, error) {
|
||||
|
||||
em.Created = time.UnixMilli(created)
|
||||
em.ID = id
|
||||
em.MessageID = messageID
|
||||
em.Subject = subject
|
||||
em.Size = size
|
||||
em.Attachments = attachments
|
||||
@@ -373,7 +381,7 @@ func List(start, limit int) ([]MessageSummary, error) {
|
||||
}
|
||||
|
||||
// Search will search a mailbox for search terms.
|
||||
// The search is broken up by segments (exact phrases can be quoted), and interprits specific terms such as:
|
||||
// The search is broken up by segments (exact phrases can be quoted), and interprets specific terms such as:
|
||||
// is:read, is:unread, has:attachment, to:<term>, from:<term> & subject:<term>
|
||||
// Negative searches also also included by prefixing the search term with a `-` or `!`
|
||||
func Search(search string, start, limit int) ([]MessageSummary, error) {
|
||||
@@ -399,6 +407,7 @@ func Search(search string, start, limit int) ([]MessageSummary, error) {
|
||||
if err := q.QueryAndClose(nil, db, func(row *sql.Rows) {
|
||||
var created int64
|
||||
var id string
|
||||
var messageID string
|
||||
var subject string
|
||||
var metadata string
|
||||
var size int
|
||||
@@ -408,7 +417,7 @@ func Search(search string, start, limit int) ([]MessageSummary, error) {
|
||||
var ignore string
|
||||
em := MessageSummary{}
|
||||
|
||||
if err := row.Scan(&created, &id, &subject, &metadata, &size, &attachments, &read, &tags, &ignore, &ignore, &ignore, &ignore); err != nil {
|
||||
if err := row.Scan(&created, &id, &messageID, &subject, &metadata, &size, &attachments, &read, &tags, &ignore, &ignore, &ignore, &ignore); err != nil {
|
||||
logger.Log().Error(err)
|
||||
return
|
||||
}
|
||||
@@ -425,6 +434,7 @@ func Search(search string, start, limit int) ([]MessageSummary, error) {
|
||||
|
||||
em.Created = time.UnixMilli(created)
|
||||
em.ID = id
|
||||
em.MessageID = messageID
|
||||
em.Subject = subject
|
||||
em.Size = size
|
||||
em.Attachments = attachments
|
||||
@@ -881,7 +891,7 @@ func IsUnread(id string) bool {
|
||||
return unread == 1
|
||||
}
|
||||
|
||||
// MessageIDExists blaah
|
||||
// MessageIDExists checks whether a Message-ID exists in the DB
|
||||
func MessageIDExists(id string) bool {
|
||||
var total int
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ func searchParser(args []string, start, limit int) *sqlf.Stmt {
|
||||
}
|
||||
|
||||
q := sqlf.From("mailbox").
|
||||
Select(`Created, ID, Subject, Metadata, Size, Attachments, Read, Tags,
|
||||
Select(`Created, ID, MessageID, Subject, Metadata, Size, Attachments, Read, Tags,
|
||||
IFNULL(json_extract(Metadata, '$.To'), '{}') as ToJSON,
|
||||
IFNULL(json_extract(Metadata, '$.From'), '{}') as FromJSON,
|
||||
IFNULL(json_extract(Metadata, '$.Cc'), '{}') as CcJSON,
|
||||
|
||||
@@ -69,6 +69,8 @@ type Attachment struct {
|
||||
type MessageSummary struct {
|
||||
// Database ID
|
||||
ID string
|
||||
// Message ID
|
||||
MessageID string
|
||||
// Read status
|
||||
Read bool
|
||||
// From address
|
||||
|
||||
@@ -3,27 +3,27 @@ package storage
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/axllent/mailpit/config"
|
||||
"github.com/axllent/mailpit/utils/logger"
|
||||
"github.com/axllent/mailpit/utils/tools"
|
||||
"github.com/leporo/sqlf"
|
||||
)
|
||||
|
||||
// SetTags will set the tags for a given message ID, used via API
|
||||
// SetTags will set the tags for a given database ID, used via API
|
||||
func SetTags(id string, tags []string) error {
|
||||
applyTags := []string{}
|
||||
reg := regexp.MustCompile(`\s+`)
|
||||
for _, t := range tags {
|
||||
t = strings.TrimSpace(reg.ReplaceAllString(t, " "))
|
||||
|
||||
if t != "" && config.TagRegexp.MatchString(t) && !inArray(t, applyTags) {
|
||||
t = tools.CleanTag(t)
|
||||
if t != "" && config.ValidTagRegexp.MatchString(t) && !inArray(t, applyTags) {
|
||||
applyTags = append(applyTags, t)
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(applyTags)
|
||||
|
||||
tagJSON, err := json.Marshal(applyTags)
|
||||
if err != nil {
|
||||
logger.Log().Errorf("[db] setting tags for message %s", id)
|
||||
@@ -42,26 +42,25 @@ func SetTags(id string, tags []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Used to auto-apply tags to new messages
|
||||
func findTags(message *[]byte) []string {
|
||||
tags := []string{}
|
||||
// Find tags set via --tags in raw message.
|
||||
// Returns a comma-separated string.
|
||||
func findTagsInRawMessage(message *[]byte) string {
|
||||
tagStr := ""
|
||||
if len(config.SMTPTags) == 0 {
|
||||
return tags
|
||||
return tagStr
|
||||
}
|
||||
|
||||
str := strings.ToLower(string(*message))
|
||||
for _, t := range config.SMTPTags {
|
||||
if !inArray(t.Tag, tags) && strings.Contains(str, t.Match) {
|
||||
tags = append(tags, t.Tag)
|
||||
if strings.Contains(str, t.Match) {
|
||||
tagStr += "," + t.Tag
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(tags)
|
||||
|
||||
return tags
|
||||
return tagStr
|
||||
}
|
||||
|
||||
// Get message tags from the database for a given message ID.
|
||||
// Get message tags from the database for a given database ID
|
||||
// Used when parsing a raw email.
|
||||
func getMessageTags(id string) []string {
|
||||
tags := []string{}
|
||||
@@ -84,3 +83,31 @@ func getMessageTags(id string) []string {
|
||||
|
||||
return tags
|
||||
}
|
||||
|
||||
// UniqueTagsFromString will split a string with commas, and extract a unique slice of formatted tags
|
||||
func uniqueTagsFromString(s string) []string {
|
||||
tags := []string{}
|
||||
|
||||
if s == "" {
|
||||
return tags
|
||||
}
|
||||
|
||||
parts := strings.Split(s, ",")
|
||||
for _, p := range parts {
|
||||
w := tools.CleanTag(p)
|
||||
if w == "" {
|
||||
continue
|
||||
}
|
||||
if config.ValidTagRegexp.MatchString(w) {
|
||||
if !inArray(w, tags) {
|
||||
tags = append(tags, w)
|
||||
}
|
||||
} else {
|
||||
logger.Log().Debugf("[db] ignoring invalid tag: %s", w)
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(tags)
|
||||
|
||||
return tags
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ func dbCron() {
|
||||
time.Sleep(60 * time.Second)
|
||||
start := time.Now()
|
||||
|
||||
// check if database contains deleted data and has not beein in use
|
||||
// check if database contains deleted data and has not been in use
|
||||
// for 5 minutes, if so VACUUM
|
||||
currentTime := time.Now()
|
||||
diff := currentTime.Sub(dbLastAction)
|
||||
@@ -167,6 +167,7 @@ func isFile(path string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// InArray tests if a string in within an array. It is not case sensitive.
|
||||
func inArray(k string, arr []string) bool {
|
||||
k = strings.ToLower(k)
|
||||
for _, v := range arr {
|
||||
|
||||
@@ -54,7 +54,7 @@ func PrettyPrint(i interface{}) {
|
||||
}
|
||||
|
||||
// CleanIP returns a human-readable IP for the logging interface
|
||||
// when starting services. It translates [::]:<port> to "localhost:<port>"
|
||||
// when starting services. It translates [::]:<port> to "0.0.0.0:<port>"
|
||||
func CleanIP(s string) string {
|
||||
re := regexp.MustCompile(`^\[\:\:\]\:\d+`)
|
||||
if re.MatchString(s) {
|
||||
@@ -63,3 +63,14 @@ func CleanIP(s string) string {
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// CleanHTTPIP returns a human-readable IP for the logging interface
|
||||
// when starting services. It translates [::]:<port> to "localhost:<port>"
|
||||
func CleanHTTPIP(s string) string {
|
||||
re := regexp.MustCompile(`^\[\:\:\]\:\d+`)
|
||||
if re.MatchString(s) {
|
||||
return "localhost:" + s[5:]
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Package tools provides various methods for variouws things
|
||||
// Package tools provides various methods for various things
|
||||
package tools
|
||||
|
||||
import (
|
||||
@@ -23,7 +23,7 @@ func RemoveMessageHeaders(msg []byte, headers []string) ([]byte, error) {
|
||||
reBlank := regexp.MustCompile(`^\s+`)
|
||||
|
||||
for _, hdr := range headers {
|
||||
// case-insentitive
|
||||
// case-insensitive
|
||||
reHdr := regexp.MustCompile(`(?i)^` + regexp.QuoteMeta(hdr+":"))
|
||||
|
||||
// header := []byte(hdr + ":")
|
||||
|
||||
25
utils/tools/tags.go
Normal file
25
utils/tools/tags.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// Invalid tag characters regex
|
||||
tagsInvalidChars = regexp.MustCompile(`[^a-zA-Z0-9\-\ \_]`)
|
||||
|
||||
// Regex to catch multiple spaces
|
||||
multiSpaceRe = regexp.MustCompile(`(\s+)`)
|
||||
)
|
||||
|
||||
// CleanTag returns a clean tag, removing whitespace and invalid characters
|
||||
func CleanTag(s string) string {
|
||||
s = strings.TrimSpace(
|
||||
multiSpaceRe.ReplaceAllString(
|
||||
tagsInvalidChars.ReplaceAllString(s, " "),
|
||||
" ",
|
||||
),
|
||||
)
|
||||
return s
|
||||
}
|
||||
Reference in New Issue
Block a user