@flosum/storages 1.4.1 → 1.4.3
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/copy/aws-s3-copy.js +1 -1
- package/dist/copy/base-copy.js +1 -1
- package/dist/copy/index.js +1 -1
- package/dist/copy/local-copy.js +1 -1
- package/dist/credentials/aws-s3-credentials.js +1 -1
- package/dist/credentials/azure-credentials.js +1 -1
- package/dist/credentials/base-credentials.js +1 -1
- package/dist/credentials/google-cloud-credentials-validator.d.ts +9 -0
- package/dist/credentials/google-cloud-credentials-validator.js +1 -0
- package/dist/credentials/google-cloud-credentials.d.ts +12 -0
- package/dist/credentials/google-cloud-credentials.js +1 -0
- 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.js +1 -1
- package/dist/delete/base-delete.js +1 -1
- package/dist/delete/google-cloud-delete.d.ts +8 -0
- package/dist/delete/google-cloud-delete.js +1 -0
- 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.d.ts +0 -2
- package/dist/deploy/aws-s3-deploy.js +1 -1
- package/dist/deploy/azure-deploy.d.ts +0 -2
- package/dist/deploy/azure-deploy.js +1 -1
- package/dist/deploy/base-deploy.d.ts +0 -2
- package/dist/deploy/base-deploy.js +1 -1
- package/dist/deploy/google-cloud-deploy.d.ts +10 -0
- package/dist/deploy/google-cloud-deploy.js +1 -0
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +1 -1
- package/dist/deploy/local-deploy.d.ts +0 -2
- package/dist/deploy/local-deploy.js +1 -1
- 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.js +1 -1
- package/dist/file-size-retriever/base-file-size-retriever.js +1 -1
- package/dist/file-size-retriever/google-cloud-file-size-retriever.d.ts +7 -0
- package/dist/file-size-retriever/google-cloud-file-size-retriever.js +1 -0
- 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/instances/aws-s3.storage-instance.js +1 -1
- package/dist/instances/base.storage-instance.d.ts +0 -2
- package/dist/instances/base.storage-instance.js +1 -1
- package/dist/instances/index.js +1 -1
- package/dist/instances/local.storage-instance.js +1 -1
- package/dist/retrieve/aws-s3-import-helper.d.ts +0 -1
- package/dist/retrieve/aws-s3-import-helper.js +1 -1
- package/dist/retrieve/aws-s3-retrieve.js +1 -1
- package/dist/retrieve/azure-retrieve.js +1 -1
- package/dist/retrieve/base-retrieve.js +1 -1
- package/dist/retrieve/google-cloud-retrieve.d.ts +13 -0
- package/dist/retrieve/google-cloud-retrieve.js +1 -0
- package/dist/retrieve/helpers/aws-s3-helper.js +1 -1
- package/dist/retrieve/helpers/azure-helper.js +1 -1
- package/dist/retrieve/helpers/base-helper.js +1 -1
- package/dist/retrieve/helpers/google-cloud-helper.d.ts +10 -0
- package/dist/retrieve/helpers/google-cloud-helper.js +1 -0
- package/dist/retrieve/helpers/local-helper.js +1 -1
- package/dist/retrieve/index.d.ts +2 -0
- package/dist/retrieve/index.js +1 -1
- package/dist/retrieve/local-retrieve.js +1 -1
- package/dist/types/aws.types.js +1 -1
- package/dist/types/azure.types.js +1 -1
- package/dist/types/google-cloud.types.d.ts +8 -0
- package/dist/types/google-cloud.types.js +1 -0
- package/dist/types/index.js +1 -1
- package/dist/types/internal.types.d.ts +0 -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.js +1 -1
- package/dist/utils/cache.utils.d.ts +0 -1
- package/dist/utils/cache.utils.js +1 -1
- package/dist/utils/google-cloud.utils.d.ts +7 -0
- package/dist/utils/google-cloud.utils.js +1 -0
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x40b5(){const _0x4d4423=['5585103BOFOQj','130hgWWvU','2WAzHMx','BaseRetrieve','getIsDone','7922499ZTgZwT','RetrieveStatus','25344fADccE','isDone','Uninitialized','../types/retrieve-status.enum','10zfIHAt','764004hNBhbX','186VnwrVF','343086QSdqAW','__esModule','485173zrzxeb','path','7mLNRxN','credentials','9141488lBhOrm','11Enhfnx','status'];_0x40b5=function(){return _0x4d4423;};return _0x40b5();}const _0x2f74ea=_0xa1d1;(function(_0x4a1165,_0xcbea24){const _0x263874=_0xa1d1,_0x511ba4=_0x4a1165();while(!![]){try{const _0x3c8e9f=parseInt(_0x263874(0x7b))/0x1*(-parseInt(_0x263874(0x84))/0x2)+-parseInt(_0x263874(0x8f))/0x3*(parseInt(_0x263874(0x89))/0x4)+parseInt(_0x263874(0x83))/0x5*(parseInt(_0x263874(0x79))/0x6)+parseInt(_0x263874(0x7d))/0x7*(-parseInt(_0x263874(0x7f))/0x8)+parseInt(_0x263874(0x82))/0x9*(parseInt(_0x263874(0x8d))/0xa)+parseInt(_0x263874(0x80))/0xb*(parseInt(_0x263874(0x8e))/0xc)+parseInt(_0x263874(0x87))/0xd;if(_0x3c8e9f===_0xcbea24)break;else _0x511ba4['push'](_0x511ba4['shift']());}catch(_0x1cfd36){_0x511ba4['push'](_0x511ba4['shift']());}}}(_0x40b5,0xb9778));function _0xa1d1(_0xbaeeb7,_0x575176){_0xbaeeb7=_0xbaeeb7-0x79;const _0x40b5c6=_0x40b5();let _0xa1d18b=_0x40b5c6[_0xbaeeb7];return _0xa1d18b;}Object['defineProperty'](exports,_0x2f74ea(0x7a),{'value':!![]}),exports[_0x2f74ea(0x85)]=void 0x0;const retrieve_status_enum_1=require(_0x2f74ea(0x8c));class BaseRetrieve{[_0x2f74ea(0x86)](){const _0x53c9ea=_0x2f74ea;return this[_0x53c9ea(0x8a)];}constructor(_0x525219,_0x1ad5ef){const _0x1d1a3f=_0x2f74ea;this[_0x1d1a3f(0x7e)]=_0x525219,this[_0x1d1a3f(0x7c)]=_0x1ad5ef,this[_0x1d1a3f(0x8a)]=![],this[_0x1d1a3f(0x81)]=retrieve_status_enum_1[_0x1d1a3f(0x88)][_0x1d1a3f(0x8b)];}}exports[_0x2f74ea(0x85)]=BaseRetrieve;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseRetrieve } from './';
|
|
2
|
+
import { FileInfo } from '../types/internal.types';
|
|
3
|
+
import { GoogleCloudCredentials } from '../credentials/google-cloud-credentials';
|
|
4
|
+
export declare class GoogleCloudRetrieve extends BaseRetrieve<GoogleCloudCredentials> {
|
|
5
|
+
private readonly cachePath?;
|
|
6
|
+
private readonly RETRIEVE_STATUS_CHECK_TIMEOUT;
|
|
7
|
+
private readonly bucket;
|
|
8
|
+
private filesPaths;
|
|
9
|
+
constructor(credentials: GoogleCloudCredentials, path: string, cachePath?: string);
|
|
10
|
+
waitUntilRetrieveDone(): Promise<void>;
|
|
11
|
+
execute(): Promise<FileInfo>;
|
|
12
|
+
private fetchFileBody;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x1bb3a9=_0x1dba;(function(_0x295079,_0x1f6468){const _0x34ea5d=_0x1dba,_0x798a82=_0x295079();while(!![]){try{const _0x1ffcb8=-parseInt(_0x34ea5d(0x16c))/0x1*(-parseInt(_0x34ea5d(0x17a))/0x2)+parseInt(_0x34ea5d(0x16e))/0x3*(-parseInt(_0x34ea5d(0x183))/0x4)+parseInt(_0x34ea5d(0x180))/0x5+parseInt(_0x34ea5d(0x173))/0x6*(-parseInt(_0x34ea5d(0x171))/0x7)+parseInt(_0x34ea5d(0x187))/0x8+parseInt(_0x34ea5d(0x192))/0x9*(-parseInt(_0x34ea5d(0x17f))/0xa)+parseInt(_0x34ea5d(0x18c))/0xb*(parseInt(_0x34ea5d(0x18e))/0xc);if(_0x1ffcb8===_0x1f6468)break;else _0x798a82['push'](_0x798a82['shift']());}catch(_0x300385){_0x798a82['push'](_0x798a82['shift']());}}}(_0x2753,0xbb4d8));var __awaiter=this&&this[_0x1bb3a9(0x16f)]||function(_0x4c01a2,_0x4a23b3,_0xc9b876,_0x2836f3){function _0x371a9e(_0xd848b4){return _0xd848b4 instanceof _0xc9b876?_0xd848b4:new _0xc9b876(function(_0x147e28){_0x147e28(_0xd848b4);});}return new(_0xc9b876||(_0xc9b876=Promise))(function(_0x3c361a,_0x3868dc){const _0x56bfd3=_0x1dba;function _0x8e6ad3(_0x547a29){try{_0x448991(_0x2836f3['next'](_0x547a29));}catch(_0x59929a){_0x3868dc(_0x59929a);}}function _0x47f1ad(_0x4cb496){const _0x1f229c=_0x1dba;try{_0x448991(_0x2836f3[_0x1f229c(0x16a)](_0x4cb496));}catch(_0x536b50){_0x3868dc(_0x536b50);}}function _0x448991(_0x2bd036){const _0x2538f2=_0x1dba;_0x2bd036['done']?_0x3c361a(_0x2bd036[_0x2538f2(0x18d)]):_0x371a9e(_0x2bd036[_0x2538f2(0x18d)])[_0x2538f2(0x193)](_0x8e6ad3,_0x47f1ad);}_0x448991((_0x2836f3=_0x2836f3['apply'](_0x4c01a2,_0x4a23b3||[]))[_0x56bfd3(0x175)]());});},__importDefault=this&&this[_0x1bb3a9(0x168)]||function(_0x38211a){return _0x38211a&&_0x38211a['__esModule']?_0x38211a:{'default':_0x38211a};};function _0x2753(){const _0x41454c=['../types/retrieve-status.enum','bucket','2169ufaEoZ','then','RETRIEVE_STATUS_CHECK_TIMEOUT','GoogleCloudRetrieve','credentials','Uninitialized','createCacheFileStream','../utils/cache.utils','errorMessage','sep','path','posix','__importDefault','isDone','throw','timers/promises','13vOwHBj','split','27UHLxsP','__awaiter','execute','6167QDPlJB','CacheUtils','10158BVVUPO','GoogleCloudUtils','next','fetchFileBody','InProgress','Exception','__esModule','23186oUIMUi','join','waitUntilRetrieveDone','getFilesPaths','No\x20files\x20left\x20to\x20execute.','44360gdkTcN','5602830lwzNLy','defineProperty','status','62236Ekwblf','pop','default','file','4078976eZVwMG','RetrieveStatus','../utils/google-cloud.utils','Cannot\x20execute\x20when\x20retrieve\x20in\x20progress.','cachePath','715xpZTBG','value','311388rwUkvW','filesPaths'];_0x2753=function(){return _0x41454c;};return _0x2753();}function _0x1dba(_0x2aa6ff,_0x25e049){_0x2aa6ff=_0x2aa6ff-0x160;const _0x2753f8=_0x2753();let _0x1dba61=_0x2753f8[_0x2aa6ff];return _0x1dba61;}Object[_0x1bb3a9(0x181)](exports,_0x1bb3a9(0x179),{'value':!![]}),exports[_0x1bb3a9(0x195)]=void 0x0;const path_1=__importDefault(require(_0x1bb3a9(0x166))),promises_1=require(_0x1bb3a9(0x16b)),_1=require('./'),retrieve_status_enum_1=require(_0x1bb3a9(0x190)),google_cloud_utils_1=require(_0x1bb3a9(0x189)),cache_utils_1=require(_0x1bb3a9(0x163));class GoogleCloudRetrieve extends _1['BaseRetrieve']{constructor(_0x3a9b22,_0x416558,_0x534100){const _0x1431fd=_0x1bb3a9,_0x45ed2e=_0x416558[_0x1431fd(0x16d)](path_1[_0x1431fd(0x185)][_0x1431fd(0x165)])[_0x1431fd(0x17b)](path_1['default']['posix'][_0x1431fd(0x165)]);super(_0x3a9b22,_0x45ed2e),this[_0x1431fd(0x18b)]=_0x534100,this[_0x1431fd(0x194)]=0x3e8,this['filesPaths']=[],this[_0x1431fd(0x191)]=google_cloud_utils_1[_0x1431fd(0x174)]['createBucket'](this[_0x1431fd(0x160)]);}['waitUntilRetrieveDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1ab7d6=_0x1dba;this[_0x1ab7d6(0x182)]===retrieve_status_enum_1[_0x1ab7d6(0x188)][_0x1ab7d6(0x161)]&&(this[_0x1ab7d6(0x18f)]=yield google_cloud_utils_1[_0x1ab7d6(0x174)][_0x1ab7d6(0x17d)](this[_0x1ab7d6(0x166)],this[_0x1ab7d6(0x191)]),this[_0x1ab7d6(0x182)]=retrieve_status_enum_1[_0x1ab7d6(0x188)]['Completed'],yield this[_0x1ab7d6(0x17c)]());switch(this['status']){case retrieve_status_enum_1[_0x1ab7d6(0x188)][_0x1ab7d6(0x177)]:yield(0x0,promises_1['setTimeout'])(this[_0x1ab7d6(0x194)]),yield this[_0x1ab7d6(0x17c)]();break;case retrieve_status_enum_1['RetrieveStatus'][_0x1ab7d6(0x178)]:throw new Error(this[_0x1ab7d6(0x164)]);default:break;}});}[_0x1bb3a9(0x170)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x43ee25=_0x1dba;if(this[_0x43ee25(0x182)]===retrieve_status_enum_1['RetrieveStatus'][_0x43ee25(0x177)])throw new Error(_0x43ee25(0x18a));if(this[_0x43ee25(0x169)]||!this[_0x43ee25(0x18f)]['length'])throw new Error(_0x43ee25(0x17e));const _0x11ef7a=this[_0x43ee25(0x18f)][_0x43ee25(0x184)]();let _0x349d99;return!this[_0x43ee25(0x18b)]?_0x349d99=yield this[_0x43ee25(0x176)](_0x11ef7a):_0x349d99=yield cache_utils_1[_0x43ee25(0x172)][_0x43ee25(0x162)](yield this[_0x43ee25(0x176)](_0x11ef7a),this[_0x43ee25(0x18b)]),this[_0x43ee25(0x169)]=!this['filesPaths']['length'],{'path':this['path'][_0x43ee25(0x16d)](path_1[_0x43ee25(0x185)][_0x43ee25(0x167)]['sep'])['join'](path_1[_0x43ee25(0x185)]['sep']),'content':_0x349d99};});}[_0x1bb3a9(0x176)](_0xda704f){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x108172=_0x1dba;return this['bucket'][_0x108172(0x186)](_0xda704f)['createReadStream']();});}}exports[_0x1bb3a9(0x195)]=GoogleCloudRetrieve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x5b0fd3=_0x1894;(function(_0x28a554,_0x1d75ac){const _0x1a87ea=_0x1894,_0x2ceb82=_0x28a554();while(!![]){try{const _0x5982af=-parseInt(_0x1a87ea(0x15c))/0x1+-parseInt(_0x1a87ea(0x156))/0x2+-parseInt(_0x1a87ea(0x169))/0x3+parseInt(_0x1a87ea(0x176))/0x4+parseInt(_0x1a87ea(0x15e))/0x5*(parseInt(_0x1a87ea(0x168))/0x6)+-parseInt(_0x1a87ea(0x173))/0x7*(parseInt(_0x1a87ea(0x16b))/0x8)+parseInt(_0x1a87ea(0x16e))/0x9;if(_0x5982af===_0x1d75ac)break;else _0x2ceb82['push'](_0x2ceb82['shift']());}catch(_0x2a1145){_0x2ceb82['push'](_0x2ceb82['shift']());}}}(_0x3d75,0x251c7));var __awaiter=this&&this['__awaiter']||function(_0x4232b8,_0x41dc13,_0x178614,_0x49cce7){function _0x4e1b11(_0x1a3bdb){return _0x1a3bdb instanceof _0x178614?_0x1a3bdb:new _0x178614(function(_0x5dfedb){_0x5dfedb(_0x1a3bdb);});}return new(_0x178614||(_0x178614=Promise))(function(_0xd382c5,_0x193f26){const _0x2ef68a=_0x1894;function _0x32e4d3(_0x5c906b){try{_0xed3d9d(_0x49cce7['next'](_0x5c906b));}catch(_0x5b54ae){_0x193f26(_0x5b54ae);}}function _0x56444b(_0x1853b3){try{_0xed3d9d(_0x49cce7['throw'](_0x1853b3));}catch(_0x7f65a3){_0x193f26(_0x7f65a3);}}function _0xed3d9d(_0x34f2fe){const _0x5a273e=_0x1894;_0x34f2fe[_0x5a273e(0x166)]?_0xd382c5(_0x34f2fe['value']):_0x4e1b11(_0x34f2fe[_0x5a273e(0x16d)])['then'](_0x32e4d3,_0x56444b);}_0xed3d9d((_0x49cce7=_0x49cce7[_0x2ef68a(0x160)](_0x4232b8,_0x41dc13||[]))[_0x2ef68a(0x174)]());});},__importDefault=this&&this[_0x5b0fd3(0x157)]||function(_0x5b017b){return _0x5b017b&&_0x5b017b['__esModule']?_0x5b017b:{'default':_0x5b017b};};Object[_0x5b0fd3(0x175)](exports,'__esModule',{'value':!![]}),exports[_0x5b0fd3(0x171)]=void 0x0;const base_helper_1=require('./base-helper'),path_1=__importDefault(require(_0x5b0fd3(0x167))),client_s3_1=require('@aws-sdk/client-s3'),unzipper_1=__importDefault(require(_0x5b0fd3(0x164))),aws_s3_utils_1=require(_0x5b0fd3(0x15a));class AwsS3Helper extends base_helper_1[_0x5b0fd3(0x15b)]{constructor(_0x39b214,_0x4facdc){const _0x49bdd6=_0x5b0fd3;super(_0x39b214),this[_0x49bdd6(0x172)]=_0x4facdc[_0x49bdd6(0x172)],this[_0x49bdd6(0x16c)]=aws_s3_utils_1[_0x49bdd6(0x163)][_0x49bdd6(0x16a)](_0x4facdc);}[_0x5b0fd3(0x161)](_0x488f86){const _0x1245a1=_0x5b0fd3;return unzipper_1[_0x1245a1(0x177)][_0x1245a1(0x159)]['s3_v3'](this[_0x1245a1(0x16c)],{'Bucket':this[_0x1245a1(0x172)],'Key':_0x488f86});}['ls'](_0x29d8a4){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3a3d3b=_0x1894;var _0x47027a;const {prefix:_0x241a17,delimiter:_0x53e125}=_0x29d8a4!==null&&_0x29d8a4!==void 0x0?_0x29d8a4:{},_0x30ab42=path_1[_0x3a3d3b(0x177)][_0x3a3d3b(0x15d)](this[_0x3a3d3b(0x165)],_0x241a17!==null&&_0x241a17!==void 0x0?_0x241a17:''),_0x38c660=new client_s3_1[(_0x3a3d3b(0x170))]({'Prefix':_0x30ab42,'Bucket':this[_0x3a3d3b(0x172)],'Delimiter':_0x53e125}),_0x1e0cf7=yield this['s3Client'][_0x3a3d3b(0x158)](_0x38c660);if(!((_0x47027a=_0x1e0cf7[_0x3a3d3b(0x178)])===null||_0x47027a===void 0x0?void 0x0:_0x47027a[_0x3a3d3b(0x15f)]))return[];const _0x5d2750=[];for(const {Key:_0x11caa0}of _0x1e0cf7[_0x3a3d3b(0x178)]){_0x11caa0['endsWith'](_0x3a3d3b(0x162))&&_0x5d2750[_0x3a3d3b(0x16f)](_0x11caa0);}return _0x5d2750;});}}exports[_0x5b0fd3(0x171)]=AwsS3Helper;function _0x1894(_0x5aa683,_0x100cde){_0x5aa683=_0x5aa683-0x156;const _0x3d75e5=_0x3d75();let _0x18949d=_0x3d75e5[_0x5aa683];return _0x18949d;}function _0x3d75(){const _0x39b863=['done','path','55074mbqxfO','436287ATVKAb','createS3Client','384FiOYkm','s3Client','value','1817199vJKELK','push','ListObjectsCommand','AwsS3Helper','bucketName','25851jxCAfu','next','defineProperty','614708dXYPZP','default','Contents','157022qSzJQv','__importDefault','send','Open','../../utils/aws-s3.utils','BaseHelper','41031fYdNCY','join','130VNdzVV','length','apply','getZipFileMeta','.zip','AwsS3Utils','unzipper','sourcePath'];_0x3d75=function(){return _0x39b863;};return _0x3d75();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0xafe76c=_0x2f00;(function(_0x132515,_0x2834c9){const _0x212f4c=_0x2f00,_0x402f27=_0x132515();while(!![]){try{const _0x42f68e=-parseInt(_0x212f4c(0x1bc))/0x1+-parseInt(_0x212f4c(0x1ca))/0x2*(parseInt(_0x212f4c(0x1b5))/0x3)+parseInt(_0x212f4c(0x1ba))/0x4*(parseInt(_0x212f4c(0x1bb))/0x5)+-parseInt(_0x212f4c(0x1c1))/0x6+parseInt(_0x212f4c(0x1a3))/0x7+parseInt(_0x212f4c(0x1ac))/0x8*(parseInt(_0x212f4c(0x1a8))/0x9)+parseInt(_0x212f4c(0x1c4))/0xa*(parseInt(_0x212f4c(0x1aa))/0xb);if(_0x42f68e===_0x2834c9)break;else _0x402f27['push'](_0x402f27['shift']());}catch(_0x4a551a){_0x402f27['push'](_0x402f27['shift']());}}}(_0x297e,0xb31ac));var __awaiter=this&&this[_0xafe76c(0x1b3)]||function(_0x5d18fc,_0x3e6c6c,_0xb4fa92,_0xa500b7){function _0x38b5d8(_0x1d917b){return _0x1d917b instanceof _0xb4fa92?_0x1d917b:new _0xb4fa92(function(_0x374f6a){_0x374f6a(_0x1d917b);});}return new(_0xb4fa92||(_0xb4fa92=Promise))(function(_0x2c4b25,_0xd5b1fd){const _0x59419b=_0x2f00;function _0xd6e701(_0x51d2c1){try{_0x56055b(_0xa500b7['next'](_0x51d2c1));}catch(_0x2dcca6){_0xd5b1fd(_0x2dcca6);}}function _0x1a27e7(_0x16815d){try{_0x56055b(_0xa500b7['throw'](_0x16815d));}catch(_0x166ddd){_0xd5b1fd(_0x166ddd);}}function _0x56055b(_0x8b6527){const _0x787d12=_0x2f00;_0x8b6527[_0x787d12(0x1b9)]?_0x2c4b25(_0x8b6527[_0x787d12(0x1b8)]):_0x38b5d8(_0x8b6527[_0x787d12(0x1b8)])['then'](_0xd6e701,_0x1a27e7);}_0x56055b((_0xa500b7=_0xa500b7[_0x59419b(0x1c6)](_0x5d18fc,_0x3e6c6c||[]))['next']());});},__importDefault=this&&this[_0xafe76c(0x1ae)]||function(_0x3fdf1b){const _0x1db8b3=_0xafe76c;return _0x3fdf1b&&_0x3fdf1b[_0x1db8b3(0x1c7)]?_0x3fdf1b:{'default':_0x3fdf1b};};function _0x297e(){const _0x6f57ea=['./base-helper','__importDefault','HttpsProxyAgent','response','sourcePath','Open','__awaiter','headers','201KJgIMv','containerClient','unzipper','value','done','4VUgugb','4822985ZnLqhL','1392521nrUeDt','defineProperty','https','default','../../utils/azure.utils','4482474QDhcCn','destroy','generateSasUrl','90bLHECd','url','apply','__esModule','abort','location','13690Thezfd','credentials','AzureUtils','stream','statusCode','8002127bEKaqb','AzureHelper','statusMessage','error','pipe','59427SWZZVw','emit','107987xkvWfY','now','1376JhmWaH'];_0x297e=function(){return _0x6f57ea;};return _0x297e();}Object[_0xafe76c(0x1bd)](exports,_0xafe76c(0x1c7),{'value':!![]}),exports[_0xafe76c(0x1a4)]=void 0x0;function _0x2f00(_0x59c30b,_0x1ad2cb){_0x59c30b=_0x59c30b-0x1a2;const _0x297e98=_0x297e();let _0x2f0042=_0x297e98[_0x59c30b];return _0x2f0042;}const base_helper_1=require(_0xafe76c(0x1ad)),unzipper_1=require(_0xafe76c(0x1b7)),storage_blob_1=require('@azure/storage-blob'),azure_utils_1=require(_0xafe76c(0x1c0)),stream_1=require(_0xafe76c(0x1cd)),https_1=__importDefault(require(_0xafe76c(0x1be))),https_proxy_agent_1=require('https-proxy-agent');function httpsRequest({url:_0x12cbbc,headers:headers={}}){const _0x535c10=_0xafe76c,_0x4f3489=new stream_1['PassThrough'](),_0x104b18=process.env.HTTPS_PROXY||process.env.HTTP_PROXY,_0x5e7fd5=_0x104b18?new https_proxy_agent_1[(_0x535c10(0x1af))](_0x104b18):undefined,_0x2abc1d=https_1[_0x535c10(0x1bf)]['get'](_0x12cbbc,{'headers':headers,'agent':_0x5e7fd5},_0x521597=>{const _0xf19491=_0x535c10;if(_0x521597[_0xf19491(0x1a2)]>=0x12c&&_0x521597[_0xf19491(0x1a2)]<0x190&&_0x521597['headers'][_0xf19491(0x1c9)])return httpsRequest({'url':_0x521597[_0xf19491(0x1b4)][_0xf19491(0x1c9)],'headers':headers})[_0xf19491(0x1a7)](_0x4f3489);if(_0x521597['statusCode']>=0x190){_0x4f3489[_0xf19491(0x1a9)](_0xf19491(0x1a6),new Error('HTTP\x20'+_0x521597[_0xf19491(0x1a2)]+':\x20'+_0x521597[_0xf19491(0x1a5)]));return;}_0x4f3489[_0xf19491(0x1a9)](_0xf19491(0x1b0),_0x521597),_0x521597['pipe'](_0x4f3489);})['on'](_0x535c10(0x1a6),_0x3fa741=>_0x4f3489[_0x535c10(0x1a9)](_0x535c10(0x1a6),_0x3fa741));return _0x4f3489[_0x535c10(0x1c8)]=()=>{const _0x1a9f35=_0x535c10;_0x2abc1d[_0x1a9f35(0x1c2)](),_0x4f3489['destroy']();},_0x4f3489;}class AzureHelper extends base_helper_1['BaseHelper']{constructor(_0x3ceb1d,_0x183cd5){const _0x2d94fc=_0xafe76c;super(_0x183cd5),this[_0x2d94fc(0x1cb)]=_0x3ceb1d,this[_0x2d94fc(0x1b6)]=azure_utils_1['AzureUtils']['createAzureBlobContainerClient'](this['credentials']);}['getZipFileMeta'](_0x41bba1){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xfd9e2=_0x2f00,_0x1c0fa8=this[_0xfd9e2(0x1b6)]['getBlockBlobClient'](_0x41bba1),_0x228d49=yield _0x1c0fa8[_0xfd9e2(0x1c3)]({'permissions':storage_blob_1['BlobSASPermissions']['parse']('r'),'expiresOn':new Date(Date[_0xfd9e2(0x1ab)]()+0x258*0x3e8)});return unzipper_1[_0xfd9e2(0x1b2)][_0xfd9e2(0x1c5)](httpsRequest,_0x228d49);});}['ls'](){const _0x3e73e1=_0xafe76c;return azure_utils_1[_0x3e73e1(0x1cc)]['getAzureBlobsPaths'](this[_0x3e73e1(0x1b1)],this[_0x3e73e1(0x1b6)]);}}exports['AzureHelper']=AzureHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x138a67=_0x5924;(function(_0x1699c8,_0xdeac43){var _0x5dec25=_0x5924,_0x132fe5=_0x1699c8();while(!![]){try{var _0x2d7fd9=-parseInt(_0x5dec25(0x161))/0x1+-parseInt(_0x5dec25(0x162))/0x2+-parseInt(_0x5dec25(0x15d))/0x3+parseInt(_0x5dec25(0x166))/0x4*(-parseInt(_0x5dec25(0x15f))/0x5)+parseInt(_0x5dec25(0x163))/0x6+-parseInt(_0x5dec25(0x165))/0x7+parseInt(_0x5dec25(0x160))/0x8;if(_0x2d7fd9===_0xdeac43)break;else _0x132fe5['push'](_0x132fe5['shift']());}catch(_0x2aafc4){_0x132fe5['push'](_0x132fe5['shift']());}}}(_0x4893,0x77255));function _0x4893(){var _0x54409d=['defineProperty','2273950NiQIDz','189608lyfNho','2699982lGVyHb','BaseHelper','25ZGSWEt','19728864hSqfol','482287iOCLDt','86192JuqOFX','54900KTKjnF'];_0x4893=function(){return _0x54409d;};return _0x4893();}function _0x5924(_0x2e102c,_0x258fe1){_0x2e102c=_0x2e102c-0x15d;var _0x489388=_0x4893();var _0x59249e=_0x489388[_0x2e102c];return _0x59249e;}Object[_0x138a67(0x164)](exports,'__esModule',{'value':!![]}),exports['BaseHelper']=void 0x0;class BaseHelper{constructor(_0x53eba5){this['sourcePath']=_0x53eba5;}}exports[_0x138a67(0x15e)]=BaseHelper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseHelper } from './base-helper';
|
|
2
|
+
import { CentralDirectory } from 'unzipper';
|
|
3
|
+
import { GoogleCloudCredentials } from '../../credentials';
|
|
4
|
+
export declare class GoogleCloudHelper extends BaseHelper {
|
|
5
|
+
private readonly bucket;
|
|
6
|
+
private readonly credentials;
|
|
7
|
+
constructor(credentials: GoogleCloudCredentials, path: string);
|
|
8
|
+
getZipFileMeta(fileName: string): Promise<CentralDirectory>;
|
|
9
|
+
ls(): Promise<string[]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x18c408=_0x893f;(function(_0x35322d,_0xc92df1){const _0x232eaf=_0x893f,_0x524a6f=_0x35322d();while(!![]){try{const _0x59c12f=-parseInt(_0x232eaf(0x83))/0x1+parseInt(_0x232eaf(0x7e))/0x2*(-parseInt(_0x232eaf(0x97))/0x3)+parseInt(_0x232eaf(0x9f))/0x4*(-parseInt(_0x232eaf(0xa9))/0x5)+parseInt(_0x232eaf(0x92))/0x6*(-parseInt(_0x232eaf(0xa8))/0x7)+-parseInt(_0x232eaf(0x8b))/0x8*(parseInt(_0x232eaf(0x8c))/0x9)+-parseInt(_0x232eaf(0x7d))/0xa+parseInt(_0x232eaf(0x98))/0xb;if(_0x59c12f===_0xc92df1)break;else _0x524a6f['push'](_0x524a6f['shift']());}catch(_0x274352){_0x524a6f['push'](_0x524a6f['shift']());}}}(_0x179a,0xe92d7));function _0x893f(_0x2ae737,_0x5b405d){_0x2ae737=_0x2ae737-0x79;const _0x179a67=_0x179a();let _0x893fce=_0x179a67[_0x2ae737];return _0x893fce;}var __awaiter=this&&this[_0x18c408(0x91)]||function(_0x1f96b6,_0x1e3eb5,_0x1abb36,_0x2ac5c0){function _0xf1f602(_0x520502){return _0x520502 instanceof _0x1abb36?_0x520502:new _0x1abb36(function(_0x1047f2){_0x1047f2(_0x520502);});}return new(_0x1abb36||(_0x1abb36=Promise))(function(_0x4ff468,_0x2f57de){const _0x45ed2a=_0x893f;function _0x46c989(_0x3de8b3){try{_0x166f23(_0x2ac5c0['next'](_0x3de8b3));}catch(_0x36e43b){_0x2f57de(_0x36e43b);}}function _0x59544b(_0x14232f){try{_0x166f23(_0x2ac5c0['throw'](_0x14232f));}catch(_0x15934a){_0x2f57de(_0x15934a);}}function _0x166f23(_0x34c486){const _0x167bfb=_0x893f;_0x34c486[_0x167bfb(0x7b)]?_0x4ff468(_0x34c486[_0x167bfb(0x9d)]):_0xf1f602(_0x34c486[_0x167bfb(0x9d)])[_0x167bfb(0x93)](_0x46c989,_0x59544b);}_0x166f23((_0x2ac5c0=_0x2ac5c0['apply'](_0x1f96b6,_0x1e3eb5||[]))[_0x45ed2a(0xa6)]());});},__importDefault=this&&this['__importDefault']||function(_0x7f2d8e){return _0x7f2d8e&&_0x7f2d8e['__esModule']?_0x7f2d8e:{'default':_0x7f2d8e};};Object[_0x18c408(0x8a)](exports,_0x18c408(0x9c),{'value':!![]}),exports[_0x18c408(0x96)]=void 0x0;const base_helper_1=require('./base-helper'),unzipper_1=require(_0x18c408(0x9a)),google_cloud_utils_1=require('../../utils/google-cloud.utils'),stream_1=require(_0x18c408(0xaa)),https_1=__importDefault(require(_0x18c408(0x7c))),https_proxy_agent_1=require(_0x18c408(0x87));function _0x179a(){const _0x447448=['24UViHMD','3680199bzEKpC','BaseHelper','credentials','location','destroy','__awaiter','2746770DQwSFC','then','error','bucket','GoogleCloudHelper','15DpkpPj','62505982stbOWY','emit','unzipper','pipe','__esModule','value','getSignedUrl','56fHlLXz','HttpsProxyAgent','abort','response','url','getFilesPaths','GoogleCloudUtils','next','HTTP\x20','21ZZqqUE','92435iQhHmc','stream','statusCode','now','done','https','12252180laNYLv','110846aWtORm','Open','file','default','PassThrough','365998kyuIyK','sourcePath','get','getZipFileMeta','https-proxy-agent','read','headers','defineProperty'];_0x179a=function(){return _0x447448;};return _0x179a();}function httpsRequest({url:_0x2165ce,headers:headers={}}){const _0x40740e=_0x18c408,_0x3e9a46=new stream_1[(_0x40740e(0x82))](),_0x312140=process.env.HTTPS_PROXY||process.env.HTTP_PROXY,_0x60399c=_0x312140?new https_proxy_agent_1[(_0x40740e(0xa0))](_0x312140):undefined,_0xe5ff7e=https_1[_0x40740e(0x81)][_0x40740e(0x85)](_0x2165ce,{'headers':headers,'agent':_0x60399c},_0x4c85ca=>{const _0x4ea4cb=_0x40740e;if(_0x4c85ca[_0x4ea4cb(0x79)]>=0x12c&&_0x4c85ca[_0x4ea4cb(0x79)]<0x190&&_0x4c85ca[_0x4ea4cb(0x89)][_0x4ea4cb(0x8f)])return httpsRequest({'url':_0x4c85ca[_0x4ea4cb(0x89)][_0x4ea4cb(0x8f)],'headers':headers})[_0x4ea4cb(0x9b)](_0x3e9a46);if(_0x4c85ca[_0x4ea4cb(0x79)]>=0x190){_0x3e9a46[_0x4ea4cb(0x99)](_0x4ea4cb(0x94),new Error(_0x4ea4cb(0xa7)+_0x4c85ca[_0x4ea4cb(0x79)]+':\x20'+_0x4c85ca['statusMessage']));return;}_0x3e9a46['emit'](_0x4ea4cb(0xa2),_0x4c85ca),_0x4c85ca[_0x4ea4cb(0x9b)](_0x3e9a46);})['on'](_0x40740e(0x94),_0x4fb03e=>_0x3e9a46[_0x40740e(0x99)](_0x40740e(0x94),_0x4fb03e));return _0x3e9a46[_0x40740e(0xa1)]=()=>{const _0x283e7f=_0x40740e;_0xe5ff7e['destroy'](),_0x3e9a46[_0x283e7f(0x90)]();},_0x3e9a46;}class GoogleCloudHelper extends base_helper_1[_0x18c408(0x8d)]{constructor(_0x32d8d1,_0x512ab5){const _0x191d15=_0x18c408;super(_0x512ab5),this[_0x191d15(0x8e)]=_0x32d8d1,this['bucket']=google_cloud_utils_1[_0x191d15(0xa5)]['createBucket'](this['credentials']);}[_0x18c408(0x86)](_0x5ebb1c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1f9588=_0x893f,_0x253f7b=this[_0x1f9588(0x95)][_0x1f9588(0x80)](_0x5ebb1c),[_0x4afba3]=yield _0x253f7b[_0x1f9588(0x9e)]({'version':'v4','action':_0x1f9588(0x88),'expires':Date[_0x1f9588(0x7a)]()+0x258*0x3e8});return unzipper_1[_0x1f9588(0x7f)][_0x1f9588(0xa3)](httpsRequest,_0x4afba3);});}['ls'](){const _0x3af3a7=_0x18c408;return google_cloud_utils_1[_0x3af3a7(0xa5)][_0x3af3a7(0xa4)](this[_0x3af3a7(0x84)],this['bucket']);}}exports['GoogleCloudHelper']=GoogleCloudHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x44d35b=_0x4419;(function(_0x54e4e2,_0x4d3184){const _0x3cb85d=_0x4419,_0x65aa97=_0x54e4e2();while(!![]){try{const _0x3140c3=parseInt(_0x3cb85d(0xe5))/0x1*(-parseInt(_0x3cb85d(0xda))/0x2)+parseInt(_0x3cb85d(0xdd))/0x3+-parseInt(_0x3cb85d(0xe0))/0x4+parseInt(_0x3cb85d(0xd9))/0x5+parseInt(_0x3cb85d(0xdf))/0x6+parseInt(_0x3cb85d(0xe7))/0x7*(-parseInt(_0x3cb85d(0xeb))/0x8)+-parseInt(_0x3cb85d(0xdc))/0x9;if(_0x3140c3===_0x4d3184)break;else _0x65aa97['push'](_0x65aa97['shift']());}catch(_0x481e5c){_0x65aa97['push'](_0x65aa97['shift']());}}}(_0x4c78,0x9e98e));var __awaiter=this&&this[_0x44d35b(0xd8)]||function(_0x23bd43,_0x4127fd,_0x473dc6,_0x33d1bb){function _0x8cd1ad(_0x1006cb){return _0x1006cb instanceof _0x473dc6?_0x1006cb:new _0x473dc6(function(_0x984b5){_0x984b5(_0x1006cb);});}return new(_0x473dc6||(_0x473dc6=Promise))(function(_0x5dc6e8,_0x16ed27){const _0x31fdce=_0x4419;function _0x578942(_0x56fb5e){const _0x10a69d=_0x4419;try{_0x59d980(_0x33d1bb[_0x10a69d(0xe1)](_0x56fb5e));}catch(_0x5d66b2){_0x16ed27(_0x5d66b2);}}function _0x4e7cf4(_0xed845b){const _0x448a46=_0x4419;try{_0x59d980(_0x33d1bb[_0x448a46(0xdb)](_0xed845b));}catch(_0x76cf14){_0x16ed27(_0x76cf14);}}function _0x59d980(_0x21d17e){const _0x579df6=_0x4419;_0x21d17e['done']?_0x5dc6e8(_0x21d17e[_0x579df6(0xec)]):_0x8cd1ad(_0x21d17e[_0x579df6(0xec)])[_0x579df6(0xee)](_0x578942,_0x4e7cf4);}_0x59d980((_0x33d1bb=_0x33d1bb[_0x31fdce(0xef)](_0x23bd43,_0x4127fd||[]))['next']());});},__importDefault=this&&this[_0x44d35b(0xe6)]||function(_0xd68f35){return _0xd68f35&&_0xd68f35['__esModule']?_0xd68f35:{'default':_0xd68f35};};Object[_0x44d35b(0xea)](exports,_0x44d35b(0xe8),{'value':!![]}),exports[_0x44d35b(0xe9)]=void 0x0;const base_helper_1=require('./base-helper'),unzipper_1=__importDefault(require(_0x44d35b(0xe2))),promises_1=require(_0x44d35b(0xe4));function _0x4419(_0x2be687,_0x197e20){_0x2be687=_0x2be687-0xd8;const _0x4c7834=_0x4c78();let _0x44191d=_0x4c7834[_0x2be687];return _0x44191d;}function _0x4c78(){const _0x40b62f=['getZipFileMeta','node:fs/promises','1IfVpRZ','__importDefault','7QZcppT','__esModule','LocalHelper','defineProperty','8672544iTPhpp','value','default','then','apply','sourcePath','__awaiter','1414240Qnugsp','729050sxcaQU','throw','2532249GpjAgI','3584337itENLY','readdir','5443422kNdrEy','21184Diztwg','next','unzipper'];_0x4c78=function(){return _0x40b62f;};return _0x4c78();}class LocalHelper extends base_helper_1['BaseHelper']{[_0x44d35b(0xe3)](_0x3a182e){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x441c1a=_0x4419;return unzipper_1[_0x441c1a(0xed)]['Open']['file'](this[_0x441c1a(0xf0)]+'/'+_0x3a182e);});}['ls'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3b7bbb=_0x4419;return(0x0,promises_1[_0x3b7bbb(0xde)])(this[_0x3b7bbb(0xf0)]);});}}exports[_0x44d35b(0xe9)]=LocalHelper;
|
package/dist/retrieve/index.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ export { AwsS3Retrieve } from './aws-s3-retrieve';
|
|
|
3
3
|
export { LocalRetrieve } from './local-retrieve';
|
|
4
4
|
export { AwsS3ImportHelper } from './aws-s3-import-helper';
|
|
5
5
|
export { AzureRetrieve } from './azure-retrieve';
|
|
6
|
+
export { GoogleCloudRetrieve } from './google-cloud-retrieve';
|
|
6
7
|
export { AzureHelper } from './helpers/azure-helper';
|
|
8
|
+
export { GoogleCloudHelper } from './helpers/google-cloud-helper';
|
|
7
9
|
export { LocalHelper } from './helpers/local-helper';
|
|
8
10
|
export { AwsS3Helper } from './helpers/aws-s3-helper';
|
|
9
11
|
export { BaseHelper } from './helpers/base-helper';
|
package/dist/retrieve/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x44aa3c=_0x4bec;(function(_0x4c58eb,_0x1d866f){var _0x2b8ad9=_0x4bec,_0xd8786a=_0x4c58eb();while(!![]){try{var _0x1c574f=-parseInt(_0x2b8ad9(0x9c))/0x1+parseInt(_0x2b8ad9(0x98))/0x2+-parseInt(_0x2b8ad9(0x97))/0x3+parseInt(_0x2b8ad9(0xa9))/0x4+parseInt(_0x2b8ad9(0x8b))/0x5+-parseInt(_0x2b8ad9(0xa3))/0x6*(parseInt(_0x2b8ad9(0xab))/0x7)+-parseInt(_0x2b8ad9(0xa1))/0x8*(-parseInt(_0x2b8ad9(0x8d))/0x9);if(_0x1c574f===_0x1d866f)break;else _0xd8786a['push'](_0xd8786a['shift']());}catch(_0x4e74ca){_0xd8786a['push'](_0xd8786a['shift']());}}}(_0x54cf,0x20dd9));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x95),{'value':!![]}),exports[_0x44aa3c(0x8c)]=exports['AwsS3Helper']=exports[_0x44aa3c(0x99)]=exports[_0x44aa3c(0x92)]=exports[_0x44aa3c(0xa0)]=exports[_0x44aa3c(0x94)]=exports['AzureRetrieve']=exports[_0x44aa3c(0xa6)]=exports[_0x44aa3c(0x96)]=exports['AwsS3Retrieve']=exports[_0x44aa3c(0xa8)]=void 0x0;var base_retrieve_1=require(_0x44aa3c(0x9d));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0xa8),{'enumerable':!![],'get':function(){var _0x3a31a8=_0x44aa3c;return base_retrieve_1[_0x3a31a8(0xa8)];}});var aws_s3_retrieve_1=require(_0x44aa3c(0xa5));function _0x54cf(){var _0x34cf7=['188335KzYEbj','337535nTMMnZ','BaseHelper','9UOrHCF','./helpers/google-cloud-helper','./azure-retrieve','AwsS3Retrieve','defineProperty','GoogleCloudHelper','./helpers/base-helper','GoogleCloudRetrieve','__esModule','LocalRetrieve','331752oBXsUl','141086SqTtUX','LocalHelper','./helpers/aws-s3-helper','./local-retrieve','11237nECpkW','./base-retrieve','./helpers/local-helper','./helpers/azure-helper','AzureHelper','1567768KbAOYO','./aws-s3-import-helper','54cCGeaR','AzureRetrieve','./aws-s3-retrieve','AwsS3ImportHelper','AwsS3Helper','BaseRetrieve','658248XDdtfN','./google-cloud-retrieve'];_0x54cf=function(){return _0x34cf7;};return _0x54cf();}Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x90),{'enumerable':!![],'get':function(){var _0x566517=_0x44aa3c;return aws_s3_retrieve_1[_0x566517(0x90)];}});var local_retrieve_1=require(_0x44aa3c(0x9b));function _0x4bec(_0x1c3ece,_0x510fa6){_0x1c3ece=_0x1c3ece-0x8b;var _0x54cf7b=_0x54cf();var _0x4becd4=_0x54cf7b[_0x1c3ece];return _0x4becd4;}Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x96),{'enumerable':!![],'get':function(){return local_retrieve_1['LocalRetrieve'];}});var aws_s3_import_helper_1=require(_0x44aa3c(0xa2));Object['defineProperty'](exports,_0x44aa3c(0xa6),{'enumerable':!![],'get':function(){var _0x33efd3=_0x44aa3c;return aws_s3_import_helper_1[_0x33efd3(0xa6)];}});var azure_retrieve_1=require(_0x44aa3c(0x8f));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0xa4),{'enumerable':!![],'get':function(){return azure_retrieve_1['AzureRetrieve'];}});var google_cloud_retrieve_1=require(_0x44aa3c(0xaa));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x94),{'enumerable':!![],'get':function(){return google_cloud_retrieve_1['GoogleCloudRetrieve'];}});var azure_helper_1=require(_0x44aa3c(0x9f));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0xa0),{'enumerable':!![],'get':function(){var _0x3071ea=_0x44aa3c;return azure_helper_1[_0x3071ea(0xa0)];}});var google_cloud_helper_1=require(_0x44aa3c(0x8e));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x92),{'enumerable':!![],'get':function(){return google_cloud_helper_1['GoogleCloudHelper'];}});var local_helper_1=require(_0x44aa3c(0x9e));Object[_0x44aa3c(0x91)](exports,_0x44aa3c(0x99),{'enumerable':!![],'get':function(){var _0x44336f=_0x44aa3c;return local_helper_1[_0x44336f(0x99)];}});var aws_s3_helper_1=require(_0x44aa3c(0x9a));Object[_0x44aa3c(0x91)](exports,'AwsS3Helper',{'enumerable':!![],'get':function(){var _0x4fe6a8=_0x44aa3c;return aws_s3_helper_1[_0x4fe6a8(0xa7)];}});var base_helper_1=require(_0x44aa3c(0x93));Object[_0x44aa3c(0x91)](exports,'BaseHelper',{'enumerable':!![],'get':function(){var _0x4a6a30=_0x44aa3c;return base_helper_1[_0x4a6a30(0x8c)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0xcdf14a=_0x4868;(function(_0x5e8021,_0x560915){const _0x343a05=_0x4868,_0x32b2e4=_0x5e8021();while(!![]){try{const _0x2b1518=-parseInt(_0x343a05(0x175))/0x1*(parseInt(_0x343a05(0x18a))/0x2)+parseInt(_0x343a05(0x184))/0x3+-parseInt(_0x343a05(0x182))/0x4*(parseInt(_0x343a05(0x17a))/0x5)+parseInt(_0x343a05(0x17e))/0x6+parseInt(_0x343a05(0x189))/0x7+parseInt(_0x343a05(0x171))/0x8+-parseInt(_0x343a05(0x187))/0x9*(parseInt(_0x343a05(0x18b))/0xa);if(_0x2b1518===_0x560915)break;else _0x32b2e4['push'](_0x32b2e4['shift']());}catch(_0x3330f3){_0x32b2e4['push'](_0x32b2e4['shift']());}}}(_0x41a0,0x18b5d));function _0x41a0(){const _0x1390ee=['waitUntilRetrieveDone','shift','50ilSyhJ','length','filesPaths','value','397716IayHct','__esModule','then','BaseRetrieve','50896hXaOlV','done','183870QUofRt','LocalRetrieve','execute','9bpjCQa','readFilesToRetrieve','938721xaHJbK','2EXVJfM','1698010KNyKCM','status','FsUtils','apply','getFolderFiles','1487216rxOEHv','throw','createReadStream','next','49327MRzheR','RetrieveStatus','@flosum/utils'];_0x41a0=function(){return _0x1390ee;};return _0x41a0();}var __awaiter=this&&this['__awaiter']||function(_0x5b39b2,_0x32e833,_0x28897f,_0x7b10d0){function _0x16d239(_0x247bfc){return _0x247bfc instanceof _0x28897f?_0x247bfc:new _0x28897f(function(_0x224642){_0x224642(_0x247bfc);});}return new(_0x28897f||(_0x28897f=Promise))(function(_0x1c0baa,_0x554910){const _0x2a6d3b=_0x4868;function _0x10ba66(_0x415fff){const _0x530eb9=_0x4868;try{_0x55aa8a(_0x7b10d0[_0x530eb9(0x174)](_0x415fff));}catch(_0x14a1a1){_0x554910(_0x14a1a1);}}function _0x52fb92(_0x5e7eb8){const _0x594766=_0x4868;try{_0x55aa8a(_0x7b10d0[_0x594766(0x172)](_0x5e7eb8));}catch(_0x597ca3){_0x554910(_0x597ca3);}}function _0x55aa8a(_0x4c09bd){const _0x436246=_0x4868;_0x4c09bd[_0x436246(0x183)]?_0x1c0baa(_0x4c09bd[_0x436246(0x17d)]):_0x16d239(_0x4c09bd[_0x436246(0x17d)])[_0x436246(0x180)](_0x10ba66,_0x52fb92);}_0x55aa8a((_0x7b10d0=_0x7b10d0[_0x2a6d3b(0x18e)](_0x5b39b2,_0x32e833||[]))[_0x2a6d3b(0x174)]());});};Object['defineProperty'](exports,_0xcdf14a(0x17f),{'value':!![]}),exports[_0xcdf14a(0x185)]=void 0x0;const fs_1=require('fs'),utils_1=require(_0xcdf14a(0x177)),_1=require('./'),retrieve_status_enum_1=require('../types/retrieve-status.enum');class LocalRetrieve extends _1[_0xcdf14a(0x181)]{constructor(){const _0x1bc751=_0xcdf14a;super(...arguments),this[_0x1bc751(0x17c)]=[];}[_0xcdf14a(0x186)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x274992=_0x4868,_0x173561=this[_0x274992(0x17c)][_0x274992(0x179)](),_0x267a5c=(0x0,fs_1[_0x274992(0x173)])(_0x173561);return this['isDone']=!this[_0x274992(0x17c)][_0x274992(0x17b)],{'path':_0x173561,'content':_0x267a5c};});}[_0xcdf14a(0x188)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3edcf7=_0x4868;this[_0x3edcf7(0x17c)]=yield utils_1[_0x3edcf7(0x18d)][_0x3edcf7(0x18f)](this['path']);});}[_0xcdf14a(0x178)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x947c95=_0x4868;this['status']===retrieve_status_enum_1['RetrieveStatus']['Uninitialized']&&(yield this['readFilesToRetrieve'](),this[_0x947c95(0x18c)]=retrieve_status_enum_1[_0x947c95(0x176)]['Completed']);});}}function _0x4868(_0x15f7fa,_0x5b7aca){_0x15f7fa=_0x15f7fa-0x171;const _0x41a080=_0x41a0();let _0x48687b=_0x41a080[_0x15f7fa];return _0x48687b;}exports[_0xcdf14a(0x185)]=LocalRetrieve;
|
package/dist/types/aws.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function _0x461d(){var _0x3fed69=['229926qctNgL','19247022weTXfv','Available','31135PfjuzK','6329504Rnjuvu','226045ryJFTb','36zdQkWt','4711616CHYykr','__esModule','Restoring','defineProperty','98LaLKsa','AwsFileRetrieveStatus','NeedRestore','4911327ygJOWC'];_0x461d=function(){return _0x3fed69;};return _0x461d();}var _0x575a95=_0x2c25;(function(_0x351d63,_0x2f664b){var _0x3e65e4=_0x2c25,_0x1a6786=_0x351d63();while(!![]){try{var _0x17ed74=-parseInt(_0x3e65e4(0x10a))/0x1*(parseInt(_0x3e65e4(0x10d))/0x2)+-parseInt(_0x3e65e4(0x115))/0x3+parseInt(_0x3e65e4(0x10e))/0x4+parseInt(_0x3e65e4(0x10c))/0x5+-parseInt(_0x3e65e4(0x116))/0x6*(-parseInt(_0x3e65e4(0x112))/0x7)+-parseInt(_0x3e65e4(0x10b))/0x8+parseInt(_0x3e65e4(0x108))/0x9;if(_0x17ed74===_0x2f664b)break;else _0x1a6786['push'](_0x1a6786['shift']());}catch(_0x51f9fa){_0x1a6786['push'](_0x1a6786['shift']());}}}(_0x461d,0xde07e));function _0x2c25(_0x36f2b7,_0x250361){_0x36f2b7=_0x36f2b7-0x108;var _0x461d94=_0x461d();var _0x2c2549=_0x461d94[_0x36f2b7];return _0x2c2549;}Object[_0x575a95(0x111)](exports,_0x575a95(0x10f),{'value':!![]}),exports['AwsFileRetrieveStatus']=void 0x0;var AwsFileRetrieveStatus;(function(_0x226315){var _0x4e569b=_0x575a95;_0x226315['Available']=_0x4e569b(0x109),_0x226315[_0x4e569b(0x110)]=_0x4e569b(0x110),_0x226315[_0x4e569b(0x114)]=_0x4e569b(0x114);}(AwsFileRetrieveStatus||(exports[_0x575a95(0x113)]=AwsFileRetrieveStatus={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x41e94a,_0x305686){var _0x51fa40=_0x33fb,_0x2bd78b=_0x41e94a();while(!![]){try{var _0xf217b9=parseInt(_0x51fa40(0x1cf))/0x1*(-parseInt(_0x51fa40(0x1c8))/0x2)+parseInt(_0x51fa40(0x1cb))/0x3*(-parseInt(_0x51fa40(0x1cd))/0x4)+parseInt(_0x51fa40(0x1c9))/0x5*(parseInt(_0x51fa40(0x1c6))/0x6)+-parseInt(_0x51fa40(0x1ca))/0x7+-parseInt(_0x51fa40(0x1ce))/0x8+parseInt(_0x51fa40(0x1cc))/0x9+parseInt(_0x51fa40(0x1c7))/0xa;if(_0xf217b9===_0x305686)break;else _0x2bd78b['push'](_0x2bd78b['shift']());}catch(_0x3f31c7){_0x2bd78b['push'](_0x2bd78b['shift']());}}}(_0xa3d5,0x1c936));function _0x33fb(_0x3f469c,_0x1d4d1a){_0x3f469c=_0x3f469c-0x1c6;var _0xa3d5f7=_0xa3d5();var _0x33fb86=_0xa3d5f7[_0x3f469c];return _0x33fb86;}Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0xa3d5(){var _0x54cf4f=['4068XnQnAa','3400920rJizZO','56264EapMAC','25fKUnXy','580398sjlaEx','6ekbhcn','660312wZXOIG','96284spsSRW','1124928mldbft','1AylfzW'];_0xa3d5=function(){return _0x54cf4f;};return _0xa3d5();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function _0x2915(){var _0x2194d2=['12ABLFbd','2842152LqBZwV','13364dzrxpH','483321RoEVmH','defineProperty','117248eYpMSr','710435xNtSKt','__esModule','182142eSeXgv','7nzmcod','2337426NSVzEj'];_0x2915=function(){return _0x2194d2;};return _0x2915();}var _0x261f78=_0x22cd;(function(_0x41899f,_0xb1b934){var _0x1c3ec1=_0x22cd,_0x2e242f=_0x41899f();while(!![]){try{var _0x1ee4c6=-parseInt(_0x1c3ec1(0x114))/0x1+parseInt(_0x1c3ec1(0x111))/0x2+parseInt(_0x1c3ec1(0x10f))/0x3+parseInt(_0x1c3ec1(0x10e))/0x4+-parseInt(_0x1c3ec1(0x112))/0x5*(-parseInt(_0x1c3ec1(0x117))/0x6)+-parseInt(_0x1c3ec1(0x115))/0x7*(parseInt(_0x1c3ec1(0x118))/0x8)+parseInt(_0x1c3ec1(0x116))/0x9;if(_0x1ee4c6===_0xb1b934)break;else _0x2e242f['push'](_0x2e242f['shift']());}catch(_0x154e94){_0x2e242f['push'](_0x2e242f['shift']());}}}(_0x2915,0x380ad));function _0x22cd(_0x38f7a5,_0x5abd33){_0x38f7a5=_0x38f7a5-0x10e;var _0x291580=_0x2915();var _0x22cd72=_0x291580[_0x38f7a5];return _0x22cd72;}Object[_0x261f78(0x110)](exports,_0x261f78(0x113),{'value':!![]});
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x5d1177=_0x2a72;(function(_0x1477a2,_0x230e18){var _0x30b360=_0x2a72,_0x257fa2=_0x1477a2();while(!![]){try{var _0x53d9f7=parseInt(_0x30b360(0x12e))/0x1*(-parseInt(_0x30b360(0x130))/0x2)+-parseInt(_0x30b360(0x124))/0x3*(-parseInt(_0x30b360(0x128))/0x4)+-parseInt(_0x30b360(0x12f))/0x5*(parseInt(_0x30b360(0x125))/0x6)+parseInt(_0x30b360(0x12d))/0x7+parseInt(_0x30b360(0x127))/0x8+parseInt(_0x30b360(0x129))/0x9+-parseInt(_0x30b360(0x12c))/0xa;if(_0x53d9f7===_0x230e18)break;else _0x257fa2['push'](_0x257fa2['shift']());}catch(_0x1c07a6){_0x257fa2['push'](_0x257fa2['shift']());}}}(_0x468a,0x6259f));function _0x2a72(_0x2ad49b,_0x1cfa94){_0x2ad49b=_0x2ad49b-0x124;var _0x468a98=_0x468a();var _0x2a728a=_0x468a98[_0x2ad49b];return _0x2a728a;}Object[_0x5d1177(0x126)](exports,_0x5d1177(0x12b),{'value':!![]}),exports[_0x5d1177(0x12a)]=void 0x0;var storage_type_enum_1=require(_0x5d1177(0x131));function _0x468a(){var _0x1160f5=['defineProperty','1190712uDQrqA','127976uBVvBM','4392162JBpeHL','StorageType','__esModule','253560bkvxXa','200774vWimZG','1ceQfob','508825AKOpuY','480830grJSeO','./storage-type.enum','48vZiSpX','30lUZyAq'];_0x468a=function(){return _0x1160f5;};return _0x468a();}Object[_0x5d1177(0x126)](exports,_0x5d1177(0x12a),{'enumerable':!![],'get':function(){var _0x1707fd=_0x5d1177;return storage_type_enum_1[_0x1707fd(0x12a)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x5c6c(_0x5ae3de,_0x79a405){_0x5ae3de=_0x5ae3de-0xb3;var _0x2fd208=_0x2fd2();var _0x5c6c83=_0x2fd208[_0x5ae3de];return _0x5c6c83;}var _0x1c5264=_0x5c6c;(function(_0x5e4570,_0x2f4a19){var _0x3519dc=_0x5c6c,_0x48aaf4=_0x5e4570();while(!![]){try{var _0x1dbb79=parseInt(_0x3519dc(0xb7))/0x1*(-parseInt(_0x3519dc(0xb3))/0x2)+-parseInt(_0x3519dc(0xba))/0x3*(parseInt(_0x3519dc(0xb4))/0x4)+parseInt(_0x3519dc(0xbc))/0x5+-parseInt(_0x3519dc(0xb5))/0x6+parseInt(_0x3519dc(0xb6))/0x7+-parseInt(_0x3519dc(0xbd))/0x8+parseInt(_0x3519dc(0xbb))/0x9;if(_0x1dbb79===_0x2f4a19)break;else _0x48aaf4['push'](_0x48aaf4['shift']());}catch(_0x1a5e7d){_0x48aaf4['push'](_0x48aaf4['shift']());}}}(_0x2fd2,0x736db));function _0x2fd2(){var _0x579dd4=['6VIsfaS','6148827cGyDXJ','3767720ZFtfDe','3861840eCLmbD','2486IcMirD','1027476zhoRux','1889964HorMkz','2876321VSwUEB','51NKVEUg','defineProperty','__esModule'];_0x2fd2=function(){return _0x579dd4;};return _0x2fd2();}Object[_0x1c5264(0xb8)](exports,_0x1c5264(0xb9),{'value':!![]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0x2cd6be=_0x2bbe;(function(_0x26abb3,_0x1e71f7){var _0x125183=_0x2bbe,_0x2cc731=_0x26abb3();while(!![]){try{var _0x8c0b75=parseInt(_0x125183(0x7c))/0x1+-parseInt(_0x125183(0x81))/0x2+parseInt(_0x125183(0x76))/0x3*(-parseInt(_0x125183(0x7b))/0x4)+parseInt(_0x125183(0x77))/0x5+-parseInt(_0x125183(0x7e))/0x6+-parseInt(_0x125183(0x79))/0x7*(parseInt(_0x125183(0x75))/0x8)+parseInt(_0x125183(0x7f))/0x9*(parseInt(_0x125183(0x80))/0xa);if(_0x8c0b75===_0x1e71f7)break;else _0x2cc731['push'](_0x2cc731['shift']());}catch(_0xd21cdf){_0x2cc731['push'](_0x2cc731['shift']());}}}(_0x4cee,0x5d456));Object[_0x2cd6be(0x72)](exports,'__esModule',{'value':!![]}),exports[_0x2cd6be(0x78)]=void 0x0;function _0x2bbe(_0x1f4050,_0x12db8d){_0x1f4050=_0x1f4050-0x72;var _0x4cee6f=_0x4cee();var _0x2bbead=_0x4cee6f[_0x1f4050];return _0x2bbead;}var RetrieveStatus;(function(_0x5eacf4){var _0x2d79c8=_0x2cd6be;_0x5eacf4[_0x2d79c8(0x7a)]=_0x2d79c8(0x7a),_0x5eacf4[_0x2d79c8(0x74)]=_0x2d79c8(0x73),_0x5eacf4[_0x2d79c8(0x7d)]=_0x2d79c8(0x7d),_0x5eacf4['Exception']='Exception';}(RetrieveStatus||(exports[_0x2cd6be(0x78)]=RetrieveStatus={})));function _0x4cee(){var _0x368abd=['528096wPPlaL','Completed','1486284ZNGvSD','45WFHVsG','3355690KxWEtg','942968CIZDaI','defineProperty','In\x20Progress','InProgress','8usJQhe','336543ogyYzM','643150jQuJgX','RetrieveStatus','3921743jeQndX','Uninitialized','24GqOVfV'];_0x4cee=function(){return _0x368abd;};return _0x4cee();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x5778(_0x46c2ee,_0x55c290){_0x46c2ee=_0x46c2ee-0xc4;var _0x580f3a=_0x580f();var _0x577873=_0x580f3a[_0x46c2ee];return _0x577873;}var _0x48bb6b=_0x5778;(function(_0x50434d,_0x5004ae){var _0x2cad92=_0x5778,_0x3946ac=_0x50434d();while(!![]){try{var _0x2459ad=parseInt(_0x2cad92(0xc4))/0x1+parseInt(_0x2cad92(0xd2))/0x2+-parseInt(_0x2cad92(0xc8))/0x3*(parseInt(_0x2cad92(0xd1))/0x4)+-parseInt(_0x2cad92(0xcc))/0x5+-parseInt(_0x2cad92(0xc5))/0x6+parseInt(_0x2cad92(0xc6))/0x7*(parseInt(_0x2cad92(0xcb))/0x8)+parseInt(_0x2cad92(0xc9))/0x9;if(_0x2459ad===_0x5004ae)break;else _0x3946ac['push'](_0x3946ac['shift']());}catch(_0x53aced){_0x3946ac['push'](_0x3946ac['shift']());}}}(_0x580f,0x1c3d7));Object[_0x48bb6b(0xcd)](exports,'__esModule',{'value':!![]}),exports[_0x48bb6b(0xca)]=void 0x0;var StorageType;(function(_0x30847e){var _0x539080=_0x48bb6b;_0x30847e[_0x539080(0xcf)]='Local',_0x30847e['AWS_S3']=_0x539080(0xce),_0x30847e[_0x539080(0xd0)]=_0x539080(0xd0),_0x30847e[_0x539080(0xc7)]=_0x539080(0xc7);}(StorageType||(exports['StorageType']=StorageType={})));function _0x580f(){var _0x582b2d=['48678csMwzs','208365atAzGP','770826lJxusx','7EklOzU','GOOGLE_CLOUD_STORAGE','7512ymIMGO','1156671COCJjd','StorageType','411952ZNXwMQ','16555MOeJsm','defineProperty','AWS_S3','Local','AZURE_BLOB','264ITVHDO'];_0x580f=function(){return _0x582b2d;};return _0x580f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x39c355=_0x226a;(function(_0x20917d,_0x5647ae){const _0x40edaa=_0x226a,_0x29c6fe=_0x20917d();while(!![]){try{const _0x390714=-parseInt(_0x40edaa(0x1e2))/0x1+-parseInt(_0x40edaa(0x1e9))/0x2*(-parseInt(_0x40edaa(0x1f5))/0x3)+parseInt(_0x40edaa(0x1f7))/0x4+parseInt(_0x40edaa(0x1f0))/0x5+-parseInt(_0x40edaa(0x1eb))/0x6+-parseInt(_0x40edaa(0x1f6))/0x7*(-parseInt(_0x40edaa(0x1ef))/0x8)+-parseInt(_0x40edaa(0x1f8))/0x9;if(_0x390714===_0x5647ae)break;else _0x29c6fe['push'](_0x29c6fe['shift']());}catch(_0xedca44){_0x29c6fe['push'](_0x29c6fe['shift']());}}}(_0x1094,0x28489));function _0x1094(){const _0x59631c=['add','__esModule','147472CmoqFU','DEEP_ARCHIVE','1744488luVuhr','getFilesPaths','AwsS3Utils','extractFileRetrieveStatusFromRestoreField','545312jGfchH','1331150Hcqqmk','then','done','includes','createS3Client','6NqcBNz','14ISLSxD','296084OfvEfv','114372howlwv','false','match','HttpHandler','credentials','Restore','AwsFileRetrieveStatus','StorageClass','throw','@aws-sdk/client-s3','ListObjectsCommand','apply','../types/aws.types','Available','extractFileRetrieveStatusFromFileInfo','Restoring','155594PJtuMg','value','next','applyMiddlewaresToS3Client','__awaiter'];_0x1094=function(){return _0x59631c;};return _0x1094();}var __awaiter=this&&this[_0x39c355(0x1e6)]||function(_0x1b2135,_0x2d311a,_0x5867be,_0x23aae2){function _0x4c9153(_0x45dc9f){return _0x45dc9f instanceof _0x5867be?_0x45dc9f:new _0x5867be(function(_0x2710a8){_0x2710a8(_0x45dc9f);});}return new(_0x5867be||(_0x5867be=Promise))(function(_0x351f1d,_0x4f14b2){const _0x428e57=_0x226a;function _0x55c4fd(_0x19e72d){const _0x1b47fe=_0x226a;try{_0x574e7d(_0x23aae2[_0x1b47fe(0x1e4)](_0x19e72d));}catch(_0xf2ee21){_0x4f14b2(_0xf2ee21);}}function _0x3ba8b5(_0x1982ec){const _0x541af0=_0x226a;try{_0x574e7d(_0x23aae2[_0x541af0(0x1da)](_0x1982ec));}catch(_0x2d8aa5){_0x4f14b2(_0x2d8aa5);}}function _0x574e7d(_0x1257c8){const _0x9e398=_0x226a;_0x1257c8[_0x9e398(0x1f2)]?_0x351f1d(_0x1257c8[_0x9e398(0x1e3)]):_0x4c9153(_0x1257c8['value'])[_0x9e398(0x1f1)](_0x55c4fd,_0x3ba8b5);}_0x574e7d((_0x23aae2=_0x23aae2[_0x428e57(0x1dd)](_0x1b2135,_0x2d311a||[]))['next']());});};Object['defineProperty'](exports,_0x39c355(0x1e8),{'value':!![]}),exports[_0x39c355(0x1ed)]=void 0x0;const init_1=require('../init'),aws_types_1=require(_0x39c355(0x1de)),client_s3_1=require(_0x39c355(0x1db)),ARCHIVE_TYPES=['GLACIER','GLACIER_IR',_0x39c355(0x1ea)];function _0x226a(_0x5ae450,_0x3321d0){_0x5ae450=_0x5ae450-0x1d3;const _0x10944d=_0x1094();let _0x226a75=_0x10944d[_0x5ae450];return _0x226a75;}class AwsS3Utils{static[_0x39c355(0x1e0)](_0x270171){const _0x35857a=_0x39c355;if(ARCHIVE_TYPES[_0x35857a(0x1f3)](_0x270171[_0x35857a(0x1d9)])){if(_0x270171[_0x35857a(0x1d7)])return AwsS3Utils[_0x35857a(0x1ee)](_0x270171[_0x35857a(0x1d7)]);return aws_types_1[_0x35857a(0x1d8)]['NeedRestore'];}return aws_types_1[_0x35857a(0x1d8)][_0x35857a(0x1df)];}static[_0x39c355(0x1ee)](_0x5ce740){const _0x32ac22=_0x39c355,_0x6bb9ec=/ongoing-request="([^"]+)"/,_0x44e1b3=_0x5ce740[_0x32ac22(0x1d4)](_0x6bb9ec);return _0x44e1b3[0x1]===_0x32ac22(0x1d3)?aws_types_1[_0x32ac22(0x1d8)]['Available']:aws_types_1[_0x32ac22(0x1d8)][_0x32ac22(0x1e1)];}static[_0x39c355(0x1ec)](_0x4bbdfb,_0x24ae54,_0x478a49){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1b3da8=_0x226a,_0x41e41e=[];let _0x42627b,_0x34df78=null;do{const _0x178481=new client_s3_1[(_0x1b3da8(0x1dc))]({'Bucket':_0x24ae54,'Prefix':_0x4bbdfb,'Marker':_0x34df78}),{Contents:_0x54f115,IsTruncated:_0x5b4ec6}=yield _0x478a49['send'](_0x178481);if(!_0x54f115)return _0x41e41e;for(const _0xb781ac of _0x54f115){_0x41e41e['push'](_0xb781ac['Key']);}_0x42627b=_0x5b4ec6,_0x42627b&&(_0x34df78=_0x54f115['at'](-0x1)['Key']);}while(_0x42627b);return _0x41e41e;});}static[_0x39c355(0x1f4)]({region:_0x5c1bd1,accessKeyId:_0x1a6f44,secretAccessKey:_0x350c6b},_0x3a3288){const _0x17512f=_0x39c355,_0x310964={'region':_0x5c1bd1,'requestHandler':new init_1[(_0x17512f(0x1d5))]()};_0x1a6f44&&_0x350c6b&&(_0x310964[_0x17512f(0x1d6)]={'accessKeyId':_0x1a6f44,'secretAccessKey':_0x350c6b});const _0x10e515=new client_s3_1['S3Client'](_0x310964);if(!(_0x3a3288===null||_0x3a3288===void 0x0?void 0x0:_0x3a3288['length']))return _0x10e515;return this[_0x17512f(0x1e5)](_0x10e515,_0x3a3288);}static['applyMiddlewaresToS3Client'](_0x288855,_0x24d59e){const _0x4c133c=_0x39c355;for(const {handler:_0x8c135e,options:_0x5c86d5}of _0x24d59e){_0x288855['middlewareStack'][_0x4c133c(0x1e7)](_0x8c135e,_0x5c86d5);}return _0x288855;}}exports[_0x39c355(0x1ed)]=AwsS3Utils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var _0xf4c9bb=_0x4b50;(function(_0x1ac004,_0x580438){var _0x38bd49=_0x4b50,_0x5e5fb4=_0x1ac004();while(!![]){try{var _0x103703=-parseInt(_0x38bd49(0x17f))/0x1*(parseInt(_0x38bd49(0x176))/0x2)+parseInt(_0x38bd49(0x165))/0x3*(parseInt(_0x38bd49(0x17e))/0x4)+parseInt(_0x38bd49(0x15a))/0x5+parseInt(_0x38bd49(0x166))/0x6+-parseInt(_0x38bd49(0x168))/0x7+-parseInt(_0x38bd49(0x169))/0x8+parseInt(_0x38bd49(0x163))/0x9*(parseInt(_0x38bd49(0x15e))/0xa);if(_0x103703===_0x580438)break;else _0x5e5fb4['push'](_0x5e5fb4['shift']());}catch(_0x5bb891){_0x5e5fb4['push'](_0x5e5fb4['shift']());}}}(_0x5d3b,0xa3614));var __awaiter=this&&this[_0xf4c9bb(0x170)]||function(_0x4198e5,_0x8f1750,_0x32d3e3,_0x3142e7){function _0x49d1a9(_0x233eec){return _0x233eec instanceof _0x32d3e3?_0x233eec:new _0x32d3e3(function(_0x45b732){_0x45b732(_0x233eec);});}return new(_0x32d3e3||(_0x32d3e3=Promise))(function(_0x58327c,_0x2fa748){function _0x4364d6(_0x1773f4){var _0x52cb12=_0x4b50;try{_0x28a5e6(_0x3142e7[_0x52cb12(0x178)](_0x1773f4));}catch(_0x2fbc45){_0x2fa748(_0x2fbc45);}}function _0x5acb15(_0x6f2181){var _0x1fdf8a=_0x4b50;try{_0x28a5e6(_0x3142e7[_0x1fdf8a(0x17a)](_0x6f2181));}catch(_0x3f677f){_0x2fa748(_0x3f677f);}}function _0x28a5e6(_0x4a62af){var _0x5a0d79=_0x4b50;_0x4a62af[_0x5a0d79(0x172)]?_0x58327c(_0x4a62af[_0x5a0d79(0x164)]):_0x49d1a9(_0x4a62af[_0x5a0d79(0x164)])[_0x5a0d79(0x175)](_0x4364d6,_0x5acb15);}_0x28a5e6((_0x3142e7=_0x3142e7['apply'](_0x4198e5,_0x8f1750||[]))['next']());});},__asyncValues=this&&this['__asyncValues']||function(_0x47c9b9){var _0x59739a=_0xf4c9bb;if(!Symbol[_0x59739a(0x179)])throw new TypeError(_0x59739a(0x177));var _0x342a35=_0x47c9b9[Symbol[_0x59739a(0x179)]],_0xa07308;return _0x342a35?_0x342a35[_0x59739a(0x174)](_0x47c9b9):(_0x47c9b9=typeof __values===_0x59739a(0x16c)?__values(_0x47c9b9):_0x47c9b9[Symbol['iterator']](),_0xa07308={},_0x4e7173(_0x59739a(0x178)),_0x4e7173('throw'),_0x4e7173(_0x59739a(0x171)),_0xa07308[Symbol['asyncIterator']]=function(){return this;},_0xa07308);function _0x4e7173(_0x4f46cc){_0xa07308[_0x4f46cc]=_0x47c9b9[_0x4f46cc]&&function(_0x43aa51){return new Promise(function(_0x104434,_0x2ec29b){var _0x3f7ec4=_0x4b50;_0x43aa51=_0x47c9b9[_0x4f46cc](_0x43aa51),_0xb9f03d(_0x104434,_0x2ec29b,_0x43aa51[_0x3f7ec4(0x172)],_0x43aa51[_0x3f7ec4(0x164)]);});};}function _0xb9f03d(_0x2bba15,_0x3d2d61,_0x4a3867,_0x4fb0b9){var _0x9dcf42=_0x59739a;Promise[_0x9dcf42(0x16e)](_0x4fb0b9)[_0x9dcf42(0x175)](function(_0x22b968){_0x2bba15({'value':_0x22b968,'done':_0x4a3867});},_0x3d2d61);}};function _0x5d3b(){var _0x322895=['__awaiter','return','done','defineProperty','call','then','2ifvgOI','Symbol.asyncIterator\x20is\x20not\x20defined.','next','asyncIterator','throw','name','getAzureBlobsPaths','createAzureBlobContainerClient','1936UKoWzT','764769CGaqjI','2894115omqbSs','getContainerClient','push','containerName','8846860SeNZPp','__esModule','@azure/storage-blob','deleted','createAzureBlobServiceClient','18ORphvm','value','813nPwaWP','2959926NSBIru','https://','6496189MUpGUX','4885440wwLviy','BlobServiceClient','.blob.core.windows.net','function','error','resolve','AzureUtils'];_0x5d3b=function(){return _0x322895;};return _0x5d3b();}function _0x4b50(_0x187350,_0x4bbefc){_0x187350=_0x187350-0x15a;var _0x5d3bfb=_0x5d3b();var _0x4b50e3=_0x5d3bfb[_0x187350];return _0x4b50e3;}Object[_0xf4c9bb(0x173)](exports,_0xf4c9bb(0x15f),{'value':!![]}),exports[_0xf4c9bb(0x16f)]=void 0x0;const storage_blob_1=require(_0xf4c9bb(0x160));class AzureUtils{static[_0xf4c9bb(0x162)]({accountName:_0x3e431e,accountKey:_0x5c6a51}){var _0x7e3781=_0xf4c9bb;const _0x5d13f7=new storage_blob_1['StorageSharedKeyCredential'](_0x3e431e,_0x5c6a51);return new storage_blob_1[(_0x7e3781(0x16a))](_0x7e3781(0x167)+_0x3e431e+_0x7e3781(0x16b),_0x5d13f7);}static[_0xf4c9bb(0x17d)](_0x37cdab){var _0x1db61f=_0xf4c9bb;const _0x1cc5ce=this['createAzureBlobServiceClient'](_0x37cdab);return _0x1cc5ce[_0x1db61f(0x15b)](_0x37cdab[_0x1db61f(0x15d)]);}static[_0xf4c9bb(0x17c)](_0x2283ee,_0x1cc8c6){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x352243=_0x4b50,_0x3ea8ed,_0x5071c1,_0x5d9390,_0x85a9d2;const _0x463fd2=[];try{for(var _0x1f474e=!![],_0x147b19=__asyncValues(_0x1cc8c6['listBlobsFlat']({'prefix':_0x2283ee})),_0x39cf5b;_0x39cf5b=yield _0x147b19[_0x352243(0x178)](),_0x3ea8ed=_0x39cf5b[_0x352243(0x172)],!_0x3ea8ed;_0x1f474e=!![]){_0x85a9d2=_0x39cf5b['value'],_0x1f474e=![];const _0x298b9e=_0x85a9d2;!_0x298b9e[_0x352243(0x161)]&&_0x463fd2[_0x352243(0x15c)](_0x298b9e[_0x352243(0x17b)]);}}catch(_0x128d66){_0x5071c1={'error':_0x128d66};}finally{try{if(!_0x1f474e&&!_0x3ea8ed&&(_0x5d9390=_0x147b19[_0x352243(0x171)]))yield _0x5d9390[_0x352243(0x174)](_0x147b19);}finally{if(_0x5071c1)throw _0x5071c1[_0x352243(0x16d)];}}return _0x463fd2;});}}exports['AzureUtils']=AzureUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x381800=_0x5819;(function(_0x591dc6,_0x14d529){const _0x25ae05=_0x5819,_0x5f9c31=_0x591dc6();while(!![]){try{const _0x1b3345=-parseInt(_0x25ae05(0xdb))/0x1+-parseInt(_0x25ae05(0xdd))/0x2*(-parseInt(_0x25ae05(0xdf))/0x3)+-parseInt(_0x25ae05(0xe0))/0x4*(-parseInt(_0x25ae05(0xdc))/0x5)+parseInt(_0x25ae05(0xd8))/0x6+-parseInt(_0x25ae05(0xd4))/0x7+-parseInt(_0x25ae05(0xd1))/0x8+parseInt(_0x25ae05(0xd7))/0x9;if(_0x1b3345===_0x14d529)break;else _0x5f9c31['push'](_0x5f9c31['shift']());}catch(_0x277d45){_0x5f9c31['push'](_0x5f9c31['shift']());}}}(_0x2cd1,0xd5763));function _0x5819(_0x558c12,_0x102911){_0x558c12=_0x558c12-0xcb;const _0x2cd15c=_0x2cd1();let _0x5819fa=_0x2cd15c[_0x558c12];return _0x5819fa;}var __awaiter=this&&this[_0x381800(0xcc)]||function(_0x229ad3,_0x7630ff,_0x27bcf8,_0x1c68b1){function _0x4d64b3(_0x15a7d0){return _0x15a7d0 instanceof _0x27bcf8?_0x15a7d0:new _0x27bcf8(function(_0x45d161){_0x45d161(_0x15a7d0);});}return new(_0x27bcf8||(_0x27bcf8=Promise))(function(_0x322abc,_0x40356a){const _0x1407e0=_0x5819;function _0x351a10(_0x146ab1){const _0x13fbf3=_0x5819;try{_0x24c433(_0x1c68b1[_0x13fbf3(0xd9)](_0x146ab1));}catch(_0x5c3ac8){_0x40356a(_0x5c3ac8);}}function _0x1f4925(_0x38d174){const _0x33b223=_0x5819;try{_0x24c433(_0x1c68b1[_0x33b223(0xd5)](_0x38d174));}catch(_0x22c795){_0x40356a(_0x22c795);}}function _0x24c433(_0x7973f8){const _0x473763=_0x5819;_0x7973f8[_0x473763(0xe1)]?_0x322abc(_0x7973f8['value']):_0x4d64b3(_0x7973f8[_0x473763(0xe2)])[_0x473763(0xcd)](_0x351a10,_0x1f4925);}_0x24c433((_0x1c68b1=_0x1c68b1['apply'](_0x229ad3,_0x7630ff||[]))[_0x1407e0(0xd9)]());});},__importDefault=this&&this[_0x381800(0xde)]||function(_0xccda89){return _0xccda89&&_0xccda89['__esModule']?_0xccda89:{'default':_0xccda89};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CacheUtils']=void 0x0;const path_1=__importDefault(require(_0x381800(0xce))),crypto_1=require(_0x381800(0xcf)),promises_1=require(_0x381800(0xda)),fs_1=require('fs');class CacheUtils{static[_0x381800(0xd3)](_0x28e6b2,_0x22cb5f){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x123153=_0x5819,_0x1b5a83=path_1['default'][_0x123153(0xd2)](_0x22cb5f,(0x0,crypto_1[_0x123153(0xd0)])());yield(0x0,promises_1[_0x123153(0xcb)])(_0x1b5a83,_0x28e6b2);const _0x521a53=(0x0,fs_1['createReadStream'])(_0x1b5a83);return _0x521a53['on']('close',()=>(0x0,promises_1['rm'])(_0x1b5a83)),_0x521a53;});}}exports[_0x381800(0xd6)]=CacheUtils;function _0x2cd1(){const _0x16dc78=['crypto','randomUUID','13244976zJTEOY','join','createCacheFileStream','4987780gdEHZz','throw','CacheUtils','10175625wyyoEH','3499194lZJkWc','next','fs/promises','57780uGvKpg','3008245szxiFq','4QvFmtW','__importDefault','1477212GpcJlw','4rRSbOC','done','value','writeFile','__awaiter','then','path'];_0x2cd1=function(){return _0x16dc78;};return _0x2cd1();}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Bucket, Storage } from '@google-cloud/storage';
|
|
2
|
+
import { GoogleCloudStorageCredentials } from '../types/google-cloud.types';
|
|
3
|
+
export declare class GoogleCloudUtils {
|
|
4
|
+
static createStorageClient({ projectId, clientEmail, privateKey }: GoogleCloudStorageCredentials): Storage;
|
|
5
|
+
static createBucket(credentials: GoogleCloudStorageCredentials): Bucket;
|
|
6
|
+
static getFilesPaths(path: string, bucket: Bucket): Promise<string[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x11fd52=_0x1311;function _0x1311(_0x5d67d3,_0x50552c){_0x5d67d3=_0x5d67d3-0x163;const _0x3b200a=_0x3b20();let _0x1311f2=_0x3b200a[_0x5d67d3];return _0x1311f2;}(function(_0x38298d,_0x457fca){const _0x37be59=_0x1311,_0x1d0881=_0x38298d();while(!![]){try{const _0x3d3718=-parseInt(_0x37be59(0x16c))/0x1*(parseInt(_0x37be59(0x171))/0x2)+parseInt(_0x37be59(0x167))/0x3*(-parseInt(_0x37be59(0x168))/0x4)+-parseInt(_0x37be59(0x169))/0x5+-parseInt(_0x37be59(0x174))/0x6*(-parseInt(_0x37be59(0x179))/0x7)+-parseInt(_0x37be59(0x163))/0x8+parseInt(_0x37be59(0x16a))/0x9*(-parseInt(_0x37be59(0x16f))/0xa)+parseInt(_0x37be59(0x170))/0xb;if(_0x3d3718===_0x457fca)break;else _0x1d0881['push'](_0x1d0881['shift']());}catch(_0x14c6fd){_0x1d0881['push'](_0x1d0881['shift']());}}}(_0x3b20,0xc1837));var __awaiter=this&&this[_0x11fd52(0x176)]||function(_0x4021f9,_0x3f5195,_0x1dac70,_0x415370){function _0x44508f(_0x32c253){return _0x32c253 instanceof _0x1dac70?_0x32c253:new _0x1dac70(function(_0x39211c){_0x39211c(_0x32c253);});}return new(_0x1dac70||(_0x1dac70=Promise))(function(_0x42210b,_0x29a7c3){function _0x1acab2(_0x131a42){const _0x1138a4=_0x1311;try{_0x4f2170(_0x415370[_0x1138a4(0x178)](_0x131a42));}catch(_0x23f29a){_0x29a7c3(_0x23f29a);}}function _0x696c2e(_0x489d5a){const _0x54fef9=_0x1311;try{_0x4f2170(_0x415370[_0x54fef9(0x165)](_0x489d5a));}catch(_0x3b7c5e){_0x29a7c3(_0x3b7c5e);}}function _0x4f2170(_0x3766b5){const _0x43ee21=_0x1311;_0x3766b5[_0x43ee21(0x17b)]?_0x42210b(_0x3766b5[_0x43ee21(0x166)]):_0x44508f(_0x3766b5[_0x43ee21(0x166)])['then'](_0x1acab2,_0x696c2e);}_0x4f2170((_0x415370=_0x415370['apply'](_0x4021f9,_0x3f5195||[]))['next']());});};function _0x3b20(){const _0x269bf8=['value','250176XEfvfX','32gVoORC','6617545foPgiM','6375195thxrRU','@google-cloud/storage','439PJSvWx','createBucket','GoogleCloudUtils','20myJtGw','45020602EFSUxi','3720IeTNsJ','bucket','__esModule','5698764tJaLtZ','getFiles','__awaiter','push','next','7bbOqcG','createStorageClient','done','208400TJQhpC','Storage','throw'];_0x3b20=function(){return _0x269bf8;};return _0x3b20();}Object['defineProperty'](exports,_0x11fd52(0x173),{'value':!![]}),exports[_0x11fd52(0x16e)]=void 0x0;const storage_1=require(_0x11fd52(0x16b));class GoogleCloudUtils{static['createStorageClient']({projectId:_0x1888ce,clientEmail:_0x22cd04,privateKey:_0x35056b}){const _0x25717b=_0x11fd52;return new storage_1[(_0x25717b(0x164))]({'projectId':_0x1888ce,'credentials':{'client_email':_0x22cd04,'private_key':_0x35056b}});}static[_0x11fd52(0x16d)](_0x3a58e8){const _0x4c6325=_0x11fd52,_0x136245=this[_0x4c6325(0x17a)](_0x3a58e8);return _0x136245[_0x4c6325(0x172)](_0x3a58e8['bucketName']);}static['getFilesPaths'](_0x33c3cf,_0xa975bf){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5803a9=_0x1311,_0x57ce79=[],[_0x14bcf7]=yield _0xa975bf[_0x5803a9(0x175)]({'prefix':_0x33c3cf});for(const _0x18e53b of _0x14bcf7){_0x57ce79[_0x5803a9(0x177)](_0x18e53b['name']);}return _0x57ce79;});}}exports['GoogleCloudUtils']=GoogleCloudUtils;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flosum/storages",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"@flosum/utils": "1.0.15",
|
|
35
35
|
"@google-cloud/storage": "7.22.0",
|
|
36
36
|
"@smithy/node-http-handler": "4.9.2",
|
|
37
|
-
"https-proxy-agent": "
|
|
37
|
+
"https-proxy-agent": "7.0.6"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/jest": "27.4.1",
|
|
41
|
-
"@types/node": "18.
|
|
41
|
+
"@types/node": "18.19.130",
|
|
42
42
|
"@types/unzipper": "0.10.10",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "
|
|
44
|
-
"@typescript-eslint/parser": "
|
|
45
|
-
"eslint": "8.
|
|
46
|
-
"eslint-config-airbnb-
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "8.70.1",
|
|
44
|
+
"@typescript-eslint/parser": "8.70.1",
|
|
45
|
+
"eslint": "8.57.0",
|
|
46
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
47
47
|
"eslint-config-prettier": "8.5.0",
|
|
48
48
|
"eslint-plugin-import": "2.26.0",
|
|
49
49
|
"eslint-plugin-prettier": "4.2.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"prettier": "2.2.1",
|
|
59
59
|
"ts-jest": "29.1.1",
|
|
60
60
|
"ts-node": "10.8.2",
|
|
61
|
-
"typescript": "5.
|
|
61
|
+
"typescript": "5.7.3",
|
|
62
62
|
"vinyl-sourcemaps-apply": "0.2.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|