From a494ac1d6dc5a9ae116391d11bfb5d57804a4f6a Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Thu, 9 May 2019 14:07:26 -0400 Subject: [PATCH] Release Version 1.0.0 (#429) * version bump * auth screen resized * Discord RPC (#421) * added discord RPC * added discord RPC * added rpc to update every ~15s in app level * added initial set activity * Obfuscate Source Code (#428) * Add javascript-obfuscator package to task-runner This commit adds the javascript-obfuscator as a dev dependency to the task-runner package so the built output can be obfuscated. * Add Obfuscation to Build Pipeline This commit modifies the task-runner package.json to add obfucation to the build pipeline. The build script is updated to run two sub commands: build:babel and build:obfuscate. The main export file of the package is changed to point to the obfuscated code instead of the built code. Obfuscation options are added to a separate config file so the cli command remains clean. * Add Task Runner Built package This commit adds a new packages that will contain the built, obfuscated code of the task-runner. This package functions exactly the same as the task-runner package, but is safe to include in built packages since no unobfuscated source is contained in it. This package is meant purely as a proxy and no source code nor development should occur here. The task-runner package is updated to change the obfuscated output to this package. The frontend can then depend on this package so the packed app will contain only obfuscated task-runner code. * Switch to use task-runner-built package This commit updates the frontend project to rely on the task-runner-built package. This allows the packed source to include the obfuscated code instead of the full source code. * Obfuscate lib folder This commit updates the frontend package to obfuscate the lib folder. The javascript obfuscator is used for all files in the lib folder and the obfuscated code is moved to a dist/ folder. The main file is updated to use the obfuscated code and the build script is updated to obfuscate code as well as bundle the react side. NOTE: When running in dev mode, the unobfuscated version is used. * Update Electron Builder Config This commit updates the electron builder config to export the `dist/` folder instead of the `lib/` folder. This allows the packed app to run properly. * Add empty lint script This commit adds a missing empty lint script to the task-runner-built package. Linting is not needed in this package since it only contains obfuscated code, but the top level lint script will still attempt to run the lint script in this package. * Fix State Discrepancies (#425) * state discrepencies * rm console log * rm console log * fixed remove all discrepancy * fix test * Colored Log Output Messages (#426) * added colored log messages, and reverted restock loop back due to multiple checkout session being needed * fix tests * pr changes * version 1.0.0 * update rpc file * Captcha Sessions (#430) * captcha session updates * split sessions now managed between YT and captcha pairs * added insecure content on cap win * Apply suggestions from code review Change to camelcase `inUse` and rm some unnecessary code * pr changes * rm dist folder, whoops... * Implement Custom Shopify (#427) * added parse access token * reduced wait time in polling for shipping rates * fixed fsr * added creatable select for site * finished custom shopify impl. * fix some tests * added edit row custom shopify support * test cases fixed * prevent extraneous log messages from showing up * code cleanup + destructuring * lint fix * small changes * some small changes/optimizations * variant matching fixed * default option chosen * added srr custom shopify support * update channel * colored log fixes, + sass compilation --- packages/task-runner/src/shopify/classes/checkout.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/task-runner/src/shopify/classes/checkout.js b/packages/task-runner/src/shopify/classes/checkout.js index 86dd7a67..21f149f0 100644 --- a/packages/task-runner/src/shopify/classes/checkout.js +++ b/packages/task-runner/src/shopify/classes/checkout.js @@ -662,10 +662,8 @@ class Checkout { if (redirectUrl.indexOf('stock_problems') > -1) { if (this._checkoutType === CheckoutTypes.fe) { - if (size.includes('Random')) { - return { message: 'Running for restocks', nextState: States.Monitor }; - } - return { message: 'Running for restocks', nextState: States.GetCheckout }; + const nextState = size.includes('Random') ? States.Monitor : States.GetCheckout; + return { message: 'Running for restocks', nextState }; } return { message: 'Running for restocks', nextState: States.Restocking }; } @@ -777,10 +775,8 @@ class Checkout { // out of stock if (redirectUrl.indexOf('stock_problems') > -1) { if (this._checkoutType === CheckoutTypes.fe) { - if (size.includes('Random')) { - return { message: 'Running for restocks', nextState: States.Monitor }; - } - return { message: 'Running for restocks', nextState: States.GetCheckout }; + const nextState = size.includes('Random') ? States.Monitor : States.GetCheckout; + return { message: 'Running for restocks', nextState }; } return { message: 'Running for restocks', nextState: States.Restocking }; }