From 382e1a3277ee8f3a42ca19c43a44a1f8be7a0fb4 Mon Sep 17 00:00:00 2001 From: chapiewsky Date: Sun, 16 Jun 2019 15:17:15 -0500 Subject: [PATCH] update version, changelog, readme --- CHANGELOG.md | 7 ++++++ README.md | 2 ++ package-lock.json | 56 +++++++++++++++++++++++------------------------ package.json | 2 +- src/giveaways.js | 10 +++++++-- 5 files changed, 46 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0492783..71b2c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 4.1.0 - 2019-06-16 +### Added +- Enter winner promo card giveaways (#96)[https://github.com/jpchip/giveaway-grabber/issues/96] +- Log entries skipped for being below minimum price +### Fixed +- Make sure url saved is always the url for the entry on the giveaways screen (#104)[https://github.com/jpchip/giveaway-grabber/issues/104] + ## 4.0.1 - 2019-06-08 ### Fixed - Readme typos diff --git a/README.md b/README.md index 4842142..df45272 100644 --- a/README.md +++ b/README.md @@ -155,9 +155,11 @@ The table below outlines the codes used and what they are indicating. | W | The sweepstakes was won | | L | The sweepstakes was lost | | E | The sweepstakes has ended | +| M | The sweepstakes was below minimum price | | A | The sweepstakes was already entered | | C | The sweepstakes cannot be entered | + Codes relate to not being able to be processed are not stored. The expectation is that as Giveaway-Grabber matures these items may be corrected. As such, blocking them due to a failure would force Giveaway-Grabber to skip them after the problem is rectified. **NOTE:** If you delete your giveaway-grabber's install directory, you may want to grab the gg.db file first. When a new Giveaway-Grabber is installed or cloned you can put the gg.db file into the install directory. This way you will be able to retain all of the sweepstakes you have previously entered. The gg.db file will rebuild on its own, but Giveaway-Grabber will need to go through each page to do so. diff --git a/package-lock.json b/package-lock.json index afe81bf..d38fbe4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "giveaway-grabber", - "version": "4.0.1", + "version": "4.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -541,9 +541,9 @@ "dev": true }, "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://packages.ei-app.com/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "requires": { "es6-promisify": "^5.0.0" } @@ -1096,7 +1096,7 @@ }, "concat-stream": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "resolved": "https://packages.ei-app.com/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { "buffer-from": "^1.0.0", @@ -1393,13 +1393,13 @@ } }, "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" + "version": "4.2.8", + "resolved": "https://packages.ei-app.com/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "es6-promisify": { "version": "5.0.0", - "resolved": "http://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "resolved": "https://packages.ei-app.com/es6-promisify/-/es6-promisify-5.0.0.tgz", "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "requires": { "es6-promise": "^4.0.3" @@ -1755,7 +1755,7 @@ }, "extract-zip": { "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", + "resolved": "https://packages.ei-app.com/extract-zip/-/extract-zip-1.6.7.tgz", "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", "requires": { "concat-stream": "1.6.2", @@ -1766,7 +1766,7 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "resolved": "https://packages.ei-app.com/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" @@ -1774,7 +1774,7 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "resolved": "https://packages.ei-app.com/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } @@ -1817,7 +1817,7 @@ }, "fd-slicer": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "resolved": "https://packages.ei-app.com/fd-slicer/-/fd-slicer-1.0.1.tgz", "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", "requires": { "pend": "~1.2.0" @@ -2179,7 +2179,7 @@ }, "https-proxy-agent": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "resolved": "https://packages.ei-app.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "requires": { "agent-base": "^4.1.0", @@ -2188,7 +2188,7 @@ "dependencies": { "debug": { "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "resolved": "https://packages.ei-app.com/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "requires": { "ms": "^2.1.1" @@ -3585,9 +3585,9 @@ } }, "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + "version": "2.4.4", + "resolved": "https://packages.ei-app.com/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" }, "mime-db": { "version": "1.38.0", @@ -4140,7 +4140,7 @@ }, "pend": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "resolved": "https://packages.ei-app.com/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, "performance-now": { @@ -4252,7 +4252,7 @@ }, "proxy-from-env": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "resolved": "https://packages.ei-app.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz", "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=" }, "psl": { @@ -4275,9 +4275,9 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "puppeteer": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.13.0.tgz", - "integrity": "sha512-LUXgvhjfB/P6IOUDAKxOcbCz9ISwBLL9UpKghYrcBDwrOGx1m60y0iN2M64mdAUbT4+7oZM5DTxOW7equa2fxQ==", + "version": "1.17.0", + "resolved": "https://packages.ei-app.com/puppeteer/-/puppeteer-1.17.0.tgz", + "integrity": "sha512-3EXZSximCzxuVKpIHtyec8Wm2dWZn1fc5tQi34qWfiUgubEVYHjUvr0GOJojqf3mifI6oyKnCdrGxaOI+lWReA==", "requires": { "debug": "^4.1.0", "extract-zip": "^1.6.6", @@ -5230,7 +5230,7 @@ }, "typedarray": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "resolved": "https://packages.ei-app.com/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typedarray-to-buffer": { @@ -5545,9 +5545,9 @@ } }, "ws": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.0.tgz", - "integrity": "sha512-deZYUNlt2O4buFCa3t5bKLf8A7FPP/TVjwOeVNpw818Ma5nk4MLXls2eoEGS39o8119QIYxTrTDoPQ5B/gTD6w==", + "version": "6.2.1", + "resolved": "https://packages.ei-app.com/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "requires": { "async-limiter": "~1.0.0" } @@ -5612,7 +5612,7 @@ }, "yauzl": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "resolved": "https://packages.ei-app.com/yauzl/-/yauzl-2.4.1.tgz", "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", "requires": { "fd-slicer": "~1.0.1" diff --git a/package.json b/package.json index ac1d309..aba9ec1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "giveaway-grabber", - "version": "4.0.1", + "version": "4.1.0", "description": "Automates entries for Amazon Giveaways", "preferGlobal": true, "main": "index.js", diff --git a/src/giveaways.js b/src/giveaways.js index df014ac..a1b0467 100644 --- a/src/giveaways.js +++ b/src/giveaways.js @@ -661,7 +661,10 @@ async function enterGiveaways(page, pageNumber) { let giveawayUrl = await getGiveawayURL(page, i); if (giveawayUrl.length > 0) { - currentGiveawayUrl = giveawayUrl.substring(0, giveawayUrl.indexOf('?')); + currentGiveawayUrl = giveawayUrl.substring( + 0, + giveawayUrl.indexOf('?') + ); const skippable = await isSkippable(currentGiveawayUrl); if (skippable) { console.log( @@ -739,7 +742,10 @@ async function enterGiveaways(page, pageNumber) { process.env.MINIMUM_PRICE }.` ); - await setProcessingCode(urlTypes.MINIMUM_PRICE, currentGiveawayUrl); + await setProcessingCode( + urlTypes.MINIMUM_PRICE, + currentGiveawayUrl + ); await page.goBack(); return; }