@auxcode/auxta 1.3.78-beta.110 → 1.3.78-beta.112
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.
|
@@ -41,7 +41,6 @@ const status_of_step_1 = __importDefault(require("../../auxta/enums/status-of.st
|
|
|
41
41
|
const fs = require('fs');
|
|
42
42
|
const readline = require('readline');
|
|
43
43
|
const process = __importStar(require("process"));
|
|
44
|
-
const os = __importStar(require("os"));
|
|
45
44
|
const { google } = require("googleapis");
|
|
46
45
|
const SCOPES = [
|
|
47
46
|
'https://www.googleapis.com/auth/gmail.addons.current.action.compose',
|
|
@@ -58,8 +57,13 @@ const SCOPES = [
|
|
|
58
57
|
];
|
|
59
58
|
const TOKEN_PATH = 'token.json';
|
|
60
59
|
let TOKEN;
|
|
61
|
-
let
|
|
62
|
-
|
|
60
|
+
let TOKENS = [
|
|
61
|
+
{ "access_token": "ya29.a0AfB_byBxWTRPqnu3nL6bUzCCGdJl9skLupcJH8q0GSEAkimkkvQaKSkXimshAzJWQz4nmyYQ_cW7p9iYNDnT2zlJYk4j1eeVDI7YT80uhxPmLOw3Dcn7IY9cbhZK0_lgRBm8CCrBVVRPzkfVSnAF3D3wuW3-sLr22qt4aCgYKAcYSARASFQHGX2Mi1lEgWolMYxlejnZD-kjcDQ0171", "refresh_token": "1//09YdEzFTKqqYxCgYIARAAGAkSNwF-L9IrL8CtoJKFamnKWiHs-kTBaZXfSWY15jTLMeLSJzT-St1OVpHfCCumEkJorO8hg29wGXI", "scope": "https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.insert https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/auth/gmail.labels https://mail.google.com/ https://www.googleapis.com/auth/gmail.addons.current.message.readonly https://www.googleapis.com/auth/gmail.readonly", "token_type": "Bearer", "expiry_date": 1702994988534 },
|
|
62
|
+
{ "access_token": "ya29.a0AfB_byB-QxjIsHwSU7lbD2FpCMz2rK7p1Tzohl9BjeQUK_nFsEzqww4uQK086INqwTLENLXYVVq09hW7nRuhEg15MYtWo9xbU-nRtAMvzG5aLGPKOXl9mkWBR1cCsgtBPoxl7Klc_jnvH0PnC0TYwISoUqm9W-5c6fFraCgYKAQgSARASFQHGX2Minj2IKMCYkue3rCSMmM_h8g0171", "refresh_token": "1//09YMAAKDjzZ3VCgYIARAAGAkSNwF-L9Ir62E-caPL0S0qKj1phMtHSk3nQWFBW7YAyl7Nh8oSJ6WSXd2NvzHt0Hwf-i85GLF6grE", "scope": "https://mail.google.com/ https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/auth/gmail.insert https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.addons.current.message.readonly https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.labels", "token_type": "Bearer", "expiry_date": 1702995163803 },
|
|
63
|
+
{ "access_token": "ya29.a0AfB_byDVVHpB9LKHhdmD5nInQJHTGU8Ky0JHf2wRNtZB1HJHqod7Pme_0CHSy6vO5pNNaVPpyO8H3vNQ9jA6AGJLc82AKI3mGTsGmaIQFRQr02nhPTFuTY7Gl-_iR5lgZM6BmB5koWccOT6Xe9pl5ND5T8FVlRSRLvitaCgYKAdUSARASFQHGX2Mi2iH-ZeiaxFELglikw-okOw0171", "refresh_token": "1//09YD8dwZN5F1RCgYIARAAGAkSNwF-L9Irfie38zhzgw1ue4oEgR5Xc89BgiZHs1vcm8Tf6ROJfuCrnhsWLhr4oFkNlQ6UbJgU7GA", "scope": "https://www.googleapis.com/auth/gmail.insert https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.labels https://mail.google.com/ https://www.googleapis.com/auth/gmail.addons.current.message.readonly", "token_type": "Bearer", "expiry_date": 1702995310295 },
|
|
64
|
+
{ "access_token": "ya29.a0AfB_byBKWIknMT7E8yzyFjfNIzl_y_I73sP71YadO-yoKjphk6mvdSwOaYooLYYuZrHit8bYt0ERrX8mhkE1WGdiNcWGpBliS0s1Ved2DWJqkMlYsgnzz-4uAByodSHaxoqbnI0L1vCsqkJvvO4AJYUAIcSjf4z162gRaCgYKAT8SARASFQHGX2Mib4ndKaU92xuMBjUVD990GQ0171", "refresh_token": "1//09BZILsMOzERdCgYIARAAGAkSNwF-L9IryuSQRewZs9LSuCSdXdmfimL18Edof34Mo5UrC-FGuGHED7519THwrYLFoOFJe18TgRk", "scope": "https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.addons.current.message.readonly https://mail.google.com/ https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/auth/gmail.insert https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.send", "token_type": "Bearer", "expiry_date": 1702995376462 },
|
|
65
|
+
{ "access_token": "ya29.a0AfB_byABK1ECnRhzxM2_5FzN4XdwBG2q-qWDZlCJ2oZ2g7-k_QFgdyyICP99rQJuOyIU5t6NU9wSRsxL-hrk6kf2BmC2rW7ltdRw14h_n-nFPSk9Gg8979iuqvvfEokd9dIkY_MwhOYGiz7rP6aUwqjEAXDjg6FAieL1aCgYKAdsSARASFQHGX2Mim1Y5ousgcVP835Epj10Xww0171", "refresh_token": "1//09yqHMectr6qjCgYIARAAGAkSNwF-L9IrITv60RhPCDiL8POjD0Uy8CvxPDc7hmWrvL7zLCOcxNACUWDpTnQyqkOYRGWyF3pyNaI", "scope": "https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.insert https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://mail.google.com/ https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.addons.current.message.readonly https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.readonly", "token_type": "Bearer", "expiry_date": 1702995426413 }
|
|
66
|
+
];
|
|
63
67
|
let EMAIL;
|
|
64
68
|
let PASSWORD;
|
|
65
69
|
class AuxGoogleAuth {
|
|
@@ -155,23 +159,11 @@ class AuxGoogleAuth {
|
|
|
155
159
|
}
|
|
156
160
|
static getNewTokenHeadless(oAuth2Client) {
|
|
157
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
if (process.env.ENVIRONMENT !== 'LOCAL') {
|
|
165
|
-
if (platform.includes("win32") || platform.includes("darwin")) {
|
|
166
|
-
oAuth2Client.setCredentials(TOKEN_LOCAL);
|
|
167
|
-
this._oAuth2Client = oAuth2Client;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
oAuth2Client.setCredentials(TOKEN_LIVE);
|
|
171
|
-
this._oAuth2Client = oAuth2Client;
|
|
172
|
-
}
|
|
173
|
-
code_helper_1.default.log('Then', 'I login with the google account', status_of_step_1.default.PASSED);
|
|
174
|
-
}
|
|
162
|
+
const position = Math.floor(Math.random() * 6);
|
|
163
|
+
const token = TOKENS[position];
|
|
164
|
+
oAuth2Client.setCredentials(token);
|
|
165
|
+
this._oAuth2Client = oAuth2Client;
|
|
166
|
+
code_helper_1.default.log('Then', 'I login with the google account', status_of_step_1.default.PASSED);
|
|
175
167
|
});
|
|
176
168
|
}
|
|
177
169
|
}
|