@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.43",
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
  }
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.myFetch = void 0;
4
- const core_1 = require("@peacom/core");
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 = core_1.sslAgent;
8
+ options.dispatcher = https_server_1.sslAgent;
9
9
  }
10
10
  return fetch(url, options);
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/fetch.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAEjC,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,eAAQ,CAAC;KAC/B;IACD,OAAO,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB"}
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 sendMessage: (token: string, { chat_id, text, parse_mode }: TelegramMessageParam) => Promise<Response>;
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.sendMessage = void 0;
4
- const sendMessage = (token, { chat_id, text, parse_mode }) => {
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.sendMessage = sendMessage;
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":";;;AAOO,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,EAAE,EAAE;IAC9F,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,WAAW,eAYtB"}
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"}