@flosum/storages 1.2.0 → 1.2.1-dev.0
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/azure-credentials.d.ts +11 -0
- package/dist/credentials/azure-credentials.js +1 -0
- package/dist/credentials/base-credentials.js +1 -1
- package/dist/credentials/index.d.ts +1 -0
- 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/azure-delete.d.ts +8 -0
- package/dist/delete/azure-delete.js +1 -0
- package/dist/delete/base-delete.js +1 -1
- package/dist/delete/index.d.ts +1 -0
- 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/azure-deploy.d.ts +12 -0
- package/dist/deploy/azure-deploy.js +1 -0
- package/dist/deploy/base-deploy.js +1 -1
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +1 -1
- package/dist/deploy/local-deploy.js +1 -1
- package/dist/factory.d.ts +5 -5
- package/dist/factory.js +1 -1
- package/dist/file-size-retriever/aws-s3-file-size-retriever.js +1 -1
- package/dist/file-size-retriever/azure-file-size-retriever.d.ts +7 -0
- package/dist/file-size-retriever/azure-file-size-retriever.js +1 -0
- package/dist/file-size-retriever/base-file-size-retriever.js +1 -1
- package/dist/file-size-retriever/index.d.ts +1 -0
- package/dist/file-size-retriever/index.js +1 -1
- package/dist/file-size-retriever/local-size-retriever.js +1 -1
- package/dist/index.js +1 -1
- package/dist/init.js +1 -1
- package/dist/retrieve/aws-s3-import-helper.js +1 -1
- package/dist/retrieve/aws-s3-retrieve.d.ts +1 -4
- package/dist/retrieve/aws-s3-retrieve.js +1 -1
- package/dist/retrieve/azure-retrieve.d.ts +13 -0
- package/dist/retrieve/azure-retrieve.js +1 -0
- package/dist/retrieve/base-retrieve.d.ts +1 -1
- package/dist/retrieve/base-retrieve.js +1 -1
- package/dist/retrieve/index.d.ts +1 -0
- package/dist/retrieve/index.js +1 -1
- package/dist/retrieve/local-retrieve.d.ts +1 -1
- package/dist/retrieve/local-retrieve.js +1 -1
- package/dist/types/aws.types.js +1 -1
- package/dist/types/azure.types.d.ts +9 -0
- package/dist/types/azure.types.js +1 -0
- 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.d.ts +2 -1
- package/dist/types/storage-type.enum.js +1 -1
- package/dist/utils/aws-s3.utils.js +1 -1
- package/dist/utils/azure.utils.d.ts +7 -0
- package/dist/utils/azure.utils.js +1 -0
- package/dist/utils/cache.utils.d.ts +5 -0
- package/dist/utils/cache.utils.js +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x37b5(_0xb6aad2,_0xea986f){const _0x1f3ed1=_0x1f3e();return _0x37b5=function(_0x37b52b,_0x10564f){_0x37b52b=_0x37b52b-0x183;let _0x30b694=_0x1f3ed1[_0x37b52b];return _0x30b694;},_0x37b5(_0xb6aad2,_0xea986f);}const _0xa2203f=_0x37b5;(function(_0x1778b3,_0x560f0e){const _0x328dfb=_0x37b5,_0x37c0e7=_0x1778b3();while(!![]){try{const _0x32d2d8=parseInt(_0x328dfb(0x193))/0x1+-parseInt(_0x328dfb(0x19a))/0x2+parseInt(_0x328dfb(0x18b))/0x3+parseInt(_0x328dfb(0x19b))/0x4+-parseInt(_0x328dfb(0x191))/0x5*(-parseInt(_0x328dfb(0x18f))/0x6)+parseInt(_0x328dfb(0x195))/0x7*(parseInt(_0x328dfb(0x194))/0x8)+-parseInt(_0x328dfb(0x189))/0x9*(parseInt(_0x328dfb(0x188))/0xa);if(_0x32d2d8===_0x560f0e)break;else _0x37c0e7['push'](_0x37c0e7['shift']());}catch(_0x32f43d){_0x37c0e7['push'](_0x37c0e7['shift']());}}}(_0x1f3e,0xb7a9e));function _0x1f3e(){const _0x262792=['16zjRgwx','2298247nYOrdW','message','s3Client','credentials','region','2078488cWGNgH','10676gjiQXr','createS3Client','validate','then','../utils/aws-s3.utils','accessKeyId','AwsS3Credentials','send','bucketName','getCredentials','secretAccessKey','AwsS3Utils','27222330nsnjAJ','9iyqiPG','next','4159227BGUBYD','BaseCredentials','throw','Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20','138ScQvvF','./base-credentials','276385BzkAbz','__awaiter','1196672mKCjBg'];_0x1f3e=function(){return _0x262792;};return _0x1f3e();}var __awaiter=this&&this[_0xa2203f(0x192)]||function(_0x5b60b4,_0x1e1906,_0x3fc6f9,_0x45c761){function _0x1008fd(_0x8b3d1a){return _0x8b3d1a instanceof _0x3fc6f9?_0x8b3d1a:new _0x3fc6f9(function(_0x57bf2c){_0x57bf2c(_0x8b3d1a);});}return new(_0x3fc6f9||(_0x3fc6f9=Promise))(function(_0x5a78f0,_0x3cfa4b){const _0x262b21=_0x37b5;function _0x2b4fb5(_0x122285){const _0x59788c=_0x37b5;try{_0x483e4d(_0x45c761[_0x59788c(0x18a)](_0x122285));}catch(_0x3901e2){_0x3cfa4b(_0x3901e2);}}function _0x457d72(_0x47f420){const _0x462dc4=_0x37b5;try{_0x483e4d(_0x45c761[_0x462dc4(0x18d)](_0x47f420));}catch(_0x13430d){_0x3cfa4b(_0x13430d);}}function _0x483e4d(_0x3cb90b){const _0x4403a4=_0x37b5;_0x3cb90b['done']?_0x5a78f0(_0x3cb90b['value']):_0x1008fd(_0x3cb90b['value'])[_0x4403a4(0x19e)](_0x2b4fb5,_0x457d72);}_0x483e4d((_0x45c761=_0x45c761['apply'](_0x5b60b4,_0x1e1906||[]))[_0x262b21(0x18a)]());});};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[_0xa2203f(0x1a1)]=void 0x0;const base_credentials_1=require(_0xa2203f(0x190)),client_s3_1=require('@aws-sdk/client-s3'),aws_s3_utils_1=require(_0xa2203f(0x19f));class AwsS3Credentials extends base_credentials_1[_0xa2203f(0x18c)]{constructor(_0x41b120){const _0x3b05f1=_0xa2203f;super(_0x41b120),this[_0x3b05f1(0x197)]=aws_s3_utils_1[_0x3b05f1(0x187)][_0x3b05f1(0x19c)](this[_0x3b05f1(0x198)]);}get[_0xa2203f(0x1a0)](){const _0x34bbd8=_0xa2203f;return this[_0x34bbd8(0x198)][_0x34bbd8(0x1a0)];}get[_0xa2203f(0x186)](){return this['credentials']['secretAccessKey'];}get['bucketName'](){const _0x3f9bf7=_0xa2203f;return this[_0x3f9bf7(0x198)][_0x3f9bf7(0x184)];}get[_0xa2203f(0x199)](){const _0x3f2bfa=_0xa2203f;return this[_0x3f2bfa(0x198)][_0x3f2bfa(0x199)];}[_0xa2203f(0x19d)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x7c2114=_0x37b5;try{const _0xd342fa=new client_s3_1['HeadBucketCommand']({'Bucket':this['credentials'][_0x7c2114(0x184)]});yield this[_0x7c2114(0x197)][_0x7c2114(0x183)](_0xd342fa);}catch(_0x3417e4){throw new Error(_0x7c2114(0x18e)+_0x3417e4[_0x7c2114(0x196)]);}});}[_0xa2203f(0x185)](_0x447385=![]){const _0x1b8c56=_0xa2203f;if(_0x447385)return{'bucketName':this['credentials'][_0x1b8c56(0x184)]};return this[_0x1b8c56(0x198)];}}exports['AwsS3Credentials']=AwsS3Credentials;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCredentials } from './base-credentials';
|
|
2
|
+
import { AzureBlobCredentials } from '../types/azure.types';
|
|
3
|
+
export declare class AzureCredentials extends BaseCredentials<AzureBlobCredentials> {
|
|
4
|
+
private readonly blobServiceClient;
|
|
5
|
+
constructor(rawCredentials?: Record<string, any>);
|
|
6
|
+
get accountKey(): string;
|
|
7
|
+
get accountName(): string;
|
|
8
|
+
get containerName(): string;
|
|
9
|
+
validate(): Promise<void>;
|
|
10
|
+
getCredentials(hideSensitive?: boolean): Pick<AzureBlobCredentials, 'accountName'> | AzureBlobCredentials;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x4afa7e=_0x1aa8;function _0x28a0(){const _0x415562=['accountName','8LcyLDl','defineProperty','next','getCredentials','getContainerClient','1437591cdEzDm','121TxUDxu','28QoJSDi','10387830CIxSyZ','value','728648FrwDDW','BaseCredentials','7663455oweUdc','blobServiceClient','throw','validate','exists','accountKey','Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20','AzureCredentials','3815916EhKiuG','containerName','5CEWcVX','1502702ZMkway','createAzureBlobServiceClient','./base-credentials','apply','AzureUtils','6257388unqwSV','__esModule','credentials','then','1DfMzJi'];_0x28a0=function(){return _0x415562;};return _0x28a0();}(function(_0x4264ef,_0xecac6e){const _0x1b59ef=_0x1aa8,_0x23edaa=_0x4264ef();while(!![]){try{const _0x271f73=parseInt(_0x1b59ef(0x198))/0x1*(-parseInt(_0x1b59ef(0x18f))/0x2)+-parseInt(_0x1b59ef(0x19f))/0x3*(parseInt(_0x1b59ef(0x19a))/0x4)+-parseInt(_0x1b59ef(0x18e))/0x5*(-parseInt(_0x1b59ef(0x194))/0x6)+-parseInt(_0x1b59ef(0x1a1))/0x7*(parseInt(_0x1b59ef(0x182))/0x8)+-parseInt(_0x1b59ef(0x184))/0x9+-parseInt(_0x1b59ef(0x1a2))/0xa+-parseInt(_0x1b59ef(0x1a0))/0xb*(-parseInt(_0x1b59ef(0x18c))/0xc);if(_0x271f73===_0xecac6e)break;else _0x23edaa['push'](_0x23edaa['shift']());}catch(_0xa8476a){_0x23edaa['push'](_0x23edaa['shift']());}}}(_0x28a0,0x8cbda));var __awaiter=this&&this['__awaiter']||function(_0x30b64f,_0x4f4dfc,_0x5ef72a,_0x591add){function _0xbce771(_0x274728){return _0x274728 instanceof _0x5ef72a?_0x274728:new _0x5ef72a(function(_0x5f7f8c){_0x5f7f8c(_0x274728);});}return new(_0x5ef72a||(_0x5ef72a=Promise))(function(_0x27510b,_0x2385cd){const _0x1d8dff=_0x1aa8;function _0xddb772(_0x58297a){const _0x9498c4=_0x1aa8;try{_0x28fc82(_0x591add[_0x9498c4(0x19c)](_0x58297a));}catch(_0x2c1eb4){_0x2385cd(_0x2c1eb4);}}function _0xbdd3ac(_0x4b6a73){const _0x3ac3d7=_0x1aa8;try{_0x28fc82(_0x591add[_0x3ac3d7(0x186)](_0x4b6a73));}catch(_0x21c291){_0x2385cd(_0x21c291);}}function _0x28fc82(_0x1d8032){const _0x46b8f5=_0x1aa8;_0x1d8032['done']?_0x27510b(_0x1d8032[_0x46b8f5(0x181)]):_0xbce771(_0x1d8032[_0x46b8f5(0x181)])[_0x46b8f5(0x197)](_0xddb772,_0xbdd3ac);}_0x28fc82((_0x591add=_0x591add[_0x1d8dff(0x192)](_0x30b64f,_0x4f4dfc||[]))[_0x1d8dff(0x19c)]());});};Object[_0x4afa7e(0x19b)](exports,_0x4afa7e(0x195),{'value':!![]}),exports[_0x4afa7e(0x18b)]=void 0x0;const base_credentials_1=require(_0x4afa7e(0x191)),azure_utils_1=require('../utils/azure.utils');function _0x1aa8(_0x10f06c,_0xc304fa){const _0x28a030=_0x28a0();return _0x1aa8=function(_0x1aa849,_0x31055a){_0x1aa849=_0x1aa849-0x181;let _0x22137d=_0x28a030[_0x1aa849];return _0x22137d;},_0x1aa8(_0x10f06c,_0xc304fa);}class AzureCredentials extends base_credentials_1[_0x4afa7e(0x183)]{constructor(_0x46d31b){const _0x1a3f7a=_0x4afa7e;super(_0x46d31b),this[_0x1a3f7a(0x185)]=azure_utils_1[_0x1a3f7a(0x193)][_0x1a3f7a(0x190)](this['credentials']);}get[_0x4afa7e(0x189)](){const _0x3bcd60=_0x4afa7e;return this['credentials'][_0x3bcd60(0x189)];}get[_0x4afa7e(0x199)](){const _0x69026b=_0x4afa7e;return this['credentials'][_0x69026b(0x199)];}get[_0x4afa7e(0x18d)](){const _0x5a2762=_0x4afa7e;return this[_0x5a2762(0x196)][_0x5a2762(0x18d)];}[_0x4afa7e(0x187)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x445f05=_0x1aa8;try{const _0x1d960=this['blobServiceClient'][_0x445f05(0x19e)](this[_0x445f05(0x196)][_0x445f05(0x18d)]);yield _0x1d960[_0x445f05(0x188)]();}catch(_0x484302){throw new Error(_0x445f05(0x18a)+_0x484302['message']);}});}[_0x4afa7e(0x19d)](_0x3f61a5=![]){const _0x2ec1e1=_0x4afa7e;if(_0x3f61a5)return{'accountName':this[_0x2ec1e1(0x196)][_0x2ec1e1(0x199)]};return this[_0x2ec1e1(0x196)];}}exports[_0x4afa7e(0x18b)]=AzureCredentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x474178=_0x2e08;(function(_0x38ff90,_0x232943){var _0x206d93=_0x2e08,_0x3a2063=_0x38ff90();while(!![]){try{var _0xa6bdf6=parseInt(_0x206d93(0x9a))/0x1*(-parseInt(_0x206d93(0x8c))/0x2)+parseInt(_0x206d93(0x91))/0x3+parseInt(_0x206d93(0x92))/0x4*(parseInt(_0x206d93(0x8e))/0x5)+-parseInt(_0x206d93(0x99))/0x6+parseInt(_0x206d93(0x95))/0x7*(-parseInt(_0x206d93(0x93))/0x8)+-parseInt(_0x206d93(0x96))/0x9*(parseInt(_0x206d93(0x8b))/0xa)+parseInt(_0x206d93(0x98))/0xb;if(_0xa6bdf6===_0x232943)break;else _0x3a2063['push'](_0x3a2063['shift']());}catch(_0x3c1df6){_0x3a2063['push'](_0x3a2063['shift']());}}}(_0x3e20,0xa595b));function _0x3e20(){var _0x3469ce=['rawCredentials','23254iAGonJ','36WseWVN','credentials','38293376jTqMPJ','1626264ARelyq','11261KKxloR','2986580QLsYVe','158qFqGws','defineProperty','17155tUSPhB','__esModule','BaseCredentials','420255uDcnpF','252zNNnnr','1936lFQdzI'];_0x3e20=function(){return _0x3469ce;};return _0x3e20();}Object[_0x474178(0x8d)](exports,_0x474178(0x8f),{'value':!![]}),exports[_0x474178(0x90)]=void 0x0;class BaseCredentials{constructor(_0x2bc50a){var _0x19508f=_0x474178;this[_0x19508f(0x94)]=_0x2bc50a,this[_0x19508f(0x97)]=this[_0x19508f(0x94)]?this[_0x19508f(0x94)]:null;}}function _0x2e08(_0x2be9f5,_0x594936){var _0x3e20b0=_0x3e20();return _0x2e08=function(_0x2e0896,_0x1256e6){_0x2e0896=_0x2e0896-0x8b;var _0x40c75f=_0x3e20b0[_0x2e0896];return _0x40c75f;},_0x2e08(_0x2be9f5,_0x594936);}exports[_0x474178(0x90)]=BaseCredentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function _0x587c(_0x518a37,_0x4dacd3){var _0x14d179=_0x14d1();return _0x587c=function(_0x587c14,_0x511b06){_0x587c14=_0x587c14-0x18d;var _0x3b6a4f=_0x14d179[_0x587c14];return _0x3b6a4f;},_0x587c(_0x518a37,_0x4dacd3);}var _0x8a18a3=_0x587c;(function(_0xc73e14,_0x3c6352){var _0x1fede4=_0x587c,_0x105db6=_0xc73e14();while(!![]){try{var _0x31971b=parseInt(_0x1fede4(0x19d))/0x1+-parseInt(_0x1fede4(0x19c))/0x2+-parseInt(_0x1fede4(0x191))/0x3+parseInt(_0x1fede4(0x199))/0x4+parseInt(_0x1fede4(0x194))/0x5+parseInt(_0x1fede4(0x198))/0x6+parseInt(_0x1fede4(0x193))/0x7*(-parseInt(_0x1fede4(0x192))/0x8);if(_0x31971b===_0x3c6352)break;else _0x105db6['push'](_0x105db6['shift']());}catch(_0x52ea78){_0x105db6['push'](_0x105db6['shift']());}}}(_0x14d1,0xa3da9));Object[_0x8a18a3(0x19b)](exports,_0x8a18a3(0x19e),{'value':!![]}),exports[_0x8a18a3(0x18d)]=exports['LocalCredentials']=exports['AwsS3Credentials']=exports[_0x8a18a3(0x195)]=void 0x0;var base_credentials_1=require(_0x8a18a3(0x19a));Object[_0x8a18a3(0x19b)](exports,_0x8a18a3(0x195),{'enumerable':!![],'get':function(){var _0x5523ff=_0x8a18a3;return base_credentials_1[_0x5523ff(0x195)];}});var aws_s3_credentials_1=require(_0x8a18a3(0x190));Object[_0x8a18a3(0x19b)](exports,_0x8a18a3(0x196),{'enumerable':!![],'get':function(){var _0x3951c2=_0x8a18a3;return aws_s3_credentials_1[_0x3951c2(0x196)];}});function _0x14d1(){var _0x430794=['./local-credentials','./aws-s3-credentials','3423231LXKIii','2225536HYFNVV','21kBCsDX','6311600mtxmlg','BaseCredentials','AwsS3Credentials','LocalCredentials','6700986tpEGzh','3438676HGyFel','./base-credentials','defineProperty','1449098irVPOt','132527wNhCgT','__esModule','AzureCredentials','./azure-credentials'];_0x14d1=function(){return _0x430794;};return _0x14d1();}var local_credentials_1=require(_0x8a18a3(0x18f));Object[_0x8a18a3(0x19b)](exports,_0x8a18a3(0x197),{'enumerable':!![],'get':function(){var _0x2368b3=_0x8a18a3;return local_credentials_1[_0x2368b3(0x197)];}});var azure_credentials_1=require(_0x8a18a3(0x18e));Object[_0x8a18a3(0x19b)](exports,_0x8a18a3(0x18d),{'enumerable':!![],'get':function(){var _0x52af39=_0x8a18a3;return azure_credentials_1[_0x52af39(0x18d)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x34226d=_0x5b20;(function(_0x43b485,_0xc87411){const _0x399b43=_0x5b20,_0x14b09d=_0x43b485();while(!![]){try{const _0x5d44e0=parseInt(_0x399b43(0x13c))/0x1+-parseInt(_0x399b43(0x132))/0x2+parseInt(_0x399b43(0x138))/0x3+-parseInt(_0x399b43(0x13a))/0x4*(parseInt(_0x399b43(0x13f))/0x5)+-parseInt(_0x399b43(0x136))/0x6*(parseInt(_0x399b43(0x133))/0x7)+-parseInt(_0x399b43(0x13d))/0x8+parseInt(_0x399b43(0x134))/0x9;if(_0x5d44e0===_0xc87411)break;else _0x14b09d['push'](_0x14b09d['shift']());}catch(_0x15f213){_0x14b09d['push'](_0x14b09d['shift']());}}}(_0x2f3a,0x58159));function _0x5b20(_0x3a0a47,_0x433924){const _0x2f3a0f=_0x2f3a();return _0x5b20=function(_0x5b2004,_0x538a46){_0x5b2004=_0x5b2004-0x132;let _0x4a0ab2=_0x2f3a0f[_0x5b2004];return _0x4a0ab2;},_0x5b20(_0x3a0a47,_0x433924);}Object[_0x34226d(0x137)](exports,'__esModule',{'value':!![]}),exports[_0x34226d(0x135)]=void 0x0;const base_credentials_1=require(_0x34226d(0x13e));class LocalCredentials extends base_credentials_1['BaseCredentials']{[_0x34226d(0x13b)](){return null;}[_0x34226d(0x139)](){return Promise['resolve'](undefined);}}exports['LocalCredentials']=LocalCredentials;function _0x2f3a(){const _0x210919=['4831040VIoqRz','./base-credentials','265tvIdGy','1020796jjljju','56644MRAHUq','13269285xwnLCg','LocalCredentials','408uENoko','defineProperty','963924WCTsmv','validate','29804qegDnP','getCredentials','624557wKDIcD'];_0x2f3a=function(){return _0x210919;};return _0x2f3a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x446faa=_0x44a4;(function(_0x511380,_0x818419){const _0x10eec4=_0x44a4,_0x3d726b=_0x511380();while(!![]){try{const _0x3512f8=-parseInt(_0x10eec4(0x1b6))/0x1*(parseInt(_0x10eec4(0x1b2))/0x2)+parseInt(_0x10eec4(0x1c9))/0x3+parseInt(_0x10eec4(0x1bd))/0x4*(-parseInt(_0x10eec4(0x1b1))/0x5)+-parseInt(_0x10eec4(0x1d0))/0x6*(-parseInt(_0x10eec4(0x1c7))/0x7)+parseInt(_0x10eec4(0x1cb))/0x8*(-parseInt(_0x10eec4(0x1bf))/0x9)+parseInt(_0x10eec4(0x1aa))/0xa+parseInt(_0x10eec4(0x1bc))/0xb*(parseInt(_0x10eec4(0x1d1))/0xc);if(_0x3512f8===_0x818419)break;else _0x3d726b['push'](_0x3d726b['shift']());}catch(_0x20f140){_0x3d726b['push'](_0x3d726b['shift']());}}}(_0x2ed8,0x4d97d));var __awaiter=this&&this[_0x446faa(0x1cd)]||function(_0x427425,_0x43554c,_0x62e330,_0x326470){function _0x1d662f(_0x5d96e6){return _0x5d96e6 instanceof _0x62e330?_0x5d96e6:new _0x62e330(function(_0x241aa9){_0x241aa9(_0x5d96e6);});}return new(_0x62e330||(_0x62e330=Promise))(function(_0x2123e6,_0x54d9d9){const _0xbe771=_0x44a4;function _0x49e873(_0x2cfe3b){const _0x1a4d08=_0x44a4;try{_0x1190ec(_0x326470[_0x1a4d08(0x1c4)](_0x2cfe3b));}catch(_0x176ce6){_0x54d9d9(_0x176ce6);}}function _0x4b218c(_0x53f213){const _0x4379dd=_0x44a4;try{_0x1190ec(_0x326470[_0x4379dd(0x1cf)](_0x53f213));}catch(_0x2b61ea){_0x54d9d9(_0x2b61ea);}}function _0x1190ec(_0x4906ed){const _0x105ceb=_0x44a4;_0x4906ed[_0x105ceb(0x1ae)]?_0x2123e6(_0x4906ed['value']):_0x1d662f(_0x4906ed[_0x105ceb(0x1bb)])[_0x105ceb(0x1c5)](_0x49e873,_0x4b218c);}_0x1190ec((_0x326470=_0x326470['apply'](_0x427425,_0x43554c||[]))[_0xbe771(0x1c4)]());});},__importDefault=this&&this[_0x446faa(0x1b9)]||function(_0x5da81c){const _0x1e037e=_0x446faa;return _0x5da81c&&_0x5da81c[_0x1e037e(0x1b4)]?_0x5da81c:{'default':_0x5da81c};};function _0x2ed8(){const _0x41817e=['path','done','send','@aws-sdk/client-s3','968015DYZTyN','20VkTfOK','BaseDelete','__esModule','default','50053xeNTYv','split','credentials','__importDefault','s3Client','value','2354hVyMTX','4GMHUCM','../utils/aws-s3.utils','207GIplAT','defineProperty','AwsS3Delete','execute','bucketName','next','then','map','239729oeoRdk','posix','995379cYggpt','splitOnChunks','91856BrtDCB','OBJECTS_PER_CHUNK','__awaiter','ArrayUtils','throw','42JqLNhU','10080dInLhB','createS3Client','@flosum/utils','5247580QQMkYG','getFilesPaths','DeleteObjectsCommand'];_0x2ed8=function(){return _0x41817e;};return _0x2ed8();}function _0x44a4(_0x2856b0,_0x5bf8dc){const _0x2ed81c=_0x2ed8();return _0x44a4=function(_0x44a453,_0x3bf7b4){_0x44a453=_0x44a453-0x1aa;let _0x3b1f64=_0x2ed81c[_0x44a453];return _0x3b1f64;},_0x44a4(_0x2856b0,_0x5bf8dc);}Object[_0x446faa(0x1c0)](exports,'__esModule',{'value':!![]}),exports['AwsS3Delete']=void 0x0;const path_1=__importDefault(require(_0x446faa(0x1ad))),utils_1=require(_0x446faa(0x1d3)),aws_s3_utils_1=require(_0x446faa(0x1be)),_1=require('./'),client_s3_1=require(_0x446faa(0x1b0));class AwsS3Delete extends _1[_0x446faa(0x1b3)]{constructor(_0x290ef6){const _0x58f040=_0x446faa;super(_0x290ef6),this['credentials']=_0x290ef6,this['OBJECTS_PER_CHUNK']=0x3e8,this[_0x58f040(0x1ba)]=aws_s3_utils_1['AwsS3Utils'][_0x58f040(0x1d2)](_0x290ef6);}[_0x446faa(0x1c2)](_0x3ea309){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x23a52c=_0x44a4,_0x5a5c30=_0x3ea309[_0x23a52c(0x1b7)](path_1['default']['sep'])['join'](path_1[_0x23a52c(0x1b5)][_0x23a52c(0x1c8)]['sep']),_0x435585=yield aws_s3_utils_1['AwsS3Utils'][_0x23a52c(0x1ab)](_0x5a5c30,this[_0x23a52c(0x1b8)][_0x23a52c(0x1c3)],this[_0x23a52c(0x1ba)]),_0xe381eb=utils_1[_0x23a52c(0x1ce)][_0x23a52c(0x1ca)](_0x435585,this[_0x23a52c(0x1cc)]);for(const _0xade827 of _0xe381eb){const _0x12d014=_0xade827[_0x23a52c(0x1c6)](_0x35bad=>({'Key':_0x35bad})),_0x5e8c66=new client_s3_1[(_0x23a52c(0x1ac))]({'Bucket':this[_0x23a52c(0x1b8)][_0x23a52c(0x1c3)],'Delete':{'Objects':_0x12d014}});yield this[_0x23a52c(0x1ba)][_0x23a52c(0x1af)](_0x5e8c66);}});}}exports[_0x446faa(0x1c1)]=AwsS3Delete;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AzureCredentials } from '../credentials';
|
|
2
|
+
import { BaseDelete } from './';
|
|
3
|
+
export declare class AzureDelete extends BaseDelete<AzureCredentials> {
|
|
4
|
+
protected readonly credentials: AzureCredentials;
|
|
5
|
+
private readonly containerClient;
|
|
6
|
+
constructor(credentials: AzureCredentials);
|
|
7
|
+
execute(path: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x4e8798=_0x5642;function _0x5642(_0x32c81a,_0xe47588){const _0x17f741=_0x17f7();return _0x5642=function(_0x5642fc,_0x38fcb9){_0x5642fc=_0x5642fc-0xff;let _0x3b1e30=_0x17f741[_0x5642fc];return _0x3b1e30;},_0x5642(_0x32c81a,_0xe47588);}(function(_0x213997,_0x39a6e3){const _0x426dc1=_0x5642,_0x2c4594=_0x213997();while(!![]){try{const _0x1a708c=parseInt(_0x426dc1(0x118))/0x1*(-parseInt(_0x426dc1(0x119))/0x2)+parseInt(_0x426dc1(0x11d))/0x3*(parseInt(_0x426dc1(0x10b))/0x4)+-parseInt(_0x426dc1(0x110))/0x5+-parseInt(_0x426dc1(0x114))/0x6*(-parseInt(_0x426dc1(0x10e))/0x7)+-parseInt(_0x426dc1(0x10a))/0x8+-parseInt(_0x426dc1(0xff))/0x9+parseInt(_0x426dc1(0x117))/0xa*(parseInt(_0x426dc1(0x11b))/0xb);if(_0x1a708c===_0x39a6e3)break;else _0x2c4594['push'](_0x2c4594['shift']());}catch(_0x1d1f66){_0x2c4594['push'](_0x2c4594['shift']());}}}(_0x17f7,0x2dd1e));var __awaiter=this&&this[_0x4e8798(0x116)]||function(_0x595187,_0xbad8ad,_0xdde1d8,_0x3cf820){function _0x42e520(_0xe660d7){return _0xe660d7 instanceof _0xdde1d8?_0xe660d7:new _0xdde1d8(function(_0xd3d461){_0xd3d461(_0xe660d7);});}return new(_0xdde1d8||(_0xdde1d8=Promise))(function(_0x452b87,_0x3df6c0){const _0xddd540=_0x5642;function _0x14599a(_0x256e2f){const _0x19d150=_0x5642;try{_0xb1bead(_0x3cf820[_0x19d150(0x115)](_0x256e2f));}catch(_0x2b9684){_0x3df6c0(_0x2b9684);}}function _0x20f13c(_0x58429e){const _0x423445=_0x5642;try{_0xb1bead(_0x3cf820[_0x423445(0x11f)](_0x58429e));}catch(_0x2b04bf){_0x3df6c0(_0x2b04bf);}}function _0xb1bead(_0x4c7ba3){const _0x33954e=_0x5642;_0x4c7ba3[_0x33954e(0x11c)]?_0x452b87(_0x4c7ba3[_0x33954e(0x11a)]):_0x42e520(_0x4c7ba3[_0x33954e(0x11a)])['then'](_0x14599a,_0x20f13c);}_0xb1bead((_0x3cf820=_0x3cf820[_0xddd540(0x11e)](_0x595187,_0xbad8ad||[]))['next']());});},__importDefault=this&&this[_0x4e8798(0x109)]||function(_0x2cfe70){const _0x147f40=_0x4e8798;return _0x2cfe70&&_0x2cfe70[_0x147f40(0x104)]?_0x2cfe70:{'default':_0x2cfe70};};Object[_0x4e8798(0x100)](exports,_0x4e8798(0x104),{'value':!![]}),exports['AzureDelete']=void 0x0;const path_1=__importDefault(require(_0x4e8798(0x103))),_1=require('./'),azure_utils_1=require(_0x4e8798(0x10f));class AzureDelete extends _1['BaseDelete']{constructor(_0x5ab18c){const _0x23afb7=_0x4e8798;super(_0x5ab18c),this[_0x23afb7(0x10d)]=_0x5ab18c,this[_0x23afb7(0x101)]=azure_utils_1[_0x23afb7(0x111)][_0x23afb7(0x105)](_0x5ab18c);}[_0x4e8798(0x107)](_0x36f6e5){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2e5c69=_0x5642,_0x368c29=_0x36f6e5[_0x2e5c69(0x112)](path_1[_0x2e5c69(0x10c)]['sep'])[_0x2e5c69(0x106)](path_1[_0x2e5c69(0x10c)]['posix'][_0x2e5c69(0x108)]),_0x1c78e8=yield azure_utils_1[_0x2e5c69(0x111)]['getAzureBlobsPaths'](_0x368c29,this['containerClient']);for(const _0x222086 of _0x1c78e8){yield this['containerClient'][_0x2e5c69(0x102)](_0x222086[_0x2e5c69(0x103)]);}});}}function _0x17f7(){const _0xdf71ee=['path','__esModule','createAzureBlobContainerClient','join','execute','sep','__importDefault','348112flWNxk','612CAOpNK','default','credentials','7odMayO','../utils/azure.utils','933395THxxHI','AzureUtils','split','AzureDelete','1587204VIxdVs','next','__awaiter','1295740IVGECV','1YUraGN','379218RmQrBj','value','33EEvrvT','done','3759hyOlyB','apply','throw','2137365JtqdQX','defineProperty','containerClient','deleteBlob'];_0x17f7=function(){return _0xdf71ee;};return _0x17f7();}exports[_0x4e8798(0x113)]=AzureDelete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x1518bd=_0x2596;(function(_0x4ba4cb,_0x72f099){var _0x5d0864=_0x2596,_0xff706c=_0x4ba4cb();while(!![]){try{var _0x368e0a=parseInt(_0x5d0864(0x1d2))/0x1+-parseInt(_0x5d0864(0x1c9))/0x2+parseInt(_0x5d0864(0x1c7))/0x3*(parseInt(_0x5d0864(0x1cd))/0x4)+-parseInt(_0x5d0864(0x1ce))/0x5*(-parseInt(_0x5d0864(0x1c8))/0x6)+-parseInt(_0x5d0864(0x1cb))/0x7*(parseInt(_0x5d0864(0x1c5))/0x8)+parseInt(_0x5d0864(0x1d0))/0x9*(parseInt(_0x5d0864(0x1c4))/0xa)+parseInt(_0x5d0864(0x1d1))/0xb*(parseInt(_0x5d0864(0x1cc))/0xc);if(_0x368e0a===_0x72f099)break;else _0xff706c['push'](_0xff706c['shift']());}catch(_0x31d315){_0xff706c['push'](_0xff706c['shift']());}}}(_0x32e7,0x33252));Object['defineProperty'](exports,_0x1518bd(0x1cf),{'value':!![]}),exports[_0x1518bd(0x1c6)]=void 0x0;function _0x2596(_0x444c52,_0x4b3d0e){var _0x32e7af=_0x32e7();return _0x2596=function(_0x2596c6,_0x226037){_0x2596c6=_0x2596c6-0x1c4;var _0x3a3aac=_0x32e7af[_0x2596c6];return _0x3a3aac;},_0x2596(_0x444c52,_0x4b3d0e);}class BaseDelete{constructor(_0x49acaa){var _0x31bf2e=_0x1518bd;this[_0x31bf2e(0x1ca)]=_0x49acaa;}}function _0x32e7(){var _0x3e9cf0=['credentials','7QaXmwf','876VznLZb','45236ZtbdeM','15ozcIUV','__esModule','3553542eFULjW','4378XMOKED','181304bylGyz','10NLjcoN','1851640EYCmOV','BaseDelete','3PRSWDn','105252dwlfaD','456372upBlRJ'];_0x32e7=function(){return _0x3e9cf0;};return _0x32e7();}exports[_0x1518bd(0x1c6)]=BaseDelete;
|
package/dist/delete/index.d.ts
CHANGED
package/dist/delete/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x46157e=_0xdcd6;(function(_0x27722c,_0xbb409e){var _0xea633f=_0xdcd6,_0x338a32=_0x27722c();while(!![]){try{var _0x44178d=-parseInt(_0xea633f(0xcb))/0x1*(parseInt(_0xea633f(0xc9))/0x2)+-parseInt(_0xea633f(0xc3))/0x3+parseInt(_0xea633f(0xc4))/0x4+-parseInt(_0xea633f(0xcf))/0x5*(parseInt(_0xea633f(0xc6))/0x6)+parseInt(_0xea633f(0xcc))/0x7*(-parseInt(_0xea633f(0xc8))/0x8)+parseInt(_0xea633f(0xc5))/0x9+-parseInt(_0xea633f(0xce))/0xa*(-parseInt(_0xea633f(0xd4))/0xb);if(_0x44178d===_0xbb409e)break;else _0x338a32['push'](_0x338a32['shift']());}catch(_0x2b9cb8){_0x338a32['push'](_0x338a32['shift']());}}}(_0x1aaa,0x8240f));function _0xdcd6(_0x181258,_0x3d3b4c){var _0x1aaa00=_0x1aaa();return _0xdcd6=function(_0xdcd655,_0x2a0bb2){_0xdcd655=_0xdcd655-0xc2;var _0x9dc844=_0x1aaa00[_0xdcd655];return _0x9dc844;},_0xdcd6(_0x181258,_0x3d3b4c);}function _0x1aaa(){var _0x180d0a=['4287656jiQqkO','2SHTbvs','LocalDelete','986641NzAxjh','7hgKwDM','./aws-s3-delete','12168110yFNVhk','30nFdIsw','defineProperty','./azure-delete','./local-delete','AwsS3Delete','22asIAqu','BaseDelete','AzureDelete','./base-delete','1286037LbCWOz','3366000CyNYGc','1522476rUqFXH','959490Cnmptq','__esModule'];_0x1aaa=function(){return _0x180d0a;};return _0x1aaa();}Object[_0x46157e(0xd0)](exports,_0x46157e(0xc7),{'value':!![]}),exports[_0x46157e(0xd6)]=exports[_0x46157e(0xca)]=exports[_0x46157e(0xd3)]=exports[_0x46157e(0xd5)]=void 0x0;var base_delete_1=require(_0x46157e(0xc2));Object[_0x46157e(0xd0)](exports,_0x46157e(0xd5),{'enumerable':!![],'get':function(){var _0x4c1823=_0x46157e;return base_delete_1[_0x4c1823(0xd5)];}});var aws_s3_delete_1=require(_0x46157e(0xcd));Object[_0x46157e(0xd0)](exports,_0x46157e(0xd3),{'enumerable':!![],'get':function(){return aws_s3_delete_1['AwsS3Delete'];}});var local_delete_1=require(_0x46157e(0xd2));Object['defineProperty'](exports,_0x46157e(0xca),{'enumerable':!![],'get':function(){return local_delete_1['LocalDelete'];}});var azure_delete_1=require(_0x46157e(0xd1));Object[_0x46157e(0xd0)](exports,_0x46157e(0xd6),{'enumerable':!![],'get':function(){var _0x469bbf=_0x46157e;return azure_delete_1[_0x469bbf(0xd6)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x3b8570=_0x46b0;(function(_0x370e7b,_0x15f3c8){const _0x3fa69e=_0x46b0,_0xefd586=_0x370e7b();while(!![]){try{const _0xf1e2fe=-parseInt(_0x3fa69e(0xa9))/0x1*(parseInt(_0x3fa69e(0x9a))/0x2)+-parseInt(_0x3fa69e(0xa5))/0x3*(parseInt(_0x3fa69e(0x96))/0x4)+-parseInt(_0x3fa69e(0xa0))/0x5*(-parseInt(_0x3fa69e(0xa2))/0x6)+parseInt(_0x3fa69e(0x98))/0x7*(-parseInt(_0x3fa69e(0xaa))/0x8)+-parseInt(_0x3fa69e(0xab))/0x9*(parseInt(_0x3fa69e(0xad))/0xa)+parseInt(_0x3fa69e(0xac))/0xb+parseInt(_0x3fa69e(0x9f))/0xc;if(_0xf1e2fe===_0x15f3c8)break;else _0xefd586['push'](_0xefd586['shift']());}catch(_0x5b63dd){_0xefd586['push'](_0xefd586['shift']());}}}(_0x159d,0x58a22));function _0x46b0(_0x28a35f,_0x46ae84){const _0x159d65=_0x159d();return _0x46b0=function(_0x46b025,_0x9f498c){_0x46b025=_0x46b025-0x96;let _0x4b5c9e=_0x159d65[_0x46b025];return _0x4b5c9e;},_0x46b0(_0x28a35f,_0x46ae84);}var __awaiter=this&&this[_0x3b8570(0xa4)]||function(_0x1f3e43,_0x3fdc63,_0xb30c39,_0x2a0c20){function _0x59070b(_0x308b1e){return _0x308b1e instanceof _0xb30c39?_0x308b1e:new _0xb30c39(function(_0x27881f){_0x27881f(_0x308b1e);});}return new(_0xb30c39||(_0xb30c39=Promise))(function(_0x4b9e1a,_0x26ffd8){const _0x439dce=_0x46b0;function _0x43a51e(_0x159df4){const _0x6938e6=_0x46b0;try{_0x2a4dfa(_0x2a0c20[_0x6938e6(0x9e)](_0x159df4));}catch(_0x40c183){_0x26ffd8(_0x40c183);}}function _0x4ddc91(_0x5ad96d){try{_0x2a4dfa(_0x2a0c20['throw'](_0x5ad96d));}catch(_0x27596f){_0x26ffd8(_0x27596f);}}function _0x2a4dfa(_0x27f916){const _0xd16ee5=_0x46b0;_0x27f916[_0xd16ee5(0xa7)]?_0x4b9e1a(_0x27f916[_0xd16ee5(0x9b)]):_0x59070b(_0x27f916[_0xd16ee5(0x9b)])[_0xd16ee5(0xa3)](_0x43a51e,_0x4ddc91);}_0x2a4dfa((_0x2a0c20=_0x2a0c20[_0x439dce(0x97)](_0x1f3e43,_0x3fdc63||[]))[_0x439dce(0x9e)]());});};Object[_0x3b8570(0xa8)](exports,'__esModule',{'value':!![]}),exports[_0x3b8570(0x9c)]=void 0x0;const promises_1=require(_0x3b8570(0xa1)),utils_1=require(_0x3b8570(0x99)),_1=require('./');function _0x159d(){const _0x12cb61=['then','__awaiter','42546XDvnvS','FsUtils','done','defineProperty','1rMGWmN','8VPCRbC','4506939GgPIIO','6997067cIXvYb','10ycIzXL','BaseDelete','20vEIBJN','apply','3280746SwaxGM','@flosum/utils','1182410iskPWA','value','LocalDelete','isExistsPath','next','15792444GpyvIu','26545xBhqfA','fs/promises','48wkGEvn'];_0x159d=function(){return _0x12cb61;};return _0x159d();}class LocalDelete extends _1[_0x3b8570(0xae)]{['execute'](_0x750880){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x521c95=_0x46b0;if(yield utils_1[_0x521c95(0xa6)][_0x521c95(0x9d)](_0x750880))yield(0x0,promises_1['rm'])(_0x750880,{'recursive':!![]});});}}exports[_0x3b8570(0x9c)]=LocalDelete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x3c5e(){const _0x5c56ab=['split','storageClass','43795128HFbKFD','posix','4304BMfTKc','value','s3Client','121ogPxti','sep','createS3Client','credentials','1018404DlqjTi','done','join','defineProperty','__importDefault','5tXnqcl','bucketName','path','AwsS3Utils','upload','Upload','apply','AwsS3Deploy','__esModule','11QanCeg','next','default','then','throw','8uesLsO','13264730hVWgLC','3942956CcJOoc','execute','12MqkJkE','../utils/aws-s3.utils','284697ABfrkh','679224GOxtRl'];_0x3c5e=function(){return _0x5c56ab;};return _0x3c5e();}const _0x5352ee=_0x3abc;(function(_0x478b24,_0x13f1e5){const _0x1516f0=_0x3abc,_0x1d51a5=_0x478b24();while(!![]){try{const _0x30626b=-parseInt(_0x1516f0(0xde))/0x1*(parseInt(_0x1516f0(0x101))/0x2)+-parseInt(_0x1516f0(0xfc))/0x3+-parseInt(_0x1516f0(0xf7))/0x4*(parseInt(_0x1516f0(0xe7))/0x5)+parseInt(_0x1516f0(0xf9))/0x6*(-parseInt(_0x1516f0(0xfb))/0x7)+parseInt(_0x1516f0(0xf5))/0x8*(parseInt(_0x1516f0(0xe2))/0x9)+parseInt(_0x1516f0(0xf6))/0xa*(-parseInt(_0x1516f0(0xf0))/0xb)+parseInt(_0x1516f0(0xff))/0xc;if(_0x30626b===_0x13f1e5)break;else _0x1d51a5['push'](_0x1d51a5['shift']());}catch(_0x583875){_0x1d51a5['push'](_0x1d51a5['shift']());}}}(_0x3c5e,0xd76dc));function _0x3abc(_0x526f8b,_0x35760c){const _0x3c5e67=_0x3c5e();return _0x3abc=function(_0x3abc59,_0x506388){_0x3abc59=_0x3abc59-0xdd;let _0x1f24e1=_0x3c5e67[_0x3abc59];return _0x1f24e1;},_0x3abc(_0x526f8b,_0x35760c);}var __awaiter=this&&this['__awaiter']||function(_0x32a920,_0x1f5f47,_0x4b4dc7,_0x1ff492){function _0x2498f6(_0xef775c){return _0xef775c instanceof _0x4b4dc7?_0xef775c:new _0x4b4dc7(function(_0x3b8b1c){_0x3b8b1c(_0xef775c);});}return new(_0x4b4dc7||(_0x4b4dc7=Promise))(function(_0x279ba9,_0x5bdf9b){const _0xb294b0=_0x3abc;function _0x4ab044(_0x351a2c){const _0x2bdd19=_0x3abc;try{_0x4e6473(_0x1ff492[_0x2bdd19(0xf1)](_0x351a2c));}catch(_0x2d2377){_0x5bdf9b(_0x2d2377);}}function _0x25ae95(_0x1551df){const _0x540bf3=_0x3abc;try{_0x4e6473(_0x1ff492[_0x540bf3(0xf4)](_0x1551df));}catch(_0x512150){_0x5bdf9b(_0x512150);}}function _0x4e6473(_0x51c645){const _0x3781f8=_0x3abc;_0x51c645[_0x3781f8(0xe3)]?_0x279ba9(_0x51c645[_0x3781f8(0x102)]):_0x2498f6(_0x51c645[_0x3781f8(0x102)])[_0x3781f8(0xf3)](_0x4ab044,_0x25ae95);}_0x4e6473((_0x1ff492=_0x1ff492[_0xb294b0(0xed)](_0x32a920,_0x1f5f47||[]))[_0xb294b0(0xf1)]());});},__importDefault=this&&this[_0x5352ee(0xe6)]||function(_0x262e0d){const _0x36cef9=_0x5352ee;return _0x262e0d&&_0x262e0d[_0x36cef9(0xef)]?_0x262e0d:{'default':_0x262e0d};};Object[_0x5352ee(0xe5)](exports,'__esModule',{'value':!![]}),exports['AwsS3Deploy']=void 0x0;const path_1=__importDefault(require(_0x5352ee(0xe9))),_1=require('./'),lib_storage_1=require('@aws-sdk/lib-storage'),aws_s3_utils_1=require(_0x5352ee(0xfa));class AwsS3Deploy extends _1['BaseDeploy']{constructor(_0x3480d7,_0x3a24c8){const _0x578170=_0x5352ee;super(_0x3480d7),this[_0x578170(0xe1)]=_0x3480d7,this[_0x578170(0xfe)]=_0x3a24c8,this[_0x578170(0xdd)]=aws_s3_utils_1[_0x578170(0xea)][_0x578170(0xe0)](_0x3480d7);}[_0x5352ee(0xeb)](_0x4c26a,_0x587bd4){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x16ffd2=_0x3abc,_0xf7767=new lib_storage_1[(_0x16ffd2(0xec))]({'client':this[_0x16ffd2(0xdd)],'params':{'Bucket':this[_0x16ffd2(0xe1)][_0x16ffd2(0xe8)],'Key':_0x587bd4,'Body':_0x4c26a,'StorageClass':this['storageClass']}});yield _0xf7767[_0x16ffd2(0xe3)]();});}[_0x5352ee(0xf8)](_0x355744,_0x26bda2){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xedc8f8=_0x3abc;try{const _0x110092=_0x26bda2[_0xedc8f8(0xfd)](path_1[_0xedc8f8(0xf2)][_0xedc8f8(0xdf)])[_0xedc8f8(0xe4)](path_1['default'][_0xedc8f8(0x100)][_0xedc8f8(0xdf)]);yield this[_0xedc8f8(0xeb)](_0x355744,_0x110092);}catch(_0x11e7bb){throw _0x11e7bb;}});}}exports[_0x5352ee(0xee)]=AwsS3Deploy;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { BaseDeploy } from './';
|
|
4
|
+
import * as stream from 'stream';
|
|
5
|
+
import { AzureCredentials } from '../credentials/azure-credentials';
|
|
6
|
+
export declare class AzureDeploy extends BaseDeploy<AzureCredentials> {
|
|
7
|
+
protected credentials: AzureCredentials;
|
|
8
|
+
private readonly containerClient;
|
|
9
|
+
constructor(credentials: AzureCredentials);
|
|
10
|
+
private upload;
|
|
11
|
+
execute(file: Buffer | stream.Readable, pathToFile: string): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x28f0b6=_0x41d6;(function(_0x38cde0,_0x43ce1a){const _0x19a1ea=_0x41d6,_0xa09958=_0x38cde0();while(!![]){try{const _0x253ac4=parseInt(_0x19a1ea(0x8b))/0x1*(parseInt(_0x19a1ea(0x86))/0x2)+-parseInt(_0x19a1ea(0x9c))/0x3+-parseInt(_0x19a1ea(0x91))/0x4*(-parseInt(_0x19a1ea(0x92))/0x5)+parseInt(_0x19a1ea(0x84))/0x6+-parseInt(_0x19a1ea(0x85))/0x7*(-parseInt(_0x19a1ea(0x9a))/0x8)+-parseInt(_0x19a1ea(0x9e))/0x9+-parseInt(_0x19a1ea(0x97))/0xa;if(_0x253ac4===_0x43ce1a)break;else _0xa09958['push'](_0xa09958['shift']());}catch(_0x4dfe33){_0xa09958['push'](_0xa09958['shift']());}}}(_0x46cc,0x56132));function _0x41d6(_0x5b0d5e,_0x45d605){const _0x46cc08=_0x46cc();return _0x41d6=function(_0x41d6ef,_0x3f3e8a){_0x41d6ef=_0x41d6ef-0x7e;let _0x2fceda=_0x46cc08[_0x41d6ef];return _0x2fceda;},_0x41d6(_0x5b0d5e,_0x45d605);}var __awaiter=this&&this[_0x28f0b6(0x81)]||function(_0x32c2a6,_0x30bab1,_0x3d12e1,_0x57f52a){function _0x2e9466(_0x2c0e91){return _0x2c0e91 instanceof _0x3d12e1?_0x2c0e91:new _0x3d12e1(function(_0x3836ea){_0x3836ea(_0x2c0e91);});}return new(_0x3d12e1||(_0x3d12e1=Promise))(function(_0x368990,_0x1019a7){const _0x5a0a42=_0x41d6;function _0x498be2(_0xeddd3){const _0x5eb343=_0x41d6;try{_0x53c0bb(_0x57f52a[_0x5eb343(0x8a)](_0xeddd3));}catch(_0x4d901f){_0x1019a7(_0x4d901f);}}function _0x5295bc(_0x477ee4){const _0x5ed1c2=_0x41d6;try{_0x53c0bb(_0x57f52a[_0x5ed1c2(0x83)](_0x477ee4));}catch(_0x18c4fb){_0x1019a7(_0x18c4fb);}}function _0x53c0bb(_0x1851ba){const _0x168795=_0x41d6;_0x1851ba[_0x168795(0x8e)]?_0x368990(_0x1851ba[_0x168795(0x96)]):_0x2e9466(_0x1851ba[_0x168795(0x96)])[_0x168795(0x82)](_0x498be2,_0x5295bc);}_0x53c0bb((_0x57f52a=_0x57f52a[_0x5a0a42(0x9d)](_0x32c2a6,_0x30bab1||[]))[_0x5a0a42(0x8a)]());});},__importDefault=this&&this[_0x28f0b6(0x87)]||function(_0x22271a){const _0xff22e2=_0x28f0b6;return _0x22271a&&_0x22271a[_0xff22e2(0x7f)]?_0x22271a:{'default':_0x22271a};};Object['defineProperty'](exports,_0x28f0b6(0x7f),{'value':!![]}),exports['AzureDeploy']=void 0x0;const path_1=__importDefault(require(_0x28f0b6(0x8f))),_1=require('./'),azure_utils_1=require(_0x28f0b6(0x98));class AzureDeploy extends _1[_0x28f0b6(0x9b)]{constructor(_0x3b31c4){const _0x2cf74e=_0x28f0b6;super(_0x3b31c4),this[_0x2cf74e(0x7e)]=_0x3b31c4,this['containerClient']=azure_utils_1[_0x2cf74e(0x8c)][_0x2cf74e(0x99)](this['credentials']);}['upload'](_0x92e599,_0x53b933){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1f26c7=_0x41d6,_0x400365=this['containerClient'][_0x1f26c7(0x80)](_0x53b933);_0x92e599 instanceof Buffer?yield _0x400365['upload'](_0x92e599,_0x92e599[_0x1f26c7(0x93)]):yield _0x400365['uploadStream'](_0x92e599);});}[_0x28f0b6(0x88)](_0x4458eb,_0x17f5cc){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x56b348=_0x41d6;try{const _0x333a44=_0x17f5cc[_0x56b348(0x94)](path_1[_0x56b348(0x89)][_0x56b348(0x8d)])[_0x56b348(0x90)](path_1[_0x56b348(0x89)][_0x56b348(0x95)][_0x56b348(0x8d)]);yield this['upload'](_0x4458eb,_0x333a44);}catch(_0x21b87a){throw _0x21b87a;}});}}function _0x46cc(){const _0x1422fc=['1754529ugGvmb','apply','1369449oWemEN','credentials','__esModule','getBlockBlobClient','__awaiter','then','throw','2092872xouKHe','4174828lZwLJO','18uOHZeP','__importDefault','execute','default','next','39313vzcViw','AzureUtils','sep','done','path','join','104yRmgeL','16285fTYAEb','byteLength','split','posix','value','2941490oCVyfX','../utils/azure.utils','createAzureBlobContainerClient','8CaOrbH','BaseDeploy'];_0x46cc=function(){return _0x1422fc;};return _0x46cc();}exports['AzureDeploy']=AzureDeploy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x2aeca8=_0x3cdd;(function(_0x2f0d51,_0x4bafdc){var _0x3bfd0f=_0x3cdd,_0x225d44=_0x2f0d51();while(!![]){try{var _0x41fda9=parseInt(_0x3bfd0f(0xb2))/0x1+parseInt(_0x3bfd0f(0xb0))/0x2*(-parseInt(_0x3bfd0f(0xb7))/0x3)+-parseInt(_0x3bfd0f(0xb6))/0x4*(-parseInt(_0x3bfd0f(0xb3))/0x5)+-parseInt(_0x3bfd0f(0xb8))/0x6*(-parseInt(_0x3bfd0f(0xba))/0x7)+-parseInt(_0x3bfd0f(0xb4))/0x8+-parseInt(_0x3bfd0f(0xb1))/0x9+parseInt(_0x3bfd0f(0xbb))/0xa;if(_0x41fda9===_0x4bafdc)break;else _0x225d44['push'](_0x225d44['shift']());}catch(_0x19186c){_0x225d44['push'](_0x225d44['shift']());}}}(_0xdcfd,0xb65e3));function _0x3cdd(_0x5f12a1,_0x2835ac){var _0xdcfd85=_0xdcfd();return _0x3cdd=function(_0x3cdd5f,_0x3ce9c8){_0x3cdd5f=_0x3cdd5f-0xaf;var _0x196748=_0xdcfd85[_0x3cdd5f];return _0x196748;},_0x3cdd(_0x5f12a1,_0x2835ac);}Object['defineProperty'](exports,_0x2aeca8(0xb9),{'value':!![]}),exports[_0x2aeca8(0xb5)]=void 0x0;class BaseDeploy{constructor(_0x4bcb71){var _0x313352=_0x2aeca8;this[_0x313352(0xaf)]=_0x4bcb71;}}exports[_0x2aeca8(0xb5)]=BaseDeploy;function _0xdcfd(){var _0x7367c1=['6785512VToFKY','BaseDeploy','276472MSThiq','54SATFUW','56304QmnOFv','__esModule','553COCcua','4573180KHagBX','credentials','54026RXaiuS','1169037vSfSPg','597933BZoJMb','30OoBugh'];_0xdcfd=function(){return _0x7367c1;};return _0xdcfd();}
|
package/dist/deploy/index.d.ts
CHANGED
package/dist/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x3d4336=_0x12da;(function(_0x50c9ac,_0x563d84){var _0x28f7ff=_0x12da,_0x5e6a59=_0x50c9ac();while(!![]){try{var _0x7a4cab=-parseInt(_0x28f7ff(0x117))/0x1*(parseInt(_0x28f7ff(0x111))/0x2)+-parseInt(_0x28f7ff(0x113))/0x3+parseInt(_0x28f7ff(0x118))/0x4+-parseInt(_0x28f7ff(0x115))/0x5*(parseInt(_0x28f7ff(0x11e))/0x6)+-parseInt(_0x28f7ff(0x11f))/0x7*(-parseInt(_0x28f7ff(0x11c))/0x8)+parseInt(_0x28f7ff(0x10e))/0x9+-parseInt(_0x28f7ff(0x110))/0xa;if(_0x7a4cab===_0x563d84)break;else _0x5e6a59['push'](_0x5e6a59['shift']());}catch(_0x107fcc){_0x5e6a59['push'](_0x5e6a59['shift']());}}}(_0x2fcf,0xf3b44));Object[_0x3d4336(0x11d)](exports,_0x3d4336(0x119),{'value':!![]}),exports[_0x3d4336(0x116)]=exports[_0x3d4336(0x11a)]=exports[_0x3d4336(0x114)]=exports[_0x3d4336(0x112)]=void 0x0;var base_deploy_1=require('./base-deploy');function _0x2fcf(){var _0x2ae67f=['./aws-s3-deploy','4646730VsPKIq','2SMazdM','BaseDeploy','267633LejZpn','AwsS3Deploy','183875IfqWlA','AzureDeploy','1166057owFHZg','4609628dswiAc','__esModule','LocalDeploy','./azure-deploy','44920kqwBzw','defineProperty','60WSFyVh','63WoiEQt','./local-deploy','16946649sJgbEz'];_0x2fcf=function(){return _0x2ae67f;};return _0x2fcf();}function _0x12da(_0x537f01,_0x1f0fd4){var _0x2fcf67=_0x2fcf();return _0x12da=function(_0x12da67,_0x24c319){_0x12da67=_0x12da67-0x10d;var _0x3a0884=_0x2fcf67[_0x12da67];return _0x3a0884;},_0x12da(_0x537f01,_0x1f0fd4);}Object['defineProperty'](exports,_0x3d4336(0x112),{'enumerable':!![],'get':function(){var _0x5cda2f=_0x3d4336;return base_deploy_1[_0x5cda2f(0x112)];}});var aws_s3_deploy_1=require(_0x3d4336(0x10f));Object[_0x3d4336(0x11d)](exports,_0x3d4336(0x114),{'enumerable':!![],'get':function(){var _0xcfc629=_0x3d4336;return aws_s3_deploy_1[_0xcfc629(0x114)];}});var local_deploy_1=require(_0x3d4336(0x10d));Object[_0x3d4336(0x11d)](exports,_0x3d4336(0x11a),{'enumerable':!![],'get':function(){var _0x5aa443=_0x3d4336;return local_deploy_1[_0x5aa443(0x11a)];}});var azure_deploy_1=require(_0x3d4336(0x11b));Object[_0x3d4336(0x11d)](exports,_0x3d4336(0x116),{'enumerable':!![],'get':function(){var _0x2d01ab=_0x3d4336;return azure_deploy_1[_0x2d01ab(0x116)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x551d(){const _0x3b29b9=['9407480XPHHtE','isExistsPath','writeFile','BaseDeploy','@flosum/utils','apply','value','LocalDeploy','8OztBjK','default','next','17406kWYqYZ','__esModule','__awaiter','fs/promises','184791VeIndb','execute','path','470FeCRrh','__importDefault','defineProperty','done','throw','142972xQFZPQ','1648521UqluNg','5RpOOns','FsUtils','2644565SWQJjv','1046656FKKwtI'];_0x551d=function(){return _0x3b29b9;};return _0x551d();}const _0x457525=_0x4ca8;(function(_0x501364,_0x4340bd){const _0x4de802=_0x4ca8,_0x3b7e9c=_0x501364();while(!![]){try{const _0xd061a2=-parseInt(_0x4de802(0x103))/0x1*(-parseInt(_0x4de802(0x101))/0x2)+parseInt(_0x4de802(0xf9))/0x3+parseInt(_0x4de802(0x106))/0x4+-parseInt(_0x4de802(0xfc))/0x5*(-parseInt(_0x4de802(0xf5))/0x6)+parseInt(_0x4de802(0x105))/0x7*(parseInt(_0x4de802(0xf2))/0x8)+-parseInt(_0x4de802(0x102))/0x9+-parseInt(_0x4de802(0x107))/0xa;if(_0xd061a2===_0x4340bd)break;else _0x3b7e9c['push'](_0x3b7e9c['shift']());}catch(_0x14b98d){_0x3b7e9c['push'](_0x3b7e9c['shift']());}}}(_0x551d,0x3299f));var __awaiter=this&&this[_0x457525(0xf7)]||function(_0x509200,_0x22d228,_0x1a29cb,_0x1b6ee6){function _0x5ee5de(_0x39f054){return _0x39f054 instanceof _0x1a29cb?_0x39f054:new _0x1a29cb(function(_0x50cd9b){_0x50cd9b(_0x39f054);});}return new(_0x1a29cb||(_0x1a29cb=Promise))(function(_0x5c4cd3,_0x5a96c1){const _0x5accb0=_0x4ca8;function _0x2960fd(_0x20c6dd){const _0x5b8f4e=_0x4ca8;try{_0x18258a(_0x1b6ee6[_0x5b8f4e(0xf4)](_0x20c6dd));}catch(_0x18bee6){_0x5a96c1(_0x18bee6);}}function _0x89750d(_0x28f93c){const _0x49f401=_0x4ca8;try{_0x18258a(_0x1b6ee6[_0x49f401(0x100)](_0x28f93c));}catch(_0x4087ae){_0x5a96c1(_0x4087ae);}}function _0x18258a(_0xeeba0a){const _0x546a4f=_0x4ca8;_0xeeba0a[_0x546a4f(0xff)]?_0x5c4cd3(_0xeeba0a[_0x546a4f(0x10d)]):_0x5ee5de(_0xeeba0a[_0x546a4f(0x10d)])['then'](_0x2960fd,_0x89750d);}_0x18258a((_0x1b6ee6=_0x1b6ee6[_0x5accb0(0x10c)](_0x509200,_0x22d228||[]))[_0x5accb0(0xf4)]());});},__importDefault=this&&this[_0x457525(0xfd)]||function(_0x57ffc3){const _0xd80023=_0x457525;return _0x57ffc3&&_0x57ffc3[_0xd80023(0xf6)]?_0x57ffc3:{'default':_0x57ffc3};};Object[_0x457525(0xfe)](exports,_0x457525(0xf6),{'value':!![]}),exports[_0x457525(0xf1)]=void 0x0;const path_1=__importDefault(require(_0x457525(0xfb))),promises_1=require(_0x457525(0xf8)),utils_1=require(_0x457525(0x10b)),_1=require('./');class LocalDeploy extends _1[_0x457525(0x10a)]{[_0x457525(0xfa)](_0x2fb907,_0xc72652){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5079ec=_0x4ca8;try{const _0x4fffae=path_1[_0x5079ec(0xf3)]['dirname'](_0xc72652),_0x3ad672=yield utils_1[_0x5079ec(0x104)]['isExistsPath'](_0x4fffae);!_0x3ad672&&(yield(0x0,promises_1['mkdir'])(_0x4fffae,{'recursive':!![]})),yield(0x0,promises_1[_0x5079ec(0x109)])(_0xc72652,_0x2fb907);}catch(_0x422a7b){(yield utils_1['FsUtils'][_0x5079ec(0x108)](_0xc72652))&&(yield(0x0,promises_1['rm'])(_0xc72652,{'recursive':!![]}));throw _0x422a7b;}});}}function _0x4ca8(_0x5cdaad,_0x46a774){const _0x551d8a=_0x551d();return _0x4ca8=function(_0x4ca8f5,_0x15846a){_0x4ca8f5=_0x4ca8f5-0xf1;let _0x21e811=_0x551d8a[_0x4ca8f5];return _0x21e811;},_0x4ca8(_0x5cdaad,_0x46a774);}exports[_0x457525(0xf1)]=LocalDeploy;
|
package/dist/factory.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StorageType } from './types/storage-type.enum';
|
|
2
|
-
import { BaseCredentials } from './credentials
|
|
3
|
-
import { BaseDelete } from './delete
|
|
4
|
-
import { BaseDeploy } from './deploy
|
|
5
|
-
import { BaseRetrieve } from './retrieve
|
|
6
|
-
import { StorageClass, Tier } from '@aws-sdk/client-s3';
|
|
2
|
+
import { BaseCredentials } from './credentials';
|
|
3
|
+
import { BaseDelete } from './delete';
|
|
4
|
+
import { BaseDeploy } from './deploy';
|
|
5
|
+
import { BaseRetrieve } from './retrieve';
|
|
7
6
|
import { BaseFileSizeRetriever } from './file-size-retriever';
|
|
7
|
+
import { StorageClass, Tier } from '@aws-sdk/client-s3';
|
|
8
8
|
export declare class StorageFactory {
|
|
9
9
|
static createRetrieve(storageType: StorageType, credentials: BaseCredentials, path: string, restoreType?: Tier, cachePath?: string): BaseRetrieve;
|
|
10
10
|
static createDeploy(storageType: StorageType, credentials: BaseCredentials, storageClass?: StorageClass): BaseDeploy;
|
package/dist/factory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x1d5a(_0x3c72c0,_0x3d6978){const _0x56e370=_0x56e3();return _0x1d5a=function(_0x1d5a6d,_0x10281b){_0x1d5a6d=_0x1d5a6d-0xb5;let _0x3ca1d4=_0x56e370[_0x1d5a6d];return _0x3ca1d4;},_0x1d5a(_0x3c72c0,_0x3d6978);}const _0x179c55=_0x1d5a;(function(_0x5c8412,_0x288c6f){const _0x1f9771=_0x1d5a,_0x44931b=_0x5c8412();while(!![]){try{const _0x56ddad=-parseInt(_0x1f9771(0xcb))/0x1+parseInt(_0x1f9771(0xc7))/0x2*(-parseInt(_0x1f9771(0xb5))/0x3)+-parseInt(_0x1f9771(0xb7))/0x4*(-parseInt(_0x1f9771(0xbd))/0x5)+-parseInt(_0x1f9771(0xd2))/0x6*(-parseInt(_0x1f9771(0xd7))/0x7)+parseInt(_0x1f9771(0xb8))/0x8*(-parseInt(_0x1f9771(0xb9))/0x9)+parseInt(_0x1f9771(0xba))/0xa+-parseInt(_0x1f9771(0xc2))/0xb*(-parseInt(_0x1f9771(0xd4))/0xc);if(_0x56ddad===_0x288c6f)break;else _0x44931b['push'](_0x44931b['shift']());}catch(_0x140c1d){_0x44931b['push'](_0x44931b['shift']());}}}(_0x56e3,0xce9f5));function _0x56e3(){const _0x204a2d=['./credentials','StorageFactory','defineProperty','LocalFileSizeRetriever','AzureFileSizeRetriever','1151862mmrzGI','createFileSizeRetriever','2424144cqKtZy','AwsS3Deploy','AwsS3FileSizeRetriever','28gsrcfE','./delete','656769PHEbCl','Local','561948TjowkA','1472lOebPj','61263tMuzpb','9749070AjvUvs','AWS_S3','AZURE_BLOB','10AcsKHk','./deploy','LocalDeploy','createDelete','./file-size-retriever','165JXWHDl','createDeploy','createRetrieve','Unknown\x20storage\x20type\x20-\x20\x22','LocalRetrieve','12fgJTjT','StorageType','LocalDelete','AzureCredentials','1641618PmHMcw','AzureDeploy'];_0x56e3=function(){return _0x204a2d;};return _0x56e3();}Object[_0x179c55(0xcf)](exports,'__esModule',{'value':!![]}),exports['StorageFactory']=void 0x0;const storage_type_enum_1=require('./types/storage-type.enum'),credentials_1=require(_0x179c55(0xcd)),delete_1=require(_0x179c55(0xd8)),deploy_1=require(_0x179c55(0xbe)),retrieve_1=require('./retrieve'),file_size_retriever_1=require(_0x179c55(0xc1));class StorageFactory{static[_0x179c55(0xc4)](_0x17573f,_0x441d10,_0xf01fa9,_0x40b673,_0x2afb19){const _0x5030fe=_0x179c55;switch(_0x17573f){case storage_type_enum_1[_0x5030fe(0xc8)][_0x5030fe(0xbb)]:return new retrieve_1['AwsS3Retrieve'](_0x441d10,_0xf01fa9,_0x40b673,_0x2afb19);case storage_type_enum_1[_0x5030fe(0xc8)][_0x5030fe(0xb6)]:return new retrieve_1[(_0x5030fe(0xc6))](_0x441d10,_0xf01fa9);case storage_type_enum_1[_0x5030fe(0xc8)][_0x5030fe(0xbc)]:return new retrieve_1['AzureRetrieve'](_0x441d10,_0xf01fa9,_0x2afb19);default:throw new Error(_0x5030fe(0xc5)+_0x17573f+'\x22');}}static[_0x179c55(0xc3)](_0x850b6e,_0xa3d841,_0x466993){const _0x3e11fe=_0x179c55;switch(_0x850b6e){case storage_type_enum_1[_0x3e11fe(0xc8)]['AWS_S3']:return new deploy_1[(_0x3e11fe(0xd5))](_0xa3d841,_0x466993);case storage_type_enum_1['StorageType'][_0x3e11fe(0xb6)]:return new deploy_1[(_0x3e11fe(0xbf))](_0xa3d841);case storage_type_enum_1[_0x3e11fe(0xc8)]['AZURE_BLOB']:return new deploy_1[(_0x3e11fe(0xcc))](_0xa3d841);default:throw new Error(_0x3e11fe(0xc5)+_0x850b6e+'\x22');}}static[_0x179c55(0xc0)](_0x1d9848,_0x3a472a){const _0x300151=_0x179c55;switch(_0x1d9848){case storage_type_enum_1[_0x300151(0xc8)][_0x300151(0xbb)]:return new delete_1['AwsS3Delete'](_0x3a472a);case storage_type_enum_1['StorageType']['Local']:return new delete_1[(_0x300151(0xc9))](_0x3a472a);case storage_type_enum_1['StorageType']['AZURE_BLOB']:return new delete_1['AzureDelete'](_0x3a472a);default:throw new Error(_0x300151(0xc5)+_0x1d9848+'\x22');}}static['createCredentials'](_0x4a5ae2,_0xa6c91e){const _0xa369af=_0x179c55;switch(_0x4a5ae2){case storage_type_enum_1[_0xa369af(0xc8)]['AWS_S3']:return new credentials_1['AwsS3Credentials'](_0xa6c91e);case storage_type_enum_1[_0xa369af(0xc8)][_0xa369af(0xb6)]:return new credentials_1['LocalCredentials']();case storage_type_enum_1[_0xa369af(0xc8)][_0xa369af(0xbc)]:return new credentials_1[(_0xa369af(0xca))](_0xa6c91e);default:throw new Error(_0xa369af(0xc5)+_0x4a5ae2+'\x22');}}static[_0x179c55(0xd3)](_0x1ac1f0,_0x11ad42){const _0x51965e=_0x179c55;switch(_0x1ac1f0){case storage_type_enum_1[_0x51965e(0xc8)]['AWS_S3']:return new file_size_retriever_1[(_0x51965e(0xd6))](_0x11ad42);case storage_type_enum_1[_0x51965e(0xc8)][_0x51965e(0xb6)]:return new file_size_retriever_1[(_0x51965e(0xd0))](_0x11ad42);case storage_type_enum_1[_0x51965e(0xc8)][_0x51965e(0xbc)]:return new file_size_retriever_1[(_0x51965e(0xd1))](_0x11ad42);default:throw new Error(_0x51965e(0xc5)+_0x1ac1f0+'\x22');}}}exports[_0x179c55(0xce)]=StorageFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x597da5=_0x6c51;function _0x24af(){const _0x4638a9=['send','../utils/aws-s3.utils','apply','throw','HeadObjectCommand','184KxxZbh','sep','__awaiter','execute','24GGdoyL','714qZfLYD','NotFound','37528eEECOb','2zbPzDF','AwsS3FileSizeRetriever','next','ContentLength','13686kmofaw','194046sPgdCJ','@aws-sdk/client-s3','createS3Client','join','value','s3Client','__esModule','382190cxLZyu','default','155782KOxVGW','credentials','86481nCupgX','./base-file-size-retriever','311480HkZNbg','4Fafpzu'];_0x24af=function(){return _0x4638a9;};return _0x24af();}(function(_0x363e5c,_0x40d725){const _0x32079c=_0x6c51,_0x2861a2=_0x363e5c();while(!![]){try{const _0x3aef0b=parseInt(_0x32079c(0x1c9))/0x1+parseInt(_0x32079c(0x1ca))/0x2*(parseInt(_0x32079c(0x1cf))/0x3)+-parseInt(_0x32079c(0x1dd))/0x4*(-parseInt(_0x32079c(0x1d6))/0x5)+-parseInt(_0x32079c(0x1ce))/0x6*(-parseInt(_0x32079c(0x1c7))/0x7)+-parseInt(_0x32079c(0x1c2))/0x8*(parseInt(_0x32079c(0x1da))/0x9)+-parseInt(_0x32079c(0x1dc))/0xa+-parseInt(_0x32079c(0x1d8))/0xb*(parseInt(_0x32079c(0x1c6))/0xc);if(_0x3aef0b===_0x40d725)break;else _0x2861a2['push'](_0x2861a2['shift']());}catch(_0xbe02e5){_0x2861a2['push'](_0x2861a2['shift']());}}}(_0x24af,0x1ff0f));var __awaiter=this&&this[_0x597da5(0x1c4)]||function(_0x1d6ad2,_0x473915,_0x400b65,_0x2e57e9){function _0x2f4db3(_0x51a79a){return _0x51a79a instanceof _0x400b65?_0x51a79a:new _0x400b65(function(_0x3e2beb){_0x3e2beb(_0x51a79a);});}return new(_0x400b65||(_0x400b65=Promise))(function(_0x823957,_0x2b5f14){const _0x50c672=_0x6c51;function _0x340ca3(_0x586877){const _0x19fc7f=_0x6c51;try{_0x16f6ec(_0x2e57e9[_0x19fc7f(0x1cc)](_0x586877));}catch(_0x489e50){_0x2b5f14(_0x489e50);}}function _0x231e9c(_0x2e806e){const _0x5a9bfd=_0x6c51;try{_0x16f6ec(_0x2e57e9[_0x5a9bfd(0x1c0)](_0x2e806e));}catch(_0x2dbf8b){_0x2b5f14(_0x2dbf8b);}}function _0x16f6ec(_0x56a074){const _0x2c2fa7=_0x6c51;_0x56a074['done']?_0x823957(_0x56a074[_0x2c2fa7(0x1d3)]):_0x2f4db3(_0x56a074[_0x2c2fa7(0x1d3)])['then'](_0x340ca3,_0x231e9c);}_0x16f6ec((_0x2e57e9=_0x2e57e9[_0x50c672(0x1bf)](_0x1d6ad2,_0x473915||[]))[_0x50c672(0x1cc)]());});},__importDefault=this&&this['__importDefault']||function(_0x1a99e3){const _0x672d7d=_0x597da5;return _0x1a99e3&&_0x1a99e3[_0x672d7d(0x1d5)]?_0x1a99e3:{'default':_0x1a99e3};};Object['defineProperty'](exports,_0x597da5(0x1d5),{'value':!![]}),exports['AwsS3FileSizeRetriever']=void 0x0;const base_file_size_retriever_1=require(_0x597da5(0x1db)),client_s3_1=require(_0x597da5(0x1d0)),path_1=__importDefault(require('path')),aws_s3_utils_1=require(_0x597da5(0x1be));class AwsS3FileSizeRetriever extends base_file_size_retriever_1['BaseFileSizeRetriever']{constructor(_0x21da48){const _0x3a3ac6=_0x597da5;super(_0x21da48),this[_0x3a3ac6(0x1d4)]=aws_s3_utils_1['AwsS3Utils'][_0x3a3ac6(0x1d1)](_0x21da48);}[_0x597da5(0x1c5)](_0x2f609c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3e4960=_0x6c51,_0xe1249c=_0x2f609c['split'](path_1[_0x3e4960(0x1d7)][_0x3e4960(0x1c3)])[_0x3e4960(0x1d2)](path_1[_0x3e4960(0x1d7)]['posix'][_0x3e4960(0x1c3)]),_0xa9a69=new client_s3_1[(_0x3e4960(0x1c1))]({'Bucket':this[_0x3e4960(0x1d9)]['bucketName'],'Key':_0xe1249c});try{const _0x321650=yield this[_0x3e4960(0x1d4)][_0x3e4960(0x1bd)](_0xa9a69);return _0x321650[_0x3e4960(0x1cd)];}catch(_0x2789b2){if(_0x2789b2['name']===_0x3e4960(0x1c8))return null;throw _0x2789b2;}});}}function _0x6c51(_0xb66707,_0x5c7ecf){const _0x24afdd=_0x24af();return _0x6c51=function(_0x6c5157,_0x1b04f4){_0x6c5157=_0x6c5157-0x1bd;let _0x3500cc=_0x24afdd[_0x6c5157];return _0x3500cc;},_0x6c51(_0xb66707,_0x5c7ecf);}exports[_0x597da5(0x1cb)]=AwsS3FileSizeRetriever;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseFileSizeRetriever } from './base-file-size-retriever';
|
|
2
|
+
import { AzureCredentials } from '../credentials/azure-credentials';
|
|
3
|
+
export declare class AzureFileSizeRetriever extends BaseFileSizeRetriever<AzureCredentials> {
|
|
4
|
+
private readonly containerClient;
|
|
5
|
+
constructor(credentials: AzureCredentials);
|
|
6
|
+
execute(filePath: string): Promise<number>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x186081=_0x4000;function _0x4000(_0x4723f4,_0x2d7f42){const _0x52a106=_0x52a1();return _0x4000=function(_0x400066,_0x1f9f72){_0x400066=_0x400066-0x73;let _0x188c7d=_0x52a106[_0x400066];return _0x188c7d;},_0x4000(_0x4723f4,_0x2d7f42);}(function(_0x1730c3,_0x414b11){const _0x450b67=_0x4000,_0x3eaab1=_0x1730c3();while(!![]){try{const _0xb1c36=-parseInt(_0x450b67(0x87))/0x1*(-parseInt(_0x450b67(0x8c))/0x2)+-parseInt(_0x450b67(0x80))/0x3+-parseInt(_0x450b67(0x90))/0x4+parseInt(_0x450b67(0x7f))/0x5*(parseInt(_0x450b67(0x8f))/0x6)+-parseInt(_0x450b67(0x94))/0x7+parseInt(_0x450b67(0x75))/0x8+parseInt(_0x450b67(0x7d))/0x9;if(_0xb1c36===_0x414b11)break;else _0x3eaab1['push'](_0x3eaab1['shift']());}catch(_0x4dd087){_0x3eaab1['push'](_0x3eaab1['shift']());}}}(_0x52a1,0x4343f));function _0x52a1(){const _0x270ed4=['BaseFileSizeRetriever','2ARDcCQ','value','default','6SZStYU','139244BqxyqA','join','AzureFileSizeRetriever','next','636461xJxvjN','getProperties','defineProperty','contentLength','1608456DfOlZr','NotFound','containerClient','path','./base-file-size-retriever','sep','apply','done','1293714PpAXgB','__importDefault','123405LkWqQV','1251522PorBAp','name','execute','then','__esModule','createAzureBlobContainerClient','posix','448943eqZDjj','__awaiter','../utils/azure.utils','throw'];_0x52a1=function(){return _0x270ed4;};return _0x52a1();}var __awaiter=this&&this[_0x186081(0x88)]||function(_0x125f3e,_0x1978b3,_0x5361d9,_0x1a4968){function _0x3392df(_0x1851a5){return _0x1851a5 instanceof _0x5361d9?_0x1851a5:new _0x5361d9(function(_0x1a9dbc){_0x1a9dbc(_0x1851a5);});}return new(_0x5361d9||(_0x5361d9=Promise))(function(_0x1993eb,_0xdb4638){const _0xf0ad6c=_0x4000;function _0x192d01(_0x17f21b){const _0x10d454=_0x4000;try{_0x4d857d(_0x1a4968[_0x10d454(0x93)](_0x17f21b));}catch(_0x18bc5a){_0xdb4638(_0x18bc5a);}}function _0x424515(_0x36d79e){const _0x19fe00=_0x4000;try{_0x4d857d(_0x1a4968[_0x19fe00(0x8a)](_0x36d79e));}catch(_0x49cbf0){_0xdb4638(_0x49cbf0);}}function _0x4d857d(_0x623219){const _0x5d6c8c=_0x4000;_0x623219[_0x5d6c8c(0x7c)]?_0x1993eb(_0x623219[_0x5d6c8c(0x8d)]):_0x3392df(_0x623219['value'])[_0x5d6c8c(0x83)](_0x192d01,_0x424515);}_0x4d857d((_0x1a4968=_0x1a4968[_0xf0ad6c(0x7b)](_0x125f3e,_0x1978b3||[]))[_0xf0ad6c(0x93)]());});},__importDefault=this&&this[_0x186081(0x7e)]||function(_0xedf3e4){const _0x3ce11d=_0x186081;return _0xedf3e4&&_0xedf3e4[_0x3ce11d(0x84)]?_0xedf3e4:{'default':_0xedf3e4};};Object[_0x186081(0x73)](exports,_0x186081(0x84),{'value':!![]}),exports['AzureFileSizeRetriever']=void 0x0;const base_file_size_retriever_1=require(_0x186081(0x79)),path_1=__importDefault(require(_0x186081(0x78))),azure_utils_1=require(_0x186081(0x89));class AzureFileSizeRetriever extends base_file_size_retriever_1[_0x186081(0x8b)]{constructor(_0x104940){const _0x2057b1=_0x186081;super(_0x104940),this[_0x2057b1(0x77)]=azure_utils_1['AzureUtils'][_0x2057b1(0x85)](this['credentials']);}[_0x186081(0x82)](_0x59cb5d){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x242a5e=_0x4000,_0x288e87=_0x59cb5d['split'](path_1['default']['sep'])[_0x242a5e(0x91)](path_1[_0x242a5e(0x8e)][_0x242a5e(0x86)][_0x242a5e(0x7a)]),_0x3339ac=this[_0x242a5e(0x77)]['getBlockBlobClient'](_0x288e87);try{const _0x339df4=yield _0x3339ac[_0x242a5e(0x95)]();return _0x339df4[_0x242a5e(0x74)];}catch(_0x47621c){if(_0x47621c[_0x242a5e(0x81)]===_0x242a5e(0x76))return null;throw _0x47621c;}});}}exports[_0x186081(0x92)]=AzureFileSizeRetriever;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x194acb=_0x55f4;(function(_0x55fe08,_0x23fdb1){var _0x5995fd=_0x55f4,_0x5404d4=_0x55fe08();while(!![]){try{var _0x1901d2=parseInt(_0x5995fd(0x156))/0x1*(parseInt(_0x5995fd(0x161))/0x2)+-parseInt(_0x5995fd(0x158))/0x3*(-parseInt(_0x5995fd(0x157))/0x4)+-parseInt(_0x5995fd(0x15f))/0x5+parseInt(_0x5995fd(0x15e))/0x6+-parseInt(_0x5995fd(0x15c))/0x7+parseInt(_0x5995fd(0x159))/0x8*(-parseInt(_0x5995fd(0x15a))/0x9)+parseInt(_0x5995fd(0x15d))/0xa;if(_0x1901d2===_0x23fdb1)break;else _0x5404d4['push'](_0x5404d4['shift']());}catch(_0x31eb3f){_0x5404d4['push'](_0x5404d4['shift']());}}}(_0x2a35,0x80667));function _0x55f4(_0x44ebf3,_0x42b1d0){var _0x2a3583=_0x2a35();return _0x55f4=function(_0x55f45d,_0x2ce675){_0x55f45d=_0x55f45d-0x156;var _0x3bf11c=_0x2a3583[_0x55f45d];return _0x3bf11c;},_0x55f4(_0x44ebf3,_0x42b1d0);}Object[_0x194acb(0x160)](exports,'__esModule',{'value':!![]}),exports[_0x194acb(0x15b)]=void 0x0;function _0x2a35(){var _0xdd5814=['68WdIcnN','44187xbAWEF','1971128yqZUwf','9bglxwx','BaseFileSizeRetriever','3188171hAhKjO','2793230kJlDXs','4807926iWKjfc','1225340Vncwrs','defineProperty','4eGePQb','70901iSyLvS'];_0x2a35=function(){return _0xdd5814;};return _0x2a35();}class BaseFileSizeRetriever{constructor(_0x533f20){this['credentials']=_0x533f20;}}exports[_0x194acb(0x15b)]=BaseFileSizeRetriever;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x17b4a5=_0x2f5d;(function(_0x2c728e,_0x29da91){var _0xbb75fd=_0x2f5d,_0x3bcc7d=_0x2c728e();while(!![]){try{var _0x153016=parseInt(_0xbb75fd(0x160))/0x1*(parseInt(_0xbb75fd(0x169))/0x2)+parseInt(_0xbb75fd(0x158))/0x3+-parseInt(_0xbb75fd(0x15e))/0x4+parseInt(_0xbb75fd(0x162))/0x5+parseInt(_0xbb75fd(0x15a))/0x6+parseInt(_0xbb75fd(0x16c))/0x7*(-parseInt(_0xbb75fd(0x15c))/0x8)+-parseInt(_0xbb75fd(0x16b))/0x9;if(_0x153016===_0x29da91)break;else _0x3bcc7d['push'](_0x3bcc7d['shift']());}catch(_0x33cc27){_0x3bcc7d['push'](_0x3bcc7d['shift']());}}}(_0x2970,0xf33c0));function _0x2f5d(_0x2ef412,_0x552035){var _0x297073=_0x2970();return _0x2f5d=function(_0x2f5d7e,_0x430c5d){_0x2f5d7e=_0x2f5d7e-0x157;var _0x164a52=_0x297073[_0x2f5d7e];return _0x164a52;},_0x2f5d(_0x2ef412,_0x552035);}var __createBinding=this&&this[_0x17b4a5(0x168)]||(Object[_0x17b4a5(0x15d)]?function(_0x1850d5,_0x254965,_0x4a9ede,_0x3e3dca){var _0x175a63=_0x17b4a5;if(_0x3e3dca===undefined)_0x3e3dca=_0x4a9ede;var _0x293f32=Object[_0x175a63(0x16a)](_0x254965,_0x4a9ede);(!_0x293f32||(_0x175a63(0x15f)in _0x293f32?!_0x254965['__esModule']:_0x293f32[_0x175a63(0x167)]||_0x293f32['configurable']))&&(_0x293f32={'enumerable':!![],'get':function(){return _0x254965[_0x4a9ede];}}),Object[_0x175a63(0x157)](_0x1850d5,_0x3e3dca,_0x293f32);}:function(_0x33231a,_0x3fad4b,_0x411283,_0x3360a4){if(_0x3360a4===undefined)_0x3360a4=_0x411283;_0x33231a[_0x3360a4]=_0x3fad4b[_0x411283];}),__exportStar=this&&this[_0x17b4a5(0x159)]||function(_0x4d0df0,_0x389a44){var _0x20ca43=_0x17b4a5;for(var _0x48538a in _0x4d0df0)if(_0x48538a!==_0x20ca43(0x166)&&!Object[_0x20ca43(0x16d)][_0x20ca43(0x165)][_0x20ca43(0x163)](_0x389a44,_0x48538a))__createBinding(_0x389a44,_0x4d0df0,_0x48538a);};Object[_0x17b4a5(0x157)](exports,_0x17b4a5(0x164),{'value':!![]}),__exportStar(require(_0x17b4a5(0x161)),exports),__exportStar(require(_0x17b4a5(0x15b)),exports),__exportStar(require(_0x17b4a5(0x16e)),exports),__exportStar(require('./azure-file-size-retriever'),exports);function _0x2970(){var _0x312508=['create','5875136NrlILv','get','6181DuamvY','./base-file-size-retriever','5680070PeTnPI','call','__esModule','hasOwnProperty','default','writable','__createBinding','534NnUWnS','getOwnPropertyDescriptor','5827887pnfsmC','6379226LAnDhN','prototype','./local-size-retriever','defineProperty','2502753CDucQG','__exportStar','2420046xpiqfx','./aws-s3-file-size-retriever','8oiuFXD'];_0x2970=function(){return _0x312508;};return _0x2970();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x177f(_0x9630e8,_0x3cc010){const _0x4d30f3=_0x4d30();return _0x177f=function(_0x177f68,_0x48d59b){_0x177f68=_0x177f68-0xd9;let _0x56a814=_0x4d30f3[_0x177f68];return _0x56a814;},_0x177f(_0x9630e8,_0x3cc010);}const _0x1ae582=_0x177f;function _0x4d30(){const _0x3e9809=['__awaiter','2541217HYKkyW','defineProperty','next','catch','stat','2431100VJpjnK','then','value','BaseFileSizeRetriever','650452OzvEVv','3357942qJZqgA','3985496sToRin','size','4YGaonX','LocalFileSizeRetriever','apply','842193tJloiF','done','225669CChrAN'];_0x4d30=function(){return _0x3e9809;};return _0x4d30();}(function(_0x2a0a82,_0x57674d){const _0x45ccda=_0x177f,_0x5b3a2b=_0x2a0a82();while(!![]){try{const _0xd4c354=-parseInt(_0x45ccda(0xd9))/0x1+parseInt(_0x45ccda(0xe8))/0x2*(parseInt(_0x45ccda(0xeb))/0x3)+-parseInt(_0x45ccda(0xe4))/0x4+parseInt(_0x45ccda(0xe0))/0x5+parseInt(_0x45ccda(0xe5))/0x6+-parseInt(_0x45ccda(0xdb))/0x7+-parseInt(_0x45ccda(0xe6))/0x8;if(_0xd4c354===_0x57674d)break;else _0x5b3a2b['push'](_0x5b3a2b['shift']());}catch(_0x3314b9){_0x5b3a2b['push'](_0x5b3a2b['shift']());}}}(_0x4d30,0x575cf));var __awaiter=this&&this[_0x1ae582(0xda)]||function(_0x55dae7,_0x3fe1e7,_0x88d224,_0x229f85){function _0x32b0bf(_0x3917ec){return _0x3917ec instanceof _0x88d224?_0x3917ec:new _0x88d224(function(_0x2a53d6){_0x2a53d6(_0x3917ec);});}return new(_0x88d224||(_0x88d224=Promise))(function(_0x4a2884,_0x442134){const _0x5215d1=_0x177f;function _0x267194(_0xd9926a){try{_0x1159d5(_0x229f85['next'](_0xd9926a));}catch(_0x16d60c){_0x442134(_0x16d60c);}}function _0x2d1240(_0x55e29b){try{_0x1159d5(_0x229f85['throw'](_0x55e29b));}catch(_0x530931){_0x442134(_0x530931);}}function _0x1159d5(_0x25e15a){const _0x2779fa=_0x177f;_0x25e15a[_0x2779fa(0xec)]?_0x4a2884(_0x25e15a[_0x2779fa(0xe2)]):_0x32b0bf(_0x25e15a[_0x2779fa(0xe2)])[_0x2779fa(0xe1)](_0x267194,_0x2d1240);}_0x1159d5((_0x229f85=_0x229f85[_0x5215d1(0xea)](_0x55dae7,_0x3fe1e7||[]))[_0x5215d1(0xdd)]());});};Object[_0x1ae582(0xdc)](exports,'__esModule',{'value':!![]}),exports[_0x1ae582(0xe9)]=void 0x0;const _1=require('./'),promises_1=require('fs/promises');class LocalFileSizeRetriever extends _1[_0x1ae582(0xe3)]{['execute'](_0x5aec1a){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x551467=_0x177f;return(0x0,promises_1[_0x551467(0xdf)])(_0x5aec1a)[_0x551467(0xe1)](_0x24a052=>_0x24a052[_0x551467(0xe7)])[_0x551467(0xde)](()=>null);});}}exports[_0x1ae582(0xe9)]=LocalFileSizeRetriever;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x46ef5e=_0x2367;function _0x2367(_0x3190cf,_0x4ea569){var _0x7c2f92=_0x7c2f();return _0x2367=function(_0x236744,_0x2bdd9e){_0x236744=_0x236744-0x18b;var _0x205666=_0x7c2f92[_0x236744];return _0x205666;},_0x2367(_0x3190cf,_0x4ea569);}function _0x7c2f(){var _0x336cf4=['getOwnPropertyDescriptor','configurable','10IzYEln','get','./credentials','1109272XitkID','defineProperty','writable','__createBinding','./file-size-retriever','31406nnItBH','./retrieve','109HXFeMb','hasOwnProperty','40920HplUSI','4022586uvoqXx','prototype','8573080SiEnCv','StorageFactory','456709crsyll','./init','5120976WUMWfn','./factory','call','4EoTupc','1589IraiPb','1284zyNYgG','__esModule','default','./types','__exportStar'];_0x7c2f=function(){return _0x336cf4;};return _0x7c2f();}(function(_0x231812,_0x43355b){var _0x196222=_0x2367,_0x1d1ee5=_0x231812();while(!![]){try{var _0x2ce7b5=parseInt(_0x196222(0x1a1))/0x1*(-parseInt(_0x196222(0x19f))/0x2)+parseInt(_0x196222(0x18b))/0x3*(-parseInt(_0x196222(0x18e))/0x4)+parseInt(_0x196222(0x1a6))/0x5+-parseInt(_0x196222(0x1a3))/0x6*(parseInt(_0x196222(0x18f))/0x7)+parseInt(_0x196222(0x19a))/0x8+parseInt(_0x196222(0x1a4))/0x9*(-parseInt(_0x196222(0x197))/0xa)+-parseInt(_0x196222(0x1a8))/0xb*(-parseInt(_0x196222(0x190))/0xc);if(_0x2ce7b5===_0x43355b)break;else _0x1d1ee5['push'](_0x1d1ee5['shift']());}catch(_0x15f97b){_0x1d1ee5['push'](_0x1d1ee5['shift']());}}}(_0x7c2f,0xd75af));var __createBinding=this&&this[_0x46ef5e(0x19d)]||(Object['create']?function(_0x42e7a7,_0x43acdf,_0x5f13bb,_0x1d4d61){var _0x2e7803=_0x46ef5e;if(_0x1d4d61===undefined)_0x1d4d61=_0x5f13bb;var _0x1bcb7b=Object[_0x2e7803(0x195)](_0x43acdf,_0x5f13bb);(!_0x1bcb7b||(_0x2e7803(0x198)in _0x1bcb7b?!_0x43acdf['__esModule']:_0x1bcb7b[_0x2e7803(0x19c)]||_0x1bcb7b[_0x2e7803(0x196)]))&&(_0x1bcb7b={'enumerable':!![],'get':function(){return _0x43acdf[_0x5f13bb];}}),Object[_0x2e7803(0x19b)](_0x42e7a7,_0x1d4d61,_0x1bcb7b);}:function(_0x4a266c,_0x43ecf8,_0x339f18,_0x4189fb){if(_0x4189fb===undefined)_0x4189fb=_0x339f18;_0x4a266c[_0x4189fb]=_0x43ecf8[_0x339f18];}),__exportStar=this&&this[_0x46ef5e(0x194)]||function(_0x46a032,_0x5de4aa){var _0x4e70e9=_0x46ef5e;for(var _0x495105 in _0x46a032)if(_0x495105!==_0x4e70e9(0x192)&&!Object[_0x4e70e9(0x1a5)][_0x4e70e9(0x1a2)][_0x4e70e9(0x18d)](_0x5de4aa,_0x495105))__createBinding(_0x5de4aa,_0x46a032,_0x495105);};Object['defineProperty'](exports,_0x46ef5e(0x191),{'value':!![]}),exports[_0x46ef5e(0x1a7)]=void 0x0,require(_0x46ef5e(0x1a9)),__exportStar(require(_0x46ef5e(0x199)),exports),__exportStar(require('./delete'),exports),__exportStar(require('./deploy'),exports),__exportStar(require(_0x46ef5e(0x1a0)),exports);var factory_1=require(_0x46ef5e(0x18c));Object['defineProperty'](exports,_0x46ef5e(0x1a7),{'enumerable':!![],'get':function(){var _0x46f165=_0x46ef5e;return factory_1[_0x46f165(0x1a7)];}}),__exportStar(require(_0x46ef5e(0x193)),exports),__exportStar(require(_0x46ef5e(0x19e)),exports);
|
package/dist/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x23924e=_0x4ad5;(function(_0x107e3e,_0x5b8862){const _0x335c9=_0x4ad5,_0x3567c1=_0x107e3e();while(!![]){try{const _0x4dd784=parseInt(_0x335c9(0x9c))/0x1+-parseInt(_0x335c9(0x90))/0x2*(-parseInt(_0x335c9(0x8a))/0x3)+parseInt(_0x335c9(0x9a))/0x4+-parseInt(_0x335c9(0x9d))/0x5*(-parseInt(_0x335c9(0x99))/0x6)+-parseInt(_0x335c9(0x95))/0x7*(parseInt(_0x335c9(0x94))/0x8)+parseInt(_0x335c9(0x93))/0x9*(parseInt(_0x335c9(0x8d))/0xa)+parseInt(_0x335c9(0x8e))/0xb*(-parseInt(_0x335c9(0x8c))/0xc);if(_0x4dd784===_0x5b8862)break;else _0x3567c1['push'](_0x3567c1['shift']());}catch(_0x33290c){_0x3567c1['push'](_0x3567c1['shift']());}}}(_0x37a3,0xad7f5));Object[_0x23924e(0x8b)](exports,_0x23924e(0x9b),{'value':!![]}),exports[_0x23924e(0x97)]=void 0x0;const https_proxy_agent_1=require(_0x23924e(0x96)),node_http_handler_1=require(_0x23924e(0x92));class HttpHandler extends node_http_handler_1[_0x23924e(0x9f)]{constructor(){const _0x4bd1e0=_0x23924e;if(process[_0x4bd1e0(0x8f)]['HTTP_PROXY']||process[_0x4bd1e0(0x8f)][_0x4bd1e0(0x9e)]){const _0x20c521=new https_proxy_agent_1[(_0x4bd1e0(0x91))](process[_0x4bd1e0(0x8f)][_0x4bd1e0(0x98)]||process[_0x4bd1e0(0x8f)][_0x4bd1e0(0x9e)]);super({'httpAgent':_0x20c521,'httpsAgent':_0x20c521});}else super({});}}function _0x4ad5(_0x2531de,_0xc536f5){const _0x37a3eb=_0x37a3();return _0x4ad5=function(_0x4ad5bb,_0x23e935){_0x4ad5bb=_0x4ad5bb-0x8a;let _0x1f4485=_0x37a3eb[_0x4ad5bb];return _0x1f4485;},_0x4ad5(_0x2531de,_0xc536f5);}exports['HttpHandler']=HttpHandler;function _0x37a3(){const _0x4d287d=['HttpsProxyAgent','@smithy/node-http-handler','36099XIXspF','3430808qkQCpb','14ySOluk','https-proxy-agent','HttpHandler','HTTP_PROXY','4038pHovsJ','2979332edmQQw','__esModule','736223cntKJQ','2065xZZjGW','HTTPS_PROXY','NodeHttpHandler','3966699WkQkXt','defineProperty','72cxqcHw','3490Anoqtu','5340005TKeflF','env','2rwBPHT'];_0x37a3=function(){return _0x4d287d;};return _0x37a3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x223ff0=_0x5b8f;(function(_0x2b7d93,_0x4139f6){const _0x330fa8=_0x5b8f,_0x46eccb=_0x2b7d93();while(!![]){try{const _0x20c880=-parseInt(_0x330fa8(0x82))/0x1*(parseInt(_0x330fa8(0x90))/0x2)+parseInt(_0x330fa8(0x74))/0x3+-parseInt(_0x330fa8(0x8a))/0x4+parseInt(_0x330fa8(0x7c))/0x5*(-parseInt(_0x330fa8(0x79))/0x6)+parseInt(_0x330fa8(0x88))/0x7+-parseInt(_0x330fa8(0x78))/0x8*(parseInt(_0x330fa8(0x6c))/0x9)+-parseInt(_0x330fa8(0x6f))/0xa*(-parseInt(_0x330fa8(0x77))/0xb);if(_0x20c880===_0x4139f6)break;else _0x46eccb['push'](_0x46eccb['shift']());}catch(_0x1ac230){_0x46eccb['push'](_0x46eccb['shift']());}}}(_0x3879,0x4f0cb));function _0x5b8f(_0x35763,_0xa8fae){const _0x387984=_0x3879();return _0x5b8f=function(_0x5b8f20,_0x3652d7){_0x5b8f20=_0x5b8f20-0x69;let _0x4e4fd0=_0x387984[_0x5b8f20];return _0x4e4fd0;},_0x5b8f(_0x35763,_0xa8fae);}var __awaiter=this&&this[_0x223ff0(0x8c)]||function(_0x176afa,_0x1b30fc,_0x5460f6,_0x5f0996){function _0x49c779(_0x4440d8){return _0x4440d8 instanceof _0x5460f6?_0x4440d8:new _0x5460f6(function(_0x4747c8){_0x4747c8(_0x4440d8);});}return new(_0x5460f6||(_0x5460f6=Promise))(function(_0x5c93a5,_0xa397cc){const _0x3e72bd=_0x5b8f;function _0x31cca8(_0x8c117f){const _0x249aa7=_0x5b8f;try{_0x1f5eb4(_0x5f0996[_0x249aa7(0x83)](_0x8c117f));}catch(_0xc8ec7a){_0xa397cc(_0xc8ec7a);}}function _0x48da1b(_0x2ab96e){const _0x527ecb=_0x5b8f;try{_0x1f5eb4(_0x5f0996[_0x527ecb(0x76)](_0x2ab96e));}catch(_0x214ad9){_0xa397cc(_0x214ad9);}}function _0x1f5eb4(_0x44d7c1){const _0x84d344=_0x5b8f;_0x44d7c1[_0x84d344(0x93)]?_0x5c93a5(_0x44d7c1[_0x84d344(0x80)]):_0x49c779(_0x44d7c1[_0x84d344(0x80)])[_0x84d344(0x8b)](_0x31cca8,_0x48da1b);}_0x1f5eb4((_0x5f0996=_0x5f0996[_0x3e72bd(0x6d)](_0x176afa,_0x1b30fc||[]))[_0x3e72bd(0x83)]());});},__importDefault=this&&this['__importDefault']||function(_0x4571b0){const _0xc2ed7=_0x223ff0;return _0x4571b0&&_0x4571b0[_0xc2ed7(0x85)]?_0x4571b0:{'default':_0x4571b0};};Object[_0x223ff0(0x89)](exports,'__esModule',{'value':!![]}),exports[_0x223ff0(0x73)]=void 0x0;const init_1=require(_0x223ff0(0x8d)),client_s3_1=require(_0x223ff0(0x69)),path_1=__importDefault(require(_0x223ff0(0x86))),stream_1=require(_0x223ff0(0x6e)),unzipper_1=__importDefault(require(_0x223ff0(0x7f)));function _0x3879(){const _0x461523=['unzipper','value','default','1TqqwUZ','next','Body','__esModule','path','s3Client','1995560zrpLFs','defineProperty','2464968ZYUqtx','then','__awaiter','../init','Error\x20retrieving\x20a\x20file\x20with\x20key\x20\x27','Open','867710cbkbgc','basePrefix','Failed\x20to\x20validate\x20storage\x20credentials.\x20Raw\x20error:\x20','done','@aws-sdk/client-s3','Cannot\x20get\x20stream\x20for\x20a\x20file:\x20','join','42903hObATA','apply','stream','5896610wlWtTM','getOutput','HeadBucketCommand','getZipFileMeta','AwsS3ImportHelper','572577XVLMzN','s3_v3','throw','22vNPGJh','248rTkrNc','25050SplOFu','send','Readable','160qHLcKL','bucketName','message'];_0x3879=function(){return _0x461523;};return _0x3879();}class AwsS3ImportHelper{constructor({basePrefix:_0xd3db4e,bucketName:_0x469490,region:_0x1c7dc3,credentials:_0x133b4f}){const _0x402fa6=_0x223ff0;this['basePrefix']=_0xd3db4e!==null&&_0xd3db4e!==void 0x0?_0xd3db4e:'',this[_0x402fa6(0x7d)]=_0x469490,this[_0x402fa6(0x87)]=new client_s3_1['S3Client']({'region':_0x1c7dc3,'credentials':_0x133b4f,'requestHandler':new init_1['HttpHandler']()});}[_0x223ff0(0x70)](_0x3f1d6f){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5ee9d3=_0x5b8f;try{const _0x3b1555=new client_s3_1['GetObjectCommand']({'Bucket':this[_0x5ee9d3(0x7d)],'Key':_0x3f1d6f});return yield this[_0x5ee9d3(0x87)][_0x5ee9d3(0x7a)](_0x3b1555);}catch(_0x5b8f2e){throw new Error(_0x5ee9d3(0x8e)+_0x3f1d6f+'\x27\x20from\x20S3:\x0a'+_0x5b8f2e[_0x5ee9d3(0x7e)]);}});}['ls'](_0x190e78){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x14462e=_0x5b8f,{prefix:_0xeb9af0,delimiter:_0x35e721}=_0x190e78!==null&&_0x190e78!==void 0x0?_0x190e78:{},_0x198fee=path_1[_0x14462e(0x81)][_0x14462e(0x6b)](this[_0x14462e(0x91)],_0xeb9af0!==null&&_0xeb9af0!==void 0x0?_0xeb9af0:''),_0x221933=new client_s3_1['ListObjectsCommand']({'Prefix':_0x198fee,'Bucket':this[_0x14462e(0x7d)],'Delimiter':_0x35e721});return this['s3Client']['send'](_0x221933);});}[_0x223ff0(0x6e)](_0x373894){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x38f20f=_0x5b8f,_0x15843e=yield this[_0x38f20f(0x70)](_0x373894);if(_0x15843e[_0x38f20f(0x84)]instanceof stream_1[_0x38f20f(0x7b)])return _0x15843e[_0x38f20f(0x84)];throw new Error(_0x38f20f(0x6a)+_0x373894);});}[_0x223ff0(0x72)](_0xbcae51){const _0x1efb7c=_0x223ff0;return unzipper_1[_0x1efb7c(0x81)][_0x1efb7c(0x8f)][_0x1efb7c(0x75)](this[_0x1efb7c(0x87)],{'Bucket':this[_0x1efb7c(0x7d)],'Key':_0xbcae51});}['validateAccess'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x232926=_0x5b8f;try{const _0x102ae6=new client_s3_1[(_0x232926(0x71))]({'Bucket':this[_0x232926(0x7d)]});yield this[_0x232926(0x87)][_0x232926(0x7a)](_0x102ae6);}catch(_0x3df55){throw new Error(_0x232926(0x92)+_0x3df55[_0x232926(0x7e)]);}});}}exports[_0x223ff0(0x73)]=AwsS3ImportHelper;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { BaseRetrieve } from './';
|
|
3
2
|
import { AwsS3Credentials } from '../credentials';
|
|
4
3
|
import { FileInfo } from '../types/internal.types';
|
|
5
|
-
import { Readable } from 'stream';
|
|
6
4
|
import { Tier } from '@aws-sdk/client-s3';
|
|
7
5
|
export declare class AwsS3Retrieve extends BaseRetrieve<AwsS3Credentials> {
|
|
8
6
|
private readonly restoreType;
|
|
@@ -12,7 +10,7 @@ export declare class AwsS3Retrieve extends BaseRetrieve<AwsS3Credentials> {
|
|
|
12
10
|
private readonly s3Client;
|
|
13
11
|
private files;
|
|
14
12
|
constructor(credentials: AwsS3Credentials, path: string, restoreType: Tier, cachePath?: string | undefined);
|
|
15
|
-
|
|
13
|
+
waitUntilRetrieveDone(): Promise<void>;
|
|
16
14
|
execute(): Promise<FileInfo>;
|
|
17
15
|
private fetchFileInfo;
|
|
18
16
|
private restoreFile;
|
|
@@ -22,5 +20,4 @@ export declare class AwsS3Retrieve extends BaseRetrieve<AwsS3Credentials> {
|
|
|
22
20
|
private runRestoreFiles;
|
|
23
21
|
private updateFilesRetrieveStatus;
|
|
24
22
|
private checkFilesRetrieveStatus;
|
|
25
|
-
createCacheFileStream(stream: Readable): Promise<Readable>;
|
|
26
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x4ce0(){const _0x229670=['cachePath','@aws-sdk/client-s3','checkFilesRetrieveStatus','filter','tryRestoreFilesFromCloud','setTimeout','send','Readable','extractFileRetrieveStatusFromFileInfo','RestoreObjectCommand','AwsFileRetrieveStatus','STANDARD','defineProperty','errorMessage','init','updateFilesRetrieveStatus','CHECK_RESTORED_TIMEOUT','../types/retrieve-status.enum','split','throw','RetrieveStatus','Exception','shift','join','RETRIEVE_STATUS_CHECK_TIMEOUT','266060ngtTMU','status','sep','__importDefault','timers/promises','986687TlnuJS','HeadObjectCommand','done','55rMNhIb','waitUntilRetrieveDone','10PRlFNn','1351BuoTrW','path','stream','CacheUtils','s3Client','then','BaseRetrieve','24739880wrsyer','__esModule','restoreType','restoreFile','113926cMVOEl','push','next','../types/aws.types','default','some','Body\x20is\x20not\x20supported\x20type','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','InProgress','NeedRestore','bucketName','createS3Client','posix','3436088xuCyMc','catch','StorageClass','51IUXLWk','credentials','22584sgPEwB','No\x20files\x20left\x20to\x20execute.','AwsS3Retrieve','createCacheFileStream','getFilesPaths','8862849WMHlHC','files','fetchFileBody','value','fetchFileInfo','AwsS3Utils','apply','Restoring','GetObjectCommand','__awaiter','length'];_0x4ce0=function(){return _0x229670;};return _0x4ce0();}const _0x98d1f0=_0x32fa;(function(_0x3c1dd1,_0x707bb6){const _0x23b1f9=_0x32fa,_0x1acab4=_0x3c1dd1();while(!![]){try{const _0x59d7dc=parseInt(_0x23b1f9(0xc6))/0x1+-parseInt(_0x23b1f9(0xd7))/0x2*(parseInt(_0x23b1f9(0xe7))/0x3)+parseInt(_0x23b1f9(0xc1))/0x4*(parseInt(_0x23b1f9(0xc9))/0x5)+parseInt(_0x23b1f9(0xe9))/0x6*(parseInt(_0x23b1f9(0xcc))/0x7)+parseInt(_0x23b1f9(0xe4))/0x8+parseInt(_0x23b1f9(0xee))/0x9+-parseInt(_0x23b1f9(0xcb))/0xa*(parseInt(_0x23b1f9(0xd3))/0xb);if(_0x59d7dc===_0x707bb6)break;else _0x1acab4['push'](_0x1acab4['shift']());}catch(_0x158971){_0x1acab4['push'](_0x1acab4['shift']());}}}(_0x4ce0,0x9ca59));function _0x32fa(_0x5416a7,_0x3c111c){const _0x4ce04f=_0x4ce0();return _0x32fa=function(_0x32fa1d,_0x5c4839){_0x32fa1d=_0x32fa1d-0xab;let _0x99f39d=_0x4ce04f[_0x32fa1d];return _0x99f39d;},_0x32fa(_0x5416a7,_0x3c111c);}var __awaiter=this&&this[_0x98d1f0(0xf7)]||function(_0x20f7ee,_0x33b428,_0x378931,_0x2f8242){function _0x4c16cf(_0x687bc4){return _0x687bc4 instanceof _0x378931?_0x687bc4:new _0x378931(function(_0x1909a7){_0x1909a7(_0x687bc4);});}return new(_0x378931||(_0x378931=Promise))(function(_0x1b9a24,_0xccec34){const _0x14f0e7=_0x32fa;function _0x349150(_0x33c456){const _0x2ae036=_0x32fa;try{_0x3d6a4c(_0x2f8242[_0x2ae036(0xd9)](_0x33c456));}catch(_0x18ad5a){_0xccec34(_0x18ad5a);}}function _0x17c747(_0x436151){const _0x4ef242=_0x32fa;try{_0x3d6a4c(_0x2f8242[_0x4ef242(0xbb)](_0x436151));}catch(_0x4298cb){_0xccec34(_0x4298cb);}}function _0x3d6a4c(_0x2d4380){const _0xb18955=_0x32fa;_0x2d4380[_0xb18955(0xc8)]?_0x1b9a24(_0x2d4380[_0xb18955(0xf1)]):_0x4c16cf(_0x2d4380['value'])[_0xb18955(0xd1)](_0x349150,_0x17c747);}_0x3d6a4c((_0x2f8242=_0x2f8242[_0x14f0e7(0xf4)](_0x20f7ee,_0x33b428||[]))[_0x14f0e7(0xd9)]());});},__importDefault=this&&this[_0x98d1f0(0xc4)]||function(_0x1943bf){const _0x2be240=_0x98d1f0;return _0x1943bf&&_0x1943bf[_0x2be240(0xd4)]?_0x1943bf:{'default':_0x1943bf};};Object[_0x98d1f0(0xb4)](exports,_0x98d1f0(0xd4),{'value':!![]}),exports[_0x98d1f0(0xeb)]=void 0x0;const path_1=__importDefault(require(_0x98d1f0(0xcd))),promises_1=require(_0x98d1f0(0xc5)),aws_s3_utils_1=require('../utils/aws-s3.utils'),_1=require('./'),aws_types_1=require(_0x98d1f0(0xda)),retrieve_status_enum_1=require(_0x98d1f0(0xb9)),stream_1=require('stream'),client_s3_1=require(_0x98d1f0(0xfa)),cache_utils_1=require('../utils/cache.utils');class AwsS3Retrieve extends _1[_0x98d1f0(0xd2)]{constructor(_0x454c58,_0x4b4483,_0x347f90,_0x593b5b){const _0x3bf043=_0x98d1f0,_0x5bd2c4=_0x4b4483[_0x3bf043(0xba)](path_1[_0x3bf043(0xdb)][_0x3bf043(0xc3)])[_0x3bf043(0xbf)](path_1[_0x3bf043(0xdb)][_0x3bf043(0xe3)]['sep']);super(_0x454c58,_0x5bd2c4),this[_0x3bf043(0xd5)]=_0x347f90,this[_0x3bf043(0xf9)]=_0x593b5b,this['CHECK_RESTORED_TIMEOUT']=0x7530,this[_0x3bf043(0xc0)]=0x3e8,this[_0x3bf043(0xef)]=[],this['s3Client']=aws_s3_utils_1['AwsS3Utils'][_0x3bf043(0xe2)](_0x454c58);}['waitUntilRetrieveDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xac10f9=_0x32fa;this[_0xac10f9(0xc2)]===retrieve_status_enum_1[_0xac10f9(0xbc)]['Uninitialized']&&(yield this['init'](),yield this[_0xac10f9(0xca)]());switch(this[_0xac10f9(0xc2)]){case retrieve_status_enum_1[_0xac10f9(0xbc)][_0xac10f9(0xdf)]:yield(0x0,promises_1[_0xac10f9(0xad)])(this[_0xac10f9(0xc0)]),yield this[_0xac10f9(0xca)]();break;case retrieve_status_enum_1[_0xac10f9(0xbc)]['Exception']:throw new Error(this[_0xac10f9(0xb5)]);}});}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4a7a54=_0x32fa;if(this[_0x4a7a54(0xc2)]===retrieve_status_enum_1[_0x4a7a54(0xbc)]['InProgress'])throw new Error(_0x4a7a54(0xde));if(this['isDone']||!this[_0x4a7a54(0xef)][_0x4a7a54(0xf8)])throw new Error(_0x4a7a54(0xea));const _0xb507c4=this[_0x4a7a54(0xef)][_0x4a7a54(0xbe)]();let _0x467f67;return!this[_0x4a7a54(0xf9)]?_0x467f67=yield this[_0x4a7a54(0xf0)](_0xb507c4[_0x4a7a54(0xcd)]):_0x467f67=yield cache_utils_1[_0x4a7a54(0xcf)][_0x4a7a54(0xec)](yield this['fetchFileBody'](_0xb507c4[_0x4a7a54(0xcd)]),this[_0x4a7a54(0xf9)]),this['isDone']=!this[_0x4a7a54(0xef)][_0x4a7a54(0xf8)],{'path':this[_0x4a7a54(0xcd)][_0x4a7a54(0xba)](path_1['default'][_0x4a7a54(0xe3)][_0x4a7a54(0xc3)])['join'](path_1[_0x4a7a54(0xdb)][_0x4a7a54(0xc3)]),'content':_0x467f67};});}[_0x98d1f0(0xf2)](_0xabf615){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xbdafd=_0x32fa,_0x4f43b9=new client_s3_1[(_0xbdafd(0xc7))]({'Bucket':this[_0xbdafd(0xe8)]['bucketName'],'Key':_0xabf615}),{StorageClass:_0x5bace5,Restore:_0x1caa99}=yield this['s3Client'][_0xbdafd(0xae)](_0x4f43b9);return{'StorageClass':_0x5bace5,'Restore':_0x1caa99};});}[_0x98d1f0(0xd6)](_0x4c2280){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x24795d=_0x32fa,_0x900ce7=new client_s3_1[(_0x24795d(0xb1))]({'Bucket':this[_0x24795d(0xe8)][_0x24795d(0xe1)],'Key':_0x4c2280,'RestoreRequest':{'Days':0x1,'GlacierJobParameters':{'Tier':this[_0x24795d(0xd5)]}}});yield this[_0x24795d(0xd0)][_0x24795d(0xae)](_0x900ce7);});}[_0x98d1f0(0xf0)](_0x389d2b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x373d4a=_0x32fa,_0x5bd888=new client_s3_1[(_0x373d4a(0xf6))]({'Bucket':this['credentials'][_0x373d4a(0xe1)],'Key':_0x389d2b,'ResponseContentType':_0x373d4a(0xce)}),{Body:_0x4a6917}=yield this[_0x373d4a(0xd0)][_0x373d4a(0xae)](_0x5bd888);if(_0x4a6917 instanceof stream_1[_0x373d4a(0xaf)])return _0x4a6917;throw new Error(_0x373d4a(0xdd));});}[_0x98d1f0(0xb6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x24ec8b=_0x32fa;yield this[_0x24ec8b(0xac)](),yield this['runRestoreFiles'](),this[_0x24ec8b(0xc2)]=retrieve_status_enum_1['RetrieveStatus'][_0x24ec8b(0xdf)],this[_0x24ec8b(0xfb)]()[_0x24ec8b(0xe5)](_0x3ab2f1=>{const _0x1de686=_0x24ec8b;this['status']=retrieve_status_enum_1[_0x1de686(0xbc)][_0x1de686(0xbd)],this[_0x1de686(0xb5)]=_0x3ab2f1['message'];});});}[_0x98d1f0(0xac)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x208548=_0x32fa,_0x7cd2f0=yield aws_s3_utils_1['AwsS3Utils'][_0x208548(0xed)](this['path'],this['credentials'][_0x208548(0xe1)],this['s3Client']);for(const _0x1ea56c of _0x7cd2f0){const _0x1e71a3=yield this['fetchFileInfo'](_0x1ea56c);this[_0x208548(0xef)][_0x208548(0xd8)]({'path':_0x1ea56c,'class':_0x1e71a3[_0x208548(0xe6)]||_0x208548(0xb3),'status':aws_s3_utils_1[_0x208548(0xf3)][_0x208548(0xb0)](_0x1e71a3)});}});}['runRestoreFiles'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5b9aea=_0x32fa,_0x15b850=this['files'][_0x5b9aea(0xab)](_0x8ef5fb=>_0x8ef5fb[_0x5b9aea(0xc2)]===aws_types_1[_0x5b9aea(0xb2)][_0x5b9aea(0xe0)]);for(const _0x1c375f of _0x15b850){yield this[_0x5b9aea(0xd6)](_0x1c375f[_0x5b9aea(0xcd)]),_0x1c375f[_0x5b9aea(0xc2)]=aws_types_1['AwsFileRetrieveStatus'][_0x5b9aea(0xf5)];}});}[_0x98d1f0(0xb7)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2a7ec9=_0x32fa,_0x40cea1=this['files'][_0x2a7ec9(0xab)](_0x51f047=>_0x51f047[_0x2a7ec9(0xc2)]===aws_types_1[_0x2a7ec9(0xb2)][_0x2a7ec9(0xf5)]);for(const _0x53ea29 of _0x40cea1){const _0x5d039e=yield this[_0x2a7ec9(0xf2)](_0x53ea29[_0x2a7ec9(0xcd)]);_0x53ea29['status']=aws_s3_utils_1[_0x2a7ec9(0xf3)][_0x2a7ec9(0xb0)](_0x5d039e);}});}['checkFilesRetrieveStatus'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x99ea1d=_0x32fa,_0x5525d7=this[_0x99ea1d(0xef)][_0x99ea1d(0xdc)](_0x55400e=>_0x55400e[_0x99ea1d(0xc2)]===aws_types_1[_0x99ea1d(0xb2)][_0x99ea1d(0xf5)]);this[_0x99ea1d(0xc2)]=_0x5525d7?retrieve_status_enum_1['RetrieveStatus'][_0x99ea1d(0xdf)]:retrieve_status_enum_1['RetrieveStatus']['Completed'],_0x5525d7&&(yield(0x0,promises_1['setTimeout'])(this[_0x99ea1d(0xb8)]),yield this[_0x99ea1d(0xb7)](),yield this[_0x99ea1d(0xfb)]());});}}exports['AwsS3Retrieve']=AwsS3Retrieve;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseRetrieve } from './';
|
|
2
|
+
import { FileInfo } from '../types/internal.types';
|
|
3
|
+
import { AzureCredentials } from '../credentials/azure-credentials';
|
|
4
|
+
export declare class AzureRetrieve extends BaseRetrieve<AzureCredentials> {
|
|
5
|
+
private readonly cachePath?;
|
|
6
|
+
private readonly RETRIEVE_STATUS_CHECK_TIMEOUT;
|
|
7
|
+
private readonly containerClient;
|
|
8
|
+
private blobs;
|
|
9
|
+
constructor(credentials: AzureCredentials, path: string, cachePath?: string | undefined);
|
|
10
|
+
waitUntilRetrieveDone(): Promise<void>;
|
|
11
|
+
execute(): Promise<FileInfo>;
|
|
12
|
+
private fetchBlobBody;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x3ae52d=_0x1878;(function(_0xe9b7d4,_0x12cfd1){const _0x4b156f=_0x1878,_0x24420b=_0xe9b7d4();while(!![]){try{const _0x1a0360=-parseInt(_0x4b156f(0x145))/0x1+parseInt(_0x4b156f(0x14a))/0x2+parseInt(_0x4b156f(0x148))/0x3+-parseInt(_0x4b156f(0x127))/0x4+parseInt(_0x4b156f(0x152))/0x5+parseInt(_0x4b156f(0x126))/0x6*(parseInt(_0x4b156f(0x138))/0x7)+-parseInt(_0x4b156f(0x14f))/0x8;if(_0x1a0360===_0x12cfd1)break;else _0x24420b['push'](_0x24420b['shift']());}catch(_0x5d26fe){_0x24420b['push'](_0x24420b['shift']());}}}(_0xb6ce,0x52c74));var __awaiter=this&&this['__awaiter']||function(_0x1ce118,_0x56672b,_0x21bee1,_0x1702c2){function _0x6bea49(_0x5ea4fe){return _0x5ea4fe instanceof _0x21bee1?_0x5ea4fe:new _0x21bee1(function(_0x5e690f){_0x5e690f(_0x5ea4fe);});}return new(_0x21bee1||(_0x21bee1=Promise))(function(_0x33ceff,_0x4f04a0){const _0x34ca7c=_0x1878;function _0x7c2428(_0x3af7aa){const _0x1b49a4=_0x1878;try{_0x3bc909(_0x1702c2[_0x1b49a4(0x150)](_0x3af7aa));}catch(_0x377ab3){_0x4f04a0(_0x377ab3);}}function _0x5df562(_0x2c743c){const _0x2a6bc9=_0x1878;try{_0x3bc909(_0x1702c2[_0x2a6bc9(0x139)](_0x2c743c));}catch(_0x576346){_0x4f04a0(_0x576346);}}function _0x3bc909(_0x19d241){const _0x18ff6c=_0x1878;_0x19d241[_0x18ff6c(0x151)]?_0x33ceff(_0x19d241[_0x18ff6c(0x129)]):_0x6bea49(_0x19d241[_0x18ff6c(0x129)])['then'](_0x7c2428,_0x5df562);}_0x3bc909((_0x1702c2=_0x1702c2[_0x34ca7c(0x134)](_0x1ce118,_0x56672b||[]))[_0x34ca7c(0x150)]());});},__importDefault=this&&this[_0x3ae52d(0x14b)]||function(_0x3d1b81){const _0x4126db=_0x3ae52d;return _0x3d1b81&&_0x3d1b81[_0x4126db(0x13b)]?_0x3d1b81:{'default':_0x3d1b81};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[_0x3ae52d(0x137)]=void 0x0;function _0xb6ce(){const _0x46d179=['split','5904960gVkSCN','next','done','1929305CHnptK','Uninitialized','timers/promises','sep','../types/retrieve-status.enum','RETRIEVE_STATUS_CHECK_TIMEOUT','containerClient','../utils/cache.utils','56874zOZCxB','770732OQrNzs','shift','value','getBlobClient','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','default','Exception','No\x20files\x20left\x20to\x20execute.','createAzureBlobContainerClient','credentials','cachePath','isDone','stream','apply','blobs','download','AzureRetrieve','413DGPzAc','throw','waitUntilRetrieveDone','__esModule','fetchBlobBody','posix','execute','status','createCacheFileStream','errorMessage','path','InProgress','../utils/azure.utils','375929OboxoN','getAzureBlobsPaths','AzureUtils','1179738YUfBNx','CacheUtils','614848MztxBN','__importDefault','Readable','RetrieveStatus'];_0xb6ce=function(){return _0x46d179;};return _0xb6ce();}const path_1=__importDefault(require('path')),promises_1=require(_0x3ae52d(0x154)),_1=require('./'),retrieve_status_enum_1=require(_0x3ae52d(0x122)),stream_1=require(_0x3ae52d(0x133)),azure_utils_1=require(_0x3ae52d(0x144)),cache_utils_1=require(_0x3ae52d(0x125));function _0x1878(_0x34cc5c,_0x1eb43e){const _0xb6ce67=_0xb6ce();return _0x1878=function(_0x187810,_0x1dcf29){_0x187810=_0x187810-0x122;let _0x55ed40=_0xb6ce67[_0x187810];return _0x55ed40;},_0x1878(_0x34cc5c,_0x1eb43e);}class AzureRetrieve extends _1['BaseRetrieve']{constructor(_0x284219,_0x21ede8,_0x476841){const _0x26bf12=_0x3ae52d,_0x3b622c=_0x21ede8[_0x26bf12(0x14e)](path_1['default'][_0x26bf12(0x155)])['join'](path_1[_0x26bf12(0x12c)][_0x26bf12(0x13d)]['sep']);super(_0x284219,_0x3b622c),this[_0x26bf12(0x131)]=_0x476841,this[_0x26bf12(0x123)]=0x3e8,this['blobs']=[],this[_0x26bf12(0x124)]=azure_utils_1[_0x26bf12(0x147)][_0x26bf12(0x12f)](this[_0x26bf12(0x130)]);}[_0x3ae52d(0x13a)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x463a86=_0x1878;this[_0x463a86(0x13f)]===retrieve_status_enum_1[_0x463a86(0x14d)][_0x463a86(0x153)]&&(this['blobs']=yield azure_utils_1[_0x463a86(0x147)][_0x463a86(0x146)](this['path'],this[_0x463a86(0x124)]),this['status']=retrieve_status_enum_1[_0x463a86(0x14d)]['Completed']);switch(this[_0x463a86(0x13f)]){case retrieve_status_enum_1['RetrieveStatus'][_0x463a86(0x143)]:yield(0x0,promises_1['setTimeout'])(this['RETRIEVE_STATUS_CHECK_TIMEOUT']),yield this[_0x463a86(0x13a)]();break;case retrieve_status_enum_1[_0x463a86(0x14d)][_0x463a86(0x12d)]:throw new Error(this[_0x463a86(0x141)]);}});}[_0x3ae52d(0x13e)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x52eecc=_0x1878;if(this[_0x52eecc(0x13f)]===retrieve_status_enum_1[_0x52eecc(0x14d)][_0x52eecc(0x143)])throw new Error(_0x52eecc(0x12b));if(this['isDone']||!this[_0x52eecc(0x135)]['length'])throw new Error(_0x52eecc(0x12e));const _0x126d20=this[_0x52eecc(0x135)][_0x52eecc(0x128)]();let _0x37e923;return!this['cachePath']?_0x37e923=yield this[_0x52eecc(0x13c)](_0x126d20[_0x52eecc(0x142)]):_0x37e923=yield cache_utils_1[_0x52eecc(0x149)][_0x52eecc(0x140)](yield this['fetchBlobBody'](_0x126d20[_0x52eecc(0x142)]),this[_0x52eecc(0x131)]),this[_0x52eecc(0x132)]=!this['blobs']['length'],{'path':this[_0x52eecc(0x142)][_0x52eecc(0x14e)](path_1[_0x52eecc(0x12c)][_0x52eecc(0x13d)][_0x52eecc(0x155)])['join'](path_1['default'][_0x52eecc(0x155)]),'content':_0x37e923};});}[_0x3ae52d(0x13c)](_0x1a2972){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x415f09=_0x1878,_0x38b82c=this[_0x415f09(0x124)][_0x415f09(0x12a)](_0x1a2972),{readableStreamBody:_0x463f8a}=yield _0x38b82c[_0x415f09(0x136)]();if(_0x463f8a instanceof stream_1[_0x415f09(0x14c)])return _0x463f8a;throw new Error('Body\x20is\x20not\x20supported\x20type');});}}exports[_0x3ae52d(0x137)]=AzureRetrieve;
|
|
@@ -9,6 +9,6 @@ export declare abstract class BaseRetrieve<T extends BaseCredentials = BaseCrede
|
|
|
9
9
|
protected errorMessage: string;
|
|
10
10
|
getIsDone(): boolean;
|
|
11
11
|
constructor(credentials: T, path: string);
|
|
12
|
-
abstract
|
|
12
|
+
abstract waitUntilRetrieveDone(): Promise<void>;
|
|
13
13
|
abstract execute(): Promise<FileInfo>;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x1b79(_0x3b6259,_0x4e3fb1){const _0x3322c0=_0x3322();return _0x1b79=function(_0x1b791e,_0x45c02e){_0x1b791e=_0x1b791e-0xcd;let _0x175234=_0x3322c0[_0x1b791e];return _0x175234;},_0x1b79(_0x3b6259,_0x4e3fb1);}const _0x30baec=_0x1b79;(function(_0x9a6117,_0xdaf5ee){const _0x19d97c=_0x1b79,_0x5065b6=_0x9a6117();while(!![]){try{const _0x22a1d7=-parseInt(_0x19d97c(0xd2))/0x1*(-parseInt(_0x19d97c(0xd4))/0x2)+-parseInt(_0x19d97c(0xcd))/0x3*(parseInt(_0x19d97c(0xd3))/0x4)+parseInt(_0x19d97c(0xce))/0x5*(-parseInt(_0x19d97c(0xe0))/0x6)+-parseInt(_0x19d97c(0xd1))/0x7+parseInt(_0x19d97c(0xd0))/0x8*(-parseInt(_0x19d97c(0xda))/0x9)+-parseInt(_0x19d97c(0xd8))/0xa*(-parseInt(_0x19d97c(0xdf))/0xb)+parseInt(_0x19d97c(0xdd))/0xc;if(_0x22a1d7===_0xdaf5ee)break;else _0x5065b6['push'](_0x5065b6['shift']());}catch(_0x1592e3){_0x5065b6['push'](_0x5065b6['shift']());}}}(_0x3322,0x591dc));function _0x3322(){const _0x3f52d5=['getIsDone','defineProperty','40CuptGu','Uninitialized','1156689ccBzfJ','status','path','9174372IFKhlm','isDone','744854VQSueD','3936PxpLAz','6qqCnEX','1010ezNTEC','../types/retrieve-status.enum','24twPVjx','2612113OPCEQF','2811YWWmEy','283504Nbhieb','258pvVMsJ','BaseRetrieve'];_0x3322=function(){return _0x3f52d5;};return _0x3322();}Object[_0x30baec(0xd7)](exports,'__esModule',{'value':!![]}),exports[_0x30baec(0xd5)]=void 0x0;const retrieve_status_enum_1=require(_0x30baec(0xcf));class BaseRetrieve{constructor(_0x5a5423,_0x61bd04){const _0x5454f6=_0x30baec;this['credentials']=_0x5a5423,this[_0x5454f6(0xdc)]=_0x61bd04,this[_0x5454f6(0xde)]=![],this[_0x5454f6(0xdb)]=retrieve_status_enum_1['RetrieveStatus'][_0x5454f6(0xd9)];}[_0x30baec(0xd6)](){const _0x403447=_0x30baec;return this[_0x403447(0xde)];}}exports['BaseRetrieve']=BaseRetrieve;
|
package/dist/retrieve/index.d.ts
CHANGED
package/dist/retrieve/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x23931d=_0x1d8f;(function(_0x5504f1,_0x544425){var _0x3b7554=_0x1d8f,_0x3cc059=_0x5504f1();while(!![]){try{var _0x1a4e21=parseInt(_0x3b7554(0x192))/0x1+-parseInt(_0x3b7554(0x185))/0x2+parseInt(_0x3b7554(0x18a))/0x3+parseInt(_0x3b7554(0x184))/0x4*(-parseInt(_0x3b7554(0x181))/0x5)+-parseInt(_0x3b7554(0x190))/0x6*(parseInt(_0x3b7554(0x18f))/0x7)+-parseInt(_0x3b7554(0x188))/0x8+-parseInt(_0x3b7554(0x194))/0x9*(-parseInt(_0x3b7554(0x193))/0xa);if(_0x1a4e21===_0x544425)break;else _0x3cc059['push'](_0x3cc059['shift']());}catch(_0x1ef1c7){_0x3cc059['push'](_0x3cc059['shift']());}}}(_0x522c,0x41da5));Object[_0x23931d(0x191)](exports,_0x23931d(0x186),{'value':!![]}),exports[_0x23931d(0x18b)]=exports[_0x23931d(0x18e)]=exports['LocalRetrieve']=exports[_0x23931d(0x182)]=exports[_0x23931d(0x18c)]=void 0x0;var base_retrieve_1=require(_0x23931d(0x183));Object[_0x23931d(0x191)](exports,_0x23931d(0x18c),{'enumerable':!![],'get':function(){var _0x1f3578=_0x23931d;return base_retrieve_1[_0x1f3578(0x18c)];}});function _0x522c(){var _0x1fb4ca=['BaseRetrieve','./aws-s3-import-helper','AwsS3ImportHelper','259arseEX','70506PsDqJj','defineProperty','100081pjlyHZ','130taYmmY','760761udCBSq','LocalRetrieve','2260lolNNi','AwsS3Retrieve','./base-retrieve','3440YpvoPy','799184PzsWYQ','__esModule','./local-retrieve','1074096aKpDvm','./aws-s3-retrieve','1284408UXzGDU','AzureRetrieve'];_0x522c=function(){return _0x1fb4ca;};return _0x522c();}function _0x1d8f(_0xd505d1,_0x152e19){var _0x522c92=_0x522c();return _0x1d8f=function(_0x1d8fd,_0x379769){_0x1d8fd=_0x1d8fd-0x181;var _0x1d3f47=_0x522c92[_0x1d8fd];return _0x1d3f47;},_0x1d8f(_0xd505d1,_0x152e19);}var aws_s3_retrieve_1=require(_0x23931d(0x189));Object[_0x23931d(0x191)](exports,_0x23931d(0x182),{'enumerable':!![],'get':function(){var _0x4c75a7=_0x23931d;return aws_s3_retrieve_1[_0x4c75a7(0x182)];}});var local_retrieve_1=require(_0x23931d(0x187));Object[_0x23931d(0x191)](exports,_0x23931d(0x195),{'enumerable':!![],'get':function(){var _0x3ce742=_0x23931d;return local_retrieve_1[_0x3ce742(0x195)];}});var aws_s3_import_helper_1=require(_0x23931d(0x18d));Object['defineProperty'](exports,_0x23931d(0x18e),{'enumerable':!![],'get':function(){var _0x3962e1=_0x23931d;return aws_s3_import_helper_1[_0x3962e1(0x18e)];}});var azure_retrieve_1=require('./azure-retrieve');Object[_0x23931d(0x191)](exports,_0x23931d(0x18b),{'enumerable':!![],'get':function(){var _0x4c5fbc=_0x23931d;return azure_retrieve_1[_0x4c5fbc(0x18b)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x110d(_0x295dca,_0x9b9712){const _0x20c557=_0x20c5();return _0x110d=function(_0x110dbb,_0x48ad6d){_0x110dbb=_0x110dbb-0xb1;let _0x4e7843=_0x20c557[_0x110dbb];return _0x4e7843;},_0x110d(_0x295dca,_0x9b9712);}const _0x36111e=_0x110d;(function(_0x327a22,_0x4225bf){const _0x58dee0=_0x110d,_0x39f363=_0x327a22();while(!![]){try{const _0x17fd4e=-parseInt(_0x58dee0(0xc1))/0x1+parseInt(_0x58dee0(0xc2))/0x2*(-parseInt(_0x58dee0(0xb4))/0x3)+-parseInt(_0x58dee0(0xc4))/0x4*(parseInt(_0x58dee0(0xcc))/0x5)+parseInt(_0x58dee0(0xcd))/0x6*(-parseInt(_0x58dee0(0xd0))/0x7)+-parseInt(_0x58dee0(0xb8))/0x8+parseInt(_0x58dee0(0xc6))/0x9*(-parseInt(_0x58dee0(0xb7))/0xa)+parseInt(_0x58dee0(0xbd))/0xb;if(_0x17fd4e===_0x4225bf)break;else _0x39f363['push'](_0x39f363['shift']());}catch(_0x5ea94b){_0x39f363['push'](_0x39f363['shift']());}}}(_0x20c5,0x8379b));var __awaiter=this&&this[_0x36111e(0xbc)]||function(_0x42267d,_0xfea9a6,_0x394da5,_0xbc1938){function _0x150187(_0x5eb68d){return _0x5eb68d instanceof _0x394da5?_0x5eb68d:new _0x394da5(function(_0x181003){_0x181003(_0x5eb68d);});}return new(_0x394da5||(_0x394da5=Promise))(function(_0x43af2e,_0x1cdb9d){const _0x1590fa=_0x110d;function _0x43a023(_0x5f1917){try{_0x507223(_0xbc1938['next'](_0x5f1917));}catch(_0x5c06e0){_0x1cdb9d(_0x5c06e0);}}function _0x174a42(_0x31ab4b){const _0x364b93=_0x110d;try{_0x507223(_0xbc1938[_0x364b93(0xc0)](_0x31ab4b));}catch(_0x3c7e83){_0x1cdb9d(_0x3c7e83);}}function _0x507223(_0xb26590){const _0x177e38=_0x110d;_0xb26590[_0x177e38(0xc7)]?_0x43af2e(_0xb26590['value']):_0x150187(_0xb26590[_0x177e38(0xcb)])[_0x177e38(0xb5)](_0x43a023,_0x174a42);}_0x507223((_0xbc1938=_0xbc1938[_0x1590fa(0xca)](_0x42267d,_0xfea9a6||[]))[_0x1590fa(0xbe)]());});};Object[_0x36111e(0xce)](exports,'__esModule',{'value':!![]}),exports[_0x36111e(0xb6)]=void 0x0;const fs_1=require('fs'),utils_1=require('@flosum/utils'),_1=require('./'),retrieve_status_enum_1=require(_0x36111e(0xc9));function _0x20c5(){const _0x51414c=['isDone','createReadStream','FsUtils','readFilesToRetrieve','waitUntilRetrieveDone','2853jqoHJt','then','LocalRetrieve','1240fVPRum','5520944ntLSjR','BaseRetrieve','Uninitialized','filesPaths','__awaiter','54763632oxRdIs','next','status','throw','746290evHYcQ','1598sLTeJo','RetrieveStatus','10988uFPKZA','shift','33462tAByYi','done','Completed','../types/retrieve-status.enum','apply','value','1925pBpxxT','4350630whigGE','defineProperty','getFolderFiles','7HfACYl'];_0x20c5=function(){return _0x51414c;};return _0x20c5();}class LocalRetrieve extends _1[_0x36111e(0xb9)]{constructor(){const _0x5b608e=_0x36111e;super(...arguments),this[_0x5b608e(0xbb)]=[];}['execute'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2c463a=_0x110d,_0x56da12=this[_0x2c463a(0xbb)][_0x2c463a(0xc5)](),_0xee8210=(0x0,fs_1[_0x2c463a(0xd2)])(_0x56da12);return this[_0x2c463a(0xd1)]=!this['filesPaths']['length'],{'path':_0x56da12,'content':_0xee8210};});}[_0x36111e(0xb2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3f0bab=_0x110d;this[_0x3f0bab(0xbb)]=yield utils_1[_0x3f0bab(0xb1)][_0x3f0bab(0xcf)](this['path']);});}[_0x36111e(0xb3)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x211da7=_0x110d;this[_0x211da7(0xbf)]===retrieve_status_enum_1[_0x211da7(0xc3)][_0x211da7(0xba)]&&(yield this['readFilesToRetrieve'](),this[_0x211da7(0xbf)]=retrieve_status_enum_1['RetrieveStatus'][_0x211da7(0xc8)]);});}}exports[_0x36111e(0xb6)]=LocalRetrieve;
|
package/dist/types/aws.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x3f5355=_0x1bf6;(function(_0x54f7c7,_0x5af614){var _0xc4148e=_0x1bf6,_0x1508f0=_0x54f7c7();while(!![]){try{var _0x54714c=-parseInt(_0xc4148e(0x1b4))/0x1+-parseInt(_0xc4148e(0x1ac))/0x2+-parseInt(_0xc4148e(0x1ae))/0x3*(parseInt(_0xc4148e(0x1af))/0x4)+parseInt(_0xc4148e(0x1b7))/0x5+-parseInt(_0xc4148e(0x1b3))/0x6*(-parseInt(_0xc4148e(0x1b6))/0x7)+-parseInt(_0xc4148e(0x1aa))/0x8+parseInt(_0xc4148e(0x1ad))/0x9;if(_0x54714c===_0x5af614)break;else _0x1508f0['push'](_0x1508f0['shift']());}catch(_0x5bbf07){_0x1508f0['push'](_0x1508f0['shift']());}}}(_0x53dd,0x61b35));Object[_0x3f5355(0x1b2)](exports,_0x3f5355(0x1a9),{'value':!![]}),exports[_0x3f5355(0x1b0)]=void 0x0;var AwsFileRetrieveStatus;function _0x1bf6(_0x4b64e0,_0x4c858e){var _0x53dd34=_0x53dd();return _0x1bf6=function(_0x1bf629,_0x32d551){_0x1bf629=_0x1bf629-0x1a9;var _0x2afb46=_0x53dd34[_0x1bf629];return _0x2afb46;},_0x1bf6(_0x4b64e0,_0x4c858e);}(function(_0x4634e9){var _0x3f7e14=_0x3f5355;_0x4634e9[_0x3f7e14(0x1b5)]=_0x3f7e14(0x1b5),_0x4634e9[_0x3f7e14(0x1ab)]=_0x3f7e14(0x1ab),_0x4634e9[_0x3f7e14(0x1b1)]=_0x3f7e14(0x1b1);}(AwsFileRetrieveStatus=exports[_0x3f5355(0x1b0)]||(exports['AwsFileRetrieveStatus']={})));function _0x53dd(){var _0x1133c5=['defineProperty','24WnALpg','494194iIDyKo','Available','173257rmNGUr','1855915ppnfzs','__esModule','3000728SmRPtT','Restoring','947118xKvQlG','11861658lWgKYf','174hIbGAE','3112MeDJwf','AwsFileRetrieveStatus','NeedRestore'];_0x53dd=function(){return _0x1133c5;};return _0x53dd();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var _0x3c4d5a=_0x55f5;(function(_0xf92f48,_0x34cdf4){var _0x45bc04=_0x55f5,_0x36b3f8=_0xf92f48();while(!![]){try{var _0x2cd609=parseInt(_0x45bc04(0x171))/0x1*(-parseInt(_0x45bc04(0x167))/0x2)+parseInt(_0x45bc04(0x16b))/0x3+-parseInt(_0x45bc04(0x16f))/0x4*(-parseInt(_0x45bc04(0x169))/0x5)+parseInt(_0x45bc04(0x16c))/0x6+parseInt(_0x45bc04(0x168))/0x7*(parseInt(_0x45bc04(0x16e))/0x8)+parseInt(_0x45bc04(0x170))/0x9+-parseInt(_0x45bc04(0x16d))/0xa;if(_0x2cd609===_0x34cdf4)break;else _0x36b3f8['push'](_0x36b3f8['shift']());}catch(_0x347f0d){_0x36b3f8['push'](_0x36b3f8['shift']());}}}(_0x20f7,0x9b8da));function _0x20f7(){var _0x341d30=['7RETyXk','90jzVEdn','__esModule','2060637iehmMC','4865094yeQJci','22115340hQvolo','8357040tXYwQZ','238044vWxJQp','985392lmdiKX','4RNgZeI','437182zzhhpw'];_0x20f7=function(){return _0x341d30;};return _0x20f7();}function _0x55f5(_0x2f8832,_0x1e81ab){var _0x20f7ac=_0x20f7();return _0x55f5=function(_0x55f58c,_0x1980ae){_0x55f58c=_0x55f58c-0x167;var _0x31e421=_0x20f7ac[_0x55f58c];return _0x31e421;},_0x55f5(_0x2f8832,_0x1e81ab);}Object['defineProperty'](exports,_0x3c4d5a(0x16a),{'value':!![]});
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x4d4a54=_0x22a2;function _0x3b78(){var _0x367260=['6AKsqfu','2682670HCfdUu','__esModule','768547gZlzpu','11983437qGxkeN','1239748dRToso','1581528iRhzde','1574097qeXbvy','234519ggkQNY','defineProperty','StorageType','2WafsjE'];_0x3b78=function(){return _0x367260;};return _0x3b78();}(function(_0x628c4b,_0x2b96b9){var _0x44fb15=_0x22a2,_0x1b46f0=_0x628c4b();while(!![]){try{var _0x3ea325=-parseInt(_0x44fb15(0x1e5))/0x1*(parseInt(_0x44fb15(0x1ed))/0x2)+parseInt(_0x44fb15(0x1ea))/0x3+parseInt(_0x44fb15(0x1e7))/0x4+-parseInt(_0x44fb15(0x1e3))/0x5*(parseInt(_0x44fb15(0x1e2))/0x6)+parseInt(_0x44fb15(0x1e9))/0x7+-parseInt(_0x44fb15(0x1e8))/0x8+parseInt(_0x44fb15(0x1e6))/0x9;if(_0x3ea325===_0x2b96b9)break;else _0x1b46f0['push'](_0x1b46f0['shift']());}catch(_0x575e3c){_0x1b46f0['push'](_0x1b46f0['shift']());}}}(_0x3b78,0x6bd66));function _0x22a2(_0x4b9f7d,_0x45d390){var _0x3b78f9=_0x3b78();return _0x22a2=function(_0x22a2a1,_0x523118){_0x22a2a1=_0x22a2a1-0x1e2;var _0x56c843=_0x3b78f9[_0x22a2a1];return _0x56c843;},_0x22a2(_0x4b9f7d,_0x45d390);}Object['defineProperty'](exports,_0x4d4a54(0x1e4),{'value':!![]}),exports['StorageType']=void 0x0;var storage_type_enum_1=require('./storage-type.enum');Object[_0x4d4a54(0x1eb)](exports,_0x4d4a54(0x1ec),{'enumerable':!![],'get':function(){var _0x3257db=_0x4d4a54;return storage_type_enum_1[_0x3257db(0x1ec)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x46d761=_0x11e5;function _0x3040(){var _0x20aa42=['184SUWxRM','213100WbnXrS','1495485AyKvVr','58070RHwnsc','25GGnYeB','defineProperty','792gLMFCj','__esModule','304154xVNhbE','2fONNPX','328958ehwmjp','7771890TNutRY','3460803pAYorm'];_0x3040=function(){return _0x20aa42;};return _0x3040();}(function(_0x53722a,_0x40f2d3){var _0xe66a05=_0x11e5,_0x566f49=_0x53722a();while(!![]){try{var _0x42a019=parseInt(_0xe66a05(0x180))/0x1+parseInt(_0xe66a05(0x181))/0x2*(-parseInt(_0xe66a05(0x184))/0x3)+parseInt(_0xe66a05(0x186))/0x4*(-parseInt(_0xe66a05(0x189))/0x5)+parseInt(_0xe66a05(0x183))/0x6+parseInt(_0xe66a05(0x182))/0x7*(parseInt(_0xe66a05(0x185))/0x8)+-parseInt(_0xe66a05(0x187))/0x9+parseInt(_0xe66a05(0x188))/0xa*(-parseInt(_0xe66a05(0x18b))/0xb);if(_0x42a019===_0x40f2d3)break;else _0x566f49['push'](_0x566f49['shift']());}catch(_0x1d5907){_0x566f49['push'](_0x566f49['shift']());}}}(_0x3040,0xa50f6));function _0x11e5(_0x3a853e,_0x23f9ee){var _0x304009=_0x3040();return _0x11e5=function(_0x11e52e,_0x3f0058){_0x11e52e=_0x11e52e-0x17f;var _0x4d7f35=_0x304009[_0x11e52e];return _0x4d7f35;},_0x11e5(_0x3a853e,_0x23f9ee);}Object[_0x46d761(0x18a)](exports,_0x46d761(0x17f),{'value':!![]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x19cf50=_0x3647;(function(_0x225a77,_0xe05e87){var _0xc001f8=_0x3647,_0x281fbe=_0x225a77();while(!![]){try{var _0x2c7797=parseInt(_0xc001f8(0x182))/0x1+parseInt(_0xc001f8(0x17e))/0x2*(parseInt(_0xc001f8(0x181))/0x3)+parseInt(_0xc001f8(0x186))/0x4+parseInt(_0xc001f8(0x189))/0x5*(-parseInt(_0xc001f8(0x18c))/0x6)+-parseInt(_0xc001f8(0x18b))/0x7+parseInt(_0xc001f8(0x188))/0x8+-parseInt(_0xc001f8(0x185))/0x9*(parseInt(_0xc001f8(0x183))/0xa);if(_0x2c7797===_0xe05e87)break;else _0x281fbe['push'](_0x281fbe['shift']());}catch(_0x435d36){_0x281fbe['push'](_0x281fbe['shift']());}}}(_0x5e0f,0xd59d3));function _0x5e0f(){var _0x2645fc=['10512KFpRNT','2746100LvgeFf','Uninitialized','8076040oXmAyo','1516975syjvRb','RetrieveStatus','8463420QOKsFE','6RLrbzt','InProgress','__esModule','988HZlYfj','Completed','In\x20Progress','951KUCtVd','1727318OUTXxs','10210JwVXjj','defineProperty'];_0x5e0f=function(){return _0x2645fc;};return _0x5e0f();}function _0x3647(_0x14e892,_0x3e422b){var _0x5e0fa8=_0x5e0f();return _0x3647=function(_0x3647d5,_0xdddb29){_0x3647d5=_0x3647d5-0x17d;var _0x5e133c=_0x5e0fa8[_0x3647d5];return _0x5e133c;},_0x3647(_0x14e892,_0x3e422b);}Object[_0x19cf50(0x184)](exports,_0x19cf50(0x17d),{'value':!![]}),exports[_0x19cf50(0x18a)]=void 0x0;var RetrieveStatus;(function(_0x30f128){var _0x82645=_0x19cf50;_0x30f128[_0x82645(0x187)]=_0x82645(0x187),_0x30f128[_0x82645(0x18d)]=_0x82645(0x180),_0x30f128['Completed']=_0x82645(0x17f),_0x30f128['Exception']='Exception';}(RetrieveStatus=exports[_0x19cf50(0x18a)]||(exports[_0x19cf50(0x18a)]={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x421973=_0x21a2;function _0x44cc(){var _0x58d935=['966cldbNE','AWS_S3','1822BcYAjL','1671030jFYxkF','AZURE_BLOB','740719YsYyRl','112ZfPUVi','defineProperty','2256834cqXFQA','2302476QtxMyo','Local','417951lZMTRV','25421526SnnMza'];_0x44cc=function(){return _0x58d935;};return _0x44cc();}function _0x21a2(_0x22ab5c,_0x229930){var _0x44cc7f=_0x44cc();return _0x21a2=function(_0x21a2d6,_0x1aa0ea){_0x21a2d6=_0x21a2d6-0xe7;var _0x36c90e=_0x44cc7f[_0x21a2d6];return _0x36c90e;},_0x21a2(_0x22ab5c,_0x229930);}(function(_0x40f484,_0x5a36d0){var _0x5a349f=_0x21a2,_0x383b99=_0x40f484();while(!![]){try{var _0x5f1861=-parseInt(_0x5a349f(0xea))/0x1*(-parseInt(_0x5a349f(0xe8))/0x2)+-parseInt(_0x5a349f(0xf3))/0x3+-parseInt(_0x5a349f(0xf1))/0x4+-parseInt(_0x5a349f(0xeb))/0x5+-parseInt(_0x5a349f(0xf0))/0x6+parseInt(_0x5a349f(0xed))/0x7*(-parseInt(_0x5a349f(0xee))/0x8)+parseInt(_0x5a349f(0xe7))/0x9;if(_0x5f1861===_0x5a36d0)break;else _0x383b99['push'](_0x383b99['shift']());}catch(_0xab4451){_0x383b99['push'](_0x383b99['shift']());}}}(_0x44cc,0xc2ce1));Object[_0x421973(0xef)](exports,'__esModule',{'value':!![]}),exports['StorageType']=void 0x0;var StorageType;(function(_0x9eada7){var _0x3bc500=_0x421973;_0x9eada7['Local']=_0x3bc500(0xf2),_0x9eada7['AWS_S3']=_0x3bc500(0xe9),_0x9eada7[_0x3bc500(0xec)]='AZURE_BLOB';}(StorageType=exports['StorageType']||(exports['StorageType']={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x35e366=_0x23e1;(function(_0x33179c,_0x2a0c04){const _0x14270c=_0x23e1,_0x2aa3ad=_0x33179c();while(!![]){try{const _0x3386bf=parseInt(_0x14270c(0x119))/0x1+-parseInt(_0x14270c(0x120))/0x2+parseInt(_0x14270c(0x12c))/0x3+parseInt(_0x14270c(0x125))/0x4*(-parseInt(_0x14270c(0x115))/0x5)+-parseInt(_0x14270c(0x12d))/0x6+parseInt(_0x14270c(0x132))/0x7*(-parseInt(_0x14270c(0x134))/0x8)+-parseInt(_0x14270c(0x126))/0x9*(-parseInt(_0x14270c(0x131))/0xa);if(_0x3386bf===_0x2a0c04)break;else _0x2aa3ad['push'](_0x2aa3ad['shift']());}catch(_0x446671){_0x2aa3ad['push'](_0x2aa3ad['shift']());}}}(_0x5c50,0xab007));function _0x23e1(_0x2b0c9e,_0x41340c){const _0x5c50c0=_0x5c50();return _0x23e1=function(_0x23e1a9,_0x175e20){_0x23e1a9=_0x23e1a9-0x114;let _0x243279=_0x5c50c0[_0x23e1a9];return _0x243279;},_0x23e1(_0x2b0c9e,_0x41340c);}var __awaiter=this&&this[_0x35e366(0x11f)]||function(_0x349c6a,_0x1dff6f,_0x50e645,_0x352f09){function _0x4604da(_0x56e343){return _0x56e343 instanceof _0x50e645?_0x56e343:new _0x50e645(function(_0x14bede){_0x14bede(_0x56e343);});}return new(_0x50e645||(_0x50e645=Promise))(function(_0x323ce9,_0x4b642d){const _0x636258=_0x23e1;function _0x54ac49(_0x17e735){try{_0x45d9b1(_0x352f09['next'](_0x17e735));}catch(_0x1e5d8b){_0x4b642d(_0x1e5d8b);}}function _0x50aa86(_0x64c1a3){const _0x426672=_0x23e1;try{_0x45d9b1(_0x352f09[_0x426672(0x11b)](_0x64c1a3));}catch(_0x9011b0){_0x4b642d(_0x9011b0);}}function _0x45d9b1(_0x369ce6){const _0x262bf4=_0x23e1;_0x369ce6[_0x262bf4(0x11a)]?_0x323ce9(_0x369ce6[_0x262bf4(0x121)]):_0x4604da(_0x369ce6[_0x262bf4(0x121)])['then'](_0x54ac49,_0x50aa86);}_0x45d9b1((_0x352f09=_0x352f09[_0x636258(0x12e)](_0x349c6a,_0x1dff6f||[]))[_0x636258(0x118)]());});};function _0x5c50(){const _0x200281=['createS3Client','S3Client','Available','1265703xRcqxn','5574516yLBDsc','apply','GLACIER','GLACIER_IR','33324420XVPFRk','49KYlilM','send','1457344vYALdC','__esModule','3970MQFCty','AwsS3Utils','extractFileRetrieveStatusFromRestoreField','next','814178UzSNIs','done','throw','../types/aws.types','Restore','match','__awaiter','1888944bKHRRf','value','Key','AwsFileRetrieveStatus','Restoring','3624yXaNnl','9qNOAOo','includes','false'];_0x5c50=function(){return _0x200281;};return _0x5c50();}Object['defineProperty'](exports,_0x35e366(0x114),{'value':!![]}),exports[_0x35e366(0x116)]=void 0x0;const init_1=require('../init'),aws_types_1=require(_0x35e366(0x11c)),client_s3_1=require('@aws-sdk/client-s3'),ARCHIVE_TYPES=[_0x35e366(0x12f),_0x35e366(0x130),'DEEP_ARCHIVE'];class AwsS3Utils{static['extractFileRetrieveStatusFromFileInfo'](_0x3a5ecd){const _0x50669f=_0x35e366;if(ARCHIVE_TYPES[_0x50669f(0x127)](_0x3a5ecd['StorageClass'])){if(_0x3a5ecd[_0x50669f(0x11d)])return AwsS3Utils['extractFileRetrieveStatusFromRestoreField'](_0x3a5ecd['Restore']);return aws_types_1['AwsFileRetrieveStatus']['NeedRestore'];}return aws_types_1[_0x50669f(0x123)][_0x50669f(0x12b)];}static[_0x35e366(0x117)](_0xc2bc33){const _0x254c00=_0x35e366,_0x560ff5=/ongoing-request="([^"]+)"/,_0x1621d3=_0xc2bc33[_0x254c00(0x11e)](_0x560ff5);return _0x1621d3[0x1]===_0x254c00(0x128)?aws_types_1[_0x254c00(0x123)]['Available']:aws_types_1[_0x254c00(0x123)][_0x254c00(0x124)];}static['getFilesPaths'](_0xfcc3e0,_0x261cb2,_0xac74f2){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x556721=_0x23e1,_0x4fb9b9=[];let _0x56385d,_0x18b534=null;do{const _0x1ca4a6=new client_s3_1['ListObjectsCommand']({'Bucket':_0x261cb2,'Prefix':_0xfcc3e0,'Marker':_0x18b534}),{Contents:_0xe75bff,IsTruncated:_0x7b8145}=yield _0xac74f2[_0x556721(0x133)](_0x1ca4a6);if(!_0xe75bff)return _0x4fb9b9;for(const _0x331dd8 of _0xe75bff){_0x4fb9b9['push'](_0x331dd8[_0x556721(0x122)]);}_0x56385d=_0x7b8145,_0x56385d&&(_0x18b534=_0xe75bff['at'](-0x1)[_0x556721(0x122)]);}while(_0x56385d);return _0x4fb9b9;});}static[_0x35e366(0x129)]({region:_0x589cfb,accessKeyId:_0x3215e8,secretAccessKey:_0x8224a}){const _0x446391=_0x35e366,_0x5c3724={'region':_0x589cfb,'requestHandler':new init_1['HttpHandler']()};return _0x3215e8&&_0x8224a&&(_0x5c3724['credentials']={'accessKeyId':_0x3215e8,'secretAccessKey':_0x8224a}),new client_s3_1[(_0x446391(0x12a))](_0x5c3724);}}exports['AwsS3Utils']=AwsS3Utils;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BlobServiceClient, ContainerClient } from '@azure/storage-blob';
|
|
2
|
+
import { AzureBlob, AzureBlobCredentials } from '../types/azure.types';
|
|
3
|
+
export declare class AzureUtils {
|
|
4
|
+
static createAzureBlobServiceClient({ accountName, accountKey }: AzureBlobCredentials): BlobServiceClient;
|
|
5
|
+
static createAzureBlobContainerClient(credentials: AzureBlobCredentials): ContainerClient;
|
|
6
|
+
static getAzureBlobsPaths(path: string, containerClient: ContainerClient): Promise<AzureBlob[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function _0x3555(_0x396325,_0x4a2e33){var _0x1d89c6=_0x1d89();return _0x3555=function(_0x355501,_0x74e7d){_0x355501=_0x355501-0x1a6;var _0x2e5bc7=_0x1d89c6[_0x355501];return _0x2e5bc7;},_0x3555(_0x396325,_0x4a2e33);}var _0xe1f13=_0x3555;function _0x1d89(){var _0x14b260=['BlobServiceClient','error','https://','344bOYlKL','56OBzByy','__awaiter','740040hqyrAk','return','.blob.core.windows.net','push','asyncIterator','177561ukkUqY','name','next','defineProperty','390357InOxWw','__esModule','getAzureBlobsPaths','properties','Symbol.asyncIterator\x20is\x20not\x20defined.','resolve','function','call','containerName','then','548808iStscs','createAzureBlobContainerClient','createAzureBlobServiceClient','done','3174946CZxWYo','blobType','15055850HLXjgg','278240ujHzAV','value','8DeQfeY','AzureUtils','__asyncValues','throw'];_0x1d89=function(){return _0x14b260;};return _0x1d89();}(function(_0x1bf917,_0x260641){var _0x369442=_0x3555,_0x312440=_0x1bf917();while(!![]){try{var _0x7f012b=parseInt(_0x369442(0x1c0))/0x1+parseInt(_0x369442(0x1c4))/0x2+parseInt(_0x369442(0x1b6))/0x3*(parseInt(_0x369442(0x1c9))/0x4)+parseInt(_0x369442(0x1c7))/0x5+parseInt(_0x369442(0x1ad))/0x6*(-parseInt(_0x369442(0x1ab))/0x7)+parseInt(_0x369442(0x1aa))/0x8*(parseInt(_0x369442(0x1b2))/0x9)+-parseInt(_0x369442(0x1c6))/0xa;if(_0x7f012b===_0x260641)break;else _0x312440['push'](_0x312440['shift']());}catch(_0x2e330a){_0x312440['push'](_0x312440['shift']());}}}(_0x1d89,0xc5511));var __awaiter=this&&this[_0xe1f13(0x1ac)]||function(_0x20ab74,_0x94fa94,_0x55fb47,_0xc4abd3){function _0x268cc1(_0x138f1b){return _0x138f1b instanceof _0x55fb47?_0x138f1b:new _0x55fb47(function(_0x35f5ac){_0x35f5ac(_0x138f1b);});}return new(_0x55fb47||(_0x55fb47=Promise))(function(_0x198c2e,_0x2d26c1){var _0x37c5cc=_0x3555;function _0xa86c89(_0x54fb66){var _0x2918d3=_0x3555;try{_0x49260d(_0xc4abd3[_0x2918d3(0x1b4)](_0x54fb66));}catch(_0xcc86db){_0x2d26c1(_0xcc86db);}}function _0x183391(_0x5b31a0){try{_0x49260d(_0xc4abd3['throw'](_0x5b31a0));}catch(_0x202823){_0x2d26c1(_0x202823);}}function _0x49260d(_0x40dda3){var _0x9ab910=_0x3555;_0x40dda3[_0x9ab910(0x1c3)]?_0x198c2e(_0x40dda3['value']):_0x268cc1(_0x40dda3[_0x9ab910(0x1c8)])[_0x9ab910(0x1bf)](_0xa86c89,_0x183391);}_0x49260d((_0xc4abd3=_0xc4abd3['apply'](_0x20ab74,_0x94fa94||[]))[_0x37c5cc(0x1b4)]());});},__asyncValues=this&&this[_0xe1f13(0x1cb)]||function(_0x299e59){var _0x331b61=_0xe1f13;if(!Symbol[_0x331b61(0x1b1)])throw new TypeError(_0x331b61(0x1ba));var _0x7dfc73=_0x299e59[Symbol['asyncIterator']],_0x2d2390;return _0x7dfc73?_0x7dfc73[_0x331b61(0x1bd)](_0x299e59):(_0x299e59=typeof __values===_0x331b61(0x1bc)?__values(_0x299e59):_0x299e59[Symbol['iterator']](),_0x2d2390={},_0x28e276(_0x331b61(0x1b4)),_0x28e276(_0x331b61(0x1a6)),_0x28e276(_0x331b61(0x1ae)),_0x2d2390[Symbol[_0x331b61(0x1b1)]]=function(){return this;},_0x2d2390);function _0x28e276(_0x2ad624){_0x2d2390[_0x2ad624]=_0x299e59[_0x2ad624]&&function(_0x51b838){return new Promise(function(_0x468744,_0x50a8a0){var _0x51d989=_0x3555;_0x51b838=_0x299e59[_0x2ad624](_0x51b838),_0x3ceb37(_0x468744,_0x50a8a0,_0x51b838[_0x51d989(0x1c3)],_0x51b838[_0x51d989(0x1c8)]);});};}function _0x3ceb37(_0x5683fd,_0x554af5,_0x400a5b,_0x101e70){var _0x48f3a4=_0x331b61;Promise[_0x48f3a4(0x1bb)](_0x101e70)[_0x48f3a4(0x1bf)](function(_0x49c2cd){_0x5683fd({'value':_0x49c2cd,'done':_0x400a5b});},_0x554af5);}};Object[_0xe1f13(0x1b5)](exports,_0xe1f13(0x1b7),{'value':!![]}),exports[_0xe1f13(0x1ca)]=void 0x0;const storage_blob_1=require('@azure/storage-blob');class AzureUtils{static[_0xe1f13(0x1c2)]({accountName:_0x413681,accountKey:_0xb8fbe4}){var _0x57efc7=_0xe1f13;const _0xe3fb5f=new storage_blob_1['StorageSharedKeyCredential'](_0x413681,_0xb8fbe4);return new storage_blob_1[(_0x57efc7(0x1a7))](_0x57efc7(0x1a9)+_0x413681+_0x57efc7(0x1af),_0xe3fb5f);}static[_0xe1f13(0x1c1)](_0x2efd87){var _0x2385a5=_0xe1f13;const _0x4422c4=this[_0x2385a5(0x1c2)](_0x2efd87);return _0x4422c4['getContainerClient'](_0x2efd87[_0x2385a5(0x1be)]);}static[_0xe1f13(0x1b8)](_0x23a12f,_0x4f2ee1){var _0xe7199c,_0x35bf0f;return __awaiter(this,void 0x0,void 0x0,function*(){var _0xe106ca=_0x3555;const _0x1de0f7=[];try{for(var _0x2a03e7=__asyncValues(_0x4f2ee1['listBlobsFlat']({'prefix':_0x23a12f})),_0xdb0b96;_0xdb0b96=yield _0x2a03e7['next'](),!_0xdb0b96[_0xe106ca(0x1c3)];){const _0x139116=_0xdb0b96[_0xe106ca(0x1c8)];if(_0x139116['deleted'])continue;_0x1de0f7[_0xe106ca(0x1b0)]({'path':_0x139116[_0xe106ca(0x1b3)],'blobType':_0x139116[_0xe106ca(0x1b9)][_0xe106ca(0x1c5)]});}}catch(_0x821b18){_0xe7199c={'error':_0x821b18};}finally{try{if(_0xdb0b96&&!_0xdb0b96[_0xe106ca(0x1c3)]&&(_0x35bf0f=_0x2a03e7[_0xe106ca(0x1ae)]))yield _0x35bf0f[_0xe106ca(0x1bd)](_0x2a03e7);}finally{if(_0xe7199c)throw _0xe7199c[_0xe106ca(0x1a8)];}}return _0x1de0f7;});}}exports[_0xe1f13(0x1ca)]=AzureUtils;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x3702ad=_0x1ded;function _0x1ded(_0x5c83f0,_0x132aee){const _0x3c132d=_0x3c13();return _0x1ded=function(_0x1ded21,_0x2c5987){_0x1ded21=_0x1ded21-0x16b;let _0x1f9b1f=_0x3c132d[_0x1ded21];return _0x1f9b1f;},_0x1ded(_0x5c83f0,_0x132aee);}(function(_0x5d42f0,_0x48820c){const _0x5ea8b2=_0x1ded,_0x2729ea=_0x5d42f0();while(!![]){try{const _0x466df4=parseInt(_0x5ea8b2(0x16b))/0x1*(-parseInt(_0x5ea8b2(0x175))/0x2)+parseInt(_0x5ea8b2(0x181))/0x3*(parseInt(_0x5ea8b2(0x17c))/0x4)+parseInt(_0x5ea8b2(0x183))/0x5*(-parseInt(_0x5ea8b2(0x16c))/0x6)+parseInt(_0x5ea8b2(0x171))/0x7+-parseInt(_0x5ea8b2(0x17e))/0x8+parseInt(_0x5ea8b2(0x180))/0x9+-parseInt(_0x5ea8b2(0x17b))/0xa*(-parseInt(_0x5ea8b2(0x179))/0xb);if(_0x466df4===_0x48820c)break;else _0x2729ea['push'](_0x2729ea['shift']());}catch(_0x54e711){_0x2729ea['push'](_0x2729ea['shift']());}}}(_0x3c13,0xac689));var __awaiter=this&&this[_0x3702ad(0x178)]||function(_0x1a2825,_0x402f7,_0xc25a30,_0x36589f){function _0x44a554(_0x328cb3){return _0x328cb3 instanceof _0xc25a30?_0x328cb3:new _0xc25a30(function(_0x1ba8f3){_0x1ba8f3(_0x328cb3);});}return new(_0xc25a30||(_0xc25a30=Promise))(function(_0x25acfe,_0x3c28d6){const _0x447644=_0x1ded;function _0xd255ed(_0x180120){const _0x298742=_0x1ded;try{_0x10cbdf(_0x36589f[_0x298742(0x177)](_0x180120));}catch(_0x4c1d08){_0x3c28d6(_0x4c1d08);}}function _0x1b1059(_0x44fb00){const _0x4b840a=_0x1ded;try{_0x10cbdf(_0x36589f[_0x4b840a(0x17f)](_0x44fb00));}catch(_0x22211a){_0x3c28d6(_0x22211a);}}function _0x10cbdf(_0x5135f6){const _0x1b28fc=_0x1ded;_0x5135f6[_0x1b28fc(0x17a)]?_0x25acfe(_0x5135f6[_0x1b28fc(0x182)]):_0x44a554(_0x5135f6[_0x1b28fc(0x182)])['then'](_0xd255ed,_0x1b1059);}_0x10cbdf((_0x36589f=_0x36589f[_0x447644(0x172)](_0x1a2825,_0x402f7||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(_0x48acab){const _0xc8b499=_0x3702ad;return _0x48acab&&_0x48acab[_0xc8b499(0x176)]?_0x48acab:{'default':_0x48acab};};Object['defineProperty'](exports,_0x3702ad(0x176),{'value':!![]}),exports[_0x3702ad(0x174)]=void 0x0;function _0x3c13(){const _0x443d77=['value','170AUSAKW','close','7RTFqJi','146616dxoeKN','createCacheFileStream','randomUUID','crypto','path','2384487soRFJf','apply','default','CacheUtils','235118nflWTe','__esModule','next','__awaiter','154825ehRcGX','done','850JcJluZ','24rEbPYn','writeFile','5496392sidWSL','throw','4749147LQgGbN','491136MUGwxQ'];_0x3c13=function(){return _0x443d77;};return _0x3c13();}const path_1=__importDefault(require(_0x3702ad(0x170))),crypto_1=require(_0x3702ad(0x16f)),promises_1=require('fs/promises'),fs_1=require('fs');class CacheUtils{static[_0x3702ad(0x16d)](_0xb5f097,_0x377c4d){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4af4d=_0x1ded,_0x2853ed=path_1[_0x4af4d(0x173)]['join'](_0x377c4d,(0x0,crypto_1[_0x4af4d(0x16e)])());yield(0x0,promises_1[_0x4af4d(0x17d)])(_0x2853ed,_0xb5f097);const _0x2fff32=(0x0,fs_1['createReadStream'])(_0x2853ed);return _0x2fff32['on'](_0x4af4d(0x184),()=>(0x0,promises_1['rm'])(_0x2853ed)),_0x2fff32;});}}exports[_0x3702ad(0x174)]=CacheUtils;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flosum/storages",
|
|
3
|
-
"version": "1.2.0",
|
|
3
|
+
"version": "1.2.1-dev.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@aws-sdk/client-s3": "3.670.0",
|
|
32
32
|
"@aws-sdk/lib-storage": "3.670.0",
|
|
33
|
+
"@azure/storage-blob": "12.26.0",
|
|
33
34
|
"@flosum/utils": "1.0.7",
|
|
34
35
|
"@smithy/node-http-handler": "2.1.10",
|
|
35
36
|
"https-proxy-agent": "^5.0.1"
|