@flosum/storages 1.0.14 → 1.0.15
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/credentials/aws-s3-credentials.d.ts +2 -1
- package/dist/credentials/aws-s3-credentials.js +1 -1
- package/dist/credentials/base-credentials.js +1 -1
- package/dist/credentials/index.js +1 -1
- package/dist/credentials/local-credentials.js +1 -1
- package/dist/delete/aws-s3-delete.d.ts +1 -1
- package/dist/delete/aws-s3-delete.js +1 -1
- package/dist/delete/base-delete.js +1 -1
- package/dist/delete/index.js +1 -1
- package/dist/delete/local-delete.js +1 -1
- package/dist/deploy/aws-s3-deploy.d.ts +3 -3
- package/dist/deploy/aws-s3-deploy.js +1 -1
- package/dist/deploy/base-deploy.js +1 -1
- package/dist/deploy/index.js +1 -1
- package/dist/deploy/local-deploy.js +1 -1
- package/dist/factory.d.ts +3 -3
- package/dist/factory.js +1 -1
- package/dist/index.js +1 -1
- package/dist/init.d.ts +4 -1
- package/dist/init.js +1 -1
- package/dist/retrieve/aws-s3-retrieve.d.ts +3 -3
- package/dist/retrieve/aws-s3-retrieve.js +1 -1
- package/dist/retrieve/base-retrieve.js +1 -1
- package/dist/retrieve/index.js +1 -1
- package/dist/retrieve/local-retrieve.js +1 -1
- package/dist/types/aws.types.d.ts +4 -3
- package/dist/types/aws.types.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/internal.types.js +1 -1
- package/dist/types/retrieve-status.enum.js +1 -1
- package/dist/types/storage-type.enum.js +1 -1
- package/dist/utils/aws-s3.utils.d.ts +2 -2
- package/dist/utils/aws-s3.utils.js +1 -1
- package/package.json +4 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BaseCredentials } from './base-credentials';
|
|
2
2
|
import { AwsCredentials } from '../types/aws.types';
|
|
3
3
|
export declare class AwsS3Credentials extends BaseCredentials<AwsCredentials> {
|
|
4
|
-
private
|
|
4
|
+
private readonly s3Client;
|
|
5
5
|
get accessKeyId(): string;
|
|
6
6
|
get secretAccessKey(): string;
|
|
7
7
|
get bucketName(): string;
|
|
8
|
+
get region(): string;
|
|
8
9
|
validate(): Promise<void>;
|
|
9
10
|
getCredentials(hideSensitive?: boolean): Pick<AwsCredentials, 'bucketName'> | AwsCredentials;
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x3ab379=_0x588f;(function(_0x325c00,_0x4a3fca){const _0x5c8654=_0x588f,_0x103d56=_0x325c00();while(!![]){try{const _0x531dde=-parseInt(_0x5c8654(0x80))/0x1*(-parseInt(_0x5c8654(0x89))/0x2)+parseInt(_0x5c8654(0x70))/0x3*(-parseInt(_0x5c8654(0x73))/0x4)+parseInt(_0x5c8654(0x84))/0x5+-parseInt(_0x5c8654(0x78))/0x6*(parseInt(_0x5c8654(0x6a))/0x7)+parseInt(_0x5c8654(0x71))/0x8*(-parseInt(_0x5c8654(0x6d))/0x9)+-parseInt(_0x5c8654(0x86))/0xa+-parseInt(_0x5c8654(0x74))/0xb*(parseInt(_0x5c8654(0x7e))/0xc);if(_0x531dde===_0x4a3fca)break;else _0x103d56['push'](_0x103d56['shift']());}catch(_0x56921e){_0x103d56['push'](_0x103d56['shift']());}}}(_0x1039,0x2de79));var __awaiter=this&&this['__awaiter']||function(_0x3a1ecd,_0x5090a1,_0x2fe026,_0x59d122){function _0x594c37(_0x2c4f85){return _0x2c4f85 instanceof _0x2fe026?_0x2c4f85:new _0x2fe026(function(_0x29b65d){_0x29b65d(_0x2c4f85);});}return new(_0x2fe026||(_0x2fe026=Promise))(function(_0x43f063,_0x29cff4){const _0x565741=_0x588f;function _0x118b7d(_0x49d898){const _0x3bfb32=_0x588f;try{_0xc54a1b(_0x59d122[_0x3bfb32(0x6c)](_0x49d898));}catch(_0x1f9ef6){_0x29cff4(_0x1f9ef6);}}function _0x433bbd(_0x77b6a4){const _0x4927ed=_0x588f;try{_0xc54a1b(_0x59d122[_0x4927ed(0x6f)](_0x77b6a4));}catch(_0x3f27b6){_0x29cff4(_0x3f27b6);}}function _0xc54a1b(_0x2ef9ff){const _0x33ad69=_0x588f;_0x2ef9ff[_0x33ad69(0x79)]?_0x43f063(_0x2ef9ff['value']):_0x594c37(_0x2ef9ff['value'])[_0x33ad69(0x87)](_0x118b7d,_0x433bbd);}_0xc54a1b((_0x59d122=_0x59d122[_0x565741(0x7f)](_0x3a1ecd,_0x5090a1||[]))[_0x565741(0x6c)]());});};Object['defineProperty'](exports,_0x3ab379(0x81),{'value':!![]}),exports['AwsS3Credentials']=void 0x0;function _0x588f(_0x1e41e1,_0x2fbc82){const _0x1039a6=_0x1039();return _0x588f=function(_0x588f50,_0xe97f7d){_0x588f50=_0x588f50-0x6a;let _0x18824=_0x1039a6[_0x588f50];return _0x18824;},_0x588f(_0x1e41e1,_0x2fbc82);}const base_credentials_1=require(_0x3ab379(0x7c)),client_s3_1=require('@aws-sdk/client-s3'),init_1=require(_0x3ab379(0x76));function _0x1039(){const _0x105273=['8mcDYKg','388353TAXjPk','s3Client','next','677538zXLfwy','HeadBucketCommand','throw','222WhNrml','8dIUcKO','credentials','1916rUZTqO','55891BETNbt','region','../init','send','6DHseJH','done','BaseCredentials','HttpHandler','./base-credentials','getCredentials','384sjZxEY','apply','49132OPUvqH','__esModule','accessKeyId','secretAccessKey','1706915WiuIIc','Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20','210870jcCSSW','then','bucketName'];_0x1039=function(){return _0x105273;};return _0x1039();}class AwsS3Credentials extends base_credentials_1[_0x3ab379(0x7a)]{constructor(){const _0x562f03=_0x3ab379;super(...arguments),this[_0x562f03(0x6b)]=new client_s3_1['S3Client']({'region':this[_0x562f03(0x72)][_0x562f03(0x75)],'credentials':{'accessKeyId':this[_0x562f03(0x72)][_0x562f03(0x82)],'secretAccessKey':this[_0x562f03(0x72)][_0x562f03(0x83)]},'requestHandler':new init_1[(_0x562f03(0x7b))]()});}get[_0x3ab379(0x82)](){const _0x4f06ff=_0x3ab379;return this[_0x4f06ff(0x72)][_0x4f06ff(0x82)];}get[_0x3ab379(0x83)](){return this['credentials']['secretAccessKey'];}get[_0x3ab379(0x88)](){const _0x3800a3=_0x3ab379;return this['credentials'][_0x3800a3(0x88)];}get['region'](){const _0x3f71f7=_0x3ab379;return this[_0x3f71f7(0x72)]['region'];}['validate'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x53a8d0=_0x588f;try{const _0x4c03ce=new client_s3_1[(_0x53a8d0(0x6e))]({'Bucket':this[_0x53a8d0(0x72)][_0x53a8d0(0x88)]});yield this[_0x53a8d0(0x6b)][_0x53a8d0(0x77)](_0x4c03ce);}catch(_0x4a97ae){throw new Error(_0x53a8d0(0x85)+_0x4a97ae['message']);}});}[_0x3ab379(0x7d)](_0xf74826=![]){const _0x338b07=_0x3ab379;if(_0xf74826)return{'bucketName':this[_0x338b07(0x72)][_0x338b07(0x88)]};return this['credentials'];}}exports['AwsS3Credentials']=AwsS3Credentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x4318dc=_0xfdfe;(function(_0x42e182,_0x1a0cd8){var _0x85ce0=_0xfdfe,_0x31a032=_0x42e182();while(!![]){try{var _0x4c77bf=-parseInt(_0x85ce0(0x135))/0x1+parseInt(_0x85ce0(0x13b))/0x2*(parseInt(_0x85ce0(0x139))/0x3)+-parseInt(_0x85ce0(0x131))/0x4+parseInt(_0x85ce0(0x136))/0x5*(parseInt(_0x85ce0(0x134))/0x6)+-parseInt(_0x85ce0(0x137))/0x7+-parseInt(_0x85ce0(0x130))/0x8+parseInt(_0x85ce0(0x133))/0x9;if(_0x4c77bf===_0x1a0cd8)break;else _0x31a032['push'](_0x31a032['shift']());}catch(_0x417cef){_0x31a032['push'](_0x31a032['shift']());}}}(_0x4af7,0x18c1a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BaseCredentials']=void 0x0;class BaseCredentials{constructor(_0x68680b){var _0x2f6c9b=_0xfdfe;this['rawCredentials']=_0x68680b,this[_0x2f6c9b(0x12f)]=this['rawCredentials']?JSON[_0x2f6c9b(0x138)](this[_0x2f6c9b(0x13a)]):null;}}function _0xfdfe(_0x200ae6,_0x1ba96f){var _0x4af716=_0x4af7();return _0xfdfe=function(_0xfdfe45,_0x218c21){_0xfdfe45=_0xfdfe45-0x12f;var _0x3568de=_0x4af716[_0xfdfe45];return _0x3568de;},_0xfdfe(_0x200ae6,_0x1ba96f);}exports[_0x4318dc(0x132)]=BaseCredentials;function _0x4af7(){var _0xd698cc=['169080RSDxxc','BaseCredentials','3633075hzduNy','366IHFgwR','130067jXcOph','320jhryxW','1414721qvJTnJ','parse','180FMYQrt','rawCredentials','4874kadSzt','credentials','623656VExgXD'];_0x4af7=function(){return _0xd698cc;};return _0x4af7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x4926(){var _0x5ec88b=['1520510cwZzDX','430QSrMxK','18BkSqli','5QKUhzE','216468tpHTLW','874746JBULsp','LocalCredentials','3866926hKXadA','17656LGoZim','11CzUMPX','2380456VibGaw','135794nYXhzC','AwsS3Credentials','__esModule','defineProperty','BaseCredentials','./local-credentials','./aws-s3-credentials'];_0x4926=function(){return _0x5ec88b;};return _0x4926();}var _0x39bd74=_0x22b0;(function(_0x383d9e,_0x41fc2a){var _0x9edb36=_0x22b0,_0x345cf1=_0x383d9e();while(!![]){try{var _0x24411d=-parseInt(_0x9edb36(0x1b6))/0x1*(-parseInt(_0x9edb36(0x1ac))/0x2)+-parseInt(_0x9edb36(0x1a5))/0x3+parseInt(_0x9edb36(0x1a9))/0x4*(parseInt(_0x9edb36(0x1b4))/0x5)+-parseInt(_0x9edb36(0x1a6))/0x6+parseInt(_0x9edb36(0x1a8))/0x7+parseInt(_0x9edb36(0x1ab))/0x8*(-parseInt(_0x9edb36(0x1b5))/0x9)+parseInt(_0x9edb36(0x1b3))/0xa*(-parseInt(_0x9edb36(0x1aa))/0xb);if(_0x24411d===_0x41fc2a)break;else _0x345cf1['push'](_0x345cf1['shift']());}catch(_0x5e726a){_0x345cf1['push'](_0x345cf1['shift']());}}}(_0x4926,0x4acdb));Object[_0x39bd74(0x1af)](exports,_0x39bd74(0x1ae),{'value':!![]}),exports[_0x39bd74(0x1a7)]=exports[_0x39bd74(0x1ad)]=exports[_0x39bd74(0x1b0)]=void 0x0;var base_credentials_1=require('./base-credentials');Object[_0x39bd74(0x1af)](exports,_0x39bd74(0x1b0),{'enumerable':!![],'get':function(){return base_credentials_1['BaseCredentials'];}});var aws_s3_credentials_1=require(_0x39bd74(0x1b2));Object['defineProperty'](exports,_0x39bd74(0x1ad),{'enumerable':!![],'get':function(){var _0x352a49=_0x39bd74;return aws_s3_credentials_1[_0x352a49(0x1ad)];}});function _0x22b0(_0x136386,_0x1127e9){var _0x492669=_0x4926();return _0x22b0=function(_0x22b044,_0x243c2c){_0x22b044=_0x22b044-0x1a5;var _0x50f7d5=_0x492669[_0x22b044];return _0x50f7d5;},_0x22b0(_0x136386,_0x1127e9);}var local_credentials_1=require(_0x39bd74(0x1b1));Object[_0x39bd74(0x1af)](exports,_0x39bd74(0x1a7),{'enumerable':!![],'get':function(){var _0x438282=_0x39bd74;return local_credentials_1[_0x438282(0x1a7)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x28d895=_0x57ac;(function(_0x33d25c,_0x5c300a){const _0x703b46=_0x57ac,_0x3c36bf=_0x33d25c();while(!![]){try{const _0x52bb40=-parseInt(_0x703b46(0x7c))/0x1*(-parseInt(_0x703b46(0x7b))/0x2)+-parseInt(_0x703b46(0x7e))/0x3+parseInt(_0x703b46(0x7a))/0x4*(parseInt(_0x703b46(0x82))/0x5)+-parseInt(_0x703b46(0x7d))/0x6+parseInt(_0x703b46(0x78))/0x7*(parseInt(_0x703b46(0x84))/0x8)+parseInt(_0x703b46(0x80))/0x9+parseInt(_0x703b46(0x79))/0xa;if(_0x52bb40===_0x5c300a)break;else _0x3c36bf['push'](_0x3c36bf['shift']());}catch(_0x51b466){_0x3c36bf['push'](_0x3c36bf['shift']());}}}(_0x1693,0x6af1b));function _0x57ac(_0x322546,_0x515b72){const _0x1693d8=_0x1693();return _0x57ac=function(_0x57acac,_0x80b005){_0x57acac=_0x57acac-0x77;let _0x41ddba=_0x1693d8[_0x57acac];return _0x41ddba;},_0x57ac(_0x322546,_0x515b72);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LocalCredentials']=void 0x0;const base_credentials_1=require(_0x28d895(0x81));class LocalCredentials extends base_credentials_1['BaseCredentials']{[_0x28d895(0x77)](){return null;}[_0x28d895(0x7f)](){return Promise['resolve'](undefined);}}function _0x1693(){const _0x31c606=['8370TXHzTR','LocalCredentials','784CoAFDt','getCredentials','35350CdxYWs','354140UjSrPg','256aREwBs','218mRGloW','4271GxSHEe','1863648DIWHeZ','2398767mhkAws','validate','4007259JsltWY','./base-credentials'];_0x1693=function(){return _0x31c606;};return _0x1693();}exports[_0x28d895(0x83)]=LocalCredentials;
|
|
@@ -3,7 +3,7 @@ import { BaseDelete } from './';
|
|
|
3
3
|
export declare class AwsS3Delete extends BaseDelete<AwsS3Credentials> {
|
|
4
4
|
protected readonly credentials: AwsS3Credentials;
|
|
5
5
|
private readonly OBJECTS_PER_CHUNK;
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly s3Client;
|
|
7
7
|
constructor(credentials: AwsS3Credentials);
|
|
8
8
|
execute(path: string): Promise<void>;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x23aa(){const _0x35b292=['getFilesPaths','secretAccessKey','join','then','__esModule','path','300TdWKpd','splitOnChunks','done','5487195gIEYQx','next','accessKeyId','sep','../utils/aws-s3.utils','2858088epUyxs','defineProperty','value','9186xsBUnC','ArrayUtils','BaseDelete','s3Client','AwsS3Delete','__awaiter','region','posix','AwsS3Utils','1691829OgaGVO','default','2255718Kweihs','execute','bucketName','send','credentials','575ETlRMz','split','OBJECTS_PER_CHUNK','HttpHandler','S3Client','DeleteObjectsCommand','throw','map','@aws-sdk/client-s3','991383VTLFmi','21270PhYZiF'];_0x23aa=function(){return _0x35b292;};return _0x23aa();}function _0x2b60(_0x1f11d4,_0x176e80){const _0x23aabc=_0x23aa();return _0x2b60=function(_0x2b607b,_0x16a58a){_0x2b607b=_0x2b607b-0xc8;let _0x25b065=_0x23aabc[_0x2b607b];return _0x25b065;},_0x2b60(_0x1f11d4,_0x176e80);}const _0x3998b8=_0x2b60;(function(_0x4a976c,_0x2b8e38){const _0x2e1383=_0x2b60,_0x2af3aa=_0x4a976c();while(!![]){try{const _0x4c59db=-parseInt(_0x2e1383(0xcf))/0x1+parseInt(_0x2e1383(0xed))/0x2+-parseInt(_0x2e1383(0xd0))/0x3*(-parseInt(_0x2e1383(0xd7))/0x4)+parseInt(_0x2e1383(0xf2))/0x5*(parseInt(_0x2e1383(0xe2))/0x6)+-parseInt(_0x2e1383(0xda))/0x7+parseInt(_0x2e1383(0xdf))/0x8+parseInt(_0x2e1383(0xeb))/0x9;if(_0x4c59db===_0x2b8e38)break;else _0x2af3aa['push'](_0x2af3aa['shift']());}catch(_0x2c9ab1){_0x2af3aa['push'](_0x2af3aa['shift']());}}}(_0x23aa,0x93dd0));var __awaiter=this&&this[_0x3998b8(0xe7)]||function(_0x5be80d,_0x5b78b8,_0x1dd64e,_0x3bdb26){function _0x1c3780(_0x3d0320){return _0x3d0320 instanceof _0x1dd64e?_0x3d0320:new _0x1dd64e(function(_0x32d823){_0x32d823(_0x3d0320);});}return new(_0x1dd64e||(_0x1dd64e=Promise))(function(_0x4f79bf,_0x47ce84){const _0x138090=_0x2b60;function _0xc9ae79(_0x202598){const _0xfaf25e=_0x2b60;try{_0x1bdd07(_0x3bdb26[_0xfaf25e(0xdb)](_0x202598));}catch(_0x19e3e7){_0x47ce84(_0x19e3e7);}}function _0x1adaba(_0xbee4f2){const _0x405ad3=_0x2b60;try{_0x1bdd07(_0x3bdb26[_0x405ad3(0xcc)](_0xbee4f2));}catch(_0x4d53c7){_0x47ce84(_0x4d53c7);}}function _0x1bdd07(_0x538c81){const _0x358eb7=_0x2b60;_0x538c81[_0x358eb7(0xd9)]?_0x4f79bf(_0x538c81[_0x358eb7(0xe1)]):_0x1c3780(_0x538c81[_0x358eb7(0xe1)])[_0x358eb7(0xd4)](_0xc9ae79,_0x1adaba);}_0x1bdd07((_0x3bdb26=_0x3bdb26['apply'](_0x5be80d,_0x5b78b8||[]))[_0x138090(0xdb)]());});},__importDefault=this&&this['__importDefault']||function(_0x2daf0f){const _0x33f45a=_0x3998b8;return _0x2daf0f&&_0x2daf0f[_0x33f45a(0xd5)]?_0x2daf0f:{'default':_0x2daf0f};};Object[_0x3998b8(0xe0)](exports,_0x3998b8(0xd5),{'value':!![]}),exports[_0x3998b8(0xe6)]=void 0x0;const path_1=__importDefault(require(_0x3998b8(0xd6))),utils_1=require('@flosum-service/utils'),aws_s3_utils_1=require(_0x3998b8(0xde)),_1=require('./'),client_s3_1=require(_0x3998b8(0xce)),init_1=require('../init');class AwsS3Delete extends _1[_0x3998b8(0xe4)]{constructor(_0x402e21){const _0x54b3d1=_0x3998b8;super(_0x402e21),this[_0x54b3d1(0xf1)]=_0x402e21,this['OBJECTS_PER_CHUNK']=0x3e8,this['s3Client']=new client_s3_1[(_0x54b3d1(0xca))]({'region':this['credentials'][_0x54b3d1(0xe8)],'credentials':{'accessKeyId':this[_0x54b3d1(0xf1)][_0x54b3d1(0xdc)],'secretAccessKey':this['credentials'][_0x54b3d1(0xd2)]},'requestHandler':new init_1[(_0x54b3d1(0xc9))]()});}[_0x3998b8(0xee)](_0x157ad0){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x343ac0=_0x2b60,_0xcfa2d8=_0x157ad0[_0x343ac0(0xf3)](path_1[_0x343ac0(0xec)][_0x343ac0(0xdd)])[_0x343ac0(0xd3)](path_1[_0x343ac0(0xec)][_0x343ac0(0xe9)]['sep']),_0x3c73fa=yield aws_s3_utils_1[_0x343ac0(0xea)][_0x343ac0(0xd1)](_0xcfa2d8,this[_0x343ac0(0xf1)][_0x343ac0(0xef)],this[_0x343ac0(0xe5)]),_0x6ff8fe=utils_1[_0x343ac0(0xe3)][_0x343ac0(0xd8)](_0x3c73fa,this[_0x343ac0(0xc8)]);for(const _0x463695 of _0x6ff8fe){const _0x59d788=_0x463695[_0x343ac0(0xcd)](_0x7a11ce=>({'Key':_0x7a11ce})),_0x38fe30=new client_s3_1[(_0x343ac0(0xcb))]({'Bucket':this['credentials'][_0x343ac0(0xef)],'Delete':{'Objects':_0x59d788}});yield this[_0x343ac0(0xe5)][_0x343ac0(0xf0)](_0x38fe30);}});}}exports[_0x3998b8(0xe6)]=AwsS3Delete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x1ebc(_0x590cc6,_0x5140a8){var _0x567541=_0x5675();return _0x1ebc=function(_0x1ebc7a,_0x296168){_0x1ebc7a=_0x1ebc7a-0x197;var _0x403bbd=_0x567541[_0x1ebc7a];return _0x403bbd;},_0x1ebc(_0x590cc6,_0x5140a8);}var _0x4360f4=_0x1ebc;(function(_0x42548a,_0x2d2d67){var _0x4066dc=_0x1ebc,_0x286acf=_0x42548a();while(!![]){try{var _0x450686=-parseInt(_0x4066dc(0x19b))/0x1*(parseInt(_0x4066dc(0x1a4))/0x2)+-parseInt(_0x4066dc(0x1a2))/0x3*(parseInt(_0x4066dc(0x19e))/0x4)+parseInt(_0x4066dc(0x199))/0x5+-parseInt(_0x4066dc(0x197))/0x6*(parseInt(_0x4066dc(0x1a0))/0x7)+parseInt(_0x4066dc(0x19d))/0x8+-parseInt(_0x4066dc(0x19c))/0x9+parseInt(_0x4066dc(0x1a1))/0xa*(parseInt(_0x4066dc(0x1a3))/0xb);if(_0x450686===_0x2d2d67)break;else _0x286acf['push'](_0x286acf['shift']());}catch(_0x42be5a){_0x286acf['push'](_0x286acf['shift']());}}}(_0x5675,0x705cb));Object[_0x4360f4(0x19a)](exports,'__esModule',{'value':!![]}),exports[_0x4360f4(0x19f)]=void 0x0;function _0x5675(){var _0x378992=['1813700DnQuZq','BaseDelete','14DSRUyf','967040zYGfQp','3SMqZzq','253tyNuZu','2znjXSG','2090670qSWVct','credentials','361120kBmPqF','defineProperty','725219LKmNKt','5927535ctoIxu','5583744CVCnAr'];_0x5675=function(){return _0x378992;};return _0x5675();}class BaseDelete{constructor(_0xd13d93){var _0x316899=_0x4360f4;this[_0x316899(0x198)]=_0xd13d93;}}exports[_0x4360f4(0x19f)]=BaseDelete;
|
package/dist/delete/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x437290=_0x1f15;(function(_0x364475,_0x2b825e){var _0x60ebee=_0x1f15,_0x189cf2=_0x364475();while(!![]){try{var _0x2a09c3=-parseInt(_0x60ebee(0x19d))/0x1+-parseInt(_0x60ebee(0x1a1))/0x2+parseInt(_0x60ebee(0x19b))/0x3+parseInt(_0x60ebee(0x1a6))/0x4+parseInt(_0x60ebee(0x19c))/0x5+-parseInt(_0x60ebee(0x1a3))/0x6+-parseInt(_0x60ebee(0x19a))/0x7;if(_0x2a09c3===_0x2b825e)break;else _0x189cf2['push'](_0x189cf2['shift']());}catch(_0x481183){_0x189cf2['push'](_0x189cf2['shift']());}}}(_0x296c,0x67566));function _0x296c(){var _0x3158fb=['AwsS3Delete','BaseDelete','166052JuGNAv','./aws-s3-delete','289877ssQkzr','1185702VXdePA','2530075XCyadw','15716AHKPCu','./local-delete','defineProperty','__esModule','799884KhkHii','LocalDelete','374538XJSUbS'];_0x296c=function(){return _0x3158fb;};return _0x296c();}Object[_0x437290(0x19f)](exports,_0x437290(0x1a0),{'value':!![]}),exports['LocalDelete']=exports['AwsS3Delete']=exports[_0x437290(0x1a5)]=void 0x0;function _0x1f15(_0x20e0df,_0x434104){var _0x296cc9=_0x296c();return _0x1f15=function(_0x1f1521,_0x3e80b6){_0x1f1521=_0x1f1521-0x199;var _0x257905=_0x296cc9[_0x1f1521];return _0x257905;},_0x1f15(_0x20e0df,_0x434104);}var base_delete_1=require('./base-delete');Object[_0x437290(0x19f)](exports,_0x437290(0x1a5),{'enumerable':!![],'get':function(){var _0x516f7e=_0x437290;return base_delete_1[_0x516f7e(0x1a5)];}});var aws_s3_delete_1=require(_0x437290(0x199));Object[_0x437290(0x19f)](exports,_0x437290(0x1a4),{'enumerable':!![],'get':function(){return aws_s3_delete_1['AwsS3Delete'];}});var local_delete_1=require(_0x437290(0x19e));Object[_0x437290(0x19f)](exports,_0x437290(0x1a2),{'enumerable':!![],'get':function(){var _0x42c3e8=_0x437290;return local_delete_1[_0x42c3e8(0x1a2)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x2c5a25=_0xa020;function _0xa020(_0x3de1ab,_0x219e81){const _0xe26fde=_0xe26f();return _0xa020=function(_0xa0200d,_0x5e14ac){_0xa0200d=_0xa0200d-0x142;let _0x3b5074=_0xe26fde[_0xa0200d];return _0x3b5074;},_0xa020(_0x3de1ab,_0x219e81);}(function(_0x1530b6,_0x63cfd3){const _0x4e9a19=_0xa020,_0xa90a88=_0x1530b6();while(!![]){try{const _0x310473=parseInt(_0x4e9a19(0x150))/0x1+-parseInt(_0x4e9a19(0x146))/0x2*(-parseInt(_0x4e9a19(0x144))/0x3)+-parseInt(_0x4e9a19(0x148))/0x4*(parseInt(_0x4e9a19(0x157))/0x5)+-parseInt(_0x4e9a19(0x14d))/0x6*(-parseInt(_0x4e9a19(0x142))/0x7)+-parseInt(_0x4e9a19(0x155))/0x8*(parseInt(_0x4e9a19(0x147))/0x9)+parseInt(_0x4e9a19(0x158))/0xa*(parseInt(_0x4e9a19(0x14b))/0xb)+-parseInt(_0x4e9a19(0x14a))/0xc;if(_0x310473===_0x63cfd3)break;else _0xa90a88['push'](_0xa90a88['shift']());}catch(_0xff6ff3){_0xa90a88['push'](_0xa90a88['shift']());}}}(_0xe26f,0x1af26));var __awaiter=this&&this[_0x2c5a25(0x14c)]||function(_0x5d75b3,_0x5c6e8f,_0x3ce43d,_0x1a9305){function _0x4df0e0(_0x307486){return _0x307486 instanceof _0x3ce43d?_0x307486:new _0x3ce43d(function(_0x50db2d){_0x50db2d(_0x307486);});}return new(_0x3ce43d||(_0x3ce43d=Promise))(function(_0x327cc3,_0x28a553){const _0x4bad63=_0xa020;function _0xa3c7a7(_0x1445b3){const _0x40f219=_0xa020;try{_0xe90ced(_0x1a9305[_0x40f219(0x149)](_0x1445b3));}catch(_0x4788df){_0x28a553(_0x4788df);}}function _0x180aac(_0x12e372){const _0x1472a1=_0xa020;try{_0xe90ced(_0x1a9305[_0x1472a1(0x153)](_0x12e372));}catch(_0x359438){_0x28a553(_0x359438);}}function _0xe90ced(_0x439b95){const _0x33a86b=_0xa020;_0x439b95['done']?_0x327cc3(_0x439b95[_0x33a86b(0x152)]):_0x4df0e0(_0x439b95[_0x33a86b(0x152)])[_0x33a86b(0x151)](_0xa3c7a7,_0x180aac);}_0xe90ced((_0x1a9305=_0x1a9305['apply'](_0x5d75b3,_0x5c6e8f||[]))[_0x4bad63(0x149)]());});};Object[_0x2c5a25(0x154)](exports,'__esModule',{'value':!![]}),exports['LocalDelete']=void 0x0;const promises_1=require(_0x2c5a25(0x156)),utils_1=require(_0x2c5a25(0x143)),_1=require('./');function _0xe26f(){const _0x2cbc59=['205148cqFmdg','then','value','throw','defineProperty','68424hBkYxI','fs/promises','400oNNYps','407590okaeJW','234766xKiUwD','@flosum-service/utils','267JVMEcf','LocalDelete','634EjzFSu','36QngKVr','4112HkXrdr','next','3068916VhVNpv','22ITXpWo','__awaiter','30wgMUwC','FsUtils','isExistsPath'];_0xe26f=function(){return _0x2cbc59;};return _0xe26f();}class LocalDelete extends _1['BaseDelete']{['execute'](_0x3ae348){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x23ee06=_0xa020;if(yield utils_1[_0x23ee06(0x14e)][_0x23ee06(0x14f)](_0x3ae348))yield(0x0,promises_1['rm'])(_0x3ae348,{'recursive':!![]});});}}exports[_0x2c5a25(0x145)]=LocalDelete;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import AWS from 'aws-sdk';
|
|
4
3
|
import { AwsS3Credentials } from '../credentials';
|
|
5
4
|
import { BaseDeploy } from './';
|
|
6
5
|
import * as stream from 'stream';
|
|
6
|
+
import { StorageClass } from '@aws-sdk/client-s3';
|
|
7
7
|
export declare class AwsS3Deploy extends BaseDeploy<AwsS3Credentials> {
|
|
8
8
|
protected credentials: AwsS3Credentials;
|
|
9
9
|
private storageClass;
|
|
10
|
-
private readonly
|
|
11
|
-
constructor(credentials: AwsS3Credentials, storageClass:
|
|
10
|
+
private readonly s3Client;
|
|
11
|
+
constructor(credentials: AwsS3Credentials, storageClass: StorageClass);
|
|
12
12
|
private upload;
|
|
13
13
|
execute(file: Buffer | stream.Readable, pathToFile: string): Promise<void>;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x116f99=_0x685b;(function(_0x5390c9,_0x3842fc){const _0x28d173=_0x685b,_0x1eac7b=_0x5390c9();while(!![]){try{const _0x5a8848=-parseInt(_0x28d173(0x1e9))/0x1*(parseInt(_0x28d173(0x1f2))/0x2)+-parseInt(_0x28d173(0x1e8))/0x3+parseInt(_0x28d173(0x1f7))/0x4*(-parseInt(_0x28d173(0x1f3))/0x5)+-parseInt(_0x28d173(0x1ed))/0x6+-parseInt(_0x28d173(0x1df))/0x7+-parseInt(_0x28d173(0x1fa))/0x8*(-parseInt(_0x28d173(0x1ee))/0x9)+parseInt(_0x28d173(0x1fe))/0xa;if(_0x5a8848===_0x3842fc)break;else _0x1eac7b['push'](_0x1eac7b['shift']());}catch(_0x15e257){_0x1eac7b['push'](_0x1eac7b['shift']());}}}(_0x39f9,0x57d47));var __awaiter=this&&this['__awaiter']||function(_0x24c998,_0x52037e,_0x15f79f,_0x3c9bc7){function _0x35da7b(_0x418755){return _0x418755 instanceof _0x15f79f?_0x418755:new _0x15f79f(function(_0x8ad193){_0x8ad193(_0x418755);});}return new(_0x15f79f||(_0x15f79f=Promise))(function(_0x2ab5dd,_0x477191){const _0x453f32=_0x685b;function _0x3850f4(_0x5eb181){const _0x1ddbb1=_0x685b;try{_0x1758a1(_0x3c9bc7[_0x1ddbb1(0x1fc)](_0x5eb181));}catch(_0x57c568){_0x477191(_0x57c568);}}function _0x3ab9ea(_0x4d603b){try{_0x1758a1(_0x3c9bc7['throw'](_0x4d603b));}catch(_0x1c4680){_0x477191(_0x1c4680);}}function _0x1758a1(_0x316e79){const _0x14d374=_0x685b;_0x316e79[_0x14d374(0x1f0)]?_0x2ab5dd(_0x316e79['value']):_0x35da7b(_0x316e79[_0x14d374(0x1ef)])[_0x14d374(0x1e6)](_0x3850f4,_0x3ab9ea);}_0x1758a1((_0x3c9bc7=_0x3c9bc7[_0x453f32(0x1e5)](_0x24c998,_0x52037e||[]))[_0x453f32(0x1fc)]());});},__importDefault=this&&this['__importDefault']||function(_0xc920c3){const _0x304b8c=_0x685b;return _0xc920c3&&_0xc920c3[_0x304b8c(0x1f4)]?_0xc920c3:{'default':_0xc920c3};};Object['defineProperty'](exports,_0x116f99(0x1f4),{'value':!![]}),exports[_0x116f99(0x1e1)]=void 0x0;const path_1=__importDefault(require(_0x116f99(0x1ec))),_1=require('./'),client_s3_1=require('@aws-sdk/client-s3'),init_1=require(_0x116f99(0x1f1)),lib_storage_1=require(_0x116f99(0x1e3));class AwsS3Deploy extends _1[_0x116f99(0x1f9)]{constructor(_0xf21923,_0x1f4126){const _0x915d50=_0x116f99;super(_0xf21923),this['credentials']=_0xf21923,this[_0x915d50(0x1e2)]=_0x1f4126,this[_0x915d50(0x1ea)]=new client_s3_1[(_0x915d50(0x1e7))]({'region':this['credentials'][_0x915d50(0x200)],'credentials':{'accessKeyId':this[_0x915d50(0x1ff)][_0x915d50(0x1f8)],'secretAccessKey':this[_0x915d50(0x1ff)]['secretAccessKey']},'requestHandler':new init_1[(_0x915d50(0x1e4))]()});}['upload'](_0x41e1db,_0x1a70f8){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4462f3=new lib_storage_1['Upload']({'client':this['s3Client'],'params':{'Bucket':this['credentials']['bucketName'],'Key':_0x1a70f8,'Body':_0x41e1db,'StorageClass':this['storageClass']}});yield _0x4462f3['done']();});}[_0x116f99(0x1fd)](_0x1f8515,_0x9598e1){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x19af7c=_0x685b;try{const _0xab071=_0x9598e1[_0x19af7c(0x1fb)](path_1[_0x19af7c(0x1e0)]['sep'])[_0x19af7c(0x1f6)](path_1[_0x19af7c(0x1e0)][_0x19af7c(0x1f5)]['sep']);yield this[_0x19af7c(0x1eb)](_0x1f8515,_0xab071);}catch(_0x1a7707){throw _0x1a7707;}});}}function _0x685b(_0x393239,_0x25c71a){const _0x39f96e=_0x39f9();return _0x685b=function(_0x685b82,_0x559845){_0x685b82=_0x685b82-0x1df;let _0x4d3bcf=_0x39f96e[_0x685b82];return _0x4d3bcf;},_0x685b(_0x393239,_0x25c71a);}exports[_0x116f99(0x1e1)]=AwsS3Deploy;function _0x39f9(){const _0x5176ca=['1310430cercLL','5926gAwtPM','s3Client','upload','path','1765128MBkEyB','1424961YpjtCi','value','done','../init','34rBecOi','34610EczJTU','__esModule','posix','join','116vOhMAH','accessKeyId','BaseDeploy','8YhgSWl','split','next','execute','16944420qhFGCL','credentials','region','3223794VcoAJw','default','AwsS3Deploy','storageClass','@aws-sdk/lib-storage','HttpHandler','apply','then','S3Client'];_0x39f9=function(){return _0x5176ca;};return _0x39f9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function _0x4518(){var _0x2c982f=['10pbvqCc','500577ASGvwD','1410992hyCxTp','10721844szgwfE','42BgwGOE','1OQhVYX','defineProperty','1152IgXLXp','7525903qEwdlv','__esModule','BaseDeploy','1501618AgKOlV','48013orzLoK','130535vJnDWn'];_0x4518=function(){return _0x2c982f;};return _0x4518();}var _0x5e9337=_0x8a4c;(function(_0x63cca3,_0x29209a){var _0x154583=_0x8a4c,_0x454aa2=_0x63cca3();while(!![]){try{var _0x7882ef=-parseInt(_0x154583(0x1a8))/0x1*(-parseInt(_0x154583(0x1ae))/0x2)+parseInt(_0x154583(0x1b2))/0x3+parseInt(_0x154583(0x1b3))/0x4+parseInt(_0x154583(0x1b0))/0x5*(-parseInt(_0x154583(0x1b5))/0x6)+-parseInt(_0x154583(0x1af))/0x7*(parseInt(_0x154583(0x1aa))/0x8)+parseInt(_0x154583(0x1b4))/0x9+-parseInt(_0x154583(0x1b1))/0xa*(parseInt(_0x154583(0x1ab))/0xb);if(_0x7882ef===_0x29209a)break;else _0x454aa2['push'](_0x454aa2['shift']());}catch(_0x57d1b8){_0x454aa2['push'](_0x454aa2['shift']());}}}(_0x4518,0x9438a));function _0x8a4c(_0x38bbdd,_0x21d6be){var _0x4518b4=_0x4518();return _0x8a4c=function(_0x8a4c8b,_0x3c0134){_0x8a4c8b=_0x8a4c8b-0x1a8;var _0xe4502f=_0x4518b4[_0x8a4c8b];return _0xe4502f;},_0x8a4c(_0x38bbdd,_0x21d6be);}Object[_0x5e9337(0x1a9)](exports,_0x5e9337(0x1ac),{'value':!![]}),exports['BaseDeploy']=void 0x0;class BaseDeploy{constructor(_0x23e070){this['credentials']=_0x23e070;}}exports[_0x5e9337(0x1ad)]=BaseDeploy;
|
package/dist/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x2bc628=_0x36e2;(function(_0xad340c,_0x5d4af5){var _0x4ed6a4=_0x36e2,_0x20c25d=_0xad340c();while(!![]){try{var _0x446918=-parseInt(_0x4ed6a4(0xbb))/0x1*(parseInt(_0x4ed6a4(0xc8))/0x2)+-parseInt(_0x4ed6a4(0xb9))/0x3+-parseInt(_0x4ed6a4(0xc4))/0x4*(-parseInt(_0x4ed6a4(0xc5))/0x5)+-parseInt(_0x4ed6a4(0xc2))/0x6+-parseInt(_0x4ed6a4(0xc0))/0x7+-parseInt(_0x4ed6a4(0xc3))/0x8*(-parseInt(_0x4ed6a4(0xbe))/0x9)+parseInt(_0x4ed6a4(0xbf))/0xa;if(_0x446918===_0x5d4af5)break;else _0x20c25d['push'](_0x20c25d['shift']());}catch(_0x411f27){_0x20c25d['push'](_0x20c25d['shift']());}}}(_0xd9c6,0x1af6c));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[_0x2bc628(0xbd)]=exports['AwsS3Deploy']=exports[_0x2bc628(0xc1)]=void 0x0;var base_deploy_1=require('./base-deploy');function _0x36e2(_0x50131f,_0x386bf6){var _0xd9c619=_0xd9c6();return _0x36e2=function(_0x36e297,_0x174852){_0x36e297=_0x36e297-0xb9;var _0x2c73f3=_0xd9c619[_0x36e297];return _0x2c73f3;},_0x36e2(_0x50131f,_0x386bf6);}Object['defineProperty'](exports,_0x2bc628(0xc1),{'enumerable':!![],'get':function(){var _0x4e894c=_0x2bc628;return base_deploy_1[_0x4e894c(0xc1)];}});var aws_s3_deploy_1=require(_0x2bc628(0xc7));Object[_0x2bc628(0xbc)](exports,_0x2bc628(0xba),{'enumerable':!![],'get':function(){var _0x3ae294=_0x2bc628;return aws_s3_deploy_1[_0x3ae294(0xba)];}});function _0xd9c6(){var _0x582288=['./local-deploy','./aws-s3-deploy','2680MbpERN','326451RhjyXe','AwsS3Deploy','148bNrRiR','defineProperty','LocalDeploy','612QuhsOz','3278720USBzZC','672469helXgb','BaseDeploy','330606CkOIAj','4480OBzdia','38628vfVRkb','105pXIhge'];_0xd9c6=function(){return _0x582288;};return _0xd9c6();}var local_deploy_1=require(_0x2bc628(0xc6));Object[_0x2bc628(0xbc)](exports,_0x2bc628(0xbd),{'enumerable':!![],'get':function(){var _0x26291d=_0x2bc628;return local_deploy_1[_0x26291d(0xbd)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0xa30c69=_0x1443;(function(_0x46bff6,_0x57a64f){const _0x49fd40=_0x1443,_0x487e69=_0x46bff6();while(!![]){try{const _0x5972ff=-parseInt(_0x49fd40(0xf4))/0x1+parseInt(_0x49fd40(0x104))/0x2*(-parseInt(_0x49fd40(0xf5))/0x3)+-parseInt(_0x49fd40(0x101))/0x4*(-parseInt(_0x49fd40(0xee))/0x5)+parseInt(_0x49fd40(0xf2))/0x6+parseInt(_0x49fd40(0xfc))/0x7*(parseInt(_0x49fd40(0xec))/0x8)+parseInt(_0x49fd40(0xf7))/0x9*(-parseInt(_0x49fd40(0xff))/0xa)+-parseInt(_0x49fd40(0x107))/0xb*(-parseInt(_0x49fd40(0xed))/0xc);if(_0x5972ff===_0x57a64f)break;else _0x487e69['push'](_0x487e69['shift']());}catch(_0x2ac703){_0x487e69['push'](_0x487e69['shift']());}}}(_0x15ba,0xc2492));var __awaiter=this&&this[_0xa30c69(0xf9)]||function(_0x41278b,_0x86b0ef,_0x11fd46,_0x8ec831){function _0x30329e(_0x337831){return _0x337831 instanceof _0x11fd46?_0x337831:new _0x11fd46(function(_0xdeadcc){_0xdeadcc(_0x337831);});}return new(_0x11fd46||(_0x11fd46=Promise))(function(_0x247531,_0x1842ed){const _0x3c683e=_0x1443;function _0x2c1607(_0x2a923b){const _0x5da461=_0x1443;try{_0x454111(_0x8ec831[_0x5da461(0xf8)](_0x2a923b));}catch(_0x4f13bd){_0x1842ed(_0x4f13bd);}}function _0x337827(_0x56fda3){try{_0x454111(_0x8ec831['throw'](_0x56fda3));}catch(_0x5c301f){_0x1842ed(_0x5c301f);}}function _0x454111(_0xe5f2f8){const _0x5895f2=_0x1443;_0xe5f2f8[_0x5895f2(0xfa)]?_0x247531(_0xe5f2f8[_0x5895f2(0x105)]):_0x30329e(_0xe5f2f8[_0x5895f2(0x105)])['then'](_0x2c1607,_0x337827);}_0x454111((_0x8ec831=_0x8ec831['apply'](_0x41278b,_0x86b0ef||[]))[_0x3c683e(0xf8)]());});},__importDefault=this&&this[_0xa30c69(0xfd)]||function(_0x3bcef8){return _0x3bcef8&&_0x3bcef8['__esModule']?_0x3bcef8:{'default':_0x3bcef8};};function _0x15ba(){const _0x3a8259=['default','1873403uzDlgH','__importDefault','FsUtils','1351010IfUZFn','execute','1020940YyXjHo','BaseDeploy','path','2hKcHqV','value','isExistsPath','55550VDZWvl','LocalDeploy','40XITbIP','3468wlMYHx','10kbNPlD','__esModule','defineProperty','mkdir','949782jQNbUy','@flosum-service/utils','956576OLvxGH','2304855UhJvqK','writeFile','63okHPBz','next','__awaiter','done'];_0x15ba=function(){return _0x3a8259;};return _0x15ba();}Object[_0xa30c69(0xf0)](exports,_0xa30c69(0xef),{'value':!![]}),exports[_0xa30c69(0x108)]=void 0x0;const path_1=__importDefault(require(_0xa30c69(0x103))),promises_1=require('fs/promises'),utils_1=require(_0xa30c69(0xf3)),_1=require('./');function _0x1443(_0x4de994,_0xa7c713){const _0x15bac1=_0x15ba();return _0x1443=function(_0x144399,_0x305ef3){_0x144399=_0x144399-0xec;let _0x413c80=_0x15bac1[_0x144399];return _0x413c80;},_0x1443(_0x4de994,_0xa7c713);}class LocalDeploy extends _1[_0xa30c69(0x102)]{[_0xa30c69(0x100)](_0x4051c7,_0x12cd98){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x53f2a5=_0x1443;try{const _0x4ddc24=path_1[_0x53f2a5(0xfb)]['dirname'](_0x12cd98),_0x408910=yield utils_1[_0x53f2a5(0xfe)][_0x53f2a5(0x106)](_0x4ddc24);!_0x408910&&(yield(0x0,promises_1[_0x53f2a5(0xf1)])(_0x4ddc24,{'recursive':!![]})),yield(0x0,promises_1[_0x53f2a5(0xf6)])(_0x12cd98,_0x4051c7);}catch(_0x54ab8c){(yield utils_1['FsUtils'][_0x53f2a5(0x106)](_0x12cd98))&&(yield(0x0,promises_1['rm'])(_0x12cd98,{'recursive':!![]}));throw _0x54ab8c;}});}}exports[_0xa30c69(0x108)]=LocalDeploy;
|
package/dist/factory.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import AWS from 'aws-sdk';
|
|
2
1
|
import { StorageType } from './types/storage-type.enum';
|
|
3
2
|
import { BaseCredentials } from './credentials/base-credentials';
|
|
4
3
|
import { BaseDelete } from './delete/base-delete';
|
|
5
4
|
import { BaseDeploy } from './deploy/base-deploy';
|
|
6
5
|
import { BaseRetrieve } from './retrieve/base-retrieve';
|
|
6
|
+
import { StorageClass, Tier } from '@aws-sdk/client-s3';
|
|
7
7
|
export declare class StorageFactory {
|
|
8
|
-
static createRetrieve(storageType: StorageType, credentials: BaseCredentials, path: string, restoreType?:
|
|
9
|
-
static createDeploy(storageType: StorageType, credentials: BaseCredentials, storageClass?:
|
|
8
|
+
static createRetrieve(storageType: StorageType, credentials: BaseCredentials, path: string, restoreType?: Tier, cachePath?: string): BaseRetrieve;
|
|
9
|
+
static createDeploy(storageType: StorageType, credentials: BaseCredentials, storageClass?: StorageClass): BaseDeploy;
|
|
10
10
|
static createDelete(storageType: StorageType, credentials: BaseCredentials): BaseDelete;
|
|
11
11
|
static createCredentials(storageType: StorageType, rawCredentials?: string): BaseCredentials;
|
|
12
12
|
}
|
package/dist/factory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x9344ab=_0x1b62;(function(_0x4e2c31,_0x1ac00f){const _0x3ccc36=_0x1b62,_0x4c770f=_0x4e2c31();while(!![]){try{const _0x20380f=parseInt(_0x3ccc36(0x18d))/0x1*(parseInt(_0x3ccc36(0x17a))/0x2)+parseInt(_0x3ccc36(0x182))/0x3+parseInt(_0x3ccc36(0x17e))/0x4+-parseInt(_0x3ccc36(0x180))/0x5*(parseInt(_0x3ccc36(0x191))/0x6)+parseInt(_0x3ccc36(0x190))/0x7+-parseInt(_0x3ccc36(0x186))/0x8*(parseInt(_0x3ccc36(0x193))/0x9)+-parseInt(_0x3ccc36(0x181))/0xa;if(_0x20380f===_0x1ac00f)break;else _0x4c770f['push'](_0x4c770f['shift']());}catch(_0x31d666){_0x4c770f['push'](_0x4c770f['shift']());}}}(_0x56a3,0xabb95));function _0x56a3(){const _0x3fdebd=['./delete/local-delete','Unknown\x20storage\x20type\x20-\x20\x22','2RAXctR','./credentials/aws-s3-credentials','StorageType','367381VXpTMh','5929236kTphaM','AwsS3Delete','225VbeXDx','AWS_S3','LocalDeploy','./delete/aws-s3-delete','151648zdsQRB','./retrieve/local-retrieve','./deploy/local-deploy','AwsS3Credentials','4565928fhFfhT','./deploy/aws-s3-deploy','5JQUbQK','840900nAVgLG','2866317kOAhOC','Local','StorageFactory','./retrieve/aws-s3-retrieve','168120ttYtAF','./types/storage-type.enum','defineProperty','createRetrieve','AwsS3Deploy'];_0x56a3=function(){return _0x3fdebd;};return _0x56a3();}Object[_0x9344ab(0x188)](exports,'__esModule',{'value':!![]}),exports[_0x9344ab(0x184)]=void 0x0;function _0x1b62(_0x4b7309,_0x5e694d){const _0x56a3d5=_0x56a3();return _0x1b62=function(_0x1b6229,_0x23f17d){_0x1b6229=_0x1b6229-0x178;let _0x27d947=_0x56a3d5[_0x1b6229];return _0x27d947;},_0x1b62(_0x4b7309,_0x5e694d);}const storage_type_enum_1=require(_0x9344ab(0x187)),aws_s3_credentials_1=require(_0x9344ab(0x18e)),local_credentials_1=require('./credentials/local-credentials'),aws_s3_delete_1=require(_0x9344ab(0x179)),local_delete_1=require(_0x9344ab(0x18b)),aws_s3_deploy_1=require(_0x9344ab(0x17f)),local_deploy_1=require(_0x9344ab(0x17c)),aws_s3_retrieve_1=require(_0x9344ab(0x185)),local_retrieve_1=require(_0x9344ab(0x17b));class StorageFactory{static[_0x9344ab(0x189)](_0x466a70,_0x2d92c5,_0x3034bb,_0x29e562,_0x374d4b){const _0x483da1=_0x9344ab;switch(_0x466a70){case storage_type_enum_1[_0x483da1(0x18f)][_0x483da1(0x194)]:return new aws_s3_retrieve_1['AwsS3Retrieve'](_0x2d92c5,_0x3034bb,_0x29e562,_0x374d4b);case storage_type_enum_1[_0x483da1(0x18f)]['Local']:return new local_retrieve_1['LocalRetrieve'](_0x2d92c5,_0x3034bb);default:throw new Error('Unknown\x20storage\x20type\x20-\x20\x22'+_0x466a70+'\x22');}}static['createDeploy'](_0x2e284e,_0xf356f9,_0x339eab){const _0x449f8e=_0x9344ab;switch(_0x2e284e){case storage_type_enum_1[_0x449f8e(0x18f)][_0x449f8e(0x194)]:return new aws_s3_deploy_1[(_0x449f8e(0x18a))](_0xf356f9,_0x339eab);case storage_type_enum_1[_0x449f8e(0x18f)][_0x449f8e(0x183)]:return new local_deploy_1[(_0x449f8e(0x178))](_0xf356f9);default:throw new Error(_0x449f8e(0x18c)+_0x2e284e+'\x22');}}static['createDelete'](_0x5a2b6b,_0x254323){const _0x3625b8=_0x9344ab;switch(_0x5a2b6b){case storage_type_enum_1['StorageType']['AWS_S3']:return new aws_s3_delete_1[(_0x3625b8(0x192))](_0x254323);case storage_type_enum_1[_0x3625b8(0x18f)][_0x3625b8(0x183)]:return new local_delete_1['LocalDelete'](_0x254323);default:throw new Error(_0x3625b8(0x18c)+_0x5a2b6b+'\x22');}}static['createCredentials'](_0x2082bb,_0x5cbf31){const _0x54f466=_0x9344ab;switch(_0x2082bb){case storage_type_enum_1['StorageType'][_0x54f466(0x194)]:return new aws_s3_credentials_1[(_0x54f466(0x17d))](_0x5cbf31);case storage_type_enum_1[_0x54f466(0x18f)][_0x54f466(0x183)]:return new local_credentials_1['LocalCredentials']();default:throw new Error(_0x54f466(0x18c)+_0x2082bb+'\x22');}}}exports[_0x9344ab(0x184)]=StorageFactory;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function _0x23e5(_0x4f28ea,_0x5bb9b6){var _0x1a3012=_0x1a30();return _0x23e5=function(_0x23e526,_0xcbc9b1){_0x23e526=_0x23e526-0x180;var _0x3c09df=_0x1a3012[_0x23e526];return _0x3c09df;},_0x23e5(_0x4f28ea,_0x5bb9b6);}var _0x1ab500=_0x23e5;(function(_0x7defc6,_0x675e66){var _0x4a551c=_0x23e5,_0x5a331b=_0x7defc6();while(!![]){try{var _0x276305=-parseInt(_0x4a551c(0x199))/0x1*(parseInt(_0x4a551c(0x18d))/0x2)+parseInt(_0x4a551c(0x18e))/0x3+parseInt(_0x4a551c(0x187))/0x4*(parseInt(_0x4a551c(0x183))/0x5)+-parseInt(_0x4a551c(0x19a))/0x6*(-parseInt(_0x4a551c(0x188))/0x7)+-parseInt(_0x4a551c(0x18a))/0x8+-parseInt(_0x4a551c(0x193))/0x9*(-parseInt(_0x4a551c(0x181))/0xa)+-parseInt(_0x4a551c(0x182))/0xb;if(_0x276305===_0x675e66)break;else _0x5a331b['push'](_0x5a331b['shift']());}catch(_0x3dd5aa){_0x5a331b['push'](_0x5a331b['shift']());}}}(_0x1a30,0x3e830));var __createBinding=this&&this[_0x1ab500(0x185)]||(Object[_0x1ab500(0x184)]?function(_0x247dd6,_0x4d0914,_0x3754ee,_0x550d09){var _0x35a77e=_0x1ab500;if(_0x550d09===undefined)_0x550d09=_0x3754ee;var _0x320881=Object[_0x35a77e(0x180)](_0x4d0914,_0x3754ee);(!_0x320881||(_0x35a77e(0x192)in _0x320881?!_0x4d0914['__esModule']:_0x320881['writable']||_0x320881[_0x35a77e(0x186)]))&&(_0x320881={'enumerable':!![],'get':function(){return _0x4d0914[_0x3754ee];}}),Object[_0x35a77e(0x194)](_0x247dd6,_0x550d09,_0x320881);}:function(_0x9bed02,_0x388e33,_0x1a46d1,_0x5e13cd){if(_0x5e13cd===undefined)_0x5e13cd=_0x1a46d1;_0x9bed02[_0x5e13cd]=_0x388e33[_0x1a46d1];}),__exportStar=this&&this['__exportStar']||function(_0x2e84bf,_0x19064f){var _0x2733f6=_0x1ab500;for(var _0x1b06fc in _0x2e84bf)if(_0x1b06fc!=='default'&&!Object[_0x2733f6(0x18f)][_0x2733f6(0x198)]['call'](_0x19064f,_0x1b06fc))__createBinding(_0x19064f,_0x2e84bf,_0x1b06fc);};Object['defineProperty'](exports,_0x1ab500(0x191),{'value':!![]}),exports['StorageFactory']=void 0x0,require('./init'),__exportStar(require(_0x1ab500(0x195)),exports),__exportStar(require(_0x1ab500(0x197)),exports),__exportStar(require(_0x1ab500(0x190)),exports),__exportStar(require(_0x1ab500(0x18c)),exports);function _0x1a30(){var _0x28cb1b=['92YUmasY','37394wtRphi','StorageFactory','3294048qhLGTF','./types','./retrieve','8DUouAe','1444452KjtLbj','prototype','./deploy','__esModule','get','5814cFCgxc','defineProperty','./credentials','./factory','./delete','hasOwnProperty','33331FRWMZn','510mqaFll','getOwnPropertyDescriptor','5140ftCaMH','9728686czTRYL','90860mwPSgu','create','__createBinding','configurable'];_0x1a30=function(){return _0x28cb1b;};return _0x1a30();}var factory_1=require(_0x1ab500(0x196));Object[_0x1ab500(0x194)](exports,'StorageFactory',{'enumerable':!![],'get':function(){var _0x31c07e=_0x1ab500;return factory_1[_0x31c07e(0x189)];}}),__exportStar(require(_0x1ab500(0x18b)),exports);
|
package/dist/init.d.ts
CHANGED
package/dist/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x488a45=_0x2dc5;(function(_0x201872,_0x59f8fa){const _0x39d4ba=_0x2dc5,_0x3f8791=_0x201872();while(!![]){try{const _0x2805d0=-parseInt(_0x39d4ba(0xb4))/0x1+parseInt(_0x39d4ba(0xb1))/0x2*(parseInt(_0x39d4ba(0xb8))/0x3)+parseInt(_0x39d4ba(0xad))/0x4*(-parseInt(_0x39d4ba(0xa6))/0x5)+-parseInt(_0x39d4ba(0xaa))/0x6*(parseInt(_0x39d4ba(0xb0))/0x7)+parseInt(_0x39d4ba(0xb3))/0x8+parseInt(_0x39d4ba(0xb2))/0x9+-parseInt(_0x39d4ba(0xa7))/0xa*(-parseInt(_0x39d4ba(0xab))/0xb);if(_0x2805d0===_0x59f8fa)break;else _0x3f8791['push'](_0x3f8791['shift']());}catch(_0x3fac08){_0x3f8791['push'](_0x3f8791['shift']());}}}(_0x4840,0x51356));Object[_0x488a45(0xac)](exports,_0x488a45(0xa9),{'value':!![]}),exports[_0x488a45(0xa8)]=void 0x0;function _0x4840(){const _0x28ed47=['defineProperty','1355316onuRmC','HTTPS_PROXY','HttpsProxyAgent','14UnOdqZ','2ivnOkl','503766PXDhMQ','2894104desUVs','617806oNAOHx','env','HTTP_PROXY','NodeHttpHandler','1769934jUofqf','5fbdoYu','3197300UBNqRf','HttpHandler','__esModule','114540zknxjh','11XwKAoA'];_0x4840=function(){return _0x28ed47;};return _0x4840();}function _0x2dc5(_0x2c8dd3,_0x4de913){const _0x484088=_0x4840();return _0x2dc5=function(_0x2dc564,_0x51ab0a){_0x2dc564=_0x2dc564-0xa6;let _0x4a0ab6=_0x484088[_0x2dc564];return _0x4a0ab6;},_0x2dc5(_0x2c8dd3,_0x4de913);}const https_proxy_agent_1=require('https-proxy-agent'),node_http_handler_1=require('@smithy/node-http-handler');class HttpHandler extends node_http_handler_1[_0x488a45(0xb7)]{constructor(){const _0x6abe0d=_0x488a45;if(process[_0x6abe0d(0xb5)][_0x6abe0d(0xb6)]||process[_0x6abe0d(0xb5)][_0x6abe0d(0xae)]){const _0x1b76a7=new https_proxy_agent_1[(_0x6abe0d(0xaf))](process[_0x6abe0d(0xb5)][_0x6abe0d(0xb6)]||process[_0x6abe0d(0xb5)][_0x6abe0d(0xae)]);super({'httpAgent':_0x1b76a7,'httpsAgent':_0x1b76a7});}else super({});}}exports[_0x488a45(0xa8)]=HttpHandler;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import AWS from 'aws-sdk';
|
|
3
2
|
import { BaseRetrieve } from './';
|
|
4
3
|
import { AwsS3Credentials } from '../credentials';
|
|
5
4
|
import { FileInfo } from '../types/internal.types';
|
|
6
5
|
import { Readable } from 'stream';
|
|
6
|
+
import { Tier } from '@aws-sdk/client-s3';
|
|
7
7
|
export declare class AwsS3Retrieve extends BaseRetrieve<AwsS3Credentials> {
|
|
8
8
|
private readonly restoreType;
|
|
9
9
|
private readonly cachePath?;
|
|
10
10
|
private readonly CHECK_RESTORED_TIMEOUT;
|
|
11
11
|
private readonly RETRIEVE_STATUS_CHECK_TIMEOUT;
|
|
12
|
-
private readonly
|
|
12
|
+
private readonly s3Client;
|
|
13
13
|
private files;
|
|
14
|
-
constructor(credentials: AwsS3Credentials, path: string, restoreType:
|
|
14
|
+
constructor(credentials: AwsS3Credentials, path: string, restoreType: Tier, cachePath?: string | undefined);
|
|
15
15
|
waitUtilRetrieveDone(): Promise<void>;
|
|
16
16
|
execute(): Promise<FileInfo>;
|
|
17
17
|
private fetchFileInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x533182=_0x1e28;function _0x310e(){const _0x1939b4=['waitUtilRetrieveDone','AwsS3Utils','16006329XEBUuv','promise','10339984fJrdbD','status','value','message','some','getFilesPaths','isDone','credentials','STANDARD','sep','posix','next','randomUUID','1999062ARzAOn','secretAccessKey','split','updateFilesRetrieveStatus','Restoring','1673clIQiP','Completed','StorageClass','fetchFileInfo','../types/aws.types','done','RETRIEVE_STATUS_CHECK_TIMEOUT','../utils/aws-s3.utils','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','shift','InProgress','NeedRestore','tryRestoreFilesFromCloud','close','../types/retrieve-status.enum','AwsS3Retrieve','437263VNnZiY','extractFileRetrieveStatusFromFileInfo','restoreType','files','default','bucketName','35586QMLuEV','length','2687890WWHzis','BaseRetrieve','CHECK_RESTORED_TIMEOUT','55YRZKuB','RetrieveStatus','fetchFileBody','AwsFileRetrieveStatus','runRestoreFiles','482840FrmEfj','path','createCacheFileStream','init','timers/promises','writeFile','2jKBWIs','restoreObject','errorMessage','8vUJWGV','apply','checkFilesRetrieveStatus','restoreFile','getObject','__esModule','then','push','join','Exception','setTimeout','fs/promises','No\x20files\x20left\x20to\x20execute.','cachePath','filter'];_0x310e=function(){return _0x1939b4;};return _0x310e();}(function(_0x118581,_0x38addd){const _0x5dad91=_0x1e28,_0x3a3564=_0x118581();while(!![]){try{const _0x3fcfe0=parseInt(_0x5dad91(0xf9))/0x1*(-parseInt(_0x5dad91(0x10f))/0x2)+-parseInt(_0x5dad91(0xe4))/0x3+-parseInt(_0x5dad91(0xc4))/0x4*(parseInt(_0x5dad91(0x109))/0x5)+-parseInt(_0x5dad91(0xff))/0x6*(-parseInt(_0x5dad91(0xe9))/0x7)+parseInt(_0x5dad91(0xd7))/0x8+-parseInt(_0x5dad91(0xd5))/0x9+-parseInt(_0x5dad91(0x101))/0xa*(-parseInt(_0x5dad91(0x104))/0xb);if(_0x3fcfe0===_0x38addd)break;else _0x3a3564['push'](_0x3a3564['shift']());}catch(_0x321cc5){_0x3a3564['push'](_0x3a3564['shift']());}}}(_0x310e,0xeef1e));var __awaiter=this&&this['__awaiter']||function(_0x1e8459,_0x5f592b,_0x3785d2,_0x5ae111){function _0x108ee0(_0x18d8b7){return _0x18d8b7 instanceof _0x3785d2?_0x18d8b7:new _0x3785d2(function(_0x250cb9){_0x250cb9(_0x18d8b7);});}return new(_0x3785d2||(_0x3785d2=Promise))(function(_0x3ce029,_0x590c98){const _0x75260b=_0x1e28;function _0xeea6d5(_0x41a4f3){const _0x4ef6fc=_0x1e28;try{_0x4ddcc2(_0x5ae111[_0x4ef6fc(0xe2)](_0x41a4f3));}catch(_0x3b1cf6){_0x590c98(_0x3b1cf6);}}function _0x10e0ad(_0x49d816){try{_0x4ddcc2(_0x5ae111['throw'](_0x49d816));}catch(_0x2faffe){_0x590c98(_0x2faffe);}}function _0x4ddcc2(_0x484dac){const _0x581262=_0x1e28;_0x484dac[_0x581262(0xee)]?_0x3ce029(_0x484dac[_0x581262(0xd9)]):_0x108ee0(_0x484dac[_0x581262(0xd9)])[_0x581262(0xca)](_0xeea6d5,_0x10e0ad);}_0x4ddcc2((_0x5ae111=_0x5ae111[_0x75260b(0xc5)](_0x1e8459,_0x5f592b||[]))[_0x75260b(0xe2)]());});},__importDefault=this&&this['__importDefault']||function(_0x24732c){const _0x4b091a=_0x1e28;return _0x24732c&&_0x24732c[_0x4b091a(0xc9)]?_0x24732c:{'default':_0x24732c};};Object['defineProperty'](exports,_0x533182(0xc9),{'value':!![]}),exports[_0x533182(0xf8)]=void 0x0;const aws_sdk_1=__importDefault(require('aws-sdk')),path_1=__importDefault(require(_0x533182(0x10a))),promises_1=require(_0x533182(0x10d)),aws_s3_utils_1=require(_0x533182(0xf0)),_1=require('./'),aws_types_1=require(_0x533182(0xed)),retrieve_status_enum_1=require(_0x533182(0xf7)),path_2=__importDefault(require('path')),crypto_1=require('crypto'),promises_2=require(_0x533182(0xcf)),fs_1=require('fs');function _0x1e28(_0x123a14,_0x5c69c7){const _0x310ecf=_0x310e();return _0x1e28=function(_0x1e28cc,_0x4c0ac6){_0x1e28cc=_0x1e28cc-0xc4;let _0x5de561=_0x310ecf[_0x1e28cc];return _0x5de561;},_0x1e28(_0x123a14,_0x5c69c7);}class AwsS3Retrieve extends _1[_0x533182(0x102)]{constructor(_0x675555,_0x593dc4,_0x1c6c96,_0x40bd31){const _0x3d8b30=_0x533182,_0x1311af=_0x593dc4[_0x3d8b30(0xe6)](path_1[_0x3d8b30(0xfd)][_0x3d8b30(0xe0)])[_0x3d8b30(0xcc)](path_1[_0x3d8b30(0xfd)][_0x3d8b30(0xe1)][_0x3d8b30(0xe0)]);super(_0x675555,_0x1311af),this[_0x3d8b30(0xfb)]=_0x1c6c96,this[_0x3d8b30(0xd1)]=_0x40bd31,this[_0x3d8b30(0x103)]=0x7530,this[_0x3d8b30(0xef)]=0x3e8,this['s3']=new aws_sdk_1[(_0x3d8b30(0xfd))]['S3']({'accessKeyId':this[_0x3d8b30(0xde)]['accessKeyId'],'secretAccessKey':this[_0x3d8b30(0xde)][_0x3d8b30(0xe5)]}),this[_0x3d8b30(0xfc)]=[];}[_0x533182(0xd3)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x406373=_0x1e28;this[_0x406373(0xd8)]===retrieve_status_enum_1[_0x406373(0x105)]['Uninitialized']&&(yield this[_0x406373(0x10c)](),yield this[_0x406373(0xd3)]());switch(this[_0x406373(0xd8)]){case retrieve_status_enum_1[_0x406373(0x105)][_0x406373(0xf3)]:yield(0x0,promises_1[_0x406373(0xce)])(this[_0x406373(0xef)]),yield this[_0x406373(0xd3)]();break;case retrieve_status_enum_1[_0x406373(0x105)][_0x406373(0xcd)]:throw new Error(this[_0x406373(0x111)]);}});}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4cde75=_0x1e28;if(this[_0x4cde75(0xd8)]===retrieve_status_enum_1['RetrieveStatus'][_0x4cde75(0xf3)])throw new Error(_0x4cde75(0xf1));if(this[_0x4cde75(0xdd)]||!this[_0x4cde75(0xfc)][_0x4cde75(0x100)])throw new Error(_0x4cde75(0xd0));const _0x6153ae=this[_0x4cde75(0xfc)][_0x4cde75(0xf2)]();let _0x27194e;return!this['cachePath']?_0x27194e=this[_0x4cde75(0x106)](_0x6153ae[_0x4cde75(0x10a)]):_0x27194e=yield this[_0x4cde75(0x10b)](this[_0x4cde75(0x106)](_0x6153ae[_0x4cde75(0x10a)])),this[_0x4cde75(0xdd)]=!this[_0x4cde75(0xfc)][_0x4cde75(0x100)],{'path':this[_0x4cde75(0x10a)][_0x4cde75(0xe6)](path_1[_0x4cde75(0xfd)]['posix'][_0x4cde75(0xe0)])[_0x4cde75(0xcc)](path_1[_0x4cde75(0xfd)][_0x4cde75(0xe0)]),'content':_0x27194e};});}[_0x533182(0xec)](_0x4fa65a){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1508a2=_0x1e28,_0x1317c4={'Bucket':this[_0x1508a2(0xde)]['bucketName'],'Key':_0x4fa65a},{StorageClass:_0x2db704,Restore:_0x13eaa0}=yield this['s3']['headObject'](_0x1317c4)[_0x1508a2(0xd6)]();return{'StorageClass':_0x2db704,'Restore':_0x13eaa0};});}[_0x533182(0xc7)](_0x15f1a6){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x40cae2=_0x1e28,_0x4f63d2={'Bucket':this[_0x40cae2(0xde)][_0x40cae2(0xfe)],'Key':_0x15f1a6,'RestoreRequest':{'Days':0x1,'GlacierJobParameters':{'Tier':this[_0x40cae2(0xfb)]}}};yield this['s3'][_0x40cae2(0x110)](_0x4f63d2)[_0x40cae2(0xd6)]();});}[_0x533182(0x106)](_0xd9705d){const _0x27b9fc=_0x533182,_0x497a77={'Bucket':this['credentials']['bucketName'],'Key':_0xd9705d};return this['s3'][_0x27b9fc(0xc8)](_0x497a77)['createReadStream']();}[_0x533182(0x10c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x451da7=_0x1e28;yield this['tryRestoreFilesFromCloud'](),yield this[_0x451da7(0x108)](),this['status']=retrieve_status_enum_1[_0x451da7(0x105)]['InProgress'],this['checkFilesRetrieveStatus']()['catch'](_0x39110a=>{const _0x5c6b76=_0x451da7;this[_0x5c6b76(0xd8)]=retrieve_status_enum_1[_0x5c6b76(0x105)]['Exception'],this[_0x5c6b76(0x111)]=_0x39110a[_0x5c6b76(0xda)];});});}[_0x533182(0xf5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x35e56c=_0x1e28,_0x572329=yield aws_s3_utils_1[_0x35e56c(0xd4)][_0x35e56c(0xdc)](this[_0x35e56c(0x10a)],this[_0x35e56c(0xde)][_0x35e56c(0xfe)],this['s3']);for(const _0x45945d of _0x572329){const _0x4df0cd=yield this[_0x35e56c(0xec)](_0x45945d);this['files'][_0x35e56c(0xcb)]({'path':_0x45945d,'class':_0x4df0cd[_0x35e56c(0xeb)]||_0x35e56c(0xdf),'status':aws_s3_utils_1[_0x35e56c(0xd4)]['extractFileRetrieveStatusFromFileInfo'](_0x4df0cd)});}});}[_0x533182(0x108)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x51862c=_0x1e28,_0x582a45=this[_0x51862c(0xfc)][_0x51862c(0xd2)](_0xf0106d=>_0xf0106d[_0x51862c(0xd8)]===aws_types_1['AwsFileRetrieveStatus'][_0x51862c(0xf4)]);for(const _0x58aba3 of _0x582a45){yield this[_0x51862c(0xc7)](_0x58aba3['path']),_0x58aba3[_0x51862c(0xd8)]=aws_types_1['AwsFileRetrieveStatus'][_0x51862c(0xe8)];}});}[_0x533182(0xe7)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x59618d=_0x1e28,_0x4031f4=this[_0x59618d(0xfc)][_0x59618d(0xd2)](_0x541618=>_0x541618[_0x59618d(0xd8)]===aws_types_1[_0x59618d(0x107)][_0x59618d(0xe8)]);for(const _0x276bb2 of _0x4031f4){const _0x334076=yield this[_0x59618d(0xec)](_0x276bb2['path']);_0x276bb2[_0x59618d(0xd8)]=aws_s3_utils_1['AwsS3Utils'][_0x59618d(0xfa)](_0x334076);}});}[_0x533182(0xc6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x488eca=_0x1e28,_0x829cbd=this['files'][_0x488eca(0xdb)](_0x13cd92=>_0x13cd92[_0x488eca(0xd8)]===aws_types_1[_0x488eca(0x107)]['Restoring']);this[_0x488eca(0xd8)]=_0x829cbd?retrieve_status_enum_1[_0x488eca(0x105)][_0x488eca(0xf3)]:retrieve_status_enum_1['RetrieveStatus'][_0x488eca(0xea)],_0x829cbd&&(yield(0x0,promises_1[_0x488eca(0xce)])(this[_0x488eca(0x103)]),yield this[_0x488eca(0xe7)](),yield this[_0x488eca(0xc6)]());});}[_0x533182(0x10b)](_0x2e35c8){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xa75c53=_0x1e28,_0x56952b=path_2[_0xa75c53(0xfd)]['join'](this[_0xa75c53(0xd1)],(0x0,crypto_1[_0xa75c53(0xe3)])());yield(0x0,promises_2[_0xa75c53(0x10e)])(_0x56952b,_0x2e35c8);const _0x30a951=(0x0,fs_1['createReadStream'])(_0x56952b);return _0x30a951['on'](_0xa75c53(0xf6),()=>(0x0,promises_2['rm'])(_0x56952b)),_0x30a951;});}}exports[_0x533182(0xf8)]=AwsS3Retrieve;
|
|
1
|
+
'use strict';const _0x31acc9=_0x46e9;(function(_0x3bf77f,_0x574bc4){const _0x18e319=_0x46e9,_0x545abb=_0x3bf77f();while(!![]){try{const _0x47c91e=-parseInt(_0x18e319(0x10a))/0x1+-parseInt(_0x18e319(0x10f))/0x2*(-parseInt(_0x18e319(0x118))/0x3)+parseInt(_0x18e319(0x12a))/0x4+parseInt(_0x18e319(0x107))/0x5+-parseInt(_0x18e319(0x10e))/0x6*(parseInt(_0x18e319(0x113))/0x7)+parseInt(_0x18e319(0x140))/0x8*(parseInt(_0x18e319(0x114))/0x9)+parseInt(_0x18e319(0x13e))/0xa*(-parseInt(_0x18e319(0x12d))/0xb);if(_0x47c91e===_0x574bc4)break;else _0x545abb['push'](_0x545abb['shift']());}catch(_0x559277){_0x545abb['push'](_0x545abb['shift']());}}}(_0x2d89,0x2089b));var __awaiter=this&&this[_0x31acc9(0x108)]||function(_0x4cf764,_0x1bdeae,_0x65c6b7,_0x451890){function _0x1370cf(_0x11a3ee){return _0x11a3ee instanceof _0x65c6b7?_0x11a3ee:new _0x65c6b7(function(_0x46d341){_0x46d341(_0x11a3ee);});}return new(_0x65c6b7||(_0x65c6b7=Promise))(function(_0x211ebc,_0x1d7251){const _0x569ca5=_0x46e9;function _0x527534(_0x34d36f){const _0x5aa8e0=_0x46e9;try{_0x4e2601(_0x451890[_0x5aa8e0(0xf8)](_0x34d36f));}catch(_0x5c984f){_0x1d7251(_0x5c984f);}}function _0x309166(_0xcf12f3){const _0x52d9ad=_0x46e9;try{_0x4e2601(_0x451890[_0x52d9ad(0x120)](_0xcf12f3));}catch(_0x3733d9){_0x1d7251(_0x3733d9);}}function _0x4e2601(_0x348e96){const _0x31b3fa=_0x46e9;_0x348e96[_0x31b3fa(0x13a)]?_0x211ebc(_0x348e96[_0x31b3fa(0x13d)]):_0x1370cf(_0x348e96[_0x31b3fa(0x13d)])[_0x31b3fa(0x109)](_0x527534,_0x309166);}_0x4e2601((_0x451890=_0x451890[_0x569ca5(0x149)](_0x4cf764,_0x1bdeae||[]))[_0x569ca5(0xf8)]());});},__importDefault=this&&this[_0x31acc9(0x103)]||function(_0x2a09f1){const _0x409579=_0x31acc9;return _0x2a09f1&&_0x2a09f1[_0x409579(0x136)]?_0x2a09f1:{'default':_0x2a09f1};};Object[_0x31acc9(0xfd)](exports,_0x31acc9(0x136),{'value':!![]}),exports[_0x31acc9(0x143)]=void 0x0;const path_1=__importDefault(require(_0x31acc9(0x116))),promises_1=require(_0x31acc9(0xfa)),aws_s3_utils_1=require(_0x31acc9(0x119)),_1=require('./'),aws_types_1=require(_0x31acc9(0x13c)),retrieve_status_enum_1=require('../types/retrieve-status.enum'),stream_1=require('stream'),path_2=__importDefault(require(_0x31acc9(0x116))),crypto_1=require(_0x31acc9(0x137)),promises_2=require(_0x31acc9(0x146)),fs_1=require('fs'),client_s3_1=require(_0x31acc9(0xf5)),init_1=require(_0x31acc9(0x14c));function _0x46e9(_0x5df27e,_0x441cbb){const _0x2d89f4=_0x2d89();return _0x46e9=function(_0x46e9c5,_0x519b2d){_0x46e9c5=_0x46e9c5-0xf4;let _0x445a13=_0x2d89f4[_0x46e9c5];return _0x445a13;},_0x46e9(_0x5df27e,_0x441cbb);}class AwsS3Retrieve extends _1[_0x31acc9(0x147)]{constructor(_0x49c642,_0x2e57b9,_0x45fd4b,_0xd67b45){const _0x483fec=_0x31acc9,_0x356920=_0x2e57b9['split'](path_1[_0x483fec(0x124)][_0x483fec(0x12c)])[_0x483fec(0x11a)](path_1['default']['posix'][_0x483fec(0x12c)]);super(_0x49c642,_0x356920),this['restoreType']=_0x45fd4b,this['cachePath']=_0xd67b45,this[_0x483fec(0x14b)]=0x7530,this[_0x483fec(0x102)]=0x3e8,this[_0x483fec(0x110)]=new client_s3_1[(_0x483fec(0x115))]({'region':this[_0x483fec(0x133)][_0x483fec(0x13b)],'credentials':{'accessKeyId':this[_0x483fec(0x133)][_0x483fec(0x101)],'secretAccessKey':this[_0x483fec(0x133)][_0x483fec(0x11b)]},'requestHandler':new init_1[(_0x483fec(0xf7))]()}),this[_0x483fec(0x126)]=[];}[_0x31acc9(0x13f)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5dcd6a=_0x46e9;this[_0x5dcd6a(0x111)]===retrieve_status_enum_1[_0x5dcd6a(0x145)][_0x5dcd6a(0x134)]&&(yield this[_0x5dcd6a(0xf9)](),yield this[_0x5dcd6a(0x13f)]());switch(this[_0x5dcd6a(0x111)]){case retrieve_status_enum_1['RetrieveStatus']['InProgress']:yield(0x0,promises_1['setTimeout'])(this['RETRIEVE_STATUS_CHECK_TIMEOUT']),yield this['waitUtilRetrieveDone']();break;case retrieve_status_enum_1[_0x5dcd6a(0x145)][_0x5dcd6a(0x131)]:throw new Error(this['errorMessage']);}});}[_0x31acc9(0x130)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x26f3d4=_0x46e9;if(this[_0x26f3d4(0x111)]===retrieve_status_enum_1['RetrieveStatus']['InProgress'])throw new Error(_0x26f3d4(0xfe));if(this[_0x26f3d4(0x12e)]||!this[_0x26f3d4(0x126)]['length'])throw new Error(_0x26f3d4(0x132));const _0x515c1c=this[_0x26f3d4(0x126)][_0x26f3d4(0x127)]();let _0x2c9e59;return!this[_0x26f3d4(0x100)]?_0x2c9e59=yield this['fetchFileBody'](_0x515c1c[_0x26f3d4(0x116)]):_0x2c9e59=yield this[_0x26f3d4(0x11e)](yield this[_0x26f3d4(0x128)](_0x515c1c[_0x26f3d4(0x116)])),this[_0x26f3d4(0x12e)]=!this[_0x26f3d4(0x126)][_0x26f3d4(0x10c)],{'path':this['path']['split'](path_1[_0x26f3d4(0x124)][_0x26f3d4(0xfc)]['sep'])[_0x26f3d4(0x11a)](path_1[_0x26f3d4(0x124)][_0x26f3d4(0x12c)]),'content':_0x2c9e59};});}[_0x31acc9(0x11f)](_0x3d9ac0){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5b9510=_0x46e9,_0x59ffaf=new client_s3_1[(_0x5b9510(0x105))]({'Bucket':this[_0x5b9510(0x133)][_0x5b9510(0xfb)],'Key':_0x3d9ac0}),{StorageClass:_0x2fe481,Restore:_0xac5f94}=yield this[_0x5b9510(0x110)]['send'](_0x59ffaf);return{'StorageClass':_0x2fe481,'Restore':_0xac5f94};});}['restoreFile'](_0x3a498c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xee61e=_0x46e9,_0x5cb85b=new client_s3_1[(_0xee61e(0x104))]({'Bucket':this[_0xee61e(0x133)]['bucketName'],'Key':_0x3a498c,'RestoreRequest':{'Days':0x1,'GlacierJobParameters':{'Tier':this[_0xee61e(0x135)]}}});yield this[_0xee61e(0x110)][_0xee61e(0x121)](_0x5cb85b);});}[_0x31acc9(0x128)](_0x5ba19e){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xff3553=_0x46e9,_0x2e4fce=new client_s3_1['GetObjectCommand']({'Bucket':this[_0xff3553(0x133)][_0xff3553(0xfb)],'Key':_0x5ba19e,'ResponseContentType':'stream'}),{Body:_0x396788}=yield this[_0xff3553(0x110)][_0xff3553(0x121)](_0x2e4fce);if(_0x396788 instanceof stream_1[_0xff3553(0x12b)])return _0x396788;throw new Error(_0xff3553(0xf6));});}[_0x31acc9(0xf9)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1b1c68=_0x46e9;yield this[_0x1b1c68(0x141)](),yield this[_0x1b1c68(0x138)](),this['status']=retrieve_status_enum_1[_0x1b1c68(0x145)][_0x1b1c68(0x11d)],this[_0x1b1c68(0x106)]()[_0x1b1c68(0x14a)](_0x4ed9ad=>{const _0x39ed01=_0x1b1c68;this['status']=retrieve_status_enum_1[_0x39ed01(0x145)][_0x39ed01(0x131)],this[_0x39ed01(0x148)]=_0x4ed9ad[_0x39ed01(0xf4)];});});}[_0x31acc9(0x141)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x51266a=_0x46e9,_0xce71ec=yield aws_s3_utils_1[_0x51266a(0x11c)][_0x51266a(0x122)](this['path'],this['credentials'][_0x51266a(0xfb)],this[_0x51266a(0x110)]);for(const _0x8bf29b of _0xce71ec){const _0x22821c=yield this[_0x51266a(0x11f)](_0x8bf29b);this[_0x51266a(0x126)]['push']({'path':_0x8bf29b,'class':_0x22821c[_0x51266a(0x10d)]||_0x51266a(0x129),'status':aws_s3_utils_1[_0x51266a(0x11c)]['extractFileRetrieveStatusFromFileInfo'](_0x22821c)});}});}[_0x31acc9(0x138)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x8fa943=_0x46e9,_0x1c345b=this[_0x8fa943(0x126)][_0x8fa943(0x10b)](_0x258d4d=>_0x258d4d[_0x8fa943(0x111)]===aws_types_1[_0x8fa943(0x142)]['NeedRestore']);for(const _0x44197e of _0x1c345b){yield this['restoreFile'](_0x44197e[_0x8fa943(0x116)]),_0x44197e[_0x8fa943(0x111)]=aws_types_1[_0x8fa943(0x142)]['Restoring'];}});}['updateFilesRetrieveStatus'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2342d0=_0x46e9,_0x4b826c=this[_0x2342d0(0x126)][_0x2342d0(0x10b)](_0x85571d=>_0x85571d['status']===aws_types_1[_0x2342d0(0x142)][_0x2342d0(0x112)]);for(const _0x30b35f of _0x4b826c){const _0x28d0e2=yield this[_0x2342d0(0x11f)](_0x30b35f['path']);_0x30b35f[_0x2342d0(0x111)]=aws_s3_utils_1[_0x2342d0(0x11c)][_0x2342d0(0x125)](_0x28d0e2);}});}[_0x31acc9(0x106)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x13a706=_0x46e9,_0x4f3bb0=this[_0x13a706(0x126)][_0x13a706(0x144)](_0x4b4f55=>_0x4b4f55[_0x13a706(0x111)]===aws_types_1[_0x13a706(0x142)]['Restoring']);this['status']=_0x4f3bb0?retrieve_status_enum_1[_0x13a706(0x145)][_0x13a706(0x11d)]:retrieve_status_enum_1[_0x13a706(0x145)][_0x13a706(0x123)],_0x4f3bb0&&(yield(0x0,promises_1['setTimeout'])(this[_0x13a706(0x14b)]),yield this['updateFilesRetrieveStatus'](),yield this[_0x13a706(0x106)]());});}['createCacheFileStream'](_0xcd584c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x591428=_0x46e9,_0x48b882=path_2[_0x591428(0x124)][_0x591428(0x11a)](this[_0x591428(0x100)],(0x0,crypto_1[_0x591428(0x117)])());yield(0x0,promises_2[_0x591428(0x12f)])(_0x48b882,_0xcd584c);const _0x5bfa20=(0x0,fs_1[_0x591428(0x139)])(_0x48b882);return _0x5bfa20['on'](_0x591428(0xff),()=>(0x0,promises_2['rm'])(_0x48b882)),_0x5bfa20;});}}exports[_0x31acc9(0x143)]=AwsS3Retrieve;function _0x2d89(){const _0x489be1=['Exception','No\x20files\x20left\x20to\x20execute.','credentials','Uninitialized','restoreType','__esModule','crypto','runRestoreFiles','createReadStream','done','region','../types/aws.types','value','1548880wevXZX','waitUtilRetrieveDone','95792FcoZhJ','tryRestoreFilesFromCloud','AwsFileRetrieveStatus','AwsS3Retrieve','some','RetrieveStatus','fs/promises','BaseRetrieve','errorMessage','apply','catch','CHECK_RESTORED_TIMEOUT','../init','message','@aws-sdk/client-s3','Body\x20is\x20not\x20supported\x20type','HttpHandler','next','init','timers/promises','bucketName','posix','defineProperty','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','close','cachePath','accessKeyId','RETRIEVE_STATUS_CHECK_TIMEOUT','__importDefault','RestoreObjectCommand','HeadObjectCommand','checkFilesRetrieveStatus','686495KfjNwm','__awaiter','then','73315bSJlxk','filter','length','StorageClass','30PtFXVX','1318IhadMf','s3Client','status','Restoring','178465PlZyhN','117FJxuxV','S3Client','path','randomUUID','651lbNwUn','../utils/aws-s3.utils','join','secretAccessKey','AwsS3Utils','InProgress','createCacheFileStream','fetchFileInfo','throw','send','getFilesPaths','Completed','default','extractFileRetrieveStatusFromFileInfo','files','shift','fetchFileBody','STANDARD','831508VaGrmD','Readable','sep','22mdgYTY','isDone','writeFile','execute'];_0x2d89=function(){return _0x489be1;};return _0x2d89();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0xd2d79c=_0x4bdb;(function(_0x348aa4,_0x4cdc20){const _0x188365=_0x4bdb,_0x152a40=_0x348aa4();while(!![]){try{const _0x518adf=parseInt(_0x188365(0xa2))/0x1*(parseInt(_0x188365(0xa0))/0x2)+-parseInt(_0x188365(0xa6))/0x3+-parseInt(_0x188365(0xab))/0x4+-parseInt(_0x188365(0xa7))/0x5*(parseInt(_0x188365(0xb2))/0x6)+parseInt(_0x188365(0x9f))/0x7*(parseInt(_0x188365(0xac))/0x8)+-parseInt(_0x188365(0xb4))/0x9*(-parseInt(_0x188365(0xad))/0xa)+-parseInt(_0x188365(0xa9))/0xb*(parseInt(_0x188365(0xb3))/0xc);if(_0x518adf===_0x4cdc20)break;else _0x152a40['push'](_0x152a40['shift']());}catch(_0x2ea8eb){_0x152a40['push'](_0x152a40['shift']());}}}(_0x299f,0xd65a1));function _0x299f(){const _0x5241b3=['path','6uOcZYo','13932pHHwcz','2448tVuaWV','35686mpRJjv','152gOOzDl','status','7691BurmgS','RetrieveStatus','../types/retrieve-status.enum','defineProperty','120957VNTGrJ','2900705NsTxrS','Uninitialized','8745VUpcYw','isDone','2890696SCOFRe','2136nrZBBZ','44060HcIyBm','credentials','getIsDone','BaseRetrieve'];_0x299f=function(){return _0x5241b3;};return _0x299f();}Object[_0xd2d79c(0xa5)](exports,'__esModule',{'value':!![]}),exports[_0xd2d79c(0xb0)]=void 0x0;const retrieve_status_enum_1=require(_0xd2d79c(0xa4));class BaseRetrieve{constructor(_0x3e7c4b,_0x17aac5){const _0x20ada7=_0xd2d79c;this[_0x20ada7(0xae)]=_0x3e7c4b,this[_0x20ada7(0xb1)]=_0x17aac5,this[_0x20ada7(0xaa)]=![],this[_0x20ada7(0xa1)]=retrieve_status_enum_1[_0x20ada7(0xa3)][_0x20ada7(0xa8)];}[_0xd2d79c(0xaf)](){return this['isDone'];}}function _0x4bdb(_0x429d0b,_0xc6c40c){const _0x299f16=_0x299f();return _0x4bdb=function(_0x4bdbd9,_0x1352c7){_0x4bdbd9=_0x4bdbd9-0x9f;let _0x446869=_0x299f16[_0x4bdbd9];return _0x446869;},_0x4bdb(_0x429d0b,_0xc6c40c);}exports[_0xd2d79c(0xb0)]=BaseRetrieve;
|
package/dist/retrieve/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x341c32=_0x5eb9;(function(_0x44f458,_0x17fdf3){var _0x1a46df=_0x5eb9,_0x57de38=_0x44f458();while(!![]){try{var _0xf002f8=-parseInt(_0x1a46df(0x1b3))/0x1*(parseInt(_0x1a46df(0x1b6))/0x2)+-parseInt(_0x1a46df(0x1ad))/0x3*(parseInt(_0x1a46df(0x1b1))/0x4)+parseInt(_0x1a46df(0x1ae))/0x5+-parseInt(_0x1a46df(0x1ab))/0x6*(parseInt(_0x1a46df(0x1ac))/0x7)+parseInt(_0x1a46df(0x1b0))/0x8*(-parseInt(_0x1a46df(0x1ba))/0x9)+-parseInt(_0x1a46df(0x1bc))/0xa+parseInt(_0x1a46df(0x1af))/0xb;if(_0xf002f8===_0x17fdf3)break;else _0x57de38['push'](_0x57de38['shift']());}catch(_0x2e471d){_0x57de38['push'](_0x57de38['shift']());}}}(_0x2766,0x6a522));Object[_0x341c32(0x1b5)](exports,_0x341c32(0x1bb),{'value':!![]}),exports['LocalRetrieve']=exports[_0x341c32(0x1b2)]=exports['BaseRetrieve']=void 0x0;function _0x5eb9(_0x28556c,_0x27e93a){var _0x2766ee=_0x2766();return _0x5eb9=function(_0x5eb98b,_0x2c05e6){_0x5eb98b=_0x5eb98b-0x1aa;var _0x3b2985=_0x2766ee[_0x5eb98b];return _0x3b2985;},_0x5eb9(_0x28556c,_0x27e93a);}var base_retrieve_1=require(_0x341c32(0x1b8));function _0x2766(){var _0x399d53=['21389313bSIlpY','8PFSpkY','3988iruFJb','AwsS3Retrieve','169987GbkTiP','BaseRetrieve','defineProperty','6RAyaNo','./local-retrieve','./base-retrieve','./aws-s3-retrieve','765630fFaUsh','__esModule','2614870OFefym','LocalRetrieve','4152042yCELeA','7VeOrhW','1713KYrxKL','3044095qPJNma'];_0x2766=function(){return _0x399d53;};return _0x2766();}Object[_0x341c32(0x1b5)](exports,_0x341c32(0x1b4),{'enumerable':!![],'get':function(){var _0x48db6e=_0x341c32;return base_retrieve_1[_0x48db6e(0x1b4)];}});var aws_s3_retrieve_1=require(_0x341c32(0x1b9));Object['defineProperty'](exports,'AwsS3Retrieve',{'enumerable':!![],'get':function(){return aws_s3_retrieve_1['AwsS3Retrieve'];}});var local_retrieve_1=require(_0x341c32(0x1b7));Object[_0x341c32(0x1b5)](exports,_0x341c32(0x1aa),{'enumerable':!![],'get':function(){return local_retrieve_1['LocalRetrieve'];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const _0x2ad43f=_0x2934;function _0x2934(_0x5db522,_0x5c12af){const _0x118247=_0x1182();return _0x2934=function(_0x293466,_0x5e10f8){_0x293466=_0x293466-0x8c;let _0x349457=_0x118247[_0x293466];return _0x349457;},_0x2934(_0x5db522,_0x5c12af);}(function(_0x512fe3,_0x4286c5){const _0x266a54=_0x2934,_0x1ae91e=_0x512fe3();while(!![]){try{const _0xe79621=-parseInt(_0x266a54(0xa1))/0x1*(parseInt(_0x266a54(0x93))/0x2)+parseInt(_0x266a54(0x8d))/0x3*(-parseInt(_0x266a54(0x9c))/0x4)+parseInt(_0x266a54(0x8f))/0x5*(parseInt(_0x266a54(0x9a))/0x6)+-parseInt(_0x266a54(0xa4))/0x7+parseInt(_0x266a54(0x9b))/0x8*(-parseInt(_0x266a54(0xa8))/0x9)+-parseInt(_0x266a54(0x99))/0xa+parseInt(_0x266a54(0xa0))/0xb;if(_0xe79621===_0x4286c5)break;else _0x1ae91e['push'](_0x1ae91e['shift']());}catch(_0x4047fb){_0x1ae91e['push'](_0x1ae91e['shift']());}}}(_0x1182,0xbd0ee));var __awaiter=this&&this['__awaiter']||function(_0x3d2cb5,_0x26fb2f,_0x28eca9,_0x161119){function _0x335b6d(_0x5f386c){return _0x5f386c instanceof _0x28eca9?_0x5f386c:new _0x28eca9(function(_0x489134){_0x489134(_0x5f386c);});}return new(_0x28eca9||(_0x28eca9=Promise))(function(_0x3950a8,_0x46a561){const _0x2d9815=_0x2934;function _0x3b9a48(_0x405cb3){const _0x4ff706=_0x2934;try{_0x4c4a8f(_0x161119[_0x4ff706(0x96)](_0x405cb3));}catch(_0x732563){_0x46a561(_0x732563);}}function _0x394204(_0x1fe202){const _0x4a9dfe=_0x2934;try{_0x4c4a8f(_0x161119[_0x4a9dfe(0x9d)](_0x1fe202));}catch(_0x25d904){_0x46a561(_0x25d904);}}function _0x4c4a8f(_0x391709){const _0x46a9ba=_0x2934;_0x391709[_0x46a9ba(0xaa)]?_0x3950a8(_0x391709[_0x46a9ba(0x92)]):_0x335b6d(_0x391709[_0x46a9ba(0x92)])['then'](_0x3b9a48,_0x394204);}_0x4c4a8f((_0x161119=_0x161119['apply'](_0x3d2cb5,_0x26fb2f||[]))[_0x2d9815(0x96)]());});};Object[_0x2ad43f(0x8c)](exports,_0x2ad43f(0x8e),{'value':!![]}),exports[_0x2ad43f(0x90)]=void 0x0;const fs_1=require('fs'),utils_1=require(_0x2ad43f(0x98)),_1=require('./'),retrieve_status_enum_1=require(_0x2ad43f(0x97));class LocalRetrieve extends _1[_0x2ad43f(0x9e)]{constructor(){const _0x12e7d2=_0x2ad43f;super(...arguments),this[_0x12e7d2(0xa6)]=[];}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x24b04e=_0x2934,_0x46e58a=this[_0x24b04e(0xa6)][_0x24b04e(0xa7)](),_0x33386a=(0x0,fs_1[_0x24b04e(0x94)])(_0x46e58a);return this['isDone']=!this[_0x24b04e(0xa6)][_0x24b04e(0xa5)],{'path':_0x46e58a,'content':_0x33386a};});}['readFilesToRetrieve'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2c1d89=_0x2934;this[_0x2c1d89(0xa6)]=yield utils_1[_0x2c1d89(0xa3)]['getFolderFiles'](this['path']);});}['waitUtilRetrieveDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3f0b1c=_0x2934;this['status']===retrieve_status_enum_1[_0x3f0b1c(0xa9)][_0x3f0b1c(0x91)]&&(yield this[_0x3f0b1c(0x95)](),this[_0x3f0b1c(0x9f)]=retrieve_status_enum_1['RetrieveStatus'][_0x3f0b1c(0xa2)]);});}}exports[_0x2ad43f(0x90)]=LocalRetrieve;function _0x1182(){const _0x15dfb9=['16UtcKYM','25836XXsYkb','throw','BaseRetrieve','status','33141691ctnvow','18HbHmfK','Completed','FsUtils','5370393WycsmE','length','filesPaths','shift','1109943nCHDBX','RetrieveStatus','done','defineProperty','666xHOcrH','__esModule','125ouLIYe','LocalRetrieve','Uninitialized','value','82168wrgWgI','createReadStream','readFilesToRetrieve','next','../types/retrieve-status.enum','@flosum-service/utils','507110XvunCt','239874iSBQmi'];_0x1182=function(){return _0x15dfb9;};return _0x1182();}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StorageClass } from '@aws-sdk/client-s3';
|
|
2
2
|
export declare type AwsFile = {
|
|
3
3
|
path: string;
|
|
4
|
-
class:
|
|
4
|
+
class: StorageClass;
|
|
5
5
|
status: AwsFileRetrieveStatus;
|
|
6
6
|
};
|
|
7
7
|
export declare enum AwsFileRetrieveStatus {
|
|
@@ -10,10 +10,11 @@ export declare enum AwsFileRetrieveStatus {
|
|
|
10
10
|
NeedRestore = "NeedRestore"
|
|
11
11
|
}
|
|
12
12
|
export declare type AwsFileInfo = {
|
|
13
|
-
StorageClass:
|
|
13
|
+
StorageClass: StorageClass;
|
|
14
14
|
Restore?: string;
|
|
15
15
|
};
|
|
16
16
|
export declare type AwsCredentials = {
|
|
17
|
+
region: string;
|
|
17
18
|
bucketName: string;
|
|
18
19
|
accessKeyId: string;
|
|
19
20
|
secretAccessKey: string;
|
package/dist/types/aws.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0xf3f764=_0x123c;(function(_0x5d59ee,_0x542afc){var _0x1eab4f=_0x123c,_0x584f57=_0x5d59ee();while(!![]){try{var _0x104823=-parseInt(_0x1eab4f(0x1db))/0x1*(parseInt(_0x1eab4f(0x1d5))/0x2)+-parseInt(_0x1eab4f(0x1d4))/0x3+-parseInt(_0x1eab4f(0x1d8))/0x4+parseInt(_0x1eab4f(0x1dc))/0x5*(-parseInt(_0x1eab4f(0x1d9))/0x6)+-parseInt(_0x1eab4f(0x1dd))/0x7*(-parseInt(_0x1eab4f(0x1de))/0x8)+-parseInt(_0x1eab4f(0x1d3))/0x9+parseInt(_0x1eab4f(0x1da))/0xa;if(_0x104823===_0x542afc)break;else _0x584f57['push'](_0x584f57['shift']());}catch(_0x144f32){_0x584f57['push'](_0x584f57['shift']());}}}(_0x52bb,0x355a5));function _0x123c(_0x94b34,_0x41b516){var _0x52bb79=_0x52bb();return _0x123c=function(_0x123c5a,_0x418daa){_0x123c5a=_0x123c5a-0x1d3;var _0x3532ea=_0x52bb79[_0x123c5a];return _0x3532ea;},_0x123c(_0x94b34,_0x41b516);}Object[_0xf3f764(0x1df)](exports,_0xf3f764(0x1e1),{'value':!![]}),exports[_0xf3f764(0x1d6)]=void 0x0;function _0x52bb(){var _0x4a70d2=['301jpJakB','80608sXNRTu','defineProperty','Available','__esModule','1567368zjuqIg','177189WLLIpr','2nQSDfi','AwsFileRetrieveStatus','NeedRestore','609356DXIrSI','204084riLNfD','6802530CZVCQG','169294SbkXtc','50awfCSj'];_0x52bb=function(){return _0x4a70d2;};return _0x52bb();}var AwsFileRetrieveStatus;(function(_0x59732b){var _0x1b3bdf=_0xf3f764;_0x59732b[_0x1b3bdf(0x1e0)]=_0x1b3bdf(0x1e0),_0x59732b['Restoring']='Restoring',_0x59732b[_0x1b3bdf(0x1d7)]=_0x1b3bdf(0x1d7);}(AwsFileRetrieveStatus=exports[_0xf3f764(0x1d6)]||(exports[_0xf3f764(0x1d6)]={})));
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x2f4798=_0x1478;(function(_0x1ba38c,_0x998a){var _0x31a8fd=_0x1478,_0x399190=_0x1ba38c();while(!![]){try{var _0x361fe1=-parseInt(_0x31a8fd(0xcc))/0x1+-parseInt(_0x31a8fd(0xcd))/0x2+parseInt(_0x31a8fd(0xd6))/0x3+parseInt(_0x31a8fd(0xcf))/0x4+parseInt(_0x31a8fd(0xd2))/0x5*(-parseInt(_0x31a8fd(0xd3))/0x6)+-parseInt(_0x31a8fd(0xd4))/0x7+-parseInt(_0x31a8fd(0xd1))/0x8*(-parseInt(_0x31a8fd(0xd5))/0x9);if(_0x361fe1===_0x998a)break;else _0x399190['push'](_0x399190['shift']());}catch(_0x29e587){_0x399190['push'](_0x399190['shift']());}}}(_0x2421,0xc722f));function _0x1478(_0x291375,_0x92fc0){var _0x242137=_0x2421();return _0x1478=function(_0x1478ca,_0x4db2d2){_0x1478ca=_0x1478ca-0xcb;var _0x17c5b0=_0x242137[_0x1478ca];return _0x17c5b0;},_0x1478(_0x291375,_0x92fc0);}function _0x2421(){var _0x12e091=['945962xrafjk','StorageType','1304428BfVlQv','__esModule','837848dkuvhg','95LeNbAb','78774iqzoio','3279157pPkAsL','153lxHtaU','2370549LwjPjj','./storage-type.enum','defineProperty','890171MhgDUj'];_0x2421=function(){return _0x12e091;};return _0x2421();}Object[_0x2f4798(0xcb)](exports,_0x2f4798(0xd0),{'value':!![]}),exports[_0x2f4798(0xce)]=void 0x0;var storage_type_enum_1=require(_0x2f4798(0xd7));Object[_0x2f4798(0xcb)](exports,_0x2f4798(0xce),{'enumerable':!![],'get':function(){var _0x3fada8=_0x2f4798;return storage_type_enum_1[_0x3fada8(0xce)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x2e70(_0x32c569,_0x2b3731){var _0x43b52f=_0x43b5();return _0x2e70=function(_0x2e70ed,_0xadad8d){_0x2e70ed=_0x2e70ed-0xb1;var _0x1d6fdb=_0x43b52f[_0x2e70ed];return _0x1d6fdb;},_0x2e70(_0x32c569,_0x2b3731);}function _0x43b5(){var _0x7846f2=['5959764KvykRm','defineProperty','1512212fxJXYs','70ScBCXG','833625hBgwCs','624883QjBHfW','1947706BZEicK','12QvZMcs','9EvOHqs','1845536sMIxLa','2263780CHTKnP','64MXIRRc'];_0x43b5=function(){return _0x7846f2;};return _0x43b5();}var _0x5544bd=_0x2e70;(function(_0x23e130,_0x53047c){var _0x13a1f5=_0x2e70,_0x41df23=_0x23e130();while(!![]){try{var _0xc98dcd=parseInt(_0x13a1f5(0xb3))/0x1+parseInt(_0x13a1f5(0xb5))/0x2+-parseInt(_0x13a1f5(0xb7))/0x3*(parseInt(_0x13a1f5(0xb1))/0x4)+-parseInt(_0x13a1f5(0xb9))/0x5*(parseInt(_0x13a1f5(0xb6))/0x6)+-parseInt(_0x13a1f5(0xb4))/0x7*(parseInt(_0x13a1f5(0xba))/0x8)+parseInt(_0x13a1f5(0xbb))/0x9+-parseInt(_0x13a1f5(0xb2))/0xa*(-parseInt(_0x13a1f5(0xb8))/0xb);if(_0xc98dcd===_0x53047c)break;else _0x41df23['push'](_0x41df23['shift']());}catch(_0x23e141){_0x41df23['push'](_0x41df23['shift']());}}}(_0x43b5,0xd95ab));Object[_0x5544bd(0xbc)](exports,'__esModule',{'value':!![]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x1d6b6d=_0x2f1d;(function(_0xc171a4,_0xa8a55c){var _0x17f852=_0x2f1d,_0x457471=_0xc171a4();while(!![]){try{var _0x5e2907=parseInt(_0x17f852(0xac))/0x1+-parseInt(_0x17f852(0xae))/0x2*(parseInt(_0x17f852(0xb0))/0x3)+parseInt(_0x17f852(0xa7))/0x4+-parseInt(_0x17f852(0xa6))/0x5+-parseInt(_0x17f852(0xaa))/0x6+-parseInt(_0x17f852(0xa5))/0x7+-parseInt(_0x17f852(0xa8))/0x8*(-parseInt(_0x17f852(0xb2))/0x9);if(_0x5e2907===_0xa8a55c)break;else _0x457471['push'](_0x457471['shift']());}catch(_0x3bbf8a){_0x457471['push'](_0x457471['shift']());}}}(_0x4fb9,0x63b75));Object['defineProperty'](exports,_0x1d6b6d(0xaf),{'value':!![]}),exports[_0x1d6b6d(0xab)]=void 0x0;var RetrieveStatus;function _0x2f1d(_0x2d99a5,_0x1f137c){var _0x4fb9e5=_0x4fb9();return _0x2f1d=function(_0x2f1d84,_0xcd9fc6){_0x2f1d84=_0x2f1d84-0xa4;var _0x2c0795=_0x4fb9e5[_0x2f1d84];return _0x2c0795;},_0x2f1d(_0x2d99a5,_0x1f137c);}(function(_0x48a566){var _0x5ea39b=_0x1d6b6d;_0x48a566['Uninitialized']='Uninitialized',_0x48a566[_0x5ea39b(0xa9)]=_0x5ea39b(0xad),_0x48a566['Completed']=_0x5ea39b(0xa4),_0x48a566[_0x5ea39b(0xb1)]=_0x5ea39b(0xb1);}(RetrieveStatus=exports[_0x1d6b6d(0xab)]||(exports[_0x1d6b6d(0xab)]={})));function _0x4fb9(){var _0x4d93d7=['3uEsFaM','Exception','9yJaXJW','Completed','2814140Pemypr','3464720SLQZuU','2543424xGwOzW','9732616ILFkbH','InProgress','4050444sqZbJq','RetrieveStatus','548127YkJQyH','In\x20Progress','444170fRFGlM','__esModule'];_0x4fb9=function(){return _0x4d93d7;};return _0x4fb9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0xe2d4(){var _0xa373da=['584956Qpgvhf','AWS_S3','582274wzjzPl','__esModule','StorageType','248914QnvFpe','Local','3017924LiEDLJ','2581800qsCODK','9JzTYGq','9jfAIOG','defineProperty','216690BjBFth','1gCJHia','5YxTLlk','820872SmuWMe','228KqaOkS'];_0xe2d4=function(){return _0xa373da;};return _0xe2d4();}var _0x31a292=_0x548a;(function(_0xbf80ea,_0x2c6039){var _0x2e378e=_0x548a,_0x18ec12=_0xbf80ea();while(!![]){try{var _0x1ee11b=-parseInt(_0x2e378e(0x110))/0x1*(parseInt(_0x2e378e(0x108))/0x2)+parseInt(_0x2e378e(0x10d))/0x3*(parseInt(_0x2e378e(0x114))/0x4)+parseInt(_0x2e378e(0x111))/0x5*(-parseInt(_0x2e378e(0x10f))/0x6)+-parseInt(_0x2e378e(0x10a))/0x7+-parseInt(_0x2e378e(0x112))/0x8*(parseInt(_0x2e378e(0x10c))/0x9)+-parseInt(_0x2e378e(0x10b))/0xa+-parseInt(_0x2e378e(0x116))/0xb*(-parseInt(_0x2e378e(0x113))/0xc);if(_0x1ee11b===_0x2c6039)break;else _0x18ec12['push'](_0x18ec12['shift']());}catch(_0x19411e){_0x18ec12['push'](_0x18ec12['shift']());}}}(_0xe2d4,0x781c2));function _0x548a(_0x3ebe18,_0xb9b452){var _0xe2d4e8=_0xe2d4();return _0x548a=function(_0x548a37,_0x16f100){_0x548a37=_0x548a37-0x108;var _0x462de4=_0xe2d4e8[_0x548a37];return _0x462de4;},_0x548a(_0x3ebe18,_0xb9b452);}Object[_0x31a292(0x10e)](exports,_0x31a292(0x117),{'value':!![]}),exports['StorageType']=void 0x0;var StorageType;(function(_0xcbb1ae){var _0x1b2dbc=_0x31a292;_0xcbb1ae[_0x1b2dbc(0x109)]=_0x1b2dbc(0x109),_0xcbb1ae[_0x1b2dbc(0x115)]=_0x1b2dbc(0x115);}(StorageType=exports[_0x31a292(0x118)]||(exports['StorageType']={})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AWS from 'aws-sdk';
|
|
2
1
|
import { AwsFileInfo, AwsFileRetrieveStatus } from '../types/aws.types';
|
|
2
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
3
3
|
export declare class AwsS3Utils {
|
|
4
4
|
static extractFileRetrieveStatusFromFileInfo(fileInfo: AwsFileInfo): AwsFileRetrieveStatus;
|
|
5
5
|
static extractFileRetrieveStatusFromRestoreField(restoreField: string): AwsFileRetrieveStatus;
|
|
@@ -8,5 +8,5 @@ export declare class AwsS3Utils {
|
|
|
8
8
|
* @param bucketName
|
|
9
9
|
* @param s3 - an instance of AWS S3 adapter
|
|
10
10
|
*/
|
|
11
|
-
static getFilesPaths(path: string, bucketName: string, s3:
|
|
11
|
+
static getFilesPaths(path: string, bucketName: string, s3: S3Client): Promise<string[]>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const _0x20d036=_0x17d7;function _0x17d7(_0x1cfdcf,_0x199a4d){const _0x812cdb=_0x812c();return _0x17d7=function(_0x17d759,_0x2cb35f){_0x17d759=_0x17d759-0xdd;let _0x5e978b=_0x812cdb[_0x17d759];return _0x5e978b;},_0x17d7(_0x1cfdcf,_0x199a4d);}function _0x812c(){const _0x1605c7=['45JYifew','extractFileRetrieveStatusFromRestoreField','22PJwHPD','Available','966871vvaWTi','value','DEEP_ARCHIVE','4060020uWwWxW','push','11112MtHIYE','next','Restoring','Restore','1216328Hblruw','34674FkHdGP','NeedRestore','GLACIER','4ZKIzAn','extractFileRetrieveStatusFromFileInfo','defineProperty','../types/aws.types','then','231pCmMPm','306mABshY','ListObjectsCommand','AwsFileRetrieveStatus','throw','GLACIER_IR','false','send','StorageClass','5300485elDtxI','46032780tdsfWH','AwsS3Utils','apply'];_0x812c=function(){return _0x1605c7;};return _0x812c();}(function(_0x159b3a,_0x3fc692){const _0xd60b8b=_0x17d7,_0xee8cae=_0x159b3a();while(!![]){try{const _0x2386e9=-parseInt(_0xd60b8b(0xe4))/0x1+parseInt(_0xd60b8b(0xe9))/0x2*(parseInt(_0xd60b8b(0xf7))/0x3)+parseInt(_0xd60b8b(0xf1))/0x4*(-parseInt(_0xd60b8b(0xff))/0x5)+-parseInt(_0xd60b8b(0xee))/0x6*(parseInt(_0xd60b8b(0xf6))/0x7)+parseInt(_0xd60b8b(0xed))/0x8*(-parseInt(_0xd60b8b(0xe0))/0x9)+parseInt(_0xd60b8b(0xe7))/0xa*(-parseInt(_0xd60b8b(0xe2))/0xb)+parseInt(_0xd60b8b(0xdd))/0xc;if(_0x2386e9===_0x3fc692)break;else _0xee8cae['push'](_0xee8cae['shift']());}catch(_0x1595a4){_0xee8cae['push'](_0xee8cae['shift']());}}}(_0x812c,0x95a1d));var __awaiter=this&&this['__awaiter']||function(_0x4d5287,_0x421961,_0x4cfdef,_0x15ef7c){function _0x4e4ba8(_0x37941a){return _0x37941a instanceof _0x4cfdef?_0x37941a:new _0x4cfdef(function(_0x4047de){_0x4047de(_0x37941a);});}return new(_0x4cfdef||(_0x4cfdef=Promise))(function(_0x7d25a0,_0x475ec9){const _0x4b0ff9=_0x17d7;function _0x189158(_0x5767ef){const _0xb524db=_0x17d7;try{_0x31dd3e(_0x15ef7c[_0xb524db(0xea)](_0x5767ef));}catch(_0x4d78f8){_0x475ec9(_0x4d78f8);}}function _0x31a979(_0x362170){const _0x87210f=_0x17d7;try{_0x31dd3e(_0x15ef7c[_0x87210f(0xfa)](_0x362170));}catch(_0x1c0416){_0x475ec9(_0x1c0416);}}function _0x31dd3e(_0x3a9900){const _0x129d34=_0x17d7;_0x3a9900['done']?_0x7d25a0(_0x3a9900[_0x129d34(0xe5)]):_0x4e4ba8(_0x3a9900['value'])[_0x129d34(0xf5)](_0x189158,_0x31a979);}_0x31dd3e((_0x15ef7c=_0x15ef7c[_0x4b0ff9(0xdf)](_0x4d5287,_0x421961||[]))[_0x4b0ff9(0xea)]());});};Object[_0x20d036(0xf3)](exports,'__esModule',{'value':!![]}),exports['AwsS3Utils']=void 0x0;const aws_types_1=require(_0x20d036(0xf4)),client_s3_1=require('@aws-sdk/client-s3'),ARCHIVE_TYPES=[_0x20d036(0xf0),_0x20d036(0xfb),_0x20d036(0xe6)];class AwsS3Utils{static[_0x20d036(0xf2)](_0xf57ecb){const _0x5b2c56=_0x20d036;if(ARCHIVE_TYPES['includes'](_0xf57ecb[_0x5b2c56(0xfe)])){if(_0xf57ecb[_0x5b2c56(0xec)])return AwsS3Utils['extractFileRetrieveStatusFromRestoreField'](_0xf57ecb[_0x5b2c56(0xec)]);return aws_types_1[_0x5b2c56(0xf9)][_0x5b2c56(0xef)];}return aws_types_1[_0x5b2c56(0xf9)][_0x5b2c56(0xe3)];}static[_0x20d036(0xe1)](_0xa59b1){const _0x1c30a9=_0x20d036,_0x54c88f=/ongoing-request="([^"]+)"/,_0x4b3693=_0xa59b1['match'](_0x54c88f);return _0x4b3693[0x1]===_0x1c30a9(0xfc)?aws_types_1[_0x1c30a9(0xf9)][_0x1c30a9(0xe3)]:aws_types_1[_0x1c30a9(0xf9)][_0x1c30a9(0xeb)];}static['getFilesPaths'](_0x1c57c2,_0x14d824,_0x5b3dab){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x52bf68=_0x17d7,_0x1f2bc4=[];let _0x63de5f,_0x571282=null;do{const _0x15bca0=new client_s3_1[(_0x52bf68(0xf8))]({'Bucket':_0x14d824,'Prefix':_0x1c57c2,'Marker':_0x571282}),{Contents:_0x4ff3f1,IsTruncated:_0x5c44e7}=yield _0x5b3dab[_0x52bf68(0xfd)](_0x15bca0);for(const _0x451f03 of _0x4ff3f1){_0x1f2bc4[_0x52bf68(0xe8)](_0x451f03['Key']);}_0x63de5f=_0x5c44e7,_0x63de5f&&(_0x571282=_0x4ff3f1['at'](-0x1)['Key']);}while(_0x63de5f);return _0x1f2bc4;});}}exports[_0x20d036(0xde)]=AwsS3Utils;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flosum/storages",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
"author": "Flosum",
|
|
29
29
|
"license": "ISC",
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@aws-sdk/client-s3": "3.458.0",
|
|
32
|
+
"@aws-sdk/lib-storage": "3.460.0",
|
|
31
33
|
"@flosum-service/utils": "1.0.0",
|
|
32
|
-
"
|
|
34
|
+
"@smithy/node-http-handler": "2.1.10",
|
|
33
35
|
"https-proxy-agent": "^5.0.1"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|