mailgun.js 3.5.9 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +27 -11
- package/CHANGELOG.md +30 -0
- package/commitlint.config.js +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/lib/client.d.ts +2 -2
- package/dist/lib/events.d.ts +9 -25
- package/dist/lib/interfaces/APIErrorOptions.d.ts +2 -1
- package/dist/lib/interfaces/ApiResponse.d.ts +2 -1
- package/dist/lib/interfaces/Events.d.ts +24 -0
- package/dist/lib/interfaces/IFormData.d.ts +4 -12
- package/dist/lib/interfaces/IpPools.d.ts +12 -0
- package/dist/lib/interfaces/Options.d.ts +2 -1
- package/dist/lib/interfaces/RequestOptions.d.ts +2 -1
- package/dist/lib/interfaces/StatsOptions.d.ts +2 -1
- package/dist/lib/interfaces/mailListMembers.d.ts +6 -6
- package/dist/lib/ip-pools.d.ts +11 -14
- package/dist/lib/ips.d.ts +6 -6
- package/dist/lib/messages.d.ts +1 -1
- package/dist/lib/request.d.ts +4 -3
- package/dist/lib/suppressions.d.ts +1 -1
- package/dist/mailgun.node.js +3 -0
- package/dist/{mailgun.js.LICENSE.txt → mailgun.node.js.LICENSE.txt} +1 -1
- package/dist/mailgun.web.js +3 -0
- package/dist/mailgun.web.js.LICENSE.txt +7 -0
- package/examples/addresses.js +1 -0
- package/examples/list-domains.js +1 -0
- package/examples/send-email.js +1 -0
- package/index.ts +3 -3
- package/lib/client.ts +4 -3
- package/lib/events.ts +21 -19
- package/lib/interfaces/APIErrorOptions.ts +3 -1
- package/lib/interfaces/ApiResponse.ts +3 -1
- package/lib/interfaces/Events.ts +25 -0
- package/lib/interfaces/IFormData.ts +5 -14
- package/lib/interfaces/IpPools.ts +16 -1
- package/lib/interfaces/Ips.ts +1 -0
- package/lib/interfaces/Options.ts +5 -2
- package/lib/interfaces/RequestOptions.ts +4 -2
- package/lib/interfaces/StatsOptions.ts +4 -2
- package/lib/interfaces/Supressions.ts +1 -1
- package/lib/interfaces/lists.ts +1 -0
- package/lib/interfaces/mailListMembers.ts +18 -12
- package/lib/interfaces/routes.ts +1 -0
- package/lib/ip-pools.ts +8 -7
- package/lib/ips.ts +3 -3
- package/lib/lists.ts +1 -1
- package/lib/messages.ts +1 -1
- package/lib/parse.ts +4 -3
- package/lib/request.ts +18 -8
- package/lib/stats.ts +3 -2
- package/lib/suppressions.ts +16 -11
- package/lib/validate.ts +0 -1
- package/package.json +9 -9
- package/test/client.test.ts +9 -3
- package/test/domains.test.ts +2 -1
- package/test/events.test.ts +3 -3
- package/test/ips.test.ts +4 -2
- package/test/lists.test.ts +7 -8
- package/test/mailListMembers.test.ts +49 -44
- package/test/messageAttachment.test.ts +5 -5
- package/test/messages.test.ts +3 -2
- package/test/parse.test.ts +4 -3
- package/test/request.test.ts +6 -5
- package/test/routes.test.ts +3 -1
- package/test/stats.test.ts +3 -2
- package/test/suppressions.test.ts +14 -11
- package/test/validate.test.ts +3 -2
- package/test/webhooks.test.ts +3 -3
- package/tsconfig.webpack.json +1 -1
- package/webpack/webpack.common.config.js +47 -0
- package/webpack/webpack.dev.config.js +18 -0
- package/webpack/webpack.release.config.js +37 -0
- package/dist/mailgun.js +0 -3
- package/webpack.config.js +0 -49
- package/webpack.release.config.js +0 -29
package/webpack.config.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
const webpack = require('webpack');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
const pkg = require('./package.json');
|
|
6
|
-
|
|
7
|
-
module.exports = () => {
|
|
8
|
-
const outputDir = 'dist';
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
mode: 'development',
|
|
12
|
-
target: 'node',
|
|
13
|
-
context: __dirname,
|
|
14
|
-
entry: {
|
|
15
|
-
mailgun: path.resolve(__dirname, './index.ts'),
|
|
16
|
-
'mailgun.min': path.resolve(__dirname, './index.ts')
|
|
17
|
-
},
|
|
18
|
-
output: {
|
|
19
|
-
path: path.resolve('./', outputDir),
|
|
20
|
-
filename: 'mailgun.js',
|
|
21
|
-
library: 'mailgun',
|
|
22
|
-
libraryTarget: 'umd',
|
|
23
|
-
globalObject: 'this',
|
|
24
|
-
},
|
|
25
|
-
module: {
|
|
26
|
-
rules: [
|
|
27
|
-
{
|
|
28
|
-
test: /\.(ts|js)?/,
|
|
29
|
-
use: [
|
|
30
|
-
{
|
|
31
|
-
loader: 'babel-loader',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
loader: 'ts-loader?configFile=tsconfig.webpack.json',
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
exclude: /(node_modules|test)/
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
plugins: [
|
|
42
|
-
new webpack.BannerPlugin(`${pkg.name} v${pkg.version}`)
|
|
43
|
-
],
|
|
44
|
-
resolve: {
|
|
45
|
-
extensions: ['.ts', '.js', '.json']
|
|
46
|
-
},
|
|
47
|
-
devtool: 'inline-source-map'
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { merge } = require('webpack-merge');
|
|
4
|
-
|
|
5
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
6
|
-
const baseConfig = require('./webpack.config.js');
|
|
7
|
-
|
|
8
|
-
module.exports = (env) => {
|
|
9
|
-
const outputDir = 'dist';
|
|
10
|
-
|
|
11
|
-
return merge(baseConfig(env), {
|
|
12
|
-
mode: 'production',
|
|
13
|
-
output: {
|
|
14
|
-
path: path.resolve('./', outputDir),
|
|
15
|
-
},
|
|
16
|
-
devtool: undefined,
|
|
17
|
-
optimization: {
|
|
18
|
-
minimize: true,
|
|
19
|
-
minimizer: [
|
|
20
|
-
new TerserPlugin({
|
|
21
|
-
parallel: true,
|
|
22
|
-
terserOptions: {
|
|
23
|
-
keep_classnames: true,
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
};
|