@peacom/core 2.0.42 → 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,14 +1,14 @@
1
1
  {
2
2
  "name": "@peacom/core",
3
- "version": "2.0.42",
3
+ "version": "2.0.45",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-s3": "3.616.0",
7
7
  "@aws-sdk/s3-presigned-post": "^3.616.0",
8
8
  "@aws-sdk/s3-request-presigner": "3.616.0",
9
- "bullmq": "^5.30.0",
9
+ "bullmq": "^5.30.1",
10
10
  "mime-types": "^2.1.35",
11
- "undici": "^6.19.2",
11
+ "undici": "^7.0.0",
12
12
  "uuid": "^11.0.3",
13
13
  "xss": "^1.0.15"
14
14
  },
@@ -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"}
@@ -1 +1,2 @@
1
1
  export * from './storage';
2
+ export * from './partner';
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./storage"), exports);
5
+ tslib_1.__exportStar(require("./partner"), exports);
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/service/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/service/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,oDAAyB"}
@@ -0,0 +1 @@
1
+ export * from './telegram.api';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./telegram.api"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/service/partner/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B"}
@@ -0,0 +1,7 @@
1
+ export interface TelegramMessageParam {
2
+ chat_id: string;
3
+ text: string;
4
+ parse_mode: string;
5
+ [key: string]: any;
6
+ }
7
+ export declare const sendTelegramMessage: (token: string, { chat_id, text, parse_mode }: TelegramMessageParam) => Promise<Response>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendTelegramMessage = void 0;
4
+ const sendTelegramMessage = (token, { chat_id, text, parse_mode }) => {
5
+ return fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
6
+ method: "POST",
7
+ headers: {
8
+ "content-type": "application/json"
9
+ },
10
+ body: JSON.stringify({
11
+ chat_id,
12
+ text,
13
+ parse_mode
14
+ })
15
+ });
16
+ };
17
+ exports.sendTelegramMessage = sendTelegramMessage;
18
+ //# sourceMappingURL=telegram.api.js.map
@@ -0,0 +1 @@
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"}