From 3e88b685f848162ac5d9d8ac89837be041886954 Mon Sep 17 00:00:00 2001 From: Programmer Per Date: Mon, 7 Nov 2022 13:25:37 +0100 Subject: [PATCH] fix: duplicate orders (#16) --- assets/js/ledyer-checkout-for-woocommerce.js | 20 +- changelog.readme | 3 + classes/class-ledyer-confirmation.php | 12 +- classes/class-ledyer-lco-gateway.php | 8 - classes/class-ledyer-main.php | 10 +- includes/lco-functions.php | 14 +- languages/ledyer-checkout-for-woocommerce.pot | 2 +- ledyer-checkout-for-woocommerce.php | 2 +- package-lock.json | 280 +++++++++++++++--- 9 files changed, 273 insertions(+), 78 deletions(-) diff --git a/assets/js/ledyer-checkout-for-woocommerce.js b/assets/js/ledyer-checkout-for-woocommerce.js index bbd531b..5432195 100644 --- a/assets/js/ledyer-checkout-for-woocommerce.js +++ b/assets/js/ledyer-checkout-for-woocommerce.js @@ -31,11 +31,12 @@ jQuery(function ($) { shippingEmailExists: false, shippingPhoneExists: false, + redirectUrl: null, + /** * Triggers on document ready. */ documentReady: function () { - lco_wc.log(lco_params); if (0 < lco_wc.paymentMethodEl.length) { lco_wc.paymentMethod = lco_wc.paymentMethodEl.filter(':checked').val(); } else { @@ -95,7 +96,6 @@ jQuery(function ($) { success: function (data) { }, error: function (data) { }, complete: function (data) { - lco_wc.log(data.responseJSON); window.location.href = data.responseJSON.data.redirect; } }); @@ -106,7 +106,6 @@ jQuery(function ($) { */ maybeChangeToLco: function () { if (!lco_wc.preventPaymentMethodChange) { - lco_wc.log($(this).val()); if ('lco' === $(this).val()) { $('.woocommerce-info').remove(); @@ -130,7 +129,6 @@ jQuery(function ($) { success: function (data) { }, error: function (data) { }, complete: function (data) { - lco_wc.log(data.responseJSON); window.location.href = data.responseJSON.data.redirect; } }); @@ -245,7 +243,6 @@ jQuery(function ($) { * @param {array} data */ setCustomerData: function (data) { - lco_wc.log(data); if ('billing_address' in data && data.billing_address !== null) { // Billing fields. 'billing_first_name' in data.billing_address ? $('#billing_first_name').val(data.billing_address.billing_first_name) : ''; @@ -366,6 +363,7 @@ jQuery(function ($) { opacity: 0.6 } }); + $.ajax({ type: 'POST', url: lco_params.submit_order, @@ -392,9 +390,11 @@ jQuery(function ($) { // Ledyer will respond with a new event when order is complete // So don't redirect just yet lco_wc.isValidating = false; + lco_wc.redirectUrl = url; return; } + lco_wc.redirectUrl.searchParams.append('lco_purchase_complete', 'yes'); window.location.href = url.toString(); } else { throw 'Result failed'; @@ -444,6 +444,14 @@ jQuery(function ($) { $(document).on('ledyerCheckoutOrderComplete', function (event) { lco_wc.logToFile('ledyerCheckoutOrderComplete from Ledyer triggered'); + if (lco_wc.redirectUrl !== null) { + // This means that placeLedyerOrder was called successfully already + // (Due to an earlier call caused by client validation) + lco_wc.redirectUrl.searchParams.append('lco_purchase_complete', 'yes'); + window.location.href = lco_wc.redirectUrl.toString(); + return; + } + if (!lco_params.pay_for_order) { lco_wc.placeLedyerOrder(false, lco_wc.isValidating); } @@ -466,7 +474,7 @@ jQuery(function ($) { shouldProceed: true }) } else { - lco_wc.placeLedyerOrder(false, true); + lco_wc.placeLedyerOrder(false, lco_wc.isValidating); } }); }, diff --git a/changelog.readme b/changelog.readme index 3d7937c..a7b3b54 100644 --- a/changelog.readme +++ b/changelog.readme @@ -1,3 +1,6 @@ +## 1.1.2 +* Fix: prevent duplicate orders from being placed + ## 1.1.1 * Fix: client side validation bugs diff --git a/classes/class-ledyer-confirmation.php b/classes/class-ledyer-confirmation.php index e6d8a19..d0cb600 100644 --- a/classes/class-ledyer-confirmation.php +++ b/classes/class-ledyer-confirmation.php @@ -33,27 +33,25 @@ public function actions() { */ public function confirm_order() { + $ledyer_purchase_complete = filter_input( INPUT_GET, 'lco_purchase_complete', FILTER_SANITIZE_STRING ); $ledyer_confirm = filter_input( INPUT_GET, 'lco_confirm', FILTER_SANITIZE_STRING ); $order_key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING ); $ledyer_pending = filter_input( INPUT_GET, 'lco_pending', FILTER_SANITIZE_STRING ); - if ( empty( $ledyer_confirm ) || empty( $order_key ) ) { + if ( empty( $ledyer_confirm ) || empty( $order_key ) || empty( $ledyer_purchase_complete) ) { return; } $order_id = wc_get_order_id_by_order_key( $order_key ); $order = wc_get_order( $order_id ); $order_pending_order = ( 'yes' === $ledyer_pending ) ? true : false; + $should_confirm_order = ( 'yes' === $ledyer_purchase_complete ) ? true : false; - Logger::log( $order_id . ': Confirmation endpoint hit for order.' ); - - if ( empty( $order->get_date_paid() ) ) { - - Logger::log( $order_id . ': Confirm the Ledyer order from the confirmation page.' ); + Logger::log( $order_id . ': Confirm the Ledyer order from the confirmation page.' ); + if ( $should_confirm_order ) { // Confirm the order. wc_ledyer_confirm_ledyer_order( $order_id, $order_pending_order ); - lco_unset_sessions(); } } diff --git a/classes/class-ledyer-lco-gateway.php b/classes/class-ledyer-lco-gateway.php index 6228ee0..0f4f98e 100644 --- a/classes/class-ledyer-lco-gateway.php +++ b/classes/class-ledyer-lco-gateway.php @@ -372,14 +372,6 @@ public function add_data_attributes( $tag, $handle ) { * @param $order */ public function wc_order_created( $order_id, $posted_data, $order ) { - $ledyer_order_id = WC()->session->get( 'lco_wc_order_id' ); - - $ledyer_order = ledyer()->api->update_order_reference( $ledyer_order_id, array( 'reference' => strval( $order_id ) ) ); - - if ( ! $ledyer_order || ( is_object( $ledyer_order ) && is_wp_error( $ledyer_order ) ) ) { - // If failed then bail. - return; - } } /** diff --git a/classes/class-ledyer-main.php b/classes/class-ledyer-main.php index d137846..ace414f 100644 --- a/classes/class-ledyer-main.php +++ b/classes/class-ledyer-main.php @@ -51,7 +51,7 @@ class Ledyer_Checkout_For_WooCommerce { */ public $checkout; - const VERSION = '1.1.1'; + const VERSION = '1.1.2'; const SLUG = 'ledyer-checkout-for-woocommerce'; const SETTINGS = 'ledyer_checkout_for_woocommerce_settings'; @@ -153,15 +153,17 @@ public function update_order_status( $request ) { $order = wc_get_order( $order->ID ); if( 'com.ledyer.order.create' === $request_body['eventType'] ) { - // TODO: if order was on hold or pending and notification is received, set to processing (update_status) - - $order->payment_complete( $order_id ); + $order->update_status('pending'); $response = ledyer()->api->acknowledge_order( $order_id ); if( is_wp_error( $response ) ) { \Ledyer\Logger::log( 'Couldn\'t acknowledge order ' . $order_id ); } } + if( 'com.ledyer.order.ready_for_capture' === $request_body['eventType'] ) { + $order->update_status('processing'); + } + switch ( $ledyer_order['status'] ) { case 'fullyCaptured': $order->update_status( 'completed' ); diff --git a/includes/lco-functions.php b/includes/lco-functions.php index 698ab10..9a12882 100644 --- a/includes/lco-functions.php +++ b/includes/lco-functions.php @@ -190,22 +190,14 @@ function wc_ledyer_confirm_ledyer_order( $order_id, $ledyer_pending ) { do_action( 'ledyer_process_payment', $order_id, $request ); + $ledyer_order = ledyer()->api->update_order_reference( $payment_id, array( 'reference' => strval( $order_id ) ) ); + update_post_meta( $order_id, 'ledyerpayment_type', $request['paymentMethod']['type'] ); update_post_meta( $order_id, 'ledyer_payment_method', $request['paymentMethod']['provider'] ); update_post_meta( $order_id, '_ledyer_date_paid', gmdate( 'Y-m-d H:i:s' ) ); - $isAdvanceInvoice = $request['paymentMethod']['type'] == 'advanceInvoice'; - if( ! $ledyer_pending ) { - $order->add_order_note( sprintf( __( 'New payment created in Ledyer with Payment ID %1$s. Payment type - %2$s. Awaiting charge.', 'ledyer-checkout-for-woocommerce' ), $payment_id, $request['paymentMethod']['type'] ) ); - - if ( ! $isAdvanceInvoice) { - $order->payment_complete( $payment_id ); - } - $response = ledyer()->api->acknowledge_order( $payment_id ); - if( is_wp_error( $response ) ) { - \Ledyer\Logger::log( 'Couldn\'t acknowledge order ' . $payment_id ); - } + $order->add_order_note( sprintf( __( 'New payment created in Ledyer with Payment ID %1$s. Payment type - %2$s. Awaiting capture.', 'ledyer-checkout-for-woocommerce' ), $payment_id, $request['paymentMethod']['type'] ) ); } else { $order->update_status('on-hold'); $order->add_order_note( sprintf( __( 'New payment created in Ledyer with Payment ID %1$s. Payment type - %2$s. Awaiting signature.', 'ledyer-checkout-for-woocommerce' ), $session_id, $request['paymentMethod']['type'] ) ); diff --git a/languages/ledyer-checkout-for-woocommerce.pot b/languages/ledyer-checkout-for-woocommerce.pot index 9a28f96..7202c6a 100644 --- a/languages/ledyer-checkout-for-woocommerce.pot +++ b/languages/ledyer-checkout-for-woocommerce.pot @@ -2,7 +2,7 @@ # This file is distributed under the same license as the Ledyer Checkout for WooCommerce plugin. msgid "" msgstr "" -"Project-Id-Version: Ledyer Checkout for WooCommerce 1.1.1\n" +"Project-Id-Version: Ledyer Checkout for WooCommerce 1.1.2\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ledyer-checkout-for-woocommerce\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/ledyer-checkout-for-woocommerce.php b/ledyer-checkout-for-woocommerce.php index 3f76658..ec9c795 100644 --- a/ledyer-checkout-for-woocommerce.php +++ b/ledyer-checkout-for-woocommerce.php @@ -5,7 +5,7 @@ * Description: Ledyer Checkout payment gateway for WooCommerce. * Author: Maksimer/Ledyer * Author URI: https://www.maksimer.com/ - * Version: 1.1.1 + * Version: 1.1.2 * Text Domain: ledyer-checkout-for-woocommerce * Domain Path: /languages * diff --git a/package-lock.json b/package-lock.json index 2eba35e..4e128a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3722,6 +3722,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@wordpress/eslint-plugin/node_modules/prettier": { + "name": "wp-prettier", + "version": "2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/@wordpress/jest-console": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-3.10.0.tgz", @@ -3891,6 +3904,58 @@ "node": ">=4.0.0" } }, + "node_modules/@wordpress/scripts/node_modules/prettier": { + "name": "wp-prettier", + "version": "2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@wordpress/scripts/node_modules/puppeteer": { + "name": "puppeteer-core", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz", + "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==", + "dev": true, + "dependencies": { + "@types/mime-types": "^2.1.0", + "debug": "^4.1.0", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^4.0.0", + "mime": "^2.0.3", + "mime-types": "^2.1.25", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/@wordpress/scripts/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@wordpress/scripts/node_modules/url-loader": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-3.0.0.tgz", @@ -16172,11 +16237,20 @@ } }, "node_modules/prettier": { - "name": "wp-prettier", - "version": "2.2.1-beta-1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", - "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", - "dev": true + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } }, "node_modules/prettier-linter-helpers": { "version": "1.0.0", @@ -16418,39 +16492,70 @@ } }, "node_modules/puppeteer": { - "name": "puppeteer-core", - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz", - "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz", + "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==", + "deprecated": "Version no longer supported. Upgrade to @latest", "dev": true, + "hasInstallScript": true, + "peer": true, "dependencies": { "@types/mime-types": "^2.1.0", "debug": "^4.1.0", - "extract-zip": "^2.0.0", + "extract-zip": "^1.6.6", "https-proxy-agent": "^4.0.0", "mime": "^2.0.3", "mime-types": "^2.1.25", "progress": "^2.0.1", "proxy-from-env": "^1.0.0", - "rimraf": "^3.0.2", - "tar-fs": "^2.0.0", - "unbzip2-stream": "^1.3.3", - "ws": "^7.2.3" + "rimraf": "^2.6.1", + "ws": "^6.1.0" + }, + "engines": { + "node": ">=8.16.0" } }, - "node_modules/puppeteer/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/puppeteer/node_modules/extract-zip": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", + "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", "dev": true, + "peer": true, "dependencies": { - "glob": "^7.1.3" + "concat-stream": "^1.6.2", + "debug": "^2.6.9", + "mkdirp": "^0.5.4", + "yauzl": "^2.10.0" }, "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "extract-zip": "cli.js" + } + }, + "node_modules/puppeteer/node_modules/extract-zip/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/puppeteer/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "peer": true + }, + "node_modules/puppeteer/node_modules/ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dev": true, + "peer": true, + "dependencies": { + "async-limiter": "~1.0.0" } }, "node_modules/q": { @@ -20095,6 +20200,20 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", @@ -24996,6 +25115,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true } } }, @@ -25129,6 +25254,41 @@ "json5": "^1.0.1" } }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true + }, + "puppeteer": { + "version": "npm:puppeteer-core@3.0.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz", + "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==", + "dev": true, + "requires": { + "@types/mime-types": "^2.1.0", + "debug": "^4.1.0", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^4.0.0", + "mime": "^2.0.3", + "mime-types": "^2.1.25", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "url-loader": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-3.0.0.tgz", @@ -34700,10 +34860,11 @@ "dev": true }, "prettier": { - "version": "npm:wp-prettier@2.2.1-beta-1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", - "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", - "dev": true + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "peer": true }, "prettier-linter-helpers": { "version": "1.0.0", @@ -34912,32 +35073,64 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "puppeteer": { - "version": "npm:puppeteer-core@3.0.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz", - "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz", + "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==", "dev": true, + "peer": true, "requires": { "@types/mime-types": "^2.1.0", "debug": "^4.1.0", - "extract-zip": "^2.0.0", + "extract-zip": "^1.6.6", "https-proxy-agent": "^4.0.0", "mime": "^2.0.3", "mime-types": "^2.1.25", "progress": "^2.0.1", "proxy-from-env": "^1.0.0", - "rimraf": "^3.0.2", - "tar-fs": "^2.0.0", - "unbzip2-stream": "^1.3.3", - "ws": "^7.2.3" + "rimraf": "^2.6.1", + "ws": "^6.1.0" }, "dependencies": { - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "extract-zip": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", + "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", "dev": true, + "peer": true, "requires": { - "glob": "^7.1.3" + "concat-stream": "^1.6.2", + "debug": "^2.6.9", + "mkdirp": "^0.5.4", + "yauzl": "^2.10.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "peer": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "peer": true + }, + "ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dev": true, + "peer": true, + "requires": { + "async-limiter": "~1.0.0" } } } @@ -37812,6 +38005,13 @@ "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true + }, "uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",