From f877fb4acf6c04f33d3d5b87648043956482d8a7 Mon Sep 17 00:00:00 2001 From: Matheus sampaio Queiroga Date: Sat, 26 Dec 2020 21:06:14 -0300 Subject: [PATCH 1/4] teste --- Services/drive/.gitignore | 2 + Services/drive/auth.js | 100 ++++++++++++++++++++++++++++++++ Services/drive/credentials.json | 1 + Services/drive/drive.js | 31 ++++++++++ Services/drive/teste.js | 5 ++ Services/drive/teste.zip | Bin 0 -> 22 bytes package.json | 1 + 7 files changed, 140 insertions(+) create mode 100644 Services/drive/.gitignore create mode 100644 Services/drive/auth.js create mode 100644 Services/drive/credentials.json create mode 100644 Services/drive/drive.js create mode 100644 Services/drive/teste.js create mode 100644 Services/drive/teste.zip diff --git a/Services/drive/.gitignore b/Services/drive/.gitignore new file mode 100644 index 0000000..eb47d3c --- /dev/null +++ b/Services/drive/.gitignore @@ -0,0 +1,2 @@ +token.json +Google Driver API bds.txt \ No newline at end of file diff --git a/Services/drive/auth.js b/Services/drive/auth.js new file mode 100644 index 0000000..6b8b853 --- /dev/null +++ b/Services/drive/auth.js @@ -0,0 +1,100 @@ +//index.js +const fs = require('fs'); +const readline = require('readline'); +const {google} = require('googleapis'); + +// If modifying these scopes, delete token.json. +const SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']; +// The file token.json stores the user's access and refresh tokens, and is +// created automatically when the authorization flow completes for the first +// time. +const TOKEN_PATH = 'token.json'; + +function callGDriveApi(callback){ + // Load client secrets from a local file. + fs.readFile('credentials.json', (err, content) => { + if (err) return console.log('Error loading client secret file:', err); + // Authorize a client with credentials, then call the Google Drive API. + if(callback) + authorize(JSON.parse(content), callback); + else + authorize(JSON.parse(content), listFiles);//default + }); +} + +/** + * Create an OAuth2 client with the given credentials, and then execute the + * given callback function. + * @param {Object} credentials The authorization client credentials. + * @param {function} callback The callback to call with the authorized client. + */ +function authorize(credentials, callback) { + const {client_secret, client_id, redirect_uris} = credentials.installed; + const oAuth2Client = new google.auth.OAuth2( + client_id, client_secret, redirect_uris[0]); + + // Check if we have previously stored a token. + fs.readFile(TOKEN_PATH, (err, token) => { + if (err) return getAccessToken(oAuth2Client, callback); + oAuth2Client.setCredentials(JSON.parse(token)); + callback(oAuth2Client); + }); +} + +/** + * Get and store new token after prompting for user authorization, and then + * execute the given callback with the authorized OAuth2 client. + * @param {google.auth.OAuth2} oAuth2Client The OAuth2 client to get token for. + * @param {getEventsCallback} callback The callback for the authorized client. + */ +function getAccessToken(oAuth2Client, callback) { + const authUrl = oAuth2Client.generateAuthUrl({ + access_type: 'offline', + scope: SCOPES, + }); + console.log('Authorize this app by visiting this url:', authUrl); + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + }); + rl.question('Enter the code from that page here: ', (code) => { + rl.close(); + oAuth2Client.getToken(code, (err, token) => { + if (err) return console.error('Error retrieving access token', err); + oAuth2Client.setCredentials(token); + // Store the token to disk for later program executions + fs.writeFile(TOKEN_PATH, JSON.stringify(token), (err) => { + if (err) return console.error(err); + console.log('Token stored to', TOKEN_PATH); + }); + callback(oAuth2Client); + }); + }); +} + +/** + * Lists the names and IDs of up to 10 files. + * @param {google.auth.OAuth2} auth An authorized OAuth2 client. + */ +function listFiles(auth) { + const drive = google.drive({version: 'v3', auth}); + drive.files.list({ + pageSize: 10, + fields: 'nextPageToken, files(id, name)', + }, (err, res) => { + if (err) return console.log('The API returned an error: ' + err); + const files = res.data.files; + if (files.length) { + console.log('Files:'); + files.map((file) => { + console.log(`${file.name} (${file.id})`); + }); + } else { + console.log('No files found.'); + } + }); +} + +callGDriveApi(); + +module.exports = callGDriveApi; \ No newline at end of file diff --git a/Services/drive/credentials.json b/Services/drive/credentials.json new file mode 100644 index 0000000..a49363f --- /dev/null +++ b/Services/drive/credentials.json @@ -0,0 +1 @@ +{"installed":{"client_id":"1000381612165-cukb31ib1ej3vnt9lbh8v0nvlrvvtp4f.apps.googleusercontent.com","project_id":"bds-maneger-api--1609019381362","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"PwfAhb7-mKqt7UozGUcETFWT","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}} \ No newline at end of file diff --git a/Services/drive/drive.js b/Services/drive/drive.js new file mode 100644 index 0000000..84a5fda --- /dev/null +++ b/Services/drive/drive.js @@ -0,0 +1,31 @@ +const fs = require("fs"); +const {google} = require('googleapis'); + +function imageUpload(fileName, filePath, callback){ + require("./auth")((auth) => { + const fileMetadata = { + name: fileName + }; + + const media = { + mimeType: "application/zip", + body: fs.createReadStream(filePath) + } + + const drive = google.drive({version: 'v3', auth}); + drive.files.create({ + resource: fileMetadata, + media: media, + fields: 'id' + }, function (err, file) { + if (err) { + // Handle error + console.error(err); + } else { + callback(file.data.id); + } + }); + }); +} + +module.exports = { imageUpload }; \ No newline at end of file diff --git a/Services/drive/teste.js b/Services/drive/teste.js new file mode 100644 index 0000000..1cc1696 --- /dev/null +++ b/Services/drive/teste.js @@ -0,0 +1,5 @@ +//index.js +const gdrive = require("./drive"); +gdrive.imageUpload("teste.zip", "./teste.zip", (id) => { + console.log(id); +}); \ No newline at end of file diff --git a/Services/drive/teste.zip b/Services/drive/teste.zip new file mode 100644 index 0000000000000000000000000000000000000000..15cb0ecb3e219d1701294bfdf0fe3f5cb5d208e7 GIT binary patch literal 22 NcmWIWW@Tf*000g10H*)| literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 02ec79f..67bd197 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "homepage": "https://github.com/Bds-Maneger/bds_maneger_api#readme", "dependencies": { "adm-zip": "^0.5.1", + "googleapis": "^39.2.0", "node-fetch": "^2.6.1", "node-localstorage": "^2.1.6", "open": "^7.3.0", -- 2.45.2 From 18aff676610e649001ae5de37e8f4295902208b5 Mon Sep 17 00:00:00 2001 From: Matheus sampaio Queiroga Date: Sat, 26 Dec 2020 21:24:44 -0300 Subject: [PATCH 2/4] modifications --- Services/drive/auth.js | 24 +++++++----------------- Services/drive/drive.js | 31 ------------------------------- Services/drive/teste.js | 40 +++++++++++++++++++++++++++++++++++----- 3 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 Services/drive/drive.js diff --git a/Services/drive/auth.js b/Services/drive/auth.js index 6b8b853..28e86eb 100644 --- a/Services/drive/auth.js +++ b/Services/drive/auth.js @@ -1,4 +1,3 @@ -//index.js const fs = require('fs'); const readline = require('readline'); const {google} = require('googleapis'); @@ -10,17 +9,12 @@ const SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']; // time. const TOKEN_PATH = 'token.json'; -function callGDriveApi(callback){ - // Load client secrets from a local file. - fs.readFile('credentials.json', (err, content) => { - if (err) return console.log('Error loading client secret file:', err); - // Authorize a client with credentials, then call the Google Drive API. - if(callback) - authorize(JSON.parse(content), callback); - else - authorize(JSON.parse(content), listFiles);//default - }); -} +// Load client secrets from a local file. +fs.readFile('credentials.json', (err, content) => { + if (err) return console.log('Error loading client secret file:', err); + // Authorize a client with credentials, then call the Google Drive API. + authorize(JSON.parse(content), listFiles); +}); /** * Create an OAuth2 client with the given credentials, and then execute the @@ -93,8 +87,4 @@ function listFiles(auth) { console.log('No files found.'); } }); -} - -callGDriveApi(); - -module.exports = callGDriveApi; \ No newline at end of file +} \ No newline at end of file diff --git a/Services/drive/drive.js b/Services/drive/drive.js deleted file mode 100644 index 84a5fda..0000000 --- a/Services/drive/drive.js +++ /dev/null @@ -1,31 +0,0 @@ -const fs = require("fs"); -const {google} = require('googleapis'); - -function imageUpload(fileName, filePath, callback){ - require("./auth")((auth) => { - const fileMetadata = { - name: fileName - }; - - const media = { - mimeType: "application/zip", - body: fs.createReadStream(filePath) - } - - const drive = google.drive({version: 'v3', auth}); - drive.files.create({ - resource: fileMetadata, - media: media, - fields: 'id' - }, function (err, file) { - if (err) { - // Handle error - console.error(err); - } else { - callback(file.data.id); - } - }); - }); -} - -module.exports = { imageUpload }; \ No newline at end of file diff --git a/Services/drive/teste.js b/Services/drive/teste.js index 1cc1696..cf080ba 100644 --- a/Services/drive/teste.js +++ b/Services/drive/teste.js @@ -1,5 +1,35 @@ -//index.js -const gdrive = require("./drive"); -gdrive.imageUpload("teste.zip", "./teste.zip", (id) => { - console.log(id); -}); \ No newline at end of file +var {google} = require('googleapis'); +const { GoogleAuth } = require('google-auth-library'); +const stream = require('stream'); +const serviceAccount = require('../config/node-uploader-99-9e3f13fd0cde.json') +console.log(serviceAccount); +let fileObject = req.body.filePDF; +console.log(fileObject); +let bufferStream = new stream.PassThrough(); +bufferStream.end(fileObject.buffer); + const jWTClient = new google.auth.JWT( + serviceAccount.client_email, + null, + serviceAccount.private_key, + ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.file'] + ) + google.drive({ version: 'v3'}) + .files.create({ + auth: GoogleAuth/jWTClient, + media: { + mimeType: 'application/pdf', + body: bufferStream + }, + resource: { + name: 'DeniTheFile.pdf', + // if you want to store the file in the root, remove this parents + parents: ['1KwLSHyu9R1jo3-ahtWgJCohoCsrtrE-I'] + }, + fields: 'id', + }).then(function (resp) { + console.log(resp,'resp'); + }).catch(function (error) { + console.log(error); + }) +res.send('File uploaded'); +// }); \ No newline at end of file -- 2.45.2 From 5ccfd344c8756fce22e4b01005fb91398ad51208 Mon Sep 17 00:00:00 2001 From: Matheus sampaio Queiroga Date: Mon, 28 Dec 2020 16:32:49 -0300 Subject: [PATCH 3/4] Funcional Upload --- Services/drive/auth.js | 30 +++++++++++++++++------------- Services/drive/teste.js | 35 ----------------------------------- Services/drive/teste.zip | Bin 22 -> 308 bytes 3 files changed, 17 insertions(+), 48 deletions(-) delete mode 100644 Services/drive/teste.js diff --git a/Services/drive/auth.js b/Services/drive/auth.js index 28e86eb..7202bef 100644 --- a/Services/drive/auth.js +++ b/Services/drive/auth.js @@ -3,7 +3,7 @@ const readline = require('readline'); const {google} = require('googleapis'); // If modifying these scopes, delete token.json. -const SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']; +const SCOPES = ['https://www.googleapis.com/auth/drive']; // The file token.json stores the user's access and refresh tokens, and is // created automatically when the authorization flow completes for the first // time. @@ -72,19 +72,23 @@ function getAccessToken(oAuth2Client, callback) { */ function listFiles(auth) { const drive = google.drive({version: 'v3', auth}); - drive.files.list({ - pageSize: 10, - fields: 'nextPageToken, files(id, name)', - }, (err, res) => { - if (err) return console.log('The API returned an error: ' + err); - const files = res.data.files; - if (files.length) { - console.log('Files:'); - files.map((file) => { - console.log(`${file.name} (${file.id})`); - }); + var fileMetadata = { + 'name': 'teste.zip' + }; + var media = { + mimeType: 'application/octet-stream', + body: fs.createReadStream('teste.zip') + }; + drive.files.create({ + resource: fileMetadata, + media: media, + fields: 'id' + }, function (err, file) { + if (err) { + // Handle error + console.error(err); } else { - console.log('No files found.'); + console.log('File: ', file.data.id); } }); } \ No newline at end of file diff --git a/Services/drive/teste.js b/Services/drive/teste.js deleted file mode 100644 index cf080ba..0000000 --- a/Services/drive/teste.js +++ /dev/null @@ -1,35 +0,0 @@ -var {google} = require('googleapis'); -const { GoogleAuth } = require('google-auth-library'); -const stream = require('stream'); -const serviceAccount = require('../config/node-uploader-99-9e3f13fd0cde.json') -console.log(serviceAccount); -let fileObject = req.body.filePDF; -console.log(fileObject); -let bufferStream = new stream.PassThrough(); -bufferStream.end(fileObject.buffer); - const jWTClient = new google.auth.JWT( - serviceAccount.client_email, - null, - serviceAccount.private_key, - ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.file'] - ) - google.drive({ version: 'v3'}) - .files.create({ - auth: GoogleAuth/jWTClient, - media: { - mimeType: 'application/pdf', - body: bufferStream - }, - resource: { - name: 'DeniTheFile.pdf', - // if you want to store the file in the root, remove this parents - parents: ['1KwLSHyu9R1jo3-ahtWgJCohoCsrtrE-I'] - }, - fields: 'id', - }).then(function (resp) { - console.log(resp,'resp'); - }).catch(function (error) { - console.log(error); - }) -res.send('File uploaded'); -// }); \ No newline at end of file diff --git a/Services/drive/teste.zip b/Services/drive/teste.zip index 15cb0ecb3e219d1701294bfdf0fe3f5cb5d208e7..948ef49d4ed538c6d34738f641421b98b2fbdf5a 100644 GIT binary patch literal 308 zcmWIWW@Zs#U|`^2h+Z};(DveN>lz@h5r`#$*gZc#JttMcr6{v3wMfA+z*8Y9rC6_| zqQv{$NuRUYfhT-6K6+|oVqjpf&A`Oi#K^?>s;}NzKO?gkUf_Z%VPueC on2>kr)5F`>7~41B1Jm8of^RMY`2pUnY#?(OfiN3LZw4C*059ia^8f$< literal 22 NcmWIWW@Tf*000g10H*)| -- 2.45.2 From 21414f9887e8f1a1c9996af93551ff084fa784fe Mon Sep 17 00:00:00 2001 From: Matheus sampaio Queiroga Date: Mon, 28 Dec 2020 17:52:31 -0300 Subject: [PATCH 4/4] the google drive api add and stable upload file work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit o upload está funcionando com espera, voçe pode informa a id da pasta e será feito o upload. pode haver bugs e ainda não é a versão final. --- Services/backup.js | 30 ++++++-- Services/drive/auth.js | 159 +++++++++++++++++++---------------------- index.js | 5 ++ 3 files changed, 105 insertions(+), 89 deletions(-) diff --git a/Services/backup.js b/Services/backup.js index 4fd5c2d..74fc5de 100644 --- a/Services/backup.js +++ b/Services/backup.js @@ -1,4 +1,4 @@ -function World_BAckup() { +module.exports.World_BAckup = () => { if (process.platform == "win32") { var dd = String(today.getDate()).padStart(2, '0'); @@ -35,6 +35,28 @@ function World_BAckup() { return 'Sucess' }; -module.exports = { - World_BAckup: World_BAckup -} \ No newline at end of file +module.exports.Drive_backup = () => { + const bds = require('../index'); + const path = require('path'); + const dir_zip = bds.world_dir; + const today = bds.date(); + const file_name = `bds_backup_World_${today}.zip` + const name = path.join(bds.tmp_dir, file_name) + /* Compress the folders */ + var AdmZip = require('adm-zip'); + var zip = new AdmZip(); + zip.addLocalFolder(dir_zip); /* var willSendthis = zip.toBuffer(); */ + zip.addZipComment(`Backup zip file in ${today}. \nBackup made to ${process.platform}, Free and open content for all\n\nSirherobrine23© By Bds Maneger.`) + var zipEntries = zip.getEntries(); + // zipEntries.forEach(function (zipEntry) { + // console.log(zipEntry.entryName.toString()); + // }); + zip.writeZip(name); /* Zip file destination */ + console.log('Backup Sucess') + /* Compress the folders */ +return JSON.parse(`{ + "file_dir": "${name.replaceAll('\\', '/')}", + "file_name": "${file_name}" +}`) +}; + diff --git a/Services/drive/auth.js b/Services/drive/auth.js index 7202bef..c813f90 100644 --- a/Services/drive/auth.js +++ b/Services/drive/auth.js @@ -1,94 +1,83 @@ -const fs = require('fs'); -const readline = require('readline'); -const {google} = require('googleapis'); +module.exports.drive_backup = (parent_id) => { + const fs = require('fs'); + const readline = require('readline'); + const {google} = require('googleapis'); -// If modifying these scopes, delete token.json. -const SCOPES = ['https://www.googleapis.com/auth/drive']; -// The file token.json stores the user's access and refresh tokens, and is -// created automatically when the authorization flow completes for the first -// time. -const TOKEN_PATH = 'token.json'; + const SCOPES = ['https://www.googleapis.com/auth/drive']; + const TOKEN_PATH = __dirname+'/token.json'; -// Load client secrets from a local file. -fs.readFile('credentials.json', (err, content) => { - if (err) return console.log('Error loading client secret file:', err); - // Authorize a client with credentials, then call the Google Drive API. - authorize(JSON.parse(content), listFiles); -}); - -/** - * Create an OAuth2 client with the given credentials, and then execute the - * given callback function. - * @param {Object} credentials The authorization client credentials. - * @param {function} callback The callback to call with the authorized client. - */ -function authorize(credentials, callback) { - const {client_secret, client_id, redirect_uris} = credentials.installed; - const oAuth2Client = new google.auth.OAuth2( - client_id, client_secret, redirect_uris[0]); - - // Check if we have previously stored a token. - fs.readFile(TOKEN_PATH, (err, token) => { - if (err) return getAccessToken(oAuth2Client, callback); - oAuth2Client.setCredentials(JSON.parse(token)); - callback(oAuth2Client); + fs.readFile(__dirname+'/credentials.json', (err, content) => { + if (err) return console.log('Error loading client secret file:', err); + authorize(JSON.parse(content), listFiles); }); -} -/** - * Get and store new token after prompting for user authorization, and then - * execute the given callback with the authorized OAuth2 client. - * @param {google.auth.OAuth2} oAuth2Client The OAuth2 client to get token for. - * @param {getEventsCallback} callback The callback for the authorized client. - */ -function getAccessToken(oAuth2Client, callback) { - const authUrl = oAuth2Client.generateAuthUrl({ - access_type: 'offline', - scope: SCOPES, - }); - console.log('Authorize this app by visiting this url:', authUrl); - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - }); - rl.question('Enter the code from that page here: ', (code) => { - rl.close(); - oAuth2Client.getToken(code, (err, token) => { - if (err) return console.error('Error retrieving access token', err); - oAuth2Client.setCredentials(token); - // Store the token to disk for later program executions - fs.writeFile(TOKEN_PATH, JSON.stringify(token), (err) => { - if (err) return console.error(err); - console.log('Token stored to', TOKEN_PATH); - }); + + function authorize(credentials, callback) { + const {client_secret, client_id, redirect_uris} = credentials.installed; + const oAuth2Client = new google.auth.OAuth2( + client_id, client_secret, redirect_uris[0]); + + fs.readFile(TOKEN_PATH, (err, token) => { + if (err) return getAccessToken(oAuth2Client, callback); + oAuth2Client.setCredentials(JSON.parse(token)); callback(oAuth2Client); }); - }); -} + } -/** - * Lists the names and IDs of up to 10 files. - * @param {google.auth.OAuth2} auth An authorized OAuth2 client. - */ -function listFiles(auth) { - const drive = google.drive({version: 'v3', auth}); - var fileMetadata = { - 'name': 'teste.zip' + function getAccessToken(oAuth2Client, callback) { + const authUrl = oAuth2Client.generateAuthUrl({ + access_type: 'offline', + scope: SCOPES, + }); + console.log('Authorize this app by visiting this url:', authUrl); + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + }); + rl.question('Enter the code from that page here: ', (code) => { + rl.close(); + oAuth2Client.getToken(code, (err, token) => { + if (err) return console.error('Error retrieving access token', err); + oAuth2Client.setCredentials(token); + fs.writeFile(TOKEN_PATH, JSON.stringify(token), (err) => { + if (err) return console.error(err); + console.log('Token stored to', TOKEN_PATH); + }); + callback(oAuth2Client); + }); + }); }; - var media = { - mimeType: 'application/octet-stream', - body: fs.createReadStream('teste.zip') - }; - drive.files.create({ - resource: fileMetadata, - media: media, - fields: 'id' - }, function (err, file) { - if (err) { - // Handle error - console.error(err); + function listFiles(auth) { + const bds_backup = require('../backup').Drive_backup() + const drive = google.drive({version: 'v3', auth}); + if (parent_id == undefined){ + var fileMetadata = { + 'name': bds_backup.file_name, + }; + console.log('Your backup will be saved to My Drive') } else { - console.log('File: ', file.data.id); - } - }); -} \ No newline at end of file + var fileMetadata = { + 'name': bds_backup.file_name, + parents: [parent_id] + }; + }; + var media = { + mimeType: 'application/octet-stream', + body: fs.createReadStream(bds_backup.file_dir) + }; + drive.files.create({ + resource: fileMetadata, + media: media, + fields: 'id', + }, function (err, file) { + if (err) { + // Handle error + console.error(err); + } else { + global.backup_id = file.data.id; + console.log('File: ', file.data.id); + } + }); + } + return 'Use backup_id para ter o id do ultimo arquivo' +}; /*End*/ \ No newline at end of file diff --git a/index.js b/index.js index 3876cad..a4fe63f 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,7 @@ if (process.platform == 'win32') { }; var log_file = path.join(log_dir, `${date()}_Bds_log.log`) var log_date = `${date()}` + var tmp = process.env.TMP var system = `windows`; } else if (process.platform == 'linux') { var home = process.env.HOME; @@ -53,6 +54,7 @@ if (process.platform == 'win32') { }; var log_file = path.join(log_dir, `${date()}_Bds_log.log`) var log_date = `${date()}` + var tmp = `/tmp` var system = `linux`; } else if (process.platform == 'darwin') { require("open")("https://github.com/Bds-Maneger/Bds_Maneger/wiki/systems-support#a-message-for-mac-os-users") @@ -82,6 +84,8 @@ module.exports.token = telegram_tokenv1() module.exports.home = home module.exports.system = system module.exports.server_dir = server_dir +module.exports.world_dir = path.join(server_dir, 'worlds') +module.exports.tmp_dir = tmp module.exports.electron = electron_de module.exports.api_dir = cache_dir module.exports.log_file = log_file @@ -97,6 +101,7 @@ module.exports.stop = require('./Services/stop').Server_stop module.exports.date = date module.exports.command = require('./Services/command').command module.exports.backup = require("./Services/backup").World_BAckup +module.exports.drive_backup = require('./Services/drive/auth').drive_backup module.exports.kill = require("./Services/kill").bds_kill module.exports.version_Download = require("./Services/download").DownloadBDS module.exports.set_config = require("./Services/bds_settings").config -- 2.45.2