@etainabl/nodejs-sdk 1.0.3 → 1.0.4
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/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/slack.d.ts +4 -0
- package/dist/slack.js +15 -0
- package/dist/slack.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,5 +2,6 @@ import api from './api.js';
|
|
|
2
2
|
import consumption from './consumption.js';
|
|
3
3
|
import logger from './logger.js';
|
|
4
4
|
import db from './db.js';
|
|
5
|
-
|
|
5
|
+
import slack from './slack.js';
|
|
6
|
+
export { api, logger, consumption, db, slack };
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,EAAE,EACF,KAAK,EACN,CAAA"}
|
package/dist/slack.d.ts
ADDED
package/dist/slack.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
const postMessage = async (message) => {
|
|
3
|
+
const url = 'https://hooks.slack.com/services/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';
|
|
4
|
+
const data = {
|
|
5
|
+
text: `[${(process.env.ENV || '').toUpperCase()}][${process.env.AWS_LAMBDA_FUNCTION_NAME}] ${message}`
|
|
6
|
+
};
|
|
7
|
+
const headers = {
|
|
8
|
+
'Content-Type': 'application/json'
|
|
9
|
+
};
|
|
10
|
+
return axios.post(url, data, { headers });
|
|
11
|
+
};
|
|
12
|
+
export default {
|
|
13
|
+
postMessage
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=slack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack.js","sourceRoot":"","sources":["../src/slack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IAC5C,MAAM,GAAG,GAAG,mFAAmF,CAAC;IAChG,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,OAAO,EAAE;KACvG,CAAC;IACF,MAAM,OAAO,GAAG;QACd,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,eAAe;IACb,WAAW;CACZ,CAAA"}
|