diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..7970828 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @BitBagCommerce diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b913474 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,165 @@ +name: Build +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: ~ + release: + types: [ created ] + schedule: + - cron: "0 1 * * 6" + workflow_dispatch: ~ + +jobs: + tests: + runs-on: ubuntu-latest + + name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" + + strategy: + fail-fast: false + matrix: + php: [ "8.0", "8.1", "8.2", "8.3" ] + symfony: [ "^5.4", "^6.4" ] + sylius: [ "^1.12", "^1.13" ] + node: [ "18.x", "20.x" ] + mysql: [ "8.0" ] + + exclude: + - sylius: ^1.13 + php: 8.0 + - sylius: ^1.12 + php: 8.0 + symfony: ^6.4 + + env: + APP_ENV: test + DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php }}" + extensions: intl + tools: flex, symfony + coverage: none + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "${{ matrix.node }}" + + - name: Shutdown default MySQL + run: sudo service mysql stop + + - name: Setup MySQL + uses: mirromutth/mysql-action@v1.1 + with: + mysql version: "${{ matrix.mysql }}" + mysql root password: "root" + + - name: Output PHP version for Symfony CLI + run: php -v | head -n 1 | awk '{ print $2 }' > .php-version + + - name: Install certificates + run: symfony server:ca:install + + - name: Run Chrome Headless + run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & + + - name: Run webserver + run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon) + + - name: Get Composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache Composer + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php-${{ matrix.php }}-composer- + + - name: Restrict Sylius version + if: matrix.sylius != '' + run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction + + - name: Install PHP dependencies + run: composer install --no-interaction + env: + SYMFONY_REQUIRE: ${{ matrix.symfony }} + + - name: Install Behat driver + run: vendor/bin/bdi browser:google-chrome drivers + + - name: Get Yarn cache directory + id: yarn-cache + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - name: Cache Yarn + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ matrix.node }}-yarn- + + - name: Install JS dependencies + run: | + (cd tests/Application && yarn install) + + - name: Prepare test application database + run: | + (cd tests/Application && bin/console doctrine:database:create -vvv) + (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q) + + - name: Prepare test application assets + run: | + (cd tests/Application && bin/console assets:install public -vvv) + (cd tests/Application && yarn build:prod) + + - name: Prepare test application cache + run: (cd tests/Application && bin/console cache:warmup -vvv) + + - name: Load fixtures in test application + run: (cd tests/Application && bin/console sylius:fixtures:load -n) + + - name: Validate composer.json + run: composer validate --ansi --strict + + - name: Validate database schema + run: (cd tests/Application && bin/console doctrine:schema:validate) + + - name: Run PHPSpec + run: vendor/bin/phpspec run --ansi -f progress --no-interaction + + - name: Run PHPUnit + run: vendor/bin/phpunit --colors=always + + - name: Run Behat + run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun + + - name: Upload Behat logs + uses: actions/upload-artifact@v3 + if: failure() + with: + name: Behat logs + path: etc/build/ + if-no-files-found: ignore + + - name: Failed build Slack notification + uses: rtCamp/action-slack-notify@v2 + if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }} + env: + SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }} + SLACK_COLOR: ${{ job.status }} + SLACK_ICON: https://github.com/rtCamp.png?size=48 + SLACK_MESSAGE: ':x:' + SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository + SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }} + SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }} diff --git a/.github/workflows/coding_standard.yml b/.github/workflows/coding_standard.yml new file mode 100644 index 0000000..692bcb2 --- /dev/null +++ b/.github/workflows/coding_standard.yml @@ -0,0 +1,86 @@ +name: Coding standard + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: ~ + release: + types: [ created ] + workflow_dispatch: ~ + +jobs: + tests: + runs-on: ubuntu-latest + + name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}" + + strategy: + fail-fast: false + matrix: + php: [ "8.0", "8.1", "8.2", "8.3" ] + symfony: [ "^5.4", "^6.4" ] + sylius: [ "^1.12", "^1.13" ] + node: [ "18.x", "20.x" ] + + exclude: + - sylius: ^1.13 + php: 8.0 + - sylius: ^1.12 + php: 8.0 + symfony: ^6.4 + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php }}" + extensions: intl + tools: symfony + coverage: none + + - name: Get Composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache Composer + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php-${{ matrix.php }}-composer- + + - name: Restrict Symfony version + if: matrix.symfony != '' + run: | + composer config extra.symfony.require "${{ matrix.symfony }}" + + - name: Restrict Sylius version + if: matrix.sylius != '' + run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction + + - name: Install PHP dependencies + run: composer install --no-interaction + env: + SYMFONY_REQUIRE: ${{ matrix.symfony }} + + - name: Run PHPStan + run: vendor/bin/phpstan analyse -c phpstan.neon.dist -l 8 src/ + + - name: Run ECS + run: vendor/bin/ecs + + - name: Failed build Slack notification + uses: rtCamp/action-slack-notify@v2 + if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }} + env: + SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }} + SLACK_COLOR: ${{ job.status }} + SLACK_ICON: https://github.com/rtCamp.png?size=48 + SLACK_MESSAGE: ':x:' + SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository + SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }} + SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }} diff --git a/README.md b/README.md index 437d70b..4e9aef9 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,10 @@ Unlock seamless payment processing with the BNPParibasPayments Plugin for Sylius ---- We work on stable, supported, and up-to-date versions of packages. We recommend you do the same. -| Package | Version | -| --- | --- | -| PHP | ^7.1 | -| Sylius | 1.0 | +| Package | Version | Version | +| --- |-------|-------| +| PHP | ^8.0 | ^8.1 | +| Sylius | ^1.12 | ^1.13 | ---- diff --git a/behat.yml.dist b/behat.yml.dist index a6c9358..f79ec24 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -1,18 +1,61 @@ imports: - - vendor/sylius/sylius/behat.yml.dist + - vendor/sylius/sylius/src/Sylius/Behat/Resources/config/suites.yml - tests/Behat/Resources/suites.yml default: + formatters: + pretty: + verbose: true + paths: false + snippets: false + extensions: - FriendsOfBehat\ContextServiceExtension: - imports: - - vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml - - tests/Behat/Resources/contexts.yml - - tests/Behat/Resources/mocker.yml - - tests/Behat/Resources/page.yml + DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ + + FriendsOfBehat\MinkDebugExtension: + directory: etc/build + clean_start: false + screenshot: true + + Behat\MinkExtension: + files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" + base_url: "https://127.0.0.1:8080/" + default_session: symfony + javascript_session: chrome_headless + sessions: + symfony: + symfony: ~ + chrome_headless: + chrome: + api_url: http://127.0.0.1:9222 + validate_certificate: false + chrome: + selenium2: + browser: chrome + capabilities: + browserName: chrome + browser: chrome + version: "" + marionette: null # https://github.com/Behat/MinkExtension/pull/311 + chrome: + switches: + - "start-fullscreen" + - "start-maximized" + - "no-sandbox" + extra_capabilities: + unexpectedAlertBehaviour: accept + firefox: + selenium2: + browser: firefox + show_auto: false FriendsOfBehat\SymfonyExtension: + bootstrap: tests/Application/config/bootstrap.php kernel: - class: AppKernel - path: tests/Application/app/AppKernel.php - bootstrap: tests/Application/app/autoload.php + class: Tests\BitBag\MercanetBnpParibasPlugin\Application\Kernel + + FriendsOfBehat\VariadicExtension: ~ + + FriendsOfBehat\SuiteSettingsExtension: + paths: + - "features" diff --git a/bin/create_node_symlink.php b/bin/create_node_symlink.php new file mode 100644 index 0000000..2fdd652 --- /dev/null +++ b/bin/create_node_symlink.php @@ -0,0 +1,45 @@ + `' . NODE_MODULES_FOLDER_NAME . '` already exists as a link or folder, keeping existing as may be intentional.' . PHP_EOL; + exit(0); + } else { + echo '> Invalid symlink `' . NODE_MODULES_FOLDER_NAME . '` detected, recreating...' . PHP_EOL; + if (!@unlink(NODE_MODULES_FOLDER_NAME)) { + echo '> Could not delete file `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL; + exit(1); + } + } +} + +/* try to create the symlink using PHP internals... */ +$success = @symlink(PATH_TO_NODE_MODULES, NODE_MODULES_FOLDER_NAME); + +/* if case it has failed, but OS is Windows... */ +if (!$success && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + /* ...then try a different approach which does not require elevated permissions and folder to exist */ + echo '> This system is running Windows, creation of links requires elevated privileges,' . PHP_EOL; + echo '> and target path to exist. Fallback to NTFS Junction:' . PHP_EOL; + exec(sprintf('mklink /J %s %s 2> NUL', NODE_MODULES_FOLDER_NAME, PATH_TO_NODE_MODULES), $output, $returnCode); + $success = $returnCode === 0; + if (!$success) { + echo '> Failed o create the required symlink' . PHP_EOL; + exit(2); + } +} + +$path = @readlink(NODE_MODULES_FOLDER_NAME); +/* check if link points to the intended directory */ +if ($path && realpath($path) === realpath(PATH_TO_NODE_MODULES)) { + echo '> Successfully created the symlink.' . PHP_EOL; + exit(0); +} + +echo '> Failed to create the symlink to `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL; +exit(3); diff --git a/composer.json b/composer.json index ee5520e..a046c14 100644 --- a/composer.json +++ b/composer.json @@ -14,37 +14,80 @@ } ], "require": { - "php": "^7.1|^8.0", - "sylius/sylius": "^1.0" + "php": "^8.0", + "sylius/sylius": "^1.12 || ^1.13", + "symfony/webpack-encore-bundle": "^1.16" }, "require-dev": { - "phpspec/phpspec": "^3.2", - "phpunit/phpunit": "^5.6", - "behat/behat": "^3.3", - "behat/mink": "^1.7", - "behat/mink-browserkit-driver": "^1.3", - "behat/mink-extension": "^2.2", - "behat/mink-selenium2-driver": "^1.3", - "friends-of-behat/context-service-extension": "^1.0", - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/service-container-extension": "^1.0", - "friends-of-behat/symfony-extension": "^1.0", - "friends-of-behat/variadic-extension": "^1.0", - "lakion/mink-debug-extension": "^1.2.3", - "se/selenium-server-standalone": "^2.52" + "doctrine/annotations": "^1.13", + "bitbag/coding-standard": "^3.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.8.1", + "phpstan/phpstan-doctrine": "1.3", + "phpstan/phpstan-strict-rules": "^1.3.0", + "phpstan/phpstan-webmozart-assert": "^1.2.0", + "phpunit/phpunit": "^9.5", + "phpspec/phpspec": "^7.2", + "behat/behat": "^3.6.1", + "behat/mink-selenium2-driver": "1.4", + "dmore/behat-chrome-extension": "^1.3", + "dmore/chrome-mink-driver": "^2.7", + "friends-of-behat/mink": "^1.8", + "friends-of-behat/mink-browserkit-driver": "^1.4", + "friends-of-behat/mink-debug-extension": "^2.0.0", + "friends-of-behat/mink-extension": "^2.4", + "friends-of-behat/page-object-extension": "^0.3", + "friends-of-behat/suite-settings-extension": "^1.0", + "friends-of-behat/symfony-extension": "^2.1", + "friends-of-behat/variadic-extension": "^1.3", + "dbrekelmans/bdi": "^1.1", + "polishsymfonycommunity/symfony-mocker-container": "^1.0", + "sylius-labs/coding-standard": "^4.2", + "sylius-labs/suite-tags-extension": "^0.2", + "symfony/browser-kit": "^5.4 || ^6.4", + "symfony/debug-bundle": "^5.4 || ^6.4", + "symfony/dotenv": "^5.4 || ^6.4", + "symfony/intl": "^5.4 || ^6.4", + "symfony/web-profiler-bundle": "^5.4 || ^6.4" + }, + "conflict": { + "behat/mink-selenium2-driver": ">=1.7.0" }, "autoload": { "psr-4": { - "BitBag\\MercanetBnpParibasPlugin\\": "src/", - "Tests\\BitBag\\MercanetBnpParibasPlugin\\": "tests/" + "BitBag\\MercanetBnpParibasPlugin\\": "src/" } }, "autoload-dev": { + "psr-4": { + "Tests\\BitBag\\MercanetBnpParibasPlugin\\": "tests/" + }, "classmap": [ - "tests/Application/app/AppKernel.php" + "tests/Application/Kernel.php" ] }, "config": { - "bin-dir": "bin" + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": false, + "phpstan/extension-installer": false + } + }, + "extra": { + "symfony": { + "allow-contrib": true, + "recipe-install": false + } + }, + "scripts": { + "post-install-cmd": [ + "php bin/create_node_symlink.php" + ], + "post-update-cmd": [ + "php bin/create_node_symlink.php" + ], + "post-create-project-cmd": [ + "php bin/create_node_symlink.php" + ] } } diff --git a/ecs.php b/ecs.php new file mode 100644 index 0000000..e6db58c --- /dev/null +++ b/ecs.php @@ -0,0 +1,26 @@ +paths([ + __DIR__ . '/src', + __DIR__ . '/tests/Behat', + __DIR__ . '/ecs.php', + ]); + + $ecsConfig->import('vendor/sylius-labs/coding-standard/ecs.php'); + + $ecsConfig->skip([ + VisibilityRequiredFixer::class => ['*Spec.php', '*Kernel.php'], + ]); +}; diff --git a/etc/travis/behat.yml b/etc/travis/behat.yml deleted file mode 100644 index 96f86c3..0000000 --- a/etc/travis/behat.yml +++ /dev/null @@ -1,20 +0,0 @@ -imports: ["behat.yml.dist"] - -default: - extensions: - Behat\MinkExtension: - javascript_session: chromium - sessions: - chromium: - selenium2: - browser: chrome - capabilities: - browserName: chrome - browser: chrome - version: "" - chrome: - binary: "/usr/bin/chromium-browser" - switches: - - "start-fullscreen" - - "start-maximized" - - "no-sandbox" diff --git a/node_modules b/node_modules new file mode 120000 index 0000000..9270531 --- /dev/null +++ b/node_modules @@ -0,0 +1 @@ +tests/Application/node_modules \ No newline at end of file diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..c2519c2 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,16 @@ +parameters: + reportUnmatchedIgnoredErrors: false + checkMissingIterableValueType: false + checkGenericClassInNonGenericObjectType: false + treatPhpDocTypesAsCertain: false + + excludes_analyse: + # Makes PHPStan crash + - 'src/DependencyInjection/Configuration.php' + + # Test dependencies + - 'tests/Application/app/**.php' + - 'tests/Application/src/**.php' + + ignoreErrors: + - '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./' diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..72fb96e --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,21 @@ + + + + + + tests + + + + + + + + + + + diff --git a/spec/Action/NotifyActionSpec.php b/spec/Action/NotifyActionSpec.php index dcd329e..fbbaa99 100644 --- a/spec/Action/NotifyActionSpec.php +++ b/spec/Action/NotifyActionSpec.php @@ -45,8 +45,13 @@ function it_execute( FactoryInterface $stateMachineFactory, StateMachineInterface $stateMachine ) { + $params = [ + 'authorisationId' => '123' + ]; $request->getModel()->willReturn($arrayObject); $request->getFirstModel()->willReturn($payment); + $mercanetBnpParibasBridge->getAuthorisationId()->willReturn('123'); + $payment->getDetails()->willReturn($params); $mercanetBnpParibasBridge->isPostMethod()->willReturn(true); $mercanetBnpParibasBridge->paymentVerification()->willReturn(true); $stateMachineFactory->get($payment, PaymentTransitions::GRAPH)->willReturn($stateMachine); diff --git a/spec/Bridge/MercanetBnpParibasBridgeSpec.php b/spec/Bridge/MercanetBnpParibasBridgeSpec.php index 4a28b7d..a0cfc39 100644 --- a/spec/Bridge/MercanetBnpParibasBridgeSpec.php +++ b/spec/Bridge/MercanetBnpParibasBridgeSpec.php @@ -67,7 +67,7 @@ function it_payment_verification_has_been_thrown( { $request->isMethod('POST')->willReturn(true); $requestStack->getCurrentRequest()->willReturn($request); - + $this->setSecretKey('123'); $this ->shouldThrow(\InvalidArgumentException::class) ->during('paymentVerification', ['key']) diff --git a/src/Action/CaptureAction.php b/src/Action/CaptureAction.php index e2dca83..d5b6925 100644 --- a/src/Action/CaptureAction.php +++ b/src/Action/CaptureAction.php @@ -1,5 +1,14 @@ - * @author Patryk Drapik - */ final class CaptureAction implements ActionInterface, ApiAwareInterface { use GatewayAwareTrait; - /** - * @var Payum - */ + /** @var Payum */ private $payum; - /** - * @var MercanetBnpParibasBridgeInterface - */ + /** @var MercanetBnpParibasBridgeInterface */ private $mercanetBnpParibasBridge; - /** - * @param Payum $payum - */ public function __construct(Payum $payum) { $this->payum = $payum; } - /** - * {@inheritDoc} - */ - public function setApi($mercanetBnpParibasBridge) + public function setApi($mercanetBnpParibasBridge): void { if (!$mercanetBnpParibasBridge instanceof MercanetBnpParibasBridgeInterface) { throw new UnsupportedApiException('Not supported.'); @@ -63,11 +59,11 @@ public function setApi($mercanetBnpParibasBridge) } /** - * {@inheritDoc} + * @inheritDoc * * @param Capture $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); @@ -80,12 +76,10 @@ public function execute($request) /** @var TokenInterface $token */ $token = $request->getToken(); - $transactionReference = isset($model['transactionReference']) ? $model['transactionReference'] : null; - - if ($transactionReference !== null) { + $transactionReference = $model['transactionReference'] ?? null; + if (null !== $transactionReference) { if ($this->mercanetBnpParibasBridge->isPostMethod()) { - $model['status'] = $this->mercanetBnpParibasBridge->paymentVerification() ? PaymentInterface::STATE_COMPLETED : PaymentInterface::STATE_CANCELLED ; @@ -97,8 +91,7 @@ public function execute($request) return; } - if ($model['status'] === PaymentInterface::STATE_COMPLETED) { - + if (PaymentInterface::STATE_COMPLETED === $model['status']) { return; } } @@ -114,11 +107,16 @@ public function execute($request) $keyVersion = $this->mercanetBnpParibasBridge->getKeyVersion(); $automaticResponseUrl = $notifyToken->getTargetUrl(); + /** @var string $currencyCode */ $currencyCode = $payment->getCurrencyCode(); + /** @phpstan-ignore-next-line We should not change that now*/ $targetUrl = $request->getToken()->getTargetUrl(); + /** @var int $amount */ $amount = $payment->getAmount(); + /** @var OrderInterface $order */ + $order = $payment->getOrder(); - $transactionReference = "MercanetWS" . uniqid() . "OR" . $payment->getOrder()->getNumber(); + $transactionReference = 'MercanetWS' . uniqid() . 'OR' . $order->getNumber(); $model['transactionReference'] = $transactionReference; @@ -131,7 +129,7 @@ public function execute($request) $targetUrl, $currencyCode, $transactionReference, - $automaticResponseUrl + $automaticResponseUrl, ); $request->setModel($model); @@ -148,12 +146,12 @@ private function createNotifyToken($gatewayName, $model) { return $this->payum->getTokenFactory()->createNotifyToken( $gatewayName, - $model + $model, ); } /** - * {@inheritDoc} + * @inheritDoc */ public function supports($request) { diff --git a/src/Action/ConvertPaymentAction.php b/src/Action/ConvertPaymentAction.php index c8fa563..07b8f7a 100644 --- a/src/Action/ConvertPaymentAction.php +++ b/src/Action/ConvertPaymentAction.php @@ -1,5 +1,14 @@ - * @author Patryk Drapik - */ final class ConvertPaymentAction implements ActionInterface, GatewayAwareInterface { use GatewayAwareTrait; /** - * {@inheritDoc} + * @inheritDoc * * @param Convert $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); $request->setResult([]); } - /** - * {@inheritDoc} - */ public function supports($request) { return $request instanceof Convert && $request->getSource() instanceof PaymentInterface && - $request->getTo() === 'array' + 'array' === $request->getTo() ; } - /** - * @return string|null - */ - public function getClientIp() + public function getClientIp(): ?string { return array_key_exists('REMOTE_ADDR', $_SERVER) ? $_SERVER['REMOTE_ADDR'] : null; } diff --git a/src/Action/NotifyAction.php b/src/Action/NotifyAction.php index 139c6bf..5610d2d 100644 --- a/src/Action/NotifyAction.php +++ b/src/Action/NotifyAction.php @@ -1,5 +1,14 @@ - */ final class NotifyAction implements ActionInterface, ApiAwareInterface { use GatewayAwareTrait; - /** - * @var MercanetBnpParibasBridgeInterface - */ - private $mercanetBnpParibasBridge; + private MercanetBnpParibasBridgeInterface $mercanetBnpParibasBridge; - /** - * @var FactoryInterface - */ - private $stateMachineFactory; + private FactoryInterface $stateMachineFactory; - /** - * @param FactoryInterface $stateMachineFactory - */ public function __construct(FactoryInterface $stateMachineFactory) { $this->stateMachineFactory = $stateMachineFactory; } /** - * {@inheritDoc} + * @param $request Notify */ - public function execute($request) + public function execute($request): void { - /** @var $request Notify */ RequestNotSupportedException::assertSupports($this, $request); if ($this->mercanetBnpParibasBridge->paymentVerification()) { - /** @var PaymentInterface $payment */ $payment = $request->getFirstModel(); @@ -68,10 +63,7 @@ public function execute($request) } } - /** - * {@inheritDoc} - */ - public function setApi($mercanetBnpParibasBridge) + public function setApi($mercanetBnpParibasBridge): void { if (!$mercanetBnpParibasBridge instanceof MercanetBnpParibasBridgeInterface) { throw new UnsupportedApiException('Not supported.'); @@ -80,9 +72,6 @@ public function setApi($mercanetBnpParibasBridge) $this->mercanetBnpParibasBridge = $mercanetBnpParibasBridge; } - /** - * {@inheritDoc} - */ public function supports($request) { return diff --git a/src/Action/StatusAction.php b/src/Action/StatusAction.php index cb5808d..221afd2 100644 --- a/src/Action/StatusAction.php +++ b/src/Action/StatusAction.php @@ -1,5 +1,14 @@ - * @author Patryk Drapik - */ final class StatusAction implements ActionInterface { - /** - * @var RequestStack - */ - private $requestStack; + private RequestStack $requestStack; - /** - * @param RequestStack $requestStack - */ public function __construct(RequestStack $requestStack) { $this->requestStack = $requestStack; } /** - * {@inheritDoc} + * @inheritDoc * * @param GetStatusInterface $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); $model = ArrayObject::ensureArrayObject($request->getModel()); + /** @var Request $requestCurrent */ $requestCurrent = $this->requestStack->getCurrentRequest(); - $transactionReference = isset($model['transactionReference']) ? $model['transactionReference'] : null; + $transactionReference = $model['transactionReference'] ?? null; - $status = isset($model['status']) ? $model['status'] : null; + $status = $model['status'] ?? null; if ((null === $transactionReference) && !$requestCurrent->isMethod('POST')) { - $request->markNew(); return; } - if ($status === PaymentInterface::STATE_CANCELLED) { - + if (PaymentInterface::STATE_CANCELLED === $status) { $request->markCanceled(); return; } - if ($status === PaymentInterface::STATE_COMPLETED) { - + if (PaymentInterface::STATE_COMPLETED === $status) { $request->markCaptured(); return; @@ -77,7 +75,7 @@ public function execute($request) } /** - * {@inheritDoc} + * @inheritDoc */ public function supports($request) { diff --git a/src/BitBagMercanetBnpParibasPlugin.php b/src/BitBagMercanetBnpParibasPlugin.php index 77d0835..b7e1e06 100644 --- a/src/BitBagMercanetBnpParibasPlugin.php +++ b/src/BitBagMercanetBnpParibasPlugin.php @@ -1,5 +1,14 @@ - */ final class BitBagMercanetBnpParibasPlugin extends Bundle { use SyliusPluginTrait; -} \ No newline at end of file +} diff --git a/src/Bridge/MercanetBnpParibasBridge.php b/src/Bridge/MercanetBnpParibasBridge.php index c6115f3..da3565c 100644 --- a/src/Bridge/MercanetBnpParibasBridge.php +++ b/src/Bridge/MercanetBnpParibasBridge.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasBridge implements MercanetBnpParibasBridgeInterface { - /** - * @var RequestStack - */ - private $requestStack; - - /** - * @var string - */ - private $secretKey; - - /** - * @var string - */ - private $merchantId; - - /** - * @var string - */ - private $keyVersion; - - /** - * @var string - */ - private $environment; - - /** @var Mercanet */ - private $mercanet; - - /** - * @param RequestStack $requestStack - */ + private RequestStack $requestStack; + + private string $secretKey; + + private string $merchantId; + + private string $keyVersion; + + private string $environment; + + private Mercanet $mercanet; + public function __construct(RequestStack $requestStack) { $this->requestStack = $requestStack; } - /** - * {@inheritDoc} - */ - public function createMercanet($secretKey) + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public function createMercanet(string $secretKey): Mercanet { return new Mercanet($secretKey); } - /** - * {@inheritDoc} - */ - public function paymentVerification() + public function paymentVerification(): bool { if ($this->isPostMethod()) { - $this->mercanet = new Mercanet($this->secretKey); $this->mercanet->setResponse($_POST); @@ -78,81 +60,58 @@ public function paymentVerification() return false; } - public function getAuthorisationId() + public function getAuthorisationId(): string { + /** @phpstan-ignore-next-line This method does not exist, but we should not change that now*/ return $this->mercanet->getAuthorisationId(); } - /** - * {@inheritDoc} - */ - public function isPostMethod() + public function isPostMethod(): bool { + /** @var Request $currentRequest */ $currentRequest = $this->requestStack->getCurrentRequest(); return $currentRequest->isMethod('POST'); } - /** - * @return string - */ - public function getSecretKey() + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public function getSecretKey(): string { return $this->secretKey; } - /** - * @param string $secretKey - */ - public function setSecretKey($secretKey) + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public function setSecretKey(string $secretKey): void { $this->secretKey = $secretKey; } - /** - * @return string - */ - public function getMerchantId() + public function getMerchantId(): string { return $this->merchantId; } - /** - * @param string $merchantId - */ - public function setMerchantId($merchantId) + public function setMerchantId(string $merchantId): void { $this->merchantId = $merchantId; } - /** - * @return string - */ - public function getKeyVersion() + public function getKeyVersion(): string { return $this->keyVersion; } - /** - * @param string $keyVersion - */ - public function setKeyVersion($keyVersion) + public function setKeyVersion(string $keyVersion): void { $this->keyVersion = $keyVersion; } - /** - * @return string - */ - public function getEnvironment() + public function getEnvironment(): string { return $this->environment; } - /** - * @param string $environment - */ - public function setEnvironment($environment) + public function setEnvironment(string $environment): void { $this->environment = $environment; } diff --git a/src/Bridge/MercanetBnpParibasBridgeInterface.php b/src/Bridge/MercanetBnpParibasBridgeInterface.php index cecfddb..a570878 100644 --- a/src/Bridge/MercanetBnpParibasBridgeInterface.php +++ b/src/Bridge/MercanetBnpParibasBridgeInterface.php @@ -1,5 +1,14 @@ - */ interface MercanetBnpParibasBridgeInterface { - /** - * @param string $secretKey - * - * @return Mercanet - */ - public function createMercanet($secretKey); - - /** - * @return bool - */ - public function paymentVerification(); - - public function getAuthorisationId(); - - /** - * @return bool - */ - public function isPostMethod(); - - /** - * @return string - */ - public function getSecretKey(); - - /** - * @param string $secretKey - */ - public function setSecretKey($secretKey); - - /** - * @return string - */ - public function getMerchantId(); - - /** - * @param string $merchantId - */ - public function setMerchantId($merchantId); - - /** - * @return string - */ - public function getKeyVersion(); - - /** - * @param string $keyVersion - */ - public function setKeyVersion($keyVersion); - - /** - * @return string - */ - public function getEnvironment(); - - /** - * @param string $environment - */ - public function setEnvironment($environment); + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public function createMercanet(string $secretKey): Mercanet; + + public function paymentVerification(): bool; + + public function getAuthorisationId(): string; + + public function isPostMethod(): bool; + + public function getSecretKey(): string; + + public function setSecretKey(string $secretKey): void; + + public function getMerchantId(): string; + + public function setMerchantId(string $merchantId): void; + + public function getKeyVersion(): string; + + public function setKeyVersion(string $keyVersion): void; + + public function getEnvironment(): string; + + public function setEnvironment(string $environment): void; } diff --git a/src/DependencyInjection/BitBagMercanetBnpParibasExtension.php b/src/DependencyInjection/BitBagMercanetBnpParibasExtension.php index e80e9cc..6ad842e 100644 --- a/src/DependencyInjection/BitBagMercanetBnpParibasExtension.php +++ b/src/DependencyInjection/BitBagMercanetBnpParibasExtension.php @@ -1,5 +1,14 @@ - */ final class BitBagMercanetBnpParibasExtension extends Extension { /** - * {@inheritdoc} + * @inheritdoc */ - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('services.yml'); + $config = $this->processConfiguration($this->getConfiguration([], $container), $configs); + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); + + $loader->load('services.xml'); } } diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php new file mode 100644 index 0000000..2b77def --- /dev/null +++ b/src/DependencyInjection/Configuration.php @@ -0,0 +1,26 @@ + - */ final class MercanetBnpParibasGatewayConfigurationType extends AbstractType { /** - * {@inheritdoc} + * @inheritdoc */ - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { $builder ->add('environment', ChoiceType::class, [ @@ -43,8 +49,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'constraints' => [ new NotBlank([ 'message' => 'bitbag.mercanet_bnp_paribas.secure_key.not_blank', - 'groups' => ['sylius'] - ]) + 'groups' => ['sylius'], + ]), ], ]) ->add('merchant_id', TextType::class, [ @@ -52,8 +58,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'constraints' => [ new NotBlank([ 'message' => 'bitbag.mercanet_bnp_paribas.merchant_id.not_blank', - 'groups' => ['sylius'] - ]) + 'groups' => ['sylius'], + ]), ], ]) ->add('key_version', TextType::class, [ @@ -61,8 +67,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'constraints' => [ new NotBlank([ 'message' => 'bitbag.mercanet_bnp_paribas.key_version.not_blank', - 'groups' => ['sylius'] - ]) + 'groups' => ['sylius'], + ]), ], ]) ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { diff --git a/src/Legacy/Mercanet.php b/src/Legacy/Mercanet.php index 555a9ec..09e47bb 100755 --- a/src/Legacy/Mercanet.php +++ b/src/Legacy/Mercanet.php @@ -1,5 +1,14 @@ READ THE FILE HEADER. - */ class Mercanet { - const TEST = "https://payment-webinit-mercanet.test.sips-services.com/rs-services/v2/paymentInit"; - const SIMULATION = "https://payment-webinit.simu.mercanet.bnpparibas.net/rs-services/v2/paymentInit"; - const PRODUCTION = "https://payment-webinit.mercanet.bnpparibas.net/rs-services/v2/paymentInit"; + public const TEST = 'https://payment-webinit-mercanet.test.sips-services.com/rs-services/v2/paymentInit'; + + public const SIMULATION = 'https://payment-webinit.simu.mercanet.bnpparibas.net/rs-services/v2/paymentInit'; + + public const PRODUCTION = 'https://payment-webinit.mercanet.bnpparibas.net/rs-services/v2/paymentInit'; + + public const INTERFACE_VERSION = 'IR_WS_2.17'; - const INTERFACE_VERSION = "IR_WS_2.17"; - const INSTALMENT = "INSTALMENT"; + public const INSTALMENT = 'INSTALMENT'; - // BYPASS3DS - const BYPASS3DS_ALL = "ALL"; - const BYPASS3DS_MERCHANTWALLET = "MERCHANTWALLET"; + public const BYPASS3DS_ALL = 'ALL'; - private $brandsmap = array( + public const BYPASS3DS_MERCHANTWALLET = 'MERCHANTWALLET'; + + private array $brandsmap = [ 'ACCEPTGIRO' => 'CREDIT_TRANSFER', 'AMEX' => 'CARD', 'BCMC' => 'CARD', @@ -46,19 +55,19 @@ class Mercanet 'VPAY' => 'CARD', 'VISA ELECTRON' => 'CARD', 'CBCONLINE' => 'CREDIT_TRANSFER', - 'KBCONLINE' => 'CREDIT_TRANSFER' - ); + 'KBCONLINE' => 'CREDIT_TRANSFER', + ]; - /** @var ShaComposer */ - private $secretKey; + /** @phpstan-ignore-next-line We should not change our business logic now*/ + private string $secretKey; - private $pspURL = self::TEST; + private string $pspURL = self::TEST; - private $responseData; + private string $responseData; - private $parameters = array(); + private array $parameters = []; - private $pspFields = array( + private array $pspFields = [ 'amount', 'cardExpiryDate', 'cardNumber', 'cardCSCValue', 'currencyCode', 'merchantId', 'interfaceVersion', 'sealAlgorithm', 'transactionReference', 'keyVersion', 'paymentMeanBrand', 'customerLanguage', @@ -76,157 +85,159 @@ class Mercanet 'templateName', 'paymentMeanBrandList', 'instalmentData.number', 'instalmentData.datesList', 'instalmentData.transactionReferencesList', 'instalmentData.amountsList', 'paymentPattern', 'captureDay', 'captureMode', 'merchantTransactionDateTime', 'fraudData.bypass3DS', 'seal', - 'orderChannel', 'orderId', 'returnContext', 'transactionOrigin', 'merchantWalletId', 'paymentMeanId' - ); + 'orderChannel', 'orderId', 'returnContext', 'transactionOrigin', 'merchantWalletId', 'paymentMeanId', + ]; - private $requiredFields = array( + private array $requiredFields = [ 'amount', 'currencyCode', 'interfaceVersion', 'keyVersion', 'merchantId', 'normalReturnUrl', 'orderChannel', - 'transactionReference' - ); + 'transactionReference', + ]; - public $allowedlanguages = array( - 'nl', 'fr', 'de', 'it', 'es', 'cy', 'en' - ); + public array $allowedlanguages = [ + 'nl', 'fr', 'de', 'it', 'es', 'cy', 'en', + ]; - private static $currencies = array( + private static array $currencies = [ 'EUR' => '978', 'USD' => '840', 'CHF' => '756', 'GBP' => '826', 'CAD' => '124', 'JPY' => '392', 'MXP' => '484', 'TRY' => '949', 'AUD' => '036', 'NZD' => '554', 'NOK' => '578', 'BRC' => '986', 'ARP' => '032', 'KHR' => '116', 'TWD' => '901', 'SEK' => '752', 'DKK' => '208', 'KRW' => '410', 'SGD' => '702', 'XPF' => '953', - 'XOF' => '952' - ); + 'XOF' => '952', + ]; - public static function convertCurrencyToCurrencyCode($currency) + public static function convertCurrencyToCurrencyCode(string $currency): string { - if (!in_array($currency, array_keys(self::$currencies))) + if (!in_array($currency, array_keys(self::$currencies))) { throw new \InvalidArgumentException("Unknown currencyCode $currency."); + } + return self::$currencies[$currency]; } - public static function convertCurrencyCodeToCurrency($code) + public static function convertCurrencyCodeToCurrency(string $code): int|string|false { - if (!in_array($code, array_values(self::$currencies))) + if (!in_array($code, array_values(self::$currencies))) { throw new \InvalidArgumentException("Unknown Code $code."); + } + return array_search($code, self::$currencies); } - public static function getCurrencies() + public static function getCurrencies(): array { return self::$currencies; } - public function __construct($secret) + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public function __construct(string $secret) { $this->secretKey = $secret; } - public function shaCompose(array $parameters) + public function shaCompose(array $parameters): string { // compose SHA string $shaString = ''; foreach ($parameters as $key => $value) { - if ($key != 'keyVersion') { + if ('keyVersion' != $key) { if (is_array($value)) { + /** @phpstan-ignore-next-line We should not change our business logic now*/ shaCompose($value); } else { $shaString .= $value; } } } - $shaString = str_replace("[", "", $shaString); - $shaString = str_replace("]", "", $shaString); - $shaString = str_replace("\",\"", "", $shaString); - $shaString = str_replace("\"", "", $shaString); + $shaString = str_replace('[', '', $shaString); + $shaString = str_replace(']', '', $shaString); + $shaString = str_replace('","', '', $shaString); + $shaString = str_replace('"', '', $shaString); + return $shaString; } - /** @return string */ - public function getShaSign() + public function getShaSign(): string { $this->validate(); + /** @phpstan-ignore-next-line We should not change our business logic now*/ return hash_hmac('sha256', utf8_encode($this->shaCompose($this->toArray())), $this->secretKey); } - /** @return string */ - public function getUrl() + public function getUrl(): string { return $this->pspURL; } - public function setUrl($pspUrl) + public function setUrl(string $pspUrl): void { $this->validateUri($pspUrl); $this->pspURL = $pspUrl; } - public function setNormalReturnUrl($url) + public function setNormalReturnUrl(string $url): void { $this->validateUri($url); $this->parameters['normalReturnUrl'] = $url; } - public function setAutomaticResponseUrl($url) + public function setAutomaticResponseUrl(string $url): void { $this->validateUri($url); $this->parameters['automaticResponseUrl'] = $url; } - public function setTransactionReference($transactionReference) + public function setTransactionReference(string $transactionReference): void { if (preg_match('/[^a-zA-Z0-9_-]/', $transactionReference)) { - throw new \InvalidArgumentException("TransactionReference cannot contain special characters"); + throw new \InvalidArgumentException('TransactionReference cannot contain special characters'); } $this->parameters['transactionReference'] = $transactionReference; } - /** - * Set amount in cents, eg EUR 12.34 is written as 1234 - */ - public function setAmount($amount) + public function setAmount(int $amount): void { if (!is_int($amount)) { - throw new \InvalidArgumentException("Integer expected. Amount is always in cents"); + throw new \InvalidArgumentException('Integer expected. Amount is always in cents'); } - if ($amount <= 0) { - throw new \InvalidArgumentException("Amount must be a positive number"); + if (0 >= $amount) { + throw new \InvalidArgumentException('Amount must be a positive number'); } $this->parameters['amount'] = $amount; - } - public function setMerchantId($merchantId) + public function setMerchantId(string $merchantId): void { $this->parameters['merchantId'] = $merchantId; } - public function setKeyVersion($keyVersion) + public function setKeyVersion(string $keyVersion): void { $this->parameters['keyVersion'] = $keyVersion; } - public function setCurrency($currency) + public function setCurrency(string $currency): void { if (!array_key_exists(strtoupper($currency), self::getCurrencies())) { - throw new \InvalidArgumentException("Unknown currency"); + throw new \InvalidArgumentException('Unknown currency'); } $this->parameters['currencyCode'] = self::convertCurrencyToCurrencyCode($currency); } - public function setLanguage($language) + public function setLanguage(string $language): void { if (!in_array($language, $this->allowedlanguages)) { - throw new \InvalidArgumentException("Invalid language locale"); + throw new \InvalidArgumentException('Invalid language locale'); } $this->parameters['customerLanguage'] = $language; } - public function setCustomerEmail($email) + public function setCustomerEmail(string $email): void { $this->parameters['customerEmail'] = $email; } - public function setPaymentBrand($brand) + public function setPaymentBrand(string $brand): void { $this->parameters['paymentMeanBrandList'] = ''; if (!array_key_exists(strtoupper($brand), $this->brandsmap)) { @@ -235,233 +246,227 @@ public function setPaymentBrand($brand) $this->parameters['paymentMeanBrandList'] = strtoupper($brand); } - public function setBillingContactEmail($email) + public function setBillingContactEmail(string $email): void { - if (strlen($email) > 50) { - throw new \InvalidArgumentException("Email is too long"); + if (50 < strlen($email)) { + throw new \InvalidArgumentException('Email is too long'); } - if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { - throw new \InvalidArgumentException("Email is invalid"); + if (!filter_var($email, \FILTER_VALIDATE_EMAIL)) { + throw new \InvalidArgumentException('Email is invalid'); } $this->parameters['billingContact.email'] = $email; } - public function setBillingAddressStreet($street) + public function setBillingAddressStreet(string $street): void { - if (strlen($street) > 35) { - throw new \InvalidArgumentException("street is too long"); + if (35 < strlen($street)) { + throw new \InvalidArgumentException('street is too long'); } $this->parameters['billingAddress.street'] = \Normalizer::normalize($street); } - public function setBillingAddressStreetNumber($nr) + public function setBillingAddressStreetNumber(string $nr): void { - if (strlen($nr) > 10) { - throw new \InvalidArgumentException("streetNumber is too long"); + if (10 < strlen($nr)) { + throw new \InvalidArgumentException('streetNumber is too long'); } $this->parameters['billingAddress.streetNumber'] = \Normalizer::normalize($nr); } - public function setBillingAddressZipCode($zipCode) + public function setBillingAddressZipCode(string $zipCode): void { - if (strlen($zipCode) > 10) { - throw new \InvalidArgumentException("zipCode is too long"); + if (10 < strlen($zipCode)) { + throw new \InvalidArgumentException('zipCode is too long'); } $this->parameters['billingAddress.zipCode'] = \Normalizer::normalize($zipCode); } - public function setBillingAddressCity($city) + public function setBillingAddressCity(string $city): void { - if (strlen($city) > 25) { - throw new \InvalidArgumentException("city is too long"); + if (25 < strlen($city)) { + throw new \InvalidArgumentException('city is too long'); } $this->parameters['billingAddress.city'] = \Normalizer::normalize($city); } - public function setBillingContactPhone($phone) + public function setBillingContactPhone(string $phone): void { - if (strlen($phone) > 30) { - throw new \InvalidArgumentException("phone is too long"); + if (30 < strlen($phone)) { + throw new \InvalidArgumentException('phone is too long'); } $this->parameters['billingContact.phone'] = $phone; } - public function setBillingContactFirstname($firstname) + public function setBillingContactFirstname(string $firstname): void { - $this->parameters['billingContact.firstname'] = str_replace(array("'", '"'), '', \Normalizer::normalize($firstname)); // replace quotes + $this->parameters['billingContact.firstname'] = str_replace(["'", '"'], '', \Normalizer::normalize($firstname)); // replace quotes } - public function setBillingContactLastname($lastname) + public function setBillingContactLastname(string $lastname): void { - $this->parameters['billingContact.lastname'] = str_replace(array("'", '"'), '', \Normalizer::normalize($lastname)); // replace quotes + $this->parameters['billingContact.lastname'] = str_replace(["'", '"'], '', \Normalizer::normalize($lastname)); // replace quotes } - public function setCaptureDay($number) + public function setCaptureDay(string $number): void { - if (strlen($number) > 2) { - throw new \InvalidArgumentException("captureDay is too long"); + if (2 < strlen($number)) { + throw new \InvalidArgumentException('captureDay is too long'); } $this->parameters['captureDay'] = $number; } - public function setCaptureMode($value) + public function setCaptureMode(string $value): void { - if (strlen($value) > 20) { - throw new \InvalidArgumentException("captureMode is too long"); + if (20 < strlen($value)) { + throw new \InvalidArgumentException('captureMode is too long'); } $this->parameters['captureMode'] = $value; } - public function setMerchantTransactionDateTime($value) + public function setMerchantTransactionDateTime(string $value): void { - if (strlen($value) > 25) { - throw new \InvalidArgumentException("merchantTransactionDateTime is too long"); + if (25 < strlen($value)) { + throw new \InvalidArgumentException('merchantTransactionDateTime is too long'); } $this->parameters['merchantTransactionDateTime'] = $value; } - public function setInterfaceVersion($value) + public function setInterfaceVersion(string $value): void { $this->parameters['interfaceVersion'] = $value; } - public function setSealAlgorithm($value) + public function setSealAlgorithm(string $value): void { $this->parameters['sealAlgorithm'] = $value; } - public function setOrderChannel($value) + public function setOrderChannel(string $value): void { - if (strlen($value) > 20) { - throw new \InvalidArgumentException("orderChannel is too long"); + if (20 < strlen($value)) { + throw new \InvalidArgumentException('orderChannel is too long'); } $this->parameters['orderChannel'] = $value; } - public function setOrderId($value) + public function setOrderId(string $value): void { - if (strlen($value) > 32) { - throw new \InvalidArgumentException("orderId is too long"); + if (32 < strlen($value)) { + throw new \InvalidArgumentException('orderId is too long'); } $this->parameters['orderId'] = $value; } - public function setReturnContext($value) + public function setReturnContext(string $value): void { - if (strlen($value) > 255) { - throw new \InvalidArgumentException("returnContext is too long"); + if (255 < strlen($value)) { + throw new \InvalidArgumentException('returnContext is too long'); } $this->parameters['returnContext'] = $value; } - public function setTransactionOrigin($value) + public function setTransactionOrigin(string $value): void { - if (strlen($value) > 20) { - throw new \InvalidArgumentException("transactionOrigin is too long"); + if (20 < strlen($value)) { + throw new \InvalidArgumentException('transactionOrigin is too long'); } $this->parameters['transactionOrigin'] = $value; } - // Methodes liees a la carte - public function setCardNumber($number) + public function setCardNumber(string $number): void { - if (strlen($number) > 19) { - throw new \InvalidArgumentException("cardNumber is too long"); + if (19 < strlen($number)) { + throw new \InvalidArgumentException('cardNumber is too long'); } - if (strlen($number) < 12) { - throw new \InvalidArgumentException("cardNumber is too short"); + if (12 > strlen($number)) { + throw new \InvalidArgumentException('cardNumber is too short'); } $this->parameters['cardNumber'] = $number; } - public function setCardExpiryDate($date) + public function setCardExpiryDate(string $date): void { - if (strlen($date) != 6) { - throw new \InvalidArgumentException("cardExpiryDate value is invalid"); + if (6 != strlen($date)) { + throw new \InvalidArgumentException('cardExpiryDate value is invalid'); } $this->parameters['cardExpiryDate'] = $date; } - public function setCardCSCValue($value) + public function setCardCSCValue(string $value): void { - if (strlen($value) > 4) { - throw new \InvalidArgumentException("cardCSCValue value is invalid"); + if (4 < strlen($value)) { + throw new \InvalidArgumentException('cardCSCValue value is invalid'); } $this->parameters['cardCSCValue'] = $value; } - // Methodes liees a la lutte contre la fraude - - public function setFraudDataBypass3DS($value) + public function setFraudDataBypass3DS(string $value): void { - if (strlen($value) > 128) { - throw new \InvalidArgumentException("fraudData.bypass3DS is too long"); + if (128 < strlen($value)) { + throw new \InvalidArgumentException('fraudData.bypass3DS is too long'); } $this->parameters['fraudData.bypass3DS'] = $value; } - // Methodes liees au paiement one-click - - public function setMerchantWalletId($wallet) + public function setMerchantWalletId(string $wallet): void { - if (strlen($wallet) > 21) { - throw new \InvalidArgumentException("merchantWalletId is too long"); + if (21 < strlen($wallet)) { + throw new \InvalidArgumentException('merchantWalletId is too long'); } $this->parameters['merchantWalletId'] = $wallet; } - public function setPaymentMeanId($value) + public function setPaymentMeanId(string $value): void { - if (strlen($value) > 6) { - throw new \InvalidArgumentException("paymentMeanId is too long"); + if (6 < strlen($value)) { + throw new \InvalidArgumentException('paymentMeanId is too long'); } $this->parameters['paymentMeanId'] = $value; } - // Methodes liees au paiement en n-fois - - public function setInstalmentDataNumber($number) + public function setInstalmentDataNumber(string $number): void { - if (strlen($number) > 2) { - throw new \InvalidArgumentException("instalmentData.number is too long"); + if (2 < strlen($number)) { + throw new \InvalidArgumentException('instalmentData.number is too long'); } - if (($number < 2) || ($number > 50)) { - throw new \InvalidArgumentException("instalmentData.number invalid value : value must be set between 2 and 50"); + if ((2 > $number) || (50 < $number)) { + throw new \InvalidArgumentException('instalmentData.number invalid value : value must be set between 2 and 50'); } $this->parameters['instalmentData.number'] = $number; } - public function setInstalmentDatesList($datesList) + public function setInstalmentDatesList(string $datesList): void { $this->parameters['instalmentData.datesList'] = $datesList; } - public function setInstalmentDataTransactionReferencesList($transactionReferencesList) + public function setInstalmentDataTransactionReferencesList(string $transactionReferencesList): void { $this->parameters['instalmentData.transactionReferencesList'] = $transactionReferencesList; } - public function setInstalmentDataAmountsList($amountsList) + public function setInstalmentDataAmountsList(string $amountsList): void { $this->parameters['instalmentData.amountsList'] = $amountsList; } - public function setPaymentPattern($paymentPattern) + public function setPaymentPattern(string $paymentPattern): void { $this->parameters['paymentPattern'] = $paymentPattern; } - public function __call($method, $args) + public function __call(string $method, array $args): ?string { - if (substr($method, 0, 3) == 'set') { + if ('set' == substr($method, 0, 3)) { $field = lcfirst(substr($method, 3)); if (in_array($field, $this->pspFields)) { $this->parameters[$field] = $args[0]; - return; + + return null; } } - if (substr($method, 0, 3) == 'get') { + if ('get' == substr($method, 0, 3)) { $field = lcfirst(substr($method, 3)); if (array_key_exists($field, $this->parameters)) { return $this->parameters[$field]; @@ -471,142 +476,125 @@ public function __call($method, $args) throw new \BadMethodCallException("Unknown method $method"); } - public function toArray() + public function toArray(): array { ksort($this->parameters); + return $this->parameters; } - public function toParameterString() + public function toParameterString(): string { ksort($this->parameters); - $dataName = ""; - $parameterArray = array(); + $dataName = ''; + $parameterArray = []; $chaine = '{'; foreach ($this->parameters as $key => $val) { - $dataArray = explode(".", $key); - if (count($dataArray) > 1) { + $dataArray = explode('.', $key); + if (1 < count($dataArray)) { if ($dataName == $dataArray[0]) { $parameterArray[$dataArray[1]] = $val; } else { - if ($dataName != "") { - if (strlen($chaine) != 1) { - $chaine .= ","; + if ('' != $dataName) { + if (1 != strlen($chaine)) { + $chaine .= ','; } $chaine .= '"' . $dataName . '":' . json_encode($parameterArray); } unset($parameterArray); - $parameterArray = array(); + $parameterArray = []; $dataName = $dataArray[0]; $parameterArray[$dataArray[1]] = $val; } } else { - if ($dataName != "") { - if (strlen($chaine) != 1) { - $chaine .= ","; + if ('' != $dataName) { + if (1 != strlen($chaine)) { + $chaine .= ','; } $chaine .= '"' . $dataName . '":' . json_encode($parameterArray); - $dataName = ""; + $dataName = ''; } - if (strlen($chaine) != 1) { - $chaine .= ","; + if (1 != strlen($chaine)) { + $chaine .= ','; } $chaine .= '"' . $key . '":"' . $val . '"'; } } - if ($dataName != "") { - if (strlen($chaine) != 1) { - $chaine .= ","; + if ('' != $dataName) { + if (1 != strlen($chaine)) { + $chaine .= ','; } $chaine .= '"' . $dataName . '":' . json_encode($parameterArray); } $chaine .= ',"seal" : "' . $this->getShaSign() . '" }'; - $chaine = str_replace(":\"[", ":[", $chaine); - $chaine = str_replace("]\"", "]", $chaine); - $chaine = str_replace("\\\"", "\"", $chaine); + $chaine = str_replace(':"[', ':[', $chaine); + $chaine = str_replace(']"', ']', $chaine); + $chaine = str_replace('\\"', '"', $chaine); + return $chaine; } - /* - if (substr($val, 0, 1) == "[") - $chaine .= '"'.$key.'":'.$val; - else - $chaine .= '"'.$key.'":"'.$val.'"'; */ - /** @return PaymentRequest */ - public static function createFromArray(ShaComposer $shaComposer, array $parameters) + /** @phpstan-ignore-next-line We should not change our business logic now*/ + public static function createFromArray(string $shaComposer, array $parameters): PaymentRequest|static { + /** @phpstan-ignore-next-line Unsafe usage of new static() */ $instance = new static($shaComposer); foreach ($parameters as $key => $value) { $instance->{"set$key"}($value); } + return $instance; } - public function validate() + public function validate(): void { foreach ($this->requiredFields as $field) { if (empty($this->parameters[$field])) { - throw new \RuntimeException($field . " can not be empty"); + throw new \RuntimeException($field . ' can not be empty'); } } } - protected function validateUri($uri) + protected function validateUri(string $uri): void { - if (!filter_var($uri, FILTER_VALIDATE_URL)) { - throw new \InvalidArgumentException("Uri is not valid"); + if (!filter_var($uri, \FILTER_VALIDATE_URL)) { + throw new \InvalidArgumentException('Uri is not valid'); } - if (strlen($uri) > 200) { - throw new \InvalidArgumentException("Uri is too long"); + if (200 < strlen($uri)) { + throw new \InvalidArgumentException('Uri is too long'); } } - // Traitement des reponses de Mercanet - // ----------------------------------- + public const SHASIGN_FIELD = 'SEAL'; - /** @var string */ - const SHASIGN_FIELD = "SEAL"; + public const DATA_FIELD = 'DATA'; - /** @var string */ - const DATA_FIELD = "DATA"; - - public function setResponse(array $httpRequest) + public function setResponse(array $httpRequest): void { - // use lowercase internally - $httpRequest = array_change_key_case($httpRequest, CASE_UPPER); - - // set sha sign + $httpRequest = array_change_key_case($httpRequest, \CASE_UPPER); $this->shaSign = $this->extractShaSign($httpRequest); - - // filter request for Sips parameters $this->parameters = $this->filterRequestParameters($httpRequest); } - /** - * @var string - */ - private $shaSign; + private string $shaSign; - private $dataString; + /** @phpstan-ignore-next-line We should not change that now*/ + private string $dataString; - private $responseRequest; + /** @phpstan-ignore-next-line We should not change that now*/ + private string $responseRequest; - private $parameterArray; + /** @phpstan-ignore-next-line We should not change that now*/ + private array $parameterArray; - /** - * Filter http request parameters - * @param array $httpRequest - * @return array - */ - private function filterRequestParameters(array $httpRequest) + private function filterRequestParameters(array $httpRequest): array { - //filter request for Sips parameters - if (!array_key_exists(self::DATA_FIELD, $httpRequest) || $httpRequest[self::DATA_FIELD] == '') { + if (!array_key_exists(self::DATA_FIELD, $httpRequest) || '' == $httpRequest[self::DATA_FIELD]) { throw new \InvalidArgumentException('Data parameter not present in parameters.'); } - $parameters = array(); + $parameters = []; $this->responseData = $httpRequest[self::DATA_FIELD]; $dataString = $httpRequest[self::DATA_FIELD]; $this->dataString = $dataString; @@ -619,110 +607,103 @@ private function filterRequestParameters(array $httpRequest) return $parameters; } - public function getSeal() + public function getSeal(): string { return $this->shaSign; } - private function extractShaSign(array $parameters) + private function extractShaSign(array $parameters): string { - if (!array_key_exists(self::SHASIGN_FIELD, $parameters) || $parameters[self::SHASIGN_FIELD] == '') { + if (!array_key_exists(self::SHASIGN_FIELD, $parameters) || '' == $parameters[self::SHASIGN_FIELD]) { throw new \InvalidArgumentException('SHASIGN parameter not present in parameters.'); } return $parameters[self::SHASIGN_FIELD]; } - /** - * Checks if the response is valid - * @return bool - */ - public function isValid() + public function isValid(): bool { $resultat = false; $signature = $this->responseData; $compute = hash('sha256', utf8_encode($signature . $this->secretKey)); - if (strcmp($this->shaSign, $compute) == 0) { - if ((strcmp($this->parameters['responseCode'], "00") == 0) || (strcmp($this->parameters['responseCode'], "60") == 0)) { + if (0 == strcmp($this->shaSign, $compute)) { + if ((0 == strcmp($this->parameters['responseCode'], '00')) || (0 == strcmp($this->parameters['responseCode'], '60'))) { $resultat = true; } } + return $resultat; } - function getXmlValueByTag($inXmlset, $needle) + public function getXmlValueByTag(string $inXmlset, string $needle): ?string { - $resource = xml_parser_create();//Create an XML parser - xml_parse_into_struct($resource, $inXmlset, $outArray);// Parse XML data into an array structure - xml_parser_free($resource);//Free an XML parser - for ($i = 0; $i < count($outArray); $i++) { + $resource = xml_parser_create(); + xml_parse_into_struct($resource, $inXmlset, $outArray); + xml_parser_free($resource); //Free an XML parser + for ($i = 0; $i < count($outArray); ++$i) { if ($outArray[$i]['tag'] == strtoupper($needle)) { $tagValue = $outArray[$i]['value']; } } - return $tagValue; + + return $tagValue ?? null; } - /** - * Retrieves a response parameter - * @param string $key - * @throws \InvalidArgumentException - */ - public function getParam($key) + public function getParam(string $key): string { return $this->parameterArray[$key]; } - public function getResponseRequest() + public function getResponseRequest(): string { return $this->responseRequest; } - public function executeRequest() + public function executeRequest(): ?string { - //echo "URL = " . $this->getUrl() . "
"; - //echo "param = " . $this->toParameterString() . "
"; $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $this->getUrl()); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $this->toParameterString()); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept:application/json')); - curl_setopt($ch, CURLOPT_PORT, 443); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - $result = curl_exec($ch); // $this->responseRequest et $this->responseStatus = false; + curl_setopt($ch, \CURLOPT_URL, $this->getUrl()); + curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, \CURLOPT_POST, true); + curl_setopt($ch, \CURLOPT_POSTFIELDS, $this->toParameterString()); + curl_setopt($ch, \CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Accept:application/json']); + curl_setopt($ch, \CURLOPT_PORT, 443); + curl_setopt($ch, \CURLOPT_SSL_VERIFYHOST, false); + + /** @var string $result */ + $result = curl_exec($ch); $info = curl_getinfo($ch); -// print_r($result); if (!$result) { - Print "curl error: " . curl_error($ch) . "\n"; + echo 'curl error: ' . curl_error($ch) . "\n"; curl_close($ch); die(); } - if ($info['http_code'] != 200) { - Print "service error: " . $info['http_code'] . "\n"; - Print "return: " . $result . "\n"; + if (200 != $info['http_code']) { + echo 'service error: ' . $info['http_code'] . "\n"; + echo 'return: ' . $result . "\n"; curl_close($ch); die(); } curl_close($ch); - if (strlen($result) == 0) { - Print "service did not sent back data\n"; + if (0 == strlen($result)) { + echo "service did not sent back data\n"; die(); } $result_array = json_decode($result); - if ($result_array->redirectionStatusCode == "00" ) { - - return "
redirectionUrl . "\">" . - "redirectionVersion . "\">" . - "redirectionData . "\">" . - "
" . - "" . - ""; + if ('00' == $result_array->redirectionStatusCode) { + return '
' . + '' . + '' . + '
' . + '' . + ''; } + + return null; } -} \ No newline at end of file +} diff --git a/src/Legacy/SimplePayment.php b/src/Legacy/SimplePayment.php index e974fa4..593872e 100755 --- a/src/Legacy/SimplePayment.php +++ b/src/Legacy/SimplePayment.php @@ -1,5 +1,14 @@ - * @author Patryk Drapik - */ final class SimplePayment { - /** - * @var Mercanet|object - */ - private $mercanet; + private Mercanet $mercanet; - /** - * @var string - */ - private $environment; + private string $environment; - /** - * @var string - */ - private $merchantId; + private string $merchantId; - /** - * @var string - */ - private $keyVersion; + private string $keyVersion; - /** - * @var string - */ - private $amount; + private int $amount; - /** - * @var string - */ - private $currency; + private string $currency; - /** - * @var string - */ - private $transactionReference; + private string $transactionReference; - /** - * @var string - */ - private $automaticResponseUrl; + private string $automaticResponseUrl; + + private string $targetUrl; - /** - * @param Mercanet $mercanet - * @param $merchantId - * @param $keyVersion - * @param $environment - * @param $amount - * @param $targetUrl - * @param $currency - * @param $transactionReference - * @param $automaticResponseUrl - */ public function __construct( Mercanet $mercanet, - $merchantId, - $keyVersion, - $environment, - $amount, - $targetUrl, - $currency, - $transactionReference, - $automaticResponseUrl - ) - { + string $merchantId, + string $keyVersion, + string $environment, + int $amount, + string $targetUrl, + string $currency, + string $transactionReference, + string $automaticResponseUrl, + ) { $this->automaticResponseUrl = $automaticResponseUrl; $this->transactionReference = $transactionReference; $this->mercanet = $mercanet; @@ -92,7 +63,7 @@ public function __construct( $this->targetUrl = $targetUrl; } - public function execute() + public function execute(): void { $this->resolveEnvironment(); @@ -101,13 +72,14 @@ public function execute() $this->mercanet->setKeyVersion($this->keyVersion); $this->mercanet->setAmount($this->amount); $this->mercanet->setCurrency($this->currency); - $this->mercanet->setOrderChannel("INTERNET"); + $this->mercanet->setOrderChannel('INTERNET'); $this->mercanet->setTransactionReference($this->transactionReference); $this->mercanet->setNormalReturnUrl($this->targetUrl); $this->mercanet->setAutomaticResponseUrl($this->automaticResponseUrl); $this->mercanet->validate(); + /** @var string $response */ $response = $this->mercanet->executeRequest(); throw new HttpResponse($response); @@ -116,7 +88,7 @@ public function execute() /** * @throws \InvalidArgumentException */ - private function resolveEnvironment() + private function resolveEnvironment(): void { if (Mercanet::TEST === $this->environment) { $this->mercanet->setUrl(Mercanet::TEST); @@ -137,8 +109,12 @@ private function resolveEnvironment() } throw new \InvalidArgumentException( - sprintf('The "%s" environment is invalid. Expected %s or %s', - $this->environment, Mercanet::PRODUCTION, Mercanet::TEST) + sprintf( + 'The "%s" environment is invalid. Expected %s or %s', + $this->environment, + Mercanet::PRODUCTION, + Mercanet::TEST, + ), ); } } diff --git a/src/MercanetBnpParibasGatewayFactory.php b/src/MercanetBnpParibasGatewayFactory.php index f308bb9..a07cb2a 100644 --- a/src/MercanetBnpParibasGatewayFactory.php +++ b/src/MercanetBnpParibasGatewayFactory.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasGatewayFactory extends GatewayFactory { /** - * {@inheritDoc} + * @inheritDoc */ - protected function populateConfig(ArrayObject $config) + protected function populateConfig(ArrayObject $config): void { $config->defaults([ 'payum.factory_name' => 'mercanet_bnp_paribas', diff --git a/src/Resources/assets/admin/entry.js b/src/Resources/assets/admin/entry.js new file mode 100644 index 0000000..f3cf750 --- /dev/null +++ b/src/Resources/assets/admin/entry.js @@ -0,0 +1,2 @@ +import './js'; +import './scss/main.scss'; diff --git a/tests/Application/web/.gitkeep b/src/Resources/assets/admin/js/index.js similarity index 100% rename from tests/Application/web/.gitkeep rename to src/Resources/assets/admin/js/index.js diff --git a/src/Resources/assets/admin/scss/main.scss b/src/Resources/assets/admin/scss/main.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/Resources/assets/shop/entry.js b/src/Resources/assets/shop/entry.js new file mode 100644 index 0000000..f3cf750 --- /dev/null +++ b/src/Resources/assets/shop/entry.js @@ -0,0 +1,2 @@ +import './js'; +import './scss/main.scss'; diff --git a/src/Resources/assets/shop/js/index.js b/src/Resources/assets/shop/js/index.js new file mode 100644 index 0000000..e69de29 diff --git a/src/Resources/assets/shop/scss/main.scss b/src/Resources/assets/shop/scss/main.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/Resources/config/config.yaml b/src/Resources/config/config.yaml new file mode 100644 index 0000000..a372917 --- /dev/null +++ b/src/Resources/config/config.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "@BitBagMercanetBnpParibasPlugin/Resources/config/services.xml" } diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml new file mode 100644 index 0000000..2b5e982 --- /dev/null +++ b/src/Resources/config/services.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + BitBag\MercanetBnpParibasPlugin\MercanetBnpParibasGatewayFactory + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml deleted file mode 100644 index ddb4e68..0000000 --- a/src/Resources/config/services.yml +++ /dev/null @@ -1,44 +0,0 @@ -services: - bitbag.mercanet_bnp_paribas.form.type.gateway_configuration: - class: BitBag\MercanetBnpParibasPlugin\Form\Type\MercanetBnpParibasGatewayConfigurationType - public: true - tags: - - { name: sylius.gateway_configuration_type, type: mercanet_bnp_paribas, label: bitbag.mercanet_bnp_paribas.gateway_label } - - { name: form.type } - - bitbag.mercanet_bnp_paribas.gateway_factory: - class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder - public: true - arguments: [BitBag\MercanetBnpParibasPlugin\MercanetBnpParibasGatewayFactory] - tags: - - { name: payum.gateway_factory_builder, factory: mercanet_bnp_paribas } - - bitbag.mercanet_bnp_paribas.action.capture: - class: BitBag\MercanetBnpParibasPlugin\Action\CaptureAction - public: true - arguments: - - '@payum' - tags: - - { name: payum.action, factory: mercanet_bnp_paribas, alias: payum.action.capture } - - bitbag.mercanet_bnp_paribas.action.notify: - class: BitBag\MercanetBnpParibasPlugin\Action\NotifyAction - public: true - arguments: - - '@sm.factory' - tags: - - { name: payum.action, factory: mercanet_bnp_paribas, alias: payum.action.notify } - - bitbag.mercanet_bnp_paribas.action.status: - class: BitBag\MercanetBnpParibasPlugin\Action\StatusAction - public: true - arguments: - - '@request_stack' - tags: - - { name: payum.action, factory: mercanet_bnp_paribas, alias: payum.action.status } - - bitbag.mercanet_bnp_paribas.bridge.mercanet_bnp_paribas_bridge: - class: BitBag\MercanetBnpParibasPlugin\Bridge\MercanetBnpParibasBridge - public: true - arguments: - - '@request_stack' diff --git a/tests/Application/.env b/tests/Application/.env new file mode 100644 index 0000000..42103ca --- /dev/null +++ b/tests/Application/.env @@ -0,0 +1,34 @@ +# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file +# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. +# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration + +###> symfony/framework-bundle ### +APP_ENV=test +APP_DEBUG=1 +APP_SECRET=EDITME +###< symfony/framework-bundle ### + +###> doctrine/doctrine-bundle ### +# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" +# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls +DATABASE_URL=mysql://root@127.0.0.1/bitbag_mercanet_bnp_paribas_%kernel.environment%?serverVersion=5.7 +###< doctrine/doctrine-bundle ### + +###> lexik/jwt-authentication-bundle ### +JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem +JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem +JWT_PASSPHRASE=bitbag_plugin_development +###< lexik/jwt-authentication-bundle ### + +###> symfony/mailer ### +MAILER_DSN=null://null +###< symfony/mailer ### + +###> symfony/messenger ### +SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=doctrine://default +SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=doctrine://default?queue_name=main_failed +SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=doctrine://default?queue_name=catalog_promotion_removal +SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=doctrine://default?queue_name=catalog_promotion_removal_failed +###< symfony/messenger ### +MESSENGER_TRANSPORT_DSN=sync:// diff --git a/tests/Application/.env.test b/tests/Application/.env.test new file mode 100644 index 0000000..7368ee6 --- /dev/null +++ b/tests/Application/.env.test @@ -0,0 +1,11 @@ +APP_SECRET='ch4mb3r0f5ecr3ts' + +KERNEL_CLASS='Tests\BitBag\MercanetBnpParibasPlugin\Application\Kernel' + +###> symfony/messenger ### +# Sync transport turned for testing env for the ease of testing +SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=sync:// +SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync:// +SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync:// +SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=sync:// +###< symfony/messenger ### diff --git a/tests/Application/.eslintrc.js b/tests/Application/.eslintrc.js new file mode 100644 index 0000000..92c4cee --- /dev/null +++ b/tests/Application/.eslintrc.js @@ -0,0 +1,20 @@ +module.exports = { + extends: 'airbnb-base', + env: { + node: true, + }, + rules: { + 'object-shorthand': ['error', 'always', { + avoidQuotes: true, + avoidExplicitReturnArrows: true, + }], + 'function-paren-newline': ['error', 'consistent'], + 'max-len': ['warn', 120, 2, { + ignoreUrls: true, + ignoreComments: false, + ignoreRegExpLiterals: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + }], + }, +}; diff --git a/tests/Application/.gitignore b/tests/Application/.gitignore index 169564f..14ac3b5 100644 --- a/tests/Application/.gitignore +++ b/tests/Application/.gitignore @@ -1,9 +1,24 @@ -/node_modules/ +/public/assets +/public/build +/public/css +/public/js +/public/.htaccess +/public/media/* +!/public/media/image/ +/public/media/image/* +!/public/media/image/.gitignore -/var/* -!/var/.gitkeep +/node_modules -/web/* -!/web/app.php -!/web/app_dev.php -!/web/app_test.php +###> symfony/framework-bundle ### +/.env.*.local +/.env.local +/.env.local.php +/public/bundles +/var/ +/vendor/ +###< symfony/framework-bundle ### + +###> symfony/web-server-bundle ### +/.web-server-pid +###< symfony/web-server-bundle ### diff --git a/tests/Application/Gulpfile.js b/tests/Application/Gulpfile.js deleted file mode 100644 index cff5a90..0000000 --- a/tests/Application/Gulpfile.js +++ /dev/null @@ -1,26 +0,0 @@ -var gulp = require('gulp'); -var chug = require('gulp-chug'); -var argv = require('yargs').argv; - -config = [ - '--rootPath', - argv.rootPath || '../../../../../../../tests/Application/web/assets/', - '--nodeModulesPath', - argv.nodeModulesPath || '../../../../../../../tests/Application/node_modules/', - '--vendorPath', - argv.vendorPath || '../../../../../../../vendor/' -]; - -gulp.task('admin', function() { - gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Gulpfile.js', { read: false }) - .pipe(chug({ args: config })) - ; -}); - -gulp.task('shop', function() { - gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Gulpfile.js', { read: false }) - .pipe(chug({ args: config })) - ; -}); - -gulp.task('default', ['admin', 'shop']); diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php new file mode 100644 index 0000000..2cc6a85 --- /dev/null +++ b/tests/Application/Kernel.php @@ -0,0 +1,103 @@ +getProjectDir() . '/var/cache/' . $this->environment; + } + + public function getLogDir(): string + { + return $this->getProjectDir() . '/var/log'; + } + + public function registerBundles(): iterable + { + foreach ($this->getConfigurationDirectories() as $confDir) { + $bundlesFile = $confDir . '/bundles.php'; + if (false === is_file($bundlesFile)) { + continue; + } + yield from $this->registerBundlesFromFile($bundlesFile); + } + } + + protected function configureRoutes(RoutingConfigurator $routes): void + { + foreach ($this->getConfigurationDirectories() as $confDir) { + $this->loadRoutesConfiguration($routes, $confDir); + } + } + + protected function getContainerBaseClass(): string + { + if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) { + return MockerContainer::class; + } + + return parent::getContainerBaseClass(); + } + + private function isTestEnvironment(): bool + { + return 0 === strpos($this->getEnvironment(), 'test'); + } + + private function loadRoutesConfiguration(RoutingConfigurator $routes, string $confDir): void + { + $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS); + $routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS); + $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS); + } + + /** + * @return BundleInterface[] + */ + private function registerBundlesFromFile(string $bundlesFile): iterable + { + $contents = require $bundlesFile; + foreach ($contents as $class => $envs) { + if (isset($envs['all']) || isset($envs[$this->environment])) { + yield new $class(); + } + } + } + + /** + * @return string[] + */ + private function getConfigurationDirectories(): iterable + { + yield $this->getProjectDir() . '/config'; + $syliusConfigDir = $this->getProjectDir() . '/config/sylius/' . SyliusKernel::MAJOR_VERSION . '.' . SyliusKernel::MINOR_VERSION; + if (is_dir($syliusConfigDir)) { + yield $syliusConfigDir; + } + $symfonyConfigDir = $this->getProjectDir() . '/config/symfony/' . BaseKernel::MAJOR_VERSION . '.' . BaseKernel::MINOR_VERSION; + if (is_dir($symfonyConfigDir)) { + yield $symfonyConfigDir; + } + } +} diff --git a/tests/Application/app/AppKernel.php b/tests/Application/app/AppKernel.php deleted file mode 100644 index bf4b90b..0000000 --- a/tests/Application/app/AppKernel.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class AppKernel extends Kernel -{ - /** - * {@inheritdoc} - */ - public function registerBundles(): array - { - return array_merge(parent::registerBundles(), [ - new \Sylius\Bundle\AdminBundle\SyliusAdminBundle(), - new \Sylius\Bundle\ShopBundle\SyliusShopBundle(), - - new \FOS\OAuthServerBundle\FOSOAuthServerBundle(), // Required by SyliusApiBundle - new \Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle(), - - new \BitBag\MercanetBnpParibasPlugin\BitBagMercanetBnpParibasPlugin(), - ]); - } - - /** - * {@inheritdoc} - */ - public function registerContainerConfiguration(LoaderInterface $loader): void - { - $loader->load($this->getRootDir() . '/config/config.yml'); - } - - /** - * {@inheritdoc} - */ - protected function getContainerBaseClass(): string - { - if ('test' === $this->environment) { - return MockerContainer::class; - } - - return parent::getContainerBaseClass(); - } -} diff --git a/tests/Application/app/autoload.php b/tests/Application/app/autoload.php deleted file mode 100644 index d27ccfd..0000000 --- a/tests/Application/app/autoload.php +++ /dev/null @@ -1,12 +0,0 @@ -getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; +if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { + putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); +} + +if ($input->hasParameterOption('--no-debug', true)) { + putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); +} + +require dirname(__DIR__).'/config/bootstrap.php'; + +if ($_SERVER['APP_DEBUG']) { + umask(0000); -if ($debug) { - Debug::enable(); + if (class_exists(Debug::class)) { + Debug::enable(); + } } -$kernel = new AppKernel($env, $debug); +$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); $application = new Application($kernel); $application->run($input); diff --git a/tests/Application/composer.json b/tests/Application/composer.json new file mode 100644 index 0000000..326735f --- /dev/null +++ b/tests/Application/composer.json @@ -0,0 +1,5 @@ +{ + "name": "sylius/plugin-skeleton-test-application", + "description": "Sylius application for plugin testing purposes (composer.json needed for project dir resolving)", + "license": "MIT" +} diff --git a/tests/Application/config/api_platform/.gitignore b/tests/Application/config/api_platform/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php new file mode 100644 index 0000000..d595ae7 --- /dev/null +++ b/tests/Application/config/bootstrap.php @@ -0,0 +1,34 @@ +=1.2) +if (is_array($env = @include dirname(__DIR__) . '/.env.local.php')) { + $_SERVER += $env; + $_ENV += $env; +} elseif (!class_exists(Dotenv::class)) { + throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); +} elseif (method_exists(Dotenv::class, 'bootEnv')) { + (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); + + return; +} else { + // load all the .env files + (new Dotenv(true))->loadEnv(dirname(__DIR__) . '/.env'); +} + +$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; +$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], \FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php new file mode 100644 index 0000000..1a2a0f2 --- /dev/null +++ b/tests/Application/config/bundles.php @@ -0,0 +1,70 @@ + ['all' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], + Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true], + Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true], + Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true], + Sylius\Bundle\LocaleBundle\SyliusLocaleBundle::class => ['all' => true], + Sylius\Bundle\ProductBundle\SyliusProductBundle::class => ['all' => true], + Sylius\Bundle\ChannelBundle\SyliusChannelBundle::class => ['all' => true], + Sylius\Bundle\AttributeBundle\SyliusAttributeBundle::class => ['all' => true], + Sylius\Bundle\TaxationBundle\SyliusTaxationBundle::class => ['all' => true], + Sylius\Bundle\ShippingBundle\SyliusShippingBundle::class => ['all' => true], + Sylius\Bundle\PaymentBundle\SyliusPaymentBundle::class => ['all' => true], + Sylius\Bundle\MailerBundle\SyliusMailerBundle::class => ['all' => true], + Sylius\Bundle\PromotionBundle\SyliusPromotionBundle::class => ['all' => true], + Sylius\Bundle\AddressingBundle\SyliusAddressingBundle::class => ['all' => true], + Sylius\Bundle\InventoryBundle\SyliusInventoryBundle::class => ['all' => true], + Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle::class => ['all' => true], + Sylius\Bundle\UserBundle\SyliusUserBundle::class => ['all' => true], + Sylius\Bundle\CustomerBundle\SyliusCustomerBundle::class => ['all' => true], + Sylius\Bundle\UiBundle\SyliusUiBundle::class => ['all' => true], + Sylius\Bundle\ReviewBundle\SyliusReviewBundle::class => ['all' => true], + Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true], + Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true], + Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], + winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true], + Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], + Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true], + JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], + FOS\RestBundle\FOSRestBundle::class => ['all' => true], + Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true], + Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], + Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], + Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true], + Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true], + Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true], + Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true], + Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true], + Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true], + BitBag\MercanetBnpParibasPlugin\BitBagMercanetBnpParibasPlugin::class => ['all' => true], + Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], + Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], + FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true], + Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true], + ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], + Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], + Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true], + SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true], + Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], + BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], + SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true], + Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true], + League\FlysystemBundle\FlysystemBundle::class => ['all' => true], +]; diff --git a/tests/Application/config/jwt/private.pem b/tests/Application/config/jwt/private.pem new file mode 100644 index 0000000..2bcf023 --- /dev/null +++ b/tests/Application/config/jwt/private.pem @@ -0,0 +1,54 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIJrTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIDbthk+aF5EACAggA +MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBA3DYfh2mXByUxFNke/Wf5SBIIJ +UBckIgXeXBWPLQAAq07pN8uNFMUcUirFuEvbmxVe1PupCCAqriNxi1DqeSu/M7c1 +h66y0BqKZu/0G9SVTg63iCKDEiRAM3hLyD2CsjYg8h2LAaqQ9dFYGV0cHRhCXagZ +Sdt9YTfn2rarRbxauMSt0z9zwCaiUrBU4JwSM3g+tD7W0lxAm9TeaqBZek5DIX+j +3Gom5tPYQe8jvfGMGdMPuanoEwH4WbWzGcqypWriy4JwaggwKCQ4ituWfa9kqMMC +8HRmBBDg0gtafmQP910RZh18JL2ewF5Pl7GDsLtOj5gNLNuAiQxDCcYRnD4/Cdsl +bH91btmGX1nUVIFViUTW93eBsjBgdgqOMRVxUKkSSX6CmIZWlE3AazgwSbvOvNrN +JGa8X21UwfuS/JHLmfRmgdti0YxRjJkBYLPpcd3ILsi+MMhSHy0uycAM/dB80Q1B +vkW1UXGbCw/PzA5yHrzULzAl69E3Tt5nTVMIIcBGxw2rf+ej+AVjsuOl7etwecdC +gnA90ViNlGOACLVnhsjd4WVF9Oircosf0UYoblwcT6gw1GSVF9pWuu7k5hy/7Pt/ +o1BvonUgz/4VHG+K58qvtnlto+JE0XWzPvukNUyggtekTLyoQCI3ZKge6ui3qLax +N6whHpzFnFVF3GJAisTk5naHFawHNvH7t85pmc+UnjNUUmyl9RStl9LMYDSBKNlR +LzPlJK27E5SLhhyJCni4+UYjH6PdlJuKXJ0365fufJ+5ajHRatwt039xLnK0W+oa +L35NxCuXrn8YxOgJIomt7IrkV3AuxoWxcx4lRFoM0WCdn9SWZVtfFFiyX/Xr1qDg +dUysw3/bePEkOKr5JWx09hT0OKDpkwLFo2Ljtvjln4EMXYEvvVqFciKw0kqF73Dw +NyoSubwR4qs6FQclKW1TAP6UW4B6ffq1iagKOCTZ5bBtsPBZk8UGCJb57q4fUj4P +nJy0hnSdlOH4Am+US4HF4ayOGuaV1Be1taurdJnt5cNnUYRah0wg4nG+wVdG5HJk +f4dJ4nih9d6WA/8LfxdpB7NCwdR+KK6lky+GgLSdhmIT9lzjj2GDsU4lBf29TkBn +lyt98/LWGrgCQgZAQ/obxLT8CZtY+tNejGoMppY+ub8DIaLBFID+fcz13kgA9x7a +TeVB8RPok+S3yHXP9a4WSFe9DGjjN+m7EnRtte7MEjyMoekXVnT04gNbTMoGAjNb +lrR4g3ICygZtsoGSB2VEu7o3azAspXNBMOuJfRCuC0LDXcjH3TbvjX0da5wHBoK9 +clRxu+CDo9A849HMkmSje8wED7ysZnkvSX0OdPjXahVd4t1tDRI6jSlzFo9fGcjp +S8Ikm9iMrHXaWcDdtcq4C63CjSynIBr4mNIxe/f2e9nynm3AIv+aOan891RWHqrd +DdpSSPShtzATI9PbB+b+S0Gw58Y8fpO7yoZ87VW1BMpadmFZ87YY78jdB7BwInNI +JqtnivinM6qCsvbdMoGinUyL6PUcfQGiEAibouKr3zNRDC4aesBZZmj7w0dnf+HK +YC905aR0cddlc6DBo/ed3o9krMcZ6oY/vruemPTc5G7Cg3t4H3mInRgURw22X1wo +FsioU1yOdkK+MYxvmGsQvQuSJhp7h1Uz37t/olkPRafZgy2nEtw6DQO0Dm4UfSsD +nysq6dn1WeZPkOipGBRgQmY1FTRzwPoCxi7+/EuHhD8hr962rHOglSuNqPG89J8r +wdbTDr8kgXj2A9p+jI3TVKEX+h6FEhrCHW9SHUqATOZ7RiNL6hKld9j0U4D9gQwZ +dflA0TxpVsHXm7pd1idkr46jIFgw7HA89Erm0Ty7RolfHkqlRca805AVmsKkviIz +sbF5uv4WzIE3ViO8P1KMUhCyElm72mpyNTXBhkxkup9hJ4fQieaN6pET6dQ2xyjs +SBIvQoXI0JQKpespcyAdoh88ULQjRUXEOaNFfN7q+itTcocwmPZfzW2nXORJT2p8 +SXLqSE73nYZdqzSYFq1hLcnlubJ7yPBYYG1fI0IydjSGKfnjtB0DReR32OToRZ7m +laduZ8O+IaBUY4Sp6QdYcVbGGpG/wsPmTQyScc/O2bfSI7AiPnL9EnwebI9sPSWQ +R0t0QMXZOSSqNY6jkYjsOCxeekRIdY6havo2Y52Ywti0QNrkT4BQ+175VVTmRMdy +LNaMFeEq6ehSEdaHaozvjHvP50HQT43tCK+RJiL+Gf9FqawoQRt693yO5LFbQsuw +QsUSMi41txpINMa+HEc2K5FvGoPr7FmajLK7X2fr+3c/yZ4fahoMKEAVFWl5kRYx +Fe1smlw1Vxl/qNQ32LFWsBIK+XnYBteYmlpVyYrTgXyjnp1rK2zz0118DPFuYiAP +O0r6nnBz0NbwnSKb7S4CjxBKDvDbWTzP35Q5L/vySnO2zRbM64Gw7sjeLiJittWS +gQfbFpEk9k8KVndKM4H50Jp0WznmYpm1Tman8hUOiCvmq0qdI3bJ5Bnj0K+q2zFV ++noGpMFdq1+8WaUFLQFGCPM+yJgCqDgT1RAgfsGcomckGcmenDtHaTbcSFabEdpM +Tsa2qLdg/Kju+7JyGrkmobXl/azuyjYTHfRvSZrvO5WUDFzhChrJpIL4nA3ZGRlS +gvy+OzyyBh4sRyHwLItwUwE81aya3W4llAkhQ7OycmqniJgjtJzLwnxv2RQsB8bF +pyoqQdKVxkqHdbUFeh9igI4ffRAK+8xDER5J+RUoZ4mO8qJebxar54XTb6I/Lepc +g8ITX8bJ/GH+M6JdP7tLCikDTSGS+i1ReMQXE5XuEajYOVbzQdyWU5jleZIx0f6X +mTa4WvMEGNyNxKZZXsy9FAaBkZqrNzEv8k0uFgFMNWQcMMtiqbei86yACdqe+jiW +HqHv8wfoBHR+eIARub2itOJ/cI+oKv96d4it4FqQ9Lml8RUFFZj7Hrd6EjDb6Nq4 +P9ti7eku/xZvS0saBNChvv44GhP6FZJS0i/gidVffLna7Wua98tPZEAXp57k+XUL +PzsRJ4a+hFuQjkyXFoz/v8YuUdyCFUSVVr9ArVu0v4+4euFWpQLav5sXv0Gh9X58 +Ek1KIf7Z/tZAJnSjTjFuSbDX/AoTMTxpRBKKnFW6zY0Nw2pjTVMtTVDkv9xkBpBK +wod7FPD5f0T7y9YOARVZnBxVRSkkcYpEJFy5pLNeadg9 +-----END ENCRYPTED PRIVATE KEY----- diff --git a/tests/Application/config/jwt/public.pem b/tests/Application/config/jwt/public.pem new file mode 100644 index 0000000..cb4e13d --- /dev/null +++ b/tests/Application/config/jwt/public.pem @@ -0,0 +1,14 @@ +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA6QkmF/Xi5nAYb8Kzr7qC +d63V2K+d/nCXbpDUKKDPJAqOtTlMoQSuJRLNnhhp7z1i/Cp4Bhifr20Pu2dq8JYg +6pRT4ctqvYb/MXxAaPZc3EcBC0S6AhgKO/fDvR3LcqYqGJmQQOXZvxTsgqongdvV +4XbqFBMMgngyayoBk0VKTaI/s+LQhIce+1QaxbAI0+/zbR0hZ1hWT73orJi3do+1 +TBzQol+V7WGa8LlJfmgM56qO3BmVkeTDMBc27pGp6g3+Oufk/l29jEGJlUT9yu7Q +BRhaQTWNVASa2aD+AKjVBzJh53O2zD8slAbjF1M9U7bbWN28Sv+xC/dUz0q9HnPu +RsY2tnwryqTyYn/Hf2xyP3/KvjJ6oslAwemu5JirdJkO7KVQAthWG42gLuhZg3ks +cSZhCLZH7nO2UDsf+2ZZgdbhpYZwR4gDRfNt7GKWXnWZOz9Uw1yVCPgylyZRZwg8 +l0y9aABdj3379I22icrwpMZbAgkyxNSV6UNJuxZksLUoP3i9OvXYgPYU9E4tU/Ul +Dm/T1rGSReGoPkU1YQnI50bq7p1byIoUu2scTflvpTVI5a7zULkS1tg60xk7vBRC +aBc7nr4UEtA235N6uLtcGxH11WBMwsKX69sSU0sQdC4Sk25zXM2gc8R1XV9K3qz2 +wQorQRlCwrkG44VRDgbFH+8CAwEAAQ== +-----END PUBLIC KEY----- diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml new file mode 100644 index 0000000..11a9cc8 --- /dev/null +++ b/tests/Application/config/packages/_sylius.yaml @@ -0,0 +1,17 @@ +imports: + - { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" } + + - { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" } + + - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } + + - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" } + + - { resource: "@BitBagMercanetBnpParibasPlugin/Resources/config/config.yaml" } + +parameters: + sylius_core.public_dir: '%kernel.project_dir%/public' + +sylius_shop: + product_grid: + include_all_descendants: true diff --git a/tests/Application/config/packages/assets.yaml b/tests/Application/config/packages/assets.yaml new file mode 100644 index 0000000..73be0b6 --- /dev/null +++ b/tests/Application/config/packages/assets.yaml @@ -0,0 +1,11 @@ +framework: + assets: + packages: + shop: + json_manifest_path: '%kernel.project_dir%/public/build/shop/manifest.json' + admin: + json_manifest_path: '%kernel.project_dir%/public/build/admin/manifest.json' + mercanet_bnp_paribas_shop: + json_manifest_path: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/shop/manifest.json' + mercanet_bnp_paribas_admin: + json_manifest_path: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/admin/manifest.json' diff --git a/tests/Application/config/packages/dev/framework.yaml b/tests/Application/config/packages/dev/framework.yaml new file mode 100644 index 0000000..4b116de --- /dev/null +++ b/tests/Application/config/packages/dev/framework.yaml @@ -0,0 +1,2 @@ +framework: + profiler: { only_exceptions: false } diff --git a/tests/Application/config/packages/dev/monolog.yaml b/tests/Application/config/packages/dev/monolog.yaml new file mode 100644 index 0000000..da2b092 --- /dev/null +++ b/tests/Application/config/packages/dev/monolog.yaml @@ -0,0 +1,9 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + firephp: + type: firephp + level: info diff --git a/tests/Application/config/packages/dev/routing.yaml b/tests/Application/config/packages/dev/routing.yaml new file mode 100644 index 0000000..4116679 --- /dev/null +++ b/tests/Application/config/packages/dev/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: true diff --git a/tests/Application/config/packages/dev/web_profiler.yaml b/tests/Application/config/packages/dev/web_profiler.yaml new file mode 100644 index 0000000..1f1cb2b --- /dev/null +++ b/tests/Application/config/packages/dev/web_profiler.yaml @@ -0,0 +1,3 @@ +web_profiler: + toolbar: true + intercept_redirects: false diff --git a/tests/Application/config/packages/doctrine.yaml b/tests/Application/config/packages/doctrine.yaml new file mode 100644 index 0000000..059089f --- /dev/null +++ b/tests/Application/config/packages/doctrine.yaml @@ -0,0 +1,13 @@ +parameters: + # Adds a fallback DATABASE_URL if the env var is not set. + # This allows you to run cache:warmup even if your + # environment variables are not available yet. + # You should not need to change this value. + env(DATABASE_URL): '' + +doctrine: + dbal: + driver: 'pdo_mysql' + server_version: '5.7' + charset: UTF8 + url: '%env(resolve:DATABASE_URL)%' diff --git a/tests/Application/config/packages/doctrine_migrations.yaml b/tests/Application/config/packages/doctrine_migrations.yaml new file mode 100644 index 0000000..cdbc01a --- /dev/null +++ b/tests/Application/config/packages/doctrine_migrations.yaml @@ -0,0 +1,4 @@ +doctrine_migrations: + storage: + table_storage: + table_name: sylius_migrations diff --git a/tests/Application/config/packages/fos_rest.yaml b/tests/Application/config/packages/fos_rest.yaml new file mode 100644 index 0000000..eaebb27 --- /dev/null +++ b/tests/Application/config/packages/fos_rest.yaml @@ -0,0 +1,11 @@ +fos_rest: + exception: true + view: + formats: + json: true + xml: true + empty_content: 204 + format_listener: + rules: + - { path: '^/api/v1/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } + - { path: '^/', stop: true } diff --git a/tests/Application/config/packages/framework.yaml b/tests/Application/config/packages/framework.yaml new file mode 100644 index 0000000..06bd45a --- /dev/null +++ b/tests/Application/config/packages/framework.yaml @@ -0,0 +1,17 @@ +framework: + secret: '%env(APP_SECRET)%' + form: true + csrf_protection: true + session: + handler_id: ~ + + assets: + packages: + shop: + json_manifest_path: '%kernel.project_dir%/public/build/shop/manifest.json' + admin: + json_manifest_path: '%kernel.project_dir%/public/build/admin/manifest.json' + mercanet_bnp_paribas_shop: + json_manifest_path: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/shop/manifest.json' + mercanet_bnp_paribas_admin: + json_manifest_path: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/admin/manifest.json' diff --git a/tests/Application/config/packages/lexik_jwt_authentication.yaml b/tests/Application/config/packages/lexik_jwt_authentication.yaml new file mode 100644 index 0000000..edfb69d --- /dev/null +++ b/tests/Application/config/packages/lexik_jwt_authentication.yaml @@ -0,0 +1,4 @@ +lexik_jwt_authentication: + secret_key: '%env(resolve:JWT_SECRET_KEY)%' + public_key: '%env(resolve:JWT_PUBLIC_KEY)%' + pass_phrase: '%env(JWT_PASSPHRASE)%' diff --git a/tests/Application/config/packages/liip_imagine.yaml b/tests/Application/config/packages/liip_imagine.yaml new file mode 100644 index 0000000..bb2e7ce --- /dev/null +++ b/tests/Application/config/packages/liip_imagine.yaml @@ -0,0 +1,6 @@ +liip_imagine: + resolvers: + default: + web_path: + web_root: "%kernel.project_dir%/public" + cache_prefix: "media/cache" diff --git a/tests/Application/config/packages/mailer.yaml b/tests/Application/config/packages/mailer.yaml new file mode 100644 index 0000000..56a650d --- /dev/null +++ b/tests/Application/config/packages/mailer.yaml @@ -0,0 +1,3 @@ +framework: + mailer: + dsn: '%env(MAILER_DSN)%' diff --git a/tests/Application/config/packages/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml new file mode 100644 index 0000000..2f16f0f --- /dev/null +++ b/tests/Application/config/packages/prod/doctrine.yaml @@ -0,0 +1,31 @@ +doctrine: + orm: + metadata_cache_driver: + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider + +services: + doctrine.result_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.result_cache_pool' + doctrine.system_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.system_cache_pool' + +framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/tests/Application/config/packages/prod/monolog.yaml b/tests/Application/config/packages/prod/monolog.yaml new file mode 100644 index 0000000..6461211 --- /dev/null +++ b/tests/Application/config/packages/prod/monolog.yaml @@ -0,0 +1,10 @@ +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug diff --git a/tests/Application/config/packages/routing.yaml b/tests/Application/config/packages/routing.yaml new file mode 100644 index 0000000..368bc7f --- /dev/null +++ b/tests/Application/config/packages/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: ~ diff --git a/tests/Application/config/packages/security.yaml b/tests/Application/config/packages/security.yaml new file mode 100644 index 0000000..7458c77 --- /dev/null +++ b/tests/Application/config/packages/security.yaml @@ -0,0 +1,124 @@ +security: + enable_authenticator_manager: true + providers: + sylius_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_api_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + sylius_api_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + + password_hashers: + Sylius\Component\User\Model\UserInterface: argon2i + firewalls: + admin: + switch_user: true + context: admin + pattern: "%sylius.security.admin_regex%" + provider: sylius_admin_user_provider + form_login: + provider: sylius_admin_user_provider + login_path: sylius_admin_login + check_path: sylius_admin_login_check + failure_path: sylius_admin_login + default_target_path: sylius_admin_dashboard + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_admin_security_token + csrf_token_id: admin_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + path: "/%sylius_admin.path_name%" + name: APP_ADMIN_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_admin_logout + target: sylius_admin_login + + new_api_admin_user: + pattern: "%sylius.security.new_api_admin_regex%/.*" + provider: sylius_api_admin_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_admin_route%/administrators/token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + new_api_shop_user: + pattern: "%sylius.security.new_api_shop_regex%/.*" + provider: sylius_api_shop_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_shop_route%/customers/token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + shop: + switch_user: { role: ROLE_ALLOWED_TO_SWITCH } + context: shop + pattern: "%sylius.security.shop_regex%" + provider: sylius_shop_user_provider + form_login: + success_handler: sylius.authentication.success_handler + failure_handler: sylius.authentication.failure_handler + provider: sylius_shop_user_provider + login_path: sylius_shop_login + check_path: sylius_shop_login_check + failure_path: sylius_shop_login + default_target_path: sylius_shop_homepage + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_shop_security_token + csrf_token_id: shop_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + name: APP_SHOP_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_shop_logout + target: sylius_shop_homepage + invalidate_session: false + + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + image_resolver: + pattern: ^/media/cache/resolve + security: false + + access_control: + - { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS } + - { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } + + - { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS } + - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER } + + - { path: "%sylius.security.new_api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS } + - { path: "%sylius.security.new_api_admin_route%/administrators/token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } + - { path: "%sylius.security.new_api_shop_route%/customers/token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS } diff --git a/tests/Application/config/packages/staging/monolog.yaml b/tests/Application/config/packages/staging/monolog.yaml new file mode 100644 index 0000000..6461211 --- /dev/null +++ b/tests/Application/config/packages/staging/monolog.yaml @@ -0,0 +1,10 @@ +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug diff --git a/tests/Application/config/packages/stof_doctrine_extensions.yaml b/tests/Application/config/packages/stof_doctrine_extensions.yaml new file mode 100644 index 0000000..7770f74 --- /dev/null +++ b/tests/Application/config/packages/stof_doctrine_extensions.yaml @@ -0,0 +1,4 @@ +# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html +# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/ +stof_doctrine_extensions: + default_locale: '%locale%' diff --git a/tests/Application/config/packages/test/framework.yaml b/tests/Application/config/packages/test/framework.yaml new file mode 100644 index 0000000..fc1d3c1 --- /dev/null +++ b/tests/Application/config/packages/test/framework.yaml @@ -0,0 +1,4 @@ +framework: + test: ~ + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/tests/Application/config/packages/test/mailer.yaml b/tests/Application/config/packages/test/mailer.yaml new file mode 100644 index 0000000..092eb28 --- /dev/null +++ b/tests/Application/config/packages/test/mailer.yaml @@ -0,0 +1,7 @@ +framework: + mailer: + dsn: 'null://null' + cache: + pools: + test.mailer_pool: + adapter: cache.adapter.filesystem diff --git a/tests/Application/config/packages/test/monolog.yaml b/tests/Application/config/packages/test/monolog.yaml new file mode 100644 index 0000000..7e2b9e3 --- /dev/null +++ b/tests/Application/config/packages/test/monolog.yaml @@ -0,0 +1,6 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: error diff --git a/tests/Application/config/packages/test/security.yaml b/tests/Application/config/packages/test/security.yaml new file mode 100644 index 0000000..8ccd542 --- /dev/null +++ b/tests/Application/config/packages/test/security.yaml @@ -0,0 +1,3 @@ +security: + password_hashers: + sha512: sha512 diff --git a/tests/Application/config/packages/test/sylius_theme.yaml b/tests/Application/config/packages/test/sylius_theme.yaml new file mode 100644 index 0000000..4d34199 --- /dev/null +++ b/tests/Application/config/packages/test/sylius_theme.yaml @@ -0,0 +1,3 @@ +sylius_theme: + sources: + test: ~ diff --git a/tests/Application/config/packages/test/sylius_uploader.yaml b/tests/Application/config/packages/test/sylius_uploader.yaml new file mode 100644 index 0000000..ab9d6ca --- /dev/null +++ b/tests/Application/config/packages/test/sylius_uploader.yaml @@ -0,0 +1,3 @@ +services: + Sylius\Component\Core\Generator\ImagePathGeneratorInterface: + class: Sylius\Behat\Service\Generator\UploadedImagePathGenerator diff --git a/tests/Application/config/packages/test/web_profiler.yaml b/tests/Application/config/packages/test/web_profiler.yaml new file mode 100644 index 0000000..03752de --- /dev/null +++ b/tests/Application/config/packages/test/web_profiler.yaml @@ -0,0 +1,6 @@ +web_profiler: + toolbar: false + intercept_redirects: false + +framework: + profiler: { collect: false } diff --git a/tests/Application/config/packages/test_cached/doctrine.yaml b/tests/Application/config/packages/test_cached/doctrine.yaml new file mode 100644 index 0000000..4952860 --- /dev/null +++ b/tests/Application/config/packages/test_cached/doctrine.yaml @@ -0,0 +1,16 @@ +doctrine: + orm: + entity_managers: + default: + result_cache_driver: + type: memcached + host: localhost + port: 11211 + query_cache_driver: + type: memcached + host: localhost + port: 11211 + metadata_cache_driver: + type: memcached + host: localhost + port: 11211 diff --git a/tests/Application/config/packages/test_cached/fos_rest.yaml b/tests/Application/config/packages/test_cached/fos_rest.yaml new file mode 100644 index 0000000..2b4189d --- /dev/null +++ b/tests/Application/config/packages/test_cached/fos_rest.yaml @@ -0,0 +1,3 @@ +fos_rest: + exception: + debug: true diff --git a/tests/Application/config/packages/test_cached/framework.yaml b/tests/Application/config/packages/test_cached/framework.yaml new file mode 100644 index 0000000..76d7e5e --- /dev/null +++ b/tests/Application/config/packages/test_cached/framework.yaml @@ -0,0 +1,4 @@ +framework: + test: ~ + session: + storage_id: session.storage.mock_file diff --git a/tests/Application/config/packages/test_cached/mailer.yaml b/tests/Application/config/packages/test_cached/mailer.yaml new file mode 100644 index 0000000..16f3170 --- /dev/null +++ b/tests/Application/config/packages/test_cached/mailer.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "../test/mailer.yaml" } diff --git a/tests/Application/config/packages/test_cached/monolog.yaml b/tests/Application/config/packages/test_cached/monolog.yaml new file mode 100644 index 0000000..7e2b9e3 --- /dev/null +++ b/tests/Application/config/packages/test_cached/monolog.yaml @@ -0,0 +1,6 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: error diff --git a/tests/Application/config/packages/test_cached/security.yaml b/tests/Application/config/packages/test_cached/security.yaml new file mode 100644 index 0000000..8ccd542 --- /dev/null +++ b/tests/Application/config/packages/test_cached/security.yaml @@ -0,0 +1,3 @@ +security: + password_hashers: + sha512: sha512 diff --git a/tests/Application/config/packages/test_cached/sylius_channel.yaml b/tests/Application/config/packages/test_cached/sylius_channel.yaml new file mode 100644 index 0000000..bab83ef --- /dev/null +++ b/tests/Application/config/packages/test_cached/sylius_channel.yaml @@ -0,0 +1,2 @@ +sylius_channel: + debug: true diff --git a/tests/Application/config/packages/test_cached/sylius_theme.yaml b/tests/Application/config/packages/test_cached/sylius_theme.yaml new file mode 100644 index 0000000..4d34199 --- /dev/null +++ b/tests/Application/config/packages/test_cached/sylius_theme.yaml @@ -0,0 +1,3 @@ +sylius_theme: + sources: + test: ~ diff --git a/tests/Application/config/packages/test_cached/sylius_uploader.yaml b/tests/Application/config/packages/test_cached/sylius_uploader.yaml new file mode 100644 index 0000000..cfa727e --- /dev/null +++ b/tests/Application/config/packages/test_cached/sylius_uploader.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "../test/sylius_uploader.yaml" } diff --git a/tests/Application/config/packages/test_cached/twig.yaml b/tests/Application/config/packages/test_cached/twig.yaml new file mode 100644 index 0000000..8c6e0b4 --- /dev/null +++ b/tests/Application/config/packages/test_cached/twig.yaml @@ -0,0 +1,2 @@ +twig: + strict_variables: true diff --git a/tests/Application/config/packages/translation.yaml b/tests/Application/config/packages/translation.yaml new file mode 100644 index 0000000..1f4f966 --- /dev/null +++ b/tests/Application/config/packages/translation.yaml @@ -0,0 +1,8 @@ +framework: + default_locale: '%locale%' + translator: + paths: + - '%kernel.project_dir%/translations' + fallbacks: + - '%locale%' + - 'en' diff --git a/tests/Application/config/packages/twig.yaml b/tests/Application/config/packages/twig.yaml new file mode 100644 index 0000000..8545473 --- /dev/null +++ b/tests/Application/config/packages/twig.yaml @@ -0,0 +1,12 @@ +twig: + paths: ['%kernel.project_dir%/templates'] + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' + +services: + _defaults: + public: false + autowire: true + autoconfigure: true + + Twig\Extra\Intl\IntlExtension: ~ diff --git a/tests/Application/config/packages/validator.yaml b/tests/Application/config/packages/validator.yaml new file mode 100644 index 0000000..61807db --- /dev/null +++ b/tests/Application/config/packages/validator.yaml @@ -0,0 +1,3 @@ +framework: + validation: + enable_annotations: true diff --git a/tests/Application/config/packages/webpack_encore.yaml b/tests/Application/config/packages/webpack_encore.yaml new file mode 100644 index 0000000..fb24319 --- /dev/null +++ b/tests/Application/config/packages/webpack_encore.yaml @@ -0,0 +1,8 @@ +webpack_encore: + output_path: '%kernel.project_dir%/public/build/default' + builds: + shop: '%kernel.project_dir%/public/build/shop' + admin: '%kernel.project_dir%/public/build/admin' + mercanet_bnp_paribas_shop: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/shop' + mercanet_bnp_paribas_admin: '%kernel.project_dir%/public/build/bitbag/mercanet_bnp_paribas/admin' + diff --git a/tests/Application/config/routes.yaml b/tests/Application/config/routes.yaml new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/routes/dev/web_profiler.yaml b/tests/Application/config/routes/dev/web_profiler.yaml new file mode 100644 index 0000000..3e79dc2 --- /dev/null +++ b/tests/Application/config/routes/dev/web_profiler.yaml @@ -0,0 +1,7 @@ +_wdt: + resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" + prefix: /_wdt + +_profiler: + resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" + prefix: /_profiler diff --git a/tests/Application/config/routes/liip_imagine.yaml b/tests/Application/config/routes/liip_imagine.yaml new file mode 100644 index 0000000..201cbd5 --- /dev/null +++ b/tests/Application/config/routes/liip_imagine.yaml @@ -0,0 +1,2 @@ +_liip_imagine: + resource: "@LiipImagineBundle/Resources/config/routing.yaml" diff --git a/tests/Application/config/routes/sylius_admin.yaml b/tests/Application/config/routes/sylius_admin.yaml new file mode 100644 index 0000000..1ba48d6 --- /dev/null +++ b/tests/Application/config/routes/sylius_admin.yaml @@ -0,0 +1,3 @@ +sylius_admin: + resource: "@SyliusAdminBundle/Resources/config/routing.yml" + prefix: /admin diff --git a/tests/Application/config/routes/sylius_api.yaml b/tests/Application/config/routes/sylius_api.yaml new file mode 100644 index 0000000..ae01ffc --- /dev/null +++ b/tests/Application/config/routes/sylius_api.yaml @@ -0,0 +1,3 @@ +sylius_api: + resource: "@SyliusApiBundle/Resources/config/routing.yml" + prefix: "%sylius.security.new_api_route%" diff --git a/tests/Application/config/routes/sylius_shop.yaml b/tests/Application/config/routes/sylius_shop.yaml new file mode 100644 index 0000000..fae46cb --- /dev/null +++ b/tests/Application/config/routes/sylius_shop.yaml @@ -0,0 +1,14 @@ +sylius_shop: + resource: "@SyliusShopBundle/Resources/config/routing.yml" + prefix: /{_locale} + requirements: + _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ + +sylius_shop_payum: + resource: "@SyliusShopBundle/Resources/config/routing/payum.yml" + +sylius_shop_default_locale: + path: / + methods: [GET] + defaults: + _controller: sylius.controller.shop.locale_switch::switchAction diff --git a/tests/Application/config/routes/test/routing.yaml b/tests/Application/config/routes/test/routing.yaml new file mode 100644 index 0000000..0ca57d9 --- /dev/null +++ b/tests/Application/config/routes/test/routing.yaml @@ -0,0 +1,5 @@ +sylius_test_plugin_main: + path: /test/main + controller: FrameworkBundle:Template:template + defaults: + template: "@SyliusTestPlugin/main.html.twig" diff --git a/tests/Application/config/routes/test/sylius_test_plugin.yaml b/tests/Application/config/routes/test/sylius_test_plugin.yaml new file mode 100644 index 0000000..0ca57d9 --- /dev/null +++ b/tests/Application/config/routes/test/sylius_test_plugin.yaml @@ -0,0 +1,5 @@ +sylius_test_plugin_main: + path: /test/main + controller: FrameworkBundle:Template:template + defaults: + template: "@SyliusTestPlugin/main.html.twig" diff --git a/tests/Application/config/routes/test_cached/routing.yaml b/tests/Application/config/routes/test_cached/routing.yaml new file mode 100644 index 0000000..0ca57d9 --- /dev/null +++ b/tests/Application/config/routes/test_cached/routing.yaml @@ -0,0 +1,5 @@ +sylius_test_plugin_main: + path: /test/main + controller: FrameworkBundle:Template:template + defaults: + template: "@SyliusTestPlugin/main.html.twig" diff --git a/tests/Application/config/routes/test_cached/sylius_test_plugin.yaml b/tests/Application/config/routes/test_cached/sylius_test_plugin.yaml new file mode 100644 index 0000000..0ca57d9 --- /dev/null +++ b/tests/Application/config/routes/test_cached/sylius_test_plugin.yaml @@ -0,0 +1,5 @@ +sylius_test_plugin_main: + path: /test/main + controller: FrameworkBundle:Template:template + defaults: + template: "@SyliusTestPlugin/main.html.twig" diff --git a/tests/Application/config/secrets/dev/.gitignore b/tests/Application/config/secrets/dev/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/secrets/prod/.gitignore b/tests/Application/config/secrets/prod/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/secrets/test/.gitignore b/tests/Application/config/secrets/test/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/secrets/test_cached/.gitignore b/tests/Application/config/secrets/test_cached/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/config/services.yaml b/tests/Application/config/services.yaml new file mode 100644 index 0000000..615506e --- /dev/null +++ b/tests/Application/config/services.yaml @@ -0,0 +1,4 @@ +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + locale: en_US diff --git a/tests/Application/config/services_test.yaml b/tests/Application/config/services_test.yaml new file mode 100644 index 0000000..af40901 --- /dev/null +++ b/tests/Application/config/services_test.yaml @@ -0,0 +1,8 @@ +imports: + - { resource: "../../Behat/Resources/services.xml" } + - { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } + +# workaround needed for strange "test.client.history" problem +# see https://github.com/FriendsOfBehat/SymfonyExtension/issues/88 +services: + Symfony\Component\BrowserKit\AbstractBrowser: '@test.client' diff --git a/tests/Application/config/services_test_cached.yaml b/tests/Application/config/services_test_cached.yaml new file mode 100644 index 0000000..0de380e --- /dev/null +++ b/tests/Application/config/services_test_cached.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "services_test.yaml" } diff --git a/tests/Application/config/sylius/1.12/packages/security.yaml b/tests/Application/config/sylius/1.12/packages/security.yaml new file mode 100644 index 0000000..71d89cd --- /dev/null +++ b/tests/Application/config/sylius/1.12/packages/security.yaml @@ -0,0 +1,122 @@ +security: + enable_authenticator_manager: true + providers: + sylius_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_api_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + sylius_api_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + + password_hashers: + Sylius\Component\User\Model\UserInterface: argon2i + firewalls: + admin: + switch_user: true + context: admin + pattern: "%sylius.security.admin_regex%" + provider: sylius_admin_user_provider + form_login: + provider: sylius_admin_user_provider + login_path: sylius_admin_login + check_path: sylius_admin_login_check + failure_path: sylius_admin_login + default_target_path: sylius_admin_dashboard + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_admin_security_token + csrf_token_id: admin_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + path: "/%sylius_admin.path_name%" + name: APP_ADMIN_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_admin_logout + target: sylius_admin_login + + new_api_admin_user: + pattern: "%sylius.security.new_api_admin_regex%/.*" + provider: sylius_api_admin_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_admin_route%/authentication-token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + new_api_shop_user: + pattern: "%sylius.security.new_api_shop_regex%/.*" + provider: sylius_api_shop_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_shop_route%/authentication-token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + shop: + switch_user: { role: ROLE_ALLOWED_TO_SWITCH } + context: shop + pattern: "%sylius.security.shop_regex%" + provider: sylius_shop_user_provider + form_login: + success_handler: sylius.authentication.success_handler + failure_handler: sylius.authentication.failure_handler + provider: sylius_shop_user_provider + login_path: sylius_shop_login + check_path: sylius_shop_login_check + failure_path: sylius_shop_login + default_target_path: sylius_shop_homepage + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_shop_security_token + csrf_token_id: shop_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + name: APP_SHOP_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_shop_logout + target: sylius_shop_homepage + invalidate_session: false + + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + access_control: + - { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS } + - { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } + + - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS } + - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER } + + - { path: "%sylius.security.new_api_admin_route%/reset-password-requests", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS } + - { path: "%sylius.security.new_api_admin_route%/authentication-token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } + - { path: "%sylius.security.new_api_shop_route%/authentication-token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS } diff --git a/tests/Application/config/sylius/1.13/bundles.php b/tests/Application/config/sylius/1.13/bundles.php new file mode 100644 index 0000000..e615f85 --- /dev/null +++ b/tests/Application/config/sylius/1.13/bundles.php @@ -0,0 +1,14 @@ + ['all' => true], +]; diff --git a/tests/Application/config/sylius/1.13/packages/security.yaml b/tests/Application/config/sylius/1.13/packages/security.yaml new file mode 100644 index 0000000..6745ae8 --- /dev/null +++ b/tests/Application/config/sylius/1.13/packages/security.yaml @@ -0,0 +1,124 @@ +security: + enable_authenticator_manager: true + providers: + sylius_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_api_admin_user_provider: + id: sylius.admin_user_provider.email_or_name_based + sylius_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + sylius_api_shop_user_provider: + id: sylius.shop_user_provider.email_or_name_based + + password_hashers: + Sylius\Component\User\Model\UserInterface: argon2i + firewalls: + admin: + switch_user: true + context: admin + pattern: "%sylius.security.admin_regex%" + provider: sylius_admin_user_provider + form_login: + provider: sylius_admin_user_provider + login_path: sylius_admin_login + check_path: sylius_admin_login_check + failure_path: sylius_admin_login + default_target_path: sylius_admin_dashboard + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_admin_security_token + csrf_token_id: admin_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + path: "/%sylius_admin.path_name%" + name: APP_ADMIN_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_admin_logout + target: sylius_admin_login + + new_api_admin_user: + pattern: "%sylius.security.new_api_admin_regex%/.*" + provider: sylius_api_admin_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_admin_route%/administrators/token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + new_api_shop_user: + pattern: "%sylius.security.new_api_shop_regex%/.*" + provider: sylius_api_shop_user_provider + stateless: true + entry_point: jwt + json_login: + check_path: "%sylius.security.new_api_shop_route%/customers/token" + username_path: email + password_path: password + success_handler: lexik_jwt_authentication.handler.authentication_success + failure_handler: lexik_jwt_authentication.handler.authentication_failure + jwt: true + + shop: + switch_user: { role: ROLE_ALLOWED_TO_SWITCH } + context: shop + pattern: "%sylius.security.shop_regex%" + provider: sylius_shop_user_provider + form_login: + success_handler: sylius.authentication.success_handler + failure_handler: sylius.authentication.failure_handler + provider: sylius_shop_user_provider + login_path: sylius_shop_login + check_path: sylius_shop_login_check + failure_path: sylius_shop_login + default_target_path: sylius_shop_homepage + use_forward: false + use_referer: true + enable_csrf: true + csrf_parameter: _csrf_shop_security_token + csrf_token_id: shop_authenticate + remember_me: + secret: "%env(APP_SECRET)%" + name: APP_SHOP_REMEMBER_ME + lifetime: 31536000 + remember_me_parameter: _remember_me + logout: + path: sylius_shop_logout + target: sylius_shop_homepage + invalidate_session: false + + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + image_resolver: + pattern: ^/media/cache/resolve + security: false + + access_control: + - { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS } + - { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } + - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } + + - { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS } + - { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS } + + - { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS } + - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER } + + - { path: "%sylius.security.new_api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS } + - { path: "%sylius.security.new_api_admin_route%/administrators/token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } + - { path: "%sylius.security.new_api_shop_route%/customers/token", role: PUBLIC_ACCESS } + - { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS } \ No newline at end of file diff --git a/tests/Application/package.json b/tests/Application/package.json index fbf8527..b428c24 100644 --- a/tests/Application/package.json +++ b/tests/Application/package.json @@ -1,31 +1,13 @@ { - "dependencies": { - "jquery": "^2.2.0", - "lightbox2": "^2.9.0", - "semantic-ui-css": "^2.2.0" - }, - "devDependencies": { - "gulp": "^3.9.1", - "gulp-chug": "^0.5", - "gulp-concat": "^2.6.0", - "gulp-debug": "^2.1.2", - "gulp-if": "^2.0.0", - "gulp-livereload": "^3.8.1", - "gulp-order": "^1.1.1", - "gulp-sass": "^2.3.0", - "gulp-sourcemaps": "^1.6.0", - "gulp-uglify": "^1.5.1", - "gulp-uglifycss": "^1.0.5", - "merge-stream": "^1.0.0", - "yargs": "^6.4.0" - }, + "license": "UNLICENSED", "scripts": { - "gulp": "gulp" + "build": "encore dev", + "build:prod": "encore production", + "postinstall": "semantic-ui-css-patch", + "lint": "yarn lint:js", + "watch": "encore dev --watch" }, - "repository": { - "type": "git", - "url": "git+https://github.com/Sylius/Sylius.git" - }, - "author": "Paweł Jędrzejewski", - "license": "MIT" + "devDependencies": { + "@sylius-ui/frontend": "^1.0" + } } diff --git a/tests/Application/public/favicon.ico b/tests/Application/public/favicon.ico new file mode 100644 index 0000000..592f7a8 Binary files /dev/null and b/tests/Application/public/favicon.ico differ diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php new file mode 100644 index 0000000..980e3e7 --- /dev/null +++ b/tests/Application/public/index.php @@ -0,0 +1,36 @@ +handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/tests/Application/public/robots.txt b/tests/Application/public/robots.txt new file mode 100644 index 0000000..214e411 --- /dev/null +++ b/tests/Application/public/robots.txt @@ -0,0 +1,4 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: * diff --git a/tests/Application/src/Entity/.gitignore b/tests/Application/src/Entity/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/templates/.gitignore b/tests/Application/templates/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/templates/bundles/SyliusAdminBundle/Layout/_logo.html.twig b/tests/Application/templates/bundles/SyliusAdminBundle/Layout/_logo.html.twig new file mode 100644 index 0000000..1d9fa7d --- /dev/null +++ b/tests/Application/templates/bundles/SyliusAdminBundle/Layout/_logo.html.twig @@ -0,0 +1,5 @@ + +
+ +
+
diff --git a/tests/Application/templates/bundles/SyliusAdminBundle/Security/_content.html.twig b/tests/Application/templates/bundles/SyliusAdminBundle/Security/_content.html.twig new file mode 100644 index 0000000..ce17621 --- /dev/null +++ b/tests/Application/templates/bundles/SyliusAdminBundle/Security/_content.html.twig @@ -0,0 +1,6 @@ +{% include '@SyliusUi/Security/_login.html.twig' + with { + 'action': path('sylius_admin_login_check'), + 'paths': {'logo': asset('build/admin/images/logo.png', 'admin')} +} +%} diff --git a/tests/Application/templates/bundles/SyliusAdminBundle/_scripts.html.twig b/tests/Application/templates/bundles/SyliusAdminBundle/_scripts.html.twig new file mode 100644 index 0000000..ddc99ce --- /dev/null +++ b/tests/Application/templates/bundles/SyliusAdminBundle/_scripts.html.twig @@ -0,0 +1,2 @@ +{{ encore_entry_script_tags('admin-entry', null, 'admin') }} +{{ encore_entry_script_tags('bitbag-mercanet_bnp_paribas-admin', null, 'mercanet_bnp_paribas_admin') }} diff --git a/tests/Application/templates/bundles/SyliusAdminBundle/_styles.html.twig b/tests/Application/templates/bundles/SyliusAdminBundle/_styles.html.twig new file mode 100644 index 0000000..7c39987 --- /dev/null +++ b/tests/Application/templates/bundles/SyliusAdminBundle/_styles.html.twig @@ -0,0 +1,2 @@ +{{ encore_entry_link_tags('admin-entry', null, 'admin') }} +{{ encore_entry_link_tags('bitbag-mercanet_bnp_paribas-admin', null, 'mercanet_bnp_paribas_admin') }} diff --git a/tests/Application/templates/bundles/SyliusShopBundle/Homepage/_banner.html.twig b/tests/Application/templates/bundles/SyliusShopBundle/Homepage/_banner.html.twig new file mode 100644 index 0000000..bb594f7 --- /dev/null +++ b/tests/Application/templates/bundles/SyliusShopBundle/Homepage/_banner.html.twig @@ -0,0 +1,2 @@ +Sylius + diff --git a/tests/Application/templates/bundles/SyliusShopBundle/Layout/Header/_logo.html.twig b/tests/Application/templates/bundles/SyliusShopBundle/Layout/Header/_logo.html.twig new file mode 100644 index 0000000..84b8df5 --- /dev/null +++ b/tests/Application/templates/bundles/SyliusShopBundle/Layout/Header/_logo.html.twig @@ -0,0 +1,5 @@ + diff --git a/tests/Application/templates/bundles/SyliusShopBundle/_scripts.html.twig b/tests/Application/templates/bundles/SyliusShopBundle/_scripts.html.twig new file mode 100644 index 0000000..be9706a --- /dev/null +++ b/tests/Application/templates/bundles/SyliusShopBundle/_scripts.html.twig @@ -0,0 +1,2 @@ +{{ encore_entry_script_tags('shop-entry', null, 'shop') }} +{{ encore_entry_script_tags('bitbag-mercanet_bnp_paribas-shop', null, 'mercanet_bnp_paribas_shop') }} diff --git a/tests/Application/templates/bundles/SyliusShopBundle/_styles.html.twig b/tests/Application/templates/bundles/SyliusShopBundle/_styles.html.twig new file mode 100644 index 0000000..16cece0 --- /dev/null +++ b/tests/Application/templates/bundles/SyliusShopBundle/_styles.html.twig @@ -0,0 +1,2 @@ +{{ encore_entry_link_tags('shop-entry', null, 'shop') }} +{{ encore_entry_link_tags('bitbag-mercanet_bnp_paribas-shop', null, 'mercanet_bnp_paribas_shop') }} diff --git a/tests/Application/translations/.gitignore b/tests/Application/translations/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Application/webpack.config.js b/tests/Application/webpack.config.js new file mode 100644 index 0000000..62ae1d1 --- /dev/null +++ b/tests/Application/webpack.config.js @@ -0,0 +1,51 @@ +const path = require('path'); +const Encore = require('@symfony/webpack-encore'); +const [bitbagMercanetBnpShop, bitbagMercanetBnpAdmin] = require('../../webpack.config.js'); + + +const syliusBundles = path.resolve(__dirname, '../../vendor/sylius/sylius/src/Sylius/Bundle/'); +const uiBundleScripts = path.resolve(syliusBundles, 'UiBundle/Resources/private/js/'); +const uiBundleResources = path.resolve(syliusBundles, 'UiBundle/Resources/private/'); + +// Shop config +Encore + .setOutputPath('public/build/shop/') + .setPublicPath('/build/shop') + .addEntry('shop-entry', '../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private/entry.js') + .disableSingleRuntimeChunk() + .cleanupOutputBeforeBuild() + .enableSourceMaps(!Encore.isProduction()) + .enableVersioning(Encore.isProduction()) + .enableSassLoader(); + +const shopConfig = Encore.getWebpackConfig(); + +shopConfig.resolve.alias['sylius/ui'] = uiBundleScripts; +shopConfig.resolve.alias['sylius/ui-resources'] = uiBundleResources; +shopConfig.resolve.alias['sylius/bundle'] = syliusBundles; +shopConfig.resolve.alias['chart.js/dist/Chart.min'] = path.resolve(__dirname, 'node_modules/chart.js/dist/chart.min.js'); +shopConfig.name = 'shop'; + +Encore.reset(); + +// Admin config +Encore + .setOutputPath('public/build/admin/') + .setPublicPath('/build/admin') + .addEntry('admin-entry', '../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private/entry.js') + .disableSingleRuntimeChunk() + .cleanupOutputBeforeBuild() + .enableSourceMaps(!Encore.isProduction()) + .enableVersioning(Encore.isProduction()) + .enableSassLoader(); + +const adminConfig = Encore.getWebpackConfig(); + +adminConfig.resolve.alias['sylius/ui'] = uiBundleScripts; +adminConfig.resolve.alias['sylius/ui-resources'] = uiBundleResources; +adminConfig.resolve.alias['sylius/bundle'] = syliusBundles; +adminConfig.resolve.alias['chart.js/dist/Chart.min'] = path.resolve(__dirname, 'node_modules/chart.js/dist/chart.min.js'); +adminConfig.externals = Object.assign({}, adminConfig.externals, { window: 'window', document: 'document' }); +adminConfig.name = 'admin'; + +module.exports = [shopConfig, adminConfig, bitbagMercanetBnpShop, bitbagMercanetBnpAdmin]; diff --git a/tests/Application/yarn.lock b/tests/Application/yarn.lock deleted file mode 100644 index 43e5233..0000000 --- a/tests/Application/yarn.lock +++ /dev/null @@ -1,2532 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@gulp-sourcemaps/map-sources@1.X": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" - dependencies: - normalize-path "^2.0.1" - through2 "^2.0.3" - -abbrev@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" - -acorn@4.X: - version "4.0.11" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-regex@^0.2.0, ansi-regex@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -aproba@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" - -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - -array-uniq@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -async-foreach@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" - -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -atob@~1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -beeper@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -body-parser@~1.14.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9" - dependencies: - bytes "2.2.0" - content-type "~1.0.1" - debug "~2.2.0" - depd "~1.1.0" - http-errors "~1.3.1" - iconv-lite "0.4.13" - on-finished "~2.3.0" - qs "5.2.0" - raw-body "~2.1.5" - type-is "~1.6.10" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -brace-expansion@^1.0.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -buffer-shims@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -bytes@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588" - -bytes@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174" - dependencies: - ansi-styles "^1.1.0" - escape-string-regexp "^1.0.0" - has-ansi "^0.1.0" - strip-ansi "^0.3.0" - supports-color "^0.2.0" - -chalk@^1.0.0, chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - -clone-stats@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" - -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - -clone@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" - -clone@^1.0.0, clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" - -cloneable-readable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" - dependencies: - inherits "^2.0.1" - process-nextick-args "^1.0.6" - through2 "^2.0.1" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -concat-with-sourcemaps@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6" - dependencies: - source-map "^0.5.1" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -content-type@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" - -convert-source-map@1.X: - version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cross-spawn@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -css@2.X: - version "2.2.1" - resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" - dependencies: - inherits "^2.0.1" - source-map "^0.1.38" - source-map-resolve "^0.3.0" - urix "^0.1.0" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - dependencies: - array-find-index "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -dateformat@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" - -deap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/deap/-/deap-1.0.0.tgz#b148bf82430a27699b7483a03eb6b67585bfc888" - -debug-fabulous@0.0.X: - version "0.0.4" - resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763" - dependencies: - debug "2.X" - lazy-debug-legacy "0.0.X" - object-assign "4.1.0" - -debug@2.X, debug@^2.1.0, debug@^2.2.0: - version "2.6.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a" - dependencies: - ms "0.7.3" - -debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -defaults@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - dependencies: - clone "^1.0.2" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -depd@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" - -deprecated@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" - -detect-file@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" - dependencies: - fs-exists-sync "^0.1.0" - -detect-newline@2.X: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - -duplexer2@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" - dependencies: - readable-stream "~1.1.9" - -duplexer@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - -duplexify@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" - dependencies: - end-of-stream "1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -end-of-stream@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" - dependencies: - once "~1.3.0" - -end-of-stream@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" - dependencies: - once "~1.3.0" - -error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -event-stream@^3.1.7: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -expand-tilde@^1.2.1, expand-tilde@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" - dependencies: - os-homedir "^1.0.1" - -extend@^3.0.0, extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" - -fancy-log@^1.0.0, fancy-log@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" - dependencies: - chalk "^1.1.1" - time-stamp "^1.0.0" - -faye-websocket@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.7.3.tgz#cc4074c7f4a4dfd03af54dd65c354b135132ce11" - dependencies: - websocket-driver ">=0.3.6" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -find-index@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -findup-sync@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" - dependencies: - detect-file "^0.1.0" - is-glob "^2.0.1" - micromatch "^2.3.7" - resolve-dir "^0.1.0" - -fined@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" - dependencies: - expand-tilde "^1.2.1" - lodash.assignwith "^4.0.7" - lodash.isempty "^4.2.1" - lodash.isplainobject "^4.0.4" - lodash.isstring "^4.0.1" - lodash.pick "^4.2.1" - parse-filepath "^1.0.1" - -first-chunk-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" - -flagged-respawn@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -fork-stream@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/fork-stream/-/fork-stream-0.0.4.tgz#db849fce77f6708a5f8f386ae533a0907b54ae70" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - -fs-exists-sync@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fstream@^1.0.0, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -gauge@~2.7.1: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gaze@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" - dependencies: - globule "~0.1.0" - -gaze@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" - dependencies: - globule "^1.0.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob-stream@^3.1.5: - version "3.1.18" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" - dependencies: - glob "^4.3.1" - glob2base "^0.0.12" - minimatch "^2.0.1" - ordered-read-streams "^0.1.0" - through2 "^0.6.1" - unique-stream "^1.0.0" - -glob-watcher@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" - dependencies: - gaze "^0.5.1" - -glob2base@^0.0.12: - version "0.0.12" - resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" - dependencies: - find-index "^0.1.1" - -glob@^4.3.1: - version "4.5.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "^2.0.1" - once "^1.3.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@~3.1.21: - version "3.1.21" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" - dependencies: - graceful-fs "~1.2.0" - inherits "1" - minimatch "~0.2.11" - -global-modules@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" - dependencies: - global-prefix "^0.1.4" - is-windows "^0.2.0" - -global-prefix@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" - dependencies: - homedir-polyfill "^1.0.0" - ini "^1.3.4" - is-windows "^0.2.0" - which "^1.2.12" - -globule@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f" - dependencies: - glob "~7.1.1" - lodash "~4.16.4" - minimatch "~3.0.2" - -globule@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" - dependencies: - glob "~3.1.21" - lodash "~1.0.1" - minimatch "~0.2.11" - -glogg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" - dependencies: - sparkles "^1.0.0" - -graceful-fs@4.X, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -graceful-fs@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" - dependencies: - natives "^1.1.0" - -graceful-fs@~1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" - -gulp-chug@^0.5: - version "0.5.1" - resolved "https://registry.yarnpkg.com/gulp-chug/-/gulp-chug-0.5.1.tgz#b1918881b2bb52fd47e3cb2371587fca4c45e5c6" - dependencies: - gulp-util "^3.0.7" - lodash "^4.0.0" - resolve "^1.1.6" - through2 "^2.0.0" - -gulp-concat@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353" - dependencies: - concat-with-sourcemaps "^1.0.0" - through2 "^2.0.0" - vinyl "^2.0.0" - -gulp-debug@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/gulp-debug/-/gulp-debug-2.1.2.tgz#2f5fe5f64bcd1f4cf189c160e080c8ad06543094" - dependencies: - chalk "^1.0.0" - gulp-util "^3.0.0" - object-assign "^4.0.1" - plur "^2.0.0" - stringify-object "^2.3.0" - through2 "^2.0.0" - tildify "^1.1.2" - -gulp-if@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/gulp-if/-/gulp-if-2.0.2.tgz#a497b7e7573005041caa2bc8b7dda3c80444d629" - dependencies: - gulp-match "^1.0.3" - ternary-stream "^2.0.1" - through2 "^2.0.1" - -gulp-livereload@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-3.8.1.tgz#00f744b2d749d3e9e3746589c8a44acac779b50f" - dependencies: - chalk "^0.5.1" - debug "^2.1.0" - event-stream "^3.1.7" - gulp-util "^3.0.2" - lodash.assign "^3.0.0" - mini-lr "^0.1.8" - -gulp-match@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e" - dependencies: - minimatch "^3.0.3" - -gulp-order@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/gulp-order/-/gulp-order-1.1.1.tgz#0b8ef0833235bed65f1efbc79c6aed97b1db41e9" - dependencies: - minimatch "~0.2.14" - through "~2.3.4" - -gulp-sass@^2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-2.3.2.tgz#82b7ab90fe902cdc34c04f180d92f2c34902dd52" - dependencies: - gulp-util "^3.0" - lodash.clonedeep "^4.3.2" - node-sass "^3.4.2" - through2 "^2.0.0" - vinyl-sourcemaps-apply "^0.2.0" - -gulp-sourcemaps@^1.6.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.12.0.tgz#786f97c94a0f968492465d70558e04242c679598" - dependencies: - "@gulp-sourcemaps/map-sources" "1.X" - acorn "4.X" - convert-source-map "1.X" - css "2.X" - debug-fabulous "0.0.X" - detect-newline "2.X" - graceful-fs "4.X" - source-map "0.X" - strip-bom "2.X" - through2 "2.X" - vinyl "1.X" - -gulp-uglify@^1.5.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-1.5.4.tgz#524788d87666d09f9d0c21fb2177f90039a658c9" - dependencies: - deap "^1.0.0" - fancy-log "^1.0.0" - gulp-util "^3.0.0" - isobject "^2.0.0" - through2 "^2.0.0" - uglify-js "2.6.4" - uglify-save-license "^0.4.1" - vinyl-sourcemaps-apply "^0.2.0" - -gulp-uglifycss@^1.0.5: - version "1.0.8" - resolved "https://registry.yarnpkg.com/gulp-uglifycss/-/gulp-uglifycss-1.0.8.tgz#a1895c5614b4850ea42de9199fc5c4fb75d23e7c" - dependencies: - gulp-util "^3.0.8" - through2 "^2.0.3" - uglifycss "^0.0.25" - -gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.2, gulp-util@^3.0.7, gulp-util@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" - dependencies: - array-differ "^1.0.0" - array-uniq "^1.0.2" - beeper "^1.0.0" - chalk "^1.0.0" - dateformat "^2.0.0" - fancy-log "^1.1.0" - gulplog "^1.0.0" - has-gulplog "^0.1.0" - lodash._reescape "^3.0.0" - lodash._reevaluate "^3.0.0" - lodash._reinterpolate "^3.0.0" - lodash.template "^3.0.0" - minimist "^1.1.0" - multipipe "^0.1.2" - object-assign "^3.0.0" - replace-ext "0.0.1" - through2 "^2.0.0" - vinyl "^0.5.0" - -gulp@^3.9.1: - version "3.9.1" - resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" - dependencies: - archy "^1.0.0" - chalk "^1.0.0" - deprecated "^0.0.1" - gulp-util "^3.0.0" - interpret "^1.0.0" - liftoff "^2.1.0" - minimist "^1.1.0" - orchestrator "^0.3.0" - pretty-hrtime "^1.0.0" - semver "^4.1.0" - tildify "^1.0.0" - v8flags "^2.0.2" - vinyl-fs "^0.3.0" - -gulplog@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" - dependencies: - glogg "^1.0.0" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -has-ansi@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e" - dependencies: - ansi-regex "^0.2.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-gulplog@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" - dependencies: - sparkles "^1.0.0" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -homedir-polyfill@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^2.1.4: - version "2.4.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" - -http-errors@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942" - dependencies: - inherits "~2.0.1" - statuses "1" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.13: - version "0.4.13" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" - -in-publish@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" - -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -ini@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -interpret@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -irregular-plurals@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.2.0.tgz#38f299834ba8c00c30be9c554e137269752ff3ac" - -is-absolute@^0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" - dependencies: - is-relative "^0.2.1" - is-windows "^0.2.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.0.2, is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-plain-obj@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - -is-relative@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" - dependencies: - is-unc-path "^0.1.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-unc-path@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" - dependencies: - unc-path-regex "^0.1.0" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -is-windows@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - -jquery@^2.2.0, jquery@x.*: - version "2.2.4" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02" - -js-base64@^2.1.8: - version "2.1.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" - dependencies: - assert-plus "1.0.0" - extsprintf "1.0.2" - json-schema "0.2.3" - verror "1.3.6" - -kind-of@^3.0.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.0.tgz#b58abe4d5c044ad33726a8c1525b48cf891bff07" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lazy-debug-legacy@0.0.X: - version "0.0.1" - resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -liftoff@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" - dependencies: - extend "^3.0.0" - findup-sync "^0.4.2" - fined "^1.0.1" - flagged-respawn "^0.3.2" - lodash.isplainobject "^4.0.4" - lodash.isstring "^4.0.1" - lodash.mapvalues "^4.4.0" - rechoir "^0.6.2" - resolve "^1.1.7" - -lightbox2@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/lightbox2/-/lightbox2-2.9.0.tgz#f9a2fdb41ab3ca94bf0f769210b59bb14a5d5f62" - -livereload-js@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.2.2.tgz#6c87257e648ab475bc24ea257457edcc1f8d0bc2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basetostring@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" - -lodash._basevalues@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" - -lodash._bindcallback@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._createassigner@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" - dependencies: - lodash._bindcallback "^3.0.0" - lodash._isiterateecall "^3.0.0" - lodash.restparam "^3.0.0" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - -lodash._reescape@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" - -lodash._reevaluate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - -lodash._root@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - -lodash.assign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa" - dependencies: - lodash._baseassign "^3.0.0" - lodash._createassigner "^3.0.0" - lodash.keys "^3.0.0" - -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.assignwith@^4.0.7: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" - -lodash.clonedeep@^4.3.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - -lodash.escape@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" - dependencies: - lodash._root "^3.0.0" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.isempty@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" - -lodash.isplainobject@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - -lodash.mapvalues@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - -lodash.restparam@^3.0.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - -lodash.template@^3.0.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" - dependencies: - lodash._basecopy "^3.0.0" - lodash._basetostring "^3.0.0" - lodash._basevalues "^3.0.0" - lodash._isiterateecall "^3.0.0" - lodash._reinterpolate "^3.0.0" - lodash.escape "^3.0.0" - lodash.keys "^3.0.0" - lodash.restparam "^3.0.0" - lodash.templatesettings "^3.0.0" - -lodash.templatesettings@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.escape "^3.0.0" - -lodash@^4.0.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -lodash@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" - -lodash@~4.16.4: - version "4.16.6" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" - -lru-cache@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" - dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" - -map-cache@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - -meow@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -merge-stream@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - dependencies: - readable-stream "^2.0.1" - -micromatch@^2.3.7: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -mime-db@~1.27.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" - -mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.7: - version "2.1.15" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" - dependencies: - mime-db "~1.27.0" - -mini-lr@^0.1.8: - version "0.1.9" - resolved "https://registry.yarnpkg.com/mini-lr/-/mini-lr-0.1.9.tgz#02199d27347953d1fd1d6dbded4261f187b2d0f6" - dependencies: - body-parser "~1.14.0" - debug "^2.2.0" - faye-websocket "~0.7.2" - livereload-js "^2.2.0" - parseurl "~1.3.0" - qs "~2.2.3" - -minimatch@^2.0.1: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimatch@~0.2.11, minimatch@~0.2.14: - version "0.2.14" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" - dependencies: - lru-cache "2" - sigmund "~1.0.0" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.1.0, minimist@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -ms@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" - -multipipe@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" - dependencies: - duplexer2 "0.0.2" - -nan@^2.3.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" - -natives@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" - -node-gyp@^3.3.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.0.tgz#7474f63a3a0501161dda0b6341f022f14c423fa6" - dependencies: - fstream "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - minimatch "^3.0.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - osenv "0" - request "2" - rimraf "2" - semver "~5.3.0" - tar "^2.0.0" - which "1" - -node-sass@^3.4.2: - version "3.13.1" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.13.1.tgz#7240fbbff2396304b4223527ed3020589c004fc2" - dependencies: - async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.3.2" - node-gyp "^3.3.1" - npmlog "^4.0.0" - request "^2.61.0" - sass-graph "^2.1.1" - -"nopt@2 || 3": - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.3.8" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.1" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" - -object-assign@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@~1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - -orchestrator@^0.3.0: - version "0.3.8" - resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" - dependencies: - end-of-stream "~0.1.5" - sequencify "~0.0.7" - stream-consume "~0.1.0" - -ordered-read-streams@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" - -os-homedir@^1.0.0, os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@0: - version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -parse-filepath@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" - dependencies: - is-absolute "^0.2.3" - map-cache "^0.2.0" - path-root "^0.1.1" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - -parseurl@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-root-regex@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" - -path-root@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" - dependencies: - path-root-regex "^0.1.0" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - dependencies: - through "~2.3" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -plur@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" - dependencies: - irregular-plurals "^1.0.0" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -pretty-hrtime@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - -process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -pseudomap@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -qs@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be" - -qs@~2.2.3: - version "2.2.5" - resolved "https://registry.yarnpkg.com/qs/-/qs-2.2.5.tgz#1088abaf9dcc0ae5ae45b709e6c6b5888b23923c" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -randomatic@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" - dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" - -raw-body@~2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" - dependencies: - bytes "2.4.0" - iconv-lite "0.4.13" - unpipe "1.0.0" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.5: - version "2.2.9" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" - dependencies: - buffer-shims "~1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~1.0.0" - util-deprecate "~1.0.1" - -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" - dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" - -remove-trailing-separator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -replace-ext@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" - -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - -request@2, request@^2.61.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -resolve-dir@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" - dependencies: - expand-tilde "^1.2.2" - global-modules "^0.2.3" - -resolve-url@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - -resolve@^1.1.6, resolve@^1.1.7: - version "1.3.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" - dependencies: - path-parse "^1.0.5" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" - dependencies: - glob "^7.0.5" - -safe-buffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" - -sass-graph@^2.1.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.2.tgz#f4d6c95b546ea2a09d14176d0fc1a07ee2b48354" - dependencies: - glob "^7.0.0" - lodash "^4.0.0" - scss-tokenizer "^0.2.1" - yargs "^6.6.0" - -scss-tokenizer@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.1.tgz#07c0cc577bb7ab4d08fd900185adbf4bc844141d" - dependencies: - js-base64 "^2.1.8" - source-map "^0.4.2" - -semantic-ui-css@^2.2.0: - version "2.2.10" - resolved "https://registry.yarnpkg.com/semantic-ui-css/-/semantic-ui-css-2.2.10.tgz#f8f4470dbeffca0f0f3ff4fb71a35c71e88ad89c" - dependencies: - jquery x.* - -"semver@2 || 3 || 4 || 5", semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -semver@^4.1.0: - version "4.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" - -sequencify@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -sigmund@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -source-map-resolve@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" - dependencies: - atob "~1.1.0" - resolve-url "~0.2.1" - source-map-url "~0.3.0" - urix "~0.1.0" - -source-map-url@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" - -source-map@0.X, source-map@^0.5.1, source-map@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - -source-map@^0.1.38: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -sparkles@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - dependencies: - through "2" - -sshpk@^1.7.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -statuses@1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - dependencies: - duplexer "~0.1.1" - -stream-consume@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" - dependencies: - buffer-shims "~1.0.0" - -stringify-object@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-2.4.0.tgz#c62d11023eb21fe2d9b087be039a26df3b22a09d" - dependencies: - is-plain-obj "^1.0.0" - is-regexp "^1.0.0" - -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220" - dependencies: - ansi-regex "^0.2.1" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-bom@2.X, strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - -strip-bom@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" - dependencies: - first-chunk-stream "^1.0.0" - is-utf8 "^0.2.0" - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - dependencies: - get-stdin "^4.0.1" - -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -tar@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -ternary-stream@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.0.1.tgz#064e489b4b5bf60ba6a6b7bc7f2f5c274ecf8269" - dependencies: - duplexify "^3.5.0" - fork-stream "^0.0.4" - merge-stream "^1.0.0" - through2 "^2.0.1" - -through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - -through2@^0.6.1: - version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" - dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" - -through@2, through@~2.3, through@~2.3.1, through@~2.3.4: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -tildify@^1.0.0, tildify@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" - dependencies: - os-homedir "^1.0.0" - -time-stamp@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" - -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-is@~1.6.10: - version "1.6.15" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.15" - -uglify-js@2.6.4: - version "2.6.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.4.tgz#65ea2fb3059c9394692f15fed87c2b36c16b9adf" - dependencies: - async "~0.2.6" - source-map "~0.5.1" - uglify-to-browserify "~1.0.0" - yargs "~3.10.0" - -uglify-save-license@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uglifycss@^0.0.25: - version "0.0.25" - resolved "https://registry.yarnpkg.com/uglifycss/-/uglifycss-0.0.25.tgz#bea72bf4979eacef13a302cf47b2d1af3f344197" - -unc-path-regex@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" - -unique-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" - -unpipe@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -urix@^0.1.0, urix@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - -v8flags@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" - dependencies: - user-home "^1.1.1" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" - dependencies: - extsprintf "1.0.2" - -vinyl-fs@^0.3.0: - version "0.3.14" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" - dependencies: - defaults "^1.0.0" - glob-stream "^3.1.5" - glob-watcher "^0.0.6" - graceful-fs "^3.0.0" - mkdirp "^0.5.0" - strip-bom "^1.0.0" - through2 "^0.6.1" - vinyl "^0.4.0" - -vinyl-sourcemaps-apply@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" - dependencies: - source-map "^0.5.1" - -vinyl@1.X: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" - dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" - -vinyl@^0.4.0: - version "0.4.6" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" - dependencies: - clone "^0.2.0" - clone-stats "^0.0.1" - -vinyl@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" - dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" - -vinyl@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c" - dependencies: - clone "^1.0.0" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - is-stream "^1.1.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - -websocket-driver@>=0.3.6: - version "0.6.5" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" - dependencies: - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - -which@1, which@^1.2.12, which@^1.2.9: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" - dependencies: - string-width "^1.0.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -yallist@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - dependencies: - camelcase "^3.0.0" - -yargs@^6.4.0, yargs@^6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" diff --git a/tests/Behat/Context/Setup/ChannelContext.php b/tests/Behat/Context/Setup/ChannelContext.php index 0beeff8..5fc8705 100644 --- a/tests/Behat/Context/Setup/ChannelContext.php +++ b/tests/Behat/Context/Setup/ChannelContext.php @@ -1,5 +1,14 @@ - */ final class ChannelContext implements Context { - /** - * @var DefaultChannelFactory - */ + /** @var DefaultChannelFactory */ private $defaultChannelFactory; - /** - * @param DefaultChannelFactory $defaultChannelFactory - */ public function __construct(DefaultChannelFactory $defaultChannelFactory) { $this->defaultChannelFactory = $defaultChannelFactory; @@ -38,4 +39,4 @@ public function addingANewChannelIn() { $this->defaultChannelFactory->create('FR', 'France', 'EUR'); } -} \ No newline at end of file +} diff --git a/tests/Behat/Context/Setup/MercanetBnpParibasContext.php b/tests/Behat/Context/Setup/MercanetBnpParibasContext.php index c1802a0..8d8343d 100644 --- a/tests/Behat/Context/Setup/MercanetBnpParibasContext.php +++ b/tests/Behat/Context/Setup/MercanetBnpParibasContext.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasContext implements Context { - /** - * @var SharedStorageInterface - */ + /** @var SharedStorageInterface */ private $sharedStorage; - /** - * @var PaymentMethodRepositoryInterface - */ + /** @var PaymentMethodRepositoryInterface */ private $paymentMethodRepository; - /** - * @var ExampleFactoryInterface - */ + /** @var ExampleFactoryInterface */ private $paymentMethodExampleFactory; - /** - * @var FactoryInterface - */ + /** @var FactoryInterface */ private $paymentMethodTranslationFactory; - /** - * @var ObjectManager - */ + /** @var ObjectManager */ private $paymentMethodManager; - /** - * @param SharedStorageInterface $sharedStorage - * @param PaymentMethodRepositoryInterface $paymentMethodRepository - * @param ExampleFactoryInterface $paymentMethodExampleFactory - * @param FactoryInterface $paymentMethodTranslationFactory - * @param ObjectManager $paymentMethodManager - */ public function __construct( SharedStorageInterface $sharedStorage, PaymentMethodRepositoryInterface $paymentMethodRepository, ExampleFactoryInterface $paymentMethodExampleFactory, FactoryInterface $paymentMethodTranslationFactory, - ObjectManager $paymentMethodManager + ObjectManager $paymentMethodManager, ) { $this->sharedStorage = $sharedStorage; $this->paymentMethodRepository = $paymentMethodRepository; @@ -75,7 +64,7 @@ public function __construct( */ public function theStoreHasAPaymentMethodWithACodeAndMercanetBnpParibasCheckoutGateway( $paymentMethodName, - $paymentMethodCode + $paymentMethodCode, ) { $paymentMethod = $this->createPaymentMethod($paymentMethodName, $paymentMethodCode, 'Mercanet Bnp Paribas'); $paymentMethod->getGatewayConfig()->setConfig([ @@ -103,9 +92,8 @@ private function createPaymentMethod( $code, $description = '', $addForCurrentChannel = true, - $position = null + $position = null, ) { - /** @var PaymentMethodInterface $paymentMethod */ $paymentMethod = $this->paymentMethodExampleFactory->create([ 'name' => ucfirst($name), diff --git a/tests/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php b/tests/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php index 11f8013..13d531e 100644 --- a/tests/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php +++ b/tests/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php @@ -1,5 +1,14 @@ - */ final class ManagingPaymentMethodsContext implements Context { - /** - * @var CreatePageInterface - */ + /** @var CreatePageInterface */ private $createPage; - /** - * @param CreatePageInterface $createPage - */ public function __construct(CreatePageInterface $createPage) { $this->createPage = $createPage; diff --git a/tests/Behat/Context/Ui/Shop/MercanetBnpParibasContext.php b/tests/Behat/Context/Ui/Shop/MercanetBnpParibasContext.php index 9029708..e486a57 100644 --- a/tests/Behat/Context/Ui/Shop/MercanetBnpParibasContext.php +++ b/tests/Behat/Context/Ui/Shop/MercanetBnpParibasContext.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasContext implements Context { - /** - * @var MercanetBnpParibasMocker - */ + /** @var MercanetBnpParibasMocker */ private $mercanetBnpParibasMocker; - /** - * @var CompletePageInterface - */ + /** @var CompletePageInterface */ private $summaryPage; - /** - * @var MercanetBnpParibasCheckoutPageInterface - */ + /** @var MercanetBnpParibasCheckoutPageInterface */ private $mercanetBnpParibasCheckoutPage; - /** - * @var ShowPageInterface - */ + /** @var ShowPageInterface */ private $orderDetails; - /** - * @param CompletePageInterface $summaryPage - * @param MercanetBnpParibasMocker $mercanetBnpParibasMocker - * @param MercanetBnpParibasCheckoutPageInterface $mercanetBnpParibasCheckoutPage - * @param ShowPageInterface $orderDetails - */ public function __construct( MercanetBnpParibasMocker $mercanetBnpParibasMocker, CompletePageInterface $summaryPage, MercanetBnpParibasCheckoutPageInterface $mercanetBnpParibasCheckoutPage, - ShowPageInterface $orderDetails - ) - { + ShowPageInterface $orderDetails, + ) { $this->orderDetails = $orderDetails; $this->mercanetBnpParibasCheckoutPage = $mercanetBnpParibasCheckoutPage; $this->summaryPage = $summaryPage; @@ -61,8 +52,8 @@ public function __construct( } /** - * @When I confirm my order with Mercanet Bnp Paribas payment * @Given I have confirmed my order with Mercanet Bnp Paribas payment + * @When I confirm my order with Mercanet Bnp Paribas payment */ public function iConfirmMyOrderWithMercanetBnpParibasPayment() { @@ -74,18 +65,18 @@ public function iConfirmMyOrderWithMercanetBnpParibasPayment() */ public function iSignInToMercanetBnpParibasAndPaySuccessfully() { - $this->mercanetBnpParibasMocker->completedPayment(function (){ + $this->mercanetBnpParibasMocker->completedPayment(function () { $this->mercanetBnpParibasCheckoutPage->pay(); }); } /** - * @When I cancel my Mercanet Bnp Paribas payment * @Given I have cancelled Mercanet Bnp Paribas payment + * @When I cancel my Mercanet Bnp Paribas payment */ public function iCancelMyMercanetBnpParibasPayment() { - $this->mercanetBnpParibasMocker->canceledPayment(function (){ + $this->mercanetBnpParibasMocker->canceledPayment(function () { $this->mercanetBnpParibasCheckoutPage->cancel(); }); } @@ -95,8 +86,8 @@ public function iCancelMyMercanetBnpParibasPayment() */ public function iTryToPayAgainMercanetBnpParibasPayment() { - $this->mercanetBnpParibasMocker->completedPayment(function (){ + $this->mercanetBnpParibasMocker->completedPayment(function () { $this->orderDetails->pay(); }); } -} \ No newline at end of file +} diff --git a/tests/Behat/Page/Admin/PaymentMethod/CreatePage.php b/tests/Behat/Page/Admin/PaymentMethod/CreatePage.php index 025604a..4ed59fa 100644 --- a/tests/Behat/Page/Admin/PaymentMethod/CreatePage.php +++ b/tests/Behat/Page/Admin/PaymentMethod/CreatePage.php @@ -1,5 +1,14 @@ - */ class CreatePage extends BaseCreatePage implements CreatePageInterface { /** - * {@inheritdoc} + * @inheritdoc */ public function setMercanetBnpParibasPluginGatewaySecretKey($secretKey) { @@ -27,7 +33,7 @@ public function setMercanetBnpParibasPluginGatewaySecretKey($secretKey) } /** - * {@inheritdoc} + * @inheritdoc */ public function setMercanetBnpParibasPluginGatewayMerchantId($merchantId) { @@ -35,7 +41,7 @@ public function setMercanetBnpParibasPluginGatewayMerchantId($merchantId) } /** - * {@inheritdoc} + * @inheritdoc */ public function setMercanetBnpParibasPluginGatewayKeyVersion($keyVersion) { @@ -43,7 +49,7 @@ public function setMercanetBnpParibasPluginGatewayKeyVersion($keyVersion) } /** - * {@inheritdoc} + * @inheritdoc */ public function setMercanetBnpParibasPluginGatewayEnvironment($environment) { @@ -51,7 +57,7 @@ public function setMercanetBnpParibasPluginGatewayEnvironment($environment) } /** - * {@inheritdoc} + * @inheritdoc */ public function findValidationMessage($message) { diff --git a/tests/Behat/Page/Admin/PaymentMethod/CreatePageInterface.php b/tests/Behat/Page/Admin/PaymentMethod/CreatePageInterface.php index 1013605..32be300 100644 --- a/tests/Behat/Page/Admin/PaymentMethod/CreatePageInterface.php +++ b/tests/Behat/Page/Admin/PaymentMethod/CreatePageInterface.php @@ -1,5 +1,14 @@ - */ interface CreatePageInterface extends BaseCreatePageInterface { /** diff --git a/tests/Behat/Page/External/MercanetBnpParibasCheckoutPage.php b/tests/Behat/Page/External/MercanetBnpParibasCheckoutPage.php index d2642a9..6385c97 100644 --- a/tests/Behat/Page/External/MercanetBnpParibasCheckoutPage.php +++ b/tests/Behat/Page/External/MercanetBnpParibasCheckoutPage.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasCheckoutPage extends Page implements MercanetBnpParibasCheckoutPageInterface { - /** - * @var RepositoryInterface - */ + /** @var RepositoryInterface */ private $securityTokenRepository; - /** - * @param Session $session - * @param array $parameters - * @param RepositoryInterface $securityTokenRepository - */ - public function __construct(Session $session, array $parameters, RepositoryInterface $securityTokenRepository) + public function __construct(Session $session, MinkParameters $parameters, RepositoryInterface $securityTokenRepository) { parent::__construct($session, $parameters); @@ -38,7 +38,7 @@ public function __construct(Session $session, array $parameters, RepositoryInter } /** - * {@inheritDoc} + * @inheritDoc */ public function pay() { @@ -46,19 +46,14 @@ public function pay() } /** - * {@inheritDoc} + * @inheritDoc */ public function cancel() { $this->getDriver()->visit($this->findCaptureToken()->getTargetUrl()); } - /** - * @param array $urlParameters - * - * @return string - */ - protected function getUrl(array $urlParameters = []) + protected function getUrl(array $urlParameters = []): string { return 'https://payment-webinit-mercanet.test.sips-atos.com/rs-services/v2/paymentInit'; } @@ -81,4 +76,4 @@ private function findCaptureToken() throw new \RuntimeException('Cannot find capture token, check if you are after proper checkout steps'); } -} \ No newline at end of file +} diff --git a/tests/Behat/Page/External/MercanetBnpParibasCheckoutPageInterface.php b/tests/Behat/Page/External/MercanetBnpParibasCheckoutPageInterface.php index 8676553..fbcbe1b 100644 --- a/tests/Behat/Page/External/MercanetBnpParibasCheckoutPageInterface.php +++ b/tests/Behat/Page/External/MercanetBnpParibasCheckoutPageInterface.php @@ -1,5 +1,14 @@ - */ interface MercanetBnpParibasCheckoutPageInterface extends PageInterface { /** @@ -30,4 +36,4 @@ public function pay(); * @throws DriverException */ public function cancel(); -} \ No newline at end of file +} diff --git a/tests/Behat/Resources/contexts.yml b/tests/Behat/Resources/contexts.yml deleted file mode 100644 index b9b1a13..0000000 --- a/tests/Behat/Resources/contexts.yml +++ /dev/null @@ -1,36 +0,0 @@ -services: - bitbag.mercanet_bnp_paribas_plugin.context.setup.mercanet_bnp_paribas: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Context\Setup\MercanetBnpParibasContext - arguments: - - '@sylius.behat.shared_storage' - - '@__symfony__.sylius.repository.payment_method' - - '@__symfony__.sylius.fixture.example_factory.payment_method' - - '@__symfony__.sylius.factory.payment_method_translation' - - '@__symfony__.sylius.manager.payment_method' - - tags: - - { name: fob.context_service } - - bitbag.mercanet_bnp_paribas_plugin.context.ui.shop.mercanet_bnp_paribas: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Context\Ui\Shop\MercanetBnpParibasContext - arguments: - - '@bitbag.mercanet_bnp_paribas_plugin.mocker.mercanet_bnp_paribas' - - '@sylius.behat.page.shop.checkout.complete' - - '@bitbag.mercanet_bnp_paribas_plugin.page.external' - - '@sylius.behat.page.shop.order.show' - tags: - - { name: fob.context_service } - - bitbag.mercanet_bnp_paribas_plugin.context.setup.channel: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Context\Setup\ChannelContext - arguments: - - '@__symfony__.sylius.behat.factory.default_channel' - tags: - - { name: fob.context_service } - - bitbag.mercanet_bnp_paribas_plugin.context.ui.admin.managing_payment_methods: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Context\Ui\Admin\ManagingPaymentMethodsContext - arguments: - - '@bitbag.mercanet_bnp_paribas_plugin.page.admin.payment_method.create' - tags: - - { name: fob.context_service } \ No newline at end of file diff --git a/tests/Behat/Resources/mocker.yml b/tests/Behat/Resources/mocker.yml deleted file mode 100644 index 3ea7a70..0000000 --- a/tests/Behat/Resources/mocker.yml +++ /dev/null @@ -1,5 +0,0 @@ -services: - bitbag.mercanet_bnp_paribas_plugin.mocker.mercanet_bnp_paribas: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Mocker\MercanetBnpParibasMocker - arguments: - - '@sylius.behat.mocker' \ No newline at end of file diff --git a/tests/Behat/Resources/page.yml b/tests/Behat/Resources/page.yml deleted file mode 100644 index 87809cf..0000000 --- a/tests/Behat/Resources/page.yml +++ /dev/null @@ -1,14 +0,0 @@ -services: - bitbag.mercanet_bnp_paribas_plugin.page.external: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Page\External\MercanetBnpParibasCheckoutPage - parent: 'sylius.behat.page' - public: 'false' - arguments: - - '@__symfony__.sylius.repository.payment_security_token' - - bitbag.mercanet_bnp_paribas_plugin.page.admin.payment_method.create: - class: Tests\BitBag\MercanetBnpParibasPlugin\Behat\Page\Admin\PaymentMethod\CreatePage - parent: 'sylius.behat.page.admin.crud.create' - public: 'false' - arguments: - - 'sylius_admin_payment_method_create' \ No newline at end of file diff --git a/tests/Behat/Resources/services.xml b/tests/Behat/Resources/services.xml new file mode 100644 index 0000000..a5f241a --- /dev/null +++ b/tests/Behat/Resources/services.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/Behat/Resources/services/contexts/setup.xml b/tests/Behat/Resources/services/contexts/setup.xml new file mode 100644 index 0000000..19df007 --- /dev/null +++ b/tests/Behat/Resources/services/contexts/setup.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/Behat/Resources/services/contexts/ui.xml b/tests/Behat/Resources/services/contexts/ui.xml new file mode 100644 index 0000000..f37da31 --- /dev/null +++ b/tests/Behat/Resources/services/contexts/ui.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/Behat/Resources/services/page/admin/create_page.xml b/tests/Behat/Resources/services/page/admin/create_page.xml new file mode 100644 index 0000000..d76cf46 --- /dev/null +++ b/tests/Behat/Resources/services/page/admin/create_page.xml @@ -0,0 +1,12 @@ + + + + + + + + sylius_admin_payment_method_create + + + + diff --git a/tests/Behat/Resources/services/page/external/checkout_page.xml b/tests/Behat/Resources/services/page/external/checkout_page.xml new file mode 100644 index 0000000..72005c6 --- /dev/null +++ b/tests/Behat/Resources/services/page/external/checkout_page.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/tests/Behat/Resources/suites.yml b/tests/Behat/Resources/suites.yml index 8c3a473..3de6db6 100644 --- a/tests/Behat/Resources/suites.yml +++ b/tests/Behat/Resources/suites.yml @@ -1,77 +1,3 @@ -default: - suites: - ui_paying_for_order: - contexts_services: - - sylius.behat.context.hook.doctrine_orm - - - sylius.behat.context.transform.address - - sylius.behat.context.transform.customer - - sylius.behat.context.transform.lexical - - sylius.behat.context.transform.locale - - sylius.behat.context.transform.order - - sylius.behat.context.transform.payment - - sylius.behat.context.transform.product - - sylius.behat.context.transform.shared_storage - - sylius.behat.context.transform.shipping_method - - sylius.behat.context.transform.tax_category - - sylius.behat.context.transform.tax_rate - - sylius.behat.context.transform.zone - - - sylius.behat.context.setup.channel - - sylius.behat.context.setup.currency - - sylius.behat.context.setup.geographical - - sylius.behat.context.setup.locale - - sylius.behat.context.setup.order - - sylius.behat.context.setup.payment - - sylius.behat.context.setup.product - - sylius.behat.context.setup.shipping - - sylius.behat.context.setup.shop_security - - sylius.behat.context.setup.taxation - - sylius.behat.context.setup.user - - - sylius.behat.context.ui.paypal - - sylius.behat.context.ui.shop.cart - - sylius.behat.context.ui.shop.checkout - - sylius.behat.context.ui.shop.checkout.addressing - - sylius.behat.context.ui.shop.checkout.complete - - sylius.behat.context.ui.shop.checkout.order_details - - sylius.behat.context.ui.shop.checkout.payment - - sylius.behat.context.ui.shop.checkout.shipping - - sylius.behat.context.ui.shop.checkout.thank_you - - - bitbag.mercanet_bnp_paribas_plugin.context.setup.mercanet_bnp_paribas - - - bitbag.mercanet_bnp_paribas_plugin.context.ui.shop.mercanet_bnp_paribas - filters: - tags: "@paying_with_mercanet_bnp_paribas_for_order && @ui" - ui_managing_payment_methods: - contexts_services: - - sylius.behat.context.hook.doctrine_orm - - - sylius.behat.context.setup.channel - - sylius.behat.context.setup.currency - - sylius.behat.context.setup.locale - - sylius.behat.context.setup.order - - sylius.behat.context.setup.payment - - sylius.behat.context.setup.product - - sylius.behat.context.setup.admin_security - - sylius.behat.context.setup.shipping - - sylius.behat.context.setup.user - - sylius.behat.context.setup.zone - - - sylius.behat.context.transform.address - - sylius.behat.context.transform.customer - - sylius.behat.context.transform.locale - - sylius.behat.context.transform.payment - - sylius.behat.context.transform.product - - sylius.behat.context.transform.shared_storage - - sylius.behat.context.transform.shipping_method - - - sylius.behat.context.ui.admin.managing_payment_methods - - sylius.behat.context.ui.admin.notification - - sylius.behat.context.ui.shop.locale - - - bitbag.mercanet_bnp_paribas_plugin.context.setup.channel - - bitbag.mercanet_bnp_paribas_plugin.context.ui.admin.managing_payment_methods - filters: - tags: "@managing_payment_method_mercanet_bnp_paribas && @ui" +imports: + - suites/ui/managing_payment_methods.yml + - suites/ui/paying_for_order.yml diff --git a/tests/Behat/Resources/suites/ui/managing_payment_methods.yml b/tests/Behat/Resources/suites/ui/managing_payment_methods.yml new file mode 100644 index 0000000..c460612 --- /dev/null +++ b/tests/Behat/Resources/suites/ui/managing_payment_methods.yml @@ -0,0 +1,33 @@ +default: + suites: + ui_managing_payment_methods: + contexts: + - sylius.behat.context.hook.doctrine_orm + + - sylius.behat.context.setup.channel + - sylius.behat.context.setup.currency + - sylius.behat.context.setup.locale + - sylius.behat.context.setup.order + - sylius.behat.context.setup.payment + - sylius.behat.context.setup.product + - sylius.behat.context.setup.admin_security + - sylius.behat.context.setup.shipping + - sylius.behat.context.setup.user + - sylius.behat.context.setup.zone + + - sylius.behat.context.transform.address + - sylius.behat.context.transform.customer + - sylius.behat.context.transform.locale + - sylius.behat.context.transform.payment + - sylius.behat.context.transform.product + - sylius.behat.context.transform.shared_storage + - sylius.behat.context.transform.shipping_method + + - sylius.behat.context.ui.admin.managing_payment_methods + - sylius.behat.context.ui.admin.notification + - sylius.behat.context.ui.shop.locale + + - bitbag.mercanet_bnp_paribas_plugin.context.setup.channel + - bitbag.mercanet_bnp_paribas_plugin.context.ui.admin.managing_payment_methods + filters: + tags: "@managing_payment_method_mercanet_bnp_paribas && @ui" diff --git a/tests/Behat/Resources/suites/ui/paying_for_order.yml b/tests/Behat/Resources/suites/ui/paying_for_order.yml new file mode 100644 index 0000000..b3526aa --- /dev/null +++ b/tests/Behat/Resources/suites/ui/paying_for_order.yml @@ -0,0 +1,46 @@ +default: + suites: + ui_paying_for_order: + contexts: + - sylius.behat.context.hook.doctrine_orm + + - sylius.behat.context.transform.address + - sylius.behat.context.transform.customer + - sylius.behat.context.transform.lexical + - sylius.behat.context.transform.locale + - sylius.behat.context.transform.order + - sylius.behat.context.transform.payment + - sylius.behat.context.transform.product + - sylius.behat.context.transform.shared_storage + - sylius.behat.context.transform.shipping_method + - sylius.behat.context.transform.tax_category + - sylius.behat.context.transform.tax_rate + - sylius.behat.context.transform.zone + + - sylius.behat.context.setup.channel + - sylius.behat.context.setup.currency + - sylius.behat.context.setup.geographical + - sylius.behat.context.setup.locale + - sylius.behat.context.setup.order + - sylius.behat.context.setup.payment + - sylius.behat.context.setup.product + - sylius.behat.context.setup.shipping + - sylius.behat.context.setup.shop_security + - sylius.behat.context.setup.taxation + - sylius.behat.context.setup.user + + - sylius.behat.context.ui.paypal + - sylius.behat.context.ui.shop.cart + - sylius.behat.context.ui.shop.checkout + - sylius.behat.context.ui.shop.checkout.addressing + - sylius.behat.context.ui.shop.checkout.complete + - sylius.behat.context.ui.shop.checkout.order_details + - sylius.behat.context.ui.shop.checkout.payment + - sylius.behat.context.ui.shop.checkout.shipping + - sylius.behat.context.ui.shop.checkout.thank_you + + - bitbag.mercanet_bnp_paribas_plugin.context.setup.mercanet_bnp_paribas + + - bitbag.mercanet_bnp_paribas_plugin.context.ui.shop.mercanet_bnp_paribas + filters: + tags: "@paying_with_mercanet_bnp_paribas_for_order && @ui" diff --git a/tests/Behat/Mocker/MercanetBnpParibasMocker.php b/tests/Behat/Service/Mocker/MercanetBnpParibasMocker.php similarity index 85% rename from tests/Behat/Mocker/MercanetBnpParibasMocker.php rename to tests/Behat/Service/Mocker/MercanetBnpParibasMocker.php index e45f880..8ca17e9 100644 --- a/tests/Behat/Mocker/MercanetBnpParibasMocker.php +++ b/tests/Behat/Service/Mocker/MercanetBnpParibasMocker.php @@ -1,5 +1,14 @@ - */ final class MercanetBnpParibasMocker { - /** - * @var Mocker - */ + /** @var Mocker */ private $mocker; - /** - * @param Mocker $mocker - */ public function __construct(Mocker $mocker) { $this->mocker = $mocker; } - /** - * @param callable $action - */ public function completedPayment(callable $action) { $openMercanetBnpParibasWrapper = $this->mocker @@ -76,14 +74,13 @@ public function completedPayment(callable $action) ->andReturn(Mercanet::TEST) ; + $openMercanetBnpParibasWrapper->shouldReceive('getAuthorisationId')->andReturn('12345'); + $action(); $this->mocker->unmockAll(); } - /** - * @param callable $action - */ public function canceledPayment(callable $action) { $openMercanetBnpParibasWrapper = $this->mocker @@ -125,6 +122,8 @@ public function canceledPayment(callable $action) ->andReturn(Mercanet::TEST) ; + $openMercanetBnpParibasWrapper->shouldReceive('getAuthorisationId')->andReturn('12345'); + $action(); $this->mocker->unmockAll(); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..126c050 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,40 @@ +const path = require('path'); +const Encore = require('@symfony/webpack-encore'); +const pluginName = 'mercanet_bnp_paribas'; + +const getConfig = (pluginName, type) => { + Encore.reset(); + + Encore + .setOutputPath(`public/build/bitbag/${pluginName}/${type}/`) + .setPublicPath(`/build/bitbag/${pluginName}/${type}/`) + .addEntry(`bitbag-${pluginName}-${type}`, path.resolve(__dirname, `./src/Resources/assets/${type}/entry.js`)) + .disableSingleRuntimeChunk() + .cleanupOutputBeforeBuild() + .enableSourceMaps(!Encore.isProduction()) + .enableSassLoader(); + + const config = Encore.getWebpackConfig(); + config.name = `bitbag-${pluginName}-${type}`; + + return config; +} + +Encore + .setOutputPath(`src/Resources/public/`) + .setPublicPath(`/public/`) + .addEntry(`bitbag-${pluginName}-shop`, path.resolve(__dirname, `./src/Resources/assets/shop/entry.js`)) + .addEntry(`bitbag-${pluginName}-admin`, path.resolve(__dirname, `./src/Resources/assets/admin/entry.js`)) + .cleanupOutputBeforeBuild() + .disableSingleRuntimeChunk() + .enableSassLoader(); + +const distConfig = Encore.getWebpackConfig(); +distConfig.name = `bitbag-plugin-dist`; + +Encore.reset(); + +const shopConfig = getConfig(pluginName, 'shop') +const adminConfig = getConfig(pluginName, 'admin') + +module.exports = [shopConfig, adminConfig, distConfig];