@peacom/core 2.0.95 → 2.0.97

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.95",
3
+ "version": "2.0.97",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-s3": "3.616.0",
@@ -1,5 +1,5 @@
1
1
  export * from './api.constant';
2
- export * from './queue/queue.api';
2
+ export * from './queue';
3
3
  export * from './core.api';
4
4
  export * from './micro-service.api';
5
5
  export * from './certificate/https-server';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./api.constant"), exports);
5
- tslib_1.__exportStar(require("./queue/queue.api"), exports);
5
+ tslib_1.__exportStar(require("./queue"), exports);
6
6
  tslib_1.__exportStar(require("./core.api"), exports);
7
7
  tslib_1.__exportStar(require("./micro-service.api"), exports);
8
8
  tslib_1.__exportStar(require("./certificate/https-server"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,4DAAiC;AACjC,qDAA0B;AAC1B,8DAAmC;AACnC,qEAA0C;AAC1C,kDAAuB;AACvB,mDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,kDAAuB;AACvB,qDAA0B;AAC1B,8DAAmC;AACnC,qEAA0C;AAC1C,kDAAuB;AACvB,mDAAwB"}
@@ -0,0 +1,2 @@
1
+ export * from './queue.api';
2
+ export * from './background.queue';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./queue.api"), exports);
5
+ tslib_1.__exportStar(require("./background.queue"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/api/queue/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B;AAC3B,6DAAkC"}
@@ -8,6 +8,7 @@ export declare const S3_OPTION: {
8
8
  auth: string;
9
9
  forcePathStyle: boolean;
10
10
  acl: string | number;
11
+ proxy: string;
11
12
  };
12
13
  export declare const S3_INFO: {
13
14
  BUCKET: string;
@@ -5,6 +5,8 @@ exports.s3 = exports.S3_ACL_OPTIONS = exports.S3_FOLDERS = exports.S3_INFO = exp
5
5
  const client_s3_1 = require("@aws-sdk/client-s3");
6
6
  const model_1 = require("@peacom/model");
7
7
  const process = require("process");
8
+ const node_http_handler_1 = require("@smithy/node-http-handler");
9
+ const https_proxy_agent_1 = require("https-proxy-agent");
8
10
  exports.S3_OPTION = {
9
11
  accessKeyId: process.env['S3_ACCESS_KEY'] || '',
10
12
  secretAccessKey: process.env['S3_SECRET_KEY'] || '',
@@ -14,6 +16,7 @@ exports.S3_OPTION = {
14
16
  auth: process.env['S3_AUTH'] || "",
15
17
  forcePathStyle: process.env['S3_PATH_STYLE'] !== '1',
16
18
  acl: process.env['S3_ACL'] || 0,
19
+ proxy: process.env['S3_PROXY'] || '',
17
20
  };
18
21
  exports.S3_INFO = {
19
22
  BUCKET: process.env['S3_BUCKET'] || ''
@@ -38,6 +41,11 @@ const getS3ByOption = () => {
38
41
  if (exports.S3_OPTION.accessKeyId && exports.S3_OPTION.secretAccessKey) {
39
42
  s3Options.credentials = { accessKeyId: exports.S3_OPTION.accessKeyId, secretAccessKey: exports.S3_OPTION.secretAccessKey };
40
43
  }
44
+ if (exports.S3_OPTION.proxy) {
45
+ s3Options.requestHandler = new node_http_handler_1.NodeHttpHandler({
46
+ httpsAgent: new https_proxy_agent_1.HttpsProxyAgent(exports.S3_OPTION.proxy)
47
+ });
48
+ }
41
49
  return new client_s3_1.S3(s3Options);
42
50
  };
43
51
  exports.s3 = getS3ByOption();
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../../packages/core/src/lib/service/storage/aws/constants.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,kDAAqC;AACrC,yCAAsC;AACtC,mCAAmC;AAEtB,QAAA,SAAS,GAAG;IACvB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE;IAC/C,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE;IACnD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;IACtC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;IACtC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;IAClC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,GAAG;IACpD,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;CAChC,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;CACvC,CAAA;AAEY,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEW,QAAA,cAAc,GAAG;IAC5B,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;IACzB,CAAC,kBAAU,CAAC,OAAO,CAAC,EAAE,aAAa;CACpC,CAAC;AAWF,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,iBAAS,CAAC,QAAQ;QAC5B,cAAc,EAAE,iBAAS,CAAC,cAAc;KAC7B,CAAA;IAEb,IAAI,IAAA,eAAO,EAAC,iBAAS,CAAC,MAAM,CAAC,EAAE;QAC7B,SAAS,CAAC,MAAM,GAAG,iBAAS,CAAC,MAAM,CAAA;KACpC;IAED,IAAI,iBAAS,CAAC,WAAW,IAAI,iBAAS,CAAC,eAAe,EAAE;QACtD,SAAS,CAAC,WAAW,GAAG,EAAC,WAAW,EAAE,iBAAS,CAAC,WAAW,EAAE,eAAe,EAAE,iBAAS,CAAC,eAAe,EAAC,CAAA;KACzG;IACD,OAAO,IAAI,cAAE,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC,CAAA;AAEY,QAAA,EAAE,GAAG,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../../packages/core/src/lib/service/storage/aws/constants.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,kDAAqC;AACrC,yCAAsC;AACtC,mCAAmC;AACnC,iEAA4D;AAC5D,yDAAoD;AAGvC,QAAA,SAAS,GAAG;IACvB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE;IAC/C,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE;IACnD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;IACtC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;IACtC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;IAClC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,GAAG;IACpD,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,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