@flosum/storages 1.0.21-dev.4 → 1.0.21-dev.6
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.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.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.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.js +1 -1
- package/dist/index.js +1 -1
- package/dist/init.js +1 -1
- package/dist/retrieve/aws-s3-import-helper.d.ts +12 -9
- package/dist/retrieve/aws-s3-import-helper.js +1 -1
- 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.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.js +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x6f92d0=_0x57d9;(function(_0x4151f8,_0x2aaf67){const _0x545494=_0x57d9,_0xe54068=_0x4151f8();while(!![]){try{const _0x54e3b0=parseInt(_0x545494(0xb1))/0x1*(-parseInt(_0x545494(0xae))/0x2)+parseInt(_0x545494(0xa0))/0x3*(parseInt(_0x545494(0xbc))/0x4)+-parseInt(_0x545494(0xb3))/0x5*(-parseInt(_0x545494(0xc0))/0x6)+parseInt(_0x545494(0xac))/0x7+-parseInt(_0x545494(0xa7))/0x8+parseInt(_0x545494(0xa2))/0x9+-parseInt(_0x545494(0xb4))/0xa;if(_0x54e3b0===_0x2aaf67)break;else _0xe54068['push'](_0xe54068['shift']());}catch(_0x1f4ebc){_0xe54068['push'](_0xe54068['shift']());}}}(_0x4d4f,0x95b3c));function _0x4d4f(){const _0xf31e6c=['333948VnSBuX','__esModule','defineProperty','secretAccessKey','3390162gxxvkH','Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20','message','9OGqSQF','S3Client','8955036kQhyYI','credentials','region','bucketName','throw','4603344RBOjBO','AwsS3Credentials','value','BaseCredentials','__awaiter','5264784JKjFNH','send','674278cXfuYC','./base-credentials','s3Client','1WnJcIh','done','5UUHujE','10368670fdHXIL','getCredentials','HttpHandler','then','next','HeadBucketCommand','accessKeyId','apply'];_0x4d4f=function(){return _0xf31e6c;};return _0x4d4f();}var __awaiter=this&&this[_0x6f92d0(0xab)]||function(_0x547b29,_0x5723a5,_0x479e3f,_0x56aab6){function _0x3fbf91(_0xbc9c73){return _0xbc9c73 instanceof _0x479e3f?_0xbc9c73:new _0x479e3f(function(_0x34ec34){_0x34ec34(_0xbc9c73);});}return new(_0x479e3f||(_0x479e3f=Promise))(function(_0x5144fd,_0x3f08b4){const _0xb050af=_0x57d9;function _0x6d2c40(_0x5aacda){const _0x903fa4=_0x57d9;try{_0x412057(_0x56aab6[_0x903fa4(0xb8)](_0x5aacda));}catch(_0x4f009f){_0x3f08b4(_0x4f009f);}}function _0x1b8c6c(_0x197d22){const _0x1a2bf5=_0x57d9;try{_0x412057(_0x56aab6[_0x1a2bf5(0xa6)](_0x197d22));}catch(_0x560de6){_0x3f08b4(_0x560de6);}}function _0x412057(_0x2c14cf){const _0x42adfb=_0x57d9;_0x2c14cf[_0x42adfb(0xb2)]?_0x5144fd(_0x2c14cf[_0x42adfb(0xa9)]):_0x3fbf91(_0x2c14cf['value'])[_0x42adfb(0xb7)](_0x6d2c40,_0x1b8c6c);}_0x412057((_0x56aab6=_0x56aab6[_0xb050af(0xbb)](_0x547b29,_0x5723a5||[]))['next']());});};Object[_0x6f92d0(0xbe)](exports,_0x6f92d0(0xbd),{'value':!![]}),exports['AwsS3Credentials']=void 0x0;function _0x57d9(_0xd25fac,_0xc805cd){const _0x4d4fad=_0x4d4f();return _0x57d9=function(_0x57d9ca,_0x297765){_0x57d9ca=_0x57d9ca-0xa0;let _0x474de2=_0x4d4fad[_0x57d9ca];return _0x474de2;},_0x57d9(_0xd25fac,_0xc805cd);}const base_credentials_1=require(_0x6f92d0(0xaf)),client_s3_1=require('@aws-sdk/client-s3'),init_1=require('../init');class AwsS3Credentials extends base_credentials_1[_0x6f92d0(0xaa)]{constructor(){const _0x364be3=_0x6f92d0;super(...arguments),this[_0x364be3(0xb0)]=new client_s3_1[(_0x364be3(0xa1))]({'region':this[_0x364be3(0xa3)][_0x364be3(0xa4)],'credentials':{'accessKeyId':this[_0x364be3(0xa3)][_0x364be3(0xba)],'secretAccessKey':this['credentials']['secretAccessKey']},'requestHandler':new init_1[(_0x364be3(0xb6))]()});}get[_0x6f92d0(0xba)](){const _0x5d1fbd=_0x6f92d0;return this[_0x5d1fbd(0xa3)]['accessKeyId'];}get[_0x6f92d0(0xbf)](){const _0x16d98c=_0x6f92d0;return this['credentials'][_0x16d98c(0xbf)];}get['bucketName'](){const _0x537f56=_0x6f92d0;return this[_0x537f56(0xa3)][_0x537f56(0xa5)];}get[_0x6f92d0(0xa4)](){const _0x28fb30=_0x6f92d0;return this[_0x28fb30(0xa3)][_0x28fb30(0xa4)];}['validate'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x13656a=_0x57d9;try{const _0x29e78c=new client_s3_1[(_0x13656a(0xb9))]({'Bucket':this[_0x13656a(0xa3)][_0x13656a(0xa5)]});yield this[_0x13656a(0xb0)][_0x13656a(0xad)](_0x29e78c);}catch(_0x5067b0){throw new Error(_0x13656a(0xc1)+_0x5067b0[_0x13656a(0xc2)]);}});}[_0x6f92d0(0xb5)](_0x2f3ed8=![]){if(_0x2f3ed8)return{'bucketName':this['credentials']['bucketName']};return this['credentials'];}}exports[_0x6f92d0(0xa8)]=AwsS3Credentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x3d47(){var _0x4df951=['1553156YoyAdY','635895VNmTuR','24VJurCq','__esModule','1110636qUxfwN','1LDDQnS','66jDllnA','114DYCEMg','rawCredentials','credentials','parse','632jqqDfI','6044620Uaudtg','1179470UbcZgP','BaseCredentials','defineProperty','7056RyAPqt','332381eLWZsI'];_0x3d47=function(){return _0x4df951;};return _0x3d47();}var _0x2d678f=_0xee3e;(function(_0x2d98a1,_0x38eb7c){var _0x6777ba=_0xee3e,_0x537b00=_0x2d98a1();while(!![]){try{var _0x3239af=parseInt(_0x6777ba(0x18c))/0x1*(parseInt(_0x6777ba(0x199))/0x2)+-parseInt(_0x6777ba(0x197))/0x3*(-parseInt(_0x6777ba(0x192))/0x4)+-parseInt(_0x6777ba(0x193))/0x5+-parseInt(_0x6777ba(0x18e))/0x6*(-parseInt(_0x6777ba(0x198))/0x7)+-parseInt(_0x6777ba(0x189))/0x8*(-parseInt(_0x6777ba(0x188))/0x9)+parseInt(_0x6777ba(0x194))/0xa+-parseInt(_0x6777ba(0x18d))/0xb*(parseInt(_0x6777ba(0x18b))/0xc);if(_0x3239af===_0x38eb7c)break;else _0x537b00['push'](_0x537b00['shift']());}catch(_0xceb85){_0x537b00['push'](_0x537b00['shift']());}}}(_0x3d47,0x96669));Object[_0x2d678f(0x196)](exports,_0x2d678f(0x18a),{'value':!![]}),exports[_0x2d678f(0x195)]=void 0x0;class BaseCredentials{constructor(_0xf75762){var _0x143b75=_0x2d678f;this[_0x143b75(0x18f)]=_0xf75762,this[_0x143b75(0x18f)]&&(this[_0x143b75(0x190)]=JSON[_0x143b75(0x191)](this['rawCredentials']));}}function _0xee3e(_0x204a90,_0xb5df94){var _0x3d47bc=_0x3d47();return _0xee3e=function(_0xee3e8d,_0x1b0a68){_0xee3e8d=_0xee3e8d-0x188;var _0x8bfd81=_0x3d47bc[_0xee3e8d];return _0x8bfd81;},_0xee3e(_0x204a90,_0xb5df94);}exports[_0x2d678f(0x195)]=BaseCredentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x2874cd=_0x1c12;(function(_0x27015c,_0x1c57c1){var _0x55175c=_0x1c12,_0x1ad334=_0x27015c();while(!![]){try{var _0x33372e=-parseInt(_0x55175c(0x1a0))/0x1+-parseInt(_0x55175c(0x1a2))/0x2+parseInt(_0x55175c(0x1a8))/0x3+parseInt(_0x55175c(0x1a9))/0x4*(-parseInt(_0x55175c(0x1a7))/0x5)+parseInt(_0x55175c(0x1a4))/0x6*(-parseInt(_0x55175c(0x1a3))/0x7)+parseInt(_0x55175c(0x1a5))/0x8+parseInt(_0x55175c(0x1ab))/0x9;if(_0x33372e===_0x1c57c1)break;else _0x1ad334['push'](_0x1ad334['shift']());}catch(_0x1230fd){_0x1ad334['push'](_0x1ad334['shift']());}}}(_0x2357,0xbd427));function _0x2357(){var _0x1570c8=['359954yDWVGj','./local-credentials','1114824mdlRog','203hqLDmX','111114uTbgQw','7484360wiocsP','BaseCredentials','19410cWcOQW','3537468gBzcHt','1132cvTeuX','defineProperty','10921761oBYcPZ','LocalCredentials','AwsS3Credentials'];_0x2357=function(){return _0x1570c8;};return _0x2357();}Object[_0x2874cd(0x1aa)](exports,'__esModule',{'value':!![]}),exports[_0x2874cd(0x19e)]=exports[_0x2874cd(0x19f)]=exports[_0x2874cd(0x1a6)]=void 0x0;var base_credentials_1=require('./base-credentials');Object['defineProperty'](exports,'BaseCredentials',{'enumerable':!![],'get':function(){return base_credentials_1['BaseCredentials'];}});var aws_s3_credentials_1=require('./aws-s3-credentials');Object['defineProperty'](exports,_0x2874cd(0x19f),{'enumerable':!![],'get':function(){return aws_s3_credentials_1['AwsS3Credentials'];}});function _0x1c12(_0x3c5487,_0x24fe87){var _0x2357b2=_0x2357();return _0x1c12=function(_0x1c1209,_0x415334){_0x1c1209=_0x1c1209-0x19e;var _0xae1bb1=_0x2357b2[_0x1c1209];return _0xae1bb1;},_0x1c12(_0x3c5487,_0x24fe87);}var local_credentials_1=require(_0x2874cd(0x1a1));Object[_0x2874cd(0x1aa)](exports,_0x2874cd(0x19e),{'enumerable':!![],'get':function(){var _0x90c205=_0x2874cd;return local_credentials_1[_0x90c205(0x19e)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x4279d0=_0x138b;(function(_0x3b5893,_0x95ce02){const _0x3ec34a=_0x138b,_0x55cd00=_0x3b5893();while(!![]){try{const _0x91079b=-parseInt(_0x3ec34a(0x1fd))/0x1*(parseInt(_0x3ec34a(0x1f1))/0x2)+parseInt(_0x3ec34a(0x1fb))/0x3*(-parseInt(_0x3ec34a(0x1f6))/0x4)+parseInt(_0x3ec34a(0x1f8))/0x5+-parseInt(_0x3ec34a(0x1fc))/0x6*(parseInt(_0x3ec34a(0x1f5))/0x7)+parseInt(_0x3ec34a(0x1f3))/0x8*(parseInt(_0x3ec34a(0x1fe))/0x9)+parseInt(_0x3ec34a(0x1f7))/0xa+parseInt(_0x3ec34a(0x200))/0xb;if(_0x91079b===_0x95ce02)break;else _0x55cd00['push'](_0x55cd00['shift']());}catch(_0x16995e){_0x55cd00['push'](_0x55cd00['shift']());}}}(_0x5c0d,0xa6dbf));Object[_0x4279d0(0x1ff)](exports,'__esModule',{'value':!![]}),exports[_0x4279d0(0x1fa)]=void 0x0;function _0x5c0d(){const _0x595ad1=['validate','4bTsyOT','getCredentials','872xnaTPC','BaseCredentials','7749441NvtKnj','308buiqmX','9732260PrwmIa','958205bvScHY','resolve','LocalCredentials','17946XsUaub','6RZwjqd','629873jXCYrV','81603MGzNCI','defineProperty','14934788qkJLLJ','./base-credentials'];_0x5c0d=function(){return _0x595ad1;};return _0x5c0d();}const base_credentials_1=require(_0x4279d0(0x1ef));class LocalCredentials extends base_credentials_1[_0x4279d0(0x1f4)]{[_0x4279d0(0x1f2)](){return null;}[_0x4279d0(0x1f0)](){const _0x2d6ca0=_0x4279d0;return Promise[_0x2d6ca0(0x1f9)](undefined);}}function _0x138b(_0x156b0e,_0x1e55f5){const _0x5c0d42=_0x5c0d();return _0x138b=function(_0x138b85,_0x130d90){_0x138b85=_0x138b85-0x1ef;let _0x26b2a2=_0x5c0d42[_0x138b85];return _0x26b2a2;},_0x138b(_0x156b0e,_0x1e55f5);}exports[_0x4279d0(0x1fa)]=LocalCredentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x3e98(){const _0x56bee5=['region','map','execute','DeleteObjectsCommand','bucketName','throw','ArrayUtils','split','../utils/aws-s3.utils','71274xkkYiW','@flosum/utils','next','BaseDelete','189JKNvng','HttpHandler','sep','getFilesPaths','1259278UYXgYx','posix','path','2501544DApezw','../init','s3Client','secretAccessKey','__awaiter','AwsS3Utils','640325MFABEN','done','join','5886870MFWGKt','18aMTMpr','defineProperty','apply','send','default','__importDefault','OBJECTS_PER_CHUNK','value','1032YDUbGr','2990182EkplKS','credentials','7568PgQYiL','AwsS3Delete'];_0x3e98=function(){return _0x56bee5;};return _0x3e98();}const _0x493b8f=_0x328f;function _0x328f(_0x150de9,_0xac141e){const _0x3e988b=_0x3e98();return _0x328f=function(_0x328f7f,_0x291326){_0x328f7f=_0x328f7f-0x1b6;let _0x43fcbe=_0x3e988b[_0x328f7f];return _0x43fcbe;},_0x328f(_0x150de9,_0xac141e);}(function(_0x4ccffd,_0x426650){const _0x213cc2=_0x328f,_0x15f863=_0x4ccffd();while(!![]){try{const _0x5b49a3=parseInt(_0x213cc2(0x1c7))/0x1+-parseInt(_0x213cc2(0x1dd))/0x2+-parseInt(_0x213cc2(0x1dc))/0x3*(-parseInt(_0x213cc2(0x1df))/0x4)+parseInt(_0x213cc2(0x1d0))/0x5+parseInt(_0x213cc2(0x1bf))/0x6*(parseInt(_0x213cc2(0x1c3))/0x7)+-parseInt(_0x213cc2(0x1ca))/0x8*(-parseInt(_0x213cc2(0x1d4))/0x9)+-parseInt(_0x213cc2(0x1d3))/0xa;if(_0x5b49a3===_0x426650)break;else _0x15f863['push'](_0x15f863['shift']());}catch(_0x2f43f5){_0x15f863['push'](_0x15f863['shift']());}}}(_0x3e98,0xdbdb4));var __awaiter=this&&this[_0x493b8f(0x1ce)]||function(_0x16e7ea,_0x27fa26,_0x1a9b80,_0x305bd0){function _0xf07469(_0x43419f){return _0x43419f instanceof _0x1a9b80?_0x43419f:new _0x1a9b80(function(_0x2c997d){_0x2c997d(_0x43419f);});}return new(_0x1a9b80||(_0x1a9b80=Promise))(function(_0x375e04,_0x22f6a0){const _0x5323c9=_0x328f;function _0x1b2a29(_0x55458b){const _0xb92df=_0x328f;try{_0x4546be(_0x305bd0[_0xb92df(0x1c1)](_0x55458b));}catch(_0x1f4ef5){_0x22f6a0(_0x1f4ef5);}}function _0x23595e(_0x5aa9e4){const _0x902c20=_0x328f;try{_0x4546be(_0x305bd0[_0x902c20(0x1bb)](_0x5aa9e4));}catch(_0x2527a0){_0x22f6a0(_0x2527a0);}}function _0x4546be(_0x33a276){const _0x4f0f0f=_0x328f;_0x33a276[_0x4f0f0f(0x1d1)]?_0x375e04(_0x33a276[_0x4f0f0f(0x1db)]):_0xf07469(_0x33a276[_0x4f0f0f(0x1db)])['then'](_0x1b2a29,_0x23595e);}_0x4546be((_0x305bd0=_0x305bd0[_0x5323c9(0x1d6)](_0x16e7ea,_0x27fa26||[]))[_0x5323c9(0x1c1)]());});},__importDefault=this&&this[_0x493b8f(0x1d9)]||function(_0x717b15){return _0x717b15&&_0x717b15['__esModule']?_0x717b15:{'default':_0x717b15};};Object[_0x493b8f(0x1d5)](exports,'__esModule',{'value':!![]}),exports[_0x493b8f(0x1e0)]=void 0x0;const path_1=__importDefault(require(_0x493b8f(0x1c9))),utils_1=require(_0x493b8f(0x1c0)),aws_s3_utils_1=require(_0x493b8f(0x1be)),_1=require('./'),client_s3_1=require('@aws-sdk/client-s3'),init_1=require(_0x493b8f(0x1cb));class AwsS3Delete extends _1[_0x493b8f(0x1c2)]{constructor(_0x3ab379){const _0xc01980=_0x493b8f;super(_0x3ab379),this['credentials']=_0x3ab379,this[_0xc01980(0x1da)]=0x3e8,this[_0xc01980(0x1cc)]=new client_s3_1['S3Client']({'region':this['credentials'][_0xc01980(0x1b6)],'credentials':{'accessKeyId':this[_0xc01980(0x1de)]['accessKeyId'],'secretAccessKey':this[_0xc01980(0x1de)][_0xc01980(0x1cd)]},'requestHandler':new init_1[(_0xc01980(0x1c4))]()});}[_0x493b8f(0x1b8)](_0x2ee7c7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x19af44=_0x328f,_0x5eb4ec=_0x2ee7c7[_0x19af44(0x1bd)](path_1['default'][_0x19af44(0x1c5)])[_0x19af44(0x1d2)](path_1[_0x19af44(0x1d8)][_0x19af44(0x1c8)][_0x19af44(0x1c5)]),_0x3d56ca=yield aws_s3_utils_1[_0x19af44(0x1cf)][_0x19af44(0x1c6)](_0x5eb4ec,this[_0x19af44(0x1de)][_0x19af44(0x1ba)],this['s3Client']),_0x46ce17=utils_1[_0x19af44(0x1bc)]['splitOnChunks'](_0x3d56ca,this[_0x19af44(0x1da)]);for(const _0x1bb5c3 of _0x46ce17){const _0x22a10a=_0x1bb5c3[_0x19af44(0x1b7)](_0x335e1d=>({'Key':_0x335e1d})),_0x51dc9a=new client_s3_1[(_0x19af44(0x1b9))]({'Bucket':this['credentials'][_0x19af44(0x1ba)],'Delete':{'Objects':_0x22a10a}});yield this[_0x19af44(0x1cc)][_0x19af44(0x1d7)](_0x51dc9a);}});}}exports[_0x493b8f(0x1e0)]=AwsS3Delete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x31eef3=_0x5770;function _0x1b2b(){var _0x256701=['defineProperty','18Rxmmmp','credentials','1172480SmXjzO','1237582rmgzxh','BaseDelete','370OMNOfI','325953tIwsZp','4829224guTAFd','400310ZgouSc','280065zMxMMd','7aFBqyN','__esModule','281670NFbFAi'];_0x1b2b=function(){return _0x256701;};return _0x1b2b();}(function(_0x51caf3,_0x59b3e3){var _0x16dd68=_0x5770,_0x4a62a1=_0x51caf3();while(!![]){try{var _0x1927e2=parseInt(_0x16dd68(0x1f8))/0x1+parseInt(_0x16dd68(0x1f3))/0x2+-parseInt(_0x16dd68(0x1ee))/0x3+parseInt(_0x16dd68(0x1f2))/0x4+-parseInt(_0x16dd68(0x1eb))/0x5*(parseInt(_0x16dd68(0x1f0))/0x6)+-parseInt(_0x16dd68(0x1ec))/0x7*(-parseInt(_0x16dd68(0x1f7))/0x8)+parseInt(_0x16dd68(0x1f6))/0x9*(-parseInt(_0x16dd68(0x1f5))/0xa);if(_0x1927e2===_0x59b3e3)break;else _0x4a62a1['push'](_0x4a62a1['shift']());}catch(_0x4e37d6){_0x4a62a1['push'](_0x4a62a1['shift']());}}}(_0x1b2b,0x4ca3c));Object[_0x31eef3(0x1ef)](exports,_0x31eef3(0x1ed),{'value':!![]}),exports[_0x31eef3(0x1f4)]=void 0x0;function _0x5770(_0x499451,_0x1ad8de){var _0x1b2b04=_0x1b2b();return _0x5770=function(_0x577022,_0x22a3bb){_0x577022=_0x577022-0x1eb;var _0xfcc50e=_0x1b2b04[_0x577022];return _0xfcc50e;},_0x5770(_0x499451,_0x1ad8de);}class BaseDelete{constructor(_0x13ffb4){var _0x31e0bc=_0x31eef3;this[_0x31e0bc(0x1f1)]=_0x13ffb4;}}exports[_0x31eef3(0x1f4)]=BaseDelete;
|
package/dist/delete/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x58d14d=_0x1044;(function(_0x22eaf0,_0x2bcf8c){var _0x4b1fc6=_0x1044,_0x562d7c=_0x22eaf0();while(!![]){try{var _0x4fb271=-parseInt(_0x4b1fc6(0x120))/0x1+parseInt(_0x4b1fc6(0x115))/0x2+parseInt(_0x4b1fc6(0x11c))/0x3+-parseInt(_0x4b1fc6(0x112))/0x4*(parseInt(_0x4b1fc6(0x121))/0x5)+parseInt(_0x4b1fc6(0x116))/0x6+-parseInt(_0x4b1fc6(0x11e))/0x7*(parseInt(_0x4b1fc6(0x118))/0x8)+parseInt(_0x4b1fc6(0x113))/0x9*(parseInt(_0x4b1fc6(0x11f))/0xa);if(_0x4fb271===_0x2bcf8c)break;else _0x562d7c['push'](_0x562d7c['shift']());}catch(_0x564c09){_0x562d7c['push'](_0x562d7c['shift']());}}}(_0xca64,0xad676));function _0xca64(){var _0x3b63e4=['LocalDelete','./aws-s3-delete','AwsS3Delete','2833812ggLuMf','defineProperty','647066WwzgPj','6107730kJNecp','917236dOYfrq','185SXaWaQ','72524Gcmnsv','27hdJtBS','./local-delete','519686KnuTOe','561126xaoBbj','BaseDelete','72lDSByd'];_0xca64=function(){return _0x3b63e4;};return _0xca64();}Object[_0x58d14d(0x11d)](exports,'__esModule',{'value':!![]}),exports[_0x58d14d(0x119)]=exports[_0x58d14d(0x11b)]=exports['BaseDelete']=void 0x0;var base_delete_1=require('./base-delete');Object['defineProperty'](exports,_0x58d14d(0x117),{'enumerable':!![],'get':function(){return base_delete_1['BaseDelete'];}});var aws_s3_delete_1=require(_0x58d14d(0x11a));function _0x1044(_0x28bd61,_0x537207){var _0xca645a=_0xca64();return _0x1044=function(_0x1044a6,_0xc52222){_0x1044a6=_0x1044a6-0x112;var _0x31349a=_0xca645a[_0x1044a6];return _0x31349a;},_0x1044(_0x28bd61,_0x537207);}Object['defineProperty'](exports,_0x58d14d(0x11b),{'enumerable':!![],'get':function(){return aws_s3_delete_1['AwsS3Delete'];}});var local_delete_1=require(_0x58d14d(0x114));Object[_0x58d14d(0x11d)](exports,'LocalDelete',{'enumerable':!![],'get':function(){return local_delete_1['LocalDelete'];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x3221(_0x13344c,_0x324239){const _0x1984fb=_0x1984();return _0x3221=function(_0x3221b9,_0x1a001e){_0x3221b9=_0x3221b9-0x172;let _0x34157a=_0x1984fb[_0x3221b9];return _0x34157a;},_0x3221(_0x13344c,_0x324239);}const _0x386c0d=_0x3221;(function(_0x530e5d,_0x57d735){const _0x21cf2f=_0x3221,_0x38ab06=_0x530e5d();while(!![]){try{const _0x547ce6=parseInt(_0x21cf2f(0x187))/0x1*(parseInt(_0x21cf2f(0x186))/0x2)+-parseInt(_0x21cf2f(0x17e))/0x3*(-parseInt(_0x21cf2f(0x179))/0x4)+parseInt(_0x21cf2f(0x172))/0x5+parseInt(_0x21cf2f(0x185))/0x6*(parseInt(_0x21cf2f(0x183))/0x7)+parseInt(_0x21cf2f(0x17f))/0x8+-parseInt(_0x21cf2f(0x17b))/0x9+-parseInt(_0x21cf2f(0x178))/0xa*(parseInt(_0x21cf2f(0x175))/0xb);if(_0x547ce6===_0x57d735)break;else _0x38ab06['push'](_0x38ab06['shift']());}catch(_0x487134){_0x38ab06['push'](_0x38ab06['shift']());}}}(_0x1984,0x5d519));function _0x1984(){const _0xbfd5c3=['fs/promises','BaseDelete','33WQUjjQ','__esModule','defineProperty','4784390zKTeub','1276948pYoJYs','next','2316384sPUGeB','LocalDelete','then','6ZwGheO','4969200OcWuJz','apply','value','throw','7rDmSdW','done','391074RAujUa','462962KQCxnQ','2mxwEUq','1435805vSydRw'];_0x1984=function(){return _0xbfd5c3;};return _0x1984();}var __awaiter=this&&this['__awaiter']||function(_0x4e4962,_0x1a39f1,_0x4ad47d,_0x267bac){function _0x1a4b46(_0x4a9237){return _0x4a9237 instanceof _0x4ad47d?_0x4a9237:new _0x4ad47d(function(_0xa65371){_0xa65371(_0x4a9237);});}return new(_0x4ad47d||(_0x4ad47d=Promise))(function(_0x166787,_0x157326){const _0x41d5b6=_0x3221;function _0x18837c(_0x48570d){const _0x226d5d=_0x3221;try{_0x4c6565(_0x267bac[_0x226d5d(0x17a)](_0x48570d));}catch(_0x2d0047){_0x157326(_0x2d0047);}}function _0x33880e(_0x58dd5f){const _0x594651=_0x3221;try{_0x4c6565(_0x267bac[_0x594651(0x182)](_0x58dd5f));}catch(_0x42d03c){_0x157326(_0x42d03c);}}function _0x4c6565(_0x939357){const _0x82a176=_0x3221;_0x939357[_0x82a176(0x184)]?_0x166787(_0x939357[_0x82a176(0x181)]):_0x1a4b46(_0x939357[_0x82a176(0x181)])[_0x82a176(0x17d)](_0x18837c,_0x33880e);}_0x4c6565((_0x267bac=_0x267bac[_0x41d5b6(0x180)](_0x4e4962,_0x1a39f1||[]))[_0x41d5b6(0x17a)]());});};Object[_0x386c0d(0x177)](exports,_0x386c0d(0x176),{'value':!![]}),exports[_0x386c0d(0x17c)]=void 0x0;const promises_1=require(_0x386c0d(0x173)),utils_1=require('@flosum/utils'),_1=require('./');class LocalDelete extends _1[_0x386c0d(0x174)]{['execute'](_0x2da43f){return __awaiter(this,void 0x0,void 0x0,function*(){if(yield utils_1['FsUtils']['isExistsPath'](_0x2da43f))yield(0x0,promises_1['rm'])(_0x2da43f,{'recursive':!![]});});}}exports[_0x386c0d(0x17c)]=LocalDelete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x121997=_0x34fe;(function(_0x479b4c,_0x24f158){const _0x4937e9=_0x34fe,_0x5deec2=_0x479b4c();while(!![]){try{const _0x1e3721=parseInt(_0x4937e9(0x1a6))/0x1+parseInt(_0x4937e9(0x180))/0x2*(-parseInt(_0x4937e9(0x19f))/0x3)+parseInt(_0x4937e9(0x19d))/0x4*(-parseInt(_0x4937e9(0x18b))/0x5)+parseInt(_0x4937e9(0x190))/0x6+parseInt(_0x4937e9(0x19a))/0x7+parseInt(_0x4937e9(0x182))/0x8*(-parseInt(_0x4937e9(0x1a1))/0x9)+-parseInt(_0x4937e9(0x184))/0xa*(-parseInt(_0x4937e9(0x193))/0xb);if(_0x1e3721===_0x24f158)break;else _0x5deec2['push'](_0x5deec2['shift']());}catch(_0x29a594){_0x5deec2['push'](_0x5deec2['shift']());}}}(_0x1b64,0x95ca2));var __awaiter=this&&this[_0x121997(0x199)]||function(_0x27cdde,_0x169b53,_0x2015d2,_0x4c59c9){function _0x20923d(_0x4dd247){return _0x4dd247 instanceof _0x2015d2?_0x4dd247:new _0x2015d2(function(_0x1456e2){_0x1456e2(_0x4dd247);});}return new(_0x2015d2||(_0x2015d2=Promise))(function(_0x8b8aeb,_0xceb187){const _0x45d983=_0x34fe;function _0x2da414(_0x39099a){const _0x38d993=_0x34fe;try{_0x10d35a(_0x4c59c9[_0x38d993(0x1a2)](_0x39099a));}catch(_0x489456){_0xceb187(_0x489456);}}function _0x16ae8f(_0x2de552){const _0x1b54cb=_0x34fe;try{_0x10d35a(_0x4c59c9[_0x1b54cb(0x18c)](_0x2de552));}catch(_0x281fdc){_0xceb187(_0x281fdc);}}function _0x10d35a(_0x213ea3){const _0x28a698=_0x34fe;_0x213ea3['done']?_0x8b8aeb(_0x213ea3[_0x28a698(0x194)]):_0x20923d(_0x213ea3[_0x28a698(0x194)])[_0x28a698(0x189)](_0x2da414,_0x16ae8f);}_0x10d35a((_0x4c59c9=_0x4c59c9[_0x45d983(0x1a3)](_0x27cdde,_0x169b53||[]))[_0x45d983(0x1a2)]());});},__importDefault=this&&this[_0x121997(0x192)]||function(_0x2c9adf){const _0x2fdf89=_0x121997;return _0x2c9adf&&_0x2c9adf[_0x2fdf89(0x1a7)]?_0x2c9adf:{'default':_0x2c9adf};};function _0x1b64(){const _0x2459e8=['accessKeyId','7410213bRjONJ','next','apply','@aws-sdk/client-s3','credentials','897998FIncGv','__esModule','1288NeOgNw','path','8nDlXaH','BaseDeploy','6700iGUKuP','default','S3Client','s3Client','defineProperty','then','secretAccessKey','105JvHSBu','throw','join','@aws-sdk/lib-storage','HttpHandler','3448698CQLQHb','posix','__importDefault','9856mQhUro','value','storageClass','../init','upload','AwsS3Deploy','__awaiter','975513cpOiYo','Upload','sep','58548RAOWfh','region','2181mkfbmz'];_0x1b64=function(){return _0x2459e8;};return _0x1b64();}Object[_0x121997(0x188)](exports,_0x121997(0x1a7),{'value':!![]}),exports[_0x121997(0x198)]=void 0x0;const path_1=__importDefault(require(_0x121997(0x181))),_1=require('./'),client_s3_1=require(_0x121997(0x1a4)),init_1=require(_0x121997(0x196)),lib_storage_1=require(_0x121997(0x18e));class AwsS3Deploy extends _1[_0x121997(0x183)]{constructor(_0x413c2a,_0x1b1ec6){const _0x3b0562=_0x121997;super(_0x413c2a),this[_0x3b0562(0x1a5)]=_0x413c2a,this[_0x3b0562(0x195)]=_0x1b1ec6,this[_0x3b0562(0x187)]=new client_s3_1[(_0x3b0562(0x186))]({'region':this[_0x3b0562(0x1a5)][_0x3b0562(0x19e)],'credentials':{'accessKeyId':this['credentials'][_0x3b0562(0x1a0)],'secretAccessKey':this[_0x3b0562(0x1a5)][_0x3b0562(0x18a)]},'requestHandler':new init_1[(_0x3b0562(0x18f))]()});}[_0x121997(0x197)](_0x54e764,_0x4981e4){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x52687f=_0x34fe,_0x15c932=new lib_storage_1[(_0x52687f(0x19b))]({'client':this[_0x52687f(0x187)],'params':{'Bucket':this[_0x52687f(0x1a5)]['bucketName'],'Key':_0x4981e4,'Body':_0x54e764,'StorageClass':this[_0x52687f(0x195)]}});yield _0x15c932['done']();});}['execute'](_0x198e61,_0x593c35){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x166844=_0x34fe;try{const _0x5e3187=_0x593c35['split'](path_1[_0x166844(0x185)]['sep'])[_0x166844(0x18d)](path_1[_0x166844(0x185)][_0x166844(0x191)][_0x166844(0x19c)]);yield this[_0x166844(0x197)](_0x198e61,_0x5e3187);}catch(_0x314c86){throw _0x314c86;}});}}function _0x34fe(_0x55d7cd,_0x433085){const _0x1b64ae=_0x1b64();return _0x34fe=function(_0x34fe8c,_0x3ca532){_0x34fe8c=_0x34fe8c-0x180;let _0x5085d5=_0x1b64ae[_0x34fe8c];return _0x5085d5;},_0x34fe(_0x55d7cd,_0x433085);}exports[_0x121997(0x198)]=AwsS3Deploy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x5bbcdd=_0x4ae6;(function(_0x17fe0c,_0x19f5ac){var _0x54680b=_0x4ae6,_0x196f61=_0x17fe0c();while(!![]){try{var _0x2e3603=-parseInt(_0x54680b(0xd0))/0x1*(-parseInt(_0x54680b(0xd1))/0x2)+-parseInt(_0x54680b(0xd5))/0x3*(-parseInt(_0x54680b(0xd4))/0x4)+parseInt(_0x54680b(0xcd))/0x5*(-parseInt(_0x54680b(0xd9))/0x6)+parseInt(_0x54680b(0xda))/0x7*(-parseInt(_0x54680b(0xd7))/0x8)+parseInt(_0x54680b(0xd6))/0x9+parseInt(_0x54680b(0xd3))/0xa*(parseInt(_0x54680b(0xce))/0xb)+-parseInt(_0x54680b(0xdb))/0xc;if(_0x2e3603===_0x19f5ac)break;else _0x196f61['push'](_0x196f61['shift']());}catch(_0x2e2ddb){_0x196f61['push'](_0x196f61['shift']());}}}(_0x196d,0xde1e7));Object[_0x5bbcdd(0xd2)](exports,_0x5bbcdd(0xcf),{'value':!![]}),exports[_0x5bbcdd(0xd8)]=void 0x0;class BaseDeploy{constructor(_0x32afce){this['credentials']=_0x32afce;}}function _0x4ae6(_0x2d4910,_0x20e6b8){var _0x196dec=_0x196d();return _0x4ae6=function(_0x4ae650,_0x34341e){_0x4ae650=_0x4ae650-0xcd;var _0x4ed5b3=_0x196dec[_0x4ae650];return _0x4ed5b3;},_0x4ae6(_0x2d4910,_0x20e6b8);}exports['BaseDeploy']=BaseDeploy;function _0x196d(){var _0xb009b5=['2656VkieJx','BaseDeploy','36FWLQGm','4571rYUuFE','4663848eceihe','657505gVlnrU','253FQEQwy','__esModule','67726aUTLFU','32ALHWuE','defineProperty','400120thWSvl','263828eNcehx','3VSuHno','2109654iNFMWq'];_0x196d=function(){return _0xb009b5;};return _0x196d();}
|
package/dist/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x1e2689=_0x14ef;(function(_0x1cce02,_0x5862a4){var _0x3a5c2f=_0x14ef,_0x378fa3=_0x1cce02();while(!![]){try{var _0x4aff00=-parseInt(_0x3a5c2f(0xa0))/0x1+-parseInt(_0x3a5c2f(0x94))/0x2*(-parseInt(_0x3a5c2f(0xa7))/0x3)+parseInt(_0x3a5c2f(0xa3))/0x4*(parseInt(_0x3a5c2f(0x9e))/0x5)+parseInt(_0x3a5c2f(0xa4))/0x6*(-parseInt(_0x3a5c2f(0xa2))/0x7)+parseInt(_0x3a5c2f(0xa1))/0x8*(-parseInt(_0x3a5c2f(0x96))/0x9)+parseInt(_0x3a5c2f(0x9b))/0xa*(parseInt(_0x3a5c2f(0x93))/0xb)+parseInt(_0x3a5c2f(0xa6))/0xc*(parseInt(_0x3a5c2f(0x9a))/0xd);if(_0x4aff00===_0x5862a4)break;else _0x378fa3['push'](_0x378fa3['shift']());}catch(_0xbe8b80){_0x378fa3['push'](_0x378fa3['shift']());}}}(_0x226f,0x61fc5));function _0x14ef(_0x4f7dbf,_0x3fb1e7){var _0x226f04=_0x226f();return _0x14ef=function(_0x14efca,_0x419ccb){_0x14efca=_0x14efca-0x93;var _0x4c5f59=_0x226f04[_0x14efca];return _0x4c5f59;},_0x14ef(_0x4f7dbf,_0x3fb1e7);}function _0x226f(){var _0xfbf1e1=['190821zMSFHE','55vuzlRT','18azCdNm','__esModule','801fiNnwx','BaseDeploy','LocalDeploy','./base-deploy','429gcukxk','22840NouUHg','./aws-s3-deploy','AwsS3Deploy','435ACkNuk','./local-deploy','751866nkMUBi','42248IuEEWw','1413202nBZwHD','26516WczLyN','18YBDncX','defineProperty','388464btYTnl'];_0x226f=function(){return _0xfbf1e1;};return _0x226f();}Object['defineProperty'](exports,_0x1e2689(0x95),{'value':!![]}),exports['LocalDeploy']=exports['AwsS3Deploy']=exports[_0x1e2689(0x97)]=void 0x0;var base_deploy_1=require(_0x1e2689(0x99));Object[_0x1e2689(0xa5)](exports,_0x1e2689(0x97),{'enumerable':!![],'get':function(){return base_deploy_1['BaseDeploy'];}});var aws_s3_deploy_1=require(_0x1e2689(0x9c));Object['defineProperty'](exports,_0x1e2689(0x9d),{'enumerable':!![],'get':function(){var _0x3ad532=_0x1e2689;return aws_s3_deploy_1[_0x3ad532(0x9d)];}});var local_deploy_1=require(_0x1e2689(0x9f));Object[_0x1e2689(0xa5)](exports,_0x1e2689(0x98),{'enumerable':!![],'get':function(){var _0x1a77d6=_0x1e2689;return local_deploy_1[_0x1a77d6(0x98)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x3c42a0=_0x3978;(function(_0x2eccd7,_0x60f4d){const _0x2dc466=_0x3978,_0x354550=_0x2eccd7();while(!![]){try{const _0x40603c=-parseInt(_0x2dc466(0x1d9))/0x1+parseInt(_0x2dc466(0x1d6))/0x2*(-parseInt(_0x2dc466(0x1c4))/0x3)+-parseInt(_0x2dc466(0x1ca))/0x4*(parseInt(_0x2dc466(0x1c5))/0x5)+-parseInt(_0x2dc466(0x1cb))/0x6*(parseInt(_0x2dc466(0x1cd))/0x7)+-parseInt(_0x2dc466(0x1d7))/0x8+parseInt(_0x2dc466(0x1c1))/0x9+parseInt(_0x2dc466(0x1d3))/0xa*(parseInt(_0x2dc466(0x1c2))/0xb);if(_0x40603c===_0x60f4d)break;else _0x354550['push'](_0x354550['shift']());}catch(_0x4c8a83){_0x354550['push'](_0x354550['shift']());}}}(_0x4e0f,0x78e82));var __awaiter=this&&this[_0x3c42a0(0x1d8)]||function(_0x374101,_0x40c414,_0x9a282e,_0x312dbc){function _0x1ce42c(_0x3cf740){return _0x3cf740 instanceof _0x9a282e?_0x3cf740:new _0x9a282e(function(_0x24e9b4){_0x24e9b4(_0x3cf740);});}return new(_0x9a282e||(_0x9a282e=Promise))(function(_0x2641e1,_0x428203){const _0x406d39=_0x3978;function _0x379232(_0x573e08){try{_0x2b2664(_0x312dbc['next'](_0x573e08));}catch(_0x380ce9){_0x428203(_0x380ce9);}}function _0x3e4b6d(_0x3130b8){const _0x5ccc12=_0x3978;try{_0x2b2664(_0x312dbc[_0x5ccc12(0x1d4)](_0x3130b8));}catch(_0x5029e6){_0x428203(_0x5029e6);}}function _0x2b2664(_0x1b339a){const _0x58d254=_0x3978;_0x1b339a[_0x58d254(0x1d0)]?_0x2641e1(_0x1b339a[_0x58d254(0x1d1)]):_0x1ce42c(_0x1b339a[_0x58d254(0x1d1)])['then'](_0x379232,_0x3e4b6d);}_0x2b2664((_0x312dbc=_0x312dbc[_0x406d39(0x1c8)](_0x374101,_0x40c414||[]))[_0x406d39(0x1c3)]());});},__importDefault=this&&this[_0x3c42a0(0x1dd)]||function(_0xd8631e){return _0xd8631e&&_0xd8631e['__esModule']?_0xd8631e:{'default':_0xd8631e};};Object[_0x3c42a0(0x1c7)](exports,_0x3c42a0(0x1cf),{'value':!![]}),exports[_0x3c42a0(0x1dc)]=void 0x0;const path_1=__importDefault(require('path')),promises_1=require(_0x3c42a0(0x1c9)),utils_1=require(_0x3c42a0(0x1d5)),_1=require('./');class LocalDeploy extends _1[_0x3c42a0(0x1c0)]{[_0x3c42a0(0x1db)](_0x540d12,_0x566e6b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5a10a4=_0x3978;try{const _0x5dd31e=path_1[_0x5a10a4(0x1da)][_0x5a10a4(0x1d2)](_0x566e6b),_0x96d205=yield utils_1['FsUtils'][_0x5a10a4(0x1cc)](_0x5dd31e);!_0x96d205&&(yield(0x0,promises_1[_0x5a10a4(0x1c6)])(_0x5dd31e,{'recursive':!![]})),yield(0x0,promises_1[_0x5a10a4(0x1ce)])(_0x566e6b,_0x540d12);}catch(_0x3745f5){(yield utils_1[_0x5a10a4(0x1de)][_0x5a10a4(0x1cc)](_0x566e6b))&&(yield(0x0,promises_1['rm'])(_0x566e6b,{'recursive':!![]}));throw _0x3745f5;}});}}function _0x3978(_0x49493d,_0x8859e1){const _0x4e0fb2=_0x4e0f();return _0x3978=function(_0x3978d9,_0x2f1e92){_0x3978d9=_0x3978d9-0x1c0;let _0x441da9=_0x4e0fb2[_0x3978d9];return _0x441da9;},_0x3978(_0x49493d,_0x8859e1);}function _0x4e0f(){const _0x5abd79=['25984ZBneii','writeFile','__esModule','done','value','dirname','37550YslgRb','throw','@flosum/utils','66172KlGRdO','3007664jbGkHs','__awaiter','793257TOjPYq','default','execute','LocalDeploy','__importDefault','FsUtils','BaseDeploy','510516yjoHuy','5599TSLgIl','next','15NJvStR','39860mKqnVp','mkdir','defineProperty','apply','fs/promises','60hpbbdg','30SiMPwT','isExistsPath'];_0x4e0f=function(){return _0x5abd79;};return _0x4e0f();}exports['LocalDeploy']=LocalDeploy;
|
package/dist/factory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x30be41=_0x9371;function _0x9371(_0x4b63eb,_0x1befe8){const _0xdd90cd=_0xdd90();return _0x9371=function(_0x937157,_0x2b6ab5){_0x937157=_0x937157-0x7e;let _0x5cc11c=_0xdd90cd[_0x937157];return _0x5cc11c;},_0x9371(_0x4b63eb,_0x1befe8);}(function(_0x4ce35f,_0xb15e01){const _0x1508e2=_0x9371,_0x57df9c=_0x4ce35f();while(!![]){try{const _0x168502=-parseInt(_0x1508e2(0x81))/0x1+-parseInt(_0x1508e2(0x8b))/0x2*(parseInt(_0x1508e2(0x86))/0x3)+parseInt(_0x1508e2(0x94))/0x4+parseInt(_0x1508e2(0x8a))/0x5*(parseInt(_0x1508e2(0x98))/0x6)+parseInt(_0x1508e2(0x7f))/0x7+-parseInt(_0x1508e2(0x8f))/0x8*(parseInt(_0x1508e2(0x91))/0x9)+parseInt(_0x1508e2(0x9a))/0xa;if(_0x168502===_0xb15e01)break;else _0x57df9c['push'](_0x57df9c['shift']());}catch(_0x35ba97){_0x57df9c['push'](_0x57df9c['shift']());}}}(_0xdd90,0xee7f0));Object[_0x30be41(0x99)](exports,_0x30be41(0x87),{'value':!![]}),exports[_0x30be41(0x9e)]=void 0x0;const storage_type_enum_1=require('./types/storage-type.enum'),aws_s3_credentials_1=require(_0x30be41(0x85)),local_credentials_1=require(_0x30be41(0x9b)),aws_s3_delete_1=require(_0x30be41(0x9c)),local_delete_1=require(_0x30be41(0x89)),aws_s3_deploy_1=require('./deploy/aws-s3-deploy'),local_deploy_1=require(_0x30be41(0x8e)),aws_s3_retrieve_1=require(_0x30be41(0x80)),local_retrieve_1=require(_0x30be41(0x90));class StorageFactory{static[_0x30be41(0x88)](_0x3f4b22,_0x33c473,_0x4c362c,_0x1488a8,_0x5c863d){const _0x1f945b=_0x30be41;switch(_0x3f4b22){case storage_type_enum_1[_0x1f945b(0x82)][_0x1f945b(0x93)]:return new aws_s3_retrieve_1[(_0x1f945b(0x8c))](_0x33c473,_0x4c362c,_0x1488a8,_0x5c863d);case storage_type_enum_1[_0x1f945b(0x82)][_0x1f945b(0x8d)]:return new local_retrieve_1[(_0x1f945b(0x92))](_0x33c473,_0x4c362c);default:throw new Error(_0x1f945b(0x7e)+_0x3f4b22+'\x22');}}static[_0x30be41(0x97)](_0x426dbc,_0x4f17d8,_0x39a02b){const _0x1200a4=_0x30be41;switch(_0x426dbc){case storage_type_enum_1[_0x1200a4(0x82)][_0x1200a4(0x93)]:return new aws_s3_deploy_1[(_0x1200a4(0x95))](_0x4f17d8,_0x39a02b);case storage_type_enum_1[_0x1200a4(0x82)][_0x1200a4(0x8d)]:return new local_deploy_1[(_0x1200a4(0x96))](_0x4f17d8);default:throw new Error('Unknown\x20storage\x20type\x20-\x20\x22'+_0x426dbc+'\x22');}}static[_0x30be41(0x83)](_0x382090,_0x381e62){const _0x4edaec=_0x30be41;switch(_0x382090){case storage_type_enum_1[_0x4edaec(0x82)][_0x4edaec(0x93)]:return new aws_s3_delete_1[(_0x4edaec(0x9f))](_0x381e62);case storage_type_enum_1[_0x4edaec(0x82)][_0x4edaec(0x8d)]:return new local_delete_1['LocalDelete'](_0x381e62);default:throw new Error('Unknown\x20storage\x20type\x20-\x20\x22'+_0x382090+'\x22');}}static[_0x30be41(0x84)](_0x293f9e,_0x4fc3e9){const _0x1b6194=_0x30be41;switch(_0x293f9e){case storage_type_enum_1[_0x1b6194(0x82)][_0x1b6194(0x93)]:return new aws_s3_credentials_1['AwsS3Credentials'](_0x4fc3e9);case storage_type_enum_1[_0x1b6194(0x82)][_0x1b6194(0x8d)]:return new local_credentials_1[(_0x1b6194(0x9d))]();default:throw new Error('Unknown\x20storage\x20type\x20-\x20\x22'+_0x293f9e+'\x22');}}}exports['StorageFactory']=StorageFactory;function _0xdd90(){const _0x19d617=['Unknown\x20storage\x20type\x20-\x20\x22','13078492FaYkta','./retrieve/aws-s3-retrieve','68834dYmKrY','StorageType','createDelete','createCredentials','./credentials/aws-s3-credentials','471mvBFQv','__esModule','createRetrieve','./delete/local-delete','39745XFVoBD','16850ERySjK','AwsS3Retrieve','Local','./deploy/local-deploy','48utPTZJ','./retrieve/local-retrieve','2708946JYqNBc','LocalRetrieve','AWS_S3','6248268gKOcIy','AwsS3Deploy','LocalDeploy','createDeploy','198vScJTO','defineProperty','4816630vRnTLe','./credentials/local-credentials','./delete/aws-s3-delete','LocalCredentials','StorageFactory','AwsS3Delete'];_0xdd90=function(){return _0x19d617;};return _0xdd90();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x378b93=_0x23d1;(function(_0x7adeaa,_0x358386){var _0x744ce1=_0x23d1,_0x391db4=_0x7adeaa();while(!![]){try{var _0x151e28=-parseInt(_0x744ce1(0x1b5))/0x1*(-parseInt(_0x744ce1(0x1b2))/0x2)+parseInt(_0x744ce1(0x1a0))/0x3+-parseInt(_0x744ce1(0x1b0))/0x4*(parseInt(_0x744ce1(0x1a9))/0x5)+parseInt(_0x744ce1(0x1ac))/0x6*(parseInt(_0x744ce1(0x19d))/0x7)+-parseInt(_0x744ce1(0x1b4))/0x8+-parseInt(_0x744ce1(0x19e))/0x9+parseInt(_0x744ce1(0x1a5))/0xa*(parseInt(_0x744ce1(0x1a3))/0xb);if(_0x151e28===_0x358386)break;else _0x391db4['push'](_0x391db4['shift']());}catch(_0x1beeb4){_0x391db4['push'](_0x391db4['shift']());}}}(_0x5c1a,0x6e090));var __createBinding=this&&this[_0x378b93(0x1ae)]||(Object[_0x378b93(0x1aa)]?function(_0x392330,_0x28690e,_0x396301,_0x101446){var _0x5dd287=_0x378b93;if(_0x101446===undefined)_0x101446=_0x396301;var _0x3947c2=Object[_0x5dd287(0x1a2)](_0x28690e,_0x396301);(!_0x3947c2||(_0x5dd287(0x1ab)in _0x3947c2?!_0x28690e['__esModule']:_0x3947c2['writable']||_0x3947c2[_0x5dd287(0x1b1)]))&&(_0x3947c2={'enumerable':!![],'get':function(){return _0x28690e[_0x396301];}}),Object['defineProperty'](_0x392330,_0x101446,_0x3947c2);}:function(_0x42acb0,_0x48e101,_0x32b80c,_0x50f592){if(_0x50f592===undefined)_0x50f592=_0x32b80c;_0x42acb0[_0x50f592]=_0x48e101[_0x32b80c];}),__exportStar=this&&this[_0x378b93(0x1a6)]||function(_0x2513bc,_0x4a3c04){var _0x23ec9d=_0x378b93;for(var _0x9bdea in _0x2513bc)if(_0x9bdea!==_0x23ec9d(0x1a1)&&!Object['prototype'][_0x23ec9d(0x1b6)]['call'](_0x4a3c04,_0x9bdea))__createBinding(_0x4a3c04,_0x2513bc,_0x9bdea);};function _0x5c1a(){var _0x4892fc=['812SuTrHn','3932694vABZVq','./types','1924425Wspznc','default','getOwnPropertyDescriptor','77zhbjVS','defineProperty','661730ddiSlu','__exportStar','StorageFactory','__esModule','5SbgfjN','create','get','43938KpGfFq','./credentials','__createBinding','./retrieve','1698636poJPEt','configurable','8590nktCor','./init','5340760IlXcAf','6OVNVdJ','hasOwnProperty','./deploy','./factory'];_0x5c1a=function(){return _0x4892fc;};return _0x5c1a();}Object[_0x378b93(0x1a4)](exports,_0x378b93(0x1a8),{'value':!![]}),exports['StorageFactory']=void 0x0,require(_0x378b93(0x1b3)),__exportStar(require(_0x378b93(0x1ad)),exports),__exportStar(require('./delete'),exports),__exportStar(require(_0x378b93(0x1b7)),exports),__exportStar(require(_0x378b93(0x1af)),exports);var factory_1=require(_0x378b93(0x1b8));function _0x23d1(_0x551d2b,_0x3321f5){var _0x5c1a0b=_0x5c1a();return _0x23d1=function(_0x23d150,_0x4f7525){_0x23d150=_0x23d150-0x19d;var _0x5cba7a=_0x5c1a0b[_0x23d150];return _0x5cba7a;},_0x23d1(_0x551d2b,_0x3321f5);}Object['defineProperty'](exports,'StorageFactory',{'enumerable':!![],'get':function(){var _0x3f7c35=_0x378b93;return factory_1[_0x3f7c35(0x1a7)];}}),__exportStar(require(_0x378b93(0x19f)),exports);
|
package/dist/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0xbc13ef=_0x2ba8;(function(_0x46ffac,_0x3f2348){const _0x2aa383=_0x2ba8,_0x462c5d=_0x46ffac();while(!![]){try{const _0x49ce19=-parseInt(_0x2aa383(0x1e6))/0x1*(parseInt(_0x2aa383(0x1f2))/0x2)+parseInt(_0x2aa383(0x1f5))/0x3+parseInt(_0x2aa383(0x1eb))/0x4+-parseInt(_0x2aa383(0x1ea))/0x5*(-parseInt(_0x2aa383(0x1f1))/0x6)+-parseInt(_0x2aa383(0x1ed))/0x7+parseInt(_0x2aa383(0x1f0))/0x8+parseInt(_0x2aa383(0x1e5))/0x9;if(_0x49ce19===_0x3f2348)break;else _0x462c5d['push'](_0x462c5d['shift']());}catch(_0x394665){_0x462c5d['push'](_0x462c5d['shift']());}}}(_0x30df,0xba317));function _0x30df(){const _0x298725=['16713cIoBpw','2708667tPLYHt','3kHSnlq','defineProperty','HTTPS_PROXY','HttpHandler','5oELbiI','3403908zQzIdP','https-proxy-agent','3614569TyvLKx','HTTP_PROXY','env','3149792vpXVSC','3505944AhwNSi','571030cJEEgi','__esModule','NodeHttpHandler'];_0x30df=function(){return _0x298725;};return _0x30df();}Object[_0xbc13ef(0x1e7)](exports,_0xbc13ef(0x1f3),{'value':!![]}),exports[_0xbc13ef(0x1e9)]=void 0x0;function _0x2ba8(_0xbc5ac7,_0x4ac271){const _0x30dfa9=_0x30df();return _0x2ba8=function(_0x2ba8c7,_0x278fa5){_0x2ba8c7=_0x2ba8c7-0x1e5;let _0x22f73e=_0x30dfa9[_0x2ba8c7];return _0x22f73e;},_0x2ba8(_0xbc5ac7,_0x4ac271);}const https_proxy_agent_1=require(_0xbc13ef(0x1ec)),node_http_handler_1=require('@smithy/node-http-handler');class HttpHandler extends node_http_handler_1[_0xbc13ef(0x1f4)]{constructor(){const _0x12b3ca=_0xbc13ef;if(process['env'][_0x12b3ca(0x1ee)]||process[_0x12b3ca(0x1ef)][_0x12b3ca(0x1e8)]){const _0x52e20b=new https_proxy_agent_1['HttpsProxyAgent'](process[_0x12b3ca(0x1ef)][_0x12b3ca(0x1ee)]||process['env']['HTTPS_PROXY']);super({'httpAgent':_0x52e20b,'httpsAgent':_0x52e20b});}else super({});}}exports[_0xbc13ef(0x1e9)]=HttpHandler;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { ListObjectsCommandOutput } from '@aws-sdk/client-s3';
|
|
2
3
|
import { Readable } from 'stream';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { CentralDirectory } from 'unzipper';
|
|
5
|
+
export declare type AwsS3ImportHelperOptions = {
|
|
5
6
|
basePrefix?: string;
|
|
6
|
-
|
|
7
|
+
bucketName: string;
|
|
7
8
|
region: string;
|
|
8
9
|
credentials: {
|
|
9
10
|
accessKeyId: string;
|
|
@@ -11,14 +12,16 @@ export declare type AwsS3ImportHelperrOptions = {
|
|
|
11
12
|
};
|
|
12
13
|
};
|
|
13
14
|
export declare class AwsS3ImportHelper {
|
|
15
|
+
private readonly basePrefix;
|
|
14
16
|
private readonly bucketName;
|
|
15
|
-
private readonly basePrefix?;
|
|
16
|
-
private readonly targetDir?;
|
|
17
17
|
private readonly s3Client;
|
|
18
|
-
constructor({
|
|
18
|
+
constructor({ basePrefix, bucketName, region, credentials }: AwsS3ImportHelperOptions);
|
|
19
19
|
private getOutput;
|
|
20
|
+
ls(options?: {
|
|
21
|
+
prefix?: string;
|
|
22
|
+
delimiter?: string;
|
|
23
|
+
}): Promise<ListObjectsCommandOutput>;
|
|
24
|
+
stream(path: string): Promise<Readable>;
|
|
25
|
+
getZipFileMeta(Key: string): Promise<CentralDirectory>;
|
|
20
26
|
validateAccess(): Promise<void>;
|
|
21
|
-
stream(fileName: string): Promise<Readable>;
|
|
22
|
-
ls(): Promise<string[]>;
|
|
23
|
-
retrieve(fileName: string, retrievePath?: string): Promise<string>;
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x2b3e5d=_0x3ab1;function _0x28e2(){const _0xbd9ddc=['throw','defineProperty','AwsS3ImportHelper','join','next','296463tiCpIE','Cannot\x20get\x20stream\x20for\x20a\x20file:\x20','../init','__esModule','1131270cQyTIh','@aws-sdk/client-s3','22098vMBmhJ','s3Client','242188PwLfqw','send','476556nDWkCd','getZipFileMeta','path','Readable','value','basePrefix','getOutput','GetObjectCommand','Open','stream','default','message','6176DuvpBL','unzipper','bucketName','s3_v3','Body','__awaiter','apply','647680NRuFRm','6832tazGBu','ListObjectsCommand'];_0x28e2=function(){return _0xbd9ddc;};return _0x28e2();}(function(_0x4d302d,_0xe03356){const _0x329ec4=_0x3ab1,_0x398b82=_0x4d302d();while(!![]){try{const _0x34b47b=-parseInt(_0x329ec4(0x192))/0x1+parseInt(_0x329ec4(0x190))/0x2+parseInt(_0x329ec4(0x18a))/0x3+-parseInt(_0x329ec4(0x194))/0x4+-parseInt(_0x329ec4(0x1a7))/0x5+-parseInt(_0x329ec4(0x18e))/0x6+-parseInt(_0x329ec4(0x1a8))/0x7*(-parseInt(_0x329ec4(0x1a0))/0x8);if(_0x34b47b===_0xe03356)break;else _0x398b82['push'](_0x398b82['shift']());}catch(_0xd8a12a){_0x398b82['push'](_0x398b82['shift']());}}}(_0x28e2,0x2ce7e));function _0x3ab1(_0x527a6a,_0x9c37ae){const _0x28e208=_0x28e2();return _0x3ab1=function(_0x3ab13b,_0x22fb2a){_0x3ab13b=_0x3ab13b-0x189;let _0x18a3a7=_0x28e208[_0x3ab13b];return _0x18a3a7;},_0x3ab1(_0x527a6a,_0x9c37ae);}var __awaiter=this&&this[_0x2b3e5d(0x1a5)]||function(_0x454578,_0x4ca571,_0x4fb0e1,_0x2b41c4){function _0x11e04b(_0x2a9d89){return _0x2a9d89 instanceof _0x4fb0e1?_0x2a9d89:new _0x4fb0e1(function(_0x49b8a1){_0x49b8a1(_0x2a9d89);});}return new(_0x4fb0e1||(_0x4fb0e1=Promise))(function(_0x5bd40a,_0x539474){const _0x36b1cc=_0x3ab1;function _0x2981c2(_0xb29471){const _0xb5f76a=_0x3ab1;try{_0x5841f5(_0x2b41c4[_0xb5f76a(0x189)](_0xb29471));}catch(_0x13a69e){_0x539474(_0x13a69e);}}function _0x307d52(_0x1e538e){const _0x424edb=_0x3ab1;try{_0x5841f5(_0x2b41c4[_0x424edb(0x1aa)](_0x1e538e));}catch(_0xd574c6){_0x539474(_0xd574c6);}}function _0x5841f5(_0x288b7b){const _0x28dc89=_0x3ab1;_0x288b7b['done']?_0x5bd40a(_0x288b7b[_0x28dc89(0x198)]):_0x11e04b(_0x288b7b[_0x28dc89(0x198)])['then'](_0x2981c2,_0x307d52);}_0x5841f5((_0x2b41c4=_0x2b41c4[_0x36b1cc(0x1a6)](_0x454578,_0x4ca571||[]))[_0x36b1cc(0x189)]());});},__importDefault=this&&this['__importDefault']||function(_0x3ebcde){const _0x23182b=_0x2b3e5d;return _0x3ebcde&&_0x3ebcde[_0x23182b(0x18d)]?_0x3ebcde:{'default':_0x3ebcde};};Object[_0x2b3e5d(0x1ab)](exports,_0x2b3e5d(0x18d),{'value':!![]}),exports[_0x2b3e5d(0x1ac)]=void 0x0;const init_1=require(_0x2b3e5d(0x18c)),client_s3_1=require(_0x2b3e5d(0x18f)),path_1=__importDefault(require(_0x2b3e5d(0x196))),stream_1=require('stream'),unzipper_1=__importDefault(require(_0x2b3e5d(0x1a1)));class AwsS3ImportHelper{constructor({basePrefix:_0x43ad79,bucketName:_0x1ba598,region:_0x17ea91,credentials:_0x54d211}){const _0x4d8fae=_0x2b3e5d;this[_0x4d8fae(0x199)]=_0x43ad79!==null&&_0x43ad79!==void 0x0?_0x43ad79:'',this[_0x4d8fae(0x1a2)]=_0x1ba598,this[_0x4d8fae(0x191)]=new client_s3_1['S3Client']({'region':_0x17ea91,'credentials':_0x54d211,'requestHandler':new init_1['HttpHandler']()});}[_0x2b3e5d(0x19a)](_0x2b3d06){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x16804a=_0x3ab1,_0x28ba1b=path_1[_0x16804a(0x19e)][_0x16804a(0x1ad)](this[_0x16804a(0x199)],_0x2b3d06);try{const _0x38387a=new client_s3_1[(_0x16804a(0x19b))]({'Bucket':this[_0x16804a(0x1a2)],'Key':_0x28ba1b});return yield this[_0x16804a(0x191)]['send'](_0x38387a);}catch(_0x1035b9){throw new Error('Error\x20retrieving\x20a\x20file\x20with\x20key\x20\x27'+_0x28ba1b+'\x27\x20from\x20S3:\x0a'+_0x1035b9[_0x16804a(0x19f)]);}});}['ls'](_0x43c323){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3ccfe3=_0x3ab1,{prefix:_0x243d47,delimiter:_0x3e6372}=_0x43c323!==null&&_0x43c323!==void 0x0?_0x43c323:{},_0x111fe5=path_1[_0x3ccfe3(0x19e)]['join'](this[_0x3ccfe3(0x199)],_0x243d47!==null&&_0x243d47!==void 0x0?_0x243d47:''),_0x620292=new client_s3_1[(_0x3ccfe3(0x1a9))]({'Prefix':_0x111fe5,'Bucket':this['bucketName'],'Delimiter':_0x3e6372});return this[_0x3ccfe3(0x191)]['send'](_0x620292);});}[_0x2b3e5d(0x19d)](_0x3ffd80){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1ec933=_0x3ab1,_0x2daef7=yield this[_0x1ec933(0x19a)](_0x3ffd80);if(_0x2daef7[_0x1ec933(0x1a4)]instanceof stream_1[_0x1ec933(0x197)])return _0x2daef7[_0x1ec933(0x1a4)];throw new Error(_0x1ec933(0x18b)+_0x3ffd80);});}[_0x2b3e5d(0x195)](_0x48413e){const _0x1695bc=_0x2b3e5d;return unzipper_1[_0x1695bc(0x19e)][_0x1695bc(0x19c)][_0x1695bc(0x1a3)](this['s3Client'],{'Bucket':this['bucketName'],'Key':_0x48413e});}['validateAccess'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x27ce24=_0x3ab1;try{const _0x1c8e08=new client_s3_1['HeadBucketCommand']({'Bucket':this[_0x27ce24(0x1a2)]});yield this['s3Client'][_0x27ce24(0x193)](_0x1c8e08);}catch(_0xf5082){throw new Error('Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20'+_0xf5082[_0x27ce24(0x19f)]);}});}}exports[_0x2b3e5d(0x1ac)]=AwsS3ImportHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x1fc8(_0x5b8b77,_0x4ce082){const _0x332617=_0x3326();return _0x1fc8=function(_0x1fc869,_0x57aba0){_0x1fc869=_0x1fc869-0x1dc;let _0x5d4e5e=_0x332617[_0x1fc869];return _0x5d4e5e;},_0x1fc8(_0x5b8b77,_0x4ce082);}const _0x3085b9=_0x1fc8;(function(_0x1e62a8,_0x2bfed1){const _0x561d03=_0x1fc8,_0x4ec638=_0x1e62a8();while(!![]){try{const _0x386b20=-parseInt(_0x561d03(0x1e8))/0x1*(parseInt(_0x561d03(0x1ed))/0x2)+-parseInt(_0x561d03(0x228))/0x3+parseInt(_0x561d03(0x1e1))/0x4*(parseInt(_0x561d03(0x1f3))/0x5)+-parseInt(_0x561d03(0x1fd))/0x6*(-parseInt(_0x561d03(0x1e0))/0x7)+-parseInt(_0x561d03(0x1fa))/0x8*(-parseInt(_0x561d03(0x1fc))/0x9)+-parseInt(_0x561d03(0x22e))/0xa+-parseInt(_0x561d03(0x1eb))/0xb;if(_0x386b20===_0x2bfed1)break;else _0x4ec638['push'](_0x4ec638['shift']());}catch(_0x171c37){_0x4ec638['push'](_0x4ec638['shift']());}}}(_0x3326,0x56dcd));var __awaiter=this&&this[_0x3085b9(0x216)]||function(_0x5bb27d,_0xa7cbe1,_0x89f2bc,_0x1e1834){function _0xd04ba1(_0x5d3c67){return _0x5d3c67 instanceof _0x89f2bc?_0x5d3c67:new _0x89f2bc(function(_0x1191d8){_0x1191d8(_0x5d3c67);});}return new(_0x89f2bc||(_0x89f2bc=Promise))(function(_0x513cce,_0x1d1796){const _0x552721=_0x1fc8;function _0x37e912(_0x3ab010){const _0x1ab055=_0x1fc8;try{_0x54e72b(_0x1e1834[_0x1ab055(0x226)](_0x3ab010));}catch(_0x453988){_0x1d1796(_0x453988);}}function _0x3e08ea(_0x224014){try{_0x54e72b(_0x1e1834['throw'](_0x224014));}catch(_0x4a939a){_0x1d1796(_0x4a939a);}}function _0x54e72b(_0x1119b7){const _0xbdb546=_0x1fc8;_0x1119b7[_0xbdb546(0x1de)]?_0x513cce(_0x1119b7[_0xbdb546(0x20b)]):_0xd04ba1(_0x1119b7[_0xbdb546(0x20b)])['then'](_0x37e912,_0x3e08ea);}_0x54e72b((_0x1e1834=_0x1e1834[_0x552721(0x1f4)](_0x5bb27d,_0xa7cbe1||[]))[_0x552721(0x226)]());});},__importDefault=this&&this[_0x3085b9(0x22d)]||function(_0x30e683){const _0x8bb9dc=_0x3085b9;return _0x30e683&&_0x30e683[_0x8bb9dc(0x21b)]?_0x30e683:{'default':_0x30e683};};Object[_0x3085b9(0x202)](exports,'__esModule',{'value':!![]}),exports['AwsS3Retrieve']=void 0x0;const path_1=__importDefault(require(_0x3085b9(0x20f))),promises_1=require(_0x3085b9(0x1f5)),aws_s3_utils_1=require(_0x3085b9(0x214)),_1=require('./'),aws_types_1=require(_0x3085b9(0x1ef)),retrieve_status_enum_1=require(_0x3085b9(0x1e9)),stream_1=require(_0x3085b9(0x208)),path_2=__importDefault(require(_0x3085b9(0x20f))),crypto_1=require('crypto'),promises_2=require(_0x3085b9(0x219)),fs_1=require('fs'),client_s3_1=require('@aws-sdk/client-s3'),init_1=require(_0x3085b9(0x223));function _0x3326(){const _0x4ed5c1=['waitUtilRetrieveDone','Completed','isDone','1616McpuDN','../types/retrieve-status.enum','RestoreObjectCommand','1622280qIPpZE','close','734gJUkQx','cachePath','../types/aws.types','Readable','credentials','getFilesPaths','10etkjTm','apply','timers/promises','HttpHandler','bucketName','writeFile','RetrieveStatus','338768zxjwsN','createReadStream','117RMuCtT','24qoVBPq','status','init','restoreFile','randomUUID','defineProperty','RETRIEVE_STATUS_CHECK_TIMEOUT','some','send','BaseRetrieve','fetchFileInfo','stream','s3Client','extractFileRetrieveStatusFromFileInfo','value','updateFilesRetrieveStatus','setTimeout','S3Client','path','message','AwsS3Utils','sep','accessKeyId','../utils/aws-s3.utils','tryRestoreFilesFromCloud','__awaiter','catch','length','fs/promises','restoreType','__esModule','createCacheFileStream','HeadObjectCommand','region','secretAccessKey','AwsFileRetrieveStatus','Restoring','No\x20files\x20left\x20to\x20execute.','../init','STANDARD','checkFilesRetrieveStatus','next','posix','741066Exyntr','InProgress','files','join','Uninitialized','__importDefault','5573170AxhlUd','CHECK_RESTORED_TIMEOUT','filter','fetchFileBody','errorMessage','done','default','1200143wJAhjY','1328772TmtmSM','split','runRestoreFiles','Body\x20is\x20not\x20supported\x20type'];_0x3326=function(){return _0x4ed5c1;};return _0x3326();}class AwsS3Retrieve extends _1[_0x3085b9(0x206)]{constructor(_0x291213,_0x87df1,_0x420ae2,_0x3ce31e){const _0xd86b6e=_0x3085b9,_0x451717=_0x87df1[_0xd86b6e(0x1e2)](path_1[_0xd86b6e(0x1df)][_0xd86b6e(0x212)])[_0xd86b6e(0x22b)](path_1[_0xd86b6e(0x1df)]['posix'][_0xd86b6e(0x212)]);super(_0x291213,_0x451717),this[_0xd86b6e(0x21a)]=_0x420ae2,this[_0xd86b6e(0x1ee)]=_0x3ce31e,this[_0xd86b6e(0x22f)]=0x7530,this[_0xd86b6e(0x203)]=0x3e8,this[_0xd86b6e(0x209)]=new client_s3_1[(_0xd86b6e(0x20e))]({'region':this[_0xd86b6e(0x1f1)][_0xd86b6e(0x21e)],'credentials':{'accessKeyId':this[_0xd86b6e(0x1f1)][_0xd86b6e(0x213)],'secretAccessKey':this[_0xd86b6e(0x1f1)][_0xd86b6e(0x21f)]},'requestHandler':new init_1[(_0xd86b6e(0x1f6))]()}),this[_0xd86b6e(0x22a)]=[];}['waitUtilRetrieveDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1b8d33=_0x1fc8;this['status']===retrieve_status_enum_1[_0x1b8d33(0x1f9)][_0x1b8d33(0x22c)]&&(yield this[_0x1b8d33(0x1ff)](),yield this[_0x1b8d33(0x1e5)]());switch(this[_0x1b8d33(0x1fe)]){case retrieve_status_enum_1[_0x1b8d33(0x1f9)]['InProgress']:yield(0x0,promises_1[_0x1b8d33(0x20d)])(this['RETRIEVE_STATUS_CHECK_TIMEOUT']),yield this[_0x1b8d33(0x1e5)]();break;case retrieve_status_enum_1[_0x1b8d33(0x1f9)]['Exception']:throw new Error(this[_0x1b8d33(0x1dd)]);}});}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x53c32b=_0x1fc8;if(this[_0x53c32b(0x1fe)]===retrieve_status_enum_1[_0x53c32b(0x1f9)][_0x53c32b(0x229)])throw new Error('Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.');if(this[_0x53c32b(0x1e7)]||!this[_0x53c32b(0x22a)][_0x53c32b(0x218)])throw new Error(_0x53c32b(0x222));const _0x401659=this[_0x53c32b(0x22a)]['shift']();let _0x1dcc20;return!this[_0x53c32b(0x1ee)]?_0x1dcc20=yield this[_0x53c32b(0x1dc)](_0x401659[_0x53c32b(0x20f)]):_0x1dcc20=yield this['createCacheFileStream'](yield this['fetchFileBody'](_0x401659[_0x53c32b(0x20f)])),this[_0x53c32b(0x1e7)]=!this[_0x53c32b(0x22a)][_0x53c32b(0x218)],{'path':this[_0x53c32b(0x20f)]['split'](path_1[_0x53c32b(0x1df)][_0x53c32b(0x227)][_0x53c32b(0x212)])[_0x53c32b(0x22b)](path_1[_0x53c32b(0x1df)][_0x53c32b(0x212)]),'content':_0x1dcc20};});}['fetchFileInfo'](_0x42ee7e){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x42e8b3=_0x1fc8,_0x689196=new client_s3_1[(_0x42e8b3(0x21d))]({'Bucket':this[_0x42e8b3(0x1f1)][_0x42e8b3(0x1f7)],'Key':_0x42ee7e}),{StorageClass:_0x5e73ce,Restore:_0xe897dd}=yield this[_0x42e8b3(0x209)][_0x42e8b3(0x205)](_0x689196);return{'StorageClass':_0x5e73ce,'Restore':_0xe897dd};});}[_0x3085b9(0x200)](_0x32bae0){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x538664=_0x1fc8,_0x3def7d=new client_s3_1[(_0x538664(0x1ea))]({'Bucket':this[_0x538664(0x1f1)]['bucketName'],'Key':_0x32bae0,'RestoreRequest':{'Days':0x1,'GlacierJobParameters':{'Tier':this['restoreType']}}});yield this[_0x538664(0x209)][_0x538664(0x205)](_0x3def7d);});}[_0x3085b9(0x1dc)](_0xeb298){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x461ffd=_0x1fc8,_0x250b2e=new client_s3_1['GetObjectCommand']({'Bucket':this['credentials'][_0x461ffd(0x1f7)],'Key':_0xeb298,'ResponseContentType':_0x461ffd(0x208)}),{Body:_0x36f807}=yield this['s3Client'][_0x461ffd(0x205)](_0x250b2e);if(_0x36f807 instanceof stream_1[_0x461ffd(0x1f0)])return _0x36f807;throw new Error(_0x461ffd(0x1e4));});}[_0x3085b9(0x1ff)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x32fdda=_0x1fc8;yield this[_0x32fdda(0x215)](),yield this['runRestoreFiles'](),this[_0x32fdda(0x1fe)]=retrieve_status_enum_1[_0x32fdda(0x1f9)]['InProgress'],this['checkFilesRetrieveStatus']()[_0x32fdda(0x217)](_0x5bb855=>{const _0x4862c2=_0x32fdda;this[_0x4862c2(0x1fe)]=retrieve_status_enum_1[_0x4862c2(0x1f9)]['Exception'],this[_0x4862c2(0x1dd)]=_0x5bb855[_0x4862c2(0x210)];});});}['tryRestoreFilesFromCloud'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xe33aca=_0x1fc8,_0x11a4d6=yield aws_s3_utils_1[_0xe33aca(0x211)][_0xe33aca(0x1f2)](this[_0xe33aca(0x20f)],this[_0xe33aca(0x1f1)][_0xe33aca(0x1f7)],this[_0xe33aca(0x209)]);for(const _0x2e4798 of _0x11a4d6){const _0x496305=yield this[_0xe33aca(0x207)](_0x2e4798);this[_0xe33aca(0x22a)]['push']({'path':_0x2e4798,'class':_0x496305['StorageClass']||_0xe33aca(0x224),'status':aws_s3_utils_1[_0xe33aca(0x211)]['extractFileRetrieveStatusFromFileInfo'](_0x496305)});}});}[_0x3085b9(0x1e3)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3fadd3=_0x1fc8,_0x169884=this['files'][_0x3fadd3(0x230)](_0x4b3c52=>_0x4b3c52[_0x3fadd3(0x1fe)]===aws_types_1[_0x3fadd3(0x220)]['NeedRestore']);for(const _0x50d2f7 of _0x169884){yield this[_0x3fadd3(0x200)](_0x50d2f7[_0x3fadd3(0x20f)]),_0x50d2f7[_0x3fadd3(0x1fe)]=aws_types_1[_0x3fadd3(0x220)][_0x3fadd3(0x221)];}});}[_0x3085b9(0x20c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xdb6d3d=_0x1fc8,_0x57339d=this[_0xdb6d3d(0x22a)][_0xdb6d3d(0x230)](_0x419e08=>_0x419e08[_0xdb6d3d(0x1fe)]===aws_types_1[_0xdb6d3d(0x220)][_0xdb6d3d(0x221)]);for(const _0x5f2dd8 of _0x57339d){const _0x558de3=yield this['fetchFileInfo'](_0x5f2dd8['path']);_0x5f2dd8[_0xdb6d3d(0x1fe)]=aws_s3_utils_1[_0xdb6d3d(0x211)][_0xdb6d3d(0x20a)](_0x558de3);}});}['checkFilesRetrieveStatus'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x133dc6=_0x1fc8,_0x1dd916=this['files'][_0x133dc6(0x204)](_0x2f61ab=>_0x2f61ab['status']===aws_types_1[_0x133dc6(0x220)]['Restoring']);this[_0x133dc6(0x1fe)]=_0x1dd916?retrieve_status_enum_1[_0x133dc6(0x1f9)][_0x133dc6(0x229)]:retrieve_status_enum_1[_0x133dc6(0x1f9)][_0x133dc6(0x1e6)],_0x1dd916&&(yield(0x0,promises_1[_0x133dc6(0x20d)])(this[_0x133dc6(0x22f)]),yield this[_0x133dc6(0x20c)](),yield this[_0x133dc6(0x225)]());});}[_0x3085b9(0x21c)](_0x3ca5c6){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x45051d=_0x1fc8,_0x3301e4=path_2['default']['join'](this[_0x45051d(0x1ee)],(0x0,crypto_1[_0x45051d(0x201)])());yield(0x0,promises_2[_0x45051d(0x1f8)])(_0x3301e4,_0x3ca5c6);const _0x22de0e=(0x0,fs_1[_0x45051d(0x1fb)])(_0x3301e4);return _0x22de0e['on'](_0x45051d(0x1ec),()=>(0x0,promises_2['rm'])(_0x3301e4)),_0x22de0e;});}}exports['AwsS3Retrieve']=AwsS3Retrieve;
|
|
1
|
+
'use strict';const _0x1c0b0f=_0x541d;(function(_0x89d84f,_0x409d9c){const _0x10a3ad=_0x541d,_0x235120=_0x89d84f();while(!![]){try{const _0x2dc775=parseInt(_0x10a3ad(0x10d))/0x1+parseInt(_0x10a3ad(0xfe))/0x2+parseInt(_0x10a3ad(0xe7))/0x3*(parseInt(_0x10a3ad(0xd9))/0x4)+parseInt(_0x10a3ad(0xf8))/0x5+-parseInt(_0x10a3ad(0xde))/0x6+parseInt(_0x10a3ad(0x10c))/0x7*(-parseInt(_0x10a3ad(0xc1))/0x8)+-parseInt(_0x10a3ad(0x10f))/0x9;if(_0x2dc775===_0x409d9c)break;else _0x235120['push'](_0x235120['shift']());}catch(_0x5633d5){_0x235120['push'](_0x235120['shift']());}}}(_0x5dcd,0x4236a));function _0x541d(_0x29a0f1,_0x104125){const _0x5dcd1d=_0x5dcd();return _0x541d=function(_0x541d95,_0x373a1e){_0x541d95=_0x541d95-0xc0;let _0x1e3e6e=_0x5dcd1d[_0x541d95];return _0x1e3e6e;},_0x541d(_0x29a0f1,_0x104125);}var __awaiter=this&&this[_0x1c0b0f(0xe0)]||function(_0xe90d6f,_0x1fb0aa,_0x3258ff,_0x5be083){function _0x554116(_0x487b53){return _0x487b53 instanceof _0x3258ff?_0x487b53:new _0x3258ff(function(_0x2e9c55){_0x2e9c55(_0x487b53);});}return new(_0x3258ff||(_0x3258ff=Promise))(function(_0x4475bd,_0x50ab4e){const _0x2e8fdf=_0x541d;function _0x42aa17(_0x2a9131){const _0x538b42=_0x541d;try{_0x4137a6(_0x5be083[_0x538b42(0xe6)](_0x2a9131));}catch(_0x4782b1){_0x50ab4e(_0x4782b1);}}function _0x13124f(_0x4e16d2){const _0x4a4c1a=_0x541d;try{_0x4137a6(_0x5be083[_0x4a4c1a(0x10e)](_0x4e16d2));}catch(_0x4e12a5){_0x50ab4e(_0x4e12a5);}}function _0x4137a6(_0x3a9b00){const _0x18197d=_0x541d;_0x3a9b00[_0x18197d(0xf9)]?_0x4475bd(_0x3a9b00[_0x18197d(0xce)]):_0x554116(_0x3a9b00[_0x18197d(0xce)])['then'](_0x42aa17,_0x13124f);}_0x4137a6((_0x5be083=_0x5be083[_0x2e8fdf(0xf1)](_0xe90d6f,_0x1fb0aa||[]))[_0x2e8fdf(0xe6)]());});},__importDefault=this&&this[_0x1c0b0f(0xeb)]||function(_0x2a3844){const _0xa0ea0a=_0x1c0b0f;return _0x2a3844&&_0x2a3844[_0xa0ea0a(0xfd)]?_0x2a3844:{'default':_0x2a3844};};function _0x5dcd(){const _0x3da156=['join','RetrieveStatus','682145djsMFH','done','posix','path','STANDARD','__esModule','1015210xcCssE','fetchFileInfo','../utils/aws-s3.utils','errorMessage','sep','crypto','waitUtilRetrieveDone','AwsS3Retrieve','No\x20files\x20left\x20to\x20execute.','send','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','AwsS3Utils','InProgress','message','14ewMpfT','113359nSjNED','throw','3638547DcOCDx','shift','init','Body\x20is\x20not\x20supported\x20type','timers/promises','tryRestoreFilesFromCloud','218912MKEqwG','restoreFile','credentials','RestoreObjectCommand','fs/promises','execute','createCacheFileStream','region','length','StorageClass','some','split','close','value','restoreType','Restoring','NeedRestore','GetObjectCommand','extractFileRetrieveStatusFromFileInfo','../types/aws.types','fetchFileBody','cachePath','bucketName','push','1876460pOqiuM','RETRIEVE_STATUS_CHECK_TIMEOUT','S3Client','updateFilesRetrieveStatus','randomUUID','2977722rFIcOs','filter','__awaiter','AwsFileRetrieveStatus','checkFilesRetrieveStatus','BaseRetrieve','@aws-sdk/client-s3','CHECK_RESTORED_TIMEOUT','next','3gMGUMS','stream','runRestoreFiles','Uninitialized','__importDefault','default','defineProperty','isDone','files','writeFile','apply','catch','s3Client','status','setTimeout'];_0x5dcd=function(){return _0x3da156;};return _0x5dcd();}Object[_0x1c0b0f(0xed)](exports,_0x1c0b0f(0xfd),{'value':!![]}),exports[_0x1c0b0f(0x105)]=void 0x0;const path_1=__importDefault(require(_0x1c0b0f(0xfb))),promises_1=require(_0x1c0b0f(0x113)),aws_s3_utils_1=require(_0x1c0b0f(0x100)),_1=require('./'),aws_types_1=require(_0x1c0b0f(0xd4)),retrieve_status_enum_1=require('../types/retrieve-status.enum'),stream_1=require('stream'),path_2=__importDefault(require(_0x1c0b0f(0xfb))),crypto_1=require(_0x1c0b0f(0x103)),promises_2=require(_0x1c0b0f(0xc5)),fs_1=require('fs'),client_s3_1=require(_0x1c0b0f(0xe4)),init_1=require('../init');class AwsS3Retrieve extends _1[_0x1c0b0f(0xe3)]{constructor(_0x4217ab,_0x5cf011,_0x37cd3f,_0x161202){const _0x1dbe49=_0x1c0b0f,_0x409a4e=_0x5cf011[_0x1dbe49(0xcc)](path_1[_0x1dbe49(0xec)]['sep'])['join'](path_1[_0x1dbe49(0xec)][_0x1dbe49(0xfa)][_0x1dbe49(0x102)]);super(_0x4217ab,_0x409a4e),this['restoreType']=_0x37cd3f,this[_0x1dbe49(0xd6)]=_0x161202,this[_0x1dbe49(0xe5)]=0x7530,this[_0x1dbe49(0xda)]=0x3e8,this[_0x1dbe49(0xf3)]=new client_s3_1[(_0x1dbe49(0xdb))]({'region':this[_0x1dbe49(0xc3)][_0x1dbe49(0xc8)],'credentials':{'accessKeyId':this[_0x1dbe49(0xc3)]['accessKeyId'],'secretAccessKey':this[_0x1dbe49(0xc3)]['secretAccessKey']},'requestHandler':new init_1['HttpHandler']()}),this[_0x1dbe49(0xef)]=[];}['waitUtilRetrieveDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3002d7=_0x541d;this[_0x3002d7(0xf4)]===retrieve_status_enum_1['RetrieveStatus'][_0x3002d7(0xea)]&&(yield this[_0x3002d7(0x111)](),yield this[_0x3002d7(0x104)]());switch(this[_0x3002d7(0xf4)]){case retrieve_status_enum_1[_0x3002d7(0xf7)][_0x3002d7(0x10a)]:yield(0x0,promises_1[_0x3002d7(0xf5)])(this['RETRIEVE_STATUS_CHECK_TIMEOUT']),yield this['waitUtilRetrieveDone']();break;case retrieve_status_enum_1['RetrieveStatus']['Exception']:throw new Error(this[_0x3002d7(0x101)]);}});}[_0x1c0b0f(0xc6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1add77=_0x541d;if(this[_0x1add77(0xf4)]===retrieve_status_enum_1[_0x1add77(0xf7)]['InProgress'])throw new Error(_0x1add77(0x108));if(this[_0x1add77(0xee)]||!this[_0x1add77(0xef)][_0x1add77(0xc9)])throw new Error(_0x1add77(0x106));const _0xf60032=this[_0x1add77(0xef)][_0x1add77(0x110)]();let _0x216b8b;return!this[_0x1add77(0xd6)]?_0x216b8b=yield this[_0x1add77(0xd5)](_0xf60032[_0x1add77(0xfb)]):_0x216b8b=yield this[_0x1add77(0xc7)](yield this[_0x1add77(0xd5)](_0xf60032[_0x1add77(0xfb)])),this['isDone']=!this[_0x1add77(0xef)][_0x1add77(0xc9)],{'path':this[_0x1add77(0xfb)][_0x1add77(0xcc)](path_1[_0x1add77(0xec)]['posix'][_0x1add77(0x102)])[_0x1add77(0xf6)](path_1[_0x1add77(0xec)][_0x1add77(0x102)]),'content':_0x216b8b};});}['fetchFileInfo'](_0x6a9091){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4f2903=_0x541d,_0x3dee95=new client_s3_1['HeadObjectCommand']({'Bucket':this[_0x4f2903(0xc3)]['bucketName'],'Key':_0x6a9091}),{StorageClass:_0x2d2c6e,Restore:_0x461618}=yield this[_0x4f2903(0xf3)][_0x4f2903(0x107)](_0x3dee95);return{'StorageClass':_0x2d2c6e,'Restore':_0x461618};});}[_0x1c0b0f(0xc2)](_0x5663b7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xe260fa=_0x541d,_0x20ea4d=new client_s3_1[(_0xe260fa(0xc4))]({'Bucket':this['credentials'][_0xe260fa(0xd7)],'Key':_0x5663b7,'RestoreRequest':{'Days':0x1,'GlacierJobParameters':{'Tier':this[_0xe260fa(0xcf)]}}});yield this[_0xe260fa(0xf3)][_0xe260fa(0x107)](_0x20ea4d);});}['fetchFileBody'](_0x2a3a06){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x23cca9=_0x541d,_0x450a97=new client_s3_1[(_0x23cca9(0xd2))]({'Bucket':this[_0x23cca9(0xc3)][_0x23cca9(0xd7)],'Key':_0x2a3a06,'ResponseContentType':_0x23cca9(0xe8)}),{Body:_0x35216d}=yield this[_0x23cca9(0xf3)][_0x23cca9(0x107)](_0x450a97);if(_0x35216d instanceof stream_1['Readable'])return _0x35216d;throw new Error(_0x23cca9(0x112));});}['init'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x139786=_0x541d;yield this['tryRestoreFilesFromCloud'](),yield this[_0x139786(0xe9)](),this[_0x139786(0xf4)]=retrieve_status_enum_1[_0x139786(0xf7)][_0x139786(0x10a)],this[_0x139786(0xe2)]()[_0x139786(0xf2)](_0xdca461=>{const _0x3111b7=_0x139786;this[_0x3111b7(0xf4)]=retrieve_status_enum_1[_0x3111b7(0xf7)]['Exception'],this[_0x3111b7(0x101)]=_0xdca461[_0x3111b7(0x10b)];});});}[_0x1c0b0f(0xc0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4feb82=_0x541d,_0x1f3488=yield aws_s3_utils_1[_0x4feb82(0x109)]['getFilesPaths'](this[_0x4feb82(0xfb)],this[_0x4feb82(0xc3)][_0x4feb82(0xd7)],this[_0x4feb82(0xf3)]);for(const _0x54b0f0 of _0x1f3488){const _0x12375e=yield this[_0x4feb82(0xff)](_0x54b0f0);this['files'][_0x4feb82(0xd8)]({'path':_0x54b0f0,'class':_0x12375e[_0x4feb82(0xca)]||_0x4feb82(0xfc),'status':aws_s3_utils_1[_0x4feb82(0x109)][_0x4feb82(0xd3)](_0x12375e)});}});}['runRestoreFiles'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x540b37=_0x541d,_0x4beb01=this[_0x540b37(0xef)][_0x540b37(0xdf)](_0xab4e5f=>_0xab4e5f[_0x540b37(0xf4)]===aws_types_1['AwsFileRetrieveStatus'][_0x540b37(0xd1)]);for(const _0x546a86 of _0x4beb01){yield this[_0x540b37(0xc2)](_0x546a86['path']),_0x546a86[_0x540b37(0xf4)]=aws_types_1['AwsFileRetrieveStatus'][_0x540b37(0xd0)];}});}['updateFilesRetrieveStatus'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xae2a21=_0x541d,_0x23b47a=this[_0xae2a21(0xef)][_0xae2a21(0xdf)](_0x4a0893=>_0x4a0893[_0xae2a21(0xf4)]===aws_types_1[_0xae2a21(0xe1)][_0xae2a21(0xd0)]);for(const _0x5d67c3 of _0x23b47a){const _0x685239=yield this[_0xae2a21(0xff)](_0x5d67c3[_0xae2a21(0xfb)]);_0x5d67c3[_0xae2a21(0xf4)]=aws_s3_utils_1[_0xae2a21(0x109)][_0xae2a21(0xd3)](_0x685239);}});}['checkFilesRetrieveStatus'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2551be=_0x541d,_0x10d9ac=this['files'][_0x2551be(0xcb)](_0x4b156c=>_0x4b156c[_0x2551be(0xf4)]===aws_types_1[_0x2551be(0xe1)]['Restoring']);this[_0x2551be(0xf4)]=_0x10d9ac?retrieve_status_enum_1[_0x2551be(0xf7)][_0x2551be(0x10a)]:retrieve_status_enum_1[_0x2551be(0xf7)]['Completed'],_0x10d9ac&&(yield(0x0,promises_1['setTimeout'])(this[_0x2551be(0xe5)]),yield this[_0x2551be(0xdc)](),yield this[_0x2551be(0xe2)]());});}[_0x1c0b0f(0xc7)](_0x15ef23){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2ef2d2=_0x541d,_0x161ed2=path_2[_0x2ef2d2(0xec)]['join'](this[_0x2ef2d2(0xd6)],(0x0,crypto_1[_0x2ef2d2(0xdd)])());yield(0x0,promises_2[_0x2ef2d2(0xf0)])(_0x161ed2,_0x15ef23);const _0x25b011=(0x0,fs_1['createReadStream'])(_0x161ed2);return _0x25b011['on'](_0x2ef2d2(0xcd),()=>(0x0,promises_2['rm'])(_0x161ed2)),_0x25b011;});}}exports[_0x1c0b0f(0x105)]=AwsS3Retrieve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x5bd925=_0x1999;function _0x2e71(){const _0x3e49b4=['12358440WmjIjO','15PXeUuA','441tJMAGj','../types/retrieve-status.enum','getIsDone','RetrieveStatus','845673HjpVJL','20340TOuYZp','Uninitialized','2534900WYPSQD','992WYcPjq','1808AkMqIY','isDone','__esModule','1117686Bewruz','BaseRetrieve','defineProperty','5034694RWYIrz'];_0x2e71=function(){return _0x3e49b4;};return _0x2e71();}(function(_0x8038d8,_0x2e97dd){const _0x3396af=_0x1999,_0x1bfa1f=_0x8038d8();while(!![]){try{const _0x4e3e6d=parseInt(_0x3396af(0x1ab))/0x1*(-parseInt(_0x3396af(0x1a2))/0x2)+parseInt(_0x3396af(0x19d))/0x3+-parseInt(_0x3396af(0x1a0))/0x4+-parseInt(_0x3396af(0x1aa))/0x5*(parseInt(_0x3396af(0x1a5))/0x6)+parseInt(_0x3396af(0x1a8))/0x7+-parseInt(_0x3396af(0x1a1))/0x8*(parseInt(_0x3396af(0x19e))/0x9)+parseInt(_0x3396af(0x1a9))/0xa;if(_0x4e3e6d===_0x2e97dd)break;else _0x1bfa1f['push'](_0x1bfa1f['shift']());}catch(_0x5adfe5){_0x1bfa1f['push'](_0x1bfa1f['shift']());}}}(_0x2e71,0x593c1));Object[_0x5bd925(0x1a7)](exports,_0x5bd925(0x1a4),{'value':!![]}),exports[_0x5bd925(0x1a6)]=void 0x0;function _0x1999(_0x3948f6,_0x42dc65){const _0x2e7134=_0x2e71();return _0x1999=function(_0x1999cf,_0x1fb76c){_0x1999cf=_0x1999cf-0x19d;let _0x270168=_0x2e7134[_0x1999cf];return _0x270168;},_0x1999(_0x3948f6,_0x42dc65);}const retrieve_status_enum_1=require(_0x5bd925(0x1ac));class BaseRetrieve{constructor(_0x32f21f,_0x67b89b){const _0x3fede1=_0x5bd925;this['credentials']=_0x32f21f,this['path']=_0x67b89b,this[_0x3fede1(0x1a3)]=![],this['status']=retrieve_status_enum_1[_0x3fede1(0x1ae)][_0x3fede1(0x19f)];}[_0x5bd925(0x1ad)](){const _0x47047e=_0x5bd925;return this[_0x47047e(0x1a3)];}}exports[_0x5bd925(0x1a6)]=BaseRetrieve;
|
package/dist/retrieve/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x1b38cb=_0x5424;(function(_0x18b3f8,_0x43ef82){var _0x161ea6=_0x5424,_0x2798a9=_0x18b3f8();while(!![]){try{var _0x11f3ff=parseInt(_0x161ea6(0x1c1))/0x1+-parseInt(_0x161ea6(0x1c0))/0x2+-parseInt(_0x161ea6(0x1ca))/0x3*(parseInt(_0x161ea6(0x1bd))/0x4)+-parseInt(_0x161ea6(0x1cb))/0x5*(-parseInt(_0x161ea6(0x1c3))/0x6)+parseInt(_0x161ea6(0x1c4))/0x7+parseInt(_0x161ea6(0x1c6))/0x8+parseInt(_0x161ea6(0x1be))/0x9*(-parseInt(_0x161ea6(0x1c5))/0xa);if(_0x11f3ff===_0x43ef82)break;else _0x2798a9['push'](_0x2798a9['shift']());}catch(_0x4da886){_0x2798a9['push'](_0x2798a9['shift']());}}}(_0x549b,0x88807));Object[_0x1b38cb(0x1c9)](exports,'__esModule',{'value':!![]}),exports[_0x1b38cb(0x1c8)]=exports['LocalRetrieve']=exports[_0x1b38cb(0x1c2)]=exports['BaseRetrieve']=void 0x0;var base_retrieve_1=require('./base-retrieve');Object[_0x1b38cb(0x1c9)](exports,_0x1b38cb(0x1bf),{'enumerable':!![],'get':function(){var _0x34a449=_0x1b38cb;return base_retrieve_1[_0x34a449(0x1bf)];}});var aws_s3_retrieve_1=require('./aws-s3-retrieve');Object[_0x1b38cb(0x1c9)](exports,_0x1b38cb(0x1c2),{'enumerable':!![],'get':function(){var _0x24fb27=_0x1b38cb;return aws_s3_retrieve_1[_0x24fb27(0x1c2)];}});function _0x5424(_0x3a1b8e,_0x13a292){var _0x549b40=_0x549b();return _0x5424=function(_0x5424fc,_0x12b7ed){_0x5424fc=_0x5424fc-0x1bb;var _0x1f1675=_0x549b40[_0x5424fc];return _0x1f1675;},_0x5424(_0x3a1b8e,_0x13a292);}var local_retrieve_1=require(_0x1b38cb(0x1bc));Object[_0x1b38cb(0x1c9)](exports,_0x1b38cb(0x1c7),{'enumerable':!![],'get':function(){var _0x3c06a6=_0x1b38cb;return local_retrieve_1[_0x3c06a6(0x1c7)];}});function _0x549b(){var _0x2e4fc8=['defineProperty','9mmHNLP','2720455aWTquK','./aws-s3-import-helper','./local-retrieve','566756CytyZf','4800420WGQTcO','BaseRetrieve','273382bOQbyB','962172BYbiJQ','AwsS3Retrieve','12jMLwOh','7756952epPIjn','50oWXmHh','5034232sPDxxk','LocalRetrieve','AwsS3ImportHelper'];_0x549b=function(){return _0x2e4fc8;};return _0x549b();}var aws_s3_import_helper_1=require(_0x1b38cb(0x1bb));Object[_0x1b38cb(0x1c9)](exports,_0x1b38cb(0x1c8),{'enumerable':!![],'get':function(){var _0x1b5350=_0x1b38cb;return aws_s3_import_helper_1[_0x1b5350(0x1c8)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x3b7487=_0x355d;(function(_0x5273a0,_0x25330d){const _0x52747e=_0x355d,_0x54a4fe=_0x5273a0();while(!![]){try{const _0x3371e3=-parseInt(_0x52747e(0x10c))/0x1*(parseInt(_0x52747e(0x10e))/0x2)+parseInt(_0x52747e(0xfe))/0x3*(parseInt(_0x52747e(0x116))/0x4)+parseInt(_0x52747e(0x111))/0x5+-parseInt(_0x52747e(0x117))/0x6+-parseInt(_0x52747e(0x10d))/0x7+-parseInt(_0x52747e(0x10f))/0x8*(-parseInt(_0x52747e(0xfc))/0x9)+parseInt(_0x52747e(0x10a))/0xa;if(_0x3371e3===_0x25330d)break;else _0x54a4fe['push'](_0x54a4fe['shift']());}catch(_0x561049){_0x54a4fe['push'](_0x54a4fe['shift']());}}}(_0x586d,0x915e5));function _0x586d(){const _0x3be0af=['LocalRetrieve','then','value','36HoWxgD','@flosum/utils','245409vzqSXn','shift','FsUtils','createReadStream','RetrieveStatus','readFilesToRetrieve','throw','__esModule','../types/retrieve-status.enum','getFolderFiles','path','done','8627460CAGlRv','BaseRetrieve','93031fPxmPb','6856465TmVKjd','4uidASF','704248fLuslI','filesPaths','4635350CkJMzy','isDone','defineProperty','next','waitUtilRetrieveDone','28qHlpEx','5721450PzXHfD','apply','Uninitialized'];_0x586d=function(){return _0x3be0af;};return _0x586d();}var __awaiter=this&&this['__awaiter']||function(_0x58075b,_0x1b9e59,_0x351f4b,_0xfe8065){function _0x31eb2c(_0x433f37){return _0x433f37 instanceof _0x351f4b?_0x433f37:new _0x351f4b(function(_0xd49947){_0xd49947(_0x433f37);});}return new(_0x351f4b||(_0x351f4b=Promise))(function(_0x3185ea,_0x75924f){const _0x32a80b=_0x355d;function _0x155bb6(_0x475fa8){const _0x3a7e99=_0x355d;try{_0xe2a70e(_0xfe8065[_0x3a7e99(0x114)](_0x475fa8));}catch(_0x5499f6){_0x75924f(_0x5499f6);}}function _0x2226b4(_0x15851c){const _0x22fc48=_0x355d;try{_0xe2a70e(_0xfe8065[_0x22fc48(0x104)](_0x15851c));}catch(_0x2b35e8){_0x75924f(_0x2b35e8);}}function _0xe2a70e(_0x2164a1){const _0x4750bb=_0x355d;_0x2164a1[_0x4750bb(0x109)]?_0x3185ea(_0x2164a1['value']):_0x31eb2c(_0x2164a1[_0x4750bb(0x11c)])[_0x4750bb(0x11b)](_0x155bb6,_0x2226b4);}_0xe2a70e((_0xfe8065=_0xfe8065[_0x32a80b(0x118)](_0x58075b,_0x1b9e59||[]))['next']());});};function _0x355d(_0x3883c6,_0x255c9f){const _0x586d00=_0x586d();return _0x355d=function(_0x355df0,_0x41da8e){_0x355df0=_0x355df0-0xfc;let _0x5a1ac5=_0x586d00[_0x355df0];return _0x5a1ac5;},_0x355d(_0x3883c6,_0x255c9f);}Object[_0x3b7487(0x113)](exports,_0x3b7487(0x105),{'value':!![]}),exports[_0x3b7487(0x11a)]=void 0x0;const fs_1=require('fs'),utils_1=require(_0x3b7487(0xfd)),_1=require('./'),retrieve_status_enum_1=require(_0x3b7487(0x106));class LocalRetrieve extends _1[_0x3b7487(0x10b)]{constructor(){const _0x56977d=_0x3b7487;super(...arguments),this[_0x56977d(0x110)]=[];}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3447a0=_0x355d,_0x5a8acf=this[_0x3447a0(0x110)][_0x3447a0(0xff)](),_0x3c4996=(0x0,fs_1[_0x3447a0(0x101)])(_0x5a8acf);return this[_0x3447a0(0x112)]=!this[_0x3447a0(0x110)]['length'],{'path':_0x5a8acf,'content':_0x3c4996};});}[_0x3b7487(0x103)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x34c7b6=_0x355d;this[_0x34c7b6(0x110)]=yield utils_1[_0x34c7b6(0x100)][_0x34c7b6(0x107)](this[_0x34c7b6(0x108)]);});}[_0x3b7487(0x115)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2b0f72=_0x355d;this['status']===retrieve_status_enum_1[_0x2b0f72(0x102)][_0x2b0f72(0x119)]&&(yield this['readFilesToRetrieve'](),this['status']=retrieve_status_enum_1['RetrieveStatus']['Completed']);});}}exports[_0x3b7487(0x11a)]=LocalRetrieve;
|
package/dist/types/aws.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x38f7bf=_0xb3e5;(function(_0x3c42be,_0x2dcbf3){var _0x546fc9=_0xb3e5,_0x4518f2=_0x3c42be();while(!![]){try{var _0x19cf66=parseInt(_0x546fc9(0x1ef))/0x1*(parseInt(_0x546fc9(0x1ea))/0x2)+-parseInt(_0x546fc9(0x1e8))/0x3*(-parseInt(_0x546fc9(0x1e7))/0x4)+parseInt(_0x546fc9(0x1e4))/0x5*(-parseInt(_0x546fc9(0x1df))/0x6)+-parseInt(_0x546fc9(0x1e3))/0x7+-parseInt(_0x546fc9(0x1e6))/0x8+-parseInt(_0x546fc9(0x1eb))/0x9*(-parseInt(_0x546fc9(0x1ec))/0xa)+-parseInt(_0x546fc9(0x1e1))/0xb*(parseInt(_0x546fc9(0x1e0))/0xc);if(_0x19cf66===_0x2dcbf3)break;else _0x4518f2['push'](_0x4518f2['shift']());}catch(_0x7145b3){_0x4518f2['push'](_0x4518f2['shift']());}}}(_0xce0d,0x1c38a));Object['defineProperty'](exports,_0x38f7bf(0x1ed),{'value':!![]}),exports[_0x38f7bf(0x1e9)]=void 0x0;function _0xb3e5(_0x2b8cce,_0x544ebe){var _0xce0d9a=_0xce0d();return _0xb3e5=function(_0xb3e589,_0x228b21){_0xb3e589=_0xb3e589-0x1df;var _0x48a56d=_0xce0d9a[_0xb3e589];return _0x48a56d;},_0xb3e5(_0x2b8cce,_0x544ebe);}function _0xce0d(){var _0x5727ff=['1DMqMaO','450MiJcLm','508476XoPQZo','11DjtXql','Restoring','824285UZIHPZ','7525NhIrLi','Available','584424wiRfee','9340poSLiB','267aDoxJJ','AwsFileRetrieveStatus','314692dCedUR','12231RXGDcL','710JZLoRS','__esModule','NeedRestore'];_0xce0d=function(){return _0x5727ff;};return _0xce0d();}var AwsFileRetrieveStatus;(function(_0x127352){var _0x18c0f8=_0x38f7bf;_0x127352[_0x18c0f8(0x1e5)]=_0x18c0f8(0x1e5),_0x127352['Restoring']=_0x18c0f8(0x1e2),_0x127352[_0x18c0f8(0x1ee)]=_0x18c0f8(0x1ee);}(AwsFileRetrieveStatus=exports[_0x38f7bf(0x1e9)]||(exports[_0x38f7bf(0x1e9)]={})));
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x1d1dc4=_0x2c6f;(function(_0x494d90,_0x30c3c8){var _0x345899=_0x2c6f,_0x5f4d02=_0x494d90();while(!![]){try{var _0x127e0f=-parseInt(_0x345899(0x10e))/0x1+parseInt(_0x345899(0x10d))/0x2*(parseInt(_0x345899(0x10b))/0x3)+-parseInt(_0x345899(0x10a))/0x4*(parseInt(_0x345899(0x108))/0x5)+parseInt(_0x345899(0x111))/0x6+-parseInt(_0x345899(0x109))/0x7*(-parseInt(_0x345899(0x106))/0x8)+-parseInt(_0x345899(0x110))/0x9+parseInt(_0x345899(0x10c))/0xa;if(_0x127e0f===_0x30c3c8)break;else _0x5f4d02['push'](_0x5f4d02['shift']());}catch(_0x106ca2){_0x5f4d02['push'](_0x5f4d02['shift']());}}}(_0xbe57,0x9ddd3));Object['defineProperty'](exports,_0x1d1dc4(0x105),{'value':!![]}),exports[_0x1d1dc4(0x107)]=void 0x0;var storage_type_enum_1=require(_0x1d1dc4(0x10f));Object[_0x1d1dc4(0x104)](exports,_0x1d1dc4(0x107),{'enumerable':!![],'get':function(){var _0x4e7942=_0x1d1dc4;return storage_type_enum_1[_0x4e7942(0x107)];}});function _0x2c6f(_0x286c55,_0x6d2069){var _0xbe57fd=_0xbe57();return _0x2c6f=function(_0x2c6fdd,_0x3dcd95){_0x2c6fdd=_0x2c6fdd-0x104;var _0x3ef5fc=_0xbe57fd[_0x2c6fdd];return _0x3ef5fc;},_0x2c6f(_0x286c55,_0x6d2069);}function _0xbe57(){var _0x159dda=['6968008zlVkqN','StorageType','10750GWwPIV','7cqQLml','2128dUBOMc','33DyvyYF','4028220QkRGmF','105052sHsOTi','15299WvmoIv','./storage-type.enum','4504860sQmtqs','2727846unLcMB','defineProperty','__esModule'];_0xbe57=function(){return _0x159dda;};return _0xbe57();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x371c(){var _0x287496=['10UVjnlm','defineProperty','14135671tcfFPh','15698320wrrgru','__esModule','14ejImYZ','8129445pDeSJM','1074540JFemzQ','2525448vUVoyx','4ipXWmc','18054xomXqf','375749doFNhx','6352uOSGPI'];_0x371c=function(){return _0x287496;};return _0x371c();}var _0x1b30b4=_0x1fac;(function(_0x4160cb,_0x245ccb){var _0xdc41b9=_0x1fac,_0x5c778f=_0x4160cb();while(!![]){try{var _0x363b85=-parseInt(_0xdc41b9(0x18b))/0x1*(-parseInt(_0xdc41b9(0x18d))/0x2)+-parseInt(_0xdc41b9(0x188))/0x3*(parseInt(_0xdc41b9(0x189))/0x4)+parseInt(_0xdc41b9(0x186))/0x5+parseInt(_0xdc41b9(0x187))/0x6*(-parseInt(_0xdc41b9(0x185))/0x7)+-parseInt(_0xdc41b9(0x18c))/0x8*(parseInt(_0xdc41b9(0x18a))/0x9)+parseInt(_0xdc41b9(0x190))/0xa+-parseInt(_0xdc41b9(0x18f))/0xb;if(_0x363b85===_0x245ccb)break;else _0x5c778f['push'](_0x5c778f['shift']());}catch(_0x10b1c1){_0x5c778f['push'](_0x5c778f['shift']());}}}(_0x371c,0xf3525));function _0x1fac(_0x1a76cb,_0x401c46){var _0x371c4b=_0x371c();return _0x1fac=function(_0x1faca8,_0x6881a4){_0x1faca8=_0x1faca8-0x184;var _0x2ca030=_0x371c4b[_0x1faca8];return _0x2ca030;},_0x1fac(_0x1a76cb,_0x401c46);}Object[_0x1b30b4(0x18e)](exports,_0x1b30b4(0x184),{'value':!![]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x359c80=_0x4e7f;(function(_0x9f7767,_0x23d419){var _0x589aaa=_0x4e7f,_0x15f195=_0x9f7767();while(!![]){try{var _0x11c1cd=-parseInt(_0x589aaa(0xef))/0x1*(-parseInt(_0x589aaa(0xe2))/0x2)+parseInt(_0x589aaa(0xe7))/0x3+parseInt(_0x589aaa(0xe0))/0x4*(-parseInt(_0x589aaa(0xed))/0x5)+parseInt(_0x589aaa(0xea))/0x6*(parseInt(_0x589aaa(0xe3))/0x7)+parseInt(_0x589aaa(0xe4))/0x8*(-parseInt(_0x589aaa(0xf4))/0x9)+-parseInt(_0x589aaa(0xe8))/0xa*(parseInt(_0x589aaa(0xf2))/0xb)+-parseInt(_0x589aaa(0xe5))/0xc*(parseInt(_0x589aaa(0xe1))/0xd);if(_0x11c1cd===_0x23d419)break;else _0x15f195['push'](_0x15f195['shift']());}catch(_0x531234){_0x15f195['push'](_0x15f195['shift']());}}}(_0x2b68,0x6992c));function _0x2b68(){var _0x17915f=['383511ofnuUw','10LwAQDv','RetrieveStatus','350850SMlynR','InProgress','Uninitialized','65DlSlMZ','defineProperty','3WqQhNY','__esModule','In\x20Progress','1540803lkrZnr','Exception','117RwyweZ','37412QMaazA','156fRuUfY','346910vvoPCR','91UipqjW','154744RQzads','462828sriwMQ','Completed'];_0x2b68=function(){return _0x17915f;};return _0x2b68();}Object[_0x359c80(0xee)](exports,_0x359c80(0xf0),{'value':!![]}),exports[_0x359c80(0xe9)]=void 0x0;var RetrieveStatus;function _0x4e7f(_0x112ef4,_0x4f6607){var _0x2b68c1=_0x2b68();return _0x4e7f=function(_0x4e7fe7,_0x1889b4){_0x4e7fe7=_0x4e7fe7-0xe0;var _0x237f61=_0x2b68c1[_0x4e7fe7];return _0x237f61;},_0x4e7f(_0x112ef4,_0x4f6607);}(function(_0x20c84c){var _0x1099b5=_0x359c80;_0x20c84c[_0x1099b5(0xec)]=_0x1099b5(0xec),_0x20c84c[_0x1099b5(0xeb)]=_0x1099b5(0xf1),_0x20c84c['Completed']=_0x1099b5(0xe6),_0x20c84c[_0x1099b5(0xf3)]='Exception';}(RetrieveStatus=exports[_0x359c80(0xe9)]||(exports[_0x359c80(0xe9)]={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x47b5c1=_0x1c05;function _0x1e6d(){var _0x309b64=['__esModule','AWS_S3','780093rgvdXh','Local','3184yMUHZP','40bHnEmc','310xiOtAR','1846845ivcolp','defineProperty','428324HjfqHr','1829128qPeZzo','StorageType','511644mCcWmk','1624608YxAukd'];_0x1e6d=function(){return _0x309b64;};return _0x1e6d();}(function(_0x3ca959,_0x5a5819){var _0x4a6ddf=_0x1c05,_0x1a2bf3=_0x3ca959();while(!![]){try{var _0x295346=parseInt(_0x4a6ddf(0x10f))/0x1*(parseInt(_0x4a6ddf(0x103))/0x2)+-parseInt(_0x4a6ddf(0x109))/0x3+-parseInt(_0x4a6ddf(0x106))/0x4+-parseInt(_0x4a6ddf(0x104))/0x5+-parseInt(_0x4a6ddf(0x10a))/0x6+parseInt(_0x4a6ddf(0x107))/0x7+parseInt(_0x4a6ddf(0x110))/0x8*(parseInt(_0x4a6ddf(0x10d))/0x9);if(_0x295346===_0x5a5819)break;else _0x1a2bf3['push'](_0x1a2bf3['shift']());}catch(_0x4433e2){_0x1a2bf3['push'](_0x1a2bf3['shift']());}}}(_0x1e6d,0x4206b));Object[_0x47b5c1(0x105)](exports,_0x47b5c1(0x10b),{'value':!![]}),exports[_0x47b5c1(0x108)]=void 0x0;var StorageType;function _0x1c05(_0x388deb,_0x29e0e3){var _0x1e6de2=_0x1e6d();return _0x1c05=function(_0x1c0520,_0x2758c6){_0x1c0520=_0x1c0520-0x103;var _0x1069df=_0x1e6de2[_0x1c0520];return _0x1069df;},_0x1c05(_0x388deb,_0x29e0e3);}(function(_0x3e6e56){var _0x39f583=_0x47b5c1;_0x3e6e56[_0x39f583(0x10e)]=_0x39f583(0x10e),_0x3e6e56[_0x39f583(0x10c)]=_0x39f583(0x10c);}(StorageType=exports[_0x47b5c1(0x108)]||(exports['StorageType']={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x5367(){const _0x3becd9=['done','348xsjMai','ListObjectsCommand','throw','send','getFilesPaths','87805LrkSCk','Available','10DCuBbs','extractFileRetrieveStatusFromRestoreField','apply','AwsS3Utils','4052466IuWhUe','Restoring','3152MRvHfx','DEEP_ARCHIVE','value','252311qMbzPH','../types/aws.types','1416228Ahhvoh','NeedRestore','extractFileRetrieveStatusFromFileInfo','next','Key','159669nbEUfe','defineProperty','66968uGjNnB','68haVLuI','false','match','StorageClass','5047VsoGUk','AwsFileRetrieveStatus','@aws-sdk/client-s3','Restore','GLACIER','2cVSGfm'];_0x5367=function(){return _0x3becd9;};return _0x5367();}const _0x3afc10=_0x65da;(function(_0x74a9f5,_0x55469a){const _0x488ad3=_0x65da,_0x4eb59f=_0x74a9f5();while(!![]){try{const _0x3b13d9=parseInt(_0x488ad3(0x102))/0x1*(parseInt(_0x488ad3(0x115))/0x2)+parseInt(_0x488ad3(0x109))/0x3+-parseInt(_0x488ad3(0x10c))/0x4*(parseInt(_0x488ad3(0x11c))/0x5)+parseInt(_0x488ad3(0x104))/0x6+parseInt(_0x488ad3(0x110))/0x7*(parseInt(_0x488ad3(0xff))/0x8)+parseInt(_0x488ad3(0xfd))/0x9*(-parseInt(_0x488ad3(0xf9))/0xa)+-parseInt(_0x488ad3(0x10b))/0xb*(-parseInt(_0x488ad3(0x117))/0xc);if(_0x3b13d9===_0x55469a)break;else _0x4eb59f['push'](_0x4eb59f['shift']());}catch(_0x410b07){_0x4eb59f['push'](_0x4eb59f['shift']());}}}(_0x5367,0x3ddcb));function _0x65da(_0x5e4dff,_0x40e6e2){const _0x5367d7=_0x5367();return _0x65da=function(_0x65da64,_0x584156){_0x65da64=_0x65da64-0xf9;let _0x20dc87=_0x5367d7[_0x65da64];return _0x20dc87;},_0x65da(_0x5e4dff,_0x40e6e2);}var __awaiter=this&&this['__awaiter']||function(_0x3e5492,_0x3ff0af,_0x17195e,_0x554ea7){function _0x548009(_0x371588){return _0x371588 instanceof _0x17195e?_0x371588:new _0x17195e(function(_0x4b8140){_0x4b8140(_0x371588);});}return new(_0x17195e||(_0x17195e=Promise))(function(_0x54aad7,_0x380b5d){const _0x52e4bd=_0x65da;function _0x2e4304(_0x4bb56a){const _0x29f79e=_0x65da;try{_0x2c158f(_0x554ea7[_0x29f79e(0x107)](_0x4bb56a));}catch(_0x227b91){_0x380b5d(_0x227b91);}}function _0x49d43a(_0x400ae4){const _0x1da819=_0x65da;try{_0x2c158f(_0x554ea7[_0x1da819(0x119)](_0x400ae4));}catch(_0x69328){_0x380b5d(_0x69328);}}function _0x2c158f(_0x4717ab){const _0x153aea=_0x65da;_0x4717ab[_0x153aea(0x116)]?_0x54aad7(_0x4717ab[_0x153aea(0x101)]):_0x548009(_0x4717ab['value'])['then'](_0x2e4304,_0x49d43a);}_0x2c158f((_0x554ea7=_0x554ea7[_0x52e4bd(0xfb)](_0x3e5492,_0x3ff0af||[]))[_0x52e4bd(0x107)]());});};Object[_0x3afc10(0x10a)](exports,'__esModule',{'value':!![]}),exports[_0x3afc10(0xfc)]=void 0x0;const aws_types_1=require(_0x3afc10(0x103)),client_s3_1=require(_0x3afc10(0x112)),ARCHIVE_TYPES=[_0x3afc10(0x114),'GLACIER_IR',_0x3afc10(0x100)];class AwsS3Utils{static[_0x3afc10(0x106)](_0x46da11){const _0x18ec19=_0x3afc10;if(ARCHIVE_TYPES['includes'](_0x46da11[_0x18ec19(0x10f)])){if(_0x46da11[_0x18ec19(0x113)])return AwsS3Utils[_0x18ec19(0xfa)](_0x46da11[_0x18ec19(0x113)]);return aws_types_1['AwsFileRetrieveStatus'][_0x18ec19(0x105)];}return aws_types_1[_0x18ec19(0x111)][_0x18ec19(0x11d)];}static[_0x3afc10(0xfa)](_0x4a8a9d){const _0x9261dd=_0x3afc10,_0x4c9350=/ongoing-request="([^"]+)"/,_0x14916d=_0x4a8a9d[_0x9261dd(0x10e)](_0x4c9350);return _0x14916d[0x1]===_0x9261dd(0x10d)?aws_types_1[_0x9261dd(0x111)][_0x9261dd(0x11d)]:aws_types_1['AwsFileRetrieveStatus'][_0x9261dd(0xfe)];}static[_0x3afc10(0x11b)](_0x23477f,_0x38981c,_0x434b0c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1ad52c=_0x65da,_0x383fc4=[];let _0x22ff61,_0x4a3ba4=null;do{const _0x2a52ed=new client_s3_1[(_0x1ad52c(0x118))]({'Bucket':_0x38981c,'Prefix':_0x23477f,'Marker':_0x4a3ba4}),{Contents:_0x3d6106,IsTruncated:_0x49f72f}=yield _0x434b0c[_0x1ad52c(0x11a)](_0x2a52ed);if(!_0x3d6106)return _0x383fc4;for(const _0x2ad9b7 of _0x3d6106){_0x383fc4['push'](_0x2ad9b7[_0x1ad52c(0x108)]);}_0x22ff61=_0x49f72f,_0x22ff61&&(_0x4a3ba4=_0x3d6106['at'](-0x1)[_0x1ad52c(0x108)]);}while(_0x22ff61);return _0x383fc4;});}}exports[_0x3afc10(0xfc)]=AwsS3Utils;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flosum/storages",
|
|
3
|
-
"version": "1.0.21-dev.
|
|
3
|
+
"version": "1.0.21-dev.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
"https-proxy-agent": "^5.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "18.14.6",
|
|
39
38
|
"@types/jest": "27.4.1",
|
|
39
|
+
"@types/node": "18.14.6",
|
|
40
|
+
"@types/unzipper": "^0.10.9",
|
|
40
41
|
"@typescript-eslint/eslint-plugin": "5.30.5",
|
|
41
42
|
"@typescript-eslint/parser": "5.30.5",
|
|
42
43
|
"eslint": "8.19.0",
|
|
@@ -58,6 +59,9 @@
|
|
|
58
59
|
"typescript": "4.7.4",
|
|
59
60
|
"vinyl-sourcemaps-apply": "0.2.1"
|
|
60
61
|
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"unzipper": "*"
|
|
64
|
+
},
|
|
61
65
|
"overrides": {
|
|
62
66
|
"glob-parent": "6.0.2",
|
|
63
67
|
"gulp-nodemon": {
|