@peacom/core 2.0.43 → 2.0.45
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@peacom/core",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.45",
|
4
4
|
"type": "commonjs",
|
5
5
|
"dependencies": {
|
6
6
|
"@aws-sdk/client-s3": "3.616.0",
|
@@ -19,7 +19,8 @@
|
|
19
19
|
"@types/mime-types": "^2.1.4",
|
20
20
|
"@types/node": "^20.12.7",
|
21
21
|
"@types/uuid": "^9.0.8",
|
22
|
-
"dotenv": "^16.4.5"
|
22
|
+
"dotenv": "^16.4.5",
|
23
|
+
"jest-fixed-jsdom": "^0.0.9"
|
23
24
|
},
|
24
25
|
"main": "./src/index.js"
|
25
26
|
}
|
package/src/lib/api/fetch.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.myFetch = void 0;
|
4
|
-
const
|
4
|
+
const https_server_1 = require("./certificate/https-server");
|
5
5
|
const myFetch = (url, opts) => {
|
6
6
|
let options = opts || {};
|
7
7
|
if (url.startsWith('https://')) {
|
8
|
-
options.dispatcher =
|
8
|
+
options.dispatcher = https_server_1.sslAgent;
|
9
9
|
}
|
10
10
|
return fetch(url, options);
|
11
11
|
};
|
package/src/lib/api/fetch.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/fetch.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/fetch.ts"],"names":[],"mappings":";;;AAAA,6DAAoD;AAG7C,MAAM,OAAO,GAAG,CAAC,GAAQ,EAAE,IAAU,EAAE,EAAE;IAC9C,IAAI,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QAC9B,OAAO,CAAC,UAAU,GAAG,uBAAQ,CAAC;KAC/B;IACD,OAAO,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB"}
|
@@ -4,4 +4,4 @@ export interface TelegramMessageParam {
|
|
4
4
|
parse_mode: string;
|
5
5
|
[key: string]: any;
|
6
6
|
}
|
7
|
-
export declare const
|
7
|
+
export declare const sendTelegramMessage: (token: string, { chat_id, text, parse_mode }: TelegramMessageParam) => Promise<Response>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
const
|
3
|
+
exports.sendTelegramMessage = void 0;
|
4
|
+
const sendTelegramMessage = (token, { chat_id, text, parse_mode }) => {
|
5
5
|
return fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
|
6
6
|
method: "POST",
|
7
7
|
headers: {
|
@@ -14,5 +14,5 @@ const sendMessage = (token, { chat_id, text, parse_mode }) => {
|
|
14
14
|
})
|
15
15
|
});
|
16
16
|
};
|
17
|
-
exports.
|
17
|
+
exports.sendTelegramMessage = sendTelegramMessage;
|
18
18
|
//# sourceMappingURL=telegram.api.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telegram.api.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/service/partner/telegram.api.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"telegram.api.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/service/partner/telegram.api.ts"],"names":[],"mappings":";;;AAQO,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,EAAE,EAAE;IACtG,OAAO,KAAK,CAAC,+BAA+B,KAAK,cAAc,EAAE;QAC/D,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,OAAO;YACP,IAAI;YACJ,UAAU;SACX,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B"}
|