@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 TOKEN_LOCAL = { "access_token": "ya29.a0AfB_byC3wrz-fq6dH4V1TtgLoRZYUWaz4bmfSmKhrZpJ8m3fGE57f-MlNjkmsXNQq1Vlod79HxZ2Kl1Gcd7dVAeJoZe0RTvv9SoA-Epg1MfYfkHmHqUAajn0tqelMQpU_nwZsf3JVd3_gBFKBy3OSKMVeMe9ypbSxcK4aCgYKAe0SARASFQHGX2MiUdpxBp978i0lcm4cMPGOmQ0171", "refresh_token": "1//09mXy9YbxS7M-CgYIARAAGAkSNwF-L9Ir_InxbeTeFnEW-9dokuVSEZZGhgumZyglH0ls4MXruOMdpQU6Jq4oZ2b1vhQCOmkvk4Q", "scope": "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.addons.current.action.compose https://www.googleapis.com/auth/gmail.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.insert https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.addons.current.message.readonly", "token_type": "Bearer", "expiry_date": 1702312809725 };
62
- let TOKEN_LIVE = { "access_token": "ya29.a0AfB_byDSMJG3P21NM_Yg2Smb4zqKzqHQqsebIxZdurEM0D6ZFJc83MIBqjbLrHunQARDMGlyds91pYxPwlG8TGHG92sVJOciRVKk1FajWDgV8NB2DUaR2C1VyqMvG6u_CNOAh8ipwkyl61IV9LQRUq68Pst4IgMUIE0vaCgYKAWQSARASFQHGX2MiupiNUzT4iPGG55veqTkvyg0171", "refresh_token": "1//09-NODQSczV7oCgYIARAAGAkSNwF-L9IrH4shG3hyGtXJdadMchVIjQs5yF6pbqJ9owKzuiq2agTtall0qsspNY5fhqMYoun48EY", "scope": "https://www.googleapis.com/auth/gmail.addons.current.message.action https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.insert https://mail.google.com/ https://www.googleapis.com/auth/gmail.addons.current.message.readonly https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.send", "token_type": "Bearer", "expiry_date": 1702312878701 };
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 platform = os.platform();
159
- if (process.env.ENVIRONMENT === 'LOCAL') {
160
- oAuth2Client.setCredentials(TOKEN_LOCAL);
161
- this._oAuth2Client = oAuth2Client;
162
- code_helper_1.default.log('Then', 'I login with the google account', status_of_step_1.default.PASSED);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auxcode/auxta",
3
- "version": "1.3.78-beta.110",
3
+ "version": "1.3.78-beta.112",
4
4
  "description": "",
5
5
  "main": "./build/AuxTA.js",
6
6
  "types": "./build/AuxTA.d.ts",