@allthings/cloud-toolkit 1.1.0-dev.0 → 1.1.0-dev.2
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/dist/lib.cjs.js +6 -6
- package/dist/lib.esm.js +6 -6
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/aws/parameterStore.d.ts +1 -1
- package/dist/src/aws/ses.d.ts +1 -1
- package/package.json +1 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -46,7 +46,7 @@ const getSecrets = async (ssm, config, parameters_, defaultValue) => {
|
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
48
|
if (config.logger) {
|
|
49
|
-
config.logger(error);
|
|
49
|
+
config.logger('error', error);
|
|
50
50
|
}
|
|
51
51
|
return [defaultValue];
|
|
52
52
|
}
|
|
@@ -64,7 +64,7 @@ const getSecret = async (ssm, config, parameter_, defaultValue) => {
|
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
66
66
|
if (config.logger) {
|
|
67
|
-
config.logger(error);
|
|
67
|
+
config.logger('error', error);
|
|
68
68
|
}
|
|
69
69
|
return defaultValue;
|
|
70
70
|
}
|
|
@@ -87,13 +87,13 @@ const DEFAULT_CLIENT_CONFIG = {
|
|
|
87
87
|
const sendMail = async (config, transport, options, from) => {
|
|
88
88
|
if (!options.html && !options.text) {
|
|
89
89
|
if (config.logger) {
|
|
90
|
-
config.logger('The option text or html needs to be set.');
|
|
90
|
+
config.logger('error', 'The option text or html needs to be set.');
|
|
91
91
|
}
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
94
94
|
if (!options.to || !options.subject) {
|
|
95
95
|
if (config.logger) {
|
|
96
|
-
config.logger('The fields to and subject have to be set.');
|
|
96
|
+
config.logger('error', 'The fields to and subject have to be set.');
|
|
97
97
|
}
|
|
98
98
|
return false;
|
|
99
99
|
}
|
|
@@ -102,11 +102,11 @@ const sendMail = async (config, transport, options, from) => {
|
|
|
102
102
|
...options,
|
|
103
103
|
});
|
|
104
104
|
if (config.logger) {
|
|
105
|
-
config.logger(`Transporter response: ${transportResponse}`);
|
|
105
|
+
config.logger('info', `Transporter response: ${transportResponse}`);
|
|
106
106
|
}
|
|
107
107
|
if (!transportResponse) {
|
|
108
108
|
if (config.logger) {
|
|
109
|
-
config.logger('Sending email failed!');
|
|
109
|
+
config.logger('error', 'Sending email failed!');
|
|
110
110
|
}
|
|
111
111
|
return false;
|
|
112
112
|
}
|
package/dist/lib.esm.js
CHANGED
|
@@ -25,7 +25,7 @@ const getSecrets = async (ssm, config, parameters_, defaultValue) => {
|
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
27
|
if (config.logger) {
|
|
28
|
-
config.logger(error);
|
|
28
|
+
config.logger('error', error);
|
|
29
29
|
}
|
|
30
30
|
return [defaultValue];
|
|
31
31
|
}
|
|
@@ -43,7 +43,7 @@ const getSecret = async (ssm, config, parameter_, defaultValue) => {
|
|
|
43
43
|
}
|
|
44
44
|
catch (error) {
|
|
45
45
|
if (config.logger) {
|
|
46
|
-
config.logger(error);
|
|
46
|
+
config.logger('error', error);
|
|
47
47
|
}
|
|
48
48
|
return defaultValue;
|
|
49
49
|
}
|
|
@@ -66,13 +66,13 @@ const DEFAULT_CLIENT_CONFIG = {
|
|
|
66
66
|
const sendMail = async (config, transport, options, from) => {
|
|
67
67
|
if (!options.html && !options.text) {
|
|
68
68
|
if (config.logger) {
|
|
69
|
-
config.logger('The option text or html needs to be set.');
|
|
69
|
+
config.logger('error', 'The option text or html needs to be set.');
|
|
70
70
|
}
|
|
71
71
|
return false;
|
|
72
72
|
}
|
|
73
73
|
if (!options.to || !options.subject) {
|
|
74
74
|
if (config.logger) {
|
|
75
|
-
config.logger('The fields to and subject have to be set.');
|
|
75
|
+
config.logger('error', 'The fields to and subject have to be set.');
|
|
76
76
|
}
|
|
77
77
|
return false;
|
|
78
78
|
}
|
|
@@ -81,11 +81,11 @@ const sendMail = async (config, transport, options, from) => {
|
|
|
81
81
|
...options,
|
|
82
82
|
});
|
|
83
83
|
if (config.logger) {
|
|
84
|
-
config.logger(`Transporter response: ${transportResponse}`);
|
|
84
|
+
config.logger('info', `Transporter response: ${transportResponse}`);
|
|
85
85
|
}
|
|
86
86
|
if (!transportResponse) {
|
|
87
87
|
if (config.logger) {
|
|
88
|
-
config.logger('Sending email failed!');
|
|
88
|
+
config.logger('error', 'Sending email failed!');
|
|
89
89
|
}
|
|
90
90
|
return false;
|
|
91
91
|
}
|