mailtrap-plugin 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.lock +3749 -0
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +1 -0
- package/dist/deno-bundle.js +234 -217
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/index.ts +2 -2
- package/webpack.config.cjs +9 -79
- package/dist/browser-bundle.js +0 -4964
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeBase, NodeConfig, NodeInput, NodeReturn } from "core-package-mini-n8n";
|
|
2
|
+
declare class MailtrapNode extends NodeBase {
|
|
3
|
+
constructor(state: any);
|
|
4
|
+
getConfig(): NodeConfig;
|
|
5
|
+
execute(node: NodeInput): Promise<NodeReturn>;
|
|
6
|
+
}
|
|
7
|
+
export default MailtrapNode;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,uBAAuB,CAAC;AAE/B,cAAM,YAAa,SAAQ,QAAQ;gBACrB,KAAK,EAAE,GAAG;IAItB,SAAS,IAAI,UAAU;IAiEjB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;CA8CpD;AAED,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailtrap-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Mailtrap plugin to Flow requests",
|
|
5
|
-
"main": "
|
|
6
|
-
"browser": "./dist/browser-bundle.js",
|
|
5
|
+
"main": "dist/deno-bundle.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"type": "module",
|
|
9
8
|
"scripts": {
|
|
10
|
-
"build": "webpack",
|
|
9
|
+
"build": "webpack && deno bundle ./src/index.ts -o ./dist/deno-bundle.js",
|
|
10
|
+
"prepublish": "pnpm run build",
|
|
11
11
|
"preinstall": "pnpm run build",
|
|
12
12
|
"start": "tsx src/index.ts",
|
|
13
13
|
"test": "jest ./tests/*.spec.ts"
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import axios from "
|
|
1
|
+
import axios from "axios";
|
|
2
2
|
import {
|
|
3
3
|
NodeBase,
|
|
4
4
|
NodeConfig,
|
|
5
5
|
NodeInput,
|
|
6
6
|
NodeReturn,
|
|
7
|
-
} from "
|
|
7
|
+
} from "core-package-mini-n8n";
|
|
8
8
|
|
|
9
9
|
class MailtrapNode extends NodeBase {
|
|
10
10
|
constructor(state: any) {
|
package/webpack.config.cjs
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
const commonConfig = {
|
|
8
|
-
entry: "./src/index.ts",
|
|
9
|
-
mode: "production",
|
|
10
|
-
// Shared output settings
|
|
11
|
-
output: {
|
|
12
|
-
path: path.resolve(__dirname, "dist"),
|
|
13
|
-
},
|
|
14
|
-
// Ensure we can resolve ESM modules strictly
|
|
15
|
-
resolve: {
|
|
16
|
-
extensions: ["ts", ".js", ".mjs"],
|
|
17
|
-
},
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: "./src/index.ts", // Your main entry file
|
|
5
|
+
mode: "production", // Use 'development' for dev, 'production' for final output
|
|
18
6
|
module: {
|
|
19
7
|
rules: [
|
|
20
8
|
{
|
|
@@ -24,71 +12,13 @@ const commonConfig = {
|
|
|
24
12
|
},
|
|
25
13
|
],
|
|
26
14
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Configuration for Node.js bundle
|
|
32
|
-
const nodeConfig = {
|
|
33
|
-
...commonConfig,
|
|
34
|
-
target: "node20", // Target Node.js environment
|
|
35
|
-
output: {
|
|
36
|
-
...commonConfig.output,
|
|
37
|
-
filename: "node-bundle.js",
|
|
38
|
-
module: true,
|
|
39
|
-
},
|
|
40
|
-
// Tells webpack to externalize node_modules
|
|
41
|
-
// (typically you don't bundle them for Node)
|
|
42
|
-
experiments: {
|
|
43
|
-
outputModule: true, // Enable experimental output module support
|
|
15
|
+
resolve: {
|
|
16
|
+
extensions: [".ts", ".js"],
|
|
44
17
|
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// Configuration for Browser bundle
|
|
48
|
-
const browserConfig = {
|
|
49
|
-
...commonConfig,
|
|
50
|
-
target: "web", // Target web environment
|
|
51
18
|
output: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
// 'module' requires <script type="module">
|
|
57
|
-
library: {
|
|
58
|
-
type: "umd",
|
|
59
|
-
name: "AlertMessage",
|
|
60
|
-
type: "var",
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
experiments: {
|
|
64
|
-
outputModule: true, // Enable experimental output module support
|
|
19
|
+
filename: "bundle.js",
|
|
20
|
+
path: path.resolve(__dirname, "dist"),
|
|
21
|
+
library: "MailtrapPlugin",
|
|
22
|
+
libraryTarget: "umd",
|
|
65
23
|
},
|
|
66
24
|
};
|
|
67
|
-
|
|
68
|
-
module.exports = [nodeConfig, browserConfig];
|
|
69
|
-
|
|
70
|
-
// module.exports = {
|
|
71
|
-
// entry: "./src/index.ts", // Your main entry file
|
|
72
|
-
// mode: "production", // Use 'development' for dev, 'production' for final output
|
|
73
|
-
// module: {
|
|
74
|
-
// rules: [
|
|
75
|
-
// {
|
|
76
|
-
// test: /\.ts$/,
|
|
77
|
-
// use: "ts-loader",
|
|
78
|
-
// exclude: /node_modules/,
|
|
79
|
-
// },
|
|
80
|
-
// ],
|
|
81
|
-
// },
|
|
82
|
-
// resolve: {
|
|
83
|
-
// extensions: [".ts", ".js"],
|
|
84
|
-
// },
|
|
85
|
-
// output: {
|
|
86
|
-
// filename: "bundle.js",
|
|
87
|
-
// path: path.resolve(__dirname, "dist"),
|
|
88
|
-
// library: {
|
|
89
|
-
// name: "AlertMessage",
|
|
90
|
-
// type: "var",
|
|
91
|
-
// },
|
|
92
|
-
// libraryTarget: "umd",
|
|
93
|
-
// },
|
|
94
|
-
// };
|