From 0aba342b036eb2de215bcaeedc4ad8a888c01cf7 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Thu, 31 Aug 2023 14:13:34 +0200 Subject: [PATCH 01/41] Implement In3 fields using PHP --- resources/js/mollieIn3.js | 44 ---------- src/Assets/AssetsModule.php | 12 --- src/Payment/MollieOrder.php | 10 ++- src/PaymentMethods/In3.php | 2 +- .../In3FieldsStrategy.php | 84 +++++++++++++++++++ webpack.config.js | 1 - 6 files changed, 94 insertions(+), 59 deletions(-) delete mode 100644 resources/js/mollieIn3.js create mode 100644 src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php diff --git a/resources/js/mollieIn3.js b/resources/js/mollieIn3.js deleted file mode 100644 index 0905a1a8..00000000 --- a/resources/js/mollieIn3.js +++ /dev/null @@ -1,44 +0,0 @@ -import {maybeRequireField, saveOriginalField} from "./wooCheckoutFieldsUtility"; - -( - function ({jQuery}) { - let positionField = 'li.wc_payment_method.payment_method_mollie_wc_gateway_in3'; - let gateway = 'mollie_wc_gateway_in3'; - let inputPhoneName = 'billing_phone'; - let originalPhone = saveOriginalField(inputPhoneName, {}); - let phoneId = 'billing_phone_field'; - let phoneField = jQuery('form[name="checkout"] p#billing_phone_field'); - let phoneMarkup = '

' - + '' - + '' - + '' - + '' - + '

' - let inputBirthName = 'billing_birthdate'; - let originalBirth = saveOriginalField(inputBirthName, {}); - let birthId = 'billing_birthdate_field'; - let birthField = jQuery('form[name="checkout"] p#billing_birthdate_field'); - let birthMarkup = '

' - + '' - + '' - + '' - + '' - + '

' - jQuery(function () { - jQuery('body') - .on('updated_checkout payment_method_selected', function () { - phoneField = maybeRequireField(phoneField, positionField, phoneMarkup, inputPhoneName, phoneId, originalPhone, gateway); - birthField = maybeRequireField(birthField, positionField, birthMarkup, inputBirthName, birthId, originalBirth, gateway); - }); - }); - } -)( - window -) - - - diff --git a/src/Assets/AssetsModule.php b/src/Assets/AssetsModule.php index 17ed4a53..6595d7bb 100644 --- a/src/Assets/AssetsModule.php +++ b/src/Assets/AssetsModule.php @@ -291,13 +291,6 @@ protected function registerFrontendScripts(string $pluginUrl, string $pluginPath (string) filemtime($this->getPluginPath($pluginPath, '/public/js/mollieBillie.min.js')), true ); - wp_register_script( - 'mollie-in3-classic-handles', - $this->getPluginUrl($pluginUrl, '/public/js/mollieIn3.min.js'), - ['underscore', 'jquery'], - (string) filemtime($this->getPluginPath($pluginPath, '/public/js/mollieIn3.min.js')), - true - ); } public function registerBlockScripts(string $pluginUrl, string $pluginPath): void @@ -330,11 +323,6 @@ public function enqueueFrontendScripts($container) if ($isBillieEnabled && $isBillieEnabledAtMollie) { wp_enqueue_script('mollie-billie-classic-handles'); } - $isIn3Enabled = mollieWooCommerceIsGatewayEnabled('mollie_wc_gateway_in3_settings', 'enabled'); - $isIn3EnabledAtMollie = in_array('in3', $allMethodsEnabledAtMollie, true); - if ($isIn3Enabled && $isIn3EnabledAtMollie) { - wp_enqueue_script('mollie-in3-classic-handles'); - } $applePayGatewayEnabled = mollieWooCommerceIsGatewayEnabled('mollie_wc_gateway_applepay_settings', 'enabled'); $isAppleEnabledAtMollie = in_array('applepay', $allMethodsEnabledAtMollie, true); diff --git a/src/Payment/MollieOrder.php b/src/Payment/MollieOrder.php index 6d01d3ed..e13c6c99 100644 --- a/src/Payment/MollieOrder.php +++ b/src/Payment/MollieOrder.php @@ -944,13 +944,21 @@ protected function createBillingAddress($order) self::MAXIMAL_LENGHT_REGION ); $billingAddress->organizationName = $this->billingCompanyField($order); - $phone = !empty($order->get_billing_phone()) ? $order->get_billing_phone() : $order->get_shipping_phone(); + $phone = $this->getPhoneNumber($order); $billingAddress->phone = (ctype_space($phone)) ? null : $this->getFormatedPhoneNumber($phone); return $billingAddress; } + protected function getPhoneNumber($order){ + $phone = !empty($order->get_billing_phone()) ? $order->get_billing_phone() : $order->get_shipping_phone(); + if(empty($phone)){ + $phone = wc_clean(wp_unslash($_POST["billing_phone"] ?? '')); + } + return $phone; + } + /** * @param $order * @return stdClass diff --git a/src/PaymentMethods/In3.php b/src/PaymentMethods/In3.php index 1253ee9e..be4b7ec3 100644 --- a/src/PaymentMethods/In3.php +++ b/src/PaymentMethods/In3.php @@ -13,7 +13,7 @@ public function getConfig(): array 'defaultTitle' => __('in3', 'mollie-payments-for-woocommerce'), 'settingsDescription' => '', 'defaultDescription' => __('Pay in 3 instalments, 0% interest', 'mollie-payments-for-woocommerce'), - 'paymentFields' => false, + 'paymentFields' => true, 'instructions' => false, 'supports' => [ 'products', diff --git a/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php b/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php new file mode 100644 index 00000000..ab366db8 --- /dev/null +++ b/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php @@ -0,0 +1,84 @@ +getOrderIdOnPayForOrderPage(); + $showPhoneField = empty($order->get_billing_phone()); + $showBirthdateField = true; + } + + if (is_checkout() && !is_checkout_pay_page()) { + $checkoutFields = WC()->checkout()->get_checkout_fields(); + + if (!isset($checkoutFields["billing"][self::FIELD_PHONE])) { + $showPhoneField = true; + } + + if (!isset($checkoutFields["billing"][self::FIELD_BIRTHDATE])) { + $showBirthdateField = true; + } + } + + if ($showPhoneField) { + $this->phoneNumber(); + } + + if ($showBirthdateField) { + $this->dateOfBirth(); + } + } + + protected function getOrderIdOnPayForOrderPage() + { + global $wp; + $orderId = absint($wp->query_vars['order-pay']); + return wc_get_order($orderId); + } + + protected function dateOfBirth() + { + ?> +

+ + + +

+ +

+ + + + +

+ Date: Thu, 31 Aug 2023 15:31:09 +0200 Subject: [PATCH 02/41] Esc output. --- src/Payment/MollieOrder.php | 9 ++++++--- .../PaymentFieldsStrategies/In3FieldsStrategy.php | 13 +++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Payment/MollieOrder.php b/src/Payment/MollieOrder.php index e13c6c99..7c505e98 100644 --- a/src/Payment/MollieOrder.php +++ b/src/Payment/MollieOrder.php @@ -951,10 +951,13 @@ protected function createBillingAddress($order) return $billingAddress; } - protected function getPhoneNumber($order){ + protected function getPhoneNumber($order) + { + $phone = !empty($order->get_billing_phone()) ? $order->get_billing_phone() : $order->get_shipping_phone(); - if(empty($phone)){ - $phone = wc_clean(wp_unslash($_POST["billing_phone"] ?? '')); + if (empty($phone)) { + //phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + $phone = wc_clean(wp_unslash($_POST['billing_phone'] ?? '')); } return $phone; } diff --git a/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php b/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php index ab366db8..122a770c 100644 --- a/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php +++ b/src/PaymentMethods/PaymentFieldsStrategies/In3FieldsStrategy.php @@ -52,15 +52,12 @@ protected function dateOfBirth() { ?>

-

-

Date: Mon, 18 Dec 2023 15:19:22 +0100 Subject: [PATCH 19/41] Add Twint method --- public/images/twint.svg | 44 +++++++++++++++++++++++++++++ src/PaymentMethods/Twint.php | 32 +++++++++++++++++++++ src/Shared/SharedDataDictionary.php | 1 + 3 files changed, 77 insertions(+) create mode 100644 public/images/twint.svg create mode 100644 src/PaymentMethods/Twint.php diff --git a/public/images/twint.svg b/public/images/twint.svg new file mode 100644 index 00000000..7e09e4aa --- /dev/null +++ b/public/images/twint.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/PaymentMethods/Twint.php b/src/PaymentMethods/Twint.php new file mode 100644 index 00000000..0d77d320 --- /dev/null +++ b/src/PaymentMethods/Twint.php @@ -0,0 +1,32 @@ + 'twint', + 'defaultTitle' => __('Twint', 'mollie-payments-for-woocommerce'), + 'settingsDescription' => '', + 'defaultDescription' => '', + 'paymentFields' => false, + 'instructions' => false, + 'supports' => [ + 'products', + 'refunds', + ], + 'filtersOnBuild' => false, + 'confirmationDelayed' => false, + 'SEPA' => false + ]; + } + + public function getFormFields($generalFormFields): array + { + return $generalFormFields; + } +} diff --git a/src/Shared/SharedDataDictionary.php b/src/Shared/SharedDataDictionary.php index 9408c7ba..892519b3 100644 --- a/src/Shared/SharedDataDictionary.php +++ b/src/Shared/SharedDataDictionary.php @@ -31,6 +31,7 @@ class SharedDataDictionary 'Mollie_WC_Gateway_Paysafecard', 'Mollie_WC_Gateway_Voucher', 'Mollie_WC_Gateway_Directdebit', + 'Mollie_WC_Gateway_Twint', ]; public const MOLLIE_OPTIONS_NAMES = [ From 7f0e332c11d0b22d7d3173ec4efdfff5748d4e9d Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 18 Dec 2023 15:20:45 +0100 Subject: [PATCH 20/41] Use methods/all to retrieve active --- src/Shared/Data.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/Shared/Data.php b/src/Shared/Data.php index 3cb509e5..49fdb2d9 100644 --- a/src/Shared/Data.php +++ b/src/Shared/Data.php @@ -199,6 +199,9 @@ public function getPayment($payment_id, $apiKey, $use_cache = true): ?\Mollie\Ap */ public function getAllPaymentMethods($apiKey, $test_mode = false, $use_cache = true) { + if(!$apiKey) { + $apiKey = $this->getApiKey($test_mode); + } $result = $this->getRegularPaymentMethods($apiKey, $test_mode, $use_cache); if (!is_array($result)) { $result = unserialize($result); @@ -312,8 +315,17 @@ public function getRegularPaymentMethods($apiKey, $test_mode = false, $use_cache if ($use_cache && ! empty(self::$regular_api_methods)) { return self::$regular_api_methods; } - - self::$regular_api_methods = $this->getApiPaymentMethods($use_cache); + $test_mode = $this->isTestModeEnabled(); + $methods = $this->getAllAvailablePaymentMethods($use_cache); + // We cannot access allActive for all methods so we filter them out here + $filtered_methods = array_filter($methods, function ($method) use ($test_mode) { + if ($test_mode === "live") { + return $method['status'] === "activated"; + } else { + return in_array($method['status'], ["activated", "pending-review"]); + } + }); + self::$regular_api_methods = $filtered_methods; return self::$regular_api_methods; } @@ -679,14 +691,21 @@ public function isSubscription($orderId) return apply_filters($this->pluginId . '_is_subscription_payment', $isSubscription, $orderId); } - public function getAllAvailablePaymentMethods($use_cache = true) + public function getAllAvailablePaymentMethods($use_cache = true, $filters = []) { $apiKey = $this->settingsHelper->getApiKey(); $methods = false; $locale = $this->getPaymentLocale(); + $test_mode = $this->isTestModeEnabled(); $filters_key = []; $filters_key['locale'] = $locale; + $filters_key['mode'] = ( $test_mode ? 'test' : 'live' ); + $filters_key['api'] = 'methods'; $transient_id = $this->getTransientId(md5(http_build_query($filters_key))); + $filters['include'] = 'issuers'; + $filters['locale'] = $locale; + $keysAllowed = ['amount' => '', 'locale' => '', 'issuers' => '']; + $filters = array_intersect_key($filters, $keysAllowed); try { if ($use_cache) { @@ -701,8 +720,7 @@ public function getAllAvailablePaymentMethods($use_cache = true) if (!$apiKey) { return []; } - $methods = $this->api_helper->getApiClient($apiKey)->methods->allAvailable($filters_key); - + $methods = $this->api_helper->getApiClient($apiKey)->methods->allAvailable($filters); $methods_cleaned = []; foreach ($methods as $method) { From 6b23cbe64c594e82d957b6f1d200d07ca1afafb7 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 18 Dec 2023 15:35:06 +0100 Subject: [PATCH 21/41] Fix CS and tests --- src/PaymentMethods/Twint.php | 2 +- src/Shared/Data.php | 4 ++-- tests/php/Functional/Payment/PaymentServiceTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PaymentMethods/Twint.php b/src/PaymentMethods/Twint.php index 0d77d320..eeaa9b02 100644 --- a/src/PaymentMethods/Twint.php +++ b/src/PaymentMethods/Twint.php @@ -21,7 +21,7 @@ protected function getConfig(): array ], 'filtersOnBuild' => false, 'confirmationDelayed' => false, - 'SEPA' => false + 'SEPA' => false, ]; } diff --git a/src/Shared/Data.php b/src/Shared/Data.php index 49fdb2d9..9f84082d 100644 --- a/src/Shared/Data.php +++ b/src/Shared/Data.php @@ -199,7 +199,7 @@ public function getPayment($payment_id, $apiKey, $use_cache = true): ?\Mollie\Ap */ public function getAllPaymentMethods($apiKey, $test_mode = false, $use_cache = true) { - if(!$apiKey) { + if (!$apiKey) { $apiKey = $this->getApiKey($test_mode); } $result = $this->getRegularPaymentMethods($apiKey, $test_mode, $use_cache); @@ -693,6 +693,7 @@ public function isSubscription($orderId) public function getAllAvailablePaymentMethods($use_cache = true, $filters = []) { + $apiKey = $this->settingsHelper->getApiKey(); $methods = false; $locale = $this->getPaymentLocale(); @@ -714,7 +715,6 @@ public function getAllAvailablePaymentMethods($use_cache = true, $filters = []) } else { delete_transient($transient_id); } - // No cache exists, call the API and cache the result if ($methods === false) { if (!$apiKey) { diff --git a/tests/php/Functional/Payment/PaymentServiceTest.php b/tests/php/Functional/Payment/PaymentServiceTest.php index 3ef13e93..4aef1f34 100644 --- a/tests/php/Functional/Payment/PaymentServiceTest.php +++ b/tests/php/Functional/Payment/PaymentServiceTest.php @@ -112,7 +112,7 @@ public function processPayment_Order_success(){ expect('get_option') ->with('mollie-payments-for-woocommerce_api_switch') ->andReturn(false); - expect('get_transient')->andReturn(['ideal'=>['id'=>'ideal']]); + expect('get_transient')->andReturn(['ideal'=>['id'=>'ideal', 'status'=>'activated']]); $wcOrder->expects($this->any()) ->method('get_billing_company') ->willReturn(''); From 6d699909a3c712ab8e2ccf04d5c7be09cc175552 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Tue, 19 Dec 2023 11:50:12 +0100 Subject: [PATCH 22/41] Send only issuers on allAvailable call remove unneeded code --- src/Shared/Data.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Shared/Data.php b/src/Shared/Data.php index 9f84082d..6d5296b8 100644 --- a/src/Shared/Data.php +++ b/src/Shared/Data.php @@ -199,9 +199,6 @@ public function getPayment($payment_id, $apiKey, $use_cache = true): ?\Mollie\Ap */ public function getAllPaymentMethods($apiKey, $test_mode = false, $use_cache = true) { - if (!$apiKey) { - $apiKey = $this->getApiKey($test_mode); - } $result = $this->getRegularPaymentMethods($apiKey, $test_mode, $use_cache); if (!is_array($result)) { $result = unserialize($result); @@ -691,23 +688,16 @@ public function isSubscription($orderId) return apply_filters($this->pluginId . '_is_subscription_payment', $isSubscription, $orderId); } - public function getAllAvailablePaymentMethods($use_cache = true, $filters = []) + public function getAllAvailablePaymentMethods($use_cache = true) { $apiKey = $this->settingsHelper->getApiKey(); $methods = false; $locale = $this->getPaymentLocale(); - $test_mode = $this->isTestModeEnabled(); $filters_key = []; $filters_key['locale'] = $locale; - $filters_key['mode'] = ( $test_mode ? 'test' : 'live' ); - $filters_key['api'] = 'methods'; + $filters_key['include'] = 'issuers'; $transient_id = $this->getTransientId(md5(http_build_query($filters_key))); - $filters['include'] = 'issuers'; - $filters['locale'] = $locale; - $keysAllowed = ['amount' => '', 'locale' => '', 'issuers' => '']; - $filters = array_intersect_key($filters, $keysAllowed); - try { if ($use_cache) { // When no cache exists $methods will be `false` @@ -720,7 +710,7 @@ public function getAllAvailablePaymentMethods($use_cache = true, $filters = []) if (!$apiKey) { return []; } - $methods = $this->api_helper->getApiClient($apiKey)->methods->allAvailable($filters); + $methods = $this->api_helper->getApiClient($apiKey)->methods->allAvailable($filters_key); $methods_cleaned = []; foreach ($methods as $method) { From 50702491425f63c30d39210b8981a965cadf07cd Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Tue, 19 Dec 2023 11:58:54 +0100 Subject: [PATCH 23/41] Refactor all to camel case --- src/Shared/Data.php | 179 ++++++++++++++++++++++---------------------- 1 file changed, 89 insertions(+), 90 deletions(-) diff --git a/src/Shared/Data.php b/src/Shared/Data.php index 6d5296b8..387aa711 100644 --- a/src/Shared/Data.php +++ b/src/Shared/Data.php @@ -87,12 +87,12 @@ public function isSubscriptionPluginActive(): bool public function isValidApiKeyProvided() { $settings = $this->settingsHelper; - $api_key = $settings->getApiKey(); + $apiKey = $settings->getApiKey(); - return !empty($api_key) + return !empty($apiKey) && preg_match( '/^(live|test)_\w{30,}$/', - $api_key + $apiKey ); } @@ -172,41 +172,41 @@ public function getTransientId($transient) /** * Get Mollie payment from cache or load from Mollie - * Skip cache by setting $use_cache to false + * Skip cache by setting $useCache to false * - * @param string $payment_id + * @param string $paymentId * @param string $apiKey (default: false) - * @param bool $use_cache (default: true) + * @param bool $useCache (default: true) * * @return \Mollie\Api\Resources\Payment|null */ - public function getPayment($payment_id, $apiKey, $use_cache = true): ?\Mollie\Api\Resources\Payment + public function getPayment($paymentId, $apiKey, $useCache = true): ?\Mollie\Api\Resources\Payment { try { - return $this->api_helper->getApiClient($apiKey)->payments->get($payment_id); + return $this->api_helper->getApiClient($apiKey)->payments->get($paymentId); } catch (\Mollie\Api\Exceptions\ApiException $apiException) { - $this->logger->debug(__FUNCTION__ . sprintf(': Could not load payment %s (', $payment_id) . "): " . $apiException->getMessage() . ' (' . get_class($apiException) . ')'); + $this->logger->debug(__FUNCTION__ . sprintf(': Could not load payment %s (', $paymentId) . "): " . $apiException->getMessage() . ' (' . get_class($apiException) . ')'); } return null; } /** - * @param bool $test_mode - * @param bool $use_cache + * @param bool $testMode + * @param bool $useCache * * @return array|mixed|\Mollie\Api\Resources\Method[]|\Mollie\Api\Resources\MethodCollection */ - public function getAllPaymentMethods($apiKey, $test_mode = false, $use_cache = true) + public function getAllPaymentMethods($apiKey, $testMode = false, $useCache = true) { - $result = $this->getRegularPaymentMethods($apiKey, $test_mode, $use_cache); + $result = $this->getRegularPaymentMethods($apiKey, $testMode, $useCache); if (!is_array($result)) { $result = unserialize($result); } $isSubscriptionPluginActive = $this->isSubscriptionPluginActive(); if ($isSubscriptionPluginActive) { - $result = $this->addRecurringPaymentMethods($apiKey, $test_mode, $use_cache, $result); + $result = $this->addRecurringPaymentMethods($apiKey, $testMode, $useCache, $result); } return $result; @@ -238,13 +238,13 @@ public function wooCommerceFiltersForCheckout(): array return $filters; } /** - * @param $order_total + * @param $orderTotal * @param $currency */ - protected function getAmountValue($order_total, $currency): string + protected function getAmountValue($orderTotal, $currency): string { return $this->formatCurrencyValue( - $order_total, + $orderTotal, $currency ); } @@ -301,22 +301,22 @@ public function getFilters( } /** - * @param bool $test_mode - * @param bool $use_cache + * @param bool $testMode + * @param bool $useCache * * @return array|mixed|\Mollie\Api\Resources\Method[]|\Mollie\Api\Resources\MethodCollection */ - public function getRegularPaymentMethods($apiKey, $test_mode = false, $use_cache = true) + public function getRegularPaymentMethods($apiKey, $testMode = false, $useCache = true) { // Already initialized - if ($use_cache && ! empty(self::$regular_api_methods)) { + if ($useCache && ! empty(self::$regular_api_methods)) { return self::$regular_api_methods; } - $test_mode = $this->isTestModeEnabled(); - $methods = $this->getAllAvailablePaymentMethods($use_cache); + $testMode = $this->isTestModeEnabled(); + $methods = $this->getAllAvailablePaymentMethods($useCache); // We cannot access allActive for all methods so we filter them out here - $filtered_methods = array_filter($methods, function ($method) use ($test_mode) { - if ($test_mode === "live") { + $filtered_methods = array_filter($methods, function ($method) use ($testMode) { + if ($testMode === "live") { return $method['status'] === "activated"; } else { return in_array($method['status'], ["activated", "pending-review"]); @@ -327,32 +327,32 @@ public function getRegularPaymentMethods($apiKey, $test_mode = false, $use_cache return self::$regular_api_methods; } - public function getRecurringPaymentMethods($apiKey, $test_mode = false, $use_cache = true) + public function getRecurringPaymentMethods($apiKey, $testMode = false, $useCache = true) { // Already initialized - if ($use_cache && ! empty(self::$recurring_api_methods)) { + if ($useCache && ! empty(self::$recurring_api_methods)) { return self::$recurring_api_methods; } - self::$recurring_api_methods = $this->getApiPaymentMethods($use_cache, [ 'sequenceType' => 'recurring' ]); + self::$recurring_api_methods = $this->getApiPaymentMethods($useCache, [ 'sequenceType' => 'recurring' ]); return self::$recurring_api_methods; } - public function getApiPaymentMethods($use_cache = true, $filters = []) + public function getApiPaymentMethods($useCache = true, $filters = []) { - $test_mode = $this->isTestModeEnabled(); + $testMode = $this->isTestModeEnabled(); $apiKey = $this->settingsHelper->getApiKey(); $methods = false; $filters_key = $filters; - $filters_key['mode'] = ( $test_mode ? 'test' : 'live' ); + $filters_key['mode'] = ( $testMode ? 'test' : 'live' ); $filters_key['api'] = 'methods'; $transient_id = $this->getTransientId(md5(http_build_query($filters_key))); try { - if ($use_cache) { + if ($useCache) { // When no cache exists $methods will be `false` $methods = get_transient($transient_id); } else { @@ -380,7 +380,7 @@ public function getApiPaymentMethods($use_cache = true, $filters = []) $methods = $methods_cleaned; // Set new transients (as cache) - if ($use_cache) { + if ($useCache) { set_transient($transient_id, $methods, HOUR_IN_SECONDS); } } @@ -391,27 +391,27 @@ public function getApiPaymentMethods($use_cache = true, $filters = []) * Cache the result for a short period * to prevent hammering the API with requests that are likely to fail again */ - if ($use_cache) { + if ($useCache) { set_transient($transient_id, [], 60 * 5); } - $this->logger->debug(__FUNCTION__ . ": Could not load Mollie methods (" . ( $test_mode ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); + $this->logger->debug(__FUNCTION__ . ": Could not load Mollie methods (" . ( $testMode ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); return []; } } /** - * @param bool $test_mode + * @param bool $testMode * @param $method * * @return mixed|\Mollie\Api\Resources\Method|null */ public function getPaymentMethod($method) { - $test_mode = $this->isTestModeEnabled(); + $testMode = $this->isTestModeEnabled(); $apiKey = $this->settingsHelper->getApiKey(); - $payment_methods = $this->getAllPaymentMethods($apiKey, $test_mode); + $payment_methods = $this->getAllPaymentMethods($apiKey, $testMode); foreach ($payment_methods as $payment_method) { if ($payment_method['id'] === $method) { @@ -425,15 +425,15 @@ public function getPaymentMethod($method) /** * Get issuers for payment method (e.g. for iDEAL, KBC/CBC payment button, gift cards) * - * @param bool $test_mode (default: false) + * @param bool $testMode (default: false) * @param string|null $methodId * * @return array */ - public function getMethodIssuers($apiKey, $test_mode = false, $methodId = null) + public function getMethodIssuers($apiKey, $testMode = false, $methodId = null) { try { - $transient_id = $this->getTransientId($methodId . '_issuers_' . ($test_mode ? 'test' : 'live')); + $transient_id = $this->getTransientId($methodId . '_issuers_' . ($testMode ? 'test' : 'live')); // When no cache exists $issuers will be `false` $issuers = get_transient($transient_id); @@ -447,7 +447,7 @@ public function getMethodIssuers($apiKey, $test_mode = false, $methodId = null) set_transient($transient_id, $issuers, HOUR_IN_SECONDS); return $issuers; } catch (\Mollie\Api\Exceptions\ApiException $e) { - $this->logger->debug(__FUNCTION__ . ": Could not load " . $methodId . " issuers (" . ( $test_mode ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); + $this->logger->debug(__FUNCTION__ . ": Could not load " . $methodId . " issuers (" . ( $testMode ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); } return []; @@ -495,21 +495,21 @@ public function getCachedMethodById(string $methodId) } /** - * @param int $user_id - * @param string|null $customer_id + * @param int $userId + * @param string|null $customerId * * @return $this */ - public function setUserMollieCustomerId($user_id, $customer_id) + public function setUserMollieCustomerId($userId, $customerId) { - if (! empty($customer_id)) { + if (! empty($customerId)) { try { - $customer = new WC_Customer($user_id); - $customer->update_meta_data('mollie_customer_id', $customer_id); + $customer = new WC_Customer($userId); + $customer->update_meta_data('mollie_customer_id', $customerId); $customer->save(); - $this->logger->debug(__FUNCTION__ . ": Stored Mollie customer ID " . $customer_id . " with user " . $user_id); + $this->logger->debug(__FUNCTION__ . ": Stored Mollie customer ID " . $customerId . " with user " . $userId); } catch (Exception $exception) { - $this->logger->debug(__FUNCTION__ . ": Couldn't load (and save) WooCommerce customer based on user ID " . $user_id); + $this->logger->debug(__FUNCTION__ . ": Couldn't load (and save) WooCommerce customer based on user ID " . $userId); } } @@ -518,14 +518,14 @@ public function setUserMollieCustomerId($user_id, $customer_id) /** * @param $orderId - * @param $customer_id + * @param $customerId * @return $this */ - public function setUserMollieCustomerIdAtSubscription($orderId, $customer_id) + public function setUserMollieCustomerIdAtSubscription($orderId, $customerId) { - if (!empty($customer_id)) { + if (!empty($customerId)) { $order = wc_get_order($orderId); - $order->update_meta_data('_mollie_customer_id', $customer_id); + $order->update_meta_data('_mollie_customer_id', $customerId); $order->save(); } @@ -533,53 +533,53 @@ public function setUserMollieCustomerIdAtSubscription($orderId, $customer_id) } /** - * @param int $user_id - * @param bool $test_mode + * @param int $userId + * @param bool $testMode * @return null|string */ - public function getUserMollieCustomerId($user_id, $apiKey) + public function getUserMollieCustomerId($userId, $apiKey) { // Guest users can't buy subscriptions and don't need a Mollie customer ID // https://github.com/mollie/WooCommerce/issues/132 - if (empty($user_id)) { + if (empty($userId)) { return null; } $isTestModeEnabled = $this->isTestModeEnabled(); - $customer = new WC_Customer($user_id); - $customer_id = $customer->get_meta('mollie_customer_id'); + $customer = new WC_Customer($userId); + $customerId = $customer->get_meta('mollie_customer_id'); // If there is no Mollie Customer ID set, check the most recent active subscription - if (empty($customer_id)) { + if (empty($customerId)) { $customer_latest_subscription = wc_get_orders([ 'limit' => 1, - 'customer' => $user_id, + 'customer' => $userId, 'type' => 'shop_subscription', 'status' => 'wc-active', ]); if (! empty($customer_latest_subscription)) { - $customer_id = get_post_meta($customer_latest_subscription[0]->get_id(), '_mollie_customer_id', $single = true); + $customerId = get_post_meta($customer_latest_subscription[0]->get_id(), '_mollie_customer_id', $single = true); // Store this customer ID as user meta too - $this->setUserMollieCustomerId($user_id, $customer_id); + $this->setUserMollieCustomerId($userId, $customerId); } } // If there is a Mollie Customer ID set, check that customer ID is valid for this API key - if (! empty($customer_id)) { + if (! empty($customerId)) { try { - $this->api_helper->getApiClient($apiKey)->customers->get($customer_id); + $this->api_helper->getApiClient($apiKey)->customers->get($customerId); } catch (\Mollie\Api\Exceptions\ApiException $e) { - $this->logger->debug(__FUNCTION__ . sprintf(': Mollie Customer ID (%s) not valid for user %s on this API key, try to create a new one (', $customer_id, $user_id) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); - $customer_id = ''; + $this->logger->debug(__FUNCTION__ . sprintf(': Mollie Customer ID (%s) not valid for user %s on this API key, try to create a new one (', $customerId, $userId) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); + $customerId = ''; } } // If there is no Mollie Customer ID set, try to create a new Mollie Customer - if (empty($customer_id)) { + if (empty($customerId)) { try { - $userdata = get_userdata($user_id); + $userdata = get_userdata($userId); // Get the best name for use as Mollie Customer name $user_full_name = $userdata->first_name . ' ' . $userdata->last_name; @@ -592,35 +592,35 @@ public function getUserMollieCustomerId($user_id, $apiKey) $customer = $this->api_helper->getApiClient($apiKey)->customers->create([ 'name' => trim($user_full_name), 'email' => trim($userdata->user_email), - 'metadata' => [ 'user_id' => $user_id ], + 'metadata' => [ 'user_id' => $userId ], ]); - $this->setUserMollieCustomerId($user_id, $customer->id); + $this->setUserMollieCustomerId($userId, $customer->id); - $customer_id = $customer->id; + $customerId = $customer->id; - $this->logger->debug(__FUNCTION__ . sprintf(': Created a Mollie Customer (%s) for WordPress user with ID %s (', $customer_id, $user_id) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); + $this->logger->debug(__FUNCTION__ . sprintf(': Created a Mollie Customer (%s) for WordPress user with ID %s (', $customerId, $userId) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); - return $customer_id; + return $customerId; } catch (\Mollie\Api\Exceptions\ApiException $e) { - $this->logger->debug(__FUNCTION__ . sprintf(': Could not create Mollie Customer for WordPress user with ID %s (', $user_id) . ( $isTestModeEnabled ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); + $this->logger->debug(__FUNCTION__ . sprintf(': Could not create Mollie Customer for WordPress user with ID %s (', $userId) . ( $isTestModeEnabled ? 'test' : 'live' ) . "): " . $e->getMessage() . ' (' . get_class($e) . ')'); } } else { - $this->logger->debug(__FUNCTION__ . sprintf(': Mollie Customer ID (%s) found and valid for user %s on this API key. (', $customer_id, $user_id) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); + $this->logger->debug(__FUNCTION__ . sprintf(': Mollie Customer ID (%s) found and valid for user %s on this API key. (', $customerId, $userId) . ( $isTestModeEnabled ? 'test' : 'live' ) . ")."); } - return $customer_id; + return $customerId; } /** * Get active Mollie payment mode for order * - * @param int $order_id + * @param int $orderId * @return string test or live */ - public function getActiveMolliePaymentMode($order_id) + public function getActiveMolliePaymentMode($orderId) { - $order = wc_get_order($order_id); + $order = wc_get_order($orderId); return $order->get_meta('_mollie_payment_mode', true); } @@ -688,9 +688,8 @@ public function isSubscription($orderId) return apply_filters($this->pluginId . '_is_subscription_payment', $isSubscription, $orderId); } - public function getAllAvailablePaymentMethods($use_cache = true) + public function getAllAvailablePaymentMethods($useCache = true) { - $apiKey = $this->settingsHelper->getApiKey(); $methods = false; $locale = $this->getPaymentLocale(); @@ -699,7 +698,7 @@ public function getAllAvailablePaymentMethods($use_cache = true) $filters_key['include'] = 'issuers'; $transient_id = $this->getTransientId(md5(http_build_query($filters_key))); try { - if ($use_cache) { + if ($useCache) { // When no cache exists $methods will be `false` $methods = get_transient($transient_id); } else { @@ -722,7 +721,7 @@ public function getAllAvailablePaymentMethods($use_cache = true) $methods = $methods_cleaned; // Set new transients (as cache) - if ($use_cache) { + if ($useCache) { set_transient($transient_id, $methods, HOUR_IN_SECONDS); } } @@ -733,7 +732,7 @@ public function getAllAvailablePaymentMethods($use_cache = true) * Cache the result for a short period * to prevent hammering the API with requests that are likely to fail again */ - if ($use_cache) { + if ($useCache) { set_transient($transient_id, [], 60 * 5); } $this->logger->debug(__FUNCTION__ . ": Could not load Mollie all available methods"); @@ -744,14 +743,14 @@ public function getAllAvailablePaymentMethods($use_cache = true) /** * @param $apiKey - * @param bool $test_mode - * @param bool $use_cache + * @param bool $testMode + * @param bool $useCache * @param $result * @return mixed */ - protected function addRecurringPaymentMethods($apiKey, bool $test_mode, bool $use_cache, $result) + protected function addRecurringPaymentMethods($apiKey, bool $testMode, bool $useCache, $result) { - $recurringPaymentMethods = $this->getRecurringPaymentMethods($apiKey, $test_mode, $use_cache); + $recurringPaymentMethods = $this->getRecurringPaymentMethods($apiKey, $testMode, $useCache); if (!is_array($recurringPaymentMethods)) { $recurringPaymentMethods = unserialize($recurringPaymentMethods); } From 6677c4952241550b587d8a7c99c7986085027383 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Wed, 20 Dec 2023 07:41:20 +0100 Subject: [PATCH 24/41] Change strings void into cancel --- src/MerchantCapture/Capture/Action/VoidPayment.php | 2 +- src/MerchantCapture/MollieCaptureSettings.php | 6 +++--- src/MerchantCapture/UI/StatusRenderer.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MerchantCapture/Capture/Action/VoidPayment.php b/src/MerchantCapture/Capture/Action/VoidPayment.php index 0ef1d152..1b19a464 100644 --- a/src/MerchantCapture/Capture/Action/VoidPayment.php +++ b/src/MerchantCapture/Capture/Action/VoidPayment.php @@ -25,7 +25,7 @@ public function __invoke() $this->logger->error($exception->getMessage()); $this->order->add_order_note( __( - 'Payment Void Failed. We encountered an issue while canceling the pre-authorized payment.', + 'Payment cancelation failed. We encountered an issue while canceling the pre-authorized payment.', 'mollie-payments-for-woocommerce' ) ); diff --git a/src/MerchantCapture/MollieCaptureSettings.php b/src/MerchantCapture/MollieCaptureSettings.php index f263c1b4..cf5b9a9a 100644 --- a/src/MerchantCapture/MollieCaptureSettings.php +++ b/src/MerchantCapture/MollieCaptureSettings.php @@ -26,7 +26,7 @@ public function settings(array $advancedSettings, string $pluginName): array 'default' => 'immediate_capture', 'desc' => sprintf( __( - 'Authorized payment can be captured or voided by changing the order status instead of doing it manually.', + 'Authorized payment can be captured or canceled by changing the order status instead of doing it manually.', 'mollie-payments-for-woocommerce' ) ), @@ -34,13 +34,13 @@ public function settings(array $advancedSettings, string $pluginName): array [ 'id' => $pluginName . '_capture_or_void', 'title' => __( - 'Capture or void on status change', + 'Capture or cancel on status change', 'mollie-payments-for-woocommerce' ), 'type' => 'checkbox', 'default' => 'no', 'desc' => __( - 'Capture authorized payments automatically when setting the order status to Processing or Completed. Void the payment by setting the order status Canceled.', + 'Capture authorized payments automatically when setting the order status to Processing or Completed. Cancel the payment by setting the order status Canceled.', 'mollie-payments-for-woocommerce' ), ], diff --git a/src/MerchantCapture/UI/StatusRenderer.php b/src/MerchantCapture/UI/StatusRenderer.php index b23f9a63..5da2f856 100644 --- a/src/MerchantCapture/UI/StatusRenderer.php +++ b/src/MerchantCapture/UI/StatusRenderer.php @@ -18,7 +18,7 @@ public function __invoke(string $molliePaymentStatus) ); } elseif ($molliePaymentStatus === ManualCaptureStatus::STATUS_VOIDED) { (new StatusButton())( - __('Payment voided', 'mollie-payments-for-woocommerce'), + __('Payment canceled', 'mollie-payments-for-woocommerce'), SharedDataDictionary::STATUS_CANCELLED ); } elseif ($molliePaymentStatus === ManualCaptureStatus::STATUS_CAPTURED) { From 65ce9919f11e686bae2b013b6642916dbc0c04de Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jan 2024 09:46:09 +0100 Subject: [PATCH 25/41] Fix compiler assets error webpack --- package.json | 6 +- webpack.config.js | 7 +- yarn.lock | 477 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 475 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index e6284e26..0e9376c6 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,13 @@ "pump": "^3.0.0", "sass": "^1.52.1", "sass-loader": "^7.0.1", - "wp-pot": "^1.10.2" + "webpack-cli": "^5.1.4", + "wp-pot": "^1.10.2", + "webpack": "^5.89.0" }, "scripts": { "watch": "webpack --watch", - "build": "node_modules/.bin/encore dev --env.basePath=.", + "build": "BASE_PATH=. node_modules/.bin/encore dev", "setup": "gulp setup", "e2e-activation": "npx playwright test --project=activation", "e2e-simple": "npx playwright test --project=simple-classic", diff --git a/webpack.config.js b/webpack.config.js index becfe49d..dbd911a6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -55,9 +55,10 @@ function configCss ({ basePath }) function config (env) { - const config = [ - configJavaScript(env), - configCss(env) + const basePath = process.env.BASE_PATH || '.'; + const config = [ + configJavaScript({basePath}), + configCss({basePath}) ] return [...config] diff --git a/yarn.lock b/yarn.lock index 71a02cc6..a0147a08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1107,6 +1107,11 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -1166,7 +1171,7 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jridgewell/trace-mapping@^0.3.18": +"@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20": version "0.3.20" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== @@ -1287,6 +1292,27 @@ dependencies: "@types/node" "*" +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.56.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.1.tgz#988cabb39c973e9200f35fdbb29d17992965bb08" + integrity sha512-18PLWRzhy9glDQp3+wOgfLYRWlhgX0azxgJ63rdpoUHyrC9z0f5CkFburjQx4uD7ZCruw85ZtMt6K+L+R8fLJQ== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": version "4.17.41" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz#5077defa630c2e8d28aa9ffc2c01c157c305bef6" @@ -1346,7 +1372,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -1476,6 +1502,142 @@ dependencies: "@types/yargs-parser" "*" +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-opt" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/wast-printer" "1.11.6" + +"@webassemblyjs/wasm-gen@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + "@woocommerce/dependency-extraction-webpack-plugin@^1.7.0": version "1.7.0" resolved "https://registry.npmjs.org/@woocommerce/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-1.7.0.tgz" @@ -1619,6 +1781,16 @@ is-promise "^4.0.0" rungen "^0.3.2" +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" @@ -1627,11 +1799,21 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn@^8.7.1: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + acorn@^8.8.2: version "8.11.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" @@ -2099,6 +2281,16 @@ browserslist@^4.0.0, browserslist@^4.21.10, browserslist@^4.21.9: node-releases "^2.0.13" update-browserslist-db "^1.0.11" +browserslist@^4.14.5: + version "4.22.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" + integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== + dependencies: + caniuse-lite "^1.0.30001565" + electron-to-chromium "^1.4.601" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + browserslist@^4.21.4, browserslist@^4.22.1: version "4.22.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" @@ -2195,6 +2387,11 @@ caniuse-lite@^1.0.30001541: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz#9d16c5fd7e9c592c4cd5e304bc0f75b0008b2759" integrity sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng== +caniuse-lite@^1.0.30001565: + version "1.0.30001576" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4" + integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz" @@ -2284,6 +2481,11 @@ chokidar@^2.0.0: optionalDependencies: fsevents "^1.2.7" +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + ci-info@^3.2.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" @@ -2413,11 +2615,16 @@ colord@^2.9.1: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== -colorette@^2.0.10: +colorette@^2.0.10, colorette@^2.0.14: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" @@ -2975,6 +3182,11 @@ electron-to-chromium@^1.4.535: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.585.tgz#7b3cb6846bb5cc10a8d5904c351a9b8aaa76ea90" integrity sha512-B4yBlX0azdA3rVMxpYwLQfDpdwOgcnLCkpvSOd68iFmeedo+WYjaBJS3/W58LVD8CB2nf+o7C4K9xz1l09RkWg== +electron-to-chromium@^1.4.601: + version "1.4.623" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.623.tgz#0f7400114ac3425500e9244d2b0e9c3107c331cb" + integrity sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3004,6 +3216,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^5.15.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + entities@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" @@ -3014,6 +3234,11 @@ entities@^4.2.0: resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +envinfo@^7.7.3: + version "7.11.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" + integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== + equivalent-key-map@^0.2.2: version "0.2.2" resolved "https://registry.npmjs.org/equivalent-key-map/-/equivalent-key-map-0.2.2.tgz" @@ -3033,6 +3258,11 @@ error-stack-parser@^2.0.0: dependencies: stackframe "^1.3.4" +es-module-lexer@^1.2.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5" + integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w== + es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: version "0.10.62" resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz" @@ -3094,6 +3324,14 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-visitor-keys@^3.4.1: version "3.4.3" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" @@ -3108,6 +3346,23 @@ espree@^9.3.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" @@ -3123,6 +3378,11 @@ eventemitter3@^4.0.0: resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3275,7 +3535,7 @@ fast-levenshtein@^3.0.0: dependencies: fastest-levenshtein "^1.0.7" -fastest-levenshtein@^1.0.7: +fastest-levenshtein@^1.0.12, fastest-levenshtein@^1.0.7: version "1.0.16" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== @@ -3345,6 +3605,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" @@ -3389,6 +3657,11 @@ flagged-respawn@^1.0.0: resolved "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz" integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz" @@ -3546,6 +3819,11 @@ glob-stream@^6.1.0: to-absolute-glob "^2.0.0" unique-stream "^2.0.2" +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + glob-watcher@^5.0.3: version "5.0.5" resolved "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz" @@ -3621,7 +3899,7 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3893,6 +4171,14 @@ immutable@^4.0.0: resolved "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz" integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" @@ -3921,6 +4207,11 @@ interpret@^1.4.0: resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" @@ -4265,6 +4556,11 @@ jsesc@~0.5.0: resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -4398,6 +4694,11 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + loader-utils@^1.0.1: version "1.4.2" resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz" @@ -4424,6 +4725,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + locate-path@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" @@ -4590,7 +4898,7 @@ mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -4704,7 +5012,7 @@ negotiator@0.6.3: resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.5.0: +neo-async@^2.5.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -4732,6 +5040,11 @@ node-releases@^2.0.13: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" @@ -4908,7 +5221,7 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -p-limit@^2.0.0: +p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -4929,6 +5242,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-locate@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" @@ -5036,6 +5356,11 @@ path-exists@^3.0.0: resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-exists@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" @@ -5134,6 +5459,13 @@ pinkie@^2.0.0: resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + pkg-dir@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-7.0.0.tgz#8f0c08d6df4476756c5ff29b3282d0bab7517d11" @@ -5588,6 +5920,13 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + redux@^4.1.2: version "4.2.1" resolved "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz" @@ -5738,6 +6077,13 @@ requires-port@^1.0.0: resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz" @@ -5746,6 +6092,11 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: expand-tilde "^2.0.0" global-modules "^1.0.0" +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + resolve-options@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz" @@ -5778,6 +6129,15 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.4.0 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + ret@~0.1.10: version "0.1.15" resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" @@ -5857,7 +6217,7 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@^3.1.1: +schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -6363,7 +6723,7 @@ tannin@^1.2.0: dependencies: "@tannin/plural-forms" "^1.1.0" -tapable@^2.2.1: +tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== @@ -6379,6 +6739,17 @@ terser-webpack-plugin@^5.3.0: serialize-javascript "^6.0.1" terser "^5.16.8" +terser-webpack-plugin@^5.3.7: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + terser@^5.16.8: version "5.24.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.24.0.tgz#4ae50302977bca4831ccc7b4fef63a3c04228364" @@ -6389,6 +6760,16 @@ terser@^5.16.8: commander "^2.20.0" source-map-support "~0.5.20" +terser@^5.26.0: + version "5.26.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.26.0.tgz#ee9f05d929f4189a9c28a0feb889d96d50126fe1" + integrity sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + through2-filter@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz" @@ -6752,6 +7133,14 @@ vinyl@^2.0.0, vinyl@^2.1.0: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" @@ -6759,6 +7148,25 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" +webpack-cli@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + webpack-dev-middleware@^5.3.1: version "5.3.3" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" @@ -6806,6 +7214,15 @@ webpack-dev-server@^4.8.0: webpack-dev-middleware "^5.3.1" ws "^8.13.0" +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + webpack-sources@^1.3.0: version "1.4.3" resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz" @@ -6814,6 +7231,41 @@ webpack-sources@^1.3.0: source-list-map "^2.0.0" source-map "~0.6.1" +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@^5.89.0: + version "5.89.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc" + integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.15.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.7" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" @@ -6847,6 +7299,11 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + wp-pot@^1.10.2: version "1.10.2" resolved "https://registry.npmjs.org/wp-pot/-/wp-pot-1.10.2.tgz" From 20c02242760edf63dc96ac91e51672429a16dc55 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jan 2024 09:46:32 +0100 Subject: [PATCH 26/41] Point to dev action for release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50a67093..c6db1c4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: required: true jobs: create_archive: - uses: inpsyde/reusable-workflows/.github/workflows/build-plugin-archive.yml@main + uses: inpsyde/reusable-workflows/.github/workflows/build-plugin-archive.yml@task/build-plugin-archive-without-dep-dependencies with: PLUGIN_VERSION: ${{ inputs.PACKAGE_VERSION }} PHP_VERSION: 7.2 From 2993ae9b24ea87f93d3326540f4fb43a8557331a Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jan 2024 10:14:34 +0100 Subject: [PATCH 27/41] Update distignore with node_modules --- .distignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.distignore b/.distignore index 489cb6e6..6ad7e75f 100644 --- a/.distignore +++ b/.distignore @@ -16,5 +16,8 @@ patchwork.json *.config.* *.md gulpfile.js +webpack.config.js +readme.md changelog.txt psalm.xml +node_modules/ From 5958f7ba77304e127ae777ed3201984fb06a2a1a Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jan 2024 10:18:42 +0100 Subject: [PATCH 28/41] Update distignore with . files --- .distignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.distignore b/.distignore index 6ad7e75f..d3561e7f 100644 --- a/.distignore +++ b/.distignore @@ -21,3 +21,9 @@ readme.md changelog.txt psalm.xml node_modules/ +.babelrc +.composer_compiled_assets +.editorconfig +.env.examples +.idea/ +.psalm/ From 3b9fdf904583110be3fff027cd05a6ced019449d Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 8 Jan 2024 10:23:16 +0100 Subject: [PATCH 29/41] Fix typo in distignore --- .distignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.distignore b/.distignore index d3561e7f..8c5cb745 100644 --- a/.distignore +++ b/.distignore @@ -24,6 +24,6 @@ node_modules/ .babelrc .composer_compiled_assets .editorconfig -.env.examples +.env.example .idea/ .psalm/ From 158b1452d248cd802a1e95a8118c28589e84d284 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Thu, 11 Jan 2024 06:42:00 +0100 Subject: [PATCH 30/41] Add birthdate check on the pay for order page for in3 payment method --- src/Gateway/GatewayModule.php | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/Gateway/GatewayModule.php b/src/Gateway/GatewayModule.php index 9d997e07..f564543e 100644 --- a/src/Gateway/GatewayModule.php +++ b/src/Gateway/GatewayModule.php @@ -6,6 +6,7 @@ namespace Mollie\WooCommerce\Gateway; +use Automattic\WooCommerce\Admin\Overrides\Order; use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController; use Mollie\WooCommerce\Vendor\Inpsyde\Modularity\Module\ExecutableModule; use Mollie\WooCommerce\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait; @@ -58,6 +59,8 @@ class GatewayModule implements ServiceModule, ExecutableModule */ protected $pluginId; + const FIELD_IN3_BIRTHDATE = 'billing_birthdate'; + public function services(): array { return [ @@ -255,6 +258,11 @@ static function () { 11, 2 ); + add_action( + 'woocommerce_before_pay_action', + [$this, 'in3FieldsMandatoryPayForOrder'], + 11 + ); } // Set order to paid and processed when eventually completed without Mollie add_action('woocommerce_payment_complete', [$this, 'setOrderPaidByOtherGateway'], 10, 1); @@ -622,12 +630,32 @@ public function in3FieldsMandatory($fields, $errors) { $gatewayName = "mollie_wc_gateway_in3"; $phoneField = 'billing_phone'; - $birthdateField = 'billing_birthdate'; + $birthdateField = self::FIELD_IN3_BIRTHDATE; $paymentMethodName = 'in3'; $fields = $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $phoneField, $errors, $paymentMethodName); return $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $birthdateField, $errors, $paymentMethodName); } + /** + * @param Order $order + */ + public function in3FieldsMandatoryPayForOrder(Order $order) + { + $birthdateValue = filter_input(INPUT_POST, self::FIELD_IN3_BIRTHDATE, FILTER_SANITIZE_SPECIAL_CHARS) ?? false; + if (!$birthdateValue) { + wc_add_notice( + sprintf( + __( + 'Error processing %1$s payment, the birthdate field is required.', + 'mollie-payments-for-woocommerce' + ), + $order->get_payment_method_title() + ), + 'error' + ); + } + } + /** * @param string $id * @param IconFactory $iconFactory From 9ff37e4f98517f937f2e4fdf19d30dc953601ae6 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Thu, 11 Jan 2024 06:53:25 +0100 Subject: [PATCH 31/41] Prevent birth field check for other payment methods --- src/Gateway/GatewayModule.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Gateway/GatewayModule.php b/src/Gateway/GatewayModule.php index f564543e..feff1e63 100644 --- a/src/Gateway/GatewayModule.php +++ b/src/Gateway/GatewayModule.php @@ -60,6 +60,7 @@ class GatewayModule implements ServiceModule, ExecutableModule protected $pluginId; const FIELD_IN3_BIRTHDATE = 'billing_birthdate'; + const GATEWAY_NAME_IN3 = "mollie_wc_gateway_in3"; public function services(): array { @@ -641,15 +642,18 @@ public function in3FieldsMandatory($fields, $errors) */ public function in3FieldsMandatoryPayForOrder(Order $order) { + $paymentMethod = filter_input(INPUT_POST, 'payment_method', FILTER_SANITIZE_SPECIAL_CHARS) ?? false; + + if ($paymentMethod !== self::GATEWAY_NAME_IN3) { + return; + } + $birthdateValue = filter_input(INPUT_POST, self::FIELD_IN3_BIRTHDATE, FILTER_SANITIZE_SPECIAL_CHARS) ?? false; if (!$birthdateValue) { wc_add_notice( - sprintf( - __( - 'Error processing %1$s payment, the birthdate field is required.', - 'mollie-payments-for-woocommerce' - ), - $order->get_payment_method_title() + __( + 'Error processing the payment, the birthdate field is required.', + 'mollie-payments-for-woocommerce' ), 'error' ); From 9b74dc758732e75d54e7dc5f7304914457ee64c7 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Thu, 11 Jan 2024 07:58:25 +0100 Subject: [PATCH 32/41] Unify error messages for required fields --- src/Gateway/GatewayModule.php | 44 ++++++++++++----------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/src/Gateway/GatewayModule.php b/src/Gateway/GatewayModule.php index feff1e63..e0a9bdb3 100644 --- a/src/Gateway/GatewayModule.php +++ b/src/Gateway/GatewayModule.php @@ -623,8 +623,8 @@ public function BillieFieldsMandatory($fields, $errors) { $gatewayName = "mollie_wc_gateway_billie"; $field = 'billing_company'; - $paymentMethodName = 'Billie'; - return $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $field, $errors, $paymentMethodName); + $companyLabel = __('Company', 'mollie-payments-for-woocommerce'); + return $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $field, $companyLabel, $errors); } public function in3FieldsMandatory($fields, $errors) @@ -632,9 +632,10 @@ public function in3FieldsMandatory($fields, $errors) $gatewayName = "mollie_wc_gateway_in3"; $phoneField = 'billing_phone'; $birthdateField = self::FIELD_IN3_BIRTHDATE; - $paymentMethodName = 'in3'; - $fields = $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $phoneField, $errors, $paymentMethodName); - return $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $birthdateField, $errors, $paymentMethodName); + $phoneLabel = __('Phone', 'mollie-payments-for-woocommerce'); + $birthDateLabel = __('Birthdate', 'mollie-payments-for-woocommerce'); + $fields = $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $phoneField, $phoneLabel, $errors); + return $this->addPaymentMethodMandatoryFields($fields, $gatewayName, $birthdateField, $birthDateLabel, $errors); } /** @@ -649,11 +650,13 @@ public function in3FieldsMandatoryPayForOrder(Order $order) } $birthdateValue = filter_input(INPUT_POST, self::FIELD_IN3_BIRTHDATE, FILTER_SANITIZE_SPECIAL_CHARS) ?? false; + $birthDateLabel = __('Birthdate', 'mollie-payments-for-woocommerce'); + if (!$birthdateValue) { wc_add_notice( - __( - 'Error processing the payment, the birthdate field is required.', - 'mollie-payments-for-woocommerce' + sprintf( + __('%s is a required field.', 'woocommerce'), + "$birthDateLabel" ), 'error' ); @@ -696,10 +699,9 @@ public function buildPaymentMethod( * @param string $gatewayName * @param string $field * @param $errors - * @param string $paymentMethodName * @return mixed */ - public function addPaymentMethodMandatoryFields($fields, string $gatewayName, string $field, $errors, string $paymentMethodName) + public function addPaymentMethodMandatoryFields($fields, string $gatewayName, string $field, string $fieldLabel, $errors) { if ($fields['payment_method'] !== $gatewayName) { return $fields; @@ -712,29 +714,13 @@ public function addPaymentMethodMandatoryFields($fields, string $gatewayName, st $errors->add( 'validation', sprintf( - __( - 'Error processing %1$s payment, the %2$s field is required.', - 'mollie-payments-for-woocommerce' - ), - $paymentMethodName, - $field + __('%s is a required field.', 'woocommerce'), + "$fieldLabel" ) ); } } - if ($fields[$field] === '') { - $errors->add( - 'validation', - sprintf( - __( - 'Please enter your %1$s, this is required for %2$s payments', - 'mollie-payments-for-woocommerce' - ), - $field, - $paymentMethodName - ) - ); - } + return $fields; } } From 2c54aaff3c36a8f773b828d2c294f9964fdf51b5 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 11 Jan 2024 13:23:03 +0100 Subject: [PATCH 33/41] Fix CS --- src/Payment/MollieOrderService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Payment/MollieOrderService.php b/src/Payment/MollieOrderService.php index 0c1b40c5..b336ef56 100644 --- a/src/Payment/MollieOrderService.php +++ b/src/Payment/MollieOrderService.php @@ -154,8 +154,8 @@ public function onWebhookAction() $order->get_status() === 'processing' && method_exists($payment, 'isCompleted') && $payment->isCompleted() - && method_exists($payment_object, 'onWebhookCompleted' - )) { + && method_exists($payment_object, 'onWebhookCompleted') + ) { $payment_object->onWebhookCompleted($order, $payment, $payment_method_title); } return; From 4799db343b10297c26267e4197a6362eaf1a1d18 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 18 Jan 2024 09:48:51 +0100 Subject: [PATCH 34/41] Add Blik payment method --- public/images/blik.svg | 1 + src/PaymentMethods/Blik.php | 32 +++++++++++++++++++++++++++++ src/Shared/SharedDataDictionary.php | 1 + 3 files changed, 34 insertions(+) create mode 100644 public/images/blik.svg create mode 100644 src/PaymentMethods/Blik.php diff --git a/public/images/blik.svg b/public/images/blik.svg new file mode 100644 index 00000000..1a9dd87b --- /dev/null +++ b/public/images/blik.svg @@ -0,0 +1 @@ + diff --git a/src/PaymentMethods/Blik.php b/src/PaymentMethods/Blik.php new file mode 100644 index 00000000..83e05ef2 --- /dev/null +++ b/src/PaymentMethods/Blik.php @@ -0,0 +1,32 @@ + 'blik', + 'defaultTitle' => __('BLIK', 'mollie-payments-for-woocommerce'), + 'settingsDescription' => '', + 'defaultDescription' => '', + 'paymentFields' => false, + 'instructions' => false, + 'supports' => [ + 'products', + 'refunds', + ], + 'filtersOnBuild' => false, + 'confirmationDelayed' => false, + 'SEPA' => false, + ]; + } + + public function getFormFields($generalFormFields): array + { + return $generalFormFields; + } +} diff --git a/src/Shared/SharedDataDictionary.php b/src/Shared/SharedDataDictionary.php index 892519b3..eb722439 100644 --- a/src/Shared/SharedDataDictionary.php +++ b/src/Shared/SharedDataDictionary.php @@ -31,6 +31,7 @@ class SharedDataDictionary 'Mollie_WC_Gateway_Paysafecard', 'Mollie_WC_Gateway_Voucher', 'Mollie_WC_Gateway_Directdebit', + 'Mollie_WC_Gateway_Blik', 'Mollie_WC_Gateway_Twint', ]; From 1839e2ba8274739d72381cbca2a50dcbc23fffc0 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 18 Jan 2024 14:03:55 +0100 Subject: [PATCH 35/41] Fix CS --- src/MerchantCapture/MerchantCaptureModule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MerchantCapture/MerchantCaptureModule.php b/src/MerchantCapture/MerchantCaptureModule.php index 9037ad95..477f7153 100644 --- a/src/MerchantCapture/MerchantCaptureModule.php +++ b/src/MerchantCapture/MerchantCaptureModule.php @@ -164,8 +164,8 @@ static function (Payment $payment, WC_Order $order) use ($container) { $order->save(); } }, - 10, - 2 + 10, + 2 ); add_action('woocommerce_order_refunded', static function (int $orderId) use ($container) { From 8acc682354ec60774003c010ac88664aa3712ea1 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 25 Jan 2024 10:32:13 +0100 Subject: [PATCH 36/41] Enable merchant capture by default PIWOO-369 --- src/MerchantCapture/MerchantCaptureModule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MerchantCapture/MerchantCaptureModule.php b/src/MerchantCapture/MerchantCaptureModule.php index 697a457f..a3177f88 100644 --- a/src/MerchantCapture/MerchantCaptureModule.php +++ b/src/MerchantCapture/MerchantCaptureModule.php @@ -147,7 +147,7 @@ public function run(ContainerInterface $container): bool add_action('init', static function () use ($container) { $pluginId = $container->get('shared.plugin_id'); $captureSettings = new MollieCaptureSettings(); - if (!apply_filters('mollie_wc_gateway_enable_merchant_capture_module', false)) { + if (!apply_filters('mollie_wc_gateway_enable_merchant_capture_module', true)) { return; } From f5c8c04a0e5e55146ce2d9946e50ece03ea50f15 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 25 Jan 2024 10:47:05 +0100 Subject: [PATCH 37/41] Enable klarna one by default PIWOO-370 --- src/Gateway/GatewayModule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gateway/GatewayModule.php b/src/Gateway/GatewayModule.php index e0a9bdb3..d73dfb51 100644 --- a/src/Gateway/GatewayModule.php +++ b/src/Gateway/GatewayModule.php @@ -105,7 +105,7 @@ public function services(): array }, 'gateway.getKlarnaPaymentMethodsAfterFeatureFlag' => static function (ContainerInterface $container): array { $availablePaymentMethods = $container->get('gateway.listAllMethodsAvailable'); - $klarnaOneFlag = apply_filters('inpsyde.feature-flags.mollie-woocommerce.klarna_one_enabled', getenv('MOL_KLARNA_ENABLED') === '1'); + $klarnaOneFlag = apply_filters('inpsyde.feature-flags.mollie-woocommerce.klarna_one_enabled', true); if (!$klarnaOneFlag) { return array_filter($availablePaymentMethods, static function ($method) { return $method['id'] !== Constants::KLARNA; From a0d391aea0b228acfaa9dd5e398a3bc62ed26516 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 25 Jan 2024 10:50:47 +0100 Subject: [PATCH 38/41] Change version number --- mollie-payments-for-woocommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mollie-payments-for-woocommerce.php b/mollie-payments-for-woocommerce.php index 7fc6a19d..94440546 100644 --- a/mollie-payments-for-woocommerce.php +++ b/mollie-payments-for-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Mollie Payments for WooCommerce * Plugin URI: https://www.mollie.com * Description: Accept payments in WooCommerce with the official Mollie plugin - * Version: 7.4.1 + * Version: 7.4.2-beta1 * Author: Mollie * Author URI: https://www.mollie.com * Requires at least: 5.0 From 14ce7836c8491711490c1f9f314ff32827f793d6 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 29 Jan 2024 14:46:56 +0100 Subject: [PATCH 39/41] Update version number --- mollie-payments-for-woocommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mollie-payments-for-woocommerce.php b/mollie-payments-for-woocommerce.php index 94440546..e5805eff 100644 --- a/mollie-payments-for-woocommerce.php +++ b/mollie-payments-for-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Mollie Payments for WooCommerce * Plugin URI: https://www.mollie.com * Description: Accept payments in WooCommerce with the official Mollie plugin - * Version: 7.4.2-beta1 + * Version: 7.5.0-beta1 * Author: Mollie * Author URI: https://www.mollie.com * Requires at least: 5.0 From 5cfd57a1d3ebe98125eaba18144f7c03891743ec Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 5 Feb 2024 11:45:16 +0100 Subject: [PATCH 40/41] Update version number 7.5.0 --- mollie-payments-for-woocommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mollie-payments-for-woocommerce.php b/mollie-payments-for-woocommerce.php index e5805eff..39c05ee0 100644 --- a/mollie-payments-for-woocommerce.php +++ b/mollie-payments-for-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Mollie Payments for WooCommerce * Plugin URI: https://www.mollie.com * Description: Accept payments in WooCommerce with the official Mollie plugin - * Version: 7.5.0-beta1 + * Version: 7.5.0 * Author: Mollie * Author URI: https://www.mollie.com * Requires at least: 5.0 From d64c1d7b0459c69134f00212a4f63ed8f58b545b Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 5 Feb 2024 11:52:46 +0100 Subject: [PATCH 41/41] Update wp, wc compat --- mollie-payments-for-woocommerce.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mollie-payments-for-woocommerce.php b/mollie-payments-for-woocommerce.php index 39c05ee0..508cd813 100644 --- a/mollie-payments-for-woocommerce.php +++ b/mollie-payments-for-woocommerce.php @@ -7,12 +7,12 @@ * Author: Mollie * Author URI: https://www.mollie.com * Requires at least: 5.0 - * Tested up to: 6.3 + * Tested up to: 6.4 * Text Domain: mollie-payments-for-woocommerce * Domain Path: /languages * License: GPLv2 or later * WC requires at least: 3.9 - * WC tested up to: 8.2 + * WC tested up to: 8.5 * Requires PHP: 7.2 */ declare(strict_types=1);